예제 #1
0
파일: ae2.c 프로젝트: Pidbip/egtkwave
static int sprintf_2_2d(char *s, int d1, int d2)
{
char *s2 = s;

*(s2++) = '[';
s2 = itoa_2(d1, s2);
*(s2++) = ':';
s2 = itoa_2(d2, s2);
*(s2++) = ']';
*s2 = 0;

return(s2 - s);
}
예제 #2
0
파일: itoa.c 프로젝트: faterer/groof_off
int main()
{
   int a1 = -123;
   int a2 = 123;
   char s1[10];
   char s2[10];

   itoa_1(a1, s1);
   printf("%s\n", s1);
   itoa_1(a2, s2);
   printf("%s\n", s2);
   itoa_2(a1, s1);
   printf("%s\n", s1);
   itoa_2(a2, s2);
   printf("%s\n", s2);
   return 0;
}
예제 #3
0
파일: ae2.c 프로젝트: Pidbip/egtkwave
/*
 * preformatted sprintf statements which remove parsing latency
 */
static int sprintf_2_1d(char *s, int d)
{
char *s2 = s;

*(s2++) = '[';
*(s2++) = '0';
*(s2++) = ':';
s2 = itoa_2(d, s2);
*(s2++) = ']';
*s2 = 0;

return(s2 - s);
}