summaryrefslogtreecommitdiff
path: root/grep-dctrl
diff options
context:
space:
mode:
authorAntti-Juhani Kaijanaho <ajk@debian.org>2011-07-28 13:25:33 +0300
committerAntti-Juhani Kaijanaho <ajk@debian.org>2011-07-28 13:25:33 +0300
commitb999fc22729ec0644bb63be4c3279b0645fca700 (patch)
tree07727424105ebf725a6250ebfbf40325193880bc /grep-dctrl
parent6c39ef693c947528d507866e4c3d5e91876cbafc (diff)
downloaddctrl-tools-b999fc22729ec0644bb63be4c3279b0645fca700.tar.gz
#209134: Print the field name as in the paragraph, not as on command line
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
Diffstat (limited to 'grep-dctrl')
-rw-r--r--grep-dctrl/grep-dctrl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/grep-dctrl/grep-dctrl.c b/grep-dctrl/grep-dctrl.c
index 115b278..a80ca30 100644
--- a/grep-dctrl/grep-dctrl.c
+++ b/grep-dctrl/grep-dctrl.c
@@ -787,7 +787,12 @@ static void show_field(struct arguments *args,
}
if (args->show_field_name) {
- printf("%s: ", fa->name);
+ struct fsaf_read_rv rn =
+ fsaf_read(para->common->fp,
+ fd->name_start,
+ fd->name_end - fd->name_start);
+ fwrite(rn.b, 1, rn.len, stdout);
+ fputs(": ", stdout);
}
fwrite(r.b, 1, r.len, stdout);