patch for blank and comment lines
Oisin Curtin
Oisin.Curtin@PhoenixFltOps.com
Sat, 28 May 2005 15:35:57 +0000
This is a multi-part message in MIME format.
--Boundary_(ID_8sbY1mo8rYhCmf/Oe0VBtg)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
This patches 2 things in runscript:
1) errors reference the wrong line if preceded by blank lines
2) comment lines were being loaded into memory
--
Oisin "Blanking memory" Curtin
--Boundary_(ID_8sbY1mo8rYhCmf/Oe0VBtg)
Content-type: text/x-patch; name=commentspace1.patch; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=commentspace1.patch
--- script.c.orig 2003-09-28 21:34:07.000000000 +0000
+++ script.c 2005-05-28 15:19:44.525444879 +0000
@@ -330,8 +330,10 @@
exit(1);
}
skipspace(&t);
- if (*t == '\n')
+ if (*t == '\n' || *t == '#'){
+ ++no;
continue;
+ }
if (((tl = (struct line *)malloc(sizeof (struct line))) == NULL) ||
((tl->line = strsave(t)) == NULL)) {
fprintf(stderr, _("script \"%s\": out of memory%s\n"), s, "\r");
--Boundary_(ID_8sbY1mo8rYhCmf/Oe0VBtg)--