mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
Another attempt at getting buffer growth right
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
80c87c0a06
commit
97b5e1c179
1 changed files with 8 additions and 14 deletions
|
@ -723,14 +723,11 @@ if (dst == 0) \
|
||||||
* reset the offset into the local buffer on the \
|
* reset the offset into the local buffer on the \
|
||||||
* stack and pretend the buffer has grown. \
|
* stack and pretend the buffer has grown. \
|
||||||
*/ \
|
*/ \
|
||||||
ptr = buf - bsize; \
|
ptr = buf - dpos; \
|
||||||
if (extra == 0) \
|
bsize = dpos + BUFSIZ; \
|
||||||
|
if (extra != 0) \
|
||||||
{ \
|
{ \
|
||||||
bsize += BUFSIZ; \
|
bsize--; \
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
bsize += BUFSIZ-1; \
|
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
else if (zone == 0) \
|
else if (zone == 0) \
|
||||||
|
@ -1247,14 +1244,11 @@ if (dst == 0) \
|
||||||
* reset the offset into the local buffer on the \
|
* reset the offset into the local buffer on the \
|
||||||
* stack and pretend the buffer has grown. \
|
* stack and pretend the buffer has grown. \
|
||||||
*/ \
|
*/ \
|
||||||
ptr = buf - bsize; \
|
ptr = buf - dpos; \
|
||||||
if (extra == 0) \
|
bsize = dpos + BUFSIZ; \
|
||||||
|
if (extra != 0) \
|
||||||
{ \
|
{ \
|
||||||
bsize += BUFSIZ; \
|
bsize--; \
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
bsize += BUFSIZ-1; \
|
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
else if (zone == 0) \
|
else if (zone == 0) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue