version 1.8, 2025/03/24 04:05:36
|
version 1.11, 2025/04/02 03:02:42
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* 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 |
|
* |
* Revision 1.8 2025/03/24 04:05:36 snw |
* Revision 1.8 2025/03/24 04:05:36 snw |
* Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 |
* Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 |
* |
* |
Line 3757 off3:
|
Line 3766 off3:
|
break; |
break; |
|
|
case KILL: |
case KILL: |
|
|
/* argumentless: KILL all local variables */ |
/* argumentless: KILL all local variables */ |
if (((ch = *codptr) == SP) || ch == EOL) { |
if (((ch = *codptr) == SP) || ch == EOL) { |
symtab (kill_all, "", ""); |
symtab (kill_all, "", ""); |
Line 3791 off3:
|
Line 3800 off3:
|
if (destructor_ct) { |
if (destructor_ct) { |
|
|
for (cd = 0; cd < destructor_ct; cd++) { |
for (cd = 0; cd < destructor_ct; cd++) { |
strcat (destc, destructors[cd]); |
if (strlen (destructors[cd]) > 0) { |
strcat (destc, ","); |
strcat (destc, destructors[cd]); |
|
strcat (destc, ","); |
|
} |
} |
} |
|
|
destructor_ct = 0; |
destructor_ct = 0; |
Line 3940 off3:
|
Line 3951 off3:
|
|
|
stcpy (objvar, vn); |
stcpy (objvar, vn); |
|
|
symtab (dat, objvar, datres); |
symtab (fra_dat, objvar, datres); |
dat_res = atoi (datres); |
dat_res = atoi (datres); |
|
|
if (dat_res > 0) { |
if (dat_res > 0) { |
Line 5827 zwritep:
|
Line 5838 zwritep:
|
} |
} |
|
|
if (varnam[0] != '^') { |
if (varnam[0] != '^') { |
symtab (dat, varnam, tmp2); |
symtab (fra_dat, varnam, tmp2); |
zwmode = 'L'; |
zwmode = 'L'; |
} |
} |
else { |
else { |
if (varnam[1] == '$') { |
if (varnam[1] == '$') { |
ssvn (dat, varnam, tmp2); |
ssvn (fra_dat, varnam, tmp2); |
zwmode = '$'; |
zwmode = '$'; |
} |
} |
else { |
else { |
global (dat, varnam, tmp2); |
global (fra_dat, varnam, tmp2); |
zwmode = '^'; |
zwmode = '^'; |
} |
} |
} |
} |
Line 5947 zwritep:
|
Line 5958 zwritep:
|
switch (zwmode) { |
switch (zwmode) { |
|
|
case 'L': |
case 'L': |
symtab (dat, tmp, tmp3); |
symtab (fra_dat, tmp, tmp3); |
symtab (get_sym, tmp, &w_tmp[1]); |
symtab (get_sym, tmp, &w_tmp[1]); |
|
|
break; |
break; |
|
|
|
|
case '$': |
case '$': |
ssvn (dat, tmp, tmp3); |
ssvn (fra_dat, tmp, tmp3); |
ssvn (get_sym, tmp, &w_tmp[1]); |
ssvn (get_sym, tmp, &w_tmp[1]); |
|
|
break; |
break; |
|
|
|
|
case '^': |
case '^': |
global (dat, tmp, tmp3); |
global (fra_dat, tmp, tmp3); |
global (get_sym, tmp, &w_tmp[1]); |
global (get_sym, tmp, &w_tmp[1]); |
|
|
break; |
break; |
Line 6036 zwritep:
|
Line 6047 zwritep:
|
break; |
break; |
|
|
|
|
case ZALLOCATE: |
/* user defined Z-COMMAND */ |
|
|
/* 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 */ |
|
|
|
|
|
case PRIVATE: |
case PRIVATE: |
|
|
private: /* for in-MUMPS defined commands */ |
private: /* for in-MUMPS defined commands */ |