Mercurial > hg-old > index.cgi
comparison lwlink/script.c @ 180:6ebb93b409ba
Added library paths and --section-base
author | lost |
---|---|
date | Thu, 05 Mar 2009 02:23:25 +0000 |
parents | 106c2fe3c9d9 |
children | 857cb407229e |
comparison
equal
deleted
inserted
replaced
179:3711cd1c01e2 | 180:6ebb93b409ba |
---|---|
111 script = simple_script; | 111 script = simple_script; |
112 break; | 112 break; |
113 } | 113 } |
114 | 114 |
115 size = strlen(script); | 115 size = strlen(script); |
116 if (nscriptls) | |
117 { | |
118 char *rscript; | |
119 int i; | |
120 // prepend the "extra" script lines | |
121 for (i = 0; i < nscriptls; i++) | |
122 size += strlen(scriptls[i]) + 1; | |
123 | |
124 rscript = lw_malloc(size + 1); | |
125 oscript = rscript; | |
126 for (i = 0; i < nscriptls; i++) | |
127 { | |
128 oscript += sprintf(oscript, "%s\n", scriptls[i]); | |
129 } | |
130 strcpy(oscript, script); | |
131 script = rscript; | |
132 } | |
116 } | 133 } |
117 | 134 |
118 oscript = script; | 135 oscript = script; |
119 // now parse the script file | 136 // now parse the script file |
120 while (*script) | 137 while (*script) |
250 exit(1); | 267 exit(1); |
251 } | 268 } |
252 lw_free(line); | 269 lw_free(line); |
253 } | 270 } |
254 | 271 |
255 if (scriptfile) | 272 if (scriptfile || nscriptls) |
256 lw_free(oscript); | 273 lw_free(oscript); |
257 } | 274 } |