[xiph-cvs] cvs commit: vorbis-tools/ogg123 Makefile.am ao_interface.c ao_interface.h buffer.c curl_interface.h ogg123.c ogg123.h

Stan Seibert volsung at xiph.org
Thu Nov 22 21:15:32 PST 2001



volsung     01/11/22 21:15:32

  Modified:    ogg123   Tag: volsung_kc_20011011 Makefile.am ao_interface.c
                        ao_interface.h buffer.c curl_interface.h ogg123.c
                        ogg123.h
  Log:
  - Turned off buffer debugging as that macro is not portable
  - Added test for pthread library
  - Discovered that on_exit() not a terribly portable function, and replaced
  it with a macro that turns into atexit() or on_exit() depending on what
  is available (with preference for atexit()).

Revision  Changes    Path
No                   revision

No                   revision

1.14.2.4.2.1 +1 -1      vorbis-tools/ogg123/Makefile.am

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Makefile.am,v
retrieving revision 1.14.2.4
retrieving revision 1.14.2.4.2.1
diff -u -r1.14.2.4 -r1.14.2.4.2.1
--- Makefile.am	2001/08/12 03:59:31	1.14.2.4
+++ Makefile.am	2001/11/23 05:15:29	1.14.2.4.2.1
@@ -11,7 +11,7 @@
 INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@
 
 ogg123_LDADD = @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \
-		@SOCKET_LIBS@ -lcurl
+		@SOCKET_LIBS@ @THREAD_LIBS@ -lcurl
 
 ogg123_SOURCES = ogg123.c ao_interface.c buffer.c getopt.c getopt1.c curl_interface.c options.c status.c \
                  ogg123.h ao_interface.h buffer.h getopt.h           curl_interface.h options.h status.h

1.5.2.7.2.2 +2 -2      vorbis-tools/ogg123/ao_interface.c

Index: ao_interface.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ao_interface.c,v
retrieving revision 1.5.2.7.2.1
retrieving revision 1.5.2.7.2.2
diff -u -r1.5.2.7.2.1 -r1.5.2.7.2.2
--- ao_interface.c	2001/10/14 05:42:51	1.5.2.7.2.1
+++ ao_interface.c	2001/11/23 05:15:29	1.5.2.7.2.2
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ao_interface.c,v 1.5.2.7.2.1 2001/10/14 05:42:51 volsung Exp $
+ last mod: $Id: ao_interface.c,v 1.5.2.7.2.2 2001/11/23 05:15:29 volsung Exp $
 
  ********************************************************************/
 
@@ -105,7 +105,7 @@
   }
 }
 
-void ao_onexit (int exitcode, void *arg)
+void ao_onexit (void *arg)
 {
   devices_t *devices = (devices_t *) arg;
 

1.1.2.3.2.2 +2 -2      vorbis-tools/ogg123/Attic/ao_interface.h

Index: ao_interface.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/ao_interface.h,v
retrieving revision 1.1.2.3.2.1
retrieving revision 1.1.2.3.2.2
diff -u -r1.1.2.3.2.1 -r1.1.2.3.2.2
--- ao_interface.h	2001/10/14 05:42:51	1.1.2.3.2.1
+++ ao_interface.h	2001/11/23 05:15:29	1.1.2.3.2.2
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
  
- last mod: $Id: ao_interface.h,v 1.1.2.3.2.1 2001/10/14 05:42:51 volsung Exp $
+ last mod: $Id: ao_interface.h,v 1.1.2.3.2.2 2001/11/23 05:15:29 volsung Exp $
  
 ********************************************************************/
 
@@ -35,7 +35,7 @@
                          ao_option * options, char *filename);
 int devices_write(void *ptr, size_t size, size_t nmemb, devices_t * d);
 int add_option(ao_option ** op_h, const char *optstring);
-void ao_onexit (int exitcode, void *devices);
+void ao_onexit (void *devices);
 void close_audio_devices (devices_t *devices);
 void free_audio_devices (devices_t *devices);
 

1.7.2.23.2.5 +1 -3      vorbis-tools/ogg123/buffer.c

Index: buffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.c,v
retrieving revision 1.7.2.23.2.4
retrieving revision 1.7.2.23.2.5
diff -u -r1.7.2.23.2.4 -r1.7.2.23.2.5
--- buffer.c	2001/11/21 22:57:23	1.7.2.23.2.4
+++ buffer.c	2001/11/23 05:15:29	1.7.2.23.2.5
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: buffer.c,v 1.7.2.23.2.4 2001/11/21 22:57:23 volsung Exp $
+ last mod: $Id: buffer.c,v 1.7.2.23.2.5 2001/11/23 05:15:29 volsung Exp $
 
  ********************************************************************/
 
@@ -37,8 +37,6 @@
 
 #define MIN(x,y)     ( (x) < (y) ? (x) : (y) )
 #define MIN3(x,y,z)  MIN(x,MIN(y,z))
-
-#define DEBUG_BUFFER
 
 #ifdef DEBUG_BUFFER
 FILE *debugfile;

1.1.2.7.2.2 +2 -2      vorbis-tools/ogg123/Attic/curl_interface.h

Index: curl_interface.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/curl_interface.h,v
retrieving revision 1.1.2.7.2.1
retrieving revision 1.1.2.7.2.2
diff -u -r1.1.2.7.2.1 -r1.1.2.7.2.2
--- curl_interface.h	2001/10/17 16:58:14	1.1.2.7.2.1
+++ curl_interface.h	2001/11/23 05:15:29	1.1.2.7.2.2
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
  
- last mod: $Id: curl_interface.h,v 1.1.2.7.2.1 2001/10/17 16:58:14 volsung Exp $
+ last mod: $Id: curl_interface.h,v 1.1.2.7.2.2 2001/11/23 05:15:29 volsung Exp $
  
 ********************************************************************/
 
@@ -67,6 +67,6 @@
 int StreamBufferSeek (void *arg, ogg_int64_t offset, int whence);
 int StreamBufferClose (void *arg);
 long StreamBufferTell (void *arg);
-void StreamInputCleanup (buf_t *buf);
+void StreamCleanup (StreamInputBufferData_t *data);
 
 #endif /* __CURL_INTERFACE_H */

1.39.2.30.2.10 +4 -5      vorbis-tools/ogg123/ogg123.c

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.39.2.30.2.9
retrieving revision 1.39.2.30.2.10
diff -u -r1.39.2.30.2.9 -r1.39.2.30.2.10
--- ogg123.c	2001/11/21 23:25:08	1.39.2.30.2.9
+++ ogg123.c	2001/11/23 05:15:29	1.39.2.30.2.10
@@ -14,7 +14,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.c,v 1.39.2.30.2.9 2001/11/21 23:25:08 volsung Exp $
+ last mod: $Id: ogg123.c,v 1.39.2.30.2.10 2001/11/23 05:15:29 volsung Exp $
 
  ********************************************************************/
 
@@ -461,7 +461,7 @@
 
 
 
-  on_exit (OnExit, &Options);
+  ATEXIT (ExitCleanup);
   signal (SIGINT, SigHandler);
   signal (SIGTSTP, SigHandler);
   signal (SIGCONT, SigHandler);
@@ -1076,8 +1076,7 @@
   return 0;
 }
 
-
-void OnExit (int exitcode, void *arg)
+void ExitCleanup ()
 {
   if (Options.inputOpts.data)
     {
@@ -1091,6 +1090,6 @@
       Options.outputOpts.buffer = NULL;
     }
 
-  ao_onexit (exitcode, Options.outputOpts.devices);
+  ao_onexit (Options.outputOpts.devices);
   Options.outputOpts.devicesOpen = 0;
 }

1.7.2.12.2.4 +15 -2     vorbis-tools/ogg123/ogg123.h

Index: ogg123.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.h,v
retrieving revision 1.7.2.12.2.3
retrieving revision 1.7.2.12.2.4
diff -u -r1.7.2.12.2.3 -r1.7.2.12.2.4
--- ogg123.h	2001/11/21 23:25:09	1.7.2.12.2.3
+++ ogg123.h	2001/11/23 05:15:30	1.7.2.12.2.4
@@ -11,7 +11,7 @@
  *                                                                  *
  ********************************************************************
 
- last mod: $Id: ogg123.h,v 1.7.2.12.2.3 2001/11/21 23:25:09 volsung Exp $
+ last mod: $Id: ogg123.h,v 1.7.2.12.2.4 2001/11/23 05:15:30 volsung Exp $
 
  ********************************************************************/
 
@@ -32,6 +32,19 @@
 #include "curl_interface.h"
 #include "status.h"
 
+/* SunOS 4 does on_exit() and everything else does atexit() */
+#ifdef HAVE_ATEXIT
+#define ATEXIT(x) (atexit(x))
+#else
+#ifdef HAVE_ON_EXIT
+#define ATEXIT(x) (on_exit( (void (*)(int, void*))(x) , NULL)
+#else
+#define ATEXIT(x)
+#warning "at_exit() and on_exit() not present.  Bad things may happen when the application terminates."
+#endif
+#endif
+ 
+
 typedef struct ogg123_options_s {
   struct {
     char *read_file;            /* File to decode */
@@ -82,6 +95,6 @@
 void PlayFile();
 int OpenAudioDevices();
 void SigHandler(int ignored);
-void OnExit(int exitcode, void *arg);
+void ExitCleanup();
 
 #endif /* !defined(__OGG123_H) */

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