- Timestamp:
- Mar 28, 2007, 10:54:33 PM (18 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 7f33c18
- Parents:
- af9b92e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util.c
rd524c83 rc2c5c77 390 390 } 391 391 392 int owl_util_find_trans_short(short *in, int len) 393 { 394 int i; 395 for (i=1; i<len; i++) { 396 if (in[i] != in[0]) return(i-1); 397 } 398 return(i); 399 } 400 392 401 /* downcase the string 'foo' */ 393 402 void downstr(char *foo) … … 488 497 int owl_util_string_to_color(char *color) 489 498 { 499 int c; 490 500 if (!strcasecmp(color, "black")) { 491 501 return(OWL_COLOR_BLACK); … … 507 517 return(OWL_COLOR_DEFAULT); 508 518 } 519 c = atoi(color); 520 if (c >= -1 && c < COLORS) { 521 return(c); 522 } 509 523 return(-1); 510 524 }
Note: See TracChangeset
for help on using the changeset viewer.