Mercurial > hg > index.cgi
comparison lwasm/input.c @ 252:201b2774cb0e
Fix warning about isalpha in input.c on windows
Removed reliance in isalpha for detecting absolute paths on windows since
the heuristic is clear enough and the allowed drive letters are not locale
dependent.
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 25 Jan 2013 23:48:46 -0700 |
parents | 891bab942b5a |
children | 4051bc09da78 |
comparison
equal
deleted
inserted
replaced
251:0e4a9b21ad7b | 252:201b2774cb0e |
---|---|
91 // check for drive letter stuff | 91 // check for drive letter stuff |
92 if (!s[0] || !s[1]) | 92 if (!s[0] || !s[1]) |
93 return 0; | 93 return 0; |
94 if (s[1] != ':') | 94 if (s[1] != ':') |
95 return 0; | 95 return 0; |
96 if (isalpha(s[0])) | 96 if ((s[0] >= 'A' && s[0] <= 'Z') || (s[0] >= 'a' && s[0] <= 'A')) |
97 return 1; | 97 return 1; |
98 return 0; | 98 return 0; |
99 #else | 99 #else |
100 /* this is suitable for unix-like systems */ | 100 /* this is suitable for unix-like systems */ |
101 if (s[0] == '/') | 101 if (s[0] == '/') |