aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--ps/step1_read_print.ps7
-rw-r--r--ps/step2_eval.ps7
-rw-r--r--ps/step3_env.ps9
-rw-r--r--ps/step4_if_fn_do.ps11
-rw-r--r--ps/step5_tco.ps11
-rw-r--r--ps/step6_file.ps11
-rw-r--r--ps/step7_quote.ps11
-rw-r--r--ps/step8_macros.ps11
-rw-r--r--ps/step9_interop.ps11
-rw-r--r--ps/stepA_more.ps11
11 files changed, 56 insertions, 46 deletions
diff --git a/README.md b/README.md
index 1583f1d..f03bf83 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ php stepX_YYY.php
```
cd ps
-gs -q -dNODISPLAY stepX_YYY.ps
+gs -q -dNODISPLAY -I./ stepX_YYY.ps
```
### Python (2 or 3)
diff --git a/ps/step1_read_print.ps b/ps/step1_read_print.ps
index 476c917..858987c 100644
--- a/ps/step1_read_print.ps
+++ b/ps/step1_read_print.ps
@@ -1,6 +1,7 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step2_eval.ps b/ps/step2_eval.ps
index 551c637..215fc2e 100644
--- a/ps/step2_eval.ps
+++ b/ps/step2_eval.ps
@@ -1,6 +1,7 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step3_env.ps b/ps/step3_env.ps
index 92dc26e..e662c11 100644
--- a/ps/step3_env.ps
+++ b/ps/step3_env.ps
@@ -1,7 +1,8 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step4_if_fn_do.ps b/ps/step4_if_fn_do.ps
index 9e628b6..422f6eb 100644
--- a/ps/step4_if_fn_do.ps
+++ b/ps/step4_if_fn_do.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step5_tco.ps b/ps/step5_tco.ps
index 83fd43b..680c359 100644
--- a/ps/step5_tco.ps
+++ b/ps/step5_tco.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step6_file.ps b/ps/step6_file.ps
index 7d1c876..bc30e35 100644
--- a/ps/step6_file.ps
+++ b/ps/step6_file.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step7_quote.ps b/ps/step7_quote.ps
index d7340fd..3dd9c0c 100644
--- a/ps/step7_quote.ps
+++ b/ps/step7_quote.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step8_macros.ps b/ps/step8_macros.ps
index 3bf304c..32ca3af 100644
--- a/ps/step8_macros.ps
+++ b/ps/step8_macros.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/step9_interop.ps b/ps/step9_interop.ps
index de3d2af..7f90d20 100644
--- a/ps/step9_interop.ps
+++ b/ps/step9_interop.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def
diff --git a/ps/stepA_more.ps b/ps/stepA_more.ps
index 76d0a86..a24ee28 100644
--- a/ps/stepA_more.ps
+++ b/ps/stepA_more.ps
@@ -1,8 +1,9 @@
-(types.ps) run
-(reader.ps) run
-(printer.ps) run
-(env.ps) run
-(core.ps) run
+/runlibfile where { pop }{ /runlibfile { run } def } ifelse %
+(types.ps) runlibfile
+(reader.ps) runlibfile
+(printer.ps) runlibfile
+(env.ps) runlibfile
+(core.ps) runlibfile
% read
/_readline { print flush (%stdin) (r) file 99 string readline } def