diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-09-29 21:45:56 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-09-29 21:45:56 +0000 |
commit | 28ed9cda2a47c17130ee5b97588695ed3acb4e45 (patch) | |
tree | 8de89d205b94221a7941177f365f0e05c0fad039 /converter/ppm/ppmtompeg/readframe.c | |
parent | c1b82fa06e7e88a68c877c501fc0422888920415 (diff) | |
download | netpbm-mirror-28ed9cda2a47c17130ee5b97588695ed3acb4e45.tar.gz netpbm-mirror-28ed9cda2a47c17130ee5b97588695ed3acb4e45.tar.xz netpbm-mirror-28ed9cda2a47c17130ee5b97588695ed3acb4e45.zip |
Rename nstring.h functions with pm_ prefix
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1320 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/ppmtompeg/readframe.c')
-rw-r--r-- | converter/ppm/ppmtompeg/readframe.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/converter/ppm/ppmtompeg/readframe.c b/converter/ppm/ppmtompeg/readframe.c index d1423c1f..112ebdf0 100644 --- a/converter/ppm/ppmtompeg/readframe.c +++ b/converter/ppm/ppmtompeg/readframe.c @@ -155,7 +155,7 @@ openFile(struct inputSource * const inputSourceP, GetNthInputFileName(inputSourceP, frameNumber, &fileName); - asprintfN(&fullFileName, "%s/%s", currentPath, fileName); + pm_asprintf(&fullFileName, "%s/%s", currentPath, fileName); CurrFile = fullFileName; @@ -207,8 +207,8 @@ openFile(struct inputSource * const inputSourceP, if (baseFormat == JMOVIE_FILE_TYPE) unlink(fullFileName); } - strfree(fullFileName); - strfree(fileName); + pm_strfree(fullFileName); + pm_strfree(fileName); } } @@ -377,10 +377,10 @@ ReadFrame(MpegFrame * const frameP, void SetFileType(const char * const conversion) { - if ( strcmp(conversion, "*") == 0 ) { - fileType = BASE_FILE_TYPE; + if (streq(conversion, "*")) { + fileType = BASE_FILE_TYPE; } else { - fileType = ANY_FILE_TYPE; + fileType = ANY_FILE_TYPE; } } @@ -399,23 +399,23 @@ SetFileType(const char * const conversion) void SetFileFormat(const char * const format) { - if ( strcmp(format, "PPM") == 0 ) { - baseFormat = PNM_FILE_TYPE; - } else if ( strcmp(format, "YUV") == 0 ) { - baseFormat = YUV_FILE_TYPE; - } else if ( strcmp(format, "Y") == 0 ) { - baseFormat = Y_FILE_TYPE; - } else if ( strcmp(format, "PNM") == 0 ) { - baseFormat = PNM_FILE_TYPE; - } else if (( strcmp(format, "JPEG") == 0 ) || ( strcmp(format, "JPG") == 0 )) { - baseFormat = JPEG_FILE_TYPE; - } else if ( strcmp(format, "JMOVIE") == 0 ) { - baseFormat = JMOVIE_FILE_TYPE; - } else if ( strcmp(format, "SUB4") == 0 ) { - baseFormat = SUB4_FILE_TYPE; + if (streq(format, "PPM")) { + baseFormat = PNM_FILE_TYPE; + } else if (streq(format, "YUV")) { + baseFormat = YUV_FILE_TYPE; + } else if (streq(format, "Y")) { + baseFormat = Y_FILE_TYPE; + } else if (streq(format, "PNM")) { + baseFormat = PNM_FILE_TYPE; + } else if (streq(format, "JPEG") || streq(format, "JPG")) { + baseFormat = JPEG_FILE_TYPE; + } else if (streq(format, "JMOVIE")) { + baseFormat = JMOVIE_FILE_TYPE; + } else if (streq(format, "SUB4")) { + baseFormat = SUB4_FILE_TYPE; } else { - fprintf(stderr, "ERROR: Invalid file format: %s\n", format); - exit(1); + fprintf(stderr, "ERROR: Invalid file format: %s\n", format); + exit(1); } } @@ -435,9 +435,9 @@ ReadIOConvert(struct inputSource * const inputSourceP, GetNthInputFileName(inputSourceP, frameNumber, &fileName); - asprintfN(&fullFileName, "%s/%s", currentPath, fileName); + pm_asprintf(&fullFileName, "%s/%s", currentPath, fileName); - if ( strcmp(ioConversion, "*") == 0 ) { + if (streq(ioConversion, "*")) { char buff[1024]; ifp = fopen(fullFileName, "rb"); sprintf(buff,"fopen \"%s\"",fullFileName); @@ -483,8 +483,8 @@ ReadIOConvert(struct inputSource * const inputSourceP, exit(1); } - strfree(fullFileName); - strfree(fileName); + pm_strfree(fullFileName); + pm_strfree(fileName); return ifp; } |