fix line issues reported by Olly
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8743 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bfa34459f3
commit
be2a108a3a
3 changed files with 5 additions and 4 deletions
|
|
@ -365,7 +365,7 @@ void skip_decl(void) {
|
||||||
int done = 0;
|
int done = 0;
|
||||||
while (!done) {
|
while (!done) {
|
||||||
if ((c = nextchar()) == 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (c == '{') {
|
if (c == '{') {
|
||||||
|
|
@ -379,7 +379,7 @@ void skip_decl(void) {
|
||||||
if (!done) {
|
if (!done) {
|
||||||
while (num_brace > last_brace) {
|
while (num_brace > last_brace) {
|
||||||
if ((c = nextchar()) == 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (c == '{') num_brace++;
|
if (c == '{') num_brace++;
|
||||||
|
|
@ -546,6 +546,7 @@ int yylook(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == '{') {
|
else if (c == '{') {
|
||||||
|
cparse_start_line = cparse_line;
|
||||||
last_brace = num_brace;
|
last_brace = num_brace;
|
||||||
num_brace++;
|
num_brace++;
|
||||||
return (LBRACE);
|
return (LBRACE);
|
||||||
|
|
|
||||||
|
|
@ -1562,7 +1562,7 @@ Preprocessor_parse(String *s)
|
||||||
}
|
}
|
||||||
s2 = Preprocessor_parse(s1);
|
s2 = Preprocessor_parse(s1);
|
||||||
addline(ns,s2,allow);
|
addline(ns,s2,allow);
|
||||||
Printf(ns,"\n]");
|
StringAppend(ns,"\n]");
|
||||||
if (dirname) {
|
if (dirname) {
|
||||||
Swig_pop_directory();
|
Swig_pop_directory();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,7 @@ Swig_read_file(FILE *f) {
|
||||||
while (fgets(buffer,4095,f)) {
|
while (fgets(buffer,4095,f)) {
|
||||||
Append(str,buffer);
|
Append(str,buffer);
|
||||||
}
|
}
|
||||||
Append(str,"\n");
|
/* Append(str,"\n"); */
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue