mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 15:26:23 -05:00
use constant strings for pathnames.
This commit is contained in:
parent
13f4a7cefd
commit
4958b7d2af
9
bind.c
9
bind.c
@ -474,7 +474,7 @@ int startup(char *sfname)
|
||||
* char *fname; base file name to search for
|
||||
* int hflag; Look in the HOME environment variable first?
|
||||
*/
|
||||
char *flook(char *fname, int hflag)
|
||||
char *flook( const char *fname, int hflag)
|
||||
{
|
||||
char *home; /* path to home directory */
|
||||
char *path; /* environmental PATH variable */
|
||||
@ -502,9 +502,10 @@ char *flook(char *fname, int hflag)
|
||||
#endif
|
||||
|
||||
/* always try the current directory first */
|
||||
if (ffropen(fname) == FIOSUC) {
|
||||
ffclose();
|
||||
return fname;
|
||||
strcpy( fspec, fname) ;
|
||||
if( ffropen( fspec) == FIOSUC) {
|
||||
ffclose() ;
|
||||
return fspec ;
|
||||
}
|
||||
#if ENVFUNC
|
||||
/* get the PATH variable */
|
||||
|
4
efunc.h
4
efunc.h
@ -180,7 +180,7 @@ extern int buildlist(int type, char *mstring);
|
||||
extern int strinc(char *source, char *sub);
|
||||
extern unsigned int getckey(int mflag);
|
||||
extern int startup(char *sfname);
|
||||
extern char *flook(char *fname, int hflag);
|
||||
char *flook( const char *fname, int hflag) ;
|
||||
extern void cmdstr(int c, char *seq);
|
||||
extern fn_t getbind(int c);
|
||||
extern char *getfname(fn_t);
|
||||
@ -221,7 +221,7 @@ extern int filename(int f, int n);
|
||||
extern int ifile(char *fname);
|
||||
|
||||
/* fileio.c */
|
||||
extern int ffropen(char *fn);
|
||||
int ffropen( const char *fn) ;
|
||||
extern int ffwopen(char *fn);
|
||||
extern int ffclose(void);
|
||||
extern int ffputline(char *buf, int nbuf);
|
||||
|
2
epath.h
2
epath.h
@ -9,7 +9,7 @@
|
||||
#define EPATH_H_
|
||||
|
||||
/* possible names and paths of help files under different OSs */
|
||||
static char *pathname[] =
|
||||
static const char *pathname[] =
|
||||
#if MSDOS
|
||||
{
|
||||
"emacs.rc",
|
||||
|
2
fileio.c
2
fileio.c
@ -17,7 +17,7 @@ static int eofflag; /* end-of-file flag */
|
||||
/*
|
||||
* Open a file for reading.
|
||||
*/
|
||||
int ffropen(char *fn)
|
||||
int ffropen( const char *fn)
|
||||
{
|
||||
if ((ffp = fopen(fn, "r")) == NULL)
|
||||
return FIOFNF;
|
||||
|
4
spawn.c
4
spawn.c
@ -1,4 +1,4 @@
|
||||
/* spaw.c
|
||||
/* spawn.c
|
||||
*
|
||||
* Various operating system access commands.
|
||||
*
|
||||
@ -571,7 +571,7 @@ int execprog(char *cmd)
|
||||
char *fcb1; /* 4 byte pointer to FCB at PSP+5Ch */
|
||||
char *fcb2; /* 4 byte pointer to FCB at PSP+6Ch */
|
||||
} pblock;
|
||||
char *flook();
|
||||
char *flook( const char *fname, int hflag) ;
|
||||
|
||||
/* parse the command name from the command line */
|
||||
sp = prog;
|
||||
|
Loading…
Reference in New Issue
Block a user