Browse Source

fix scan_to_sa (Tim Lorenz)

master
Felix von Leitner 16 years ago
parent
commit
becc322e12
  1. 1
      CHANGES
  2. 6
      textcode/scan_to_sa.c

1
CHANGES

@ -1,4 +1,5 @@
0.24:
fix scan_to_sa (Tim Lorenz)
0.23:
also recognize EPFNOSUPPORT as EAFNOSUPPORT (groan)

6
textcode/scan_to_sa.c

@ -4,10 +4,10 @@
unsigned long scan_to_sa(unsigned long (*func)(const char*,char*,unsigned long*),
const char* src,stralloc* sa) {
unsigned long scanned;
unsigned long written;
unsigned long r;
if (!stralloc_readyplus(sa,str_len(src))) return 0;
if ((r=func(src,sa->s+sa->len,&scanned)))
sa->len+=r;
if ((r=func(src,sa->s+sa->len,&written)))
sa->len+=written;
return r;
}
Loading…
Cancel
Save