while (1) {
if (i == 31)
break;
- c = getchar();
+ c = cgetc();
if (c == 13)
break;
- else output[i++] = c;
+ cputc(c);
+ output[i++] = c;
}
return output;
}
if (len >= maxlen)
return NULL;
// workaround to produce a leading zero for cents.. %0.2d won't work
- sprintf(s, "%2d,%s%dEUR", cent / 100, ((cent%100)<10?"0":""), cent % 100);
+ sprintf(s, "%3d,%s%dEUR", cent / 100, ((cent%100)<10?"0":""), cent % 100);
return s;
}