Lines Matching refs:first

121 	/* system call so we can save us to call access(2) first */
315 void path_delete(Pathcomp_t *first)
317 register Pathcomp_t *pp=first, *old=0, *ppnext;
401 register Pathcomp_t *oldpp,*first;
415 first = (pp->flags&PATH_CDPATH)?shp->cdpathlist:path_get(shp,"");
416 for(oldpp=first; oldpp && oldpp!=pp; oldpp=oldpp->next)
429 path_chkpaths(shp,first,0,pp,offset);
990 /* find first path that has a library component */
1420 static Pathcomp_t *path_addcomp(Shell_t *shp,Pathcomp_t *first, Pathcomp_t *old,const char *name, int flag)
1436 for(pp=first; pp; pp=pp->next)
1441 return(first);
1444 for(pp=first, oldpp=0; pp; oldpp=pp, pp=pp->next);
1454 first = pp;
1462 return(first);
1465 path_chkpaths(shp,first,old,pp,offset);
1466 return(first);
1473 static int path_chkpaths(Shell_t *shp,Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int offset)
1510 if(first)
1515 path_addcomp(shp,first,old,stakptr(offset),PATH_FPATH|PATH_BFPATH);
1554 if(!first)
1570 Pathcomp_t *path_addpath(Shell_t *shp,Pathcomp_t *first, register const char *path,int type)
1578 return(first);
1581 old = first;
1582 first = 0;
1591 first = path_addcomp(shp,first,old,".",type);
1600 first = path_addcomp(shp,first,old,cp,type);
1609 if(!first && !path)
1614 first = path_dup(pp);
1617 first = (void*)path_addpath(shp,(Pathcomp_t*)first,cp,PATH_FPATH);
1624 return(first);
1628 * duplicate the path give by <first> by incremented reference counts
1630 Pathcomp_t *path_dup(Pathcomp_t *first)
1632 register Pathcomp_t *pp=first;
1638 return(first);
1644 void path_newdir(Shell_t *shp,Pathcomp_t *first)
1646 register Pathcomp_t *pp=first, *next, *pq;
1648 for(pp=first; pp; pp=pp->next)
1669 for(pq=first;pq!=pp;pq=pq->next)
1687 path_chkpaths(shp,first,(Pathcomp_t*)0,pp,offset);
1694 path_dump(first);
1700 Pathcomp_t *first = (Pathcomp_t*)shp->pathlist;
1701 register Pathcomp_t *pp=first, *old=0;
1725 first = pp->next;
1740 return(first);
1743 Pathcomp_t *path_dirfind(Pathcomp_t *first,const char *name,int c)
1745 register Pathcomp_t *pp=first;