add NewStringEmpty, use more StringEuqual and less Strcmp
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
255296362f
commit
628dc6b32b
24 changed files with 253 additions and 218 deletions
|
|
@ -476,7 +476,7 @@ DohSplit(DOH *in, char ch, int nsplits) {
|
|||
}
|
||||
|
||||
while (1) {
|
||||
str = NewString("");
|
||||
str = NewStringEmpty();
|
||||
do {
|
||||
c = Getc(in);
|
||||
} while ((c != EOF) && (c == ch));
|
||||
|
|
@ -515,7 +515,7 @@ DohSplitLines(DOH *in) {
|
|||
}
|
||||
|
||||
while (c != EOF) {
|
||||
str = NewString("");
|
||||
str = NewStringEmpty();
|
||||
while ((c = Getc(in)) != '\n' && c != EOF) {
|
||||
Putc(c, str);
|
||||
}
|
||||
|
|
@ -536,7 +536,7 @@ DOH *
|
|||
DohReadline(DOH *in) {
|
||||
char c;
|
||||
int n = 0;
|
||||
DOH *s = NewString("");
|
||||
DOH *s = NewStringEmpty();
|
||||
while (1) {
|
||||
if (Read(in,&c,1) < 0) {
|
||||
if (n == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue