1 |
// -*- C++ -*- |
// -*- C++ -*- |
2 |
/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. |
/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. |
3 |
* |
* |
4 |
* Gaius Mulley (gaius@glam.ac.uk) wrote output.cpp |
* Gaius Mulley (gaius@glam.ac.uk) wrote output.cpp |
5 |
* but it owes a huge amount of ideas and raw code from |
* but it owes a huge amount of ideas and raw code from |
253 |
} |
} |
254 |
|
|
255 |
/* |
/* |
256 |
|
* force_nl - forces a newline. |
257 |
|
*/ |
258 |
|
|
259 |
|
simple_output &simple_output::force_nl (void) |
260 |
|
{ |
261 |
|
space_or_newline(); |
262 |
|
col += last_word.flush(fp); |
263 |
|
FPUTC('\n', fp); |
264 |
|
col = 0; |
265 |
|
return *this ; |
266 |
|
} |
267 |
|
|
268 |
|
/* |
269 |
* nl - writes a newline providing that we |
* nl - writes a newline providing that we |
270 |
* are not in the first column. |
* are not in the first column. |
271 |
*/ |
*/ |
274 |
{ |
{ |
275 |
space_or_newline(); |
space_or_newline(); |
276 |
col += last_word.flush(fp); |
col += last_word.flush(fp); |
277 |
if (col != 0) { |
FPUTC('\n', fp); |
278 |
FPUTC('\n', fp); |
col = 0; |
|
col = 0; |
|
|
} |
|
279 |
return *this ; |
return *this ; |
280 |
} |
} |
281 |
|
|