diff main.c @ 185:16b4451e34b8

Add the ability to output line numbers, sort of. It is enabled with the intentionally undocumented -p option (similar to -P but reversed sense) and it might be vaguely useful but only prints the line number when the file changes and may not get the line numbers right.
author David A. Holland
date Fri, 12 Jun 2015 03:59:36 -0400
parents 4c3375895c6e
children 079304130850
line wrap: on
line diff
--- a/main.c	Fri Jun 12 03:35:01 2015 -0400
+++ b/main.c	Fri Jun 12 03:59:36 2015 -0400
@@ -55,6 +55,7 @@
 
 	.do_output = true,
 	.output_linenumbers = true,
+	.output_cheaplinenumbers = false,
 	.output_retain_comments = false,
 	.output_file = NULL,
 
@@ -781,6 +782,7 @@
 	{ "MG",                         &mode.depend_assume_generated, true },
 	{ "MP",                         &mode.depend_issue_fakerules,  true },
 	{ "P",                          &mode.output_linenumbers,      false },
+	{ "p",                          &mode.output_cheaplinenumbers, true },
 	{ "Wcomment",                   &warns.nestcomment,    true },
 	{ "Wendif-labels",              &warns.endiflabels,    true },
 	{ "Werror",                     &mode.werror,          true },