diff --git a/bld/vi/c/dosdir.c b/bld/vi/c/dosdir.c index ff32589dd4..c1f23d97d2 100644 --- a/bld/vi/c/dosdir.c +++ b/bld/vi/c/dosdir.c @@ -57,7 +57,7 @@ vi_rc MyGetFileSize( const char *name, long *size ) /* * IsDirectory - check if a specified path is a directory */ -bool IsDirectory( char *name ) +bool IsDirectory( const char *name ) { struct _finddata_t fdt; unsigned rc; diff --git a/bld/vi/c/mapkey.c b/bld/vi/c/mapkey.c index cfa8288d88..efc8de3d89 100644 --- a/bld/vi/c/mapkey.c +++ b/bld/vi/c/mapkey.c @@ -473,7 +473,7 @@ void FiniKeyMaps( void ) vi_rc ExecuteBuffer( void ) { vi_rc rc; - char *data; + const char *data; key_map scr; rc = ModificationTest(); diff --git a/bld/vi/c/savebuf.c b/bld/vi/c/savebuf.c index a2293539cd..93e8b63a7b 100644 --- a/bld/vi/c/savebuf.c +++ b/bld/vi/c/savebuf.c @@ -258,7 +258,7 @@ vi_rc InsertSavebufAfter2( void ) /* * GetSavebufString - get a string made up of stuff in a savebuf */ -vi_rc GetSavebufString( char **data ) +vi_rc GetSavebufString( const char **data ) { #ifdef __WIN__ savebuf clip; @@ -316,7 +316,7 @@ vi_rc GetSavebufString( char **data ) if( len > MAX_STR * 4 ) { rc = ERR_SAVEBUF_TOO_BIG; } else { - p = *data = MemAlloc( len ); + *data = p = MemAlloc( len ); switch( tmp->type ) { case SAVEBUF_LINE: strcpy( p, tmp->u.data ); diff --git a/bld/vi/h/rtns.h b/bld/vi/h/rtns.h index 4f76ef5541..11281f2f0f 100644 --- a/bld/vi/h/rtns.h +++ b/bld/vi/h/rtns.h @@ -151,7 +151,7 @@ struct dirent; vi_rc MyGetFileSize( const char *, long * ); void FormatFileEntry( direct_ent *file, char *res ); -bool IsDirectory( char *name ); +bool IsDirectory( const char *name ); void GetFileInfo( direct_ent *tmp, struct dirent *dire, const char *path ); /* dotmode.c */ @@ -701,7 +701,7 @@ void AddFcbsToSavebuf( fcb_list *, bool ); vi_rc SwitchSavebuf( void ); vi_rc DoSavebufNumber( void ); vi_rc SetSavebufNumber( const char * ); -vi_rc GetSavebufString( char ** ); +vi_rc GetSavebufString( const char ** ); bool IsEmptySavebuf( char ch ); void FiniSavebufs( void ); diff --git a/bld/vi/noui/unixdir.c b/bld/vi/noui/unixdir.c index 546ac29ea8..661aab5ad3 100644 --- a/bld/vi/noui/unixdir.c +++ b/bld/vi/noui/unixdir.c @@ -71,7 +71,7 @@ vi_rc MyGetFileSize( const char *inname, long *size ) /* * IsDirectory - check if a specified path is a directory */ -bool IsDirectory( char *name ) +bool IsDirectory( const char *name ) { struct stat sb; diff --git a/bld/vi/qnx/qnxdir.c b/bld/vi/qnx/qnxdir.c index 836a9dca74..a4d57abbc9 100644 --- a/bld/vi/qnx/qnxdir.c +++ b/bld/vi/qnx/qnxdir.c @@ -73,7 +73,7 @@ int MyGetFileSize( const char *inname, long *size ) /* * IsDirectory - check if a specified path is a directory */ -bool IsDirectory( char *name ) +bool IsDirectory( const char *name ) { struct stat sb; diff --git a/bld/vi/unix/unixdir.c b/bld/vi/unix/unixdir.c index 8333ade632..cf53b3ef42 100644 --- a/bld/vi/unix/unixdir.c +++ b/bld/vi/unix/unixdir.c @@ -74,7 +74,7 @@ vi_rc MyGetFileSize( const char *inname, long *size ) /* * IsDirectory - check if a specified path is a directory */ -bool IsDirectory( char *name ) +bool IsDirectory( const char *name ) { struct stat sb;