/* Light-weight streams.
These are meant to be used with the same syntax as the C++ streams
classes, but are much more economical. (Use of iostreams makes the
executable files much bigger, e.g., over 300K on UNIX.)
Author: John Collins, [email protected].
21 Jan 96
(C) John Collins & Penn State University.
*/
// Totally rewritten. Hopefully still light. (Lgb)
#include <config.h>
#include "sos.h"
#include <unistd.h>
#include <string.h> //for strlen()
osos& osos::operator<<(const char *s)
{
//int length = 0;
//char const *a = s;
//while (a++) length++;
::write (filedesc(), s, strlen(s));
return *this;
}
// ============== Standard streams:
osos lite_cout(1), lite_cerr(2);
¤ Dauer der Verarbeitung: 0.3 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.
|