home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB140 / grlib03a.arj / EFONT.C < prev    next >
Text File  |  1988-12-19  |  16KB  |  694 lines

  1. /************************************************************************/
  2. /*                                    */
  3. /*    File Name: EFONT.C            Created: 24-Jan-85    */
  4. /*                                    */
  5. /*----------------------------------------------------------------------*/
  6. /*              Update & Modification Table            */
  7. /*                                    */
  8. /*  Current Version Number (if any):                    */
  9. /*                                    */
  10. /*  Date    Action                            */
  11. /*  ====    ======                            */
  12. /*                                    */
  13. /* 01-Feb-85    Banner changed to double width, double height.        */
  14. /*        Use any key to toggle a cell in             */
  15. /*                                    */
  16. /* 27-Apr-85    Conversion to MSDOS                    */
  17. /* 15-May-85    Conversion to V3.0 of Graphics Library            */
  18. /*                                    */
  19. /*----------------------------------------------------------------------*/
  20. /*                                    */
  21. /*    Author:        Ian Houlding,                    */
  22. /*            CISC Basingstoke,                */
  23. /*            Hampshire.                    */
  24. /*                                    */
  25. /*    (c) Digital Equipment Co. Ltd. 1985                */
  26. /*                                    */
  27. /************************************************************************/
  28.  
  29. #include <stdio.h>
  30. #include <graph.h>
  31. #include <color3.h>
  32. #include <key.h>
  33.  
  34. #define ON    1
  35. #define OFF    0
  36.  
  37. #define TRUE    1
  38. #define FALSE    0
  39.  
  40. #define US_CUR  4
  41. #define BOX_CUR 5
  42.  
  43. #define ROW_MIN    30
  44. #define ROW_MAX    120
  45. #define COL_MIN 160
  46. #define COL_MAX 216
  47.  
  48. #define CH_ROW    ROW_MIN + 50
  49. #define CH_COL    COL_MAX + 24
  50.  
  51. #define ROW_1    190
  52. #define ROW_2    160
  53. #define COL_1    64
  54.  
  55. #define BEEP()    putchar('\007')
  56.  
  57. #define x_pos    t_x
  58. #define y_pos    t_y
  59.  
  60. int  cell_idx,
  61.      cur_row,
  62.      cur_state,
  63.      cur_cnt;
  64.  
  65. char hdg[] = " GRAPHIC FONT GENERATOR ";
  66.  
  67. main(argc, argv)
  68. int  argc;
  69. char *argv[];
  70. {
  71.     if (argc < 2 || argc > 3) {
  72.     printf("usage: efont reference_font_name font_file_name\n");
  73.     exit(1);
  74.     }
  75.     if (openws(0, SMIDCOL) == EOF) exit(1);
  76.     if (argc == 3) init1(argv[1], argv[2]);
  77.     else init1(argv[1], "");
  78.     menu(argv[2]);
  79.     kill_gr();
  80. }
  81.  
  82. init1(r_fnt, f_nam)
  83. char *r_fnt, *f_nam;
  84. {
  85.     register int i;
  86.     register unsigned char *s;
  87.     char fnt_nam[41];
  88.  
  89.     strcpy(fnt_nam, r_fnt);
  90.     strcat(fnt_nam, ".set");
  91.     if (ld_font(fnt_nam, 0) == EOF) exit(1);
  92.     if (*f_nam) {
  93.     strcpy(fnt_nam, f_nam);
  94.     strcat(fnt_nam, ".set");
  95.     if (ld_font(fnt_nam, 1) == EOF) exit(1);
  96.     }
  97.     else {
  98.     s = tfonts[1] = malloc(2560);
  99.     for(i = 0; i < 2560; i++) *s++ = 0xFF;
  100.     }
  101.     s = tfonts[2] = malloc(2560);
  102.     for(i = 0; i < 2560; i++) *s++ = 0xFF;
  103.     cell_idx = 0;
  104.     s = tfonts[2]->f_char[2];
  105.     for(i = 0; i < 10; i++) *s++ = 0;    /* solid block for large character */
  106.     s += 18;
  107.     *s++ = 0, *s++ = 0;            /* underscore cursor */
  108.     *s++ = 0;                /* box cursor */
  109.     for(i = 0; i < 8; i++) *s++ = 0x7E;
  110.     *s = 0;
  111.     g_on();
  112. }
  113.  
  114. init2()
  115. {
  116.     register int i;
  117.     int pnts[4];
  118.  
  119.     cur_off(US_CUR);
  120.     clearws();
  121.     l_col = MAGENTA;
  122.     pnts[0] = CH_COL - 2;
  123.     pnts[1] = CH_ROW - 2;
  124.     pnts[2] = CH_COL + 9;
  125.     pnts[3] = CH_ROW + 11;
  126.     rectangle(pnts);
  127.     pnts[0] = COL_MIN - 1;
  128.     pnts[1] = ROW_MIN - 1;
  129.     pnts[2] = COL_MAX + 8;
  130.     pnts[3] = ROW_MAX + 10;
  131.     rectangle(pnts);
  132.     gtext(0,0,"");        /* put graphics option into text mode */
  133.     x_pos = COL_1;
  134.     cur_row = y_pos = ROW_1;
  135.     t_font = 0;
  136.     disp_fnts();
  137.     t_sca = DH_DW;
  138.     g_string(0, 0, hdg, RED, CYAN);
  139.     t_sca = SH_SW;
  140.     i = 23 - (ROW_MAX / 10);
  141.     g_string(2, i, "Hex", YELLOW, BLACK);    i += 2;
  142.     g_string(2, i, "Oct", YELLOW, BLACK);    i += 2;
  143.     g_string(2, i, "Dec", YELLOW, BLACK);    i += 2;
  144.     g_string(0, i, "Ascii", YELLOW, BLACK);
  145.     sho_big_cell(1, 0);
  146.     sho_data();
  147.     x_pos = COL_1;
  148.     cur_row = y_pos = ROW_1;
  149. }
  150.  
  151. menu(argv)
  152. char *argv;
  153. {
  154.     int i, flag;
  155.     FILE *fptr;
  156.     char f_nam[41];
  157.  
  158.     flag = 0;
  159. RESTART:
  160.     if (flag) {
  161.     init2();
  162.     while ((i = getkey()) != EXIT) mod_font(i);
  163.     }
  164.     else flag++;
  165. START:
  166.     if (argv) strcpy(f_nam, argv);
  167.     else f_nam[0] = '\0';
  168.     cur_off(US_CUR);
  169.     clearws();
  170.     t_font = 0;
  171.     t_sca = DH_DW;
  172.     g_string(0, 0, hdg, RED, CYAN);
  173.     t_sca = SH_SW;
  174.     g_string(7,  6, " 1 -- Enter FONT Generator     ", RED, YELLOW);
  175.     g_string(7,  8, " 2 -- Save FONT in .SET file   ", RED, YELLOW);
  176.     g_string(7, 10, " 3 -- Get FONT to edit         ", RED, YELLOW);
  177.     g_string(7, 12, " 4 -- EXIT, IGNORE CHANGES     ", RED, YELLOW);
  178.     i = (inkey() & 0x3F);
  179.     switch(i) {
  180.     case '1' :
  181.         goto RESTART;
  182.     case '2' :
  183.         g_string(0, 21, "Destination FONT file name -", YELLOW, BLACK);
  184.         g_string(29,21,((f_nam[0]) ? f_nam : "        "),GREEN,DGREY);
  185.         g_string(29,21, "", GREEN, DGREY);
  186.         i = get_str(f_nam, 8);
  187.         if (i == EXIT) goto RESTART;
  188.         strcat(f_nam, ".set");
  189.         if ((fptr = fopen(f_nam, "wb")) == NULL) {
  190.         g_error(0, 23, " Unable to open destination file ");
  191.         goto START;
  192.         }
  193.         fwrite(tfonts[1], 2560, 1, fptr);
  194.         fclose(fptr);
  195.         goto START;
  196.     case '3' :
  197.         g_string(0, 21, " FONT file name to edit -", YELLOW, BLACK);
  198.         g_string(26,21,((f_nam[0]) ? f_nam : "        "),GREEN,DGREY);
  199.         g_string(26,21, "", GREEN, DGREY);
  200.         i = get_str(f_nam, 8);
  201.         if (i == EXIT || f_nam[0] == 0) goto RESTART;
  202.         strcat(f_nam, ".set");
  203.         if ((fptr = fopen(f_nam, "rb")) == NULL) {
  204.         g_error(0, 23, " Unable to open source file ");
  205.         goto START;
  206.         }
  207.         ld_font(f_nam, 1);
  208.         fclose(fptr);
  209.         goto RESTART;
  210.     case '4' :
  211.         break;
  212.     }
  213. }
  214.  
  215. mod_font(i)
  216. int i;
  217. {
  218.     int  row_flag, tmpx, tmpy;
  219.     unsigned char *s, *d;
  220.  
  221.     t_font = 1;
  222.     row_flag = FALSE;
  223.     switch(i) {
  224.     case HELP :
  225.         ef_help();
  226.         break;
  227.     case UP   :
  228.         cell_idx -= 32;
  229.         if (cell_idx < 0) cell_idx += 256;
  230.         row_flag = TRUE;
  231.         if (cur_row == ROW_2) cur_row = ROW_1;
  232.         break;
  233.     case DOWN :
  234.         cell_idx += 32;
  235.         if (cell_idx > 255) cell_idx -= 256;
  236.         row_flag = TRUE;
  237.         if (cur_row == ROW_1) cur_row = ROW_2;
  238.         break;
  239.     case LEFT :
  240.         cell_idx--;
  241.         if (cell_idx < 0) cell_idx = 255;
  242.         if ((cell_idx % 32) == 31) {
  243.         row_flag = TRUE;
  244.         if (cur_row == ROW_2) cur_row = ROW_1;
  245.         }
  246.         break;
  247.     case RGHT :
  248.         cell_idx++;
  249.         if (cell_idx == 256) cell_idx = 0;
  250.         if ((cell_idx % 32) == 0) {
  251.         row_flag = TRUE;
  252.         if (cur_row == ROW_1) cur_row = ROW_2;
  253.         }
  254.         break;
  255.     case SEL  :
  256.         cur_off(US_CUR);
  257.         s = tfonts[1]->f_char[cell_idx];
  258.         d = tfonts[2]->f_char[0];
  259.         for(i=0; i < 10; i++) *d++ = *s++;
  260.         i = chg_cell();
  261.         x_pos = COL_1 + ((cell_idx % 32) << 3);
  262.         y_pos = cur_row;
  263.         break;
  264.     case RET  :
  265.         cell_idx -= (cell_idx % 32);
  266.         break;
  267.     case PF1  :            /* lift reference font character */
  268.         s = tfonts[0]->f_char[cell_idx];
  269.         d = tfonts[2]->f_char[1];
  270.         for(i = 0; i < 10; i++) *d++ = *s++;
  271.         break;
  272.     case PF2  :            /* lift new font character */
  273.         s = tfonts[1]->f_char[cell_idx];
  274.         d = tfonts[2]->f_char[1];
  275.         for(i = 0; i < 10; i++) *d++ = *s++;
  276.         break;
  277.     case PF3  :            /* put lifted font character down */
  278.         s = tfonts[2]->f_char[1];
  279.         d = tfonts[1]->f_char[cell_idx];
  280.         for(i = 0; i < 10; i++) *d++ = *s++;
  281.         cur_off(US_CUR);
  282.         txt_col(CYAN, BLACK);
  283.         gchar(cell_idx);
  284.         x_pos -= 8;
  285.         break;
  286.     default   :
  287.         if (i) BEEP();
  288.         i = 0;
  289.     }
  290.     if (i && i != SEL && i != EXIT && i != DO) {
  291.     cur_off(US_CUR);
  292.     sho_data();
  293.     x_pos = ((cell_idx % 32) << 3) + COL_1;
  294.     if (row_flag == TRUE) disp_fnts();
  295.     }
  296.     if (i == DO) {
  297.     s = tfonts[2]->f_char[0];
  298.     d = tfonts[1]->f_char[cell_idx];
  299.     for(i = 0; i < 10; i++) *d++ = *s++;
  300.     disp_fnts();
  301.     }
  302.     if (i) {
  303.     tmpx = x_pos, tmpy = y_pos;
  304.     x_pos = COL_MAX + 24, y_pos = ROW_MIN + 50;
  305.     txt_col(WHITE, BLACK);
  306.     gchar(cell_idx);
  307.     sho_big_cell(1, cell_idx);
  308.     t_font = 0;
  309.     x_pos = tmpx, y_pos = tmpy;
  310.     txt_col(WHITE, BLACK);
  311.     }
  312.     chk_cur(US_CUR);
  313. }
  314.  
  315. get_char(y, ch, str)
  316. int y;
  317. char *ch, *str;
  318. {
  319.     int i;
  320.  
  321.     if (*ch == 0) g_string(32, y, " ", GREEN, DGREY);
  322.     x_pos -= 8;
  323.     while (i != EXIT && i != DO && i != RET) {
  324.     i = toupper(getkey());
  325.     if (i && in(i, str)) {
  326.         cur_off(US_CUR);
  327.         gchar(i);
  328.         *ch = i;
  329.         break;
  330.     }
  331.     chk_cur(US_CUR);
  332.     }
  333.     if (i == EXIT || i == DO) return(i);
  334.     else return(0);
  335. }
  336.  
  337. in(i, str)
  338. char i, *str;
  339. {
  340.     while (*str) {
  341.     if (i == *str++) return(TRUE);
  342.     }
  343.     return(FALSE);
  344. }
  345.  
  346. get_str(str, cnt)
  347. char *str;
  348. int  cnt;
  349. {
  350.     register int i, c;
  351.     char string[41];
  352.     int tx, tfnt;
  353.  
  354.     tfnt = t_font;
  355.     t_font = 0;
  356.     for(i = 0; i < 9; string[i++] = 0);
  357.     c = 0;
  358.     while ((i = getkey()) != EXIT && i != RET && i != DO) {
  359.     if (i && c == 0) {
  360.         cur_off(US_CUR);
  361.         tx = x_pos;
  362.         for(c = cnt; c > 0; c--) gchar(' ');
  363.         x_pos = tx;
  364.     }
  365.     if (i == BS || i == DEL) {
  366.         if (c) {
  367.         cur_off(US_CUR);
  368.         x_pos -= 8;
  369.         gchar(' ');
  370.         x_pos -= 8;
  371.         string[--c] = 0;
  372.         }
  373.         else BEEP();
  374.     }
  375.     else if (i && c < cnt) {
  376.         i = toupper(i);
  377.         gchar(i);
  378.         string[c++] = i;
  379.     }
  380.     else if (i) BEEP();
  381.     chk_cur(US_CUR);
  382.     }
  383.     string[c] = 0;
  384.     cur_off(US_CUR);
  385.     if ((i == RET || i == DO) && string[0]) strcpy(str, string);
  386.     t_font = tfnt;
  387.     return(i);
  388. }
  389.  
  390. char *spec_arry[4] = {"%3x","%03o","%3d","  %c"};
  391.  
  392. sho_data()
  393. {
  394.     char num_str[4];
  395.     register int i, y;
  396.     int tmpx, tfnt;
  397.  
  398.     tfnt = t_font;
  399.     t_font = 0;
  400.     tmpx = x_pos;
  401.     y = 23 - (ROW_MAX / 10);
  402.     for(i = 0; i < 4; i++) {
  403.     sprintf(num_str, spec_arry[i], cell_idx);
  404.     g_string(6, y, num_str, WHITE, BLACK);
  405.     y += 2;
  406.     }
  407.     x_pos = tmpx;
  408.     y_pos = cur_row;
  409.     t_font = tfnt;
  410. }
  411.  
  412. disp_fnts()
  413. {
  414.     int tmpx, tfnt;
  415.  
  416.     tfnt = t_font;
  417.     tmpx = x_pos;
  418.     sho_fnt(0);
  419.     sho_fnt(1);
  420.     txt_col(DGREY, GREEN);
  421.     x_pos = tmpx;
  422.     y_pos = cur_row;
  423.     t_font = tfnt;
  424. }
  425.  
  426. sho_fnt(fnt)
  427. int fnt;
  428. {
  429.     register int i, idx;
  430.  
  431.     t_font = fnt;
  432.     x_pos = COL_1;
  433.     y_pos = ROW_1;
  434.     if (fnt == 0) {
  435.     txt_col(YELLOW, DGREY);
  436.     y_pos += 10;
  437.     }
  438.     else txt_col(CYAN, BLACK);
  439.     idx = cell_idx - (cell_idx % 32);
  440.     if (cur_row == ROW_2) {
  441.     idx -= 32;
  442.     if (idx < 0) idx += 256;
  443.     }
  444.     for(i = 0; i < 64; i++) {
  445.     gchar(idx++);
  446.     if (idx == 256) idx = 0;
  447.     if ((idx % 32) == 0) {
  448.         x_pos = COL_1;
  449.         y_pos -= 30;
  450.     }
  451.     }
  452. }
  453.  
  454. chg_cell()
  455. {
  456.     register int i, k;
  457.     int idx, tfnt;
  458.  
  459.     tfnt = t_font;
  460.     t_font = 2;
  461.     sho_big_cell(2, 0);
  462.     x_pos = COL_MIN;
  463.     y_pos = ROW_MAX;
  464.     idx = 0;
  465.     while ((i = getkey()) != EXIT && i != DO) {
  466.     if ((i == UP || i == DOWN || i == LEFT || i == RGHT || i == RET)
  467.          && cur_state == ON) cur_off(BOX_CUR);
  468.     switch(i) {
  469. GO_UP:        case UP  :
  470.         y_pos += 10;
  471.         idx--;
  472.         if (y_pos > ROW_MAX) {
  473.             y_pos = ROW_MIN;
  474.             idx = 9;
  475.         }
  476.         break;
  477. GO_DN:        case DOWN :
  478.         y_pos -= 10;
  479.         idx++;
  480.         if (y_pos < ROW_MIN) {
  481.             y_pos = ROW_MAX;
  482.             idx = 0;
  483.         }
  484.         break;
  485.         case DEL  :
  486.         case LEFT :
  487.         x_pos -= 8;
  488.         if (x_pos < COL_MIN) {
  489.             x_pos = COL_MAX;
  490.             goto GO_UP;
  491.         }
  492.         break;
  493.         case RGHT :
  494.         x_pos += 8;
  495. GO_RT:        if (x_pos > COL_MAX) {
  496.             x_pos = COL_MIN;
  497.             goto GO_DN;
  498.         }
  499.         break;
  500.         case RET  :
  501.         x_pos = COL_MIN;
  502.         break;
  503.         case REM  :
  504.         for(k = 0; k < 10; tfonts[2]->f_char[0][k++] = 0xff);
  505.         cur_off(BOX_CUR);
  506.         sho_big_cell(2, 0);
  507.         x_pos = COL_MIN;
  508.         y_pos = ROW_MAX;
  509.         idx = 0;
  510.         break;
  511.         default   :
  512.         if (i >= ' ' && i < DEL) {
  513.             k = (128 >> ((x_pos - COL_MIN) >> 3));
  514.             tfonts[2]->f_char[0][idx] ^= k;
  515.             cur_off(BOX_CUR);
  516.             txt_col(DGREY, GREEN);
  517.             gchar((tfonts[2]->f_char[0][idx] & k) ? 2 : 3);
  518.             sho_char(2, 0);
  519.             goto GO_RT;
  520.         }
  521.         else if (i) BEEP();
  522.     }
  523.     chk_cur(BOX_CUR);
  524.     }
  525.     cur_off(BOX_CUR);
  526.     t_font = tfnt;
  527.     return(i);
  528. }
  529.  
  530. sho_big_cell(fnt, fchar)
  531. int fnt, fchar;
  532. {
  533.     register int msk, x;
  534.     int idx, tfnt;
  535.     unsigned char str[9], *c;
  536.  
  537.     tfnt = t_font;
  538.     t_font = 2;
  539.     c = tfonts[fnt]->f_char[fchar];
  540.     idx = str[8] = 0;
  541.     for(y_pos = ROW_MAX; y_pos >= ROW_MIN; idx++, y_pos -= 10) {
  542.     msk = 128;
  543.     for(x = 0; x < 8; msk >>= 1, x++) str[x] = (c[idx] & msk) ? 2 : 3;
  544.     sho_char(fnt, fchar);
  545.     g_string((COL_MIN >> 3), ((230 - y_pos) / 10), str, DGREY, GREEN);
  546.     }
  547.     t_font = tfnt;
  548. }
  549.  
  550. sho_char(fnt, fchar)
  551. int fnt, fchar;
  552. {
  553.     int tmpx, tmpy, tfnt;
  554.  
  555.     tfnt = t_font;
  556.     t_font = fnt;
  557.     tmpx = x_pos;
  558.     tmpy = y_pos;
  559.     x_pos = COL_MAX + 24;
  560.     y_pos = ROW_MIN + 50;
  561.     txt_col(WHITE, BLACK);
  562.     gchar(fchar);
  563.     x_pos = tmpx;
  564.     y_pos = tmpy;
  565.     t_font = tfnt;
  566. }
  567.  
  568. cur_off(c)
  569. char c;
  570. {
  571.     if (cur_state == ON) put_cur(c);
  572.     cur_state = OFF;
  573.     cur_cnt = 0x200;
  574. }
  575.  
  576. chk_cur(c)
  577. char c;
  578. {
  579.     if (--cur_cnt < 0) cur_cnt = 0x200;
  580.     if (cur_cnt) return;
  581.     else {
  582.     cur_state = (cur_state == ON) ? OFF : ON;
  583.     cur_cnt = (cur_state == ON) ? 0x300 : 0x200;
  584.     put_cur(c);
  585.     }
  586. }
  587.  
  588. put_cur(c)
  589. char c;
  590. {
  591.     int tfnt, tcol;
  592.  
  593.     tfnt = t_font;
  594.     tcol = fgbg;
  595.     t_font = 2;
  596.     setwmode(COMPLIMENT);
  597.     txt_col(DGREY, BLACK);
  598.     t_font = 2;
  599.     gchar(c);
  600.     x_pos -= 8;
  601.     setwmode(REPLACE);
  602.     fgbg = tcol;
  603.     gdc_nb();
  604.     a_fgbg();
  605.     t_font = tfnt;
  606. }
  607.  
  608. g_error(x, y, str)
  609. int x, y;
  610. char *str;
  611. {
  612.     int i, j;
  613.  
  614.     for(i = 0; i < 10; i++) {
  615.     g_string(x, y, str, RED, YELLOW);
  616.     for(j = 0; j < 10000; j++);
  617.     g_string(x, y, str, BLACK, YELLOW);
  618.     for(j = 0; j < 10000; j++);
  619.     }
  620. }
  621.  
  622. g_string(x, y, str, f, b)
  623. int x, y, f, b;
  624. char *str;
  625. {
  626.     x_pos = (x << 3);
  627.     y_pos = 230 - (y * 10);
  628.     txt_col(f, b);
  629.     while (*str) gchar(*str++);
  630. }
  631.  
  632. txt_col(f, b)
  633. int f, b;
  634. {
  635.     fgbg = ((f << 4) | b);
  636.     gdc_nb();
  637.     a_fgbg();
  638. }
  639.  
  640. ef_help()
  641. {
  642.     cur_off(US_CUR);
  643.     dis_gr();
  644.     save_ws(0);
  645.     openws(1, SHIGHCOL);
  646.     g_on();
  647.     if ((gr_data[1].ws_flags & WS_SAVED) == 0) {
  648.     t_sca = DH_DW;
  649.     g_string(24, 1, " FONT GENERATOR HELP PAGE ", RED, CYAN);
  650.     t_sca = SH_DW;
  651.     g_string(24, 2, " Type any key to continue ", YELLOW, CYAN);
  652.     g_string(0, 5," Select Mode ", RED, CYAN);
  653.     t_sca = SH_SW;
  654.     g_string(4, 7, "ARROW KEYS -", RED, BLACK);
  655.     g_string(17,7, "Enables you to move the cursor around the font to the desired position", YELLOW, BLACK);
  656.     g_string(4, 8, "RETURN     -", RED, BLACK);
  657.     g_string(17,8, "Places the cursor at the start of the current row", YELLOW, BLACK);
  658.     g_string(4, 9, "Select     -", RED, BLACK);
  659.     g_string(17,9, "Puts you into 'Modify' mode to change the character uder the cursor", YELLOW, BLACK);
  660.     g_string(4,10, "PF1        -", RED, BLACK);
  661.     g_string(17,10,"Picks up the character uder the cursor which is in the reference font (Top Rows)", YELLOW, BLACK);
  662.     g_string(4,11, "PF2        -", RED, BLACK);
  663.     g_string(17,11,"As for PF1 except it picks up the character in the edited font (Bottom Rows)", YELLOW, BLACK);
  664.     g_string(4, 12,"PF3        -", RED, BLACK);
  665.     g_string(17,12,"Drops the character picked up with PF1 or PF2 at the current position", YELLOW, BLACK);
  666.     g_string(4, 13,"EXIT       -", RED, BLACK);
  667.     g_string(17,13,"Return to the Main Menu", YELLOW, BLACK);
  668.  
  669.     t_sca = SH_DW;
  670.     g_string(0, 16," Modify Mode ", RED, CYAN);
  671.     t_sca = SH_SW;
  672.     g_string(4,18, "ARROW KEYS -", RED, BLACK);
  673.     g_string(17,18,"Moves the cursor to the required pixel location within the character cell", YELLOW, BLACK);
  674.     g_string(4,19, "RETURN     -", RED, BLACK);
  675.     g_string(17,19,"Moves the cursor to the left hand end of the current row", YELLOW, BLACK);
  676.     g_string(4,20, "REMOVE     -", RED, BLACK);
  677.     g_string(17,20,"Clears the whole area to the background colour", YELLOW, BLACK);
  678.     g_string(4,21, "DO         -", RED, BLACK);
  679.     g_string(17,21,"Accepts all changes and reverts you to 'SELECT' mode", YELLOW, BLACK);
  680.     g_string(4,22, "EXIT       -", RED, BLACK);
  681.     g_string(17,22,"As for DO but ignores any changes that have been made", YELLOW, BLACK);
  682.     g_string(4,23, "OTHER KEYS -", RED, BLACK);
  683.     g_string(17,23,"Toggles the current pixel location on or off", YELLOW, BLACK);
  684.     save_ws(1);
  685.     }
  686.     else restore_ws(1);
  687.     inkey();
  688.     dis_gr();
  689.     openws(0, SMIDCOL);
  690.     g_on();
  691.     restore_ws(0);
  692. }
  693. 
  694.