diff --git a/Makefile b/Makefile index 0b8894c..ffffdee 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,8 @@ isearch.o: isearch.c isearch.h basic.h buffer.h crypt.h line.h utf8.h \ defines.h window.h line.o: line.c line.h utf8.h buffer.h crypt.h estruct.h log.h retcode.h \ window.h defines.h -lock.o: lock.c estruct.h lock.h +lock.o: lock.c estruct.h lock.h defines.h display.h input.h bind.h \ + retcode.h pklock.h log.o: log.c log.h retcode.h main.o: main.c estruct.h basic.h bind.h bindable.h buffer.h crypt.h \ line.h utf8.h display.h eval.h execute.h file.h retcode.h input.h lock.h \ @@ -171,7 +172,7 @@ names.o: names.c names.h basic.h bind.h bindable.h buffer.h crypt.h \ line.h utf8.h display.h eval.h exec.h retcode.h file.h isearch.h \ region.h random.h search.h spawn.h window.h defines.h word.h pklock.o: pklock.c estruct.h pklock.h -posix.o: posix.c +posix.o: posix.c termio.h estruct.h retcode.h utf8.h random.o: random.c random.h basic.h buffer.h crypt.h line.h utf8.h \ display.h estruct.h execute.h input.h bind.h log.h retcode.h search.h \ terminal.h defines.h window.h @@ -185,7 +186,7 @@ spawn.o: spawn.c spawn.h defines.h buffer.h crypt.h line.h utf8.h \ terminal.h window.h tcap.o: tcap.c terminal.h defines.h retcode.h display.h estruct.h \ termio.h -termio.o: termio.c termio.h estruct.h retcode.h utf8.h +termio.o: termio.c utf8.o: utf8.c utf8.h vmsvt.o: vmsvt.c estruct.h vt52.o: vt52.c estruct.h diff --git a/display.c b/display.c index 404a03d..d92c820 100644 --- a/display.c +++ b/display.c @@ -164,7 +164,13 @@ void vttidy(void) TTclose(); TTkclose(); #ifdef PKCODE - write(1, "\r", 1); + { + int ret ; + ret = write( 1, "\r", 1) ; + if( ret != 1) { + /* some error handling here */ + } + } #endif } diff --git a/exec.c b/exec.c index d37ffcd..1f3aa04 100644 --- a/exec.c +++ b/exec.c @@ -80,6 +80,15 @@ static int mstore = FALSE ; /* storing text to macro flag */ static int dobuf( struct buffer *bp) ; static void freewhile( struct while_block *wp) ; +void ue_system( const char *cmd) { + int ret ; + + ret = system( cmd) ; + if( ret == -1) { + /* some actual handling needed here */ + } +} + /* * Execute a named command even if it is not bound. */ diff --git a/exec.h b/exec.h index 7ac4b1c..b5864bd 100644 --- a/exec.h +++ b/exec.h @@ -17,6 +17,7 @@ extern boolean clexec ; /* command line execution flag */ +void ue_system( const char *cmd) ; int namedcmd( int f, int n) ; int execcmd( int f, int n) ; char *token( char *src, char *tok, int size) ; diff --git a/input.c b/input.c index e599cde..20af126 100644 --- a/input.c +++ b/input.c @@ -619,7 +619,7 @@ int getstring( const char *prompt, char *buf, int nbuf, int eolchar) xmkstemp(tmp); strcat(ffbuf, tmp); strcat(ffbuf, " 2>&1"); - system(ffbuf); + ue_system( ffbuf) ; tmpf = fopen(tmp, "r"); #endif #if MSDOS diff --git a/pklock.c b/pklock.c index 4ce1b34..314939a 100644 --- a/pklock.c +++ b/pklock.c @@ -84,7 +84,16 @@ char *dolock( const char *fname) cuserid(locker); strcat(locker + strlen(locker), "@"); gethostname(locker + strlen(locker), 64); - write(fd, locker, strlen(locker)); + { + int ret, locker_size ; + + locker_size = strlen( locker) ; + ret = write( fd, locker, locker_size) ; + if( ret != locker_size) { + /* some error handling here */ + } + } + close(fd); return NULL; } diff --git a/spawn.c b/spawn.c index f59fe97..990ab78 100644 --- a/spawn.c +++ b/spawn.c @@ -51,15 +51,6 @@ extern void sizesignal(int); #include #endif -static void ue_system( char *cmd) { - int ret ; - - ret = system( cmd) ; - if( ret == -1) { - /* some actual handling needed here */ - } -} - /* * Create a subjob with a copy of the command intrepreter in it. When the