Lines Matching refs:node

136  * Append a new node to the list of directories in the path.
513 PathNode *node; /* A node in the list of directory paths */
544 * Add a new node to the list of paths, containing both the
552 * The file arrays in each absolute directory node are sections of
554 * of these sections in each directory node. Note that this couldn't
560 for(node=pc->head; node; node=node->next) {
561 node->files = fptr;
562 fptr += node->nfile;
798 * Append a new directory node to the list of directories read from the
810 PathNode *node; /* The new directory list node */
823 * Allocate a new list node to record the specifics of the new directory.
825 node = (PathNode *) _new_FreeListNode(pc->node_mem);
826 if(!node) {
832 * Initialize the node.
834 node->next = NULL;
835 node->relative = relative;
836 node->mem = relative ? pc->rel_mem : pc->abs_mem;
837 node->dir = NULL;
838 node->nfile = 0;
839 node->files = NULL;
843 node->dir = _sg_store_string(pc->abs_mem->sg, dirname, 0);
844 if(!node->dir) {
851 * in node->mem->sg and appending pointers to these names to the
852 * node->mem->files[] array.
854 if(!node->relative) {
855 int nfile = node->nfile = pca_scan_dir(pc, node->dir, node->mem);
857 node = (PathNode *) _del_FreeListNode(pc->node_mem, node);
862 * Append the new node to the list.
865 pc->tail->next = node;
866 pc->tail = node;
868 pc->head = pc->tail = node;
1015 PathNode *node; /* A node in the list of directories in the path */
1049 for(node=pc->head; node; node=node->next) {
1051 * If the directory of the latest node is a relative pathname,
1054 if(node->relative) {
1055 rst_CacheMem(node->mem);
1056 if(pca_scan_dir(pc, node->dir, node->mem) < 1)
1058 node->files = node->mem->files;
1059 node->nfile = node->mem->nfiles;
1071 match = (char **)bsearch(pc->path->name, node->files, node->nfile,
1072 sizeof(*node->files), pca_cmp_file);
1078 if(_pn_prepend_to_path(pc->path, node->dir, -1, 0) == NULL)
1219 PathNode *node; /* A node in the list of directories in the path */
1290 for(node=pc->head; node; node=node->next) {
1292 * If the directory of the latest node is a relative pathname,
1295 if(node->relative) {
1296 rst_CacheMem(node->mem);
1297 if(pca_scan_dir(pc, node->dir, node->mem) < 1)
1299 node->files = node->mem->files;
1300 node->nfile = node->mem->nfiles;
1316 top = node->nfile - 1;
1319 int test = strncmp(node->files[mid]+1, prefix, prefix_len);
1333 while(--bot >= 0 && strncmp(node->files[bot]+1, prefix, prefix_len) == 0)
1335 while(++top < node->nfile &&
1336 strncmp(node->files[top]+1, prefix, prefix_len) == 0)
1348 char *match = node->files[bot];
1353 if(_pn_append_to_path(pc->path, node->dir, -1, 0) == NULL ||
1702 PathNode *node; /* A node in the list of directories in the path */
1708 for(node=pc->head; node; node=node->next) {
1709 if(!node->relative) {
1710 for(i=0; i<node->nfile; i++)
1711 *node->files[i] = PCA_F_ENIGMA;