From 81c59f730dacf62c927eb57dcadeecffe8b8daea Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 30 Mar 2024 18:31:01 +0000 Subject: promote Development to Advanced git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4897 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/libpm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/libpm.c') diff --git a/lib/libpm.c b/lib/libpm.c index d1fc6c42..4dd19b70 100644 --- a/lib/libpm.c +++ b/lib/libpm.c @@ -706,7 +706,16 @@ pm_proginit(int * const argcP, find. We remove the common options from argv[], updating *argcP accordingly. - This includes calling pm_init() to initialize the Netpbm libraries. + This includes calling 'pm_init' to initialize the Netpbm libraries. + + argv[] is intended to be the program's POSIX arguments (as passed to the + program's main function). But note that POSIX arguments are modifiable and + as such, the conventional way to declare them in a program is with "char + **", as opposed to pm_proginit's "const char **". To avoid a compiler + warning, the program has to use the unconventional "const char **" type in + the declaration of its main function. (Alternatively, it can just cast it + to const char ** later). 'pm_proginit' does not modify any argument + strings. -----------------------------------------------------------------------------*/ const char * const progname = pm_arg0toprogname(argv[0]); /* points to static memory in this library */ -- cgit 1.4.1