diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1988-01-27 22:18:25 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1988-01-27 22:18:25 +0000 |
commit | a559c25918b1466cdb50c9f978a86f01be0bac10 (patch) | |
tree | ffbe6c7bc07144d291a61555d002e7969110f248 /util.c | |
parent | a1cc2bdc08f9aa1504f32e5b0b782c2b3cffd124 (diff) | |
download | perl-a559c25918b1466cdb50c9f978a86f01be0bac10.tar.gz |
perl 1.0 patch 8: perl needed an eval operator and a symbolic debugger
I didn't add an eval operator to the original perl because
I hadn't thought of any good uses for it. Recently I thought
of some. Along with creating the eval operator, this patch
introduces a symbolic debugger for perl scripts, which makes
use of eval to interpret some debugging commands. Having eval
also lets me emulate awk's FOO=bar command line behavior with
a line such as the one a2p now inserts at the beginning of
translated scripts.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,6 +1,9 @@ -/* $Header: util.c,v 1.0 87/12/18 13:06:30 root Exp $ +/* $Header: util.c,v 1.0.1.1 88/01/28 11:06:35 root Exp $ * * $Log: util.c,v $ + * Revision 1.0.1.1 88/01/28 11:06:35 root + * patch8: changed fatal() to support eval operator with exiting. + * * Revision 1.0 87/12/18 13:06:30 root * Initial revision * @@ -205,6 +208,11 @@ char *pat; extern FILE *e_fp; extern char *e_tmpname; + if (in_eval) { + sprintf(tokenbuf,pat,a1,a2,a3,a4); + str_set(stabent("@",TRUE)->stab_val,tokenbuf); + longjmp(eval_env,1); + } fprintf(stderr,pat,a1,a2,a3,a4); if (e_fp) UNLINK(e_tmpname); |