• Home
  • Raw
  • Download

Lines Matching refs:go

396 	Getopt go;  in parse_args()  local
402 ksh_getopt_reset(&go, GF_ERROR|GF_PLUSOPT); in parse_args()
403 while ((optc = ksh_getopt(argv, &go, opts)) != -1) { in parse_args()
404 set = tobool(!(go.info & GI_PLUS)); in parse_args()
410 array = go.optarg; in parse_args()
416 if (go.optarg == NULL) { in parse_args()
435 i = option(go.optarg); in parse_args()
457 else if (!strcmp(go.optarg, To_reset)) { in parse_args()
474 bi_errorf(Tf_sD_s, go.optarg, in parse_args()
488 chvt(&go); in parse_args()
514 if (!(go.info & GI_MINUSMINUS) && argv[go.optind] && in parse_args()
515 ctype(argv[go.optind][0], C_MINUS | C_PLUS) && in parse_args()
516 argv[go.optind][1] == '\0') { in parse_args()
518 if (argv[go.optind][0] == '-') { in parse_args()
523 go.optind++; in parse_args()
527 *setargsp = !arrayset && ((go.info & GI_MINUSMINUS) || in parse_args()
528 argv[go.optind]); in parse_args()
541 for (i = go.optind; argv[i]; i++) in parse_args()
543 qsort(&argv[go.optind], i - go.optind, sizeof(void *), in parse_args()
547 go.optind += set_array(array, tobool(arrayset > 0), in parse_args()
548 argv + go.optind); in parse_args()
550 return (go.optind); in parse_args()
1253 ksh_getopt_reset(Getopt *go, int flags) in ksh_getopt_reset() argument
1255 go->optind = 1; in ksh_getopt_reset()
1256 go->optarg = NULL; in ksh_getopt_reset()
1257 go->p = 0; in ksh_getopt_reset()
1258 go->flags = flags; in ksh_getopt_reset()
1259 go->info = 0; in ksh_getopt_reset()
1260 go->buf[1] = '\0'; in ksh_getopt_reset()
1290 ksh_getopt(const char **argv, Getopt *go, const char *optionsp) in ksh_getopt() argument
1295 if (go->p == 0 || (c = argv[go->optind - 1][go->p]) == '\0') { in ksh_getopt()
1296 const char *arg = argv[go->optind], flag = arg ? *arg : '\0'; in ksh_getopt()
1298 go->p = 1; in ksh_getopt()
1300 go->optind++; in ksh_getopt()
1301 go->p = 0; in ksh_getopt()
1302 go->info |= GI_MINUSMINUS; in ksh_getopt()
1308 (!(go->flags & GF_PLUSOPT) || flag != '+')) || in ksh_getopt()
1310 go->p = 0; in ksh_getopt()
1313 go->optind++; in ksh_getopt()
1314 go->info &= ~(GI_MINUS|GI_PLUS); in ksh_getopt()
1315 go->info |= flag == '-' ? GI_MINUS : GI_PLUS; in ksh_getopt()
1317 go->p++; in ksh_getopt()
1321 go->buf[0] = c; in ksh_getopt()
1322 go->optarg = go->buf; in ksh_getopt()
1325 (go->flags & GF_NONAME) ? "" : argv[0], in ksh_getopt()
1326 (go->flags & GF_NONAME) ? "" : Tcolsp, in ksh_getopt()
1328 if (go->flags & GF_ERROR) in ksh_getopt()
1340 if (argv[go->optind - 1][go->p]) in ksh_getopt()
1341 go->optarg = argv[go->optind - 1] + go->p; in ksh_getopt()
1342 else if (argv[go->optind]) in ksh_getopt()
1343 go->optarg = argv[go->optind++]; in ksh_getopt()
1345 go->optarg = NULL; in ksh_getopt()
1348 go->buf[0] = c; in ksh_getopt()
1349 go->optarg = go->buf; in ksh_getopt()
1353 (go->flags & GF_NONAME) ? "" : argv[0], in ksh_getopt()
1354 (go->flags & GF_NONAME) ? "" : Tcolsp, in ksh_getopt()
1356 if (go->flags & GF_ERROR) in ksh_getopt()
1360 go->p = 0; in ksh_getopt()
1363 go->optarg = argv[go->optind - 1] + go->p; in ksh_getopt()
1364 go->p = 0; in ksh_getopt()
1371 if (argv[go->optind - 1][go->p]) { in ksh_getopt()
1372 if (ctype(argv[go->optind - 1][go->p], C_DIGIT)) { in ksh_getopt()
1373 go->optarg = argv[go->optind - 1] + go->p; in ksh_getopt()
1374 go->p = 0; in ksh_getopt()
1376 go->optarg = NULL; in ksh_getopt()
1378 if (argv[go->optind] && in ksh_getopt()
1379 ctype(argv[go->optind][0], C_DIGIT)) { in ksh_getopt()
1380 go->optarg = argv[go->optind++]; in ksh_getopt()
1381 go->p = 0; in ksh_getopt()
1383 go->optarg = NULL; in ksh_getopt()
2349 chvt(const Getopt *go) in chvt() argument
2351 const char *dv = go->optarg; in chvt()
2373 "can't find tty", go->optarg); in chvt()
2395 if (go->optarg[0] != '!') { in chvt()
2407 if (go->optarg[0] != '-') { in chvt()
2418 rndset((unsigned long)chvt_rndsetup(go, sizeof(Getopt))); in chvt()