It's not needed to use own isalpha() in disk letter check
This commit is contained in:
parent
5fb85baf53
commit
5e7b18e44c
@ -89,7 +89,7 @@ int direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((g_isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
if ((isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
||||||
!tempstr[3]) || eqstr(tempstr, "\\")) {
|
!tempstr[3]) || eqstr(tempstr, "\\")) {
|
||||||
free(tempstr);
|
free(tempstr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -185,7 +185,7 @@ int direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((g_isalpha(tempstr[0]) && tempstr[1] == ':' && ((tempstr[2] == '\0') || ((tempstr[2] == '\\' ||
|
if ((isalpha(tempstr[0]) && tempstr[1] == ':' && ((tempstr[2] == '\0') || ((tempstr[2] == '\\' ||
|
||||||
tempstr[2] == '/') && tempstr[3] == '\0'))) || eqstri(tempstr, "\\"))
|
tempstr[2] == '/') && tempstr[3] == '\0'))) || eqstri(tempstr, "\\"))
|
||||||
{
|
{
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
@ -243,7 +243,7 @@ int _fast direxist(const char *directory)
|
|||||||
|
|
||||||
/* Root directory of any drive always exists! */
|
/* Root directory of any drive always exists! */
|
||||||
|
|
||||||
if ((g_isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
if ((isalpha((int)tempstr[0]) && tempstr[1] == ':' && (tempstr[2] == '\\' || tempstr[2] == '/') &&
|
||||||
!tempstr[3]) || eqstr(tempstr, "\\"))
|
!tempstr[3]) || eqstr(tempstr, "\\"))
|
||||||
{
|
{
|
||||||
free(tempstr);
|
free(tempstr);
|
||||||
|
@ -85,7 +85,7 @@ dword GenMsgIdEx(char *seqdir, unsigned long max_outrun, dword (*altGenMsgId)(vo
|
|||||||
p = getenv("SEQOUT");
|
p = getenv("SEQOUT");
|
||||||
if ( p && isdigit((int)(*p)) ) {
|
if ( p && isdigit((int)(*p)) ) {
|
||||||
max_outrun = (unsigned long)atol(p);
|
max_outrun = (unsigned long)atol(p);
|
||||||
switch (g_tolower(p[strlen(p) - 1])) {
|
switch (tolower(p[strlen(p) - 1])) {
|
||||||
case 'y': max_outrun *= 365;
|
case 'y': max_outrun *= 365;
|
||||||
case 'd': max_outrun *= 24;
|
case 'd': max_outrun *= 24;
|
||||||
case 'h': max_outrun *= 60*60;
|
case 'h': max_outrun *= 60*60;
|
||||||
|
Reference in New Issue
Block a user