2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
7 #include <toollib/mystream.h>
8 #include <toollib/error.h>
11 Str_Init (MyStream
* ms
, const char * name
)
13 memset (ms
, 0, sizeof (MyStream
));
16 ms
->name
= xstrdup (name
);
22 Str_Delete (MyStream
* ms
)
28 Str_Puts (MyStream
* ms
, const char * str
, CBD data
)
33 c
= CallCB (ms
->puts
, ms
, str
, data
);
38 while (*str
&& (c
= Str_Put(ms
,NULL
+ *str
,data
)) > 0)
46 Str_PushError (MyStream
* ms
, const char * fmt
, ...)
50 PushMsg (" ", fmt
, args
, NULL
);
52 PushError ("in %s:%d:", Str_GetName(ms
), Str_GetLine(ms
));
56 Str_PushWarn (MyStream
* ms
, const char * fmt
, ...)
60 PushMsg (" ", fmt
, args
, NULL
);
62 PushWarn ("in %s:%d:", Str_GetName(ms
), Str_GetLine(ms
));