Lines Matching defs:pt
222 PATTERN *pt;
237 if ((pt = (PATTERN *)malloc(sizeof(PATTERN))) == NULL) {
242 pt->pstr = str;
243 pt->pend = NULL;
244 pt->plen = strlen(str);
245 pt->fow = NULL;
246 pt->flgs = 0;
247 pt->chdname = chdname;
250 pattail = pathead = pt;
253 pattail->fow = pt;
254 pattail = pt;
267 PATTERN *pt;
274 for (pt = pathead; pt != NULL; pt = pt->fow) {
275 if (pt->flgs & MTCH)
281 (void)fprintf(stderr, "%s\n", pt->pstr);
304 PATTERN *pt;
311 if ((pathead == NULL) || ((pt = arcn->pat) == NULL))
319 pt->flgs |= MTCH;
330 if (pt->flgs & DIR_MTCH)
333 if (!dflag && ((pt->pend != NULL) || (arcn->type == PAX_DIR))) {
338 * WATCH IT, the code assumes that pt->pend points
347 if (pt->pend != NULL)
348 *pt->pend = '\0';
350 if ((pt->pstr = strdup(arcn->name)) == NULL) {
352 if (pt->pend != NULL)
353 *pt->pend = '/';
354 pt->pend = NULL;
361 if (pt->pend != NULL) {
362 *pt->pend = '/';
363 pt->pend = NULL;
365 pt->plen = strlen(pt->pstr);
370 len = pt->plen - 1;
371 if (*(pt->pstr + len) == '/') {
372 *(pt->pstr + len) = '\0';
373 pt->plen = len;
375 pt->flgs = DIR_MTCH | MTCH;
376 arcn->pat = pt;
388 pt = pathead;
390 while ((pt != NULL) && (pt != arcn->pat)) {
391 ppt = &(pt->fow);
392 pt = pt->fow;
395 if (pt == NULL) {
402 *ppt = pt->fow;
403 (void)free((char *)pt);
423 PATTERN *pt;
440 pt = pathead;
441 while (pt != NULL) {
446 if (pt->flgs & DIR_MTCH) {
453 if ((arcn->name[pt->plen] == '/') &&
454 (strncmp(pt->pstr, arcn->name, pt->plen) == 0))
456 } else if (fn_match(pt->pstr, arcn->name, &pt->pend) == 0)
458 pt = pt->fow;
465 if (pt == NULL)
473 arcn->pat = pt;
862 REPLACE *pt;
881 pt = rephead;
890 while (pt != NULL) {
897 if (regexec(&(pt->rcmp), inpt, MAXSUBEXP, pm, 0) != 0)
921 if ((res = resub(&(pt->rcmp),pm,pt->nstr,oinpt,outpt,endpt))
949 } while (pt->flgs & GLOB);
957 pt = pt->fow;
979 if (prnt && (pt->flgs & PRNT)) {