*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@22 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f621311ac3
commit
5d1946922e
7 changed files with 25 additions and 12 deletions
|
|
@ -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.
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -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,", ");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue