--- freem/src/fmadm.c 2025/03/24 20:15:09 1.13
+++ freem/src/fmadm.c 2025/03/30 01:36:58 1.17
@@ -1,5 +1,5 @@
/*
- * $Id: fmadm.c,v 1.13 2025/03/24 20:15:09 snw Exp $
+ * $Id: fmadm.c,v 1.17 2025/03/30 01:36:58 snw Exp $
* FreeM Administration Tool
*
*
@@ -24,6 +24,18 @@
* along with FreeM. If not, see .
*
* $Log: fmadm.c,v $
+ * 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
+ *
* Revision 1.13 2025/03/24 20:15:09 snw
* Set file permissions on freemd.exe on OS/2 in fmadm configure
*
@@ -65,6 +77,10 @@
#include "namespace.h"
#include "fs.h"
+#if defined(__OS2__)
+# include
+#endif
+
#ifdef HAVE_LIBREADLINE
# if defined(HAVE_READLINE_READLINE_H)
# include
@@ -1039,10 +1055,9 @@ int fm_edit (short object, int optc, cha
case OBJ_ROUTINE:
return fma_routines_edit (optc, options);
- /*
- case OBJ_GLOBAL:
+ /*case OBJ_GLOBAL:
return fma_globals_edit (optc, options);
- */
+ */
default:
fprintf (stderr, "fmadm: 'edit' is an invalid action for '%s'\n", obj_str);
@@ -1164,7 +1179,7 @@ void fm_configure (void)
fprintf (stderr, "fmadm: running on OS/2; will copy %s to %s\n", srcfile, dstfile);
- if (cp (dstfile, srcfile) != 0) {
+ if (DosCopy (srcfile, dstfile, 1) != 0) {
fprintf (stderr, "fmadm: fatal error copying %s to %s\n", srcfile, dstfile);
exit (1);
}
@@ -1181,9 +1196,6 @@ void fm_configure (void)
printf ("This utility will create the initial configuration file for ");
printf ("FreeM environment '%s' in %s.\n\n", fma_environment, config_file);
-
-
-
/* check for existence of needed directories */
if (stat (SYSCONFDIR, &etcstat) == -1) {
fprintf (stderr, "fmadm: creating %s\n", SYSCONFDIR);