mojoshader.c
branchtrunk
changeset 250 b75c08291021
parent 249 7f928921766c
child 251 290378a53579
equal deleted inserted replaced
249:7f928921766c 250:b75c08291021
    18 //  http://msdn2.microsoft.com/en-us/library/ms800307.aspx
    18 //  http://msdn2.microsoft.com/en-us/library/ms800307.aspx
    19 
    19 
    20 #include <stdio.h>
    20 #include <stdio.h>
    21 #include <string.h>
    21 #include <string.h>
    22 #include <stdlib.h>
    22 #include <stdlib.h>
    23 #include <stdint.h>
       
    24 #include <stdarg.h>
    23 #include <stdarg.h>
    25 #include <assert.h>
    24 #include <assert.h>
    26 
    25 
    27 #include "mojoshader.h"
    26 #include "mojoshader.h"
    28 
    27 
    50 
    49 
    51 
    50 
    52 // Get basic wankery out of the way here...
    51 // Get basic wankery out of the way here...
    53 
    52 
    54 typedef unsigned int uint;  // this is a printf() helper. don't use for code.
    53 typedef unsigned int uint;  // this is a printf() helper. don't use for code.
       
    54 
       
    55 #ifdef _MSC_VER
       
    56 #define snprintf _snprintf
       
    57 typedef unsigned __int8 uint8;
       
    58 typedef unsigned __int32 uint32;
       
    59 typedef unsigned __int32 int32;
       
    60 typedef
       
    61 #else
       
    62 #include <stdint.h>
    55 typedef uint8_t uint8;
    63 typedef uint8_t uint8;
    56 typedef uint32_t uint32;
    64 typedef uint32_t uint32;
    57 typedef int32_t int32;
    65 typedef int32_t int32;
       
    66 #endif
    58 
    67 
    59 #ifdef __GNUC__
    68 #ifdef __GNUC__
    60 #define ISPRINTF(x,y) __attribute__((format (printf, x, y)))
    69 #define ISPRINTF(x,y) __attribute__((format (printf, x, y)))
    61 #else
    70 #else
    62 #define ISPRINTF(x,y)
    71 #define ISPRINTF(x,y)