Home
last modified time | relevance | path

Searched refs:opt_info (Results 1 – 25 of 93) sorted by relevance

1234

/titanic_41/usr/src/lib/libast/common/misc/
H A Doptjoin.c63 if (!opt_info.state) in optjoin()
69 opt_info.state->join = 0; in optjoin()
72 last_index = opt_info.index; in optjoin()
73 last_offset = opt_info.offset; in optjoin()
74 opt_info.state->join++; in optjoin()
76 more = argv[opt_info.index] != 0; in optjoin()
77 if (!opt_info.again) in optjoin()
81 opt_info.state->join = 0; in optjoin()
86 if (*argv[opt_info.index] != '+') in optjoin()
88 opt_info.state->join = 0; in optjoin()
[all …]
H A Doptget.c162 #define D(s) (opt_info.state->msgdict && dtmatch(opt_info.state->msgdict, (s)))
186 #define D(s) (opt_info.state->msgdict && dtmatch(opt_info.state->msgdict, (s)))
726 if (!opt_info.state->msgdict) in init()
732 opt_info.state->vp = sfstropen(); in init()
733 opt_info.state->xp = sfstropen(); in init()
734 opt_info.state->msgdisc.key = offsetof(Msg_t, text); in init()
735 opt_info.state->msgdisc.size = -1; in init()
736 opt_info.state->msgdisc.link = offsetof(Msg_t, link); in init()
737 if (opt_info.state->msgdict = dtopen(&opt_info.state->msgdisc, Dthash)) in init()
739 dtinsert(opt_info.state->msgdict, C_LC_MESSAGES_libast + n); in init()
[all …]
/titanic_41/usr/src/lib/libshell/common/bltins/
H A Dgetopts.c75 options = opt_info.arg; in b_getopts()
78 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_getopts()
81 errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); in b_getopts()
84 argv += opt_info.index; in b_getopts()
85 argc -= opt_info.index; in b_getopts()
102 opt_info.index = shp->st.optindex; in b_getopts()
103 opt_info.offset = shp->st.optchar; in b_getopts()
116 opt_info.disc = &disc.hdr; in b_getopts()
117 …switch(opt_info.index>=0 && opt_info.index<=argc?(opt_info.num= LONG_MIN,flag=optget(argv,options)… in b_getopts()
121 errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); in b_getopts()
[all …]
H A Dmisc.c71 logdata.arg0 = opt_info.arg; in b_exec()
78 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_exec()
81 errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); in b_exec()
84 argv += opt_info.index; in b_exec()
168 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_let()
171 errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); in b_let()
174 argv += opt_info.index; in b_let()
190 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_eval()
193 errormsg(SH_DICT,ERROR_usage(0), "%s",opt_info.arg); in b_eval()
198 argv += opt_info.index; in b_eval()
[all …]
H A Dshiocmd_solaris.c546 mode = strperm(arg = opt_info.arg, &opt_info.arg, mode); in b_open()
547 if (*opt_info.arg) in b_open()
551 errormsg(SH_DICT, 2, "%s", opt_info.arg); in b_open()
554 errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); in b_open()
557 argc -= opt_info.index; in b_open()
558 argv += opt_info.index; in b_open()
614 errormsg(SH_DICT, 2, "%s", opt_info.arg); in b_close()
617 errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); in b_close()
620 argc -= opt_info.index; in b_close()
621 argv += opt_info.index; in b_close()
[all …]
H A Dcflow.c55 if(!strmatch(argv[opt_info.index],"[+-]+([0-9])")) in b_return()
56 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_return()
59 errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); in b_return()
66 argv += opt_info.index; in b_return()
91 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_break()
94 errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); in b_break()
99 argv += opt_info.index; in b_break()
H A Dregress.c272 errormsg(SH_DICT, ERROR_usage(2), "%s", opt_info.arg); in b___regress__()
275 errormsg(SH_DICT, 2, "%s", opt_info.arg); in b___regress__()
283 if (opt_info.arg || opt_info.number) in b___regress__()
292 intercept_egid = intercept_sgid = (gid_t)opt_info.number; in b___regress__()
301 intercept_euid = intercept_suid = (uid_t)opt_info.number; in b___regress__()
310 intercept_p_suid = (uid_t)opt_info.number; in b___regress__()
322 intercept_etc = opt_info.arg; in b___regress__()
334 if (error_info.errors || *(argv + opt_info.index)) in b___regress__()
H A Dtypeset.c99 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_readonly()
102 errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); in b_readonly()
107 argv += (opt_info.index-1); in b_readonly()
147 opt_info.offset = 0; in b_alias()
148 opt_info.index = 1; in b_alias()
149 *opt_info.option = 0; in b_alias()
164 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_alias()
167 errormsg(SH_DICT,ERROR_usage(0), "%s", opt_info.arg); in b_alias()
172 argv += (opt_info.index-1); in b_alias()
218 opt_info.disc = (Optdisc_t*)ntp->optinfof; in b_typeset()
[all …]
H A Dwhence.c56 opt_info.index = opt_info.offset = 0; in b_command()
76 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_command()
81 errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); in b_command()
85 return(flags?0:opt_info.index); in b_command()
86 argv += opt_info.index; in b_command()
121 errormsg(SH_DICT,2, "%s", opt_info.arg); in b_whence()
124 errormsg(SH_DICT,ERROR_usage(2), "%s", opt_info.arg); in b_whence()
127 argv += opt_info.index; in b_whence()
/titanic_41/usr/src/lib/libpp/common/
H A Dppargs.c216 switch (*(s = opt_info.arg)) in ppargs()
327 if (!(s = opt_info.arg)) in ppargs()
336 if ((s = argv[opt_info.index]) && ((n = *s++) == '-' || n == '+') && *s++ == 'D') in ppargs()
341 p = argv[opt_info.index++]; in ppargs()
395 for (n = PP_deps; argv[opt_info.index]; opt_info.offset++) in ppargs()
397 switch (argv[opt_info.index][opt_info.offset]) in ppargs()
417 ppop(PP_UNDEF, opt_info.arg); in ppargs()
425 if (isalpha(opt_info.arg[0]) || opt_info.arg[0] == '_' || opt_info.arg[0] == '$') in ppargs()
426 ppop(PP_ASSERT, opt_info.arg); in ppargs()
440 …pp.arg_mode = (*(opt_info.arg + 1) || pp.arg_mode && pp.arg_mode != *opt_info.arg) ? '-' : *opt_in… in ppargs()
[all …]
/titanic_41/usr/src/lib/libcmd/common/
H A Dhead.c92 if (opt_info.offset && argv[opt_info.index][opt_info.offset] == 'c') in b_head()
95 opt_info.offset++; in b_head()
97 if ((keep = opt_info.number) <=0) in b_head()
98 …error(2, "%s: %I*d: positive numeric option argument expected", opt_info.name, sizeof(keep), keep); in b_head()
107 skip = opt_info.number; in b_head()
110 error(ERROR_usage(2), "%s", opt_info.arg); in b_head()
113 error(2, "%s", opt_info.arg); in b_head()
118 argv += opt_info.index; in b_head()
119 argc -= opt_info.index; in b_head()
H A Dmktemp.c92 mode = strperm(pfx = opt_info.arg, &opt_info.arg, S_IRWXU); in b_mktemp()
93 if (*opt_info.arg) in b_mktemp()
100 dir = opt_info.arg; in b_mktemp()
113 if (!pathtemp(NiL, 0, opt_info.arg, "/seed", NiL)) in b_mktemp()
114 error(2, "%s: regression test initializtion failed", opt_info.arg); in b_mktemp()
117 error(2, "%s", opt_info.arg); in b_mktemp()
120 error(ERROR_usage(2), "%s", opt_info.arg); in b_mktemp()
125 argv += opt_info.index; in b_mktemp()
H A Dreadlink.c62 canonicalize = opt_info.num; in b_readlink()
65 nonewline = opt_info.num; in b_readlink()
68 verbose = opt_info.num; in b_readlink()
71 error(ERROR_usage(2), "%s", opt_info.arg); in b_readlink()
74 error(2, "%s", opt_info.arg); in b_readlink()
79 argv += opt_info.index; in b_readlink()
80 argc -= opt_info.index; in b_readlink()
H A Dtail.c434 …(flags & FOLLOW) && argv[opt_info.index] && (argv[opt_info.index][0] == '-' || argv[opt_info.index… in b_tail()
436 number = argv[opt_info.index][0] == '-' ? 10 : -10; in b_tail()
438 opt_info.index++; in b_tail()
445 if (opt_info.option[0] == '+') in b_tail()
450 if (opt_info.arg == argv[opt_info.index - 1]) in b_tail()
452 strtol(opt_info.arg, &s, 10); in b_tail()
455 opt_info.index--; in b_tail()
460 else if (opt_info.arg && isalpha(*opt_info.arg)) in b_tail()
462 t = opt_info.arg; in b_tail()
468 if (s = opt_info.arg) in b_tail()
[all …]
H A Dmkfifo.c69 mode = strperm(arg = opt_info.arg, &opt_info.arg, mode); in b_mkfifo()
70 if (*opt_info.arg) in b_mkfifo()
74 error(2, "%s", opt_info.arg); in b_mkfifo()
77 error(ERROR_usage(2), "%s", opt_info.arg); in b_mkfifo()
82 argv += opt_info.index; in b_mkfifo()
H A Djoin.c850 if (opt_info.offset == 0) in b_join()
852 cp = argv[opt_info.index - 1]; in b_join()
860 if (opt_info.num!=1 && opt_info.num!=2) in b_join()
862 n = '0' + opt_info.num; in b_join()
863 if (!(cp = argv[opt_info.index])) in b_join()
868 opt_info.num = strtol(cp, &e, 10); in b_join()
874 opt_info.index++; in b_join()
878 jp->file[0].field = (int)(opt_info.num-1); in b_join()
884 if (opt_info.num <=0) in b_join()
886 jp->file[n-'1'].field = (int)(opt_info.num-1); in b_join()
[all …]
H A Dfold.c196 contsize = stresc(cont = strdup(opt_info.arg)); in b_fold()
199 if (n = *opt_info.arg) in b_fold()
208 if ((width = opt_info.num) <= 0) in b_fold()
209 error(2, "%d: width must be positive", opt_info.num); in b_fold()
212 error(2, "%s", opt_info.arg); in b_fold()
215 error(ERROR_usage(2), "%s", opt_info.arg); in b_fold()
220 argv += opt_info.index; in b_fold()
221 argc -= opt_info.index; in b_fold()
H A Dmkdir.c87 mode = strperm(arg = opt_info.arg, &opt_info.arg, mode); in b_mkdir()
88 if (*opt_info.arg) in b_mkdir()
98 error(2, "%s", opt_info.arg); in b_mkdir()
101 error(ERROR_usage(2), "%s", opt_info.arg); in b_mkdir()
106 argv += opt_info.index; in b_mkdir()
H A Duniq.c267 switch ((int)opt_info.num) in b_uniq()
288 if(*opt_info.option=='-') in b_uniq()
289 fields = opt_info.num; in b_uniq()
291 chars = opt_info.num; in b_uniq()
294 chars = opt_info.num; in b_uniq()
297 width = opt_info.num; in b_uniq()
300 error(2, "%s", opt_info.arg); in b_uniq()
303 error(ERROR_usage(2), "%s", opt_info.arg); in b_uniq()
306 argv += opt_info.index; in b_uniq()
H A Dcut.c602 cp = opt_info.arg; in b_cut()
609 ldelim.str = opt_info.arg; in b_cut()
612 s = opt_info.arg; in b_cut()
614 if ((n = s - opt_info.arg) > 1) in b_cut()
620 ldelim.chr = *(unsigned char*)opt_info.arg; in b_cut()
624 wdelim.str = opt_info.arg; in b_cut()
627 s = opt_info.arg; in b_cut()
629 if ((n = s - opt_info.arg) > 1) in b_cut()
635 wdelim.chr = *(unsigned char*)opt_info.arg; in b_cut()
644 cp = opt_info.arg; in b_cut()
[all …]
H A Dtee.c142 if ((line == 0) == (opt_info.num == 0)) in b_tee()
145 sfset(sfstdout, SF_LINE, !!opt_info.num); in b_tee()
148 error(2, "%s", opt_info.arg); in b_tee()
151 error(ERROR_usage(2), "%s", opt_info.arg); in b_tee()
158 argv += opt_info.index; in b_tee()
159 argc -= opt_info.index; in b_tee()
H A Ddate.c308 filetime = opt_info.option[1]; in b_date()
311 string = opt_info.arg; in b_date()
321 format = opt_info.arg; in b_date()
339 f->format = opt_info.arg; in b_date()
349 unelapsed = (int)opt_info.num; in b_date()
355 error(ERROR_USAGE|4, "%s", opt_info.arg); in b_date()
358 error(2, "%s", opt_info.arg); in b_date()
363 argv += opt_info.index; in b_date()
/titanic_41/usr/src/lib/libast/common/comp/
H A Dgetopt.c52 opt_info.index = (optind > 1 || optind == lastoptind) ? optind : 0;
53 if (opt_info.index >= argc)
65 errormsg(NiL, 2, opt_info.arg);
67 optopt = opt_info.option[1];
73 optarg = opt_info.arg;
74 lastoptind = optind = opt_info.index;
H A Dgetoptl.c104 opt_info.index = (optind > 1 || optind == lastoptind) ? optind : 0; in golly()
105 if (opt_info.index >= argc || !(c = optget((char**)argv, usage))) in golly()
119 errormsg(NiL, c == '?' ? (ERROR_USAGE|4) : 2, "%s", opt_info.arg); in golly()
121 optopt = opt_info.option[1]; in golly()
124 optarg = opt_info.arg; in golly()
137 lastoptind = optind = opt_info.index; in golly()
/titanic_41/usr/src/lib/libshell/common/sh/
H A Dargs.c154 opt_info.disc = &disc; in sh_argopts()
163 f=*opt_info.option=='-' && (opt_info.num || opt_info.arg); in sh_argopts()
167 np = nv_open(opt_info.arg,ap->sh->var_tree,NV_NOASSIGN|NV_ARRAY|NV_VARNAME); in sh_argopts()
174 errormsg(SH_DICT,ERROR_exit(1), e_option, opt_info.name); in sh_argopts()
178 if(!opt_info.arg||!*opt_info.arg||*opt_info.arg=='-') in sh_argopts()
187 ((opt_info.arg&&(!*opt_info.arg||*opt_info.arg=='-'))?(PRINT_TABLE|PRINT_NO_HEADER):0); in sh_argopts()
190 o = sh_lookopt(opt_info.arg,&f); in sh_argopts()
197 errormsg(SH_DICT,2, e_option, opt_info.arg); in sh_argopts()
202 errormsg(SH_DICT,ERROR_exit(1), e_restricted, opt_info.arg); in sh_argopts()
206 ap->sh->rcfile = opt_info.arg; in sh_argopts()
[all …]

1234