Date: Thu, 16 Jun 2016 23:20:04 +0400 From: rihad <rihad@mail.ru> To: freebsd-current@freebsd.org Subject: dpv(1) ignores -i & -I flags Message-ID: <99aa9e97-8bdb-cd7e-ea3a-fcdb05ee86da@mail.ru>
next in thread | raw e-mail | index | archive | help
By simply overwriting the provided template strings with the default
ones a bit later.
Here's one possible fix (untested):
--- dpv.c.orig 2016-06-16 23:14:00.466195000 +0400
+++ dpv.c 2016-06-16 23:15:39.306944000 +0400
@@ -455,12 +455,16 @@
/* Set status formats and action */
if (line_mode) {
- config->status_solo = LINE_STATUS_SOLO;
- config->status_many = LINE_STATUS_SOLO;
+ if (!config->status_solo)
+ config->status_solo = LINE_STATUS_SOLO;
+ if (!config->status_many)
+ config->status_many = LINE_STATUS_SOLO;
config->action = operate_on_lines;
} else {
- config->status_solo = BYTE_STATUS_SOLO;
- config->status_many = BYTE_STATUS_SOLO;
+ if (!config->status_solo)
+ config->status_solo = BYTE_STATUS_SOLO;
+ if (!config->status_many)
+ config->status_many = BYTE_STATUS_SOLO;
config->action = operate_on_bytes;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99aa9e97-8bdb-cd7e-ea3a-fcdb05ee86da>
