if (ret >= remaining) ret = remaining - 1;
output_data (const char *format, ...){  va_list args;  size_t remaining, ret;  va_start(args, format);  remaining = BUFSIZ - (nfrontp - netobuf);  ret = vsnprintf (nfrontp,                   remaining,                   format,                   args);  nfrontp += ret;  va_end(args);  return ret;}