Aggiunta stricmp() per UNIX

git-svn-id: svn://10.65.10.50/trunk@34 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-08-19 07:10:19 +00:00
parent ea150a8931
commit 184c4cc092
2 changed files with 271 additions and 254 deletions

View File

@ -22,11 +22,11 @@ int remove(const char* path)
bool fcopy(const char* orig, const char* dest)
{
#if XVT_OS == XVT_OS_SCOUNIX
const char* const rflag = "r";
const char* const wflag = "w";
const char* const rflag = "r";
const char* const wflag = "w";
#else
const char* const rflag = "rb";
const char* const wflag = "wb";
const char* const rflag = "rb";
const char* const wflag = "wb";
#endif
FILE* i = fopen(orig, rflag);
@ -223,3 +223,15 @@ const char *esc(const char* s)
*s2 = '\0';
return(__tmp_string);
}
#if XVT_OS == XVT_OS_SCOUNIX
int stricmp(const char* s1, const char* s2)
{
while (toupper(*s1) == toupper(*s2))
if (*s1++ == '\0' && *s2++ == '\0')
return 0;
return *s1 - *s2;
}
#endif

View File

@ -12,6 +12,11 @@ int rtoi(const char * roman);
const char* itor(int i);
bool fcopy(const char* orig, const char* dest);
bool fexist(const char* file);
#if XVT_OS == XVT_OS_SCOUNIX
int stricmp(const char*, const char*);
#endif
const char* esc(const char*);
#define ODD(x) (x & 1)