| 247 | /* NOTE! DBUG not initialised - no debugging here! */ |
| 248 | |
| 249 | static int get_options(int argc, char **argv) |
| 250 | { |
| 251 | char *pos,*progname; |
| 252 | |
| 253 | progname= argv[0]; |
| 254 | |
| 255 | while (--argc >0 && *(pos = *(++argv)) == '-' ) { |
| 256 | switch(*++pos) { |
| 257 | case 'm': /* records */ |
| 258 | recant=atoi(++pos); |
| 259 | break; |
| 260 | case 't': |
| 261 | testflag=atoi(++pos); /* testmod */ |
| 262 | break; |
| 263 | case 'V': |
| 264 | case 'I': |
| 265 | case '?': |
| 266 | printf("%s Ver 1.0 for %s at %s\n",progname,SYSTEM_TYPE,MACHINE_TYPE); |
| 267 | printf("MySQL AB, by Monty\n\n"); |
| 268 | printf("Usage: %s [-?ABIKLWv] [-m#] [-t#]\n",progname); |
| 269 | exit(0); |
| 270 | case '#': |
| 271 | DBUG_PUSH (++pos); |
| 272 | break; |
| 273 | } |
| 274 | } |
| 275 | return 0; |
| 276 | } /* get_options */ |
| 277 | |
| 278 | |
| 279 | /* Get a random number in the interval 0 <= x <= n */ |