From a10240b9b2e75afbe80d9ff5c4868487e08556c3 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 7 Aug 2010 04:45:37 +0000 Subject: Don't expect snprintf to exist git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1270 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/ppmtompeg/parallel.c | 58 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'converter/ppm/ppmtompeg') diff --git a/converter/ppm/ppmtompeg/parallel.c b/converter/ppm/ppmtompeg/parallel.c index 75d53858..97cb9f84 100644 --- a/converter/ppm/ppmtompeg/parallel.c +++ b/converter/ppm/ppmtompeg/parallel.c @@ -1340,12 +1340,12 @@ startCombineServer(const char * const encoderName, int otherSock; const char * error; - snprintf(command, sizeof(command), - "%s %s -max_machines %d -output_server %s %d %d %s", - encoderName, - debugMachines ? "-debug_machines" : "", - numMachines, masterHostName, masterPortNum, - numInputFiles, paramFileName); + snprintfN(command, sizeof(command), + "%s %s -max_machines %d -output_server %s %d %d %s", + encoderName, + debugMachines ? "-debug_machines" : "", + numMachines, masterHostName, masterPortNum, + numInputFiles, paramFileName); machineDebug("MASTER: Starting combine server with shell command '%s'", command); @@ -1382,12 +1382,12 @@ startDecodeServer(const char * const encoderName, int otherSock; const char * error; - snprintf(command, sizeof(command), - "%s %s -max_machines %d -decode_server %s %d %d %s", - encoder_name, - debugMachines ? "-debug_machines" : "", - numMachines, masterHostName, masterPortNum, - numInputFiles, paramFileName); + snprintfN(command, sizeof(command), + "%s %s -max_machines %d -decode_server %s %d %d %s", + encoder_name, + debugMachines ? "-debug_machines" : "", + numMachines, masterHostName, masterPortNum, + numInputFiles, paramFileName); machineDebug("MASTER: Starting decode server with shell command '%s'", command); @@ -1680,23 +1680,23 @@ startChildren(struct scheduler * const schedulerP, } --childrenLeftCurrentIoServer; } - snprintf(command, sizeof(command), - "%s %s -l %s %s " - "%s %s -child %s %d %d %d %d %d %d " - "-frames %d %d %s", - rsh, - machineName[childNum], userName[childNum], - beNice ? "nice" : "", - executable[childNum], - debugMachines ? "-debug_machines" : "", - masterHostName, masterPortNum, - remote[childNum] ? ioPortNum[numIoServers-1] : 0, - combinePortNum, decodePortNum, childNum, - remote[childNum] ? 1 : 0, - startFrame, startFrame + nFrames - 1, - remote[childNum] ? - remoteParamFile[childNum] : paramFileName - ); + snprintfN(command, sizeof(command), + "%s %s -l %s %s " + "%s %s -child %s %d %d %d %d %d %d " + "-frames %d %d %s", + rsh, + machineName[childNum], userName[childNum], + beNice ? "nice" : "", + executable[childNum], + debugMachines ? "-debug_machines" : "", + masterHostName, masterPortNum, + remote[childNum] ? ioPortNum[numIoServers-1] : 0, + combinePortNum, decodePortNum, childNum, + remote[childNum] ? 1 : 0, + startFrame, startFrame + nFrames - 1, + remote[childNum] ? + remoteParamFile[childNum] : paramFileName + ); machineDebug("MASTER: Starting child server " "with shell command '%s'", command); -- cgit 1.4.1