fix line issues reported by Olly

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8743 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-08 01:38:58 +00:00
commit 6e57a9dea4
3 changed files with 5 additions and 4 deletions

View file

@ -365,7 +365,7 @@ void skip_decl(void) {
int done = 0;
while (!done) {
if ((c = nextchar()) == 0) {
Swig_error(cparse_file,cparse_line,"Missing semicolon. Reached end of input.\n");
Swig_error(cparse_file,cparse_line - 2,"Missing semicolon. Reached end of input.\n");
return;
}
if (c == '{') {
@ -379,7 +379,7 @@ void skip_decl(void) {
if (!done) {
while (num_brace > last_brace) {
if ((c = nextchar()) == 0) {
Swig_error(cparse_file,cparse_line,"Missing '}'. Reached end of input.\n");
Swig_error(cparse_file,cparse_line - 2,"Missing '}'. Reached end of input.\n");
return;
}
if (c == '{') num_brace++;
@ -546,6 +546,7 @@ int yylook(void) {
}
}
else if (c == '{') {
cparse_start_line = cparse_line;
last_brace = num_brace;
num_brace++;
return (LBRACE);

View file

@ -1562,7 +1562,7 @@ Preprocessor_parse(String *s)
}
s2 = Preprocessor_parse(s1);
addline(ns,s2,allow);
Printf(ns,"\n]");
StringAppend(ns,"\n]");
if (dirname) {
Swig_pop_directory();
}

View file

@ -275,7 +275,7 @@ Swig_read_file(FILE *f) {
while (fgets(buffer,4095,f)) {
Append(str,buffer);
}
Append(str,"\n");
/* Append(str,"\n"); */
return str;
}