unsigned optind(); int foo(char *argv[], int *p) { argv += optind(); if (!*argv) { p = 0; } if (*argv) { return *p; } return 0; }