From d581c5410cf9299df0cca483eedeb59ed91fb614 Mon Sep 17 00:00:00 2001 From: schwarze Date: Wed, 25 Dec 2013 00:50:03 +0000 Subject: [PATCH] s/[Nn]ull/NUL/ in comments where appropriate; suggested by Thomas Klausner . --- usr.bin/mandoc/man_macro.c | 3 ++- usr.bin/mandoc/mandoc.c | 8 ++++---- usr.bin/mandoc/mdoc_argv.c | 8 ++++---- usr.bin/mandoc/roff.c | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c index e1f5be37cef..cd60c9571cb 100644 --- a/usr.bin/mandoc/man_macro.c +++ b/usr.bin/mandoc/man_macro.c @@ -1,7 +1,8 @@ -/* $Id: man_macro.c,v 1.41 2013/12/22 13:24:00 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.42 2013/12/25 00:50:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2013 Ingo Schwarze + * Copyright (c) 2013 Franco Fichtner * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/usr.bin/mandoc/mandoc.c b/usr.bin/mandoc/mandoc.c index b96077b4e70..af93d8ea8b8 100644 --- a/usr.bin/mandoc/mandoc.c +++ b/usr.bin/mandoc/mandoc.c @@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.39 2013/11/10 20:17:14 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.40 2013/12/25 00:50:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -415,10 +415,10 @@ mandoc_strdup(const char *ptr) * Parse a quoted or unquoted roff-style request or macro argument. * Return a pointer to the parsed argument, which is either the original * pointer or advanced by one byte in case the argument is quoted. - * Null-terminate the argument in place. + * NUL-terminate the argument in place. * Collapse pairs of quotes inside quoted arguments. * Advance the argument pointer to the next argument, - * or to the null byte terminating the argument line. + * or to the NUL byte terminating the argument line. */ char * mandoc_getarg(struct mparse *parse, char **cpp, int ln, int *pos) @@ -489,7 +489,7 @@ mandoc_getarg(struct mparse *parse, char **cpp, int ln, int *pos) if (1 == quoted) mandoc_msg(MANDOCERR_BADQUOTE, parse, ln, *pos, NULL); - /* Null-terminate this argument and move to the next one. */ + /* NUL-terminate this argument and move to the next one. */ if (pairs) cp[-pairs] = '\0'; if ('\0' != *cp) { diff --git a/usr.bin/mandoc/mdoc_argv.c b/usr.bin/mandoc/mdoc_argv.c index 0f69fb8af9d..ce82851bead 100644 --- a/usr.bin/mandoc/mdoc_argv.c +++ b/usr.bin/mandoc/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.45 2013/12/22 14:06:29 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.46 2013/12/25 00:50:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012 Ingo Schwarze @@ -532,12 +532,12 @@ args(struct mdoc *mdoc, int line, int *pos, /* Skip ahead. */ ; return(rc); - } + } - /* + /* * Process a quoted literal. A quote begins with a double-quote * and ends with a double-quote NOT preceded by a double-quote. - * Null-terminate the literal in place. + * NUL-terminate the literal in place. * Collapse pairs of quotes inside quoted literals. * Whitespace is NOT involved in literal termination. */ diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 6c9dfa97282..2bf8d617a5f 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.60 2013/12/15 21:18:00 schwarze Exp $ */ +/* $Id: roff.c,v 1.61 2013/12/25 00:50:03 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze @@ -1729,7 +1729,7 @@ roff_userdef(ROFF_ARGS) /* * Collect pointers to macro argument strings - * and null-terminate them. + * and NUL-terminate them. */ cp = *bufp + pos; for (i = 0; i < 9; i++) -- 2.20.1