diff --git a/input.c b/input.c index 96012f2..626e44c 100644 --- a/input.c +++ b/input.c @@ -693,10 +693,12 @@ int getstring( const char *prompt, char *buf, int nbuf, int eolchar) } TTflush() ; +#if UNIX if( tmpf != NULL) { fclose( tmpf) ; unlink( tmp) ; } +#endif return retval ; } diff --git a/spawn.c b/spawn.c index d7a3e2f..10eafc8 100644 --- a/spawn.c +++ b/spawn.c @@ -69,6 +69,8 @@ BINDABLE( spawncli) { term.t_nrow = term.t_ncol = 0; #endif return TRUE; +#else + return FALSE; #endif } @@ -100,14 +102,14 @@ void rtfrmshell(void) * done. Bound to "C-X !". */ BINDABLE( spawn) { - int s ; - char *line ; /* don't allow this command if restricted */ if( restflag) return resterr(); #if USG | BSD + int s ; + char *line ; s = newmlarg( &line, "!", 0) ; if( s != TRUE) return s ; @@ -129,6 +131,8 @@ BINDABLE( spawn) { TTkopen(); sgarbf = TRUE; return TRUE; +#else + return FALSE; #endif } @@ -139,14 +143,14 @@ BINDABLE( spawn) { */ BINDABLE( execprg) { - int s ; - char *line ; /* don't allow this command if restricted */ if( restflag) return resterr() ; #if USG | BSD + int s ; + char *line ; s = newmlarg( &line, "$", 0) ; if( s != TRUE) return s ; @@ -164,6 +168,8 @@ BINDABLE( execprg) { while ((s = tgetc()) != '\r' && s != ' '); sgarbf = TRUE; return TRUE; +#else + return FALSE; #endif } diff --git a/tcap.c b/tcap.c index 53f829e..e244a24 100644 --- a/tcap.c +++ b/tcap.c @@ -6,6 +6,8 @@ * modified by Petri Kutvonen */ +#if TERMCAP + #include #include @@ -24,8 +26,6 @@ #include "display.h" #include "termio.h" -#if TERMCAP - boolean eolexist = TRUE ; /* does clear to EOL exist */ boolean revexist = FALSE ; /* does reverse video exist? */ boolean sgarbf = TRUE ; /* TRUE if screen is garbage */ diff --git a/termio.c b/termio.c index 3ed67b0..5975ae6 100644 --- a/termio.c +++ b/termio.c @@ -228,6 +228,7 @@ int ttgetc( void) { } return kbdq & 255; #endif + return 0; } #if TYPEAH