Hi!
23-Сен-2004 07:43 [EMAIL PROTECTED] (Luchezar Georgiev) wrote to
[EMAIL PROTECTED]:
LG> Fix SET PATH=xxx in CONFIG.SYS
^^^
?
LG> +++ config.c23 Sep 2004 07:43:17 - 1.89.2.6
LG> @@ -2110,8 +2110,13 @@
LG> /* master_env copied over command line area in
LG> DOS_PSP, thus its size limited to 128 bytes */
LG> -static char master_env[128] BSS_INIT({0});
-
LG> -static PStr envp = master_env;
LG> +static char master_env[128] = "PATH=.";
^^^
LG> +
LG> + /* !!! dirty hack: because bug in old FreeCOM, which wrongly
LG> + process empty environment in MS-DOS style, garbage empty
LG> + environment by dummy variable: --avb
LG> + */
LG> +static PStr envp = master_env + 7; /* sizeof("PATH=.") + 1 zero */
LG> +++ main.c 23 Sep 2004 07:43:17 - 1.81.2.5
LG> @@ -175,12 +175,6 @@
LG>/* this area reused for master environment */
LG>/*p->ps_cmd.ctCount = 0;*/ /* local command line */
LG>/*p->ps_cmd.ctBuffer[0] = '\r';*/ /* command tail*/
LG> -
LG> - /* !!! dirty hack: because bug in old FreeCOM, which wrongly
LG> - process empty environment in MS-DOS style, garbage empty
LG> - environment by dummy variable: --avb
LG> - */
LG> - fmemcpy(&p->ps_cmd, "PATH=.", 6/*strlen("PATH=.")*/);
LG> }
Difference is that fmemcpy() adds code, whereas "char [128]="..."" adds
128 bytes of data (which 3-4 times bigger). Why? Note: PSPInit called before
DoConfig(), so there are no _functional_ difference, except size of
executable.
---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel