1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #include "sys-defines.h"
- #include "extern.h"
- void
- _write_byte (const plPlotterData *data, unsigned char c)
- {
- if (data->outfp)
- putc ((int)c, data->outfp);
- #ifdef LIBPLOTTER
- else if (data->outstream)
- data->outstream->put (c);
- #endif
- }
- void
- _write_bytes (const plPlotterData *data, int n, const unsigned char *c)
- {
- int i;
- if (data->outfp)
- {
- for (i = 0; i < n; i++)
- putc ((int)(c[i]), data->outfp);
- }
- #ifdef LIBPLOTTER
- else if (data->outstream)
- data->outstream->write((const char *)c, n);
- #endif
- }
- void
- _write_string (const plPlotterData *data, const char *s)
- {
- if (data->outfp)
- fputs (s, data->outfp);
- #ifdef LIBPLOTTER
- else if (data->outstream)
- (*(data->outstream)) << s;
- #endif
- }
|