main () { while ( scanf ( "%d" , &n ) , n >= 0 ) { for ( i = 0; i < n; i ++ ) scanf ( "%d" , &data [i] ); first_opt (); } }
const char *first_sopt(unsigned *i) { const char *p; unsigned int len = 0 /* GCC bogus warning */; for (p = first_opt(i, &len); p; p = next_opt(p, i, &len)) { if (p[0] != '-') break; } return p; }
const char *first_lopt(unsigned *i, unsigned *len) { const char *p; for (p = first_opt(i, len); p; p = next_opt(p, i, len)) { if (p[0] == '-') { /* Skip leading "-" */ (*len)--; p++; break; } } return p; }