summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a0614e0)
SCCS-vsn: usr.bin/make/dir.c 5.4
-static char sccsid[] = "@(#)dir.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)dir.c 5.4 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
{
(void)Lst_AtEnd(expansions,
(isDot ? strdup(entry->key.name) :
{
(void)Lst_AtEnd(expansions,
(isDot ? strdup(entry->key.name) :
- Str_Concat(p->name, entry->key.name,
+ str_concat(p->name, entry->key.name,
/*
* Allocate room for the combination and install the three pieces.
*/
/*
* Allocate room for the combination and install the three pieces.
*/
- file = malloc(otherLen + cp - start + 1);
+ file = emalloc(otherLen + cp - start + 1);
if (brace != word) {
strncpy(file, word, brace-word);
}
if (brace != word) {
strncpy(file, word, brace-word);
}
- file = Str_Concat (p->name, cp, STR_ADDSLASH);
+ file = str_concat (p->name, cp, STR_ADDSLASH);
if (DEBUG(DIR)) {
printf("returning %s\n", file);
}
if (DEBUG(DIR)) {
printf("returning %s\n", file);
}
while ((ln = Lst_Next (path)) != NILLNODE) {
p = (Path *) Lst_Datum (ln);
if (p != dot) {
while ((ln = Lst_Next (path)) != NILLNODE) {
p = (Path *) Lst_Datum (ln);
if (p != dot) {
- file = Str_Concat (p->name, name, STR_ADDSLASH);
+ file = str_concat (p->name, name, STR_ADDSLASH);
} else {
/*
* Checking in dot -- DON'T put a leading ./ on the thing.
} else {
/*
* Checking in dot -- DON'T put a leading ./ on the thing.
}
if ((d = opendir (name)) != (DIR *) NULL) {
}
if ((d = opendir (name)) != (DIR *) NULL) {
- p = (Path *) malloc (sizeof (Path));
+ p = (Path *) emalloc (sizeof (Path));
p->name = strdup (name);
p->hits = 0;
p->refCount = 1;
p->name = strdup (name);
p->hits = 0;
p->refCount = 1;
if (Lst_Open (path) == SUCCESS) {
while ((ln = Lst_Next (path)) != NILLNODE) {
p = (Path *) Lst_Datum (ln);
if (Lst_Open (path) == SUCCESS) {
while ((ln = Lst_Next (path)) != NILLNODE) {
p = (Path *) Lst_Datum (ln);
- tstr = Str_Concat (flag, p->name, 0);
- str = Str_Concat (str, tstr, STR_ADDSPACE | STR_DOFREE);
+ tstr = str_concat (flag, p->name, 0);
+ str = str_concat (str, tstr, STR_ADDSPACE | STR_DOFREE);