[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcedit.c
Michael Smith
msmith at xiph.org
Tue Jan 30 02:42:49 PST 2001
msmith 01/01/30 02:42:49
Modified: . configure.in
ogg123 Makefile.am buffer.c ogg123.c
vorbiscomment vcedit.c
Log:
Portability fixes for ogg123.
Major fix (i.e. don't just chop off additional streams in a chained bitstream) for vcedit.c
Revision Changes Path
1.15 +8 -0 vorbis-tools/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/configure.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- configure.in 2001/01/22 22:48:31 1.14
+++ configure.in 2001/01/30 10:42:47 1.15
@@ -32,6 +32,14 @@
AC_CANONICAL_HOST
+case $host in
+ *-*-darwin*)
+ DEBUG="-DDARWIN -Wall -g -O0 -fsigned-char"
+ CFLAGS="-DDARWIN -Wall -g -O4 -ffast-math -fsigned-char"
+ PROFILE="-DDARWIN -Wall -g -pg -O4 -ffast-math -fsigned-char";;
+esac
+
+
dnl --------------------------------------------------
dnl Check for headers
dnl --------------------------------------------------
1.12 +2 -1 vorbis-tools/ogg123/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Makefile.am 2001/01/25 06:54:52 1.11
+++ Makefile.am 2001/01/30 10:42:48 1.12
@@ -12,7 +12,8 @@
ogg123_LDADD = @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@
-ogg123_SOURCES = ogg123.c ao_interface.c buffer.c ogg123.h buffer.h
+ogg123_SOURCES = ogg123.c ao_interface.c buffer.c ogg123.h buffer.h getopt.c getopt1.c getopt.h
+
EXTRA_DIST = $(man_MANS) $(doc_DATA)
1.3 +4 -0 vorbis-tools/ogg123/buffer.c
Index: buffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- buffer.c 2001/01/15 04:50:23 1.2
+++ buffer.c 2001/01/30 10:42:48 1.3
@@ -5,13 +5,17 @@
* that program is used in this buffer.
*/
+#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h> /* for fork and pipe*/
#include <fcntl.h>
+
+#ifndef DARWIN
#include <malloc.h>
+#endif
#include "ogg123.h"
#include "buffer.h"
1.23 +2 -1 vorbis-tools/ogg123/ogg123.c
Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ogg123.c 2001/01/25 11:31:14 1.22
+++ ogg123.c 2001/01/30 10:42:48 1.23
@@ -14,7 +14,7 @@
* *
********************************************************************
- last mod: $Id: ogg123.c,v 1.22 2001/01/25 11:31:14 msmith Exp $
+ last mod: $Id: ogg123.c,v 1.23 2001/01/30 10:42:48 msmith Exp $
********************************************************************/
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
+#include <sys/socket.h>
#include <errno.h>
#include <time.h>
#include <getopt.h>
1.5 +14 -1 vorbis-tools/vorbiscomment/vcedit.c
Index: vcedit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcedit.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vcedit.c 2001/01/23 10:39:29 1.4
+++ vcedit.c 2001/01/30 10:42:49 1.5
@@ -6,7 +6,7 @@
*
* Comment editing backend, suitable for use by nice frontend interfaces.
*
- * last modified: $Id: vcedit.c,v 1.4 2001/01/23 10:39:29 msmith Exp $
+ * last modified: $Id: vcedit.c,v 1.5 2001/01/30 10:42:49 msmith Exp $
*/
@@ -267,6 +267,19 @@
if(bytes == 0) eosin = 1;
}
}
+
+ if(!feof(state->in)) /* We reached eos, not eof */
+ {
+ /* We copy the rest of the stream (other logical
+ * streams) untouched. */
+ bytes = 1;
+ while(bytes)
+ {
+ bytes = fread(buffer, 1, CHUNKSIZE, state->in);
+ fwrite(buffer, 1, bytes, out);
+ }
+ }
+
cleanup:
ogg_stream_clear(&streamout);
--- >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