Lines Matching defs:psexp
35 #include "psexp.h"
38 psexp_create(psexp_t *psexp)
40 idtab_create(&psexp->ps_euids);
41 idtab_create(&psexp->ps_ruids);
42 idtab_create(&psexp->ps_rgids);
43 idtab_create(&psexp->ps_ppids);
44 idtab_create(&psexp->ps_pgids);
45 idtab_create(&psexp->ps_sids);
46 idtab_create(&psexp->ps_ttys);
47 idtab_create(&psexp->ps_projids);
48 idtab_create(&psexp->ps_taskids);
49 idtab_create(&psexp->ps_zoneids);
50 idtab_create(&psexp->ps_ctids);
52 psexp->ps_pat = NULL;
56 psexp_destroy(psexp_t *psexp)
58 idtab_destroy(&psexp->ps_euids);
59 idtab_destroy(&psexp->ps_ruids);
60 idtab_destroy(&psexp->ps_rgids);
61 idtab_destroy(&psexp->ps_ppids);
62 idtab_destroy(&psexp->ps_pgids);
63 idtab_destroy(&psexp->ps_sids);
64 idtab_destroy(&psexp->ps_ttys);
65 idtab_destroy(&psexp->ps_projids);
66 idtab_destroy(&psexp->ps_taskids);
67 idtab_destroy(&psexp->ps_zoneids);
68 idtab_destroy(&psexp->ps_ctids);
70 if (psexp->ps_pat)
71 regfree(&psexp->ps_reg);
75 psexp_compile(psexp_t *psexp)
81 idtab_sort(&psexp->ps_euids);
82 idtab_sort(&psexp->ps_ruids);
83 idtab_sort(&psexp->ps_rgids);
84 idtab_sort(&psexp->ps_ppids);
85 idtab_sort(&psexp->ps_pgids);
86 idtab_sort(&psexp->ps_sids);
87 idtab_sort(&psexp->ps_ttys);
88 idtab_sort(&psexp->ps_projids);
89 idtab_sort(&psexp->ps_taskids);
90 idtab_sort(&psexp->ps_zoneids);
91 idtab_sort(&psexp->ps_ctids);
93 if (psexp->ps_pat != NULL) {
94 if ((err = regcomp(&psexp->ps_reg, psexp->ps_pat,
97 nbytes = regerror(err, &psexp->ps_reg, NULL, 0);
99 (void) regerror(err, &psexp->ps_reg, buf, nbytes);
110 psexp->__f1.id_data && !idtab_search(&psexp->__f1, psinfo->__f2)
113 psexp_match(psexp_t *psexp, psinfo_t *psinfo, int flags)
141 if (psexp->ps_pat != NULL) {
145 if (regexec(&psexp->ps_reg, s, 1, &pmatch, 0) != 0)