diff --git a/Source/DOH/Doh/base.c b/Source/DOH/Doh/base.c index 3f2751db7..ed77e097c 100644 --- a/Source/DOH/Doh/base.c +++ b/Source/DOH/Doh/base.c @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ diff --git a/Source/DOH/Doh/file.c b/Source/DOH/Doh/file.c index 91d190ec1..b18570047 100644 --- a/Source/DOH/Doh/file.c +++ b/Source/DOH/Doh/file.c @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ diff --git a/Source/DOH/Doh/fio.c b/Source/DOH/Doh/fio.c index 61fe69f5e..41248f27b 100644 --- a/Source/DOH/Doh/fio.c +++ b/Source/DOH/Doh/fio.c @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ @@ -426,12 +426,20 @@ DOH *DohSplit(DOH *in, char *chs, int nsplits) { DOH *DohReadline(DOH *in) { char c; + int n = 0; DOH *s = NewString(""); while (1) { - if (Read(in,&c,1) < 0) return s; + if (Read(in,&c,1) < 0) { + if (n == 0) { + Delete(s); + return 0; + } + return s; + } if (c == '\n') return s; if (c == '\r') continue; Putc(c,s); + n++; } } diff --git a/Source/DOH/Doh/hash.c b/Source/DOH/Doh/hash.c index 3eb5fd21c..4f621d1a0 100644 --- a/Source/DOH/Doh/hash.c +++ b/Source/DOH/Doh/hash.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Simplified Wrapper and Interface Generator (SWIG) + * DOH * * Author : David Beazley * @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ diff --git a/Source/DOH/Doh/list.c b/Source/DOH/Doh/list.c index bfd6d2591..69eaece73 100644 --- a/Source/DOH/Doh/list.c +++ b/Source/DOH/Doh/list.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Simplified Wrapper and Interface Generator (SWIG) + * DOH * * Author : David Beazley * @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ @@ -326,9 +326,9 @@ List_str(DOH *lo) List *l = (List *) lo; s = NewString(""); - Printf(s,"List [ "); + Printf(s,"List[ "); for (i = 0; i < l->nitems; i++) { - Printf(s, " %s\n", l->items[i]); + Printf(s, "%s", l->items[i]); if ((i+1) < l->nitems) Printf(s,", "); } diff --git a/Source/DOH/Doh/memory.c b/Source/DOH/Doh/memory.c index 58a210e76..4a4bd1590 100644 --- a/Source/DOH/Doh/memory.c +++ b/Source/DOH/Doh/memory.c @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. ****************************************************************************/ diff --git a/Source/DOH/Include/doh.h b/Source/DOH/Include/doh.h index d90338235..f1339c299 100644 --- a/Source/DOH/Include/doh.h +++ b/Source/DOH/Include/doh.h @@ -9,7 +9,7 @@ * Chicago, IL 60637 * beazley@cs.uchicago.edu * - * Please read the file LICENSE for the copyright and terms by which SWIG + * Please read the file LICENSE for the copyright and terms by which DOH * can be used and distributed. *******************************************************************************/ @@ -181,6 +181,8 @@ extern int DohvPrintf(DOH *obj, char *format, va_list ap); extern int DohvScanf(DOH *obj, char *format, va_list ap); */ extern DOH *DohReadline(DOH *in); + +#ifndef DOH_LONG_NAMES /* Macros to invoke the above functions. Includes the location of the caller to simplify debugging if something goes wrong */ @@ -230,6 +232,8 @@ extern DOH *DohReadline(DOH *in); #define Nextitem DohNextitem #define Readline DohReadline +#endif + /* #define Scanf DohScanf #define vScanf DohvScanf*/ @@ -321,3 +325,4 @@ extern DOH *DohSplit(DOH *input, char *chs, int nsplits); #endif +