X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Time%2Fevent.c;h=ca362dfb3a4b39b1caf19ea2d532515c30e5bd9d;hb=3680a111488632d1f120826a1646a7e9e9ed0525;hp=a179f7142284d6b846e9c855b6fe5911a5e0cff1;hpb=0de1810a15a4491dcb0373bfd5533f5438ac02c0;p=flightgear.git diff --git a/Time/event.c b/Time/event.c index a179f7142..ca362dfb3 100644 --- a/Time/event.c +++ b/Time/event.c @@ -124,15 +124,16 @@ void addq(int ptr) { int popq( void ) { int ptr; - if ( !emptyq() ) { + if ( emptyq() ) { + printf("PANIC: RUN QUEUE IS EMPTY!!!\n"); + ptr = 0; + } else { ptr = queue[queue_front]; /* printf("Popped position %d = %d\n", queue_front, ptr); */ queue_front = (queue_front + 1) % MAX_RUN_QUEUE; - return(ptr); - } else { - printf("PANIC: RUN QUEUE IS EMPTY!!!\n"); - exit(0); } + + return(ptr); } @@ -338,10 +339,14 @@ void fgEventProcess( void ) { /* $Log$ -/* Revision 1.7 1998/01/19 19:27:19 curt -/* Merged in make system changes from Bob Kuehne -/* This should simplify things tremendously. +/* Revision 1.8 1998/01/27 00:48:05 curt +/* Incorporated Paul Bleisch's new debug message +/* system and commandline/config file processing code. /* + * Revision 1.7 1998/01/19 19:27:19 curt + * Merged in make system changes from Bob Kuehne + * This should simplify things tremendously. + * * Revision 1.6 1998/01/19 18:40:39 curt * Tons of little changes to clean up the code and to remove fatal errors * when building with the c++ compiler.