#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

void fatal(uint8_t err)
{
  printf("FATAL ERROR (%d)\n", err);
  exit(0);
}

void fatal_s(uint8_t err, uint16_t lineno,
             const char *s)
{
  printf("FATAL ERROR (%d) AT LINE %d. %s\n",
         err, lineno, s);
  exit(0);
}

void fatal_sc(uint8_t err, uint16_t lineno,
              const char *s, char ch)
{
  printf("FATAL ERROR (%d) AT LINE %d. %s: %c\n",
         err, lineno, s, ch);
  exit(0);
}

void fatal_si(uint8_t err, uint16_t lineno,
              const char *s, uint16_t i)
{
  printf("FATAL ERROR (%d) AT LINE %d. %s: %d\n",
         err, lineno, s, i);
  exit(0);
}
