Home | History | Annotate | Download | only in sh

Lines Matching refs:ap

67 	struct alias *ap, **app;
70 for (ap = *app; ap; ap = ap->next) {
71 if (equal(name, ap->name)) {
73 ckfree(ap->val);
74 ap->val = savestr(val);
81 ap = ckmalloc(sizeof (struct alias));
82 ap->name = savestr(name);
101 ap->val = savestr(val);
105 ap->val = ckmalloc(len + 2);
106 memcpy(ap->val, val, len);
107 ap->val[len] = ' '; /* fluff */
108 ap->val[len+1] = '\0';
111 ap->next = *app;
112 *app = ap;
119 struct alias *ap, **app;
123 for (ap = *app; ap; app = &(ap->next), ap = ap->next) {
124 if (equal(name, ap->name)) {
132 if (ap->flag & ALIASINUSE)
133 *ap->name = '\0';
136 *app = ap->next;
137 ckfree(ap->name);
138 ckfree(ap->val);
139 ckfree(ap);
160 struct alias *ap, *tmp;
165 ap = atab[i];
167 while (ap) {
168 ckfree(ap->name);
169 ckfree(ap->val);
170 tmp = ap;
171 ap = ap->next;
181 struct alias *ap = *hashalias(name);
183 for (; ap; ap = ap->next) {
184 if (equal(name, ap->name)) {
185 if (check && (ap->flag & ALIASINUSE))
187 return (ap);
197 struct alias *ap;
199 ap = lookupalias(name, 0);
200 if (ap == NULL)
202 return ap->val;
213 struct alias *ap;
219 for (ap = atab[i]; ap; ap = ap->next) {
220 if (*ap->name != '\0') {
221 out1fmt("alias %s=", ap->name);
222 print_quoted(ap->val);
230 if ((ap = lookupalias(n, 0)) == NULL) {
235 print_quoted(ap->val);