1 |
// -*- C++ -*- |
// -*- C++ -*- |
2 |
/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. |
/* Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
3 |
Written by Gaius Mulley (gaius@glam.ac.uk). |
Written by Gaius Mulley (gaius@glam.ac.uk). |
4 |
|
|
5 |
This file is part of groff. |
This file is part of groff. |
83 |
|
|
84 |
pushBackBuffer::~pushBackBuffer () |
pushBackBuffer::~pushBackBuffer () |
85 |
{ |
{ |
|
int old; |
|
|
|
|
86 |
if (charStack != 0) { |
if (charStack != 0) { |
87 |
free(charStack); |
free(charStack); |
88 |
} |
} |
89 |
close(0); |
close(0); |
90 |
/* restore stdin in file descriptor 0 */ |
/* restore stdin in file descriptor 0 */ |
91 |
old = dup(stdIn); |
dup(stdIn); |
92 |
close(stdIn); |
close(stdIn); |
93 |
} |
} |
94 |
|
|
160 |
|
|
161 |
void pushBackBuffer::skipToNewline (void) |
void pushBackBuffer::skipToNewline (void) |
162 |
{ |
{ |
|
char ch; |
|
|
|
|
163 |
while ((putPB(getPB()) != '\n') && (! eofFound)) { |
while ((putPB(getPB()) != '\n') && (! eofFound)) { |
164 |
ch = getPB(); |
getPB(); |
165 |
} |
} |
166 |
} |
} |
167 |
|
|