[xiph-cvs] cvs commit: vorbis-tools/ogginfo ogginfo2.c

Michael Smith msmith at xiph.org
Thu Mar 6 06:21:46 PST 2003



msmith      03/03/06 09:21:46

  Modified:    ogginfo  ogginfo2.c
  Log:
  Duplicate some strings to avoid splitting them (for portability reasons) in a
  way which causes difficulties for translators.

Revision  Changes    Path
1.19      +12 -12    vorbis-tools/ogginfo/ogginfo2.c

Index: ogginfo2.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogginfo/ogginfo2.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ogginfo2.c	12 Nov 2002 10:29:06 -0000	1.18
+++ ogginfo2.c	6 Mar 2003 14:21:46 -0000	1.19
@@ -23,13 +23,6 @@
 
 #define CHUNK 4500
 
-/* Different implementations have different format strings for 64 bit ints. */
-#ifdef _WIN32
-#define INT64FORMAT "%I64d"
-#else
-#define INT64FORMAT "%Ld"
-#endif
-
 struct vorbis_release {
     char *vendor_string;
     char *desc;
@@ -363,9 +356,13 @@
         ogg_int64_t gp = ogg_page_granulepos(page);
         if(gp > 0) {
             if(gp < inf->lastgranulepos)
-                warn(_("Warning: granulepos in stream %d decreases from " 
-                        INT64FORMAT " to " INT64FORMAT "\n"), stream->num,
-                        inf->lastgranulepos, gp);
+#ifdef _WIN32
+                warn(_("Warning: granulepos in stream %d decreases from %I64d to %I64d" ),
+                        stream->num, inf->lastgranulepos, gp);
+#else
+                warn(_("Warning: granulepos in stream %d decreases from %Ld to %Ld" ),
+                        stream->num, inf->lastgranulepos, gp);
+#endif
             inf->lastgranulepos = gp;
         }
         else {
@@ -579,8 +576,11 @@
 
     while((ret = ogg_sync_pageout(sync, page)) <= 0) {
         if(ret < 0)
-            warn(_("Warning: Hole in data found at approximate offset "
-                   INT64FORMAT " bytes. Corrupted ogg.\n"), *written);
+#ifdef _WIN32
+            warn(_("Warning: Hole in data found at approximate offset %I64d bytes. Corrupted ogg.\n"), *written);
+#else
+            warn(_("Warning: Hole in data found at approximate offset %Ld bytes. Corrupted ogg.\n"), *written);
+#endif
 
         buffer = ogg_sync_buffer(sync, CHUNK);
         bytes = fread(buffer, 1, CHUNK, f);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list