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 0705089 commit 9615398
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion discus/prog/chem.f90
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ SUBROUTINE chem
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 discus/prog/conn_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ SUBROUTINE conn_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 discus/prog/demolec.f90
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ SUBROUTINE demolecularize
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 discus/prog/discus_exp2pdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SUBROUTINE exp2pdf
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 discus/prog/discus_loop.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ recursive SUBROUTINE discus_loop
CALL errlist
IF (ier_sta.ne.ER_S_LIVE) then
IF (lmakro.AND. lmacro_close) then
CALL macro_close
CALL macro_close(-1)
prompt_status = PROMPT_ON
ENDIF
lblock = .false.
Expand All @@ -102,7 +102,7 @@ recursive SUBROUTINE discus_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 discus/prog/discus_plot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ SUBROUTINE plot
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 discus/prog/discus_py.f90
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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 discus/prog/discus_save.f90
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ SUBROUTINE save_struc (string, lcomm)
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 discus/prog/discus_super_func.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ subroutine super_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 discus/prog/domain.f90
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ SUBROUTINE do_domain
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 discus/prog/graphic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ SUBROUTINE do_niplps (linverse)
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 discus/prog/insert.f90
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ SUBROUTINE insert (itype)
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 discus/prog/mmc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ SUBROUTINE mmc
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 discus/prog/patters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ SUBROUTINE patterson (inverse_type)
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 discus/prog/pdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ SUBROUTINE pdf
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 discus/prog/perioditize.f90
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ subroutine perioditize_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 discus/prog/place_molecule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ SUBROUTINE do_place_molecule
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 discus/prog/powder.f90
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ SUBROUTINE do_powder
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 discus/prog/prop_para_func.f90
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ SUBROUTINE property_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 discus/prog/shear.f90
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ SUBROUTINE shear_menue
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 discus/prog/stack.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SUBROUTINE stack
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 discus/prog/storage.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SUBROUTINE storage
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 discus/prog/surface_func_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ SUBROUTINE surface_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 discus/prog/symm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ SUBROUTINE symm
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 discus/prog/transfrm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ SUBROUTINE transform
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 discus/prog/waves.f90
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ SUBROUTINE waves_menu
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 9615398

Please sign in to comment.