Mercurial > libavcodec.hg
comparison tableprint.c @ 11570:e03e3df6fb7d libavcodec
Change/simplify the tableprint/tablegen API.
| author | reimar |
|---|---|
| date | Thu, 01 Apr 2010 17:11:47 +0000 |
| parents | 06d8a281e045 |
| children | 8ad2b8f20e6a |
comparison
equal
deleted
inserted
replaced
| 11569:731050abce41 | 11570:e03e3df6fb7d |
|---|---|
| 32 | 32 |
| 33 WRITE_2D_FUNC(int8, int8_t) | 33 WRITE_2D_FUNC(int8, int8_t) |
| 34 WRITE_2D_FUNC(uint8, uint8_t) | 34 WRITE_2D_FUNC(uint8, uint8_t) |
| 35 WRITE_2D_FUNC(uint32, uint32_t) | 35 WRITE_2D_FUNC(uint32, uint32_t) |
| 36 | 36 |
| 37 int main(int argc, char *argv[]) | 37 void write_fileheader(void) { |
| 38 { | |
| 39 int i; | |
| 40 | |
| 41 printf("/* This file was generated by libavcodec/tableprint */\n"); | 38 printf("/* This file was generated by libavcodec/tableprint */\n"); |
| 42 printf("#include <stdint.h>\n"); | 39 printf("#include <stdint.h>\n"); |
| 43 tableinit(); | |
| 44 | |
| 45 for (i = 0; tables[i].declaration; i++) { | |
| 46 printf("%s = {\n", tables[i].declaration); | |
| 47 tables[i].printfunc(tables[i].data, tables[i].size, tables[i].size2); | |
| 48 printf("};\n"); | |
| 49 } | |
| 50 return 0; | |
| 51 } | 40 } |
