From 32d6b09c8ea426260971c82e43bcc16e1b8f7d71 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 11 Jul 2024 15:42:41 -1000 Subject: [PATCH] SCP: Allow glyph parsing to specify a delimiter while whitespace isn't one --- scp.c | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/scp.c b/scp.c index a38a6076..a34a120f 100644 --- a/scp.c +++ b/scp.c @@ -539,7 +539,7 @@ FILE *stdnul; SCHTAB *get_rsearch (CONST char *cptr, int32 radix, SCHTAB *schptr); SCHTAB *get_asearch (CONST char *cptr, int32 radix, SCHTAB *schptr); int32 test_search (t_value *val, SCHTAB *schptr); -static const char *get_glyph_gen (const char *iptr, char *optr, char mchar, t_bool uc, t_bool quote, char escape_char); +static const char *get_glyph_gen (const char *iptr, char *optr, char mchar, t_bool ws_match, t_bool uc, t_bool quote, char escape_char); typedef enum { SW_ERROR, /* Parse Error */ SW_BITMASK, /* Bitmask Value or Not a switch */ @@ -5425,7 +5425,7 @@ const char *ap; CONST char *tptr, *gptr; REG *rptr; -tptr = (CONST char *)get_glyph_gen (iptr, optr, mchar, (sim_switches & SWMASK ('I')), TRUE, '\\'); +tptr = (CONST char *)get_glyph_gen (iptr, optr, mchar, TRUE, (sim_switches & SWMASK ('I')), TRUE, '\\'); if ((*optr != '"') && (*optr != '\'')) { ap = getenv (optr); if (!ap) @@ -5436,7 +5436,7 @@ if ((*optr != '"') && (*optr != '\'')) { if (rptr) return tptr; snprintf (optr, CBUFSIZE - 1, "\"%s\"", ap); - get_glyph_gen (optr, optr, 0, (sim_switches & SWMASK ('I')), TRUE, '\\'); + get_glyph_gen (optr, optr, 0, TRUE, (sim_switches & SWMASK ('I')), TRUE, '\\'); } return tptr; } @@ -9689,7 +9689,7 @@ for (j=0, r = SCPE_OK; j