Re: [Freedos-kernel] Re: patch: cleanups

2004-07-23 Thread Aitor Santamaría Merino
Hi,
Eric Auer escribió:
Arkady, Bart,
 

BO -void _seg * KernelAllocPara(size_t nPara, UBYTE type, CStr name, int mode)
BO +void _seg * KernelAllocPara(size_t nPara, UBYTE type, const char *name, int
BO mode)
This is example, how my shortcuts allows to shorter and, thus, more
redable lines.
   

No, Bart is perfectly right. If you use CStr, I first have to lookup
what CStr means. It is no obvious name for const char *! This actually
INCREASES the problems with reading code, unless you first learn all defines
by heart.
Just a plain dull message to express that I support this kind of changes 
too. Quite more readable.

Aitor
---
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=4721alloc_id=10040op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Strange bug in kernel 2035

2004-07-23 Thread Bart Oldeman
Hello Tom,


apart from the drawbacks there is another problem:

---
  mov bp, [bp + 20]   ; store id (in SS:) unless it's NULL
  or  bp, bp
  jz  nostore
  mov [bp], bx
nostore:
---
   
   if (*id)
   *id = r.b.x;

The first * in this part is wrong, and also id lives on the stack, but 
SS!=DS here (!), see the comments elsewhere in nls.c.

it would need to be
if (id != NULL) /* or if (id) */
poke(_SS, id, r.b.x);

returning a long (or a struct with two ints, but I'm not sure if all 
compilers we use put that in dx:ax) would be another way to avoid this,
and save a bit of stack space too.

Bart



---
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=4721alloc_id=10040op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel