--- freem/src/fmadm.c 2025/03/24 20:57:06 1.14 +++ freem/src/fmadm.c 2025/03/31 16:33:56 1.18 @@ -1,5 +1,5 @@ /* - * $Id: fmadm.c,v 1.14 2025/03/24 20:57:06 snw Exp $ + * $Id: fmadm.c,v 1.18 2025/03/31 16:33:56 snw Exp $ * FreeM Administration Tool * * @@ -24,6 +24,18 @@ * along with FreeM. If not, see . * * $Log: fmadm.c,v $ + * Revision 1.18 2025/03/31 16:33:56 snw + * Work on fmadm edit global + * + * Revision 1.17 2025/03/30 01:36:58 snw + * Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII + * + * Revision 1.16 2025/03/24 20:59:58 snw + * Try using DosCopy API instead of built-in cp function on OS/2 + * + * Revision 1.15 2025/03/24 20:58:05 snw + * Try using DosCopy API instead of built-in cp function on OS/2 + * * Revision 1.14 2025/03/24 20:57:06 snw * Try using DosCopy API instead of built-in cp function on OS/2 * @@ -1046,11 +1058,9 @@ int fm_edit (short object, int optc, cha case OBJ_ROUTINE: return fma_routines_edit (optc, options); - /* case OBJ_GLOBAL: return fma_globals_edit (optc, options); - */ - + default: fprintf (stderr, "fmadm: 'edit' is an invalid action for '%s'\n", obj_str); return 1; @@ -1085,7 +1095,7 @@ void fm_reconfigure(void) retval = rename (config_file, config_backup); if (retval == 0) { - fprintf (stderr, "[OK]\n\n"); + fprintf (stderr, "[OK]\n"); fm_configure (); @@ -1144,9 +1154,9 @@ void fm_configure (void) } if (file_exists (config_file)) { - fprintf (stderr, "fmadm: '%s' already exists.\n\n", config_file); - fprintf (stderr, "'fmadm configure' may only be used on a fresh installation of FreeM.\n"); - exit (1); + fprintf (stderr, "fmadm: '%s' already exists; running fmadm reconfigure instead\n", config_file); + fm_reconfigure (); + return; } @@ -1171,7 +1181,7 @@ void fm_configure (void) fprintf (stderr, "fmadm: running on OS/2; will copy %s to %s\n", srcfile, dstfile); - if (DosCopy (srcfile, dstfile) != 0) { + if (DosCopy (srcfile, dstfile, 1) != 0) { fprintf (stderr, "fmadm: fatal error copying %s to %s\n", srcfile, dstfile); exit (1); }