mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Valid compilation when CLEAN is set.
Use assert() and robust fallback instead of exit() to handle 'impossible' cases.
This commit is contained in:
parent
115d9babae
commit
c10c550bdd
2
Makefile
2
Makefile
@ -153,7 +153,7 @@ execute.o: execute.c execute.h estruct.h bind.h random.h display.h file.h \
|
||||
buffer.h crypt.h line.h retcode.h utf8.h mlout.h window.h defines.h
|
||||
file.o: file.c file.h buffer.h crypt.h line.h retcode.h utf8.h defines.h \
|
||||
estruct.h execute.h fileio.h input.h bind.h lock.h mlout.h window.h
|
||||
fileio.o: fileio.c fileio.h crypt.h retcode.h defines.h
|
||||
fileio.o: fileio.c fileio.h crypt.h retcode.h defines.h utf8.h
|
||||
flook.o: flook.c flook.h retcode.h defines.h fileio.h crypt.h
|
||||
input.o: input.c input.h bind.h estruct.h bindable.h display.h exec.h \
|
||||
retcode.h names.h terminal.h defines.h utf8.h wrapper.h
|
||||
|
@ -297,7 +297,7 @@ void release( void *ptr) ;
|
||||
#if CLEAN
|
||||
#define exit(a) cexit(a)
|
||||
|
||||
int cexit( int status) ;
|
||||
void cexit( int status) ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
8
eval.c
8
eval.c
@ -9,6 +9,7 @@
|
||||
* modified by Petri Kutvonen
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -587,7 +588,8 @@ static char *gtfun( char *fname) {
|
||||
retstr = xlat( arg1, arg2, argx) ;
|
||||
break ;
|
||||
default:
|
||||
exit(-11); /* never should get here */
|
||||
assert( FALSE) ; /* never should get here */
|
||||
retstr = errorm ;
|
||||
}
|
||||
|
||||
if( arg2)
|
||||
@ -748,7 +750,9 @@ static char *gtenv( char *vname) {
|
||||
return ltos(0);
|
||||
#endif
|
||||
}
|
||||
exit(-12); /* again, we should never get here */
|
||||
|
||||
assert( FALSE) ; /* again, we should never get here */
|
||||
return errorm ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user