fix confusion with --/++

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-14 07:27:02 +00:00
commit d7a6140c7a

View file

@ -508,7 +508,7 @@ DohString_putc(DOH *so, int ch)
register int sp = s->sp; register int sp = s->sp;
s->hashkey = -1; s->hashkey = -1;
if (sp >= len) { if (sp >= len) {
register size_t maxsize = s->maxsize; register int maxsize = s->maxsize;
register char *tc = s->str; register char *tc = s->str;
if (len > (maxsize-2)) { if (len > (maxsize-2)) {
maxsize *= 2; maxsize *= 2;
@ -540,7 +540,7 @@ DohString_getc(DOH *so)
c = EOF; c = EOF;
else else
c = (int) s->str[s->sp++]; c = (int) s->str[s->sp++];
if (c == '\n') s->line--; if (c == '\n') s->line++;
return c; return c;
} }
@ -555,7 +555,7 @@ DohString_ungetc(DOH *so, int ch)
if (ch == EOF) return ch; if (ch == EOF) return ch;
if (s->sp <= 0) return EOF; if (s->sp <= 0) return EOF;
s->sp--; s->sp--;
if (ch == '\n') s->line++; if (ch == '\n') s->line--;
return ch; return ch;
} }