From 0ec1fddf7f2eaf8eb29123d79e3462e723a37c1d Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Mon, 29 Apr 2002 23:31:59 +0000 Subject: Replace all exit(1) with abort(). xine-lib should really never do an exit or abort, but instead pass back nice error values to the calling application, but until that happens, use abort() as that is tracable with gdb, whereas exit(1) is not backtraceable. CVS patchset: 1811 CVS date: 2002/04/29 23:31:59 --- src/demuxers/demux_asf.c | 4 ++-- src/demuxers/demux_avi.c | 4 ++-- src/demuxers/demux_cda.c | 4 ++-- src/demuxers/demux_elem.c | 4 ++-- src/demuxers/demux_mpeg.c | 6 +++--- src/demuxers/demux_mpeg_block.c | 4 ++-- src/demuxers/demux_mpgaudio.c | 4 ++-- src/demuxers/demux_ogg.c | 4 ++-- src/demuxers/demux_pes.c | 6 +++--- src/demuxers/demux_qt.c | 8 ++++---- src/demuxers/demux_ts.c | 4 ++-- src/input/input_cda.c | 5 +++-- src/input/input_rtp.c | 10 +++++----- src/input/mms.c | 6 +++--- src/libdivx4/xine_decoder.c | 4 ++-- src/libffmpeg/libavcodec/common.c | 2 +- src/libffmpeg/libavcodec/imgresample.c | 2 +- src/libmpeg2/decode.c | 8 ++++---- src/libmpg123/common.c | 2 +- src/libw32dll/wine/ext.c | 2 +- src/video_out/deinterlace.c | 2 +- src/video_out/video_out_aa.c | 4 ++-- src/video_out/video_out_opengl.c | 4 ++-- src/video_out/video_out_syncfb.c | 8 ++++---- src/video_out/video_out_xv.c | 6 +++--- src/video_out/yuv2rgb.c | 8 ++++---- src/xine-engine/audio_decoder.c | 4 ++-- src/xine-engine/audio_out.c | 4 ++-- src/xine-engine/configfile.c | 8 ++++++-- src/xine-engine/load_plugins.c | 14 +++++++------- src/xine-engine/video_decoder.c | 4 ++-- src/xine-engine/video_out.c | 4 ++-- src/xine-engine/xine.c | 4 ++-- 33 files changed, 86 insertions(+), 81 deletions(-) diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index eac3fd3e2..6d8232fe6 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_asf.c,v 1.35 2002/04/19 22:57:07 miguelfreitas Exp $ + * $Id: demux_asf.c,v 1.36 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for asf streams * @@ -1321,7 +1321,7 @@ static void demux_asf_start (demux_plugin_t *this_gen, NULL, demux_asf_loop, this)) != 0) { printf ("demux_asf: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } } diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 53a4a8cdc..d7e1cace9 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.80 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_avi.c,v 1.81 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for avi streams * @@ -1197,7 +1197,7 @@ static void demux_avi_start (demux_plugin_t *this_gen, if ((err = pthread_create (&this->thread, NULL, demux_avi_loop, this)) != 0) { printf ("demux_avi: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } } diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c index 9b5c5eb50..fa011770b 100644 --- a/src/demuxers/demux_cda.c +++ b/src/demuxers/demux_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_cda.c,v 1.12 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_cda.c,v 1.13 2002/04/29 23:31:59 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -222,7 +222,7 @@ static void demux_cda_start (demux_plugin_t *this_gen, if ((err = pthread_create (&this->thread, NULL, demux_cda_loop, this)) != 0) { printf ("demux_cda: can't create new thread (%s)\n", strerror(err)); - exit(1); + abort(); } } pthread_mutex_unlock( &this->mutex ); diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index ab27c49a9..a33e0c0f0 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_elem.c,v 1.39 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_elem.c,v 1.40 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for elementary mpeg streams * @@ -253,7 +253,7 @@ static void demux_mpeg_elem_start (demux_plugin_t *this_gen, NULL, demux_mpeg_elem_loop, this)) != 0) { printf ("demux_elem: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } pthread_mutex_unlock( &this->mutex ); diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 4051a176b..6a014f094 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg.c,v 1.58 2002/04/28 01:50:54 miguelfreitas Exp $ + * $Id: demux_mpeg.c,v 1.59 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -112,7 +112,7 @@ static uint32_t read_bytes (demux_mpeg_t *this, int n) { break; default: printf ("demux_mpeg: how how - something wrong in wonderland demux:read_bytes (%d)\n", n); - exit (1); + abort(); } return res; @@ -833,7 +833,7 @@ static void demux_mpeg_start (demux_plugin_t *this_gen, NULL, demux_mpeg_loop, this)) != 0) { printf ("demux_mpeg: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 8fd324e6f..150414857 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_block.c,v 1.95 2002/04/27 16:33:24 miguelfreitas Exp $ + * $Id: demux_mpeg_block.c,v 1.96 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -969,7 +969,7 @@ static void demux_mpeg_block_start (demux_plugin_t *this_gen, NULL, demux_mpeg_block_loop, this)) != 0) { printf ("demux_mpeg_block: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 6e8556820..d1c07393b 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpgaudio.c,v 1.39 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_mpgaudio.c,v 1.40 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -366,7 +366,7 @@ static void demux_mpgaudio_start (demux_plugin_t *this_gen, NULL, demux_mpgaudio_loop, this)) != 0) { printf ("demux_mpgaudio: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index edff49373..306322bb2 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ogg.c,v 1.22 2002/04/14 03:31:44 guenter Exp $ + * $Id: demux_ogg.c,v 1.23 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for ogg streams * @@ -549,7 +549,7 @@ static void demux_ogg_start (demux_plugin_t *this_gen, NULL, demux_ogg_loop, this)) != 0) { printf ("demux_ogg: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { xine_flush_engine(this->xine); diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c index 1d5a3f58f..c70e52292 100644 --- a/src/demuxers/demux_pes.c +++ b/src/demuxers/demux_pes.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_pes.c,v 1.25 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_pes.c,v 1.26 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -105,7 +105,7 @@ static uint32_t read_bytes (demux_pes_t *this, int n) { break; default: printf ("demux_pes: how how - something wrong in wonderland demux:read_bytes (%d)\n", n); - exit (1); + abort(); } return res; @@ -488,7 +488,7 @@ static void demux_pes_start (demux_plugin_t *this_gen, NULL, demux_pes_loop, this)) != 0) { printf ("demux_pes: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 6005ff066..76b7956e1 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_qt.c,v 1.27 2002/04/23 13:17:35 esnel Exp $ + * $Id: demux_qt.c,v 1.28 2002/04/29 23:31:59 jcdutton Exp $ * * demultiplexer for mpeg-4 system (aka quicktime) streams, based on: * @@ -3206,7 +3206,7 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov, cmov_buf = (unsigned char *)malloc( cmov_sz ); if (cmov_buf == 0) { printf ("demux_qt: QT cmov: malloc err 0"); - exit(1); + abort(); } /* Read in compressed header */ @@ -3223,7 +3223,7 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov, moov_buf = (unsigned char *)malloc( moov_sz ); if (moov_buf == 0) { printf ("demux_qt: QT cmov: malloc err moov_sz %u\n", moov_sz); - exit(1); + abort(); } zstrm.zalloc = (alloc_func)0; @@ -4310,7 +4310,7 @@ static void demux_qt_start (demux_plugin_t *this_gen, if ((err = pthread_create (&this->thread, NULL, demux_qt_loop, this)) != 0) { printf ("demux_qt: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index f52d475e7..61b792f05 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ts.c,v 1.42 2002/04/23 13:30:42 esnel Exp $ + * $Id: demux_ts.c,v 1.43 2002/04/29 23:31:59 jcdutton Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -1400,7 +1400,7 @@ static void demux_ts_start(demux_plugin_t *this_gen, if ((err = pthread_create(&this->thread, NULL, demux_ts_loop, this)) != 0) { LOG_MSG_STDERR(this->xine, _("demux_ts: can't create new thread (%s)\n"), strerror(err)); - exit (1); + abort(); } } else { diff --git a/src/input/input_cda.c b/src/input/input_cda.c index 62759f9e8..59389dd9d 100644 --- a/src/input/input_cda.c +++ b/src/input/input_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_cda.c,v 1.22 2002/04/24 08:12:13 f1rmb Exp $ + * $Id: input_cda.c,v 1.23 2002/04/29 23:31:59 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -289,7 +289,8 @@ static char *_cda_cddb_get_default_location(void) { * Small sighandler ;-) */ static void die(int signal) { - exit(signal); + printf("Signal %d\n",signal); + abort(); } /* diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 114d35e61..3ae00d017 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -165,7 +165,7 @@ static int host_connect_attempt(struct in_addr ia, int port, xine_t *xine) { /* datagram socket */ if (bind(s, (struct sockaddr *)&sin, sizeof(sin))) { LOG_MSG_STDERR(xine, _("bind(): %s.\n"), strerror(errno)); - exit(1); + abort(); } /* multicast ? */ if ((ntohl(sin.sin_addr.s_addr) >> 28) == 0xe) { @@ -184,7 +184,7 @@ static int host_connect_attempt(struct in_addr ia, int port, xine_t *xine) { if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn))) { LOG_MSG_STDERR(xine, _("setsockopt(IP_ADD_MEMBERSHIP) failed (multicast kernel?): %s.\n"), strerror(errno)); - exit(1); + abort(); } } @@ -338,7 +338,7 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { input_plugin_read_loop, (void *)&this)) != 0) { LOG_MSG_STDERR(this->xine, _("input_rtp: can't create new thread (%s)\n"), strerror(err)); - exit (1); + abort(); } pthread_attr_destroy(&thread_attrs); @@ -528,12 +528,12 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { input_buffer_t *buf = xine_xmalloc(sizeof(input_buffer_t)); if (!buf) { LOG_MSG_STDERR(xine, _("unable to allocate input buffer.\n")); - exit(1); + abort(); } buf->buf = xine_xmalloc(IBUFFER_SIZE); if (!buf->buf) { LOG_MSG_STDERR(xine, _("unable to allocate input buffer.\n")); - exit(1); + abort(); } buf->next = this->free_buffers; this->free_buffers = buf; diff --git a/src/input/mms.c b/src/input/mms.c index d1ae8558d..578d74dd1 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.5 2002/04/28 15:33:06 guenter Exp $ + * $Id: mms.c,v 1.6 2002/04/29 23:31:59 jcdutton Exp $ * * based on work from major mms * utility functions to handle communication with an mms server @@ -777,7 +777,7 @@ static int get_media_packet (mms_t *this) { || (pre_header[5] != 0xfa) || (pre_header[4] != 0xce) ) { printf ("missing signature\n"); - exit (1); + abort(); } @@ -796,7 +796,7 @@ static int get_media_packet (mms_t *this) { return 0; } else if (command != 0x05) { printf ("unknown command %02x\n", command); - exit (1); + abort(); } } diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 44fbc29fc..0b51dae3e 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.31 2002/04/28 10:12:49 esnel Exp $ + * $Id: xine_decoder.c,v 1.32 2002/04/29 23:31:59 jcdutton Exp $ * * xine decoder plugin using divx4 * @@ -73,7 +73,7 @@ void catch_sigsegv(int sig) "divx4: divx4_forceversion:1\n" "divx4: see xine-ui/doc/README.divx4 for details.\n" "divx4: fatal error; exiting.\n"); - exit(1); + abort(); } #endif diff --git a/src/libffmpeg/libavcodec/common.c b/src/libffmpeg/libavcodec/common.c index 96d8a303a..f7fe2e1d1 100644 --- a/src/libffmpeg/libavcodec/common.c +++ b/src/libffmpeg/libavcodec/common.c @@ -349,7 +349,7 @@ static int build_table(VLC *vlc, int table_nb_bits, #endif if (table_bits[j] != 0) { fprintf(stderr, "incorrect codes\n"); - exit(1); + abort(); } table_bits[j] = n; table_codes[j] = i; diff --git a/src/libffmpeg/libavcodec/imgresample.c b/src/libffmpeg/libavcodec/imgresample.c index 8c69de2de..fda5a31c4 100644 --- a/src/libffmpeg/libavcodec/imgresample.c +++ b/src/libffmpeg/libavcodec/imgresample.c @@ -609,7 +609,7 @@ int main(int argc, char **argv) img, XSIZE, XSIZE, YSIZE); if (memcmp(img1, img2, xsize * ysize) != 0) { fprintf(stderr, "mmx error\n"); - exit(1); + abort(); } printf("MMX OK\n"); #endif diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index f5bff3815..6186c7c5b 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -207,7 +207,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, case 0x00: /* picture_start_code */ if (mpeg2_header_picture (picture, buffer)) { fprintf (stderr, "bad picture header\n"); - exit (1); + abort(); } mpeg2dec->is_frame_needed=0; @@ -287,7 +287,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, case 0xb3: /* sequence_header_code */ if (mpeg2_header_sequence (picture, buffer)) { fprintf (stderr, "bad sequence header\n"); - /* exit (1); */ + /* abort(); */ } else if (mpeg2dec->is_sequence_needed || (picture->frame_width != picture->coded_picture_width) || (picture->frame_height != picture->coded_picture_height)) { @@ -327,7 +327,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, case 0xb5: /* extension_start_code */ if (mpeg2_header_extension (picture, buffer)) { fprintf (stderr, "bad extension\n"); - exit (1); + abort(); } break; @@ -338,7 +338,7 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, case 0xb8: /* group of pictures start code */ if (mpeg2_header_group_of_pictures (picture, buffer)) { printf ("libmpeg2: bad group of pictures\n"); - exit (1); + abort(); } default: if (code >= 0xb9) diff --git a/src/libmpg123/common.c b/src/libmpg123/common.c index 1c01d97c2..e23508812 100644 --- a/src/libmpg123/common.c +++ b/src/libmpg123/common.c @@ -50,7 +50,7 @@ int decode_header(struct frame *fr,unsigned long newhead) fr->lay = 4-((newhead>>17)&3); if( ((newhead>>10)&0x3) == 0x3) { fprintf(stderr,"Stream error\n"); - exit(1); + abort(); } if(fr->mpeg25) { fr->sampling_frequency = 6 + ((newhead>>10)&0x3); diff --git a/src/libw32dll/wine/ext.c b/src/libw32dll/wine/ext.c index 566143ea8..7cdfdedc8 100644 --- a/src/libw32dll/wine/ext.c +++ b/src/libw32dll/wine/ext.c @@ -251,7 +251,7 @@ LPVOID FILE_dommap( int unix_handle, LPVOID start, if ((fdzero = open( "/dev/zero", O_RDONLY )) == -1) { perror( "Cannot open /dev/zero for READ. Check permissions! error: " ); - exit(1); + abort(); } } fd = fdzero; diff --git a/src/video_out/deinterlace.c b/src/video_out/deinterlace.c index 6434d2b25..5bc2b9991 100644 --- a/src/video_out/deinterlace.c +++ b/src/video_out/deinterlace.c @@ -707,7 +707,7 @@ static void abort_mmx_missing(void) { printf("deinterlace: Fatal error, MMX instruction set needed!\n"); /* FIXME: is it possible to call some "nicer" xine exit function? */ - _exit(1); + abort(); } /* generic YUV deinterlacer diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index d58f66370..16de5ab4f 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_aa.c,v 1.18 2002/03/26 00:38:56 f1rmb Exp $ + * $Id: video_out_aa.c,v 1.19 2002/04/29 23:32:00 jcdutton Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -168,7 +168,7 @@ static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, frame->vo_frame.base[0] = malloc_aligned(16,image_size, (void**) &frame->mem[0]); } else { printf ("alert! unsupported image format %04x\n", format); - exit (1); + abort(); } frame->ratio_code = ratio_code; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index fd759c679..11cb4fd28 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_opengl.c,v 1.9 2002/04/26 17:19:04 jkeil Exp $ + * $Id: video_out_opengl.c,v 1.10 2002/04/29 23:32:00 jcdutton Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf @@ -686,7 +686,7 @@ static void opengl_render_image (opengl_driver_t *this, opengl_frame_t *frame, */ if (! glXMakeCurrent (this->display, this->drawable, ctx)) { fprintf (stderr, "video_out_opengl: no OpenGL support available (glXMakeCurrent)\n The drawable does not seem to be updated correctly.\n"); - exit (1); + abort(); } DEBUGF ((stderr, "set context done\n")); if (ctx == this->context) diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 9a80b807d..71c78d983 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_syncfb.c,v 1.64 2002/04/28 18:55:13 matt2000 Exp $ + * $Id: video_out_syncfb.c,v 1.65 2002/04/29 23:32:00 jcdutton Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -437,19 +437,19 @@ static void syncfb_update_frame_format (vo_driver_t *this_gen, if(frame->id < 0 ) { printf("video_out_syncfb: aborted. (shared memory error in shmget)\n"); - exit(1); + abort(); } frame->vo_frame.base[0] = shmat(frame->id, 0, 0); if(frame->vo_frame.base[0] == NULL) { printf("video_out_syncfb: failed. (shared memory error => address error)\n"); - exit(1); + abort(); } if(frame->vo_frame.base[0] == (void *) -1) { printf("video_out_syncfb: failed. (shared memory error => address error)\n"); - exit(1); + abort(); } shmctl(frame->id, IPC_RMID, 0); diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 4d4fb3cbb..ef4f103f3 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.113 2002/04/19 22:58:46 miguelfreitas Exp $ + * $Id: video_out_xv.c,v 1.114 2002/04/29 23:32:00 jcdutton Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -294,7 +294,7 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, break; default: fprintf (stderr, "create_ximage: unknown format %08x\n",format); - exit (1); + abort(); } if (this->use_shm) { @@ -397,7 +397,7 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, break; default: fprintf (stderr, "create_ximage: unknown format %08x\n",format); - exit (1); + abort(); } image = XvCreateImage (this->display, this->xv_port, diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index 16aaa5e5e..e67743599 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: yuv2rgb.c,v 1.29 2002/02/26 22:53:58 guenter Exp $ + * $Id: yuv2rgb.c,v 1.30 2002/04/29 23:32:00 jcdutton Exp $ */ #include "config.h" @@ -2321,7 +2321,7 @@ static void yuv2rgb_setup_tables (yuv2rgb_factory_t *this, int mode, int swapped default: fprintf (stderr, "mode %d not supported by yuv2rgb\n", mode); - exit (1); + abort(); } for (i = 0; i < 256; i++) { @@ -2451,7 +2451,7 @@ static void yuv2rgb_c_init (yuv2rgb_factory_t *this) default: printf ("yuv2rgb: mode %d not supported by yuv2rgb\n", this->mode); - exit (1); + abort(); } } @@ -2494,7 +2494,7 @@ static void yuv2rgb_single_pixel_init (yuv2rgb_factory_t *this) { default: printf ("yuv2rgb: mode %d not supported by yuv2rgb\n", this->mode); - exit (1); + abort(); } } diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index d499e30bd..4a137b2df 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.71 2002/04/14 00:24:45 guenter Exp $ + * $Id: audio_decoder.c,v 1.72 2002/04/29 23:32:00 jcdutton Exp $ * * * functions that implement audio decoding @@ -285,7 +285,7 @@ void audio_decoder_init (xine_t *this) { &pth_attrs, audio_decoder_loop, this)) != 0) { fprintf (stderr, "audio_decoder: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } } diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index dec239ab3..12f2bbf9c 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.52 2002/04/14 00:24:45 guenter Exp $ + * $Id: audio_out.c,v 1.53 2002/04/29 23:32:00 jcdutton Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -490,7 +490,7 @@ static int ao_open(ao_instance_t *this, printf ("audio_out: can't create thread (%s)\n", strerror(err)); printf ("audio_out: sorry, this should not happen. please restart xine.\n"); - exit(1); + abort(); } else printf ("audio_out: thread created\n"); diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index a238c8dda..dc43f4205 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.c,v 1.21 2002/04/27 23:00:40 cvogler Exp $ + * $Id: configfile.c,v 1.22 2002/04/29 23:32:00 jcdutton Exp $ * * config file management - implementation * @@ -644,7 +644,7 @@ config_values_t *xine_config_file_init (char *filename) { } else { printf ("configfile: could not allocate config object\n"); - exit (1); + abort(); } this->register_string = config_file_register_string; @@ -667,6 +667,10 @@ config_values_t *xine_config_file_init (char *filename) { /* * $Log: configfile.c,v $ + * Revision 1.22 2002/04/29 23:32:00 jcdutton + * Replace all exit(1) with abort(). + * xine-lib should really never do an exit or abort, but instead pass back nice error values to the calling application, but until that happens, use abort() as that is tracable with gdb, whereas exit(1) is not backtraceable. + * * Revision 1.21 2002/04/27 23:00:40 cvogler * Add function to unregister configfile callback. * diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 4b95ca6cc..6108d83da 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.75 2002/04/23 15:45:26 esnel Exp $ + * $Id: load_plugins.c,v 1.76 2002/04/29 23:32:00 jcdutton Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -77,7 +77,7 @@ static void segv_handler (int hubba) { printf ("\nload_plugins: Initialization of plugin '%s' failed (segmentation fault).\n",plugin_name); printf ("load_plugins: You probably need to remove the offending file.\n"); printf ("load_plugins: (This error is usually due an incorrect plugin version)\n"); - exit(1); + abort(); } static void install_segv_handler(void){ @@ -100,7 +100,7 @@ void load_demux_plugins (xine_t *this, if (this == NULL || config == NULL) { printf (_("%s(%s@%d): parameter should be non null, exiting\n"), __FILE__, __XINE_FUNCTION__, __LINE__); - exit(1); + abort(); } this->num_demuxer_plugins = 0; @@ -160,7 +160,7 @@ void load_demux_plugins (xine_t *this, if(this->num_demuxer_plugins > DEMUXER_PLUGIN_MAX) { printf ( _("load_plugins: too many demux plugins installed, exiting.\n")); - exit(1); + abort(); } } } @@ -325,7 +325,7 @@ void load_input_plugins (xine_t *this, if(this->num_input_plugins > INPUT_PLUGIN_MAX) { printf (_("%s(%d): too many input plugins installed, " "exiting.\n"), __FILE__, __LINE__); - exit(1); + abort(); } } } @@ -338,7 +338,7 @@ void load_input_plugins (xine_t *this, if (this->num_input_plugins == 0) { printf (_("load_plugins: no input plugins found in %s! - " "Did you install xine correctly??\n"), XINE_PLUGINDIR); - exit (1); + abort(); } } @@ -459,7 +459,7 @@ void load_decoder_plugins (xine_t *this, if(this == NULL || config == NULL) { printf ( _("%s(%s@%d): parameter should be non null, exiting\n"), __FILE__, __XINE_FUNCTION__, __LINE__); - exit(1); + abort(); } /* diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index eae3d1574..31cff4704 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.83 2002/04/16 12:27:20 jcdutton Exp $ + * $Id: video_decoder.c,v 1.84 2002/04/29 23:32:00 jcdutton Exp $ * */ @@ -294,7 +294,7 @@ void video_decoder_init (xine_t *this) { &pth_attrs, video_decoder_loop, this)) != 0) { fprintf (stderr, "video_decoder: can't create new thread (%s)\n", strerror(err)); - exit (1); + abort(); } this->video_in_discontinuity = 0; diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 43ccff317..40b98ad93 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.93 2002/04/09 03:38:01 miguelfreitas Exp $ + * $Id: video_out.c,v 1.94 2002/04/29 23:32:00 jcdutton Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -1003,7 +1003,7 @@ vo_instance_t *vo_new_instance (vo_driver_t *driver, xine_t *xine) { strerror(err)); /* FIXME: how does this happen ? */ printf (_("video_out: sorry, this should not happen. please restart xine.\n")); - exit(1); + abort(); } else printf ("video_out: thread created\n"); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index ab2cd4d25..7f0c21a8e 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.121 2002/04/28 17:39:36 guenter Exp $ + * $Id: xine.c,v 1.122 2002/04/29 23:32:00 jcdutton Exp $ * * top-level xine functions * @@ -88,7 +88,7 @@ void xine_notify_stream_finished (xine_t *this) { NULL, xine_notify_stream_finished_thread, this)) != 0) { printf (_("xine_notify_stream_finished: can't create new thread (%s)\n"), strerror(err)); - exit (1); + abort(); } } -- cgit v1.2.3