Lines Matching refs:first

118 	/* system call so we can save us to call access(2) first */
292 void path_delete(Pathcomp_t *first)
294 register Pathcomp_t *pp=first, *old=0, *ppnext;
370 register Pathcomp_t *oldpp,*first;
384 first = (pp->flags&PATH_CDPATH)?(Pathcomp_t*)shp->cdpathlist:path_get(shp,"");
385 for(oldpp=first; oldpp && oldpp!=pp; oldpp=oldpp->next)
398 path_chkpaths(shp,first,0,pp,offset);
1019 /* find first path that has a library component */
1448 static Pathcomp_t *path_addcomp(Shell_t *shp,Pathcomp_t *first, Pathcomp_t *old,const char *name, int flag)
1464 for(pp=first; pp; pp=pp->next)
1469 return(first);
1472 for(pp=first, oldpp=0; pp; oldpp=pp, pp=pp->next);
1482 first = pp;
1490 return(first);
1493 path_chkpaths(shp,first,old,pp,offset);
1494 return(first);
1501 static int path_chkpaths(Shell_t *shp,Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int offset)
1538 if(first)
1543 path_addcomp(shp,first,old,stakptr(offset),PATH_FPATH|PATH_BFPATH);
1560 if(!first)
1576 Pathcomp_t *path_addpath(Shell_t *shp,Pathcomp_t *first, register const char *path,int type)
1584 return(first);
1587 old = first;
1588 first = 0;
1597 first = path_addcomp(shp,first,old,".",type);
1606 first = path_addcomp(shp,first,old,cp,type);
1615 if(!first && !path)
1620 first = path_dup(pp);
1623 first = (void*)path_addpath(shp,(Pathcomp_t*)first,cp,PATH_FPATH);
1630 return(first);
1634 * duplicate the path give by <first> by incremented reference counts
1636 Pathcomp_t *path_dup(Pathcomp_t *first)
1638 register Pathcomp_t *pp=first;
1644 return(first);
1650 void path_newdir(Shell_t *shp,Pathcomp_t *first)
1652 register Pathcomp_t *pp=first, *next, *pq;
1654 for(pp=first; pp; pp=pp->next)
1675 for(pq=first;pq!=pp;pq=pq->next)
1693 path_chkpaths(shp,first,(Pathcomp_t*)0,pp,offset);
1700 path_dump(first);
1706 Pathcomp_t *first = (Pathcomp_t*)shp->pathlist;
1707 register Pathcomp_t *pp=first, *old=0;
1731 first = pp->next;
1746 return(first);
1749 Pathcomp_t *path_dirfind(Pathcomp_t *first,const char *name,int c)
1751 register Pathcomp_t *pp=first;