Lines Matching defs:ap
1114 struct tbl *ap, **p;
1116 for (p = ktsort(t); (ap = *p++) != NULL; )
1117 if ((ap->flag & (ISSET|xflag)) == (ISSET|xflag)) {
1120 shf_puts(ap->name, shl_stdout);
1123 print_value_quoted(shl_stdout, ap->val.s);
1132 struct tbl *ap;
1141 ap = ktsearch(t, alias, h);
1142 if (ap != NULL && (ap->flag&ISSET)) {
1145 shf_puts(ap->name, shl_stdout);
1148 print_value_quoted(shl_stdout, ap->val.s);
1158 ap = ktenter(t, alias, h);
1159 ap->type = tflag ? CTALIAS : CALIAS;
1162 if (ap->flag&ALLOC) {
1163 ap->flag &= ~(ALLOC|ISSET);
1164 afree(ap->val.s, APERM);
1171 strdupx(ap->val.s, newval, APERM);
1172 ap->flag |= ALLOC|ISSET;
1174 ap->flag &= ~ISSET;
1176 ap->flag |= DEFINED;
1178 ap->flag &= ~xflag;
1180 ap->flag |= xflag;
1191 struct tbl *ap;
1221 ap = ktsearch(t, *wp, hash(*wp));
1222 if (ap == NULL) {
1227 if (ap->flag&ALLOC) {
1228 ap->flag &= ~(ALLOC|ISSET);
1229 afree(ap->val.s, APERM);
1231 ap->flag &= ~(DEFINED|ISSET|EXPORT);
1237 for (ktwalk(&ts, t); (ap = ktnext(&ts)); ) {
1238 if (ap->flag&ALLOC) {
1239 ap->flag &= ~(ALLOC|ISSET);
1240 afree(ap->val.s, APERM);
1242 ap->flag &= ~(DEFINED|ISSET|EXPORT);