From 28ed9cda2a47c17130ee5b97588695ed3acb4e45 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 29 Sep 2010 21:45:56 +0000 Subject: 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 --- converter/ppm/ppmtompeg/readframe.c | 52 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'converter/ppm/ppmtompeg/readframe.c') 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; } -- cgit 1.4.1