1 Index: Source/DOH/doh.h
2 ===================================================================
3 RCS file: /cvsroot/SWIG/Source/DOH/doh.h,v
4 retrieving revision 1.7
6 --- Source/DOH/doh.h 11 Sep 2003 20:26:53 -0000 1.7
7 +++ Source/DOH/doh.h 24 Oct 2003 00:00:41 -0000
9 #define DohNewHash DOH_NAMESPACE(NewHash)
10 #define DohNewVoid DOH_NAMESPACE(NewVoid)
11 #define DohSplit DOH_NAMESPACE(Split)
12 +#define DohSplitLines DOH_NAMESPACE(SplitLines)
13 #define DohNone DOH_NAMESPACE(None)
14 #define DohCall DOH_NAMESPACE(Call)
15 #define DohObjMalloc DOH_NAMESPACE(ObjMalloc)
18 extern DOHVoid *DohNewVoid(void *ptr, void (*del)(void *));
19 extern DOHList *DohSplit(DOHFile *input, char ch, int nsplits);
20 +extern DOHList *DohSplitLines(DOHFile *input);
23 extern void DohMemoryDebug(void);
25 #define Strchr DohStrchr
26 #define Copyto DohCopyto
27 #define Split DohSplit
28 +#define SplitLines DohSplitLines
29 #define Setmark DohSetmark
30 #define Getmark DohGetmark
32 Index: Source/DOH/fio.c
33 ===================================================================
34 RCS file: /cvsroot/SWIG/Source/DOH/fio.c,v
35 retrieving revision 1.2
37 --- Source/DOH/fio.c 15 Aug 2003 19:37:27 -0000 1.2
38 +++ Source/DOH/fio.c 24 Oct 2003 00:00:42 -0000
42 /* -----------------------------------------------------------------------------
45 + * Split an input stream into a list of strings delimited by newline characters.
46 + * ----------------------------------------------------------------------------- */
49 +DohSplitLines(DOH *in) {
56 + if (DohIsString(in)) {
57 + Seek(in,0,SEEK_SET);
61 + str = NewString("");
62 + while ((c = Getc(in)) != '\n' && c != EOF) {
72 +/* -----------------------------------------------------------------------------
75 * Read a single input line and return it as a string.