Changeset 6b13103
- Timestamp:
- 2015-01-16T19:50:23Z (10 years ago)
- Branches:
- master
- Children:
- 1065dd4, eabe6d4
- Parents:
- 6f10697
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
dcc.c
r6f10697 r6b13103 523 523 524 524 host = ctcp[3]; 525 while( *host && isdigit( *host ) ) host++; /* Just digits? */525 while( *host && g_ascii_isdigit( *host ) ) host++; /* Just digits? */ 526 526 if( *host == '\0' ) 527 527 { -
irc_channel.c
r6f10697 r6b13103 575 575 576 576 /* Scan for non-whitespace chars followed by a colon: */ 577 for( s = msg; *s && ! isspace( *s ) && *s != ':' && *s != ','; s ++ ) {}577 for( s = msg; *s && !g_ascii_isspace( *s ) && *s != ':' && *s != ','; s ++ ) {} 578 578 579 579 if( *s == ':' || *s == ',' ) … … 583 583 memset( to, 0, sizeof( to ) ); 584 584 strncpy( to, msg, s - msg ); 585 while( *(++s) && isspace( *s ) ) {}585 while( *(++s) && g_ascii_isspace( *s ) ) {} 586 586 msg = s; 587 587 -
irc_im.c
r6f10697 r6b13103 73 73 { 74 74 char *s; 75 for( s = bu->ic->acc->tag; isalnum( *s ); s ++ );75 for( s = bu->ic->acc->tag; g_ascii_isalnum( *s ); s ++ ); 76 76 /* Only use the tag if we got to the end of the string. 77 77 (So allow alphanumerics only. Hopefully not too … … 316 316 TODO(wilmer): Do the same with away msgs again! */ 317 317 for( s = iu->fullname; *s; s ++ ) 318 if( isspace( *s ) ) *s = ' ';318 if( g_ascii_isspace( *s ) ) *s = ' '; 319 319 320 320 if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) ) -
irc_util.c
r6f10697 r6b13103 42 42 43 43 /* \d+ */ 44 if( ! isdigit( *s ) )44 if( !g_ascii_isdigit( *s ) ) 45 45 return SET_INVALID; 46 while( *s && isdigit( *s ) ) s ++;46 while( *s && g_ascii_isdigit( *s ) ) s ++; 47 47 48 48 /* EOS? */ … … 56 56 57 57 /* \d+ */ 58 if( ! isdigit( *s ) )58 if( !g_ascii_isdigit( *s ) ) 59 59 return SET_INVALID; 60 while( *s && isdigit( *s ) ) s ++;60 while( *s && g_ascii_isdigit( *s ) ) s ++; 61 61 62 62 /* EOS */ -
lib/http_client.c
r6f10697 r6b13103 345 345 /* Might be a \r\n from the last chunk. */ 346 346 s = chunk; 347 while( isspace( *s ) )347 while( g_ascii_isspace( *s ) ) 348 348 s ++; 349 349 /* Chunk length. Might be incomplete. */ 350 350 if( s < eos && sscanf( s, "%x", &clen ) != 1 ) 351 351 return CR_ERROR; 352 while( isxdigit( *s ) )352 while( g_ascii_isxdigit( *s ) ) 353 353 s ++; 354 354 -
lib/ini.c
r6f10697 r6b13103 63 63 char *e; 64 64 65 while( isspace( *in ) )65 while( g_ascii_isspace( *in ) ) 66 66 in++; 67 67 68 68 e = in + strlen( in ) - 1; 69 while( e > in && isspace( *e ) )69 while( e > in && g_ascii_isspace( *e ) ) 70 70 e--; 71 71 e[1] = 0; -
lib/json.c
r6f10697 r6b13103 53 53 static unsigned char hex_value (json_char c) 54 54 { 55 if ( isdigit(c))55 if (g_ascii_isdigit(c)) 56 56 return c - '0'; 57 57 … … 609 609 default: 610 610 611 if ( isdigit (b) || b == '-')611 if (g_ascii_isdigit (b) || b == '-') 612 612 { 613 613 if (!new_value (&state, &top, &root, &alloc, json_integer)) … … 616 616 if (!state.first_pass) 617 617 { 618 while ( isdigit (b) || b == '+' || b == '-'618 while (g_ascii_isdigit (b) || b == '+' || b == '-' 619 619 || b == 'e' || b == 'E' || b == '.') 620 620 { … … 706 706 case json_double: 707 707 708 if ( isdigit (b))708 if (g_ascii_isdigit (b)) 709 709 { 710 710 ++ num_digits; -
lib/misc.c
r6f10697 r6b13103 163 163 while( *in ) 164 164 { 165 if( *in == '<' && ( isalpha( *(in+1) ) || *(in+1) == '/' ) )165 if( *in == '<' && ( g_ascii_isalpha( *(in+1) ) || *(in+1) == '/' ) ) 166 166 { 167 167 /* If in points at a < and in+1 points at a letter or a slash, this is probably … … 198 198 { 199 199 cs = ++in; 200 while( *in && isalpha( *in ) )200 while( *in && g_ascii_isalpha( *in ) ) 201 201 in ++; 202 202 … … 314 314 for( i = j = 0; t[i]; i ++, j ++ ) 315 315 { 316 /* Warning: isalnum() is locale-aware, so don't use it here! */316 /* Warning: g_ascii_isalnum() is locale-aware, so don't use it here! */ 317 317 if( ( t[i] >= 'A' && t[i] <= 'Z' ) || 318 318 ( t[i] >= 'a' && t[i] <= 'z' ) || … … 490 490 491 491 while( *value ) 492 if( ! isdigit( *value ) )492 if( !g_ascii_isdigit( *value ) ) 493 493 return 0; 494 494 else -
lib/ssl_gnutls.c
r6f10697 r6b13103 318 318 gnutls_set_default_priority( conn->session ); 319 319 gnutls_credentials_set( conn->session, GNUTLS_CRD_CERTIFICATE, xcred ); 320 if( conn->hostname && ! isdigit( conn->hostname[0] ) )320 if( conn->hostname && !g_ascii_isdigit( conn->hostname[0] ) ) 321 321 gnutls_server_name_set( conn->session, GNUTLS_NAME_DNS, 322 322 conn->hostname, strlen( conn->hostname ) ); -
lib/ssl_openssl.c
r6f10697 r6b13103 159 159 SSL_set_fd( conn->ssl, conn->fd ); 160 160 161 if( conn->hostname && ! isdigit( conn->hostname[0] ) )161 if( conn->hostname && !g_ascii_isdigit( conn->hostname[0] ) ) 162 162 SSL_set_tlsext_host_name( conn->ssl, conn->hostname ); 163 163 -
nick.c
r6f10697 r6b13103 41 41 do { 42 42 if (*orig != ' ') 43 new[i++] = tolower( *orig );43 new[i++] = g_ascii_tolower( *orig ); 44 44 } 45 45 while (*(orig++)); … … 144 144 fmt += 2; 145 145 } 146 else if( isdigit( *fmt ) )146 else if( g_ascii_isdigit( *fmt ) ) 147 147 { 148 148 len = 0; 149 149 /* Grab a number. */ 150 while( isdigit( *fmt ) )150 while( g_ascii_isdigit( *fmt ) ) 151 151 len = len * 10 + ( *(fmt++) - '0' ); 152 152 } … … 331 331 } 332 332 } 333 if( isdigit( nick[0] ) )333 if( g_ascii_isdigit( nick[0] ) ) 334 334 { 335 335 char *orig; … … 351 351 352 352 /* Empty/long nicks are not allowed, nor numbers at [0] */ 353 if( !*nick || isdigit( nick[0] ) || strlen( nick ) > MAX_NICK_LENGTH )353 if( !*nick || g_ascii_isdigit( nick[0] ) || strlen( nick ) > MAX_NICK_LENGTH ) 354 354 return 0; 355 355 -
otr.c
r6f10697 r6b13103 1470 1470 int hexval(char a) 1471 1471 { 1472 int x= tolower(a);1472 int x=g_ascii_tolower(a); 1473 1473 1474 1474 if(x>='a' && x<='f') … … 1557 1557 for(i=0; args[i]; i++) { 1558 1558 for(j=0; args[i][j]; j++) { 1559 char c = toupper(args[i][j]);1559 char c = g_ascii_toupper(args[i][j]); 1560 1560 1561 1561 if(n>=40) { … … 1621 1621 for(i=0; args[i]; i++) { 1622 1622 for(j=0; args[i][j]; j++) { 1623 char c = toupper(args[i][j]);1623 char c = g_ascii_toupper(args[i][j]); 1624 1624 1625 1625 if(n>=40) { -
protocols/account.c
r6f10697 r6b13103 81 81 if( strcmp( prpl->name, "oscar" ) == 0 ) 82 82 { 83 if( isdigit( a->user[0] ) )83 if( g_ascii_isdigit( a->user[0] ) ) 84 84 strcpy( tag, "icq" ); 85 85 else … … 417 417 418 418 /* Format: /[0-9]+([*+][0-9]+(<[0-9+])?)?/ */ 419 while( *value && isdigit( *value ) )419 while( *value && g_ascii_isdigit( *value ) ) 420 420 p->start = p->start * 10 + *value++ - '0'; 421 421 … … 433 433 434 434 /* + or * the delay by this number every time. */ 435 while( *value && isdigit( *value ) )435 while( *value && g_ascii_isdigit( *value ) ) 436 436 p->step = p->step * 10 + *value++ - '0'; 437 437 … … 444 444 p->max = 0; 445 445 value ++; 446 while( *value && isdigit( *value ) )446 while( *value && g_ascii_isdigit( *value ) ) 447 447 p->max = p->max * 10 + *value++ - '0'; 448 448 -
protocols/jabber/jabber_util.c
r6f10697 r6b13103 321 321 return FALSE; 322 322 } 323 if( tolower( jid1[i] ) !=tolower( jid2[i] ) )323 if( g_ascii_tolower( jid1[i] ) != g_ascii_tolower( jid2[i] ) ) 324 324 { 325 325 return FALSE; … … 342 342 it's Unicode but feck Unicode. :-P So stop once we see a slash. */ 343 343 for( i = 0; i < len && orig[i] != '/' ; i ++ ) 344 new[i] = tolower( orig[i] );344 new[i] = g_ascii_tolower( orig[i] ); 345 345 for( ; orig[i]; i ++ ) 346 346 new[i] = orig[i]; -
protocols/jabber/sasl.c
r6f10697 r6b13103 187 187 len = strlen( field ); 188 188 189 while( isspace( *data ) || *data == ',' )189 while( g_ascii_isspace( *data ) || *data == ',' ) 190 190 data ++; 191 191 … … 210 210 if( data[i] == ',' ) 211 211 { 212 while( isspace( data[i] ) || data[i] == ',' )212 while( g_ascii_isspace( data[i] ) || data[i] == ',' ) 213 213 i ++; 214 214 -
protocols/msn/msn.c
r6f10697 r6b13103 377 377 g_tree_insert( md->domaintree, bu->handle, bu ); 378 378 379 for( handle = bu->handle; isdigit( *handle ); handle ++ );379 for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ ); 380 380 if( *handle == ':' ) 381 381 { -
protocols/msn/ns.c
r6f10697 r6b13103 581 581 ic->flags |= OPT_PONGED; 582 582 } 583 else if( isdigit( cmd[0][0] ) )583 else if( g_ascii_isdigit( cmd[0][0] ) ) 584 584 { 585 585 int num = atoi( cmd[0] ); … … 997 997 /* This might be a federated contact. Get its network number, 998 998 prefixed to bu->handle with a colon. Default is 1. */ 999 for( handle = bu->handle; isdigit( *handle ); handle ++ )999 for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ ) 1000 1000 type = type * 10 + *handle - '0'; 1001 1001 if( *handle == ':' ) -
protocols/msn/sb.c
r6f10697 r6b13103 506 506 else if( strcmp( cmd[0], "CAL" ) == 0 ) 507 507 { 508 if( num_parts < 4 || ! isdigit( cmd[3][0] ) )508 if( num_parts < 4 || !g_ascii_isdigit( cmd[3][0] ) ) 509 509 { 510 510 msn_sb_destroy( sb ); … … 645 645 } 646 646 } 647 else if( isdigit( cmd[0][0] ) )647 else if( g_ascii_isdigit( cmd[0][0] ) ) 648 648 { 649 649 int num = atoi( cmd[0] ); -
protocols/oscar/auth.c
r6f10697 r6b13103 125 125 return -EINVAL; 126 126 127 if ( isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth"))127 if (g_ascii_isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth")) 128 128 return goddamnicq(sess, conn, sn); 129 129 -
protocols/oscar/oscar.c
r6f10697 r6b13103 368 368 { 369 369 set_t *s; 370 gboolean icq = isdigit(acc->user[0]);370 gboolean icq = g_ascii_isdigit(acc->user[0]); 371 371 372 372 if (icq) { … … 394 394 struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1); 395 395 396 if ( isdigit(acc->user[0]))396 if (g_ascii_isdigit(acc->user[0])) 397 397 odata->icq = TRUE; 398 398 else … … 2500 2500 char * chatname, *s; 2501 2501 2502 chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",2502 chatname = g_strdup_printf("%s%s%d", g_ascii_isdigit(*ic->acc->user) ? "icq" : "", 2503 2503 ic->acc->user, chat_id++); 2504 2504 2505 2505 for (s = chatname; *s; s ++) 2506 if (! isalnum(*s))2506 if (!g_ascii_isalnum(*s)) 2507 2507 *s = '0'; 2508 2508 -
protocols/oscar/oscar_util.c
r6f10697 r6b13103 57 57 curPtr2++; 58 58 } else { 59 if ( toupper(*curPtr1) !=toupper(*curPtr2))59 if ( g_ascii_toupper(*curPtr1) != g_ascii_toupper(*curPtr2)) 60 60 return 1; 61 61 curPtr1++; -
protocols/purple/purple.c
r6f10697 r6b13103 61 61 while( *a == '_' ) a ++; 62 62 while( *b == '_' ) b ++; 63 if( tolower( *a ) !=tolower( *b ) )63 if( g_ascii_tolower( *a ) != g_ascii_tolower( *b ) ) 64 64 return FALSE; 65 65 … … 1148 1148 { 1149 1149 n = strlen( value ) - 1; 1150 while( isspace( value[n] ) )1150 while( g_ascii_isspace( value[n] ) ) 1151 1151 n --; 1152 1152 g_string_append_len( info, value, n + 1 ); -
protocols/skype/skype.c
r6f10697 r6b13103 514 514 char *iptr = sd->info_sex; 515 515 while (*iptr++) 516 *iptr = tolower(*iptr);516 *iptr = g_ascii_tolower(*iptr); 517 517 g_string_append_printf(st, 518 518 "Gender: %s\n", sd->info_sex); -
protocols/twitter/twitter.c
r6f10697 r6b13103 459 459 460 460 strcpy(pin, message); 461 for (s = pin + sizeof(pin) - 2; s > pin && isspace(*s); s--)461 for (s = pin + sizeof(pin) - 2; s > pin && g_ascii_isspace(*s); s--) 462 462 *s = '\0'; 463 for (s = pin; *s && isspace(*s); s++) {463 for (s = pin; *s && g_ascii_isspace(*s); s++) { 464 464 } 465 465 -
protocols/yahoo/yahoo_httplib.c
r6f10697 r6b13103 152 152 static int isurlchar(unsigned char c) 153 153 { 154 return ( isalnum(c));154 return (g_ascii_isalnum(c)); 155 155 } 156 156 -
set.c
r6f10697 r6b13103 226 226 227 227 for( ; *s; s ++ ) 228 if( ! isdigit( *s ) )228 if( !g_ascii_isdigit( *s ) ) 229 229 return SET_INVALID; 230 230
Note: See TracChangeset
for help on using the changeset viewer.