Hi,

On Thu, Jun 14, 2012 at 9:07 AM, Kenny <cheeseylem...@gmail.com> wrote:
>
>   I've been having a problem with the edit command. Nothing big or anything, 
> but every time I open the editor, the word wrap is turned off. I tried using 
> the "save options" button, but it just won't work. It resets itself every 
> time the editor is opened. Like I said, it's not really important, but it's 
> just a hastle when I'm writing something and then I found out the whole rime 
> I was writing the word wrap was off, so it just rolls on and on. Any tips?

FYI, there are other editors which support this, and they have config
files too (e.g. TDE, GNU Emacs), though normally I leave it off by
default as it changes the meaning of source code, so you have to be
careful.

Having said that, I'm fairly sure it's just a small bug / oversight.
I'm assuming you're using EDIT 0.9a. I took a look, and it seems to
only find and save .CFG in the current directory. Presumably this
minor nit got lost in the shuffle between maintainers and separating
out D-Flat+. (I'm cc'ing Aitor here, hope SF munges his email in the
header so he won't get a lot of spam!)

BTW, maybe it's the old Borland C lib, but EDIT acts very slightly
strange for me. I don't really use it much, honestly, so I've not
really noticed, but it seems to have a very flicker-y cursor. (Yes, I
tested natively in FreeDOS.) That alone isn't much to worry about, but
it also doesn't seem to scroll the window when text goes past column
80. I mostly use 80x43 these days, but even switching to 80x25 didn't
seem to help. And at some point when messing with the menus (e.g.
Options), the keyboard stops responding, or at least it won't let me
use the menus anymore, but mouse still works. Meh, kinda weird. I'm
not overly concerned, but it's a bit strange. Just wanted to mention
that in case anybody else noticed it too.

Anyways, I hacked around a bit (very sloppily) and patched the source.
My patch feels very messy, maybe I did it less than perfectly, but it
fixed it, at least on my end. I used TC++ 1.01 (as it no longer
supports TC 2.01, apparently). Otherwise, you'll have to copy EDIT.CFG
to the current dir when editing and copy it back when exiting, which
is less than ideal. If you can't be bothered to compile it yourself
(and nobody else patches / rebuilds it officially or are really
impatient), I can send you an .EXE.

So here's my lame-o patch:


diff -waus g:/tony/config.c g:/tony/cfgfix/config.c
--- g:/tony/config.c    2008-03-16 11:33:22 +0000
+++ g:/tony/cfgfix/config.c     2012-06-19 06:45:26 +0000
@@ -2,8 +2,10 @@

 #include <stdlib.h>
 #include "dflatp.h"
-#include "config.h"

+#define ENABLEGLOBALARGV
+
+#include "config.h"

 /* ------ default configuration values ------- */
 CONFIG cfg = {
diff -waus g:/tony/config.h g:/tony/cfgfix/config.h
--- g:/tony/config.h    2007-12-27 02:09:26 +0000
+++ g:/tony/cfgfix/config.h     2012-06-19 06:44:12 +0000
@@ -9,7 +9,7 @@
 extern char DFlatApplication[];

 #ifdef ENABLEGLOBALARGV
-char **Argv;
+extern char **Argv;
 #endif

 /* ----------- configuration parameters ----------- */
diff -waus g:/tony/edit.c g:/tony/cfgfix/edit.c
--- g:/tony/edit.c      2008-05-04 19:56:22 +0000
+++ g:/tony/cfgfix/edit.c       2012-06-19 06:44:02 +0000
@@ -2,7 +2,6 @@

 */

-
 /* D E F I N E S ///////////////////////////////////////////////////////// */

 #define CHARSLINE 80
@@ -33,7 +32,7 @@
 /* G L O B A L S ///////////////////////////////////////////////////////// */


-
+char** Argv;
 extern DBOX PrintSetup;
 char DFlatApplication[] = "Edit";
 static char Untitled[] = "Untitled";
@@ -104,6 +103,9 @@
                CurrentLogLevel = LL_NOTIFY;
 #endif

+#ifdef ENABLEGLOBALARGV
+    Argv = argv;
+#endif

                ConfigLoaded = LoadConfig();

@@ -163,10 +165,6 @@
         exit(1);
         }

-#ifdef ENABLEGLOBALARGV
-    Argv = argv;
-#endif
-
     InstallHelpProcedure (DisplayHelp);

                SysConfig.EditorGlobalReadOnly = cfg.ReadOnlyMode;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to