Review system() dependencies and clean up obsolete function prototypes in spawn interface.

This commit is contained in:
Renaud 2019-08-07 10:19:47 +08:00
parent 70a5a6b636
commit bc11a0c913
5 changed files with 11 additions and 14 deletions

9
exec.c
View File

@ -82,15 +82,6 @@ static int dobuf( struct buffer *bp) ;
static void freewhile( struct while_block *wp) ;
static int macarg( char *tok, int toksz) ;
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.
*/

1
exec.h
View File

@ -15,7 +15,6 @@ int execproc( int f, int n) ;
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) ;
void gettoken( char *tok, int maxtoksize) ;

10
input.c
View File

@ -11,6 +11,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@ -50,6 +51,15 @@ const int nlc = CONTROL | 'J' ; /* end of input char */
static const int quotec = 0x11 ; /* quote char during getstring() */
void ue_system( const char *cmd) {
int ret ;
ret = system( cmd) ;
if( ret == -1) {
/* some actual handling needed here */
}
}
/*
* Ask a yes or no question in the message line. Return either TRUE, FALSE, or
* ABORT. The ABORT status is returned if the user bumps out of the question

View File

@ -21,6 +21,7 @@ extern int abortc; /* current abort command char */
extern const int nlc ; /* end of input char */
void ue_system( const char *cmd) ;
int mlyesno( const char *prompt) ;
int newmlarg( char **outbufref, const char *prompt, int size) ;
int newmlargt( char **outbufref, const char *prompt, int size) ;

View File

@ -5,7 +5,3 @@ int spawn( int f, int n) ;
int execprg( int f, int n) ;
int pipecmd( int f, int n) ;
int filter_buffer( int f, int n) ;
int sys( char *cmd) ;
int shellprog( char *cmd) ;
int execprog( char *cmd) ;