48:f66f0f27beae | 49:755bdb97a607 |
---|---|
13 { | 13 { |
14 int i; | 14 int i; |
15 | 15 |
16 for(i=0; map[i].string!=NULL; i++){ | 16 for(i=0; map[i].string!=NULL; i++){ |
17 if(strcmp(str, map[i].string)==0) | 17 if(strcmp(str, map[i].string)==0) |
18 return i; | 18 return map[i].value; |
19 } | 19 } |
20 | 20 |
21 return -1; | 21 return -1; |
22 } | 22 } |
23 | 23 |