config/make.tmpl: pass -nix flag also to LDFLAGS of configure
[AROS.git] / tools / toollib / mystream.h
blob0a63bc776f6ce0c7faa9d64e0fc39d841710fe80
1 #ifndef TOOLLIB_MYSTREAM_H
2 #define TOOLLIB_MYSTREAM_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <stdio.h>
10 #ifndef TOOLLIB_TOOLLIB_H
11 # include <toollib/toollib.h>
12 #endif
13 #ifndef TOOLLIB_CALLBACK_H
14 # include <toollib/callback.h>
15 #endif
17 typedef struct
19 CB get;
20 CB unget;
21 CB put;
22 CB puts;
23 char * name;
24 int line;
26 MyStream;
28 #define Str_Get(str,d) CallCB(((MyStream *)str)->get, str, 0, d)
29 #define Str_Unget(str,c,d) CallCB(((MyStream *)str)->unget, str, c, d)
30 #define Str_Put(str,c,d) CallCB(((MyStream *)str)->put, str, c, d)
32 #define Str_GetName(str) (((MyStream *)str)->name)
33 #define Str_GetLine(str) (((MyStream *)str)->line)
34 #define Str_SetLine(str,l) ((((MyStream *)str)->line) = (l))
35 #define Str_NextLine(str) (((MyStream *)str)->line ++)
37 extern int Str_Init PARAMS ((MyStream * ms, const char * name));
38 extern void Str_Delete PARAMS ((MyStream * ms));
39 extern int Str_Puts PARAMS ((MyStream * ms, const char * str, CBD data));
40 extern void Str_PushError PARAMS ((MyStream * ms, const char * fmt, ...));
41 extern void Str_PushWarn PARAMS ((MyStream * ms, const char * fmt, ...));
43 #endif /* TOOLLIB_MYSTREAM_H */