about summary refs log tree commit diff
path: root/other
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-19 20:10:12 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-19 20:10:12 +0000
commitc9a8ded6515622a338acb53c219ad38994472683 (patch)
tree19e010bae1050ffca87a4e310c6253b5d87c0223 /other
parent71d45e99ee6ba0a61c3f177e645ce5886923bd4d (diff)
downloadnetpbm-mirror-c9a8ded6515622a338acb53c219ad38994472683.tar.gz
netpbm-mirror-c9a8ded6515622a338acb53c219ad38994472683.tar.xz
netpbm-mirror-c9a8ded6515622a338acb53c219ad38994472683.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1941 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other')
-rw-r--r--other/pamchannel.c10
-rw-r--r--other/pamdepth.c11
-rw-r--r--other/pamexec.c2
-rw-r--r--other/pampick.c10
-rw-r--r--other/pamsplit.c2
-rw-r--r--other/pamstack.c4
-rw-r--r--other/pnmcolormap.c4
7 files changed, 21 insertions, 22 deletions
diff --git a/other/pamchannel.c b/other/pamchannel.c
index 48a2b2d7..3adb0e66 100644
--- a/other/pamchannel.c
+++ b/other/pamchannel.c
@@ -36,7 +36,7 @@ struct cmdlineInfo {
 
 
 static void
-parseCommandLine(int argc, char ** argv,
+parseCommandLine(int argc, const char ** argv,
                  struct cmdlineInfo * const cmdlineP) {
 /*----------------------------------------------------------------------------
    Note that the file spec array we return is stored in the storage that
@@ -63,7 +63,7 @@ parseCommandLine(int argc, char ** argv,
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
     opt.allowNegNum = FALSE;  /* We have no parms that are negative numbers */
 
-    pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
+    pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
     if (!infileSpec)
@@ -174,13 +174,13 @@ doOneImage(FILE *       const ifP,
 
 
 int
-main(int argc, char *argv[]) {
+main(int argc, const char *argv[]) {
 
     struct cmdlineInfo cmdline;
     FILE * ifP;
-    bool eof;
+    int eof;
 
-    pnm_init(&argc, argv);
+    pm_proginit(&argc, argv);
 
     parseCommandLine(argc, argv, &cmdline);
     
diff --git a/other/pamdepth.c b/other/pamdepth.c
index 7b5de8b3..71dae9d8 100644
--- a/other/pamdepth.c
+++ b/other/pamdepth.c
@@ -28,7 +28,7 @@ struct cmdlineInfo {
 
 
 static void
-parseCommandLine(int argc, char ** argv,
+parseCommandLine(int argc, const char ** argv,
                  struct cmdlineInfo *cmdlineP) {
 /*----------------------------------------------------------------------------
    Note that the file spec strings we return are stored in the storage that
@@ -51,7 +51,7 @@ parseCommandLine(int argc, char ** argv,
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
     opt.allowNegNum = FALSE;  /* We may have parms that are negative numbers */
 
-    pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
+    pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
     if (argc-1 < 1)
@@ -133,16 +133,15 @@ transformRaster(struct pam * const inpamP,
 
 
 int
-main(int    argc,
-     char * argv[]) {
+main(int argc, const char * argv[]) {
 
     struct cmdlineInfo cmdline;
     FILE * ifP;
     struct pam inpam;
     struct pam outpam;
-    bool eof;
+    int eof;
 
-    pnm_init(&argc, argv);
+    pm_proginit(&argc, argv);
 
     parseCommandLine(argc, argv, &cmdline);
 
diff --git a/other/pamexec.c b/other/pamexec.c
index 5961319b..d14d8752 100644
--- a/other/pamexec.c
+++ b/other/pamexec.c
@@ -159,7 +159,7 @@ main(int argc, const char *argv[]) {
     struct cmdlineInfo cmdline;
 
     FILE *       ifP;         /* Input file pointer */
-    bool         eof;         /* No more images in input */
+    int          eof;         /* No more images in input */
     unsigned int imageSeq;
         /* Sequence number of current image in input file.  First = 0.
            (Useful for tracking down problems).
diff --git a/other/pampick.c b/other/pampick.c
index 5229502d..61941f06 100644
--- a/other/pampick.c
+++ b/other/pampick.c
@@ -92,7 +92,7 @@ struct cmdlineInfo {
 
 
 static void
-parseCommandLine(int argc, char ** argv,
+parseCommandLine(int argc, const char ** argv,
                  struct cmdlineInfo * const cmdlineP) {
 /*----------------------------------------------------------------------------
    Note that the pointers we place into *cmdlineP are sometimes to storage
@@ -119,7 +119,7 @@ parseCommandLine(int argc, char ** argv,
     opt.short_allowed = FALSE;  /* We have no short (old-fashioned) options */
     opt.allowNegNum = FALSE;  /* We have no parms that are negative numbers */
 
-    pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
+    pm_optParseOptions3(&argc, (char **)argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
     initUintSet(&cmdlineP->imageSeqList, argc-1);
@@ -217,15 +217,15 @@ failIfUnpickedImages(const struct uintSet * const uintSetP,
 
 
 int
-main(int argc, char *argv[]) {
+main(int argc, const char *argv[]) {
 
     struct cmdlineInfo cmdline;
 
-    bool eof;  /* No more images in input */
+    int eof;  /* No more images in input */
     unsigned int imageSeq;  
         /* Sequence of current image in input file.  First = 0 */
 
-    pnm_init(&argc, argv);
+    pm_proginit(&argc, argv);
 
     parseCommandLine(argc, argv, &cmdline);
     
diff --git a/other/pamsplit.c b/other/pamsplit.c
index 2c029d04..26eb0d59 100644
--- a/other/pamsplit.c
+++ b/other/pamsplit.c
@@ -155,7 +155,7 @@ main(int argc, const char *argv[]) {
     struct cmdlineInfo cmdline;
 
     FILE * ifP;
-    bool eof;  /* No more images in input */
+    int eof;  /* No more images in input */
     unsigned int imageSeq;  
         /* Sequence of current image in input file.  First = 0 */
 
diff --git a/other/pamstack.c b/other/pamstack.c
index e151d99b..308852c8 100644
--- a/other/pamstack.c
+++ b/other/pamstack.c
@@ -216,10 +216,10 @@ nextImageAllStreams(unsigned int const nInput,
     unsigned int inputSeq;
 
     for (inputSeq = 0; inputSeq < nInput; ++inputSeq) {
-        bool eof;
+        int eof;
         pnm_nextimage(ifP[inputSeq], &eof);
         if (eof)
-            *eofP = eof;
+            *eofP = true;
     }
 }
 
diff --git a/other/pnmcolormap.c b/other/pnmcolormap.c
index fca4a213..57db4329 100644
--- a/other/pnmcolormap.c
+++ b/other/pnmcolormap.c
@@ -655,7 +655,7 @@ addImageColorsToHash(struct pam *   const pamP,
         pnm_readpamrow(pamP, tuplerow);
 
         for (col = 0; col < pamP->width; ++col) {
-            bool firstOccurrence;
+            int firstOccurrence;
 
             pnm_addtuplefreqoccurrence(pamP, tuplerow[col], tuplehash,
                                        &firstOccurrence);
@@ -688,7 +688,7 @@ computeHistogram(FILE *         const ifP,
     struct pam firstPam;
     tuplehash tuplehash;
     unsigned int colorCount;
-    bool eof;
+    int eof;
     
     pm_message("making histogram...");