diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-03-08 18:56:57 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-03-08 18:56:57 +0000 |
commit | c93a128786e19c916b096ec646a948a039eca9e1 (patch) | |
tree | 2d8919a47ccb8f0c87a4645ff99bd60cb232ad39 /lib | |
parent | b1528e437e46d978c8e5721197ac0d41536c5403 (diff) | |
download | netpbm-mirror-c93a128786e19c916b096ec646a948a039eca9e1.tar.gz netpbm-mirror-c93a128786e19c916b096ec646a948a039eca9e1.tar.xz netpbm-mirror-c93a128786e19c916b096ec646a948a039eca9e1.zip |
Add comments
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4861 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpm.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 */ |