Dr. Werner Fink 2013-10-25 15:10:10 +00:00 committed by Git OBS Bridge
parent 485ac3a597
commit e794e5b385

View File

@ -803,18 +803,16 @@
sh_offstate(SH_INTERACTIVE); sh_offstate(SH_INTERACTIVE);
if((foff = sfseek(sp,(Sfoff_t)0,SEEK_END)) > 0) if((foff = sfseek(sp,(Sfoff_t)0,SEEK_END)) > 0)
{ {
@@ -2170,6 +2183,10 @@ static void comsubst(Mac_t *mp,register @@ -2170,6 +2183,8 @@ static void comsubst(Mac_t *mp,register
stkseek(stkp,soff+foff+64); stkseek(stkp,soff+foff+64);
stkseek(stkp,soff); stkseek(stkp,soff);
} }
+ if(foff > IOBSIZE) + if(foff > IOBSIZE)
+ sfsetbuf(sp,NULL,SF_UNBOUND); + sfsetbuf(sp,NULL,SF_UNBOUND);
+ else
+ sfsetbuf(sp,(void*)sp,0);
while((str=(char*)sfreserve(sp,SF_UNBOUND,0)) && (c=bufsize=sfvalue(sp))>0) while((str=(char*)sfreserve(sp,SF_UNBOUND,0)) && (c=bufsize=sfvalue(sp))>0)
{ {
#if SHOPT_CRNL #if SHOPT_CRNL
@@ -2291,6 +2308,13 @@ static void mac_copy(register Mac_t *mp, @@ -2291,6 +2306,13 @@ static void mac_copy(register Mac_t *mp,
Stk_t *stkp=mp->shp->stk; Stk_t *stkp=mp->shp->stk;
int oldpat = mp->pattern; int oldpat = mp->pattern;
nopat = (mp->quote||(mp->assign==1)||mp->arith); nopat = (mp->quote||(mp->assign==1)||mp->arith);