Hi! 10-Дек-2005 10:09 [EMAIL PROTECTED] (Kenneth Davis) wrote to [EMAIL PROTECTED]:
> +++ mk_rddir.c 10 Dec 2005 10:09:43 -0000 1.3 > +int lfn_mrc_dir(const char *path, int mode) > +{ > + struct REGPACK r; > + int mrc_f[6] = { 0x713A, 0x7139, 0x713B, 0x3A, 0x39, 0x3B }; --------^^^ Should be "static" (else this array will be filled by extra code at runtime), but anyway this array should be removed: > + r.r_ax = mrc_f[mode + (checkDriveSupportsLFN(getdisk() + 'A') ? 0 : 3)]; if (checkDriveSupportsLFN(getdisk() + 'A')) mode += 0x7100; r.r_ax = mode; > + r.r_ds = FP_SEG(path); > + r.r_dx = FP_OFF(path); > + intr(0x21, &r); > + return (r.r_flags & 1) ? -1 : 0; return -(r.r_flags & 1); /* -1 if carry flag set */ > +} > + > +#define mkdir(x) lfn_mrc_dir(x,1) > +#define rmdir(x) lfn_mrc_dir(x,0) > +#define chdir(x) lfn_mrc_dir(x,2) #define mkdir(x) lfn_mrc_dir(x,0x3A) #define rmdir(x) lfn_mrc_dir(x,0x39) #define chdir(x) lfn_mrc_dir(x,0x3B) > +++ cd_dir.c 10 Dec 2005 10:09:43 -0000 1.5 > +#define chdir(x) lfn_mrc_dir(x, 2) #define chdir(x) lfn_mrc_dir(x,0x3B) // but better place these definitions into some .h file ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Freedos-kernel mailing list Freedos-kernel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-kernel