From 93bcfabc23620bc07f1ca0f5ed15a79188c634bc Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 20 Nov 2018 22:53:46 -0500 Subject: [PATCH] implements -J for specifying a custom ivory pill --- vere/king.c | 15 +++++++++++---- vere/main.c | 6 ++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/vere/king.c b/vere/king.c index 0a52d97ac7..0b377611a6 100644 --- a/vere/king.c +++ b/vere/king.c @@ -452,11 +452,18 @@ u3_king_commence() */ u3m_boot_pier(); { - extern c3_w u3_Ivory_length_w; - extern c3_y u3_Ivory_pill_y[]; - u3_noun lit; + u3_noun lit; + + if ( 0 != u3_Host.ops_u.lit_c ) { + lit = u3m_file(u3_Host.ops_u.lit_c); + } + else { + extern c3_w u3_Ivory_length_w; + extern c3_y u3_Ivory_pill_y[]; + + lit = u3i_bytes(u3_Ivory_length_w, u3_Ivory_pill_y); + } - lit = u3i_bytes(u3_Ivory_length_w, u3_Ivory_pill_y); u3v_boot_lite(lit); } diff --git a/vere/main.c b/vere/main.c index 4fe467de40..f62e2909a2 100644 --- a/vere/main.c +++ b/vere/main.c @@ -92,10 +92,8 @@ _main_getopt(c3_i argc, c3_c** argv) while ( (ch_i=getopt(argc, argv,"G:J:B:K:H:w:u:e:E:f:F:k:p:LabcdgqtvxPDRS")) != -1 ) { switch ( ch_i ) { case 'J': { - // XX should set path to ivory pill - // u3_Host.ops_u.lit_c = strdup(optarg); - // break; - return c3n; + u3_Host.ops_u.lit_c = strdup(optarg); + break; } case 'B': { u3_Host.ops_u.pil_c = strdup(optarg);