diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2014-08-06 07:43:18 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2014-08-06 07:43:18 -0700 |
commit | 4ac119c37dae1e74ac12e2402433f17696b89b71 (patch) | |
tree | 354398c36099661c16ad0cd743ba3896bd0d9c6a | |
parent | 1823aaf84dd0fe1c6ce263d28f325d91665c04bb (diff) |
343.13343.13
-rw-r--r-- | common-utils/gen-manpage-opts-helper.c | 21 | ||||
-rw-r--r-- | version.mk | 2 |
2 files changed, 20 insertions, 3 deletions
diff --git a/common-utils/gen-manpage-opts-helper.c b/common-utils/gen-manpage-opts-helper.c index c05ef38..84bac62 100644 --- a/common-utils/gen-manpage-opts-helper.c +++ b/common-utils/gen-manpage-opts-helper.c @@ -90,7 +90,9 @@ static void print_option(const NVGetoptOption *o) * '&' : toggles italics on and off * '^' : toggles bold on and off * '-' : is backslashified: "\-" + * '\n': resets the first character flag * '.' : must not be the first character of a line + * '\'': must not be the first character of a line * * Trailing whitespace is omitted when italics or bold is on */ @@ -110,8 +112,8 @@ static void print_option(const NVGetoptOption *o) printf("\n.I "); } omitWhiteSpace = italics; + firstchar = italics; italics = !italics; - firstchar = TRUE; break; case '^': if (bold) { @@ -120,8 +122,8 @@ static void print_option(const NVGetoptOption *o) printf("\n.B "); } omitWhiteSpace = bold; + firstchar = bold; bold = !bold; - firstchar = TRUE; break; case '-': printf("\\-"); @@ -134,6 +136,11 @@ static void print_option(const NVGetoptOption *o) firstchar = FALSE; } break; + case '\n': + printf("\n"); + omitWhiteSpace = FALSE; + firstchar = TRUE; + break; case '.': if (firstchar) { fprintf(stderr, "Error: *roff can't start a line with '.' " @@ -144,6 +151,16 @@ static void print_option(const NVGetoptOption *o) exit(1); } /* fall through */ + case '\'': + if (firstchar) { + fprintf(stderr, "Error: *roff can't start a line with '\''. " + "If you started a line with '\'' in the description " + "of the '%s' option, please add some text at the " + "beginning of the sentence, so that a valid manpage " + "can be generated.\n", o->name); + exit(1); + } + /* fall through */ default: printf("%c", *s); omitWhiteSpace = FALSE; @@ -1 +1 @@ -NVIDIA_VERSION = 340.24 +NVIDIA_VERSION = 343.13 |