History

Use the avstring.h locale-independent character type functions

Make sure the behavior does not change with the locale.

Reimar Döffinger committed 13 years ago

Commit efa7f421 parent 12c5c1d23 files · +47 −52Browse files

Showing the changes to avserver.c (1 of 23 files). Show all

Unified · Split

avserver.c+10−10
@@ -1113,7 +1113,7 @@ static int extract_rates(char *rates, int ratelen, const char *request) · 1112 unmodified lines
11131113 if (av_strncasecmp(p, "Pragma:", 7) == 0) {
11141114 const char *q = p + 7;
11151115
1116− while (*q && *q != '\n' && isspace(*q))
1116+ while (*q && *q != '\n' && av_isspace(*q))
11171117 q++;
11181118
11191119 if (av_strncasecmp(q, "stream-switch-entry=", 20) == 0) {
@@ -1135,7 +1135,7 @@ static int extract_rates(char *rates, int ratelen, const char *request) · 15 unmodified lines
11351135 if (stream_no < ratelen && stream_no >= 0)
11361136 rates[stream_no] = rate_no;
11371137
1138− while (*q && *q != '\n' && !isspace(*q))
1138+ while (*q && *q != '\n' && !av_isspace(*q))
11391139 q++;
11401140 }
11411141
@@ -1246,7 +1246,7 @@ static void get_word(char *buf, int buf_size, const char **pp) · 104 unmodified lines
12461246 p = *pp;
12471247 skip_spaces(&p);
12481248 q = buf;
1249− while (!isspace(*p) && *p != '\0') {
1249+ while (!av_isspace(*p) && *p != '\0') {
12501250 if ((q - buf) < buf_size - 1)
12511251 *q++ = *p;
12521252 p++;
@@ -1263,7 +1263,7 @@ static void get_arg(char *buf, int buf_size, const char **pp) · 10 unmodified lines
12631263 int quote;
12641264
12651265 p = *pp;
1266− while (isspace(*p)) p++;
1266+ while (av_isspace(*p)) p++;
12671267 q = buf;
12681268 quote = 0;
12691269 if (*p == '\"' || *p == '\'')
@@ -1273,7 +1273,7 @@ static void get_arg(char *buf, int buf_size, const char **pp) · 3 unmodified lines
12731273 if (*p == quote)
12741274 break;
12751275 } else {
1276− if (isspace(*p))
1276+ if (av_isspace(*p))
12771277 break;
12781278 }
12791279 if (*p == '\0')
@@ -1377,7 +1377,7 @@ static IPAddressACL* parse_dynamic_acl(FFStream *stream, HTTPContext *c) · 97 unmodified lines
13771377 break;
13781378 line_num++;
13791379 p = line;
1380− while (isspace(*p))
1380+ while (av_isspace(*p))
13811381 p++;
13821382 if (*p == '\0' || *p == '#')
13831383 continue;
@@ -1528,7 +1528,7 @@ static int http_parse_request(HTTPContext *c) · 144 unmodified lines
15281528 for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
15291529 if (av_strncasecmp(p, "User-Agent:", 11) == 0) {
15301530 useragent = p + 11;
1531− if (*useragent && *useragent != '\n' && isspace(*useragent))
1531+ if (*useragent && *useragent != '\n' && av_isspace(*useragent))
15321532 useragent++;
15331533 break;
15341534 }
@@ -1654,7 +1654,7 @@ static int http_parse_request(HTTPContext *c) · 119 unmodified lines
16541654 char *eoh;
16551655 char hostbuf[260];
16561656
1657− while (isspace(*hostinfo))
1657+ while (av_isspace(*hostinfo))
16581658 hostinfo++;
16591659
16601660 eoh = strchr(hostinfo, '\n');
@@ -4060,7 +4060,7 @@ static int parse_ffconfig(const char *filename) · 2399 unmodified lines
40604060 break;
40614061 line_num++;
40624062 p = line;
4063− while (isspace(*p))
4063+ while (av_isspace(*p))
40644064 p++;
40654065 if (*p == '\0' || *p == '#')
40664066 continue;
@@ -4198,7 +4198,7 @@ static int parse_ffconfig(const char *filename) · 131 unmodified lines
41984198 get_arg(arg, sizeof(arg), &p);
41994199 p1 = arg;
42004200 fsize = strtod(p1, &p1);
4201− switch(toupper(*p1)) {
4201+ switch(av_toupper(*p1)) {
42024202 case 'K':
42034203 fsize *= 1024;
42044204 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t