Mercurial > hg-old > index.cgi
changeset 125:f9bfc2986023
Actually allow script file to be specified and fix segfault on parsing script file
author | lost |
---|---|
date | Fri, 23 Jan 2009 04:53:01 +0000 |
parents | 4ac96c697ef0 |
children | 269ef87192ad |
files | lwlink/trunk/src/main.c lwlink/trunk/src/script.c |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lwlink/trunk/src/main.c Fri Jan 23 04:03:37 2009 +0000 +++ b/lwlink/trunk/src/main.c Fri Jan 23 04:53:01 2009 +0000 @@ -106,7 +106,7 @@ "Generate DECB .bin format output, equivalent of --format=decb"}, { "raw", 'r', 0, 0, "Generate raw binary format output, equivalent of --format=raw"}, - { "script", 's', 0, 0, + { "script", 's', "FILE", 0, "Specify the linking script (overrides the build in defaults)"}, { 0 } };
--- a/lwlink/trunk/src/script.c Fri Jan 23 04:03:37 2009 +0000 +++ b/lwlink/trunk/src/script.c Fri Jan 23 04:53:01 2009 +0000 @@ -60,7 +60,7 @@ void setup_script() { - char *script; + char *script, *oscript; long size; // read the file if needed @@ -115,6 +115,7 @@ size = strlen(script); } + oscript = script; // now parse the script file while (*script) { @@ -252,5 +253,5 @@ } if (scriptfile) - lw_free(script); + lw_free(oscript); }