diff options
Diffstat (limited to 'converter/pbm')
-rw-r--r-- | converter/pbm/g3topbm.c | 50 | ||||
-rw-r--r-- | converter/pbm/pbmtonokia.c | 4 | ||||
-rw-r--r-- | converter/pbm/pbmtoxbm.c | 2 |
3 files changed, 28 insertions, 28 deletions
diff --git a/converter/pbm/g3topbm.c b/converter/pbm/g3topbm.c index 04730357..908008a9 100644 --- a/converter/pbm/g3topbm.c +++ b/converter/pbm/g3topbm.c @@ -169,7 +169,7 @@ readBit(struct bitStream * const bitStreamP, if ((bitStreamP->shbit & 0xff) == 0) { bitStreamP->shdata = getc(bitStreamP->fileP); if (bitStreamP->shdata == EOF) - asprintfN(errorP, "EOF or error reading file"); + pm_asprintf(errorP, "EOF or error reading file"); else { bitStreamP->shbit = 0x80; if ( bitStreamP->reversebits ) @@ -428,12 +428,12 @@ formatBadCodeException(const char ** const exceptionP, unsigned int const curlen, unsigned int const curcode) { - asprintfN(exceptionP, - "bad code word at Column %u. " - "No prefix of the %u bits 0x%x matches any recognized " - "code word and no code words longer than 12 bits are " - "defined. ", - col, curlen, curcode); + pm_asprintf(exceptionP, + "bad code word at Column %u. " + "No prefix of the %u bits 0x%x matches any recognized " + "code word and no code words longer than 12 bits are " + "defined. ", + col, curlen, curcode); } @@ -485,8 +485,8 @@ readFaxRow(struct bitStream * const bitStreamP, while (!done) { if (col >= MAXCOLS) { - asprintfN(exceptionP, "Line is too long for this program to " - "handle -- longer than %u columns", MAXCOLS); + pm_asprintf(exceptionP, "Line is too long for this program to " + "handle -- longer than %u columns", MAXCOLS); done = TRUE; } else { unsigned int bit; @@ -570,7 +570,7 @@ handleRowException(const char * const exception, row, exception); else pm_error("Problem reading Row %u. Aborting. %s", row, exception); - strfree(exception); + pm_strfree(exception); } if (error) { @@ -579,7 +579,7 @@ handleRowException(const char * const exception, row, error); else pm_error("Unable to read Row %u. Aborting. %s", row, error); - strfree(error); + pm_strfree(error); } } @@ -626,16 +626,16 @@ analyzeLineSize(lineSizeAnalyzer * const analyzerP, if (analyzerP->expectedLineSize && thisLineSize != analyzerP->expectedLineSize) - asprintfN(&error, "Image contains a line of %u pixels. " - "You specified lines should be %u pixels.", - thisLineSize, analyzerP->expectedLineSize); + pm_asprintf(&error, "Image contains a line of %u pixels. " + "You specified lines should be %u pixels.", + thisLineSize, analyzerP->expectedLineSize); else { if (analyzerP->maxLineSize && thisLineSize != analyzerP->maxLineSize) - asprintfN(&error, "There are at least two different " - "line lengths in this image, " - "%u pixels and %u pixels. " - "This is a violation of the G3 standard. ", - thisLineSize, analyzerP->maxLineSize); + pm_asprintf(&error, "There are at least two different " + "line lengths in this image, " + "%u pixels and %u pixels. " + "This is a violation of the G3 standard. ", + thisLineSize, analyzerP->maxLineSize); else error = NULL; } @@ -649,7 +649,7 @@ analyzeLineSize(lineSizeAnalyzer * const analyzerP, } else pm_error("%s", error); - strfree(error); + pm_strfree(error); } analyzerP->maxLineSize = MAX(thisLineSize, analyzerP->maxLineSize); } @@ -693,8 +693,8 @@ readFax(struct bitStream * const bitStreamP, unsigned int lineSize; if (row >= MAXROWS) - asprintfN(&error, "Image is too tall. This program can " - "handle at most %u rows", MAXROWS); + pm_asprintf(&error, "Image is too tall. This program can " + "handle at most %u rows", MAXROWS); else { const char * exception; @@ -714,9 +714,9 @@ readFax(struct bitStream * const bitStreamP, if (stretch) { ++row; if (row >= MAXROWS) - asprintfN(&error, "Image is too tall. This " - "program can handle at most %u rows " - "after stretching", MAXROWS); + pm_asprintf(&error, "Image is too tall. This " + "program can handle at most %u rows " + "after stretching", MAXROWS); else packedBits[row] = packedBits[row-1]; } diff --git a/converter/pbm/pbmtonokia.c b/converter/pbm/pbmtonokia.c index ba6b1059..839e6cc1 100644 --- a/converter/pbm/pbmtonokia.c +++ b/converter/pbm/pbmtonokia.c @@ -118,7 +118,7 @@ parseCommandLine(int argc, char ** argv, if (strlen(netOpt) != 6) pm_error("-net option must be 6 hex digits long. " "You specified %u characters", (unsigned)strlen(netOpt)); - else if (!strishex(netOpt)) + else if (!pm_strishex(netOpt)) pm_error("-net option must be hexadecimal. You specified '%s'", netOpt); else @@ -147,7 +147,7 @@ parseCommandLine(int argc, char ** argv, static void freeCmdline(struct cmdlineInfo const cmdline) { - strfree(cmdline.networkCode); + pm_strfree(cmdline.networkCode); } diff --git a/converter/pbm/pbmtoxbm.c b/converter/pbm/pbmtoxbm.c index 9169d862..2b59a17c 100644 --- a/converter/pbm/pbmtoxbm.c +++ b/converter/pbm/pbmtoxbm.c @@ -390,7 +390,7 @@ main(int argc, convertRaster(ifP, cols, rows, format, stdout, cmdline.xbmVersion); - strfree(name); + pm_strfree(name); pm_close(ifP); return 0; |