/***************************************************************************** * Copyright (C) 2008 * ProbeStar Telematics, LLC * All Rights Reserved. Proprietary and Confidential. *============================================================================ * Serial Number Output *---------------------------------------------------------------------------- * Details *****************************************************************************/ /***************************************************************************** * includes *****************************************************************************/ #include "serial.h" #include "types.h" /***************************************************************************** * defines *****************************************************************************/ /***************************************************************************** * macros *****************************************************************************/ /***************************************************************************** * structs & typedefs *****************************************************************************/ /***************************************************************************** * global constants *****************************************************************************/ /***************************************************************************** * global variables *****************************************************************************/ /***************************************************************************** * static constants *****************************************************************************/ /***************************************************************************** * static variables *****************************************************************************/ /***************************************************************************** * static prototypes *****************************************************************************/ /***************************************************************************** * C functions *****************************************************************************/ // warning, only does 8 digits void putun( DWORD l ) { BYTE i = 0; DWORD o = 0; while ( l ) { o <<= 4; o |= ( l % 10 ); l /= 10; i++; } if ( i == 0 ) i++; while ( i-- ) { putch( (o & 0xf) + '0' ); o >>= 4; } putch( ' ' ); } void putn( long n ) { if ( n < 0 ) { putch( '-' ); n = -n; } putun( n ); }