Changeset 2956

Show
Ignore:
Timestamp:
2007-06-16 03:24:33 (2 years ago)
Author:
conrad
Message:

fix PRI_OGGZ_OFF_T definition, use throughout tests and tools

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • liboggz/trunk/include/oggz/oggz_off_t.h

    r2608 r2956  
    7070/* Note: This is an ugly fix for proper display in printf but will work for now */ 
    7171#if SIZEOF_OGGZ_OFF_T == 8 
    72 #define PRI_OGGZ_OFF_T = "q" 
     72#define PRI_OGGZ_OFF_T "q" 
    7373#else 
    74 #define PRI_OGGZ_OFF_T = "l" 
     74#define PRI_OGGZ_OFF_T "l" 
    7575#endif 
    7676 
  • liboggz/trunk/include/oggz/oggz_off_t.h.in

    r2608 r2956  
    7070/* Note: This is an ugly fix for proper display in printf but will work for now */ 
    7171#if SIZEOF_OGGZ_OFF_T == 8 
    72 #define PRI_OGGZ_OFF_T = "q" 
     72#define PRI_OGGZ_OFF_T "q" 
    7373#else 
    74 #define PRI_OGGZ_OFF_T = "l" 
     74#define PRI_OGGZ_OFF_T "l" 
    7575#endif 
    7676 
  • liboggz/trunk/include/oggz/oggz_off_t_win32.h

    r2608 r2956  
    6868/* Note: This is an ugly fix for proper display in printf but will work for now */ 
    6969#if SIZEOF_OGGZ_OFF_T == 8 
    70 #define PRI_OGGZ_OFF_T = "q" 
     70#define PRI_OGGZ_OFF_T "q" 
    7171#else 
    72 #define PRI_OGGZ_OFF_T = "l" 
     72#define PRI_OGGZ_OFF_T "l" 
    7373#endif 
    7474 
  • liboggz/trunk/src/tests/io-read-single.c

    r526 r2956  
    8787 
    8888#ifdef DEBUG 
    89   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     89  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    9090          "granulepos %" PRId64 ", packetno %" PRId64, 
    9191          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/io-read.c

    r387 r2956  
    8585 
    8686#ifdef DEBUG 
    87   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     87  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    8888          "granulepos %" PRId64 ", packetno %" PRId64, 
    8989          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/io-seek.c

    r387 r2956  
    8989 
    9090#ifdef DEBUG 
    91   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     91  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    9292          "granulepos %" PRId64 ", packetno %" PRId64, 
    9393          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/io-write-flush.c

    r696 r2956  
    103103 
    104104#ifdef DEBUG 
    105   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     105  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    106106          "granulepos %" PRId64 ", packetno %" PRId64, 
    107107          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/io-write.c

    r671 r2956  
    8585 
    8686#ifdef DEBUG 
    87   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     87  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    8888          "granulepos %" PRId64 ", packetno %" PRId64, 
    8989          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/oggz_tests.h

    r382 r2956  
    4242#endif 
    4343 
    44 /* FIXME: on Mac OS X, off_t is 64-bits.  Obviously we want a nicer 
    45  * way to do it than this, but a quick fix is a good fix */ 
    46 #ifdef __APPLE__ 
    47 #  define PRI_off_t "q" 
    48 #else 
    49 #  define PRI_off_t "l" 
    50 #endif 
    51  
    5244#define INFO(str) \ 
    5345  { printf ("----  %s ...\n", (str)); } 
  • liboggz/trunk/src/tests/read-generated.c

    r521 r2956  
    7878 
    7979#ifdef DEBUG 
    80   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     80  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    8181          "granulepos %" PRId64 ", packetno %" PRId64, 
    8282          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/read-stop-err.c

    r387 r2956  
    8787 
    8888#ifdef DEBUG 
    89   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     89  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    9090          "granulepos %" PRId64 ", packetno %" PRId64, 
    9191          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/read-stop-ok.c

    r2012 r2956  
    8585 
    8686#ifdef DEBUG 
    87   printf ("%08" PRI_off_t "x: serialno %010ld, " 
     87  printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, " 
    8888          "granulepos %" PRId64 ", packetno %" PRId64, 
    8989          oggz_tell (oggz), serialno, op->granulepos, op->packetno); 
  • liboggz/trunk/src/tests/seek-stress.c

    r873 r2956  
    7171 
    7272  if (verbose) 
    73     printf ("\t%08lx: %lld ms (%+lld ms)\n", 
     73    printf ("\t%0" PRI_OGGZ_OFF_T "x: %lld ms (%+lld ms)\n", 
    7474            oggz_tell (oggz), oggz_tell_units (oggz), diff); 
    7575 
     
    125125  max_units = oggz_seek_units (oggz, 0, SEEK_END); 
    126126  if (verbose) 
    127     printf ("\t%08lx: %lld ms\n", oggz_tell (oggz), oggz_tell_units (oggz)); 
     127    printf ("\t%0" PRI_OGGZ_OFF_T "x: %lld ms\n", 
     128            oggz_tell (oggz), oggz_tell_units (oggz)); 
    128129 
    129130  try_seek_units (oggz, max_units / 2); 
  • liboggz/trunk/src/tools/oggz-scan.c

    r2955 r2956  
    119119} 
    120120 
    121 /* FIXME: on Mac OS X, off_t is 64-bits.  Obviously we want a nicer 
    122  * way to do it than this, but a quick fix is a good fix */ 
    123 #ifdef __APPLE__ 
    124 #  define PRI_off_t "q" 
    125 #else 
    126 #  define PRI_off_t "l" 
    127 #endif 
    128  
    129121static int 
    130122read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data) 
  • liboggz/trunk/src/tools/oggz-validate.c

    r2339 r2956  
    285285    ret = log_error (); 
    286286    if (timestamp == -1.0) { 
    287       fprintf (stderr, "%ld", oggz_tell (oggz)); 
     287      fprintf (stderr, "%" PRI_OGGZ_OFF_T "d", oggz_tell (oggz)); 
    288288    } else { 
    289289      ot_fprint_time (stderr, (double)timestamp/SUBSECONDS); 
  • liboggz/trunk/src/tools/oggzdump.c

    r2955 r2956  
    232232} 
    233233 
    234 /* FIXME: on Mac OS X, off_t is 64-bits.  Obviously we want a nicer 
    235  * way to do it than this, but a quick fix is a good fix */ 
    236 #ifdef __APPLE__ 
    237 #  define PRI_off_t "q" 
    238 #else 
    239 #  define PRI_off_t "l" 
    240 #endif 
    241  
    242234static int 
    243235read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data) 
     
    252244    units = oggz_tell_units (oggz); 
    253245    if (units == -1) { 
    254       fprintf (outfile, "%08" PRI_off_t "x", oggz_tell (oggz)); 
     246      fprintf (outfile, "%0" PRI_OGGZ_OFF_T "x", oggz_tell (oggz)); 
    255247    } else { 
    256248      time_offset = (double)units / 1000.0;