comparison lib/protocols.c @ 922:c127065adc06

2007-5-4 Brian Masney <masneyb@gftp.org> * lib/protocols.c (_gftp_get_next_charset) - fixed problem when multiple character sets are specified in the remote_charsets variable. (from Shixin Zeng) (partially closes #156371)
author masneyb
date Fri, 04 May 2007 11:25:10 +0000
parents b099517df21a
children 70b7e6663a05
comparison
equal deleted inserted replaced
921:b099517df21a 922:c127065adc06
431 return (NULL); 431 return (NULL);
432 432
433 for (; **curpos == ' ' || **curpos == '\t'; (*curpos)++); 433 for (; **curpos == ' ' || **curpos == '\t'; (*curpos)++);
434 434
435 if ((endpos = strchr (*curpos, ',')) == NULL) 435 if ((endpos = strchr (*curpos, ',')) == NULL)
436 len = strlen (*curpos); 436 len = strlen (*curpos) - 1; /* the trailing ',' should be omitted */
437 else 437 else
438 len = endpos - *curpos + 1; 438 len = endpos - *curpos;
439 439
440 for (retlen = len - 1; 440 for (retlen = len - 1;
441 (*curpos)[retlen - 1] == ' ' || (*curpos)[retlen - 1] == '\t'; 441 (*curpos)[retlen - 1] == ' ' || (*curpos)[retlen - 1] == '\t';
442 retlen--); 442 retlen--);
443 443