mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-17 23:06:25 -05:00
Review startup and associated prototypes.
This commit is contained in:
parent
5fda2735a5
commit
f60e3fbc9f
23
bind.c
23
bind.c
@ -459,24 +459,17 @@ unsigned int getckey(int mflag)
|
||||
/*
|
||||
* execute the startup file
|
||||
*
|
||||
* char *sfname; name of startup file (null if default)
|
||||
* char *fname; name of startup file (null if default)
|
||||
*/
|
||||
int startup(char *sfname)
|
||||
{
|
||||
char *fname; /* resulting file name to execute */
|
||||
int startup( const char *fname) {
|
||||
if( !fname || *fname == 0) /* use default if empty parameter */
|
||||
fname = rcfname ;
|
||||
|
||||
/* look up the startup file */
|
||||
if (*sfname != 0)
|
||||
fname = flook(sfname, TRUE);
|
||||
else
|
||||
fname = flook( rcfname, TRUE);
|
||||
fname = flook( fname, TRUE) ; /* look up the startup file */
|
||||
if( fname == NULL) /* if it isn't around, don't sweat it */
|
||||
return TRUE ;
|
||||
|
||||
/* if it isn't around, don't sweat it */
|
||||
if (fname == NULL)
|
||||
return TRUE;
|
||||
|
||||
/* otherwise, execute the sucker */
|
||||
return dofile(fname);
|
||||
return dofile( fname) ; /* otherwise, execute the sucker */
|
||||
}
|
||||
|
||||
/*
|
||||
|
2
bind.h
2
bind.h
@ -19,7 +19,7 @@ int unbindchar( int c) ;
|
||||
int desbind( int f, int n) ;
|
||||
int buildlist( int type, char *mstring) ;
|
||||
unsigned int getckey( int mflag) ;
|
||||
int startup( char *sfname) ;
|
||||
int startup( const char *fname) ;
|
||||
void cmdstr( int c, char *seq) ;
|
||||
fn_t getbind( int c) ;
|
||||
fn_t fncmatch( char *) ;
|
||||
|
3
exec.c
3
exec.c
@ -924,8 +924,7 @@ int execfile(int f, int n)
|
||||
*
|
||||
* char *fname; file name to execute
|
||||
*/
|
||||
int dofile(char *fname)
|
||||
{
|
||||
int dofile( const char *fname) {
|
||||
struct buffer *bp; /* buffer to place file to exeute */
|
||||
struct buffer *cb; /* temp to hold current buf while we read */
|
||||
int status; /* results of various calls */
|
||||
|
2
exec.h
2
exec.h
@ -25,7 +25,7 @@ int nextarg( const char *prompt, char *buffer, int size, int terminator) ;
|
||||
int storemac( int f, int n) ;
|
||||
int execbuf( int f, int n) ;
|
||||
int execfile( int f, int n) ;
|
||||
int dofile( char *fname) ;
|
||||
int dofile( const char *fname) ;
|
||||
|
||||
int cbuf1( int f, int n) ;
|
||||
int cbuf2( int f, int n) ;
|
||||
|
Loading…
Reference in New Issue
Block a user