symtab.c (5ebc7e6281887681c3a348a5a4c902e262ccd656) symtab.c (b94f03b2088c483ae97327cdf31bd763ef98089d)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 136 unchanged lines hidden (view full) ---

145 char *name;
146{
147 register struct entry *ep;
148 register char *np, *cp;
149 char buf[MAXPATHLEN];
150
151 cp = name;
152 for (ep = lookupino(ROOTINO); ep != NULL; ep = ep->e_entries) {
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 136 unchanged lines hidden (view full) ---

145 char *name;
146{
147 register struct entry *ep;
148 register char *np, *cp;
149 char buf[MAXPATHLEN];
150
151 cp = name;
152 for (ep = lookupino(ROOTINO); ep != NULL; ep = ep->e_entries) {
153 for (np = buf; *cp != '/' && *cp != '\0'; )
153 for (np = buf; *cp != '/' && *cp != '\0' &&
154 np < &buf[sizeof(buf)]; )
154 *np++ = *cp++;
155 *np++ = *cp++;
156 if (np == &buf[sizeof(buf)])
157 break;
155 *np = '\0';
156 for ( ; ep != NULL; ep = ep->e_sibling)
157 if (strcmp(ep->e_name, buf) == 0)
158 break;
159 if (ep == NULL)
160 break;
161 if (*cp++ == '\0')
162 return (ep);

--- 467 unchanged lines hidden ---
158 *np = '\0';
159 for ( ; ep != NULL; ep = ep->e_sibling)
160 if (strcmp(ep->e_name, buf) == 0)
161 break;
162 if (ep == NULL)
163 break;
164 if (*cp++ == '\0')
165 return (ep);

--- 467 unchanged lines hidden ---