From c93a128786e19c916b096ec646a948a039eca9e1 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 8 Mar 2024 18:56:57 +0000 Subject: Add comments git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4861 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/libpm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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