(argc,argv,from_array,to_array)
| 217 | |
| 218 | |
| 219 | static int get_replace_strings(argc,argv,from_array,to_array) |
| 220 | register int *argc; |
| 221 | register char **argv[]; |
| 222 | POINTER_ARRAY *from_array,*to_array; |
| 223 | { |
| 224 | char *pos; |
| 225 | |
| 226 | memset(from_array, 0, sizeof(from_array[0])); |
| 227 | memset(to_array, 0, sizeof(to_array[0])); |
| 228 | while (*argc > 0 && (*(pos = *(*argv)) != '-' || pos[1] != '-' || pos[2])) |
| 229 | { |
| 230 | insert_pointer_name(from_array,pos); |
| 231 | (*argc)--; |
| 232 | (*argv)++; |
| 233 | if (!*argc || !strcmp(**argv,"--")) |
| 234 | { |
| 235 | my_message(0,"No to-string for last from-string",MYF(ME_BELL)); |
| 236 | return 1; |
| 237 | } |
| 238 | insert_pointer_name(to_array,**argv); |
| 239 | (*argc)--; |
| 240 | (*argv)++; |
| 241 | } |
| 242 | if (*argc) |
| 243 | { /* Skip "--" argument */ |
| 244 | (*argc)--; |
| 245 | (*argv)++; |
| 246 | } |
| 247 | return 0; |
| 248 | } |
| 249 | |
| 250 | static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name) |
| 251 | { |
no test coverage detected