--- freem/src/xecline.c 2025/03/24 04:13:12 1.9 +++ freem/src/xecline.c 2025/04/02 03:02:42 1.11 @@ -1,5 +1,5 @@ /* - * $Id: xecline.c,v 1.9 2025/03/24 04:13:12 snw Exp $ + * $Id: xecline.c,v 1.11 2025/04/02 03:02:42 snw Exp $ * freem interpreter proper * * @@ -24,6 +24,12 @@ * along with FreeM. If not, see . * * $Log: xecline.c,v $ + * Revision 1.11 2025/04/02 03:02:42 snw + * Stop requiring users to pass -e to fmadm when -u or -g are passed + * + * Revision 1.10 2025/03/27 03:27:35 snw + * Install init scripts to share/freem/examples/init and fix regression in method dispatch + * * Revision 1.9 2025/03/24 04:13:12 snw * Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 * @@ -3760,7 +3766,7 @@ off3: break; case KILL: - + /* argumentless: KILL all local variables */ if (((ch = *codptr) == SP) || ch == EOL) { symtab (kill_all, "", ""); @@ -3794,8 +3800,10 @@ off3: if (destructor_ct) { for (cd = 0; cd < destructor_ct; cd++) { - strcat (destc, destructors[cd]); - strcat (destc, ","); + if (strlen (destructors[cd]) > 0) { + strcat (destc, destructors[cd]); + strcat (destc, ","); + } } destructor_ct = 0; @@ -6039,62 +6047,7 @@ zwritep: break; - case ZALLOCATE: - - /* argumentless is not permitted */ - if (*codptr == SP || *codptr == EOL) { - merr_raise (ARGLIST); - break; - } - - expr (NAME); - - if (merr () > OK) goto err; - - tmp[0] = SP; - stcpy (&tmp[1], varnam); - stcat (tmp, "\001\201"); - - frm_timeout = (-1L); /* no timeout */ - - if (*++codptr == ':') { - codptr++; - - expr (STRING); - - frm_timeout = intexpr (argptr); - - if (merr () > OK) goto err; - if (frm_timeout < 0L) frm_timeout = 0L; - } - - lock (tmp, frm_timeout, ZALLOCATE); - break; - - - case ZDEALLOCATE: - - tmp[0] = SP; - - if (*codptr == SP || *codptr == EOL) { - tmp[1] = EOL; - } - else { - expr (NAME); - - if (merr () > OK) goto err; - - stcpy (&tmp[1], varnam); - - codptr++; - } - - lock (tmp, -1L, ZDEALLOCATE); /* -1: no timeout */ - break; - - /* user defined Z-COMMAND */ - - + /* user defined Z-COMMAND */ case PRIVATE: private: /* for in-MUMPS defined commands */