comparison tools/data2inc.c @ 2286:e771185db600

Add extra formatting to C and ASM outputs.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 20 Jun 2019 14:46:09 +0300
parents d736ff74663b
children b7cd5dd0b82e
comparison
equal deleted inserted replaced
2285:25398f2eba64 2286:e771185db600
241 else 241 else
242 fprintf(fh, "%d", buf[i]); 242 fprintf(fh, "%d", buf[i]);
243 } 243 }
244 244
245 if (i + 1 < len) 245 if (i + 1 < len)
246 fprintf(fh, ","); 246 fprintf(fh, optFormatting ? ", " : ",");
247 } 247 }
248 } 248 }
249 249
250 250
251 void writeFooter_ASM(FILE *fh, const size_t len, const char *name) 251 void writeFooter_ASM(FILE *fh, const size_t len, const char *name)
299 fprintf(fh, "0x%x", buf[i]); 299 fprintf(fh, "0x%x", buf[i]);
300 else 300 else
301 fprintf(fh, "%d", buf[i]); 301 fprintf(fh, "%d", buf[i]);
302 } 302 }
303 303
304 fprintf(fh, ","); 304 fprintf(fh, optFormatting ? ", " : ",");
305 } 305 }
306 } 306 }
307 307
308 308
309 void writeFooter_C(FILE *fh, const size_t len, const char *name) 309 void writeFooter_C(FILE *fh, const size_t len, const char *name)