Give attributes with zero-stride a count of 1 to make it easier
[mesa.git] / src / mesa / tnl / t_vertex_c.c
index d1ef7cd53c0f4481770bb703cd37e59550794110..a901aed14c5c081d07234953293e2984f7f93b79 100644 (file)
 
 #include "simple_list.h"
 
+#ifdef WIN32
+#define vsnprintf _vsnprintf
+#endif
+
 /* A version of code generation for t_clipspace_codegen.c which prints
  * out 'c' code to implement the generated function.  A useful
  * debugging tool, and in concert with something like tcc or a
@@ -224,14 +228,12 @@ static GLboolean print_attr_header( struct tnl_clipspace_codegen *p,
 
 static GLboolean print_attr_footer( struct tnl_clipspace_codegen *p )
 {
-   return 
-      emit(p, "      }\n");
+   return emit(p, "      }\n");
 }
 
-static emit_func print_store_func( struct tnl_clipspace_codegen *p ) 
+static tnl_emit_func print_store_func( struct tnl_clipspace_codegen *p ) 
 {
-   fprintf(stderr, "%s: emitted:\n%s\n", __FUNCTION__, p->buf);
-   
+   fprintf(stderr, "print_store_func: emitted:\n%s\n", p->buf);
    return 0;
 }
 
@@ -253,5 +255,5 @@ void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p )
    make_empty_list(&p->codegen_list);
 
    p->buf_size = 2048;
-   p->buf = MALLOC(p->buf_size);
+   p->buf = (char *) MALLOC(p->buf_size);
 }