[xiph-cvs] cvs commit: vorbis-tools/oggenc oggenc.c platform.c platform.h

Michael Smith msmith at xiph.org
Tue Feb 20 00:12:50 PST 2001



msmith      01/02/20 00:12:50

  Modified:    oggenc   oggenc.c platform.c platform.h
  Log:
  rindex->strrchr.
  strrchr is ANSI C. I was getting sick of fixing headers to get rindex.

Revision  Changes    Path
1.13      +1 -1      vorbis-tools/oggenc/oggenc.c

Index: oggenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/oggenc.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- oggenc.c	2001/02/18 10:55:11	1.12
+++ oggenc.c	2001/02/20 08:12:50	1.13
@@ -199,7 +199,7 @@
                                 char *start, *end;
 
                                 start = infiles[i];
-				end = rindex(infiles[i], '.');
+				end = strrchr(infiles[i], '.');
                                 end = end?end:(start + strlen(infiles[i])+1);
                         
                                 out_fn = malloc(end - start + 5);

1.5       +0 -16     vorbis-tools/oggenc/platform.c

Index: platform.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/platform.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- platform.c	2001/01/31 21:38:38	1.4
+++ platform.c	2001/02/20 08:12:50	1.5
@@ -21,22 +21,6 @@
 #include <time.h>
 #endif
 
-#if defined(_WIN32) || defined(__WATCOMC__)
-/* This doesn't seem to exist on windows */
-char *rindex(char *s, int c)
-{
-	char *ret = NULL;
-
-	while(*s)
-	{
-		if(*s == (char)c)
-			ret=s;
-		s++;
-	}
-	return ret;
-}
-#endif
-
 #if defined(_WIN32) && defined(_MSC_VER)
 
 void setbinmode(FILE *f)

1.5       +0 -1      vorbis-tools/oggenc/platform.h

Index: platform.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/oggenc/platform.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- platform.h	2001/01/22 11:54:54	1.4
+++ platform.h	2001/02/20 08:12:50	1.5
@@ -16,7 +16,6 @@
 #if defined(_WIN32) || defined(__OS2__)
 #include <malloc.h>
 
-char *rindex(char *s, int c);
 void setbinmode(FILE *);
 
 #else /* Unix, mostly */

--- >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