#include <stdio.h>

int width[256];

void Moveto_d(int y, int x) {
  fprintf(stdout, "0,%d,%d, ", y, x);
}

void Draw_Line_d(int y, int x) {
  fprintf(stdout, "-1,%d,%d, ", y, x);
}

static int lastx = 0, lasty = 0;
int this_ch, nasty;
static inline void xxmovetoabs(unsigned int x, unsigned int y, /* at draw scale */
                             int virtual_origin_x, int virtual_origin_y, /* at move scale */
                             int move_scale, int draw_scale) {
  nasty=x;
  Moveto_d((int)y-lasty,(int)x-lastx);
    lasty=(int)y;lastx=(int)x;
    if (y == 0) {
      fprintf(stdout, " 2");
      //fprintf(stderr, "set width %d to %d\n", this_ch, nasty);
      width[this_ch] = nasty;
    }
}

static inline void xxmovetorel(unsigned int dx, unsigned int dy, /* at draw scale */
                             int virtual_origin_x, int virtual_origin_y, /* at move scale */
                             int move_scale, int draw_scale) {

  Moveto_d(lasty=lasty+(int)dy,lastx=lastx+(int)dx);
}

static inline void xxlinetoabs(unsigned int x, unsigned int y, /* at draw scale */
                             int virtual_origin_x, int virtual_origin_y, /* at move scale */
                            int move_scale, int draw_scale) {

    Draw_Line_d((int)y-lasty,(int)x-lastx);
    lasty=(int)y; lastx=(int)x;

}

static inline void xxlinetorel(unsigned int dx, unsigned int dy, /* at draw scale */
                             int virtual_origin_x, int virtual_origin_y, /* at move scale */
                             int move_scale, int draw_scale) {

    Draw_Line_d(lasty=lasty+(int)dy,lastx=lastx+(int)dx);

}

#define moveAbs(x,y) xxmovetoabs((unsigned int)x,(unsigned int)y,virtual_origin_x,virtual_origin_y,move_scale,draw_scale)
#define lineAbs(x,y) xxlinetoabs((unsigned int)x,(unsigned int)y,virtual_origin_x,virtual_origin_y,move_scale,draw_scale)
#define moveRel(x,y) xxmovetorel((unsigned int)x,(unsigned int)y,virtual_origin_x,virtual_origin_y,move_scale,draw_scale)
#define lineRel(x,y) xxlinetorel((unsigned int)x,(unsigned int)y,virtual_origin_x,virtual_origin_y,move_scale,draw_scale)


// still work to do, to position string and letters within a string
unsigned int Protel(char charToPlot, int virtual_origin_x, int virtual_origin_y,
                                int move_scale, int draw_scale) {
  // this one includes lower case!
  // to do: final move to (relative) y=0 so text does not creep upwards

  lastx=0; lasty=0;
  moveAbs(0x0f,0x0f);	// min gap between letters, and sometimes starting position
  switch(charToPlot) {

    case 'A':
      lineAbs(0x0f,0x2f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x0f,0x2f);
      moveAbs(0x4f,0x2f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'B':
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x1f,0x6f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x1f,0x3f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'C':
      moveAbs(0x4f,0x5f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      moveAbs(0x6f,0x0);
      break;
    case 'D':
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x1f,0x6f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'E':
      moveAbs(0x4f,0x6f);
      lineAbs(0x0f,0x6f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x2f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'F':
      lineAbs(0x0f,0x6f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x2f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'G':
      moveAbs(0x4f,0x6f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x4f,0x0f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'H':
      lineAbs(0x0f,0x6f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x4f,0x6f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'I':
      lineAbs(0x2f,0x0f);
      moveAbs(0x1f,0x0f);
      lineAbs(0x1f,0x6f);
      moveAbs(0x0f,0x6f);
      lineAbs(0x2f,0x6f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case 'J':
      moveAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case 'K':
      lineAbs(0x0f,0x6f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x1f,0x3f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'L':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'M':
      lineAbs(0x0f,0x6f);
      lineAbs(0x2f,0x2f);
      lineAbs(0x4f,0x6f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'N':
      lineAbs(0x0f,0x6f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x4f,0x6f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'O':
      lineAbs(0x0f,0x6f);
      lineAbs(0x4f,0x6f);
      lineAbs(0x4f,0x0f);
      lineAbs(0x0f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'P':
      lineAbs(0x0f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x0f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'Q':
      moveAbs(0x0f,0x1f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      moveAbs(0x2f,0x2f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'R':
      lineAbs(0x0f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x0f,0x3f);
      moveAbs(0x1f,0x3f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'S':
      moveAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      moveAbs(0x6f,0x0);
      break;
    case 'T':
      moveAbs(0x0f,0x6f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x2f,0x6f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'U':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case 'V':
      moveAbs(0x0f,0x6f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x6f,0x6f);
      moveAbs(0x8f,0x0);//*/ moveAbs(0x7f,0x0); moveRel(0x10, 0);
      return 0x8fU;
      //break;
    case 'W':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x2f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x3f,0x2f);
      lineAbs(0x5f,0x0f);
      lineAbs(0x6f,0x1f);
      lineAbs(0x6f,0x6f);
      moveAbs(0x8f,0x0);//*/ moveAbs(0x7f,0x0); moveRel(0x10, 0);
      return 0x8fU;
      // break;
    case 'X':
      lineAbs(0x0f,0x1f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'Y':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x2f,0x3f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x2f,0x3f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'Z':
      moveAbs(0x0f,0x6f);
      lineAbs(0x4f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;

    case 'a':
      moveAbs(0x3f,0x1f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x3f,0x1f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'b':
      lineAbs(0x0f,0x6f);
      moveAbs(0x0f,0x2f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x0f,0x2f);
      moveAbs(0x6f,0x0);
      break;
    case 'c':
      moveAbs(0x4f,0x4f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'd':
      moveAbs(0x0f,0x1f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      moveAbs(0x4f,0x6f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'e':
      moveAbs(0x0f,0x2f);
      lineAbs(0x3f,0x2f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'f':
      moveAbs(0x1f,0x0f);
      lineAbs(0x1f,0x5f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 'g':
      moveAbs(0x0f,-0x1f);
      lineAbs(0x1f,-0x2f);
      lineAbs(0x3f,-0x2f);
      lineAbs(0x4f,-0x1f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'h':
      lineAbs(0x0f,0x6f);
      moveAbs(0x0f,0x2f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'i':
      lineAbs(0x0f,0x3f);
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x5f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case 'j':
      moveAbs(0x0f,-0x1f);
      lineAbs(0x1f,-0x2f);
      lineAbs(0x2f,-0x2f);
      lineAbs(0x3f,-0x1f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x3f,0x4f);
      lineAbs(0x3f,0x5f);
      moveAbs(0x5f,0x0);
      return 0x5f;
      //break;
    case 'k':
      lineAbs(0x0f,0x6f);
      moveAbs(0x0f,0x2f);
      lineAbs(0x2f,0x2f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x2f,0x2f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'l':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x3f,0x0);
      return 0x3f;
      break;
    case 'm':
      lineAbs(0x0f,0x4f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x2f,0x3f);
      lineAbs(0x2f,0x2f);
      moveAbs(0x2f,0x3f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'n':
      lineAbs(0x0f,0x4f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x3f,0x0f);
      moveAbs(0x5f,0x0);
      return 0x5f;
      break;
    case 'o':
      moveAbs(0x0f,0x1f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      moveAbs(0x6f,0x0);
      break;
    case 'p':
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x0f,0x3f);
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,-0x2f);
      moveAbs(0x6f,0x0);
      break;
    case 'q':
      moveAbs(0x4f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x4f,0x4f);
      lineAbs(0x4f,-0x2f);
      moveAbs(0x6f,0x0);
      break;
    case 'r':
      lineAbs(0x0f,0x4f);
      moveAbs(0x0f,0x2f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case 's':
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x2f);
      lineAbs(0x1f,0x2f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x6f,0x0);
      break;
    case 't':
      moveAbs(0x2f,0x6f);
      lineAbs(0x2f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      moveAbs(0x0f,0x4f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x6f,0x0);
      break;
    case 'u':
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x4f,0x4f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'v':
      moveAbs(0x0f,0x4f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x6f,0x0);
      break;
    case 'w':
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x2f,0x1f);
      lineAbs(0x2f,0x2f);
      moveAbs(0x2f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x6f,0x0);
      break;
    case 'x':
      lineAbs(0x4f,0x4f);
      moveAbs(0x0f,0x4f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case 'y':
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x4f,0x4f);
      lineAbs(0x4f,-0x1f);
      lineAbs(0x3f,-0x2f);
      lineAbs(0x1f,-0x2f);
      moveAbs(0x6f,0x0);
      break;
    case 'z':
      moveAbs(0x0f,0x4f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;

    case '0':
      moveAbs(0x0f,0x1f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x3f,0x5f);
      lineAbs(0x3f,0x1f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      moveAbs(0x5f,0x0);
      return 0x5f;
      //break;
    case '1':
      lineAbs(0x2f,0x0f);
      moveAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case '2':
      moveAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '3':
      moveAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x2f,0x3f);
      moveAbs(0x3f,0x3f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x0f,0x5f);
      moveAbs(0x6f,0x0);
      break;
    case '4':
      moveAbs(0x3f,0x0f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x6f,0x0);
      break;
    case '5':
      moveAbs(0x0f,0x1f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x3f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x0f,0x6f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case '6':
      moveAbs(0x0f,0x3f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x3f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case '7':
      lineAbs(0x0f,0x1f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x6f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case '8':
      moveAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x4f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x1f,0x3f);
      lineAbs(0x3f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case '9':
      moveAbs(0x1f,0x0f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x6f,0x0);
      break;

    case '/':
      lineAbs(0x0f,0x1f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case '?':
      moveAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x3f,0x5f);
      lineAbs(0x3f,0x4f);
      lineAbs(0x2f,0x3f);
      lineAbs(0x2f,0x2f);
      moveAbs(0x2f,0x1f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x5f,0x0);
      return 0x5f;
      //break;
    case ';':
      moveAbs(-0x1f,-0x1f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x0f,0x2f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x0f,0x4f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case ':':
      moveAbs(0x0f,0x1f);
      lineAbs(0x0f,0x2f);
      moveAbs(0x0f,0x3f);
      lineAbs(0x0f,0x4f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case '\'':
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case '"':
      moveAbs(0x0f,0x4f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x1f,0x6f);
      lineAbs(0x1f,0x4f);
      moveAbs(0x3f,0x0);
      return 0x3f;
      //break;
    case '[':
      moveAbs(0x2f,0x6f);
      lineAbs(0x0f,0x6f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case '{':
      moveAbs(0x2f,0x6f);
      lineAbs(0x1f,0x5f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x0f,0x3f);
      lineAbs(0x1f,0x2f);
      lineAbs(0x1f,0x1f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x4f,0x0);
      break;
    case ']':
      lineAbs(0x2f,0x0f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x4f,0x0);
      break;
    case '}':
      lineAbs(0x1f,0x1f);
      lineAbs(0x1f,0x2f);
      lineAbs(0x2f,0x3f);
      lineAbs(0x1f,0x4f);
      lineAbs(0x1f,0x5f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case '\\':
      moveAbs(0x0f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '|':
      lineAbs(0x0f,0x6f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case '-':
      moveAbs(0x0f,0x3f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case '_':
      moveAbs(0x0f,-0x1f);
      lineAbs(0x4f,-0x1f);
      moveAbs(0x6f,0x0);
      break;
    case '=':
      moveAbs(0x0f,0x2f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x4f,0x3f);
      lineAbs(0x0f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case '+':
      moveAbs(0x0f,0x3f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x2f,0x5f);
      lineAbs(0x2f,0x1f);
      moveAbs(0x6f,0x0);
      break;
    case '`':
      moveAbs(0x0f,0x6f);
      lineAbs(0x2f,0x4f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case '~':
      moveAbs(0x0f,0x1f);
      lineAbs(0x1f,0x2f);
      lineAbs(0x3f,0x2f);
      lineAbs(0x4f,0x3f);
      moveAbs(0x6f,0x0);
      break;
    case '!':
      lineAbs(0x0f,0x1f);
      moveAbs(0x0f,0x2f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      break;
    case '@':
      moveAbs(0x0f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x3f,0x6f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x2f,0x2f);
      lineAbs(0x2f,0x1f);
      moveAbs(0x6f,0x0);
      break;
    case '#':
      moveAbs(0x0f,0x2f);
      lineAbs(0x4f,0x2f);
      moveAbs(0x4f,0x4f);
      lineAbs(0x0f,0x4f);
      moveAbs(0x1f,0x6f);
      lineAbs(0x1f,0x0f);
      moveAbs(0x3f,0x0f);
      lineAbs(0x3f,0x6f);
      moveAbs(0x6f,0x0);
      break;
    case '$':
      moveAbs(0x0f,0x1f);
      lineAbs(0x3f,0x1f);
      lineAbs(0x4f,0x2f);
      lineAbs(0x3f,0x3f);
      lineAbs(0x1f,0x3f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x1f,0x5f);
      lineAbs(0x4f,0x5f);
      moveAbs(0x2f,0x6f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '%':
      lineAbs(0x0f,0x1f);
      lineAbs(0x4f,0x5f);
      lineAbs(0x4f,0x6f);
      moveAbs(0x1f,0x6f);
      lineAbs(0x0f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x1f,0x5f);
      lineAbs(0x1f,0x6f);
      moveAbs(0x4f,0x0f);
      lineAbs(0x4f,0x1f);
      lineAbs(0x3f,0x1f);
      lineAbs(0x3f,0x0f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '^':
      moveAbs(0x0f,0x4f);
      lineAbs(0x2f,0x6f);
      lineAbs(0x4f,0x4f);
      moveAbs(0x2f,0x6f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '&':
      moveAbs(0x4f,0x2f);
      lineAbs(0x2f,0x0f);
      lineAbs(0x1f,0x0f);
      lineAbs(0x0f,0x1f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x2f,0x5f);
      lineAbs(0x1f,0x6f);
      lineAbs(0x0f,0x5f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x4f,0x0f);
      moveAbs(0x6f,0x0);
      break;
    case '*':
      moveAbs(0x0f,0x1f);
      lineAbs(0x4f,0x5f);
      moveAbs(0x2f,0x5f);
      lineAbs(0x2f,0x1f);
      moveAbs(0x4f,0x3f);
      lineAbs(0x0f,0x3f);
      moveAbs(0x0f,0x5f);
      lineAbs(0x4f,0x1f);
      moveAbs(0x6f,0x0);
      break;
    case '(':
      moveAbs(0x2f,0x6f);
      lineAbs(0x0f,0x4f);
      lineAbs(0x0f,0x2f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case ')':
      lineAbs(0x2f,0x2f);
      lineAbs(0x2f,0x4f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case ',':
      moveAbs(-0x1f,-0x1f);
      lineAbs(0x0f,0x0f);
      lineAbs(0x0f,0x1f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case '.':
      lineAbs(0x0f,0x1f);
      moveAbs(0x2f,0x0);
      return 0x2f;
      //break;
    case '<':
      moveAbs(0x2f,0x6f);
      lineAbs(-0x1f,0x3f);
      lineAbs(0x2f,0x0f);
      moveAbs(0x4f,0x0);
      return 0x4f;
      //break;
    case '>':
      lineAbs(0x3f,0x3f);
      lineAbs(0x0f,0x6f);
      moveAbs(0x5f,0x0);
      return 0x4f;
      //break;

    default:
      moveAbs(0x0,0x0);	// try this
      return 0;
      break;
  }
  return 0x6f;
}

int main(int argc, char **argv) {
  int c;
  for (c = 0; c < 256; c++) width[c] = 0;
  for (c = 32; c < 128-1; c++) {
    this_ch = c;
    fprintf(stdout, "const int protel_%d[/*'%c'*/] = { ", c,c);
    Protel(c, 0,0, 127,127);
    fprintf(stdout, " };\n");
  }
  fprintf(stdout, "const int *protel[128-32-1] = { // VLp/synched list format\n");
  for (c = 32; c < 128-1; c++) {
    if ((c&7)==0) fprintf(stdout, " ");
    fprintf(stdout, " protel_%d,", c);
    if ((c&7)==7) fprintf(stdout, "\n");
  }
  fprintf(stdout, "\n};\n");
  fprintf(stdout, "const int protel_width[128-32-1] = {\n");
  for (c = 32; c < 128-1; c++) {
    if ((c&31)==0) fprintf(stdout, " ");
    fprintf(stdout, " %d,", width[c]);
    if ((c&31)==31) fprintf(stdout, "\n");
  }
  fprintf(stdout, "\n};\n");

  fflush(stdout); fflush(stderr);
  return 0;
}
