From: <bu...@us...> - 2010-11-21 05:03:50
|
Revision: 3898 http://reprap.svn.sourceforge.net/reprap/?rev=3898&view=rev Author: buzz Date: 2010-11-21 05:03:44 +0000 (Sun, 21 Nov 2010) Log Message: ----------- basic utility function int2str Modified Paths: -------------- trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde Modified: trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde =================================================================== --- trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde 2010-11-21 05:00:44 UTC (rev 3897) +++ trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde 2010-11-21 05:03:44 UTC (rev 3898) @@ -605,3 +605,9 @@ ); } + +char * int2str( unsigned long num ) { + static char retnum[21]; // enough for 20 digits plus NUL from a 64-bit uint + sprintf( retnum, "%ul", num ); + return retnum; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |