Added patch 826821 from phearbear
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1382
This commit is contained in:
parent
6ad8bd1411
commit
87216faa9b
4 changed files with 9 additions and 6 deletions
|
@ -33,6 +33,9 @@
|
|||
//#define nocasestrcmp(a,b) stricmp(a,b)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
void strreplace(char * str,char o,char n);
|
||||
char *ltrim(char *str);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_cache.cpp,v 1.27 2003-10-09 13:49:48 finsterr Exp $ */
|
||||
/* $Id: drive_cache.cpp,v 1.28 2003-10-27 14:16:59 qbix79 Exp $ */
|
||||
|
||||
#include "drives.h"
|
||||
#include "dos_inc.h"
|
||||
|
@ -162,7 +162,7 @@ char* DOS_Drive_Cache::GetExpandName(const char* path)
|
|||
work[0] = 0;
|
||||
strcpy (dir,path);
|
||||
|
||||
char* pos = strrchr(path,CROSS_FILESPLIT);
|
||||
const char* pos = strrchr(path,CROSS_FILESPLIT);
|
||||
|
||||
if (pos) dir[pos-path+1] = 0;
|
||||
CFileInfo* dirInfo = FindDirInfo(dir, work);
|
||||
|
@ -183,7 +183,7 @@ void DOS_Drive_Cache::AddEntry(const char* path, bool checkExists)
|
|||
char expand [CROSS_LEN];
|
||||
|
||||
CFileInfo* dir = FindDirInfo(path,expand);
|
||||
char* pos = strrchr(path,CROSS_FILESPLIT);
|
||||
const char* pos = strrchr(path,CROSS_FILESPLIT);
|
||||
|
||||
if (pos) {
|
||||
strcpy(file,pos+1);
|
||||
|
@ -435,7 +435,7 @@ DOS_Drive_Cache::CFileInfo* DOS_Drive_Cache::FindDirInfo(const char* path, char*
|
|||
char dir [CROSS_LEN];
|
||||
char work [CROSS_LEN];
|
||||
const char* start = path;
|
||||
char* pos;
|
||||
const char* pos;
|
||||
CFileInfo* curDir = dirBase;
|
||||
Bit16u id;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ bool WildFileCmp(const char * file, const char * wild)
|
|||
char file_ext[4];
|
||||
char wild_name[9];
|
||||
char wild_ext[4];
|
||||
char * find_ext;
|
||||
const char * find_ext;
|
||||
Bitu r;
|
||||
|
||||
strcpy(file_name," ");
|
||||
|
|
|
@ -89,7 +89,7 @@ emptyline:
|
|||
if (!first) continue; *first++=0;
|
||||
std::string temp;
|
||||
if (shell->GetEnvStr(cmd_read,temp)) {
|
||||
char * equals=strchr(temp.c_str(),'=');
|
||||
const char * equals=strchr(temp.c_str(),'=');
|
||||
if (!equals) continue;
|
||||
equals++;
|
||||
strcpy(cmd_write,equals);
|
||||
|
|
Loading…
Add table
Reference in a new issue