Changeset 15363 for trunk/ppstamp/src/ppstamp.c
- Timestamp:
- Oct 23, 2007, 11:50:52 AM (19 years ago)
- Location:
- trunk/ppstamp/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppstamp/src
- Property svn:ignore
-
old new 6 6 config.h.in 7 7 stamp-h1 8 ppstampErrorCodes.c 9 ppstampErrorCodes.h
-
- Property svn:ignore
-
trunk/ppstamp/src/ppstamp.c
r15280 r15363 7 7 int main(int argc, char **argv) 8 8 { 9 ppstampOptions *options; 9 ppstampOptions *options = NULL; 10 int exitCode; 10 11 11 12 psTimerStart(TIMERNAME); 12 13 13 psLibInit(NULL); 14 15 // Parse the configuration and arguments 16 // Open the input image(s) 17 // note usage is called on error or request by ppstampArguments 18 // TODO is the cleanup really necessary since we're exiting anyways? 19 // (It's useful to know about memory leaks) 14 ppstampErrorRegister(); 20 15 21 16 pmConfig *config = ppstampArguments(argc, argv, &options); … … 26 21 } 27 22 28 // define recipe options29 23 // define the active I/O files 30 24 if (!ppstampParseCamera(config)) { … … 35 29 36 30 // find the pixels that we need to copy, setup the output image 37 if (!ppstampMakeStamp(config, options)) { 38 exit(PS_EXIT_UNKNOWN_ERROR); 31 if (ppstampMakeStamp(config, options)) { 32 exitCode = 0; 33 } else { 34 exitCode = PS_EXIT_DATA_ERROR; 39 35 } 40 36 … … 44 40 ppstampCleanup(config, options); 45 41 46 return PS_EXIT_SUCCESS;42 return exitCode; 47 43 }
Note:
See TracChangeset
for help on using the changeset viewer.
