about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-11-11 02:55:54 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2007-11-11 02:55:54 +0000
commit12f1d1946c02649cd2fbe210af64d134e2811e5b (patch)
treeb190518b117b7883035c0dd335b37eeab5626827
parent8320d9129dd8f76d1f10f8d8b7b8b47d2b43bcf4 (diff)
downloadnetpbm-mirror-12f1d1946c02649cd2fbe210af64d134e2811e5b.tar.gz
netpbm-mirror-12f1d1946c02649cd2fbe210af64d134e2811e5b.tar.xz
netpbm-mirror-12f1d1946c02649cd2fbe210af64d134e2811e5b.zip
Add some const
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@461 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/pamtopam.c2
-rw-r--r--editor/pnmmontage.c4
-rw-r--r--lib/libpbm1.c3
-rw-r--r--lib/libpm.c8
-rw-r--r--lib/pm.h6
5 files changed, 13 insertions, 10 deletions
diff --git a/converter/other/pamtopam.c b/converter/other/pamtopam.c
index 4630fb9f..cae54060 100644
--- a/converter/other/pamtopam.c
+++ b/converter/other/pamtopam.c
@@ -15,7 +15,7 @@
 #include "pam.h"
 
 int
-main(int argc, char *argv[]) {
+main(int argc, const char * argv[]) {
 
     bool       eof;     /* no more images in input stream */
     struct pam inpam;   /* Input PAM image */
diff --git a/editor/pnmmontage.c b/editor/pnmmontage.c
index e992dab3..7fe0e3b7 100644
--- a/editor/pnmmontage.c
+++ b/editor/pnmmontage.c
@@ -430,7 +430,7 @@ struct cmdlineInfo {
 
 
 int 
-main(int argc, char **argv) {
+main(int argc, const char **argv) {
   struct cmdlineInfo cmdline;
   struct pam *imgs;
   struct pam outimg;
@@ -473,7 +473,7 @@ main(int argc, char **argv) {
   opt.allowNegNum = FALSE;
 
   /* Check for flags. */
-  optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
+  optParseOptions3(&argc, (char**)argv, opt, sizeof(opt), 0);
 
   if (!dataSpec)
       cmdline.data = NULL;
diff --git a/lib/libpbm1.c b/lib/libpbm1.c
index f8b2a17f..45989116 100644
--- a/lib/libpbm1.c
+++ b/lib/libpbm1.c
@@ -17,6 +17,7 @@
 #define _LARGE_FILES  
 
 #include <stdio.h>
+
 #include "pbm.h"
 #include "shhopt.h"
 
@@ -24,7 +25,7 @@ void
 pbm_init(int *   const argcP,
          char ** const argv) {
 
-    pm_proginit(argcP, argv);
+    pm_proginit(argcP, (const char **)argv);
 }
 
 
diff --git a/lib/libpm.c b/lib/libpm.c
index 88396d3f..a65a51a5 100644
--- a/lib/libpm.c
+++ b/lib/libpm.c
@@ -385,12 +385,12 @@ pm_freearray(char ** const rowIndex,
 /* Case-insensitive keyword matcher. */
 
 int
-pm_keymatch(char *       const strarg, 
+pm_keymatch(const char *       const strarg, 
             const char * const keywordarg, 
             int          const minchars) {
     int len;
-    const char *keyword;
-    char *str;
+    const char * keyword;
+    const char * str;
 
     str = strarg;
     keyword = keywordarg;
@@ -660,7 +660,7 @@ showNetpbmHelp(const char progname[]) {
 
 
 void
-pm_proginit(int * const argcP, char * argv[]) {
+pm_proginit(int * const argcP, const char * argv[]) {
 /*----------------------------------------------------------------------------
    Do various initialization things that all programs in the Netpbm package,
    and programs that emulate such programs, should do.
diff --git a/lib/pm.h b/lib/pm.h
index 28dfbb43..b818cae6 100644
--- a/lib/pm.h
+++ b/lib/pm.h
@@ -96,7 +96,7 @@ void
 pm_init(const char * const progname, unsigned int const flags);
 
 void 
-pm_proginit(int* const argcP, char* argv[]);
+pm_proginit(int * const argcP, const char * argv[]);
 
 void
 pm_setMessage(int const newState, int * const oldStateP);
@@ -129,7 +129,9 @@ pm_freerow(void * const row);
 
 /* Obsolete -- use shhopt instead */
 int 
-pm_keymatch (char* const str, const char* const keyword, int const minchars);
+pm_keymatch(const char * const str,
+            const char * const keyword,
+            int          const minchars);
 
 
 int PURE_FN_ATTR