about summary refs log tree commit diff
path: root/other/pamsplit.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/pamsplit.c')
-rw-r--r--other/pamsplit.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/other/pamsplit.c b/other/pamsplit.c
index 93c1726a..1c1ab3d4 100644
--- a/other/pamsplit.c
+++ b/other/pamsplit.c
@@ -41,9 +41,7 @@ parseCommandLine(int argc, const char ** argv,
    Note that the pointers we place into *cmdlineP are sometimes to storage
    in the argv array.
 -----------------------------------------------------------------------------*/
-    optEntry *option_def;
-        /* Instructions to OptParseOptions3 on how to parse our options.
-         */
+    optEntry * option_def;
     optStruct3 opt;
 
     unsigned int padnameSpec;
@@ -60,13 +58,13 @@ parseCommandLine(int argc, const 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, (char **)argv, opt, sizeof(opt), 0);
+    pm_optParseOptions4(&argc, argv, opt, sizeof(opt), 0);
         /* Uses and sets argc, argv, and some of *cmdlineP and others. */
 
     if (!padnameSpec)
         cmdlineP->padname = 0;
 
-    if (argc - 1 < 1) 
+    if (argc - 1 < 1)
         cmdlineP->inputFileName = "-";
     else
         cmdlineP->inputFileName = argv[1];
@@ -91,7 +89,7 @@ extractOneImage(FILE * const infileP,
     struct pam inpam;
     struct pam outpam;
     enum pm_check_code checkRetval;
-    
+
     unsigned int row;
     tuple * tuplerow;
 
@@ -115,7 +113,7 @@ extractOneImage(FILE * const infileP,
 
 
 static void
-computeOutputName(char          const outputFilePattern[], 
+computeOutputName(char          const outputFilePattern[],
                   unsigned int  const padCount,
                   unsigned int  const imageSeq,
                   const char ** const outputNameP) {
@@ -157,13 +155,13 @@ main(int argc, const char *argv[]) {
 
     FILE * ifP;
     int eof;  /* No more images in input */
-    unsigned int imageSeq;  
+    unsigned int imageSeq;
         /* Sequence of current image in input file.  First = 0 */
 
     pm_proginit(&argc, argv);
 
     parseCommandLine(argc, argv, &cmdline);
-    
+
     ifP = pm_openr(cmdline.inputFileName);
 
     eof = FALSE;
@@ -171,7 +169,7 @@ main(int argc, const char *argv[]) {
         FILE * ofP;
         const char * outputFileName;  /* malloc'ed */
 
-        computeOutputName(cmdline.outputFilePattern, cmdline.padname, 
+        computeOutputName(cmdline.outputFilePattern, cmdline.padname,
                           imageSeq,
                           &outputFileName);
         pm_message("WRITING %s", outputFileName);
@@ -185,7 +183,7 @@ main(int argc, const char *argv[]) {
         pnm_nextimage(ifP, &eof);
     }
     pm_close(ifP);
-    
+
     return 0;
 }