diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2020-08-01 12:01:34 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2020-08-01 12:01:34 +0000 |
commit | 2b48c58a3269e00f95e2769500c0230b2b7f397a (patch) | |
tree | c318c9368cdcf720af8624d45c0579b23e0635cd /Build/source/texk/web2c/mf.ch | |
parent | 33b2e31d6d3f08f67bad4a8a66b6c38eeea3ab02 (diff) |
Purge non-local 'goto' labels in WEB programs.
If code and comment disagree, most likely they both are wrong. ;o)
git-svn-id: svn://tug.org/texlive/trunk@56013 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mf.ch')
-rw-r--r-- | Build/source/texk/web2c/mf.ch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/mf.ch b/Build/source/texk/web2c/mf.ch index 5712b459458..bfd297440e8 100644 --- a/Build/source/texk/web2c/mf.ch +++ b/Build/source/texk/web2c/mf.ch @@ -30,6 +30,16 @@ \def\glob{13}\def\gglob{20, 25} % these are defined in module 1 @z +@x [1.6] Purge non-local 'goto' label. +@d end_of_MF=9998 {go here to close files and terminate gracefully} +@y +@z +@x +start_of_MF@t\hskip-2pt@>, end_of_MF@t\hskip-2pt@>,@,final_end; +@y +start_of_MF@t\hskip-2pt@>,@,final_end; +@z + @x [1.7] Convert `debug..gubed' and `stat..tats' into #ifdefs. @d debug==@{ {change this to `$\\{debug}\equiv\null$' when debugging} @d gubed==@t@>@} {change this to `$\\{gubed}\equiv\null$' when debugging} @@ -621,11 +631,27 @@ else @z @x [6.76] Eliminate non-local goto. +@ The |jump_out| procedure just cuts across all active procedure levels and +goes to |end_of_MF|. This is the only nontrivial |@!goto| statement in the +whole program. It is used when there is no recovery from a particular error. + +Some \PASCAL\ compilers do not implement non-local |goto| statements. +@^system dependencies@> +In such cases the body of |jump_out| should simply be +`|close_files_and_terminate|;\thinspace' followed by a call on some system +procedure that quietly terminates the program. + @<Error hand...@>= procedure jump_out; begin goto end_of_MF; end; @y +@ The |jump_out| procedure just cuts across all active procedure levels and +simply calls +`|close_files_and_terminate|;\thinspace' followed by a call on some system +procedure that quietly terminates the program. +@^system dependencies@> + @d do_final_end==begin update_terminal; ready_already:=0; |