Branch: Tag:

2000-07-23

2000-07-23 21:47:30 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix for Process.split_quoted_string

Rev: lib/modules/Process.pmod:1.25

34:      array(string) split_quoted_string(string s)   { +  sscanf(s,"%*[ \n\t]%s",s);    s=replace(s,    ({"\"", "'", "\\", " ", "\t", "\n"}),    ({"\0\"","\0'","\0\\","\0 ","\0\t","\0\n"}));
56:       case '\'':    ret[-1]+=x[e][1..]; -  while(x[++e][0]!='\'') ret[-1]+=x[e]; +  while(x[++e][0]!='\'') ret[-1]+=x[e][1..];    ret[-1]+=x[e][1..];    break;   
72:    case ' ':    case '\t':    case '\n': -  while(strlen(x[e])==1 && (<' ','\t','\n'>) [x[e][0]] ) +  while(strlen(x[e])==1 && e+1 < sizeof(x) && +  (<' ','\t','\n'>) [x[e+1][0]])    if(++e >= sizeof(x))    return ret;    ret+=({x[e][1..]});