--- freem/src/xecline.c 2025/05/05 14:53:17 1.22 +++ freem/src/xecline.c 2025/05/18 18:15:38 1.25 @@ -1,5 +1,5 @@ /* - * $Id: xecline.c,v 1.22 2025/05/05 14:53:17 snw Exp $ + * $Id: xecline.c,v 1.25 2025/05/18 18:15:38 snw Exp $ * freem interpreter proper * * @@ -24,6 +24,15 @@ * along with FreeM. If not, see . * * $Log: xecline.c,v $ + * Revision 1.25 2025/05/18 18:15:38 snw + * Add ZEDIT command for editing routines + * + * Revision 1.24 2025/05/14 12:22:04 snw + * Further work on shared memory + * + * Revision 1.23 2025/05/06 16:10:06 snw + * Add extra blank before readline call on NetBSD + * * Revision 1.22 2025/05/05 14:53:17 snw * Modify rpm spec to include documentation TODO * @@ -258,7 +267,7 @@ next_line: /* entry point for n if (debug_mode) { debug_mode = debugger (DEBENTRY_LINE, entryref); } - + job_set_status (pid, JSTAT_INTERPRETER); if (then_ctr > 0) { @@ -5286,6 +5295,11 @@ halt: break; /* Z-COMMANDS */ + case ZEDIT: + merr_raise (cmd_zedit (&ra)); + MRESCHECK(ra); + break; + case ZGO: /* ZGO with arguments: same as GOTO but with BREAK on */ @@ -7287,7 +7301,11 @@ direct_mode: set_io (UNIX); job_set_status (pid, JSTAT_DIRECTMODE); - + +#if defined(__NetBSD__) + printf ("\r\n"); +#endif + /* readline() does its own malloc() */ fmrl_buf = readline (fmrl_prompt); @@ -7298,6 +7316,7 @@ direct_mode: goto halt; } + if (strlen (fmrl_buf) > 0) { add_history (fmrl_buf);