home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / ME494-6.ZIP / EXIT.SRC < prev    next >
Encoding:
Text File  |  1990-06-12  |  16.2 KB  |  599 lines

  1. $MACRO_FILE EXIT;
  2. {******************************************************************************
  3.                                                     MULTI-EDIT MACRO FILE EXIT
  4.  
  5. EXIT - Standard exit routine
  6. RESTORE - Restores editor according to file created by STATUS
  7. STATUS - Creates restore file.
  8.  
  9.                              (C) Copyright 1989 by American Cybernetics, Inc.
  10. ******************************************************************************}
  11.  
  12. $MACRO EXIT FROM EDIT TRANS;
  13. {******************************************************************************
  14.                                                                 MULTI-EDIT MACRO
  15.  
  16. Name:    EXIT
  17.  
  18. Description:  If any files are changed and not saved this macro displays them
  19.                             and asks for user verification.  The user is given the choice of
  20.                             quitting without saving, saving and then quitting, or cancelling
  21.                             the operation.
  22.  
  23.                             This macro also takes care of deleting any .TMP files created by
  24.                             disk swapping.  There should only be .TMP files left if the
  25.                             quit without saving option was selected, since the SAVE_FILE
  26.                             function automatically deletes the .TMP file for that buffer.
  27.  
  28. Parameters:
  29.                             /BC=  Only relevant when called via the menu system.  Tells EXIT
  30.                                         how many boxes to kill.
  31.                             /NP=  If 1, and there are modified files in memory, the usual
  32.                                         "Do you want to save these files?" prompt will not appear,
  33.                                         but the files will be unconditionally saved.
  34.  
  35.                              (C) Copyright 1989 by American Cybernetics, Inc.
  36. ******************************************************************************}
  37.  
  38.     Def_Int(Old_Refresh,Temp_Integer,Not_Saved,Temp_Window,X1,X2,Y1,Y2,Str_X,
  39.                      t_bc, jx, jy );
  40.     Def_Str(Temp_String);
  41.  
  42.     Old_Refresh := Refresh;
  43.     Refresh := False;
  44.     Temp_Window := CUR_WINDOW;
  45.     working;
  46.  
  47.     IF global_str('@ME_EXIT_MACRO@') <> '' THEN
  48.         RM( global_str('@ME_EXIT_MACRO@') );
  49.         IF return_int = 0 THEN
  50.             goto end_of_mac;
  51.         END;
  52.     END;
  53.  
  54.     t_bc := Parse_Int('/BC=', mparm_str);
  55.     while box_count > t_bc DO
  56.         kill_box;
  57.     END;
  58.  
  59. {Check to see how many files are not saved}
  60.     Temp_Integer := 1;
  61.     Not_Saved := 0;
  62.     While (Temp_Integer <= Window_Count) Do
  63.         Switch_Window(Temp_Integer);
  64.         IF (window_attr and $80) = 0 THEN
  65.  
  66. { START OF ASV MODIFICATION NO 1 }
  67.       IF (global_int(Truncate_Extension(Truncate_Path(File_Name)) + '.' +
  68.                      global_str('autosave_ext'))) THEN
  69.         File_Changed := TRUE;
  70.       END;
  71. { END OF ASV MODIFICATION NO 1 }
  72.  
  73.             If (File_Changed) Then
  74.                 Not_Saved := Not_Saved + 1;
  75.             End;
  76.         END;
  77.         ++Temp_Integer;
  78.     End;
  79.  
  80.  
  81.     If (Not_Saved > 13) Then
  82.         Not_Saved := 13;
  83.     End;
  84.  
  85. {If there are any unsaved files, make a warning box}
  86.     If (Not_Saved) Then
  87.         IF (parse_int('/NP=',mparm_str)) THEN
  88.             goto skip_prompt;
  89.         END;
  90.         X1 := 5;
  91.         Y1 := 4;
  92.         X2 := X1 + 56;
  93.         Y2 := Y1 + 6 + Not_Saved;
  94.         Put_Box(X1,Y1,X2,Y2,0,m_b_color,'FILES NOT SAVED!  ARE YOU SURE YOU WANT TO QUIT?',True);
  95.         Write('The following files are not saved:',X1 + 2,Y1 + 3,0,m_t_Color);
  96.         Write('WINDOW     FILE NAME',X1 + 2,Y1 + 4,0,m_s_Color);
  97.         Temp_Integer := 1;
  98.         Not_Saved := 0;
  99.         While (Temp_Integer <= Window_Count) and (Not_Saved < 13) DO
  100.             Switch_Window(Temp_Integer);
  101.             IF (window_attr and $80) = 0 THEN
  102.                 If (File_Changed) Then
  103.                     Write(window_name + '    ' + File_Name,X1 + 5,Y1 + 5 + Not_Saved,0,m_t_Color);
  104.                     ++Not_Saved;
  105.                 End;
  106.             END;
  107.             ++Temp_Integer;
  108.         End;
  109.         update_status_line;
  110.         RM('USERIN^XMENU /X=' + str(x1 + 14) +
  111.                                                         '/Y=' + str(y1 + 1) +
  112.                                                         '/S=1/M=No(EXIT)Yes()Save-files-and-quit()');
  113.  
  114.         Temp_Integer := return_int;
  115.         Kill_Box;
  116.         If (Temp_Integer = 3) THEN
  117. skip_prompt:
  118.             working;
  119.             Make_Message('Saving files...');
  120.  
  121. { START OF ASV MODIFICATION NO 2 }
  122.             RM('MESYS^AUTOSAVE /EX=1');
  123. { END OF ASV MODIFICATION NO 2 }
  124.  
  125.             IF (Return_Int <> 0) THEN
  126.                 Goto END_OF_MAC;
  127.             END;
  128.             Goto Go_Quit;
  129.         END;
  130.         If (Temp_Integer = 1) THEN
  131.             Goto End_OF_Mac;
  132.         END;
  133.         If (Temp_Integer = 2) Then
  134.             Goto Go_Quit;
  135.         End;
  136.     ELSE
  137.         Goto Go_Quit;
  138.     END;
  139.     Goto End_OF_Mac;
  140. GO_QUIT:
  141.  
  142. { START OF ASV MODIFICATION NO 3 }
  143.       {RM('MESYS^AUTOSAVE /EX=2');}
  144.       RM('autosave^AUTOSAVE /EX=2');
  145. { END OF ASV MODIFICATION NO 3 }
  146.  
  147.     Switch_Window(Temp_Window);
  148.  
  149.     rm('setup^check_setup /X=10/Y=3');
  150.     IF return_int < 1 THEN
  151.         goto End_Of_Mac;
  152.     END;
  153.     working;
  154.     If Global_Int('RESTORE') THEN
  155.         Set_Global_Str('@TREE_PARMS@', '');
  156.         Set_Global_Str('COM_LINE_PARAMS', '');
  157.  
  158.  
  159.         {Clear out unneeded globals}
  160.  
  161.       JX := 12;
  162.       temp_string := '0ISTR_';
  163.       CALL CLEAR_GLOBAL_LIST;
  164.  
  165.       JX := 12;
  166.       temp_string := 'X0ISTR_';
  167.       CALL CLEAR_GLOBAL_LIST;
  168.  
  169.       jx := global_int('@KEYMACRO_COUNT@');
  170.     temp_string := '@KM!#';
  171.       CALL CLEAR_GLOBAL_LIST;
  172.  
  173.       set_global_int('@KEYMACRO_COUNT@', 0 );
  174.     set_global_str('@KMTEMP!#','');
  175.  
  176.  
  177.         RM('STATUS');
  178.  
  179.     END;
  180. Quit2:
  181.  
  182.     refresh := false;
  183.  
  184.     status_row := 0;
  185.     Rest_Dos_Screen;
  186.     QUIT(0);
  187.  
  188.     goto end_of_mac;
  189.  
  190. CLEAR_GLOBAL_LIST:
  191.   JY := 0;
  192.   WHILE JY < JX DO
  193.     ++JY;
  194.     SET_GLOBAL_STR( temp_string + STR(JY), '' );
  195.   END;
  196.   RET;
  197.  
  198.  
  199. END_OF_MAC:
  200.     Switch_Window(Temp_Window);
  201.     Refresh := Old_Refresh;
  202.  
  203. END_MACRO;
  204.  
  205. $MACRO RESTORE TRANS;
  206. {******************************************************************************
  207.                                                                 MULTI-EDIT MACRO
  208.  
  209. Name:    RESTORE
  210.  
  211. Description: This macro uses the file STATUS.ME and restores the editor exactly
  212.                          to the conditions contained therein.
  213.  
  214.                              (C) Copyright 1989 by American Cybernetics, Inc.
  215. ******************************************************************************}
  216.     Def_Int(Temp_Integer,Status_Window,Active_Window,Temp_Window,X1,Y1,X2,Y2, count);
  217.     Def_Str( TStr );
  218.  
  219.     Refresh := False;
  220.     Messages := False;
  221.     Error_Level := 0;
  222.     working;
  223.     Call CLEAR_LINK_GLOBALS;
  224.     IF Global_Int('@RESTORE_USE_ME_PATH') THEN
  225.         Load_File(me_path + user_id + 'STATUS.ME');
  226.     ELSE
  227.         Load_File(user_id + 'STATUS.ME');
  228.     END;
  229.     Status_Window := Cur_Window;
  230.     If (ERROR_LEVEL <> 0) Then
  231.         Temp_Integer := error_level;
  232.         refresh := TRUE;
  233. {
  234. Make_Message( '3002 error. Cur_window=' + Str(Cur_Window) + ' Window_Id=' + Str(Window_Id) + ' Window_Count=' + STr(Window_Count));
  235. Read_Key;
  236. There is a bug in DELWIN, or a macro that DELWIN runs that behaves differently
  237. if ERROR_LEVEL <> 0 upon entry.}
  238. Error_Level := 0;
  239.         rm('WINDOW^DELWIN');
  240. {
  241. Make_Message( 'After DELWIN. Cur_window=' + Str(Cur_Window) + ' Window_Id=' + Str(Window_Id) + ' Window_Count=' + STr(Window_Count));
  242. Read_Key;
  243. }
  244.  
  245.         IF (temp_integer = 3002) THEN
  246. {
  247.         IF (ERROR_LEVEL = 3002) THEN
  248. }
  249.             Error_Level := 0;
  250.         ELSE
  251.             RM('MEERROR^Beeps /C=1');
  252.             Make_Message('ERROR OCCURRED DURING RESTORE MACRO!  Press any key for error message.');
  253.             Error_level := temp_integer;
  254.             Read_Key;
  255.  
  256.         END;
  257.         Goto END_OF_MAC;
  258.     End;
  259.     IF remove_Space(get_line) <> remove_space('@MULTI-EDIT VERSION ' + version) THEN
  260.         refresh := TRUE;
  261. {
  262. Make_Message( 'Different version. Cur_window=' + Str(Cur_Window) + ' Window_Id=' + Str(Window_Id) + ' Window_Count=' + STr(Window_Count));
  263. Read_Key;
  264. }
  265.         rm('WINDOW^DELWIN');
  266. {
  267. Make_Message( 'After DELWIN. Cur_window=' + Str(Cur_Window) + ' Window_Id=' + Str(Window_Id) + ' Window_Count=' + STr(Window_Count));
  268. Read_Key;
  269. }
  270.         Make_Message( ' STATUS FILE CREATED WITH DIFFERENT VERSION.  RESTORE ABORTED.');
  271.         Goto END_OF_MAC;
  272.     END;
  273.     Make_Message('Restoring previous status of the editor.');
  274.  
  275.     Set_Virtual_Display;
  276.     count := 0;
  277.     While NOT( At_EOF ) Do
  278.         TStr := Get_Line;
  279.         IF Parse_Int('/W=',Tstr) <> 0 THEN
  280.             WORKING;
  281.             Temp_Integer := (Parse_Int('/A=',TStr) = 1);
  282.             Switch_Window( Window_Count );
  283.             Create_Window;
  284.             IF temp_integer THEN
  285.                 active_window := window_id;
  286.             END;
  287.             Temp_Window := Cur_Window;
  288.             temp_integer := XPOS('/ZOOM=', tstr, 1 );
  289.             IF temp_integer <> 0 THEN
  290.                 set_global_str('!WINZOOM#' + str(window_id),
  291.                                                 copy(tstr,temp_integer + 6, 80 ) );
  292.                 tstr := copy(tstr, 1, temp_integer - 1);
  293.                 IF global_str('!WINZOOM#' + str(window_id)) <> '' THEN
  294.                     zoom_char := parse_str( '/ZC=', Global_Str('!WINZOOM#' + str(window_id)) );
  295.                 END;
  296.             END;
  297.             File_Name := Parse_Str('/FN=',TStr);
  298. {Restore window coordinates while checking for out of bounds}
  299.             X1 := Parse_Int('/X1=',TStr);
  300.             IF (X1 < Min_Window_Col) THEN
  301.                 X1 := Min_Window_Col;
  302.             END;
  303.             Y1 := Parse_Int('/Y1=',TStr);
  304.             IF (Y1 < Min_Window_Row) THEN
  305.                 Y1 := Min_Window_Row;
  306.             END;
  307.             X2 := Parse_Int('/X2=',TStr);
  308.             IF (X2 > Max_Window_Col) THEN
  309.                 X2 := Max_Window_Col;
  310.             END;
  311.             Y2 := Parse_Int('/Y2=',TStr);
  312.             IF (Y2 > Max_Window_Row) THEN
  313.                 Y2 := Max_Window_Row;
  314.             END;
  315.             IF x2 <> 0 THEN
  316.                 Size_Window(X1,Y1,X2,Y2);
  317.             END;
  318.             IF (Parse_Int('/LS=',TStr)) THEN
  319. {It doesn't look like link_status and buffer_Id work right.  The following code
  320. is written for if it works right.  Following that is some "work around" code.}
  321. {
  322. {If file is linked to another see if it is the first occurance or not}
  323.                 IF (Global_Int('Buffer_Id' + Parse_Str('/BI',Tstr))) THEN
  324. {If not, link it to the window with the first occurance but don't load a file}
  325.                     Link_Window(Global_Int('Buffer_Id' + Parse_Str('/BI',Tstr)));
  326.                 ELSE
  327. {If so, set a global integer to indicate a first occurance and to store the
  328. window number of that one and then load the file}
  329.                     Set_Global_Int('Buffer_Id' + Parse_Str('/BI',Tstr),Cur_Window);
  330.                     Goto LOAD_IT;
  331.                 END;
  332. }
  333. {If file is linked to another see if it is the first occurance or not}
  334.                 IF (Global_Int('Buffer_Id' + Parse_Str('/LS',Tstr))) THEN
  335. {If not, link it to the window with the first occurance but don't load a file}
  336.                     Link_Window(Global_Int('Buffer_Id' + Parse_Str('/LS',Tstr)));
  337.                 ELSE
  338. {If so, set a global integer to indicate a first occurance and to store the
  339. window number of that one and then load the file}
  340.                     Set_Global_Int('Buffer_Id' + Parse_Str('/LS',Tstr),Cur_Window);
  341.                     Goto LOAD_IT;
  342.                 END;
  343.             ELSE
  344. LOAD_IT:
  345.                 If (File_Name <> '?No-File?') Then
  346.                     XLoad_File(File_Name);
  347.                 End;
  348.                 RM( 'EXTSETUP');
  349.             END;
  350.             File_Changed := False;
  351.             Goto_Col( Parse_int('/IL=',TStr));
  352.             Set_Indent_Level;
  353.             X1 := Parse_Int('/R=',TStr);
  354.             While C_Row < X1 DO
  355.                 X2 := C_ROW;
  356.                 Down;
  357.                 IF X2 = C_Row THEN
  358.                     Goto WEX;
  359.                 END;
  360.             END;
  361.         WEX:
  362.             Wrap_Stat := Parse_Int('/WS=',TStr);
  363.             Right_Margin := Parse_Int('/RM=', tstr );
  364.             Indent_Style := Parse_Int('/IS=',TStr);
  365.             x1 := Parse_Int('/D=', tstr);
  366.             IF x1 > 0 THEN
  367.                 Doc_Mode := x1;
  368.             END;
  369.             Temp_Integer := Parse_Int('/BS=',TStr);
  370.             If (Temp_Integer = 1) Then
  371.                 Block_Begin;
  372.               Block_End;
  373.               block_line1 := Parse_Int('/BL1=',TStr);
  374.               block_line2 := Parse_Int('/BL2=',TStr);
  375.             End;
  376.             If (Temp_Integer = 2) OR (Temp_Integer = 3) THEN
  377.                 IF Temp_Integer = 2 THEN
  378.                     Col_Block_Begin;
  379.                 ELSE
  380.                     STR_Block_Begin;
  381.                 END;
  382.                 right;
  383.                 Block_End;
  384.               block_line1 := Parse_Int('/BL1=',TStr);
  385.               block_line2 := Parse_Int('/BL2=',TStr);
  386.               block_col1 := Parse_Int('/BC1=',TStr);
  387.               block_col2 := Parse_Int('/BC2=',TStr);
  388.             End;
  389.             Goto_Col( Parse_Int('/C=',TStr));
  390.             Goto_Line( Parse_Int('/L=',TStr));
  391.             Window_Attr := Parse_Int('/WA=',TStr);
  392.             w_Bottom_line := Parse_int('/BTML=', tstr);
  393.             window_name := Parse_Str('/WNM=', tstr);
  394.             screen_num := parse_int('/SN=', tstr );
  395.             Switch_Window(Status_Window);
  396.             Goto MainLoop;
  397.         END;
  398.         IF Parse_Int('/MISC=',TStr) THEN
  399.             Insert_Mode := Parse_Int('/I=',TStr);
  400.             IF ((Video_Mode) <> (Parse_Int('/V=',TStr))) THEN
  401.                 Reset_Virtual_Display;
  402.                 Toggle_Video;
  403.                 RM('SETSCRN');
  404.                 Make_Message('Restoring previous status of the editor.');
  405.                 Set_Virtual_Display;
  406.             END;
  407.             Goto MAINLOOP;
  408.         END;
  409.         TStr := Copy(TStr,1,7);
  410.         IF (TStr = '/G_STR=') OR (tstr = '/G_INT=') THEN
  411.             goto do_globals;
  412.         END;
  413.     MAINLOOP:
  414.         Down;
  415.     End;
  416.  
  417.     WHILE NOT( AT_EOF ) DO
  418.  
  419. DO_GLOBALS:
  420.         TStr := Copy(Get_Line,1,7);
  421.         IF TStr = '/G_STR=' THEN
  422.             TStr := Copy(Get_Line,8,20);
  423.             Down;
  424.             Set_Global_Str(TStr,reconvert_string(Get_Line));
  425.         ELSIF TStr = '/G_INT=' THEN
  426.             TStr := Copy(Get_Line,8,20);
  427.             Down;
  428.             IF Val(Temp_Integer, Get_Line) = 0 THEN
  429.                 Set_Global_Int(TStr,Temp_Integer);
  430.             END;
  431.         END;
  432.         DOWN;
  433.     END;
  434.  
  435.     Call CLEAR_LINK_GLOBALS;
  436.  
  437.     Switch_Window(Status_Window);
  438.     IF (Window_Count > 2) THEN
  439. {This is a "just in case" thing so that if there are no /W= commands in
  440. STATUS.ME, you will at least have one open window}
  441.         Delete_Window;
  442.         Switch_Win_Id(Active_Window);
  443.     ELSE
  444.         Erase_Window;
  445.     END;
  446.     RM('WINDOW^FindWin');
  447.     set_global_int('MENU_LEVEL', 0 );
  448.     set_global_int('SETUP_CHANGED', 0 );
  449.  {RM('SETSCRN');}
  450.  
  451.     Refresh := True;
  452.     New_Screen;
  453.     Make_Message('Previous status of the editor restored.');
  454.     Goto END_OF_MAC;
  455.  
  456.  
  457. CLEAR_LINK_GLOBALS:
  458.     Temp_Integer := 1;
  459.     WHILE (Temp_Integer < Window_Count) DO
  460.         Set_Global_Int('Buffer_Id' + Str(Temp_Integer),0);
  461.         ++ Temp_Integer;
  462.     END;
  463.     RET;
  464.  
  465. END_OF_MAC:
  466.     update_virtual_display;
  467.     reset_virtual_display;
  468.     Messages := True;
  469.  
  470. END_MACRO;
  471.  
  472. $MACRO STATUS TRANS;
  473. {******************************************************************************
  474.                                                                 MULTI-EDIT MACRO
  475.  
  476. Name:    STATUS
  477.  
  478. Description: This macro saves the current status of the editor for the purpose
  479.                          of restoring the editor to exactly the state it was in.
  480.  
  481.                              (C) Copyright 1989 by American Cybernetics, Inc.
  482. ******************************************************************************}
  483.  
  484. Def_Int( JY,jx, Active_Window, Status_Window, Temp_Window, temp_backup );
  485. Def_Str( TStr );
  486.  
  487.     temp_backup := backups;
  488.     backups := false;
  489.     Undo_Stat := False;
  490.     Refresh := False;
  491.     Messages := False;
  492.     Active_Window := Cur_Window;
  493.  
  494. {Find the numerically highest window}
  495.     Switch_Window(Window_Count);
  496. {Create a window to store all status data}
  497.     Create_Window;
  498.     Status_Window := Cur_Window;
  499.     IF Global_Int('@RESTORE_USE_ME_PATH') THEN
  500.         File_Name := me_path + user_id + 'STATUS.ME';
  501.     ELSE
  502.         File_Name := user_id + 'STATUS.ME';
  503.     END;
  504.     Put_Line( '@MULTI-EDIT VERSION ' + remove_space(version) );
  505.     down;
  506.  
  507.     TStr := '/MISC=1' +
  508.                     '/I=' + Str(Insert_Mode) +
  509.                     '/V=' + Str(Video_Mode);
  510.     Put_Line(Tstr);
  511.     Down;
  512.  
  513.     Switch_Window(1);
  514.     While (Cur_Window < Status_Window) Do
  515.         Temp_Window := Cur_Window;
  516.         IF (window_attr and $80) = 0 THEN
  517.             TStr := '/W=' + Str(Cur_Window) +
  518.                             '/WNM=' + window_name +
  519.                             '/A=' + Str( Cur_Window = Active_Window ) +
  520.                             '/WA=' + Str( Window_Attr ) +
  521.                             '/FN=' + File_Name +
  522.                             '/C=' + Str(C_Col) +
  523.                             '/L=' + Str(C_Line) +
  524.                             '/R=' + Str(C_Row) +
  525.                             '/IL=' + Str(Indent_Level) +
  526.                             '/WS=' + Str(Wrap_Stat) +
  527.                             '/IS=' + Str(Indent_Style) +
  528.                             '/D=' + Str(Doc_Mode) +
  529.                             '/LS=' + Str(Link_Stat) +
  530.                             '/BI=' + Str(Buffer_Id) +
  531.                             '/BTML=' + Str(w_bottom_line) +
  532.                             '/RM=' + Str( right_margin ) +
  533.                             '/SN=' + str(screen_num);
  534.  
  535.             IF (win_x1 <> min_window_col) OR (win_x2 <> max_window_col) OR
  536.                  (win_y1 <> min_window_row) OR (win_y2 <> max_window_row) THEN
  537.                 tstr := tstr +
  538.                             '/X1=' + Str(Win_X1) +
  539.                             '/Y1=' + Str(Win_Y1) +
  540.                             '/X2=' + Str(Win_X2) +
  541.                             '/Y2=' + Str(Win_Y2);
  542.             END;
  543.             IF block_stat <> 0 THEN
  544.                 tstr := tstr +
  545.                             '/BS=' + Str(Block_Stat) +
  546.                             '/BC1=' + Str(Block_Col1) +
  547.                             '/BC2=' + Str(Block_Col2) +
  548.                             '/BL1=' + Str(Block_Line1) +
  549.                             '/BL2=' + Str(Block_Line2);
  550.             END;
  551.  
  552.             {This MUST be the last item!!!!!}
  553.             IF global_str('!WINZOOM#' + str(window_id)) <> '' THEN
  554.                 Tstr := tstr + '/ZOOM=' + global_str('!WINZOOM#' + str(window_id ) );
  555.             END;
  556.             Switch_Window( Status_Window );
  557.             Put_Line(Tstr);
  558.             down;
  559.         END;
  560.         Switch_Window(Temp_Window + 1);
  561.     End;
  562.  
  563. {Save some misc. general stuff at the end}
  564.     Switch_Window(Status_Window);
  565.  
  566.     TStr :=  First_Global( jx );
  567. Loop:
  568.     IF (TStr <> '') THEN
  569.         IF str_char(tstr,1) <> '!' THEN
  570.             IF jx = 1 then
  571.                 Put_Line('/G_INT=' + TStr);  DOWN;
  572.                 Put_Line(Str(Global_int(tstr))); DOWN;
  573.             ELSE
  574.                 Put_Line('/G_STR=' + TStr);  DOWN;
  575.                 Put_Line(convert_string(Global_str(tstr))); DOWN;
  576.             END;
  577.         END;
  578.         TStr := Next_Global(jx);
  579.         Goto Loop;
  580.     END;
  581.  
  582.     Save_File;
  583.     IF parse_int('/NDEL=',mparm_str) = 0 THEN
  584.         Delete_Window;
  585.     END;
  586.  
  587.     Switch_Window(Active_Window);
  588.  
  589.     Refresh := True;
  590.     Messages := true;
  591.     Undo_Stat := true;
  592.   GOTO END_OF_MAC;
  593.  
  594.  
  595.  
  596. END_OF_MAC:
  597.     backups := temp_backup;
  598. END_MACRO;
  599.