diff options
author | wlemb <wlemb> | 2001-07-28 05:15:59 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2001-07-28 05:15:59 +0000 |
commit | f61818fbb5030c7738ba01511a5585112bb1ed7f (patch) | |
tree | 0a7dc741134ccd519b430a587c576181c7c8cba2 /src/preproc/html/pushbackbuffer.cc | |
parent | 4070c4420db54dc11c0f87bcc2fdd3923f07d203 (diff) | |
download | groff-f61818fbb5030c7738ba01511a5585112bb1ed7f.tar.gz |
* src/preproc/html/pushbackbuffer.cc (pushBackBuffer::readNumber):
Simplified.
Diffstat (limited to 'src/preproc/html/pushbackbuffer.cc')
-rwxr-xr-x | src/preproc/html/pushbackbuffer.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/preproc/html/pushbackbuffer.cc b/src/preproc/html/pushbackbuffer.cc index 4bea4516..71f6fcd2 100755 --- a/src/preproc/html/pushbackbuffer.cc +++ b/src/preproc/html/pushbackbuffer.cc @@ -292,20 +292,15 @@ static float convertToFloat (int a, int b) float pushBackBuffer::readNumber (void) { - int integer; - int fraction; + int i; char ch; - float f; - integer = readInt(); - if (putPB(getPB()) == '.') { - ch = getPB(); - fraction = readInt(); - f = convertToFloat(integer, fraction); - return( f ); - } else { - return( (float)integer ); + i = readInt(); + if ((ch = getPB()) == '.') { + return convertToFloat(i, readInt()); } + putPB(ch); + return (float)i; } /* |