--- freem/src/xecline.c 2025/03/24 04:05:36 1.8 +++ freem/src/xecline.c 2025/03/27 03:27:35 1.10 @@ -1,5 +1,5 @@ /* - * $Id: xecline.c,v 1.8 2025/03/24 04:05:36 snw Exp $ + * $Id: xecline.c,v 1.10 2025/03/27 03:27:35 snw Exp $ * freem interpreter proper * * @@ -24,6 +24,12 @@ * along with FreeM. If not, see . * * $Log: xecline.c,v $ + * 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 + * * Revision 1.8 2025/03/24 04:05:36 snw * Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 * @@ -3757,7 +3763,7 @@ off3: break; case KILL: - + /* argumentless: KILL all local variables */ if (((ch = *codptr) == SP) || ch == EOL) { symtab (kill_all, "", ""); @@ -3791,8 +3797,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; @@ -3940,7 +3948,7 @@ off3: stcpy (objvar, vn); - symtab (dat, objvar, datres); + symtab (fra_dat, objvar, datres); dat_res = atoi (datres); if (dat_res > 0) { @@ -5827,16 +5835,16 @@ zwritep: } if (varnam[0] != '^') { - symtab (dat, varnam, tmp2); + symtab (fra_dat, varnam, tmp2); zwmode = 'L'; } else { if (varnam[1] == '$') { - ssvn (dat, varnam, tmp2); + ssvn (fra_dat, varnam, tmp2); zwmode = '$'; } else { - global (dat, varnam, tmp2); + global (fra_dat, varnam, tmp2); zwmode = '^'; } } @@ -5947,21 +5955,21 @@ zwritep: switch (zwmode) { case 'L': - symtab (dat, tmp, tmp3); + symtab (fra_dat, tmp, tmp3); symtab (get_sym, tmp, &w_tmp[1]); break; case '$': - ssvn (dat, tmp, tmp3); + ssvn (fra_dat, tmp, tmp3); ssvn (get_sym, tmp, &w_tmp[1]); break; case '^': - global (dat, tmp, tmp3); + global (fra_dat, tmp, tmp3); global (get_sym, tmp, &w_tmp[1]); break;