home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / ME494-6.ZIP / SRC / HYPEPRIN.SRC < prev    next >
Encoding:
Text File  |  1990-03-30  |  2.5 KB  |  117 lines

  1. $MACRO HYPEPRIN;
  2. {*******************************MULTI-EDIT MACRO******************************
  3.  
  4. Name: hypeprin
  5.  
  6. Description:  Takes the current .HLP file and generates a .DOC file complete
  7.     with Multi-Edit Print Formatter formatting codes.
  8.  
  9.                              (C) Copyright 1989 by American Cybernetics, Inc.
  10.  
  11. ******************************************************************************}
  12.  
  13.     def_str(out_line,tstr, bold_str[20], end_bold_str[20], under_str[20],end_under[20]);
  14.     def_int(jx,rt_margin,lm,cl,tm);
  15.     def_int( w_in, w_out );
  16.     def_char(tc);
  17.  
  18.     undo_stat := false;
  19.     rt_margin := 2;
  20.     lm := 78;
  21.     tm := 2;
  22.     refresh := false;
  23.     w_in := cur_window;
  24.     out_line := file_name;
  25.     create_window;
  26.     file_name := truncate_extension(out_line) + '.DOC';
  27.     RM('EXTSETUP');
  28.     w_out := cur_window;
  29.     put_line('.np.rm78.lm2.tm1.bm62.fm64.ff1.tc 78 1 8 1 8 1 8 1 8 1 8 1');
  30.     down;
  31.     put_line('.df1.ce pg .pa');
  32.     down;
  33.     switch_window(w_in);
  34.  
  35.     tof;
  36.     while not(at_eof) do
  37.         put_line_num( c_line );
  38.         if check_key then
  39.             if key1 = 27 then
  40.                 goto exit;
  41.             end;
  42.         end;
  43.         goto_col(1);
  44.         if cur_char = '|12' then
  45.             out_line := get_word(' ');
  46.             right;
  47.             out_line := get_word('');
  48.             switch_window(w_out);
  49.             goto_col(1);
  50.             if c_line <> 1 then
  51.                 text('|12');
  52.             end;
  53.             down;
  54.             goto_col(1);
  55.             text('.ce.te1.e1' + out_line + '.e0');
  56.             down;
  57.             down;
  58.             down;
  59.             switch_window(w_in);
  60.             down;
  61.         else
  62.             out_line := '';
  63.             while not(at_eol) do
  64.                 out_line := out_line + get_word('^@');
  65.                 if not(at_eol) then
  66.                     tc := cur_char;
  67.                     right;
  68.                     if tc = '@' then
  69.                         if cur_char = '@' then
  70.                             out_line := out_line + '@';
  71.                             right;
  72.                             goto do_loop;
  73.                         end;
  74.                         tstr := get_word('[');
  75.                         right;
  76.                         if cur_char = '!' then
  77.                             right;
  78.                         end;
  79.                         out_line := out_line + '.e1' + get_word(']') + '.e0';
  80.                         right;
  81.                         goto do_loop;
  82.                     else
  83.                         if cur_char = '^' then
  84.                             out_line := out_line + '^';
  85.                             right;
  86.                             goto do_loop;
  87.                         end;
  88.                         if cur_char = 'B' then
  89.                             out_line := out_line + '.e1';
  90.                             right;
  91.                             goto do_loop;
  92.                         end;
  93.                         if cur_char = 'b' then
  94.                             out_line := out_line + '.e0';
  95.                             right;
  96.                             goto do_loop;
  97.                         end;
  98.                         right;
  99.                         goto do_loop;
  100.                     end;
  101.                 end;
  102.          do_loop:
  103.             end;
  104.             switch_window(w_out);
  105.             put_line(out_line);
  106.             down;
  107.             switch_window(w_in);
  108.             down;
  109.             goto_col(1);
  110.         end;
  111.     end;
  112. exit:
  113.     switch_window(w_out);
  114.     undo_stat := true;
  115. end_macro;
  116.  
  117.