version 1.51, 2002/01/30 18:40:26 |
version 1.52, 2003/04/06 22:47:14 |
|
|
char *buf; |
char *buf; |
char *sacrifice; |
char *sacrifice; |
char *oldMemName = memName; |
char *oldMemName = memName; |
|
size_t len; |
|
|
memName = Var_Subst(memName, ctxt, true); |
memName = Var_Subst(memName, ctxt, true); |
|
|
/* Now form an archive spec and recurse to deal with nested |
/* Now form an archive spec and recurse to deal with nested |
* variables and multi-word variable values.... The results |
* variables and multi-word variable values.... The results |
* are just placed at the end of the nodeLst we're returning. */ |
* are just placed at the end of the nodeLst we're returning. */ |
buf = sacrifice = emalloc(strlen(memName)+strlen(libName)+3); |
len = strlen(memName)+strlen(libName)+3; |
|
buf = sacrifice = emalloc(len); |
|
|
sprintf(buf, "%s(%s)", libName, memName); |
snprintf(buf, len, "%s(%s)", libName, memName); |
|
|
if (strchr(memName, '$') && strcmp(memName, oldMemName) == 0) { |
if (strchr(memName, '$') && strcmp(memName, oldMemName) == 0) { |
/* Must contain dynamic sources, so we can't deal with it now. |
/* Must contain dynamic sources, so we can't deal with it now. |
|
|
Lst path; /* Search path */ |
Lst path; /* Search path */ |
{ |
{ |
char *libName; /* file name for archive */ |
char *libName; /* file name for archive */ |
|
size_t len = strlen(gn->name) + 6 - 2; |
|
|
libName = emalloc(strlen(gn->name) + 6 - 2); |
libName = emalloc(len); |
sprintf(libName, "lib%s.a", &gn->name[2]); |
snprintf(libName, len, "lib%s.a", &gn->name[2]); |
|
|
gn->path = Dir_FindFile(libName, path); |
gn->path = Dir_FindFile(libName, path); |
|
|