home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / text / edit / FrexxEdA.lha / FrexxEd / fpl / FACT.FPL < prev    next >
Text File  |  1995-07-19  |  1KB  |  37 lines

  1. {
  2.   string hex[16]={"0", "1", "2", "3", "4", "5", "6", "7",
  3.                   "8", "9", "A", "B", "C", "D", "E", "F"};
  4.   
  5.   int counter;        /* A counter to the for()loops */
  6.   int oldvisible;
  7.   
  8.   oldvisible=Visible(0);  /* We turn off the visible flag to get a
  9.                  smooth execution. We also store the old
  10.                  visible flag in order to restore it. */
  11.   
  12.       /* Change ASCII 0-31 to display reversed "\xx" */
  13.   
  14.   for (counter=0; counter<=31; counter++)
  15.     if (counter!='\t' && counter!='\n')// Don't change the tab or newline sign
  16.       FACT(counter, 'S',        // Assign a new string
  17.            joinstr("#R\\", hex[counter>>4], hex[counter&15]));
  18.   
  19.   
  20.       /* Change ASCII 128-159 to display reversed "\xx" */
  21.   
  22.   for (counter=128; counter<=159; counter++)
  23.     FACT(counter, 'S',        // Assign a new string
  24.          joinstr("#R\\", hex[counter>>4], hex[counter&15]));
  25.   
  26.   
  27.        /* Change the 'NotEndOfLine' sign to a '»' */
  28.   FACT(-2, 'S', "»");
  29.   
  30.   
  31.         /* Setup the 'EndOfFile' sign */
  32.   FACT(-1, 'S', "#REnd of file!");
  33.   
  34.   
  35.   Visible(oldvisible);    /* Restore the visible flag. */
  36. }
  37.