diff dv_tablegen.c @ 11979:59f399926c12 libavcodec

tableprint: use the type name as-is for the functions' names. This drops one parameter from the functions' macros, and require structures to be typedeffed, but ensures that it is possible to map 1-to-1 the type to the function name.
author flameeyes
date Sun, 27 Jun 2010 12:20:39 +0000
parents e03e3df6fb7d
children
line wrap: on
line diff
--- a/dv_tablegen.c	Sun Jun 27 09:44:10 2010 +0000
+++ b/dv_tablegen.c	Sun Jun 27 12:20:39 2010 +0000
@@ -29,9 +29,9 @@
 #include "tableprint.h"
 #include <inttypes.h>
 
-WRITE_1D_FUNC_ARGV(vlc_pair, struct dv_vlc_pair, 7,
+WRITE_1D_FUNC_ARGV(dv_vlc_pair, 7,
                    "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
-WRITE_2D_FUNC(vlc_pair, struct dv_vlc_pair)
+WRITE_2D_FUNC(dv_vlc_pair)
 
 int main(void)
 {
@@ -40,7 +40,7 @@
     write_fileheader();
 
     printf("static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n");
-    write_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, DV_VLC_MAP_LEV_SIZE);
+    write_dv_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, DV_VLC_MAP_LEV_SIZE);
     printf("};\n");
 
     return 0;