Sync'd with rev. 146 from the TheBar SVN archive.
[AROS-Contrib.git] / rexx / lstring / write.c
blob243fd74cbf369cd8ec8fb5eb5ab24d2ca05559fa
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:38 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.5 1999/11/26 12:52:25 bnv
8 * Changed: To use the new macros
10 * Revision 1.4 1999/05/26 16:47:42 bnv
11 * Gene corrections in RXCONIO
13 * Revision 1.3 1999/03/10 16:55:55 bnv
14 * Added MSC support
16 * Revision 1.2 1999/02/10 15:45:16 bnv
17 * RXCONIO support by Generoso Martello
19 * Revision 1.1 1998/07/02 17:20:58 bnv
20 * Initial Version
24 #include <lstring.h>
26 /* ---------------- Lwrite ------------------- */
27 void
28 Lwrite( FILEP f, const PLstr line, const bool newline)
30 long l;
31 char *c;
33 L2STR(line);
34 c = LSTR(*line);
35 l = LLEN(*line);
36 while (l--)
37 #ifdef RXCONIO
38 if (f==STDOUT) {
39 putch(*c++);
40 } else
41 #endif
42 FPUTC(*c++,f);
43 if (newline)
44 FPUTC('\n',f);
45 } /* Lwrite */