Example #1
0
static int copy_body(void)
{
  int sawcr = 0;		/* Was the last character a CR */
  unsigned linepos = 0;		/* The number of bytes since the last LF */
  int sawperiod = 0;		/* True if the first character was a period */
  char ch;

  data_start();
  while (ibuf_getc(&inbuf, &ch)) {
    switch (ch) {
    case LF:
      if (sawperiod && linepos == 0) { message_end(); return 1; }
      data_byte(ch);
      sawperiod = sawcr = linepos = 0;
      break;
    case CR:
      if (sawcr) { data_byte(CR); ++linepos; }
      sawcr = 1;
      break;
    default:
      if (ch == PERIOD && !sawperiod && linepos == 0)
	sawperiod = 1;
      else {
	sawperiod = 0;
	if (sawcr) { data_byte(CR); ++linepos; sawcr = 0; }
	data_byte(ch); ++linepos;
      }
    }
  }
  return 0;
}
Example #2
0
void message2 (const font_t *f, const char *line1, const char *line2)
{
	dmd_alloc_low_clean ();
	font_render_string_center (f, 64, 10, line1);
	font_render_string_center (f, 64, 22, line2);
	message_end ();
}
Example #3
0
void *dlopen(const char* pathname, int mode)
{
    message_start();
    message_string("Warning: dummy dlopen called with argument `");
    message_string(pathname);
    message_string("'.\n");
    message_string(" The statically-linked runtime has failed to load this library.");
    message_end();
    return 0;
}
Example #4
0
void message1 (const font_t *f, const char *line)
{
	dmd_alloc_low_clean ();
	font_render_string_center (f, 64, 16, line);
	message_end ();
}