From owner-freebsd-current@freebsd.org Thu Jun 16 19:20:26 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A526A77558 for ; Thu, 16 Jun 2016 19:20:26 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from fallback4.mail.ru (fallback4.mail.ru [94.100.181.169]) by mx1.freebsd.org (Postfix) with ESMTP id 33A4F26A5 for ; Thu, 16 Jun 2016 19:20:25 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from smtp27.mail.ru (smtp27.mail.ru [94.100.181.182]) by fallback4.mail.ru (mPOP.Fallback_MX) with ESMTP id 1E29F1DF52F1 for ; Thu, 16 Jun 2016 22:20:22 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:Subject:From:To; bh=8HwA0XUrVOUwQl6AalB/x9y3jwhkA6b48zNBYHE39mA=; b=fMkxWf/HNh326+/f+uQL+RvscNmc0hUSUGrHe5UYC/3T7p0hm+ZT5qxQiGdO5XKs0eJYpeX5zGtCEpUNgj4AIWjsIDDIXP9cuoAm9jENYYSb2gEj1iLUKT6PObYwbxFgejZq0EsBigjAOxtrFvGWxmY/zj+DQ6QYHwu0bLiWySo=; Received: from vlan98-191.azeronline.com ([46.23.98.191]:60538) by smtp27.mail.ru with esmtpa (envelope-from ) id 1bDcpp-0003yT-86 for freebsd-current@freebsd.org; Thu, 16 Jun 2016 22:20:14 +0300 To: freebsd-current@freebsd.org From: rihad Subject: dpv(1) ignores -i & -I flags Message-ID: <99aa9e97-8bdb-cd7e-ea3a-fcdb05ee86da@mail.ru> Date: Thu, 16 Jun 2016 23:20:04 +0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Mras: OK X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2016 19:20:26 -0000 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; }