Skip to content

Commit

Permalink
Macros return to initial directory upon error
Browse files Browse the repository at this point in the history
  • Loading branch information
rneder committed Jan 16, 2025
1 parent c6d5b43 commit 21dc3e9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion kuplot/prog/fit_top.f90
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ SUBROUTINE do_f66(zei, lp)
prompt = orig_prompt
RETURN
ELSE
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion kuplot/prog/kuplot_2dmap.f90
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ SUBROUTINE kuplot_2dm_menu
RETURN
ELSE
IF(lmacro_close) THEN
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion kuplot/prog/kuplot_3dmap.f90
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ SUBROUTINE kuplot_3dm_menu(string, length)
RETURN
ELSE
IF(lmacro_close) THEN
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion kuplot/prog/kuplot_adt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ subroutine adt_menu
RETURN
ELSE
IF(lmacro_close) THEN
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
ENDIF
Expand Down
4 changes: 2 additions & 2 deletions kuplot/prog/kuplot_loop.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ recursive SUBROUTINE kuplot_loop
CALL errlist
IF (ier_sta.ne.ER_S_LIVE) THEN
IF (lmakro) THEN
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
lblock = .false.
Expand All @@ -89,7 +89,7 @@ recursive SUBROUTINE kuplot_loop
EXIT main
ELSE
IF(lmacro_close) THEN
CALL macro_close
CALL macro_close(-1)
lmakro_error = .FALSE.
PROMPT_STATUS = PROMPT_ON
sprompt = ' '
Expand Down
2 changes: 1 addition & 1 deletion kuplot/prog/kuplot_py.f90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SUBROUTINE command (incomming, ier_status)
IF( ier_num /= 0 ) THEN ! Handle error messages
CALL errlist
ier_status = -1
CALL macro_close
CALL macro_close(-1)
CALL no_error
ELSE
main: DO WHILE( lmakro ) ! Initial command was a macro, run this macro
Expand Down
2 changes: 1 addition & 1 deletion kuplot/prog/kuplot_save.f90
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ SUBROUTINE do_ksav (zei, lp)
RETURN
ELSE
IF(lmacro_close) THEN
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
ENDIF
Expand Down

0 comments on commit 21dc3e9

Please sign in to comment.