psexp
scan_proc_dir(const char *dirpath, DIR *dirp, psexp_t *psexp,
(psexp_match(psexp, &ps, flags) ^ reverse)) {
psexp->__f1.id_data && !idtab_search(&psexp->__f1, psinfo->__f2)
psexp_match(psexp_t *psexp, psinfo_t *psinfo, int flags)
if (psexp->ps_pat != NULL) {
if (regexec(&psexp->ps_reg, s, 1, &pmatch, 0) != 0)
psexp_create(psexp_t *psexp)
idtab_create(&psexp->ps_euids);
idtab_create(&psexp->ps_ruids);
idtab_create(&psexp->ps_rgids);
idtab_create(&psexp->ps_ppids);
idtab_create(&psexp->ps_pgids);
idtab_create(&psexp->ps_sids);
idtab_create(&psexp->ps_ttys);
idtab_create(&psexp->ps_projids);
idtab_create(&psexp->ps_taskids);
idtab_create(&psexp->ps_zoneids);
idtab_create(&psexp->ps_ctids);
psexp->ps_pat = NULL;
psexp_destroy(psexp_t *psexp)
idtab_destroy(&psexp->ps_euids);
idtab_destroy(&psexp->ps_ruids);
idtab_destroy(&psexp->ps_rgids);
idtab_destroy(&psexp->ps_ppids);
idtab_destroy(&psexp->ps_pgids);
idtab_destroy(&psexp->ps_sids);
idtab_destroy(&psexp->ps_ttys);
idtab_destroy(&psexp->ps_projids);
idtab_destroy(&psexp->ps_taskids);
idtab_destroy(&psexp->ps_zoneids);
idtab_destroy(&psexp->ps_ctids);
if (psexp->ps_pat)
regfree(&psexp->ps_reg);
psexp_compile(psexp_t *psexp)
idtab_sort(&psexp->ps_euids);
idtab_sort(&psexp->ps_ruids);
idtab_sort(&psexp->ps_rgids);
idtab_sort(&psexp->ps_ppids);
idtab_sort(&psexp->ps_pgids);
idtab_sort(&psexp->ps_sids);
idtab_sort(&psexp->ps_ttys);
idtab_sort(&psexp->ps_projids);
idtab_sort(&psexp->ps_taskids);
idtab_sort(&psexp->ps_zoneids);
idtab_sort(&psexp->ps_ctids);
if (psexp->ps_pat != NULL) {
if ((err = regcomp(&psexp->ps_reg, psexp->ps_pat,
nbytes = regerror(err, &psexp->ps_reg, NULL, 0);
(void) regerror(err, &psexp->ps_reg, buf, nbytes);