diff options
Diffstat (limited to 'src/libs/libgroff')
-rw-r--r-- | src/libs/libgroff/quotearg.c | 10 | ||||
-rw-r--r-- | src/libs/libgroff/spawnvp.c | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/libs/libgroff/quotearg.c b/src/libs/libgroff/quotearg.c index 62edfd27..728a29ea 100644 --- a/src/libs/libgroff/quotearg.c +++ b/src/libs/libgroff/quotearg.c @@ -28,7 +28,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Define the default mechanism, and messages, for error reporting * (user may substitute a preferred alternative, by defining his own * implementation of the macros REPORT_ERROR, QUOTE_ARG_MALLOC_FAILED - * and QUOTE_ARG_REALLOC_FAILED, in a header file called 'nonposix.h'). + * and QUOTE_ARG_REALLOC_FAILED, in the header file `nonposix.h'). */ #include "nonposix.h" @@ -37,10 +37,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # define REPORT_ERROR(WHY) fprintf(stderr, "%s:%s\n", program_name, WHY) #endif #ifndef QUOTE_ARG_MALLOC_ERROR -# define QUOTE_ARG_MALLOC_ERROR "malloc:buffer allocation failed" +# define QUOTE_ARG_MALLOC_ERROR "malloc: Buffer allocation failed" #endif #ifndef QUOTE_ARG_REALLOC_ERROR -# define QUOTE_ARG_REALLOC_ERROR "realloc:buffer resize failed" +# define QUOTE_ARG_REALLOC_ERROR "realloc: Buffer resize failed" #endif extern char *program_name; /* main program must define this */ @@ -58,8 +58,8 @@ needs_quoting(const char *string) if (string == NULL) /* ignore NULL strings */ return FALSE; - if (*string == '\0') /* preserve explicit null arguments */ - return TRUE; + if (*string == '\0') /* explicit arguments of zero length */ + return TRUE; /* need quoting, so they aren't discarded */ while (*string) { /* Scan non-NULL strings, up to '\0' terminator, diff --git a/src/libs/libgroff/spawnvp.c b/src/libs/libgroff/spawnvp.c index 3022fdbd..e185ec30 100644 --- a/src/libs/libgroff/spawnvp.c +++ b/src/libs/libgroff/spawnvp.c @@ -29,12 +29,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <process.h> #endif -#define SPAWNVP_C 1 +#define SPAWN_FUNCTION_WRAPPERS 1 /* Define the default mechanism, and messages, for error reporting * (user may substitute a preferred alternative, by defining his own - * implementation of the macros REPORT_ERROR, QUOTE_ARG_MALLOC_FAILED - * and QUOTE_ARG_REALLOC_FAILED, in a header file called 'nonposix.h'). + * implementation of the macros REPORT_ERROR and ARGV_MALLOC_ERROR, + * in the header file `nonposix.h'). */ #include "nonposix.h" @@ -42,8 +42,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef REPORT_ERROR # define REPORT_ERROR(WHY) fprintf(stderr, "%s:%s\n", program_name, WHY) #endif -#ifndef SPAWNVP_MALLOC_ERROR -# define SPAWNVP_MALLOC_ERROR "malloc:allocation for 'argv' failed" +#ifndef ARGV_MALLOC_ERROR +# define ARGV_MALLOC_ERROR "malloc: Allocation for 'argv' failed" #endif extern char *program_name; @@ -84,12 +84,12 @@ spawnvp_wrapper(int mode, char *path, char **argv) /* If we didn't get enough space, * then complain, and bail out gracefully. */ - REPORT_ERROR(SPAWNVP_MALLOC_ERROR); + REPORT_ERROR(ARGV_MALLOC_ERROR); exit(1); } /* Now copy the passed `argv' into our new vector, - * quoting it contents as required. */ + * quoting its contents as required. */ for (i = 0; i < argc; i++) quoted_argv[i] = quote_arg(argv[i]); |