Hi!
23-Июн-2006 06:39 [EMAIL PROTECTED] (Blair Campbell) wrote to
[EMAIL PROTECTED]:
BC> +++ lfnfuncs.c 23 Jun 2006 06:39:36 -0000 1.5
BC> +extern unsigned char __supportlfns;
Blair, please, collect all prototypes in header files! Don't distribute
them manually over source files! Don't introduce possibility to make stupid
bugs!
BC> char * getshortfilename( const char *longfilename )
BC> {
BC> static char shortfilename[ 128 ];
BC> @@ -54,26 +56,20 @@
BC> _POP_ES;
BC> _POP_DS;
BC> - return( ( _CFLAG || _AX == 0x7100 ) ?
BC> + return( ( _CFLAG || _AX == 0x7100 || !__supportlfns ) ?
BC> strcpy( shortfilename, longfilename ) : shortfilename );
BC> }
const char * getshortfilename (const char *longfilename) {
if (!__supportlfns)
return longfilename;
...
if (!_CFLAG && _AX != 0x7100)
longfilename = shortfilename;
return longfilename;
}
BC> static void __creat_or_truncate( const char * filename, int mode )
BC> + if( !__supportlfns ) {
BC> + handle = creatnew( filename, mode );
BC> + _close( handle );
BC> + return;
BC> + }
if (!__supportlfns) {
_close (creatnew (filename, mode));
return;
}
BC> int lfnrename( const char *oldfilename, const char *newfilename )
BC> { /* Must use the actual interrupt for this */
BC> +#if 1
BC> + printf( "%s, %s\n", oldfilename, newfilename );
BC> _PUSH_DS;
BC> _PUSH_ES;
BC> @@ -165,24 +175,58 @@
BC> _AX = 0x7156;
BC> _STC;
BC> + _POP_DS;
BC> + _POP_ES;
BC> geninterrupt( 0x21 );
Two bugs?
- you restore DS and ES _before_ interrupt, not after.
- order of restoring not match order of pushing!
BC> if( _CFLAG || _AX == 0x7100 ) {
BC> + _PUSH_DS;
BC> + _PUSH_ES;
[...]
BC> - _POP_ES;
BC> _POP_DS;
BC> + _POP_ES;
Same bug (order of push/pop)!
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel