1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

Rebuild on Linux.

Remove warnings on system and write call without return code check.
This commit is contained in:
Renaud 2015-01-02 14:20:07 +08:00
parent b6bd5c2927
commit 20d21435e0
7 changed files with 32 additions and 15 deletions

View File

@ -161,7 +161,8 @@ isearch.o: isearch.c isearch.h basic.h buffer.h crypt.h line.h utf8.h \
defines.h window.h defines.h window.h
line.o: line.c line.h utf8.h buffer.h crypt.h estruct.h log.h retcode.h \ line.o: line.c line.h utf8.h buffer.h crypt.h estruct.h log.h retcode.h \
window.h defines.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 log.o: log.c log.h retcode.h
main.o: main.c estruct.h basic.h bind.h bindable.h buffer.h crypt.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 \ 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 \ 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 region.h random.h search.h spawn.h window.h defines.h word.h
pklock.o: pklock.c estruct.h pklock.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 \ 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 \ display.h estruct.h execute.h input.h bind.h log.h retcode.h search.h \
terminal.h defines.h window.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 terminal.h window.h
tcap.o: tcap.c terminal.h defines.h retcode.h display.h estruct.h \ tcap.o: tcap.c terminal.h defines.h retcode.h display.h estruct.h \
termio.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 utf8.o: utf8.c utf8.h
vmsvt.o: vmsvt.c estruct.h vmsvt.o: vmsvt.c estruct.h
vt52.o: vt52.c estruct.h vt52.o: vt52.c estruct.h

View File

@ -164,7 +164,13 @@ void vttidy(void)
TTclose(); TTclose();
TTkclose(); TTkclose();
#ifdef PKCODE #ifdef PKCODE
write(1, "\r", 1); {
int ret ;
ret = write( 1, "\r", 1) ;
if( ret != 1) {
/* some error handling here */
}
}
#endif #endif
} }

9
exec.c
View File

@ -80,6 +80,15 @@ static int mstore = FALSE ; /* storing text to macro flag */
static int dobuf( struct buffer *bp) ; static int dobuf( struct buffer *bp) ;
static void freewhile( struct while_block *wp) ; 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. * Execute a named command even if it is not bound.
*/ */

1
exec.h
View File

@ -17,6 +17,7 @@ extern boolean clexec ; /* command line execution flag */
void ue_system( const char *cmd) ;
int namedcmd( int f, int n) ; int namedcmd( int f, int n) ;
int execcmd( int f, int n) ; int execcmd( int f, int n) ;
char *token( char *src, char *tok, int size) ; char *token( char *src, char *tok, int size) ;

View File

@ -619,7 +619,7 @@ int getstring( const char *prompt, char *buf, int nbuf, int eolchar)
xmkstemp(tmp); xmkstemp(tmp);
strcat(ffbuf, tmp); strcat(ffbuf, tmp);
strcat(ffbuf, " 2>&1"); strcat(ffbuf, " 2>&1");
system(ffbuf); ue_system( ffbuf) ;
tmpf = fopen(tmp, "r"); tmpf = fopen(tmp, "r");
#endif #endif
#if MSDOS #if MSDOS

View File

@ -84,7 +84,16 @@ char *dolock( const char *fname)
cuserid(locker); cuserid(locker);
strcat(locker + strlen(locker), "@"); strcat(locker + strlen(locker), "@");
gethostname(locker + strlen(locker), 64); 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); close(fd);
return NULL; return NULL;
} }

View File

@ -51,15 +51,6 @@ extern void sizesignal(int);
#include <process.h> #include <process.h>
#endif #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 * Create a subjob with a copy of the command intrepreter in it. When the