2 #include "libshared_ansi_internal.h"
8 /****************************************************************************/
9 void libshared_ansi_strcat_number( char *destination, lfds710_pal_uint_t number )
16 LFDS710_PAL_ASSERT( destination != NULL );
17 // TRD : number can be any value in its range
19 // TRD : point destination at the end of the string
20 while( *destination++ != '\0' );
24 // TRD : figure out length of the number
26 original_number = number;
37 destination[length] = '\0';
39 // TRD : copy over the number digits - note we get them the right way around
41 number = original_number;
46 destination[--length] = (char) ( digit + '0' );
59 /****************************************************************************/
60 void libshared_ansi_strcat_number_with_leading_zeros( char *destination, lfds710_pal_uint_t number, lfds710_pal_uint_t minimum_width )
68 LFDS710_PAL_ASSERT( destination != NULL );
69 // TRD : number can be any value in its range
70 // TRD : minimum_width can be any value in its range
72 // TRD : point destination at the end of the string
73 while( *destination++ != '\0' );
77 // TRD : figure out length of the number
79 original_number = number;
90 if( length < minimum_width )
91 for( loop = 0 ; loop < minimum_width - length ; loop++ )
94 destination[length] = '\0';
96 // TRD : copy over the number digits - note we get them the right way around
98 number = original_number;
103 destination[--length] = (char) ( digit + '0' );