- Timestamp:
- Aug 22, 2007, 9:55:05 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/yulectl.c
r98 r117 334 334 } 335 335 336 char * rtrim(char * str) 337 { 338 size_t len; 339 340 if (!str) 341 return str; 342 343 len = strlen(str); 344 while (len > 0) 345 { 346 --len; 347 if (str[len] == '\n' || str[len] == '\r') 348 str[len] = '\0'; 349 else 350 break; 351 } 352 353 return str; 354 } 355 336 356 void fixup_message (char * message) 337 357 { … … 399 419 exit(EXIT_FAILURE); 400 420 } 421 422 (void) rtrim(message2); 423 401 424 if (strlen(message2) > 14) 402 425 { … … 406 429 } 407 430 408 if ( (0 != strlen(message2)) && ('\n' == message2[strlen(message2)-1]))409 {410 message2[strlen(message2)-1] = '\0';411 }412 431 strcpy(password, message2); 413 432 fclose(fp); 433 414 434 do_msg: 415 435 strcat(message2, "@");
Note:
See TracChangeset
for help on using the changeset viewer.