*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
struct outqueuenode {
struct outqueuenode *next, *back;
- void *buffer;
- char *textp;
+ char *buffer, *textp;
int textlen;
struct timeval printbefore;
struct treething *addr;
struct outqueuenode *entry;
entry= outqueue.tail;
- if (!entry || entry->addr || entry->textlen >= peroutqueuenode) {
+ if (!entry || entry->addr ||
+ entry->textlen >= peroutqueuenode - (entry->textp - entry->buffer)) {
peroutqueuenode= !peroutqueuenode || !entry || entry->addr ? 128 :
peroutqueuenode >= 1024 ? 4096 : peroutqueuenode<<2;
entry= xmalloc(sizeof(*entry));