X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fscansbr.c;h=c5f032924e83d172eb669839fe73946f8db81ea2;hp=6a9278bbd539895d2f636d2c8a16abba032c45cc;hb=2f689a1cb907a5de04e6d39ffd217a69af3216c7;hpb=d9c0d17aa110ec0e5db5f0928fead5a1ff60a9e2 diff --git a/uip/scansbr.c b/uip/scansbr.c index 6a9278b..c5f0329 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -81,11 +81,11 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, int i, compnum, encrypted, state; unsigned char *cp, *tmpbuf; char **nxtbuf; - char *saved_c_text; + char *saved_c_text = NULL; struct comp *cptr; struct comp **savecomp; - char *scnmsg; - FILE *scnout; + char *scnmsg = NULL; + FILE *scnout = NULL; char name[NAMESZ]; static int rlwidth, slwidth; @@ -256,6 +256,8 @@ body:; while (state == BODY) { #ifdef LINUX_STDIO if (scnout->_IO_write_ptr == scnout->_IO_write_end) { +#elif defined(__DragonFly__) + if (((struct __FILE_public *)scnout)->_w <= 0) { #else if (scnout->_cnt <= 0) { #endif @@ -266,6 +268,10 @@ body:; state = m_getfld(state, name, scnout->_IO_write_ptr, (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end , inb); scnout->_IO_write_ptr += msg_count; +#elif defined(__DragonFly__) + state = m_getfld( state, name, ((struct __FILE_public *)scnout)->_p, -(((struct __FILE_public *)scnout)->_w), inb ); + ((struct __FILE_public *)scnout)->_w -= msg_count; + ((struct __FILE_public *)scnout)->_p += msg_count; #else state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb ); scnout->_cnt -= msg_count;