Hi,

this patch speaks for itself. I guess Arkady won't like it and Tom thinks 
I'm crazy to even look at this code (though it does save 1.5K on 
HMA_TEXT, that's tempting). But anyway, who cares :)

For me this search and replace exercise is simply necessary to make sense 
out of the code without learning a new dialect of C. A lot more 
deobfuscating would need to be done to make it actually diffable with 
2035.

This refers to "2035a-UNSTABLE" (not to be confused with "2035a" which is 
CVS HEAD, i.e. 2035 plus some floppy.asm fixes).

Bart

Index: hdr/portab.h
===================================================================
RCS file: /cvsroot/freedos/kernel/hdr/portab.h,v
retrieving revision 1.31.2.1
diff -u -r1.31.2.1 portab.h
--- hdr/portab.h        9 Jul 2004 02:16:29 -0000       1.31.2.1
+++ hdr/portab.h        23 Jul 2004 00:17:16 -0000
@@ -340,12 +340,6 @@
 #define PROTO
 #endif
 
-typedef const char     CStr[], *PCStr;
-typedef char           Str[], *PStr;
-typedef const void     *CVP;
-typedef const void FAR *CVFP;
-typedef void FAR       *VFP;
-
 #define LENGTH(x) (sizeof (x)/sizeof *(x))
 #define ENDOF(x) ((x) + LENGTH (x))
 
Index: kernel/config.c
===================================================================
RCS file: /cvsroot/freedos/kernel/kernel/config.c,v
retrieving revision 1.89.2.1
diff -u -r1.89.2.1 config.c
--- kernel/config.c     9 Jul 2004 02:16:29 -0000       1.89.2.1
+++ kernel/config.c     23 Jul 2004 00:17:16 -0000
@@ -90,12 +90,12 @@
   gotoxy(x, y);
 }
 
-static void say(PCStr s)
+static void say(const char *s)
 {
   printf(s);
 }
 
-static void say2(PCStr f, PCStr s)
+static void say2(const char *f, const char *s)
 {
   printf(f, s);
 }
@@ -131,7 +131,7 @@
 
 STATIC seg_t base_seg BSS_INIT(0);
 STATIC seg_t umb_base_seg BSS_INIT(0);
-VFP lpTop BSS_INIT(0);
+void FAR *lpTop BSS_INIT(0);
 STATIC unsigned nCfgLine BSS_INIT(0);
 
 static unsigned nPass BSS_INIT(0);
@@ -146,28 +146,28 @@
 static unsigned line_choices BSS_INIT(0);
 static unsigned all_choices BSS_INIT(0);
 
-STATIC BOOL LoadDevice(PCStr, VFP top, int mode);
-STATIC void CfgFailure(PCStr);
+STATIC BOOL LoadDevice(const char *, void FAR *top, int mode);
+STATIC void CfgFailure(const char *);
 
 STATIC VOID DoMenu(void);
-STATIC PCStr skipwh(PCStr);
-STATIC PCStr scanword(PCStr, PStr);
-STATIC PCStr scanverb(PCStr, PStr);
+STATIC const char *skipwh(const char *);
+STATIC const char *scanword(const char *, char *);
+STATIC const char *scanverb(const char *, char *);
 #define isdigit(ch) ((UBYTE)((ch) - '0') <= 9)
 STATIC char toupper(char c);
-static PStr strupr(PStr);
-static PStr strcat(PStr d, PCStr s);
+static char *strupr(char *);
+static char *strcat(char *d, const char *s);
 STATIC void mcb_init(seg_t, size_t, BYTE type);
 STATIC void mumcb_init(seg_t, size_t);
 #define mcb_next(seg) ((seg) + MK_SEG_PTR(mcb, seg)->m_size + 1)
 
-STATIC PCStr GetNumArg(PCStr);
-STATIC BOOL GetNumArg1(PCStr);
-STATIC BOOL GetNumArg2(PCStr, int default2);
+STATIC const char *GetNumArg(const char *);
+STATIC BOOL GetNumArg1(const char *);
+STATIC BOOL GetNumArg2(const char *, int default2);
 static void hintSkipAll(void);
 static BOOL askSkipLine(void);
-STATIC char strcasediff(PCStr, PCStr);
-STATIC void LoadCountryInfoHardCoded(CStr filename, int ccode, int cpage);
+STATIC char strcasediff(const char *, const char *);
+STATIC void LoadCountryInfoHardCoded(const char *filename, int ccode, int cpage);
 STATIC void umb_init(void);
 
 STATIC void config_init_buffers(int anzBuffers);     /* from BLOCKIO.C */
@@ -175,7 +175,7 @@
 
 #define EOF 0x1a
 
-typedef void config_sys_func_t(PCStr);
+typedef void config_sys_func_t(const char *);
 
 STATIC config_sys_func_t
   CfgSwitches,
@@ -188,7 +188,7 @@
   Device, DeviceHigh, CmdInstall, CmdInstallHigh, CmdSet;
 
 STATIC struct table {
-  PCStr const entry;
+  const char *const entry;
   UBYTE pass;
   config_sys_func_t *const func;
 
@@ -450,7 +450,7 @@
 
 STATIC void umb_init(void)
 {
-  CVFP xms_addr;
+  const void FAR *xms_addr;
   seg_t umb_seg;
   size_t umb_size;
 
@@ -586,7 +586,7 @@
   } /* if */
 }
 
-STATIC const struct table * LookUp(CStr token)
+STATIC const struct table * LookUp(const char *token)
 {
   const struct table *p = commands;
   do
@@ -625,8 +625,8 @@
   done = nCfgLine = 0;
   do
   {
-    PStr q;
-    PCStr p;
+    char *q;
+    const char *p;
     const struct table *pEntry;
 
     /* read in a single line, \n or ^Z terminated */
@@ -850,7 +850,7 @@
 
 /* JPP - changed so will accept hex number. */
 /* ea - changed to accept hex digits in hex numbers */
-STATIC PCStr GetNumArg(PCStr p)
+STATIC const char *GetNumArg(const char *p)
 {
   static char digits[] = "0123456789ABCDEF";
   unsigned char base = 10;
@@ -877,7 +877,7 @@
       base = 16;
     else
     {
-      PCStr q = strchr(digits, ch);
+      const char *q = strchr(digits, ch);
       if (q == NULL)
         break;
       n = n * base + (q - digits);
@@ -887,7 +887,7 @@
   return p;
 }
 
-STATIC BOOL isEOL(PCStr p)
+STATIC BOOL isEOL(const char *p)
 {
   if (*p) /* garbage at line end? */
   {
@@ -898,7 +898,7 @@
 }
 
 /* Format: nnn EOL */
-STATIC BOOL GetNumArg1(PCStr p)
+STATIC BOOL GetNumArg1(const char *p)
 {
   p = GetNumArg(p);
   if (p == NULL)
@@ -909,7 +909,7 @@
 static int numarg1 BSS_INIT(0);
 
 /* Format: nnn [, nnn] EOL */
-STATIC BOOL GetNumArg2(PCStr p, int default2)
+STATIC BOOL GetNumArg2(const char *p, int default2)
 {
   p = GetNumArg(p);
   if (p == NULL)
@@ -925,7 +925,7 @@
 }
 
 /* Format: BUFFERS [=] nnn [, nnn] */
-STATIC void Config_Buffers(PCStr p)
+STATIC void Config_Buffers(const char *p)
 {
   if (GetNumArg2(p, 0))
     Config.cfgBuffers = (UBYTE)numarg1;
@@ -934,7 +934,7 @@
 
 /* Set screen mode - rewritten to use init_call_intr() by RE / ICD */
 /* Format: SCREEN [=] nnn */
-STATIC void sysScreenMode(PCStr p)
+STATIC void sysScreenMode(const char *p)
 {
   if (GetNumArg1(p))
   {
@@ -960,7 +960,7 @@
 }
 
 /* Format: VERSION [=] nn.nn */
-STATIC void sysVersion(PCStr p)
+STATIC void sysVersion(const char *p)
 {
   int major;
   p = GetNumArg(p);
@@ -975,7 +975,7 @@
 
 /* Format: FILES [=] nnn */
 /* Format: FILESHIGH [=] nnn */
-static void _Files(PCStr p, UBYTE high)
+static void _Files(const char *p, UBYTE high)
 {
   if (GetNumArg1(p))
   {
@@ -986,13 +986,13 @@
   }
 }
 
-STATIC void Files(PCStr p)             { _Files(p, 0); }
+STATIC void Files(const char *p)               { _Files(p, 0); }
 
-STATIC void FilesHigh(PCStr p)         { _Files(p, 1); }
+STATIC void FilesHigh(const char *p)           { _Files(p, 1); }
 
 /* Format: LASTDRIVE [=] letter */
 /* Format: LASTDRIVEHIGH [=] letter */
-static void _CfgLastdrive(PCStr p, UBYTE high)
+static void _CfgLastdrive(const char *p, UBYTE high)
 {
   BYTE drv = toupper(*p);
   if (drv < 'A' || drv > 'Z' || p[1])
@@ -1008,9 +1008,9 @@
   Config.cfgLastdriveHigh = high;
 }
 
-STATIC void CfgLastdrive(PCStr p)      { _CfgLastdrive(p, 0); }
+STATIC void CfgLastdrive(const char *p)        { _CfgLastdrive(p, 0); }
 
-STATIC void CfgLastdriveHigh(PCStr p)  { _CfgLastdrive(p, 1); }
+STATIC void CfgLastdriveHigh(const char *p)    { _CfgLastdrive(p, 1); }
 
 /* UmbState of confidence, UMB_DONE is sure, UMB_REQ maybe, UMB_NONE no way.
    Transitions: UMB_NONE -> UMB_NONE/UMB_REQ depending on DOS=UMB, try init
@@ -1021,12 +1021,12 @@
 /* opt = HIGH | UMB
    Format: DOS [=] opt {, opt}
 */
-STATIC void Dosmem(PCStr p)
+STATIC void Dosmem(const char *p)
 {
   UBYTE UMBwanted = UMB_NONE, HMAwanted = HMA_NONE;
   for (;;)
   {
-    PCStr q = scanword(p, szBuf);
+    const char *q = scanword(p, szBuf);
     if (!strcasediff(szBuf, "UMB"))
       UMBwanted = UMB_REQ;
     else if (!strcasediff(szBuf, "HIGH"))
@@ -1062,7 +1062,7 @@
 }
 
 /* Format: DOSDATA [=] UMB */
-STATIC void DosData(PCStr p)
+STATIC void DosData(const char *p)
 {
   if (!strcasediff(p, "UMB"))
     Config.cfgDosDataUmb = TRUE;
@@ -1071,7 +1071,7 @@
 }
 
 /* Format: SWITCHAR [=] character */
-STATIC void CfgSwitchar(PCStr p)
+STATIC void CfgSwitchar(const char *p)
 {
   if (*p == '\0' || p[1])
   {
@@ -1083,7 +1083,7 @@
 }
 
 /* Format: SWITCHES [=] { /K | /N | /F | /E[[:]nnn] } */
-STATIC void CfgSwitches(PCStr p)
+STATIC void CfgSwitches(const char *p)
 {
   do
   {
@@ -1135,7 +1135,7 @@
 }
 
 /* Format: FCBS [=] totalFcbs [, protectedFcbs] */
-STATIC void Fcbs(PCStr p)
+STATIC void Fcbs(const char *p)
 {
   if (GetNumArg2(p, Config.cfgProtFcbs))
   {
@@ -1157,7 +1157,7 @@
  */
 
 #if 0
-STATIC void LoadCountryInfo(CStr filename, int ccode, int cpage)
+STATIC void LoadCountryInfo(const char *filename, int ccode, int cpage)
 {
   say("Sorry, the COUNTRY= statement has been temporarily disabled\n");
 
@@ -1170,10 +1170,10 @@
 #endif
 
 /* Format: COUNTRY [=] countryCode [, [codePage] [, filename]]   */
-STATIC void Country(PCStr p)
+STATIC void Country(const char *p)
 {
   int ccode;
-  /*PCStr filename = "";*/
+  /*const char *filename = "";*/
 
   p = GetNumArg(p);
   if (p == NULL)
@@ -1211,7 +1211,7 @@
 
 /* Format: STACKS [=] stacks [, stackSize] */
 /* Format: STACKSHIGH [=] stacks [, stackSize] */
-static void _Stacks(PCStr p, UBYTE high)
+static void _Stacks(const char *p, UBYTE high)
 {
   if (GetNumArg2(p, Config.cfgStackSize))
   {
@@ -1229,12 +1229,12 @@
   }
 }
 
-STATIC void Stacks(PCStr p)            { _Stacks(p, 0); }
+STATIC void Stacks(const char *p)              { _Stacks(p, 0); }
 
-STATIC void StacksHigh(PCStr p)                { _Stacks(p, 1); }
+STATIC void StacksHigh(const char *p)          { _Stacks(p, 1); }
 
 /* Format: SHELL [=] command */
-STATIC void CmdShell(PCStr p)
+STATIC void CmdShell(const char *p)
 {
   Config.cfgP_0_startmode = 0;
   /* assume strlen(p)+1 <= sizeof Config.cfgShell */
@@ -1242,7 +1242,7 @@
 }
 
 /* Format: SHELLHIGH [=] command */
-STATIC void CmdShellHigh(PCStr p)
+STATIC void CmdShellHigh(const char *p)
 {
   Config.cfgP_0_startmode = 0x80;
   /* assume strlen(p)+1 <= sizeof Config.cfgShell */
@@ -1250,7 +1250,7 @@
 }
 
 /* Format: BREAK [=] (ON | OFF) */
-STATIC void CfgBreak(PCStr p)
+STATIC void CfgBreak(const char *p)
 {
   if (!strcasediff(p, "ON"))
     break_ena = 1;
@@ -1261,7 +1261,7 @@
 }
 
 /* Format: NUMLOCK [=] (ON | OFF) */
-STATIC void Numlock(PCStr p)
+STATIC void Numlock(const char *p)
 {
   UBYTE FAR *keyflags = MK_PTR(UBYTE, 0, 0x417);
   if (!strcasediff(p, "ON"))
@@ -1277,7 +1277,7 @@
 }
 
 /* Format: DEVICEHIGH [=] command */
-STATIC void DeviceHigh(PCStr p)
+STATIC void DeviceHigh(const char *p)
 {
   if (UmbState != UMB_DONE || /* UMB not initialized? */
       LoadDevice(p, MK_SEG_PTR(void, mcb_next(umb_base_start)), TRUE) == DE_NOMEM)
@@ -1285,12 +1285,12 @@
 }
 
 /* Format: DEVICE [=] command */
-STATIC void Device(PCStr p)
+STATIC void Device(const char *p)
 {
   LoadDevice(p, lpTop, FALSE);
 }
 
-STATIC BOOL LoadDevice(PCStr p, VFP top, int mode)
+STATIC BOOL LoadDevice(const char *p, void FAR *top, int mode)
 {
   int ret;
 
@@ -1308,8 +1308,8 @@
 
   /* Get the device driver name                                   */
   {
-    PStr d = szBuf;
-    PCStr s = p;
+    char *d = szBuf;
+    const char *s = p;
     for (; (UBYTE)*s > ' '; d++, s++)
       *d = *s;
     *d = '\0';
@@ -1371,7 +1371,7 @@
   return ret;
 }
 
-STATIC void CfgFailure(PCStr p)
+STATIC void CfgFailure(const char *p)
 {
   printf("Error in %s line %d:\n"
          "%s\n", configfile, nCfgLine, szLine);
@@ -1388,7 +1388,7 @@
   char name[8];
 };
 
-void _seg * KernelAllocPara(size_t nPara, UBYTE type, CStr name, int mode)
+void _seg * KernelAllocPara(size_t nPara, UBYTE type, const char *name, int mode)
 {
   seg_t base, start;
   struct submcb _seg *p;
@@ -1463,7 +1463,7 @@
 }
 #endif
 
-void _seg * alignNextPara(CVFP p)
+void _seg * alignNextPara(const void FAR *p)
 {
   /* First, convert the segmented pointer to linear address       */
   seg_t seg = FP_OFF(p);
@@ -1476,7 +1476,7 @@
 }
 #endif
 
-STATIC PCStr skipwh(PCStr s)
+STATIC const char *skipwh(const char *s)
 {
   s--;
   do
@@ -1485,7 +1485,7 @@
   return s;
 }
 
-STATIC PCStr scanword(PCStr s, PStr d)
+STATIC const char *scanword(const char *s, char *d)
 {
   s = skipwh(s);
   while (*s >= 'a' && *s <= 'z' ||
@@ -1495,7 +1495,7 @@
   return s;
 }
 
-STATIC PCStr scanverb(PCStr s, PStr d)
+STATIC const char *scanverb(const char *s, char *d)
 {
   askCommand &= ~(ASK_ASK | ASK_NOASK);
   line_choices = 0xffff;       /* statement in all menus       */
@@ -1515,7 +1515,7 @@
       UBYTE ch = *s - (UBYTE)'0';
       if (ch <= 9)             /* "123?device" ?               */
       {
-        PCStr p = s;
+        const char *p = s;
         unsigned digits = 0;
         do
         {
@@ -1554,9 +1554,9 @@
 }
 
 /* Convert string s to uppercase */
-static PStr strupr(PStr s)
+static char *strupr(char *s)
 {
-  PStr d = s;
+  char *d = s;
   for (;; d++)
   {
     char ch = *d;
@@ -1595,14 +1595,14 @@
 }
 #endif
 
-static PStr strcat(PStr d, PCStr s)
+static char *strcat(char *d, const char *s)
 {
   strcpy(d + strlen(d), s);
   return d;
 }
 
 /* compare two ASCII strings ignoring case */
-STATIC char strcasediff(PCStr d, PCStr s)
+STATIC char strcasediff(const char *d, const char *s)
 {
   while (toupper(*s) == toupper(*d))
   {
@@ -1707,7 +1707,7 @@
         will report to MSDOS programs just the version number
         they expect. be careful with it!
 */
-STATIC void SetAnyDos(PCStr p)
+STATIC void SetAnyDos(const char *p)
 {
   if (*p) /* garbage at line end? */
   {
@@ -1718,7 +1718,7 @@
 }
 
 /* Format: EECHO string */
-STATIC void CfgMenuEsc(PCStr p)
+STATIC void CfgMenuEsc(const char *p)
 {
   char ch;
   do
@@ -1750,7 +1750,7 @@
 
 /* Format: MENU string */
 /* Format: ECHO string */
-STATIC void CfgMenu(PCStr p)
+STATIC void CfgMenu(const char *p)
 {
   struct MenuSelector *menu;
   UBYTE ch;
@@ -1914,7 +1914,7 @@
 }
 
 /* Format: MENUDEFAULT [=] menu [, waitsecs] */
-STATIC void CfgMenuDefault(PCStr p)
+STATIC void CfgMenuDefault(const char *p)
 {
   if (GetNumArg2(p, MenuTimeout))
   {
@@ -1926,7 +1926,7 @@
 }
 
 /* Format: MENUCOLOR [=] foreground [, background] */
-STATIC void CfgMenuColor(PCStr p)
+STATIC void CfgMenuColor(const char *p)
 {
   if (GetNumArg2(p, 0))
   {
@@ -1996,7 +1996,7 @@
 {380,848,_DATE_DMY,"UAH"     ," ",",", ".", ":", 3 , 2,_TIME_24}, /* Ukraine          
Oleg Deribas            */
 };
 
-STATIC void LoadCountryInfoHardCoded(CStr filename, int ccode, int cpage)
+STATIC void LoadCountryInfoHardCoded(const char *filename, int ccode, int cpage)
 {
   struct CountrySpecificInfo *country;
   UNREFERENCED_PARAMETER(cpage);
@@ -2054,10 +2054,10 @@
 
 /* Format: INSTALL [=] command */
 /* Format: INSTALLHIGH [=] command */
-STATIC void _CmdInstall(PCStr p, int mode)
+STATIC void _CmdInstall(const char *p, int mode)
 {
   CommandTail args;
-  PStr pf;
+  char *pf;
   unsigned len;
   exec_blk exb;
 
@@ -2089,9 +2089,9 @@
     CfgFailure(p);
 }
 
-STATIC void CmdInstall(PCStr p)                { _CmdInstall(p, 0); }
+STATIC void CmdInstall(const char *p)          { _CmdInstall(p, 0); }
 
-STATIC void CmdInstallHigh(PCStr p)    { _CmdInstall(p, 0x80); }
+STATIC void CmdInstallHigh(const char *p)      { _CmdInstall(p, 0x80); }
 
 VOID DoInstall(void)
 {
@@ -2118,12 +2118,12 @@
 /* master_env copied over command line area in
    DOS_PSP, thus its size limited to 128 bytes */
 static char master_env[128] BSS_INIT({0});
-static PStr envp = master_env;
+static char *envp = master_env;
 
 /* Format: SET var = string */
-STATIC void CmdSet(PCStr p)
+STATIC void CmdSet(const char *p)
 {
-  PStr q;
+  char *q;
   p = skipwh(scanword(p, szBuf));
   if (*p != '=')               /* equal sign is required       */
   {
@@ -2135,10 +2135,10 @@
   strcat(strupr(szBuf), "=");
 
   {
-    PStr pm = master_env;      /* find duplication             */
+    char *pm = master_env;     /* find duplication             */
     for (q = pm; pm < envp; q = pm)
     {
-      PCStr v = szBuf;
+      const char *v = szBuf;
       while (*v == *pm)                /* compare variables            */
        v++, pm++;
       while (*++pm);           /* find end of definition       */
Index: kernel/init-mod.h
===================================================================
RCS file: /cvsroot/freedos/kernel/kernel/init-mod.h,v
retrieving revision 1.56.2.1
diff -u -r1.56.2.1 init-mod.h
--- kernel/init-mod.h   9 Jul 2004 02:16:29 -0000       1.56.2.1
+++ kernel/init-mod.h   23 Jul 2004 00:17:16 -0000
@@ -128,12 +128,12 @@
 VOID PostConfig(VOID);
 VOID configDone(VOID);
 #ifdef I86
-void _seg * alignNextPara(CVFP);
+void _seg * alignNextPara(const void FAR *);
 #else
 #define alignNextPara(x) ((const VOID *)x)
 #endif
 void _seg * KernelAlloc(size_t nBytes, UBYTE type, int mode);
-void _seg * KernelAllocPara(size_t nPara, UBYTE type, CStr name, int mode);
+void _seg * KernelAllocPara(size_t nPara, UBYTE type, const char *name, int mode);
 void DoInstall(void);
 unsigned GetBiosKey(int timeout);
 
@@ -142,14 +142,14 @@
 
 /* int2f.asm */
 
-int ASMPASCAL UMB_get_largest(CVFP driverAddress, seg_t *, size_t *);
+int ASMPASCAL UMB_get_largest(const void FAR *driverAddress, seg_t *, size_t *);
 #ifdef __WATCOMC__
 # pragma aux (pascal) UMB_get_largest modify exact [ax bx cx dx]
 #endif
 
 /* inithma.c */
 int MoveKernelToHMA(void);
-VFP HMAalloc(COUNT bytesToAllocate);
+void FAR *HMAalloc(COUNT bytesToAllocate);
 
 /* intr.asm */
 
@@ -160,7 +160,7 @@
 int ASMPASCAL dup2(int oldfd, int newfd);
 seg ASMPASCAL allocmem(UWORD size);
 void ASMPASCAL init_PSPSet(seg psp_seg);
-int ASMPASCAL init_DosExec(int mode, exec_blk *, CStr);
+int ASMPASCAL init_DosExec(int mode, exec_blk *, const char *);
 int ASMPASCAL init_setdrive(int drive);
 int ASMPASCAL init_switchar(int chr);
 void ASMPASCAL keycheck(void);
@@ -213,7 +213,7 @@
 /* main.c */
 
 void ASMCFUNC FreeDOSmain(void);
-BOOL init_device(struct dhdr FAR *, PCStr cmdLine, int mode, VFP *top);
+BOOL init_device(struct dhdr FAR *, const char *cmdLine, int mode, void FAR **top);
 #ifdef __WATCOMC__
 # pragma aux (cdecl) FreeDOSmain aborts
 #endif
@@ -234,7 +234,7 @@
 extern unsigned CurrentKernelSegment;
 extern struct _KernelConfig FAR ASM LowKernelConfig;
 extern WORD days[2][13];
-extern VFP lpTop;
+extern void FAR *lpTop;
 extern BYTE ASM _ib_start[], ASM _ib_end[], ASM _init_end[];
 
 enum { ASK_ASK     = 0x01,     /* ?device= device?= */
Index: kernel/main.c
===================================================================
RCS file: /cvsroot/freedos/kernel/kernel/main.c,v
retrieving revision 1.81.2.2
diff -u -r1.81.2.2 main.c
--- kernel/main.c       11 Jul 2004 08:36:25 -0000      1.81.2.2
+++ kernel/main.c       23 Jul 2004 00:17:16 -0000
@@ -170,7 +170,7 @@
 
   /* parent-child relationships                                        */
   /*p->ps_parent = 0;*/                /* parent psp segment           */
-  p->ps_prevpsp = (VFP)-1l;    /* previous psp address         */
+  p->ps_prevpsp = (void FAR *)-1l; /* previous psp address     */
 
   /* Environment and memory useage parameters                  */
   /*p->ps_size = 0;*/          /* segment of memory beyond     */
@@ -410,7 +410,7 @@
   /* (insert /D, /Y as first argument)                         */
   if (askCommand & (ASK_TRACE | ASK_SKIPALL))
   {
-    PStr p = Config.cfgShell - 1; /* find end of command name  */
+    char *p = Config.cfgShell - 1; /* find end of command name */
 
     /* too long line -> truncate it to make space for "/Y \0"  */
     Config.cfgShell[sizeof Config.cfgShell - 4] = '\0';
@@ -421,7 +421,7 @@
       p++;                     /* place option after space     */
 
     {
-      PStr q = p;
+      char *q = p;
       while (*q++);            /* find end of command line     */
       /* shift tail to right by 3 to make room for option      */
       do
@@ -470,11 +470,11 @@
       i++;
     } while (i < nunits);
   }
-  (dpb - 1)->dpb_next = (VFP)-1l;
+  (dpb - 1)->dpb_next = (void FAR *)-1l;
 }
 
 /* If r_top is NULL, this is an internal driver */
-BOOL init_device(struct dhdr FAR * dhp, PCStr cmdLine, int mode, VFP *r_top)
+BOOL init_device(struct dhdr FAR * dhp, const char *cmdLine, int mode, void FAR 
**r_top)
 {
   request rq;
 
@@ -483,7 +483,7 @@
   rq.r_command = C_INIT;
   rq.r_length = sizeof(request);
   rq.r_endaddr = r_top ? *r_top : lpTop;
-  rq.r_bpbptr = (VFP)cmdLine;
+  rq.r_bpbptr = (void FAR *)cmdLine;
   rq.r_firstunit = LoL->nblkdev;
 
   execrh(&rq, dhp);
@@ -509,10 +509,10 @@
     if (FP_OFF(dhp->dh_next) == 0xffff)
     {
       char name[8];
-      PCStr q;
+      const char *q;
       {
         UBYTE ch;
-        PCStr p = cmdLine;
+        const char *p = cmdLine;
         q = p;                 /* position after path          */
         do                     /* find driver name after path  */
         {
Index: kernel/proto.h
===================================================================
RCS file: /cvsroot/freedos/kernel/kernel/proto.h,v
retrieving revision 1.75.2.1
diff -u -r1.75.2.1 proto.h
--- kernel/proto.h      9 Jul 2004 02:16:29 -0000       1.75.2.1
+++ kernel/proto.h      23 Jul 2004 00:17:16 -0000
@@ -231,7 +231,7 @@
 
 /* intr.asm */
 
-int ASMPASCAL res_DosExec(int mode, exec_blk *, PCStr);
+int ASMPASCAL res_DosExec(int mode, exec_blk *, const char *);
 unsigned ASMPASCAL res_read(int fd, void *buf, unsigned count);
 #ifdef __WATCOMC__
 # pragma aux (pascal) res_DosExec modify exact [ax bx dx es]
@@ -243,7 +243,7 @@
 
 /* memmgr.c */
 
-VFP adjust_far(CVFP);
+void FAR *adjust_far(const void FAR *fp);
 COUNT DosMemAlloc(UWORD size, COUNT mode, seg * para, UWORD * asize);
 COUNT DosMemLargest(UWORD * size);
 COUNT DosMemFree(UWORD para);
Index: kernel/task.c
===================================================================
RCS file: /cvsroot/freedos/kernel/kernel/task.c,v
retrieving revision 1.44.2.1
diff -u -r1.44.2.1 task.c
--- kernel/task.c       9 Jul 2004 02:16:29 -0000       1.44.2.1
+++ kernel/task.c       23 Jul 2004 00:17:16 -0000
@@ -178,7 +178,7 @@
   p->ps_unix[2] = 0xcb;
 
   /* parent-child relationships                                        */
-  p->ps_prevpsp = (VFP)-1l;    /* previous psp address         */
+  p->ps_prevpsp = (void FAR *)-1l; /* previous psp address     */
 
   p->ps_isv22 = getvec(0x22);  /* terminate handler            */
   p->ps_isv23 = getvec(0x23);  /* break handler                */
@@ -721,13 +721,13 @@
   int mode = Config->cfgP_0_startmode;
 
   const char FAR *p = MK_PTR(const char, FP_SEG(Config), Config->cfgShell);
-  PStr endp = Shell;
+  char *endp = Shell;
   while ((*endp = *p++) != '\0' &&
          ++endp < Shell + sizeofShell - 4); /* 4 for 0,ctCount and "\r\0" */
 
   for (;;) /* endless shell load loop - reboot or shut down to exit it! */
   {
-    PStr tailp = Shell - 1;
+    char *tailp = Shell - 1;
 
     *endp = '\r', endp[1] = '\0'; /* terminate command line */
     endp += 2;
@@ -737,7 +737,7 @@
 
     /* shift tail to right by 2 to make room for '\0' and ctCount */
     {
-      PStr p = endp;
+      char *p = endp;
       do
       {
         p--;






-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to