1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-21 00:26:27 -05:00

review naming and lookup of rc and hlp files.

This commit is contained in:
Renaud 2013-06-12 14:27:09 +08:00
parent 4cba352689
commit 47c67446b0
4 changed files with 8 additions and 5 deletions

6
bind.c
View File

@ -36,10 +36,10 @@ int help(int f, int n)
char *fname = NULL; /* ptr to file returned by flook() */
/* first check if we are already here */
bp = bfind("emacs.hlp", FALSE, BFINVS);
bp = bfind( hlpfname, FALSE, BFINVS);
if (bp == NULL) {
fname = flook(pathname[1], FALSE);
fname = flook( hlpfname, FALSE);
if (fname == NULL) {
mlwrite("(Help file is not online)");
return FALSE;
@ -467,7 +467,7 @@ int startup(char *sfname)
if (*sfname != 0)
fname = flook(sfname, TRUE);
else
fname = flook(pathname[0], TRUE);
fname = flook( rcfname, TRUE);
/* if it isn't around, don't sweat it */
if (fname == NULL)

View File

@ -451,7 +451,7 @@ int anycb(void)
* and the "cflag" is TRUE, create it. The "bflag" is
* the settings for the flags in in buffer.
*/
struct buffer *bfind(char *bname, int cflag, int bflag)
struct buffer *bfind( const char *bname, int cflag, int bflag)
{
struct buffer *bp;
struct buffer *sb; /* buffer to insert after */

View File

@ -17,6 +17,6 @@ int anycb( void) ;
int bclear( struct buffer *bp) ;
int unmark( int f, int n) ;
/* Lookup a buffer by name. */
struct buffer *bfind( char *bname, int cflag, int bflag) ;
struct buffer *bfind( const char *bname, int cflag, int bflag) ;
#endif

View File

@ -1,6 +1,9 @@
#include "estruct.h"
#define rcfname pathname[ 0]
#define hlpfname pathname[ 1]
extern const char *pathname[] ;