home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / graph / ansi / ans2asc.arj / ANS2ASC.DOC next >
Encoding:
Text File  |  1991-12-01  |  11.7 KB  |  300 lines

  1.          ██      █    █     ████      ████       ██       ████      ████
  2.         █  █     ██   █    █    █    █    █     █  █     █    █    █    █
  3.        █    █    █ █  █    █             █     █    █    █         █
  4.        █    █    █  █ █     ████       ██      █    █     ████     █
  5.        ██████    █   ██         █     █        ██████         █    █
  6.        █    █    █    █    █    █    █         █    █    █    █    █    █
  7.        █    █    █    █     ████     ██████    █    █     ████      ████
  8.  
  9.                                   Version 1.0
  10.  
  11.                     This version is Public Domain Software,
  12.                                but remember it is
  13.                           an Alfα Softwαre Production!
  14.                                  December 1991.
  15.  
  16.       ╓──────────────────────────────────────────────────────────────────╖
  17.       ║      An program to convert ANSI-screens into ASCII-screens.      ║
  18.       ╙──────────────────────────────────────────────────────────────────╜
  19.       ╓──────────────────────────────────────────────────────────────────╖
  20.       ║                        A little history.                         ║
  21.       ╙──────────────────────────────────────────────────────────────────╜
  22.  
  23.       Sysops of a BBS will reconize the next problem. They have designed a
  24.       lot of ANSI-screens, with beautiful colors and cursor-movements and
  25.       then they discover they had to make ASCII-screens to. Mostly they
  26.       design their ANSI-screens with a special ANSI-paint-utility (for
  27.       example ANSI-PAINT of TheDraw), which have the abillity to save the
  28.       screens in both ANSI and ASCII formats. BUT, saving is a lot of
  29.       work, the full-filename must be entered, just as a lot of parameters
  30.       (like: clear the screen first, animation-speed).
  31.  
  32.       Well, as I installed a BBS for my own (Remote Acces, V1.10) (just
  33.       for practise and for answering my phone when I'm from home) and I
  34.       came to this problem. I like to design ANSI-screens, but dislike to
  35.       enter all the parameters, just for getting ASCII-screens to. So, as
  36.       programmer, I thought: "There must be an easier way to convert ANSI
  37.       to ASCII."
  38.  
  39.       Well, I looked into my documentation for the ANSI-codes, I draw my
  40.       Turbo-Pascal (V5.5) and my pascal-utillities (just for private
  41.       usage, sorry guys) from my diskette-box and began to design the idea
  42.       for ANS2ASC.
  43.  
  44.       I can tell, I managed in it and here is the result.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.       an Alfα Softwαre Production!          Page 1/5         December 1991
  60.       
  61.       ╓──────────────────────────────────────────────────────────────────╖
  62.       ║                          How it works.                           ║
  63.       ╙──────────────────────────────────────────────────────────────────╜
  64.  
  65.       Well, I can short about it, it works excelent (little joke  :-) ).
  66.  
  67.       Take an ANSI-screen. You will recornize them at the extension *.ANS.
  68.       Then type at your prompt:
  69.  
  70.             ___>  ANS2ASC  <Enter>
  71.                   you will be asked to enter the filename, for example:
  72.  
  73.                   Enter filename (Wildcards are OK) : [name].ANS
  74.  
  75.  
  76.             ___>  ANS2ASC  [name].ANS  <Enter>
  77.  
  78.       After returning to the prompt, you can give DIR and you see the
  79.       extra file [name].ASC.
  80.  
  81.       While converting ANS2ASC use an array, which is supposed to be the
  82.       screen (80 columns width, 60 lines high). ANS2ASC will first read
  83.       the whole ANSI-file and will place all the characters in this array.
  84.       ANS2ASC will convert cursor-movements into the right way, so at the
  85.       end of the reading the array contains the whole ANSI-screen. The
  86.       last thing ANS2ASC must do is writing the whole array into the
  87.       ASCII-file. While writing ANS2ASC will NOT write the spaces at the
  88.       end of the lines and ANS2ASC will NOT save the empty lines at the
  89.       end of the array (at the end of the screen). So a screen of 10 lines
  90.       ANSI is 10 lines in ASCII.
  91.  
  92.       As soon as the ANSI-file will clear the screen, the ASCII-file will
  93.       begin with a formfeed (the ASCII-value is 12d, you know the female
  94.       symbol).
  95.  
  96.       Al the other characters will be converted one at one into the
  97.       ASCII-array.
  98.  
  99.       As (maybe) known, will ANSI-codes begin with an <Esc> (ASCII-value
  100.       is 27d). As soon as ANS2ASC reads an <Esc>, it will think "Aha, this
  101.       is an ANSI-code." They are explained later in this DOC-file.
  102.  
  103.       ╓──────────────────────────────────────────────────────────────────╖
  104.       ║              What will ANS2ASC show on the screen.               ║
  105.       ╙──────────────────────────────────────────────────────────────────╜
  106.  
  107.       While ANS2ASC is converting, it will generate some messages on the
  108.       screen:
  109.  
  110.  
  111.       => Enter filename (Wildcards are OK) :
  112.             You are prompted to enter the filenames. As you can see, you
  113.             may enter wildcards. ANS2ASC will take the files, which fit
  114.             with these wildcards (just like *.* or *.ANS).
  115.  
  116.  
  117.  
  118.  
  119.       an Alfα Softwαre Production!          Page 2/5         December 1991
  120.       
  121.       => Files to convert [filenames].[extensions]
  122.              ANS2ASC prompted the filename again, which it will convert
  123.              (here too, you can see wildcard if you entered them).
  124.  
  125.       => Extens. Error!> ANS2ASC.DOC
  126.              ANS2ASC attends you, that he can only convert ANSI-files,
  127.              which have an extension of ".ANS".
  128.  
  129.       => Directory not found!
  130.              The given filename could not be found. You entered NO
  131.              filename, or just the drive specification (C: with nothing
  132.              more).
  133.  
  134.       => ..Converting  > HDDD.ANS
  135.              ANS2ASC have found an ANSI-file and is converting it.
  136.  
  137.       => O  Converted  > HDDD.ANS
  138.              ANS2ASC have converted the ANSI-file into an ASCII-file.
  139.  
  140.       => Reading Error!> HDDD.ANS
  141.              ANS2ASC could not read the ANSI-file.
  142.  
  143.       => Writing Error!> HDDD.ANS
  144.              ANS2ASC could not write the ASCII-file.
  145.  
  146.       ╓──────────────────────────────────────────────────────────────────╖
  147.       ║               Which ANSI-codes will be converted.                ║
  148.       ╙──────────────────────────────────────────────────────────────────╜
  149.  
  150.       ANS2ASC will convert the next ANSI-codes, more didnot tell my
  151.       documentation.
  152.  
  153.       Cursor position movements, like
  154.  
  155.       <Esc> [ nn A             Cursor up       (if no nn is given, cursor
  156.                                                goes one line up).
  157.  
  158.       <Esc> [ nn B             Cursor down     (if no nn is given, cursor
  159.                                                goes one line down).
  160.  
  161.       <Esc> [ nn C             Cursor forward  (if no nn is given, cursor
  162.                                                goes one column forward).
  163.  
  164.       <Esc> [ nn D             Cursor backward (if no nn is given, cursor
  165.                                                goes one column backward).
  166.  
  167.       <Esc> [ yy ; xx F        same as the next one!!!!
  168.       <Esc> [ yy ; xx H        Cursor position, the cursor goes to line yy
  169.                                                and column xx (if no xx and
  170.                                                yy are given, cursor goes
  171.                                                to the home position (the
  172.                                                left-upper corner of the
  173.                                                screen)).
  174.  
  175.  
  176.  
  177.  
  178.  
  179.       an Alfα Softwαre Production!          Page 3/5         December 1991
  180.       
  181.       <Esc> [ 2 J              Erase the screen. As soon as this ANSI-code
  182.                                          is present in the ANSI-file, the
  183.                                          ASCII-file will begin with an
  184.                                          formfeed-symbol (ASCII(12)).
  185.  
  186.       <Esc> [ K                Erase the line, from cursor position till
  187.                                            the end. This sequence isnot
  188.                                            built in yet. This code will be
  189.                                            ignored (it will not be present
  190.                                            in the ASCII-file).
  191.  
  192.       <Esc> [ at ; .. ; at m   Set graphic Attributes. This code will just
  193.                                            be ignored, as ASCII cann't
  194.                                            use colors and screen
  195.                                            attrbutes. Mostly this will be
  196.                                            the codes you will remove form
  197.                                            ANSI-files, for getting
  198.                                            ASCII-files.
  199.  
  200.       <Esc> = ???? h           Set mode. This function isnot clear at me,
  201.                                          I could not understand it from my
  202.                                          documentation. This code will
  203.                                          simply be ignored (it will not be
  204.                                          present in the ASCII-file).
  205.  
  206.       <Esc> = ???? l           Reset mode. This function isnot clear at
  207.                                          me too, I could not understand it
  208.                                          from my documentation. This code
  209.                                          will simply be ignored (it will
  210.                                          not be present in the
  211.                                          ASCII-file).
  212.  
  213.       <Esc> [ s                Save cursor position.
  214.  
  215.       <Esc> [ u                Restore cursor position, which have been
  216.                                        saved with "<Esc> [ s". The default
  217.                                        position is the left-upper corner
  218.                                        of the screen.
  219.  
  220.       ╓──────────────────────────────────────────────────────────────────╖
  221.       ║                             Results.                             ║
  222.       ╙──────────────────────────────────────────────────────────────────╜
  223.  
  224.       I have converted all my BBS-ANSI-screens with ANS2ASC, none of them
  225.       contains errors, or did ANS2ASC do strange things.
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.       an Alfα Softwαre Production!          Page 4/5         December 1991
  240.       
  241.       ╓──────────────────────────────────────────────────────────────────╖
  242.       ║                     Reclaimes and donations.                     ║
  243.       ╙──────────────────────────────────────────────────────────────────╜
  244.  
  245.       This program is Public Domain. Althought I paid a very lot of
  246.       attentions at doing strange things, you can never complain when your
  247.       harddisk seems to be empty (if you use ANS2ASC, or if even you
  248.       don't).
  249.  
  250.       But if you think: "Hey, nice program", then you can donate some mony
  251.       at one of my accounts:
  252.  
  253.         account        Bank                Country    Name
  254.         16.18.31.893   Rabobank            Holland    J.C.A. Niewenhuis
  255.         84.55.01.208   Verenigde spaarbank Holland    J.C.A. Niewenhuis
  256.  
  257.       Please donate as many as you can miss, as I am still trying to get a
  258.       job, I have to live with to few money. So extra money will be
  259.       very welcome.
  260.  
  261.       ╓──────────────────────────────────────────────────────────────────╖
  262.       ║                   Last words from the writer.                    ║
  263.       ╙──────────────────────────────────────────────────────────────────╜
  264.  
  265.       Sorry, when I have used strange english, sorry for writing-errors. I
  266.       wasnot a good studuent in my English-lessons. But if the meaning are
  267.       understood, I know: "What a nice piece of documentation did I
  268.       write."
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.       an Alfα Softwαre Production!          Page 5/5         December 1991
  300.