Eric and I have been working a few hours on a patch to correct the
ask-user-to-execute-config.sys-line algorythm.

essentially (config.c, line 806 I think):
  /* !device= never ask / device?= always ask / device= ask if singleStep */
  /* "!" does override singleStep but not "?", so "!device?=" will ask... */
  if (! ( (singleStep && !DontAskThisSingleCommand) ||
      (askThisSingleCommand) ) )
    return FALSE; /* do not skip, and do not ask either */

Eric also made some more changes. See below for the complete DIFF against 2035

Next steps *I* would like to take (still a non-programmer!) are:
-don't auto-add 0 as a menu-item
-set menudefault to lowest menu-item ('0' currently)
-don't show menu unless at least 2 different menu-items are available.

Bernd

http://www.coli.uni-sb.de/~eric/dos-config-patch.zip

--- config.old  Tue May 25 01:02:46 2004
+++ config.c    Sun Jun 13 00:23:56 2004
@@ -549,7 +549,7 @@
     umb_base_seg = umb_max = umb_start = umb_seg;
     UMB_top = umb_size;

-    /* there can be more UMB's !
+    /* there can be more UMBs !
        this happens, if memory mapped devces are in between
        like UMB memory c800..c8ff, d8ff..efff with device at d000..d7ff
        However some of the xxxHIGH commands still only work with
@@ -801,14 +801,15 @@
   /* 123?device=EMM386.EXE NOEMS */
   if ( MenuLine != 0 &&
       (MenuLine & (1 << MenuSelected)) == 0)
-    return TRUE;
-
-  if (DontAskThisSingleCommand)     /* !files=30 */
-    return FALSE;
+    return TRUE;               /* skip the line */

-  if (!askThisSingleCommand && !singleStep)
-    return FALSE;
+  /* !device= never ask / device?= always ask / device= ask if singleStep */
+  /* "!" does override singleStep but not "?", so "!device?=" will ask... */
+  if (! ( (singleStep && !DontAskThisSingleCommand) ||
+      (askThisSingleCommand) ) )
+    return FALSE; /* do not skip, and do not ask either */

+  /* "if ( (s.s. && d.a.t.s.c) || (a.t.s.c) ) then ASK THE USER" */
   printf("%s[Y,N]?", pLine);

   for (;;)
@@ -902,6 +903,7 @@
   /* Get the argument                                             */
   if (GetNumArg(pLine, &nBuffers))
     Config.cfgBuffers = nBuffers;
+  /* Second argument (0..8 buffers for read-ahead) not supported yet. */
 }

 /**
@@ -1004,7 +1006,10 @@
 }

 /*
-    UmbState of confidence, 1 is sure, 2 maybe, 4 unknown and 0 no way.
+    UmbState of confidence, 1 is sure, 2 maybe, 0 no way.
+    Transitions: 0 -> 0/2 depending on DOS=UMB, try init (2 -> 1)
+    after each driver load, as it could have been the UMB driver.
+    If UMB really found, state 1 is reached and MCBs are adjusted.
 */

 STATIC VOID Dosmem(BYTE * pLine)
@@ -1205,7 +1210,7 @@
 #endif

   if (!LoadCountryInfoHardCoded(filename, ctryCode, codePage))
-    return;
+    return; /* error message already displayed by LoadCountry... */

 error:
   CfgFailure(pLine);
@@ -1293,17 +1298,24 @@

 STATIC VOID DeviceHigh(BYTE * pLine)
 {
-  if (UmbState == 1)
+  if (UmbState == 1)           /* UMB already initialized? */
   {
     if (LoadDevice(pLine, MK_FP(umb_start + UMB_top, 0), TRUE) == DE_NOMEM)
     {
-      printf("Not enough free memory in UMB's: loading low\n");
+      printf("Not enough free memory in UMBs: loading low\n");
       LoadDevice(pLine, lpTop, FALSE);
     }
   }
   else
   {
-    printf("UMB's unavailable!\n");
+    if (!umb_base_seg)         /* only warn once */
+    {
+      printf("UMBs unavailable!\n");
+      umb_base_seg = 0xffff;   /* first 0, non-0 after umb_init success */
+    }
+    /* if UmbState is 2: still waiting for the UMB driver, after it is */
+    /* found, UmbState will be 1 and umb_base_seg will be initialized. */
+    /* UmbState 0 means that we do not want UMBs at all, DOS=NOUMB case. */
     LoadDevice(pLine, lpTop, FALSE);
   }
 }




------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to