Date: Sat, 15 Nov 1997 09:49:01 -0500 (EST) Message-Id: <199711151449.JAA01185@delorie.com> To: DJGPP mailing list From: Alexander Bokovoy Subject: Write LFN handler for raw DOS? MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk Hi, All Is anybody can do the following thing: Write handler for file I/O operations (in libc, if I correct) that use FCB-interface for getting/putting long file names under raw DOS on FAT32 drives? If I correct, this is relative simple work. It would be very useful because then Windows'95 is no needed for operating with LFN. Norton Disk Editor for Windows 95 (which is DOS32 application) have this interface so long file names can be viewed in raw DOS. Here is an extraction from Ralf Brown's IntList 5.4: (interrup.e) Format of DOS directory entry: Offset Size Description (Table 1007) 00h 8 BYTEs blank-padded filename 08h 3 BYTEs blank-padded file extension 0Bh BYTE attributes 0Ch 10 BYTEs (MS-DOS 1.0-6.22) reserved (DR-DOS) used to store file password (MS-DOS 7/Windows95) additional file times (see #1008) 16h WORD time of creation or last update (see #1317 at AX=5700h) 18h WORD date of creation or last update (see #1318 at AX=5700h) 1Ah WORD starting cluster number (see also AX=440Dh/CX=0871h) 1Ch DWORD file size SeeAlso: #1009,#2276,#2277 Format of MS-DOS 7/Windows95 additional file times: Offset Size Description (Table 1008) 00h BYTE reserved 01h BYTE 10-millisecond units past creation time below 02h WORD file creation time 04h WORD file creation date 06h WORD last-access date 08h WORD (FAT32) high word of starting cluster number Note: this data is stored beginning at offset 0Ch in a standard directory entry SeeAlso: #1007 Format of MS-DOS 7/Windows95 long-filename directory entry: Offset Size Description (Table 1009) 00h BYTE LFN record sequence (bit 6 set if last record for file) 01h 10 BYTEs long filename, first part 0Bh BYTE 0Fh (otherwise impossible file attribute, used as signature) 0Ch BYTE reserved??? (00h) 0Dh BYTE checksum for short filename 10h 10 BYTEs long filename, second part 1Ah WORD first cluster number (always 0000h for LFN records) 1Ch 4 BYTEs long filename, third part Notes: long-filename entries are always stored in the directory just prior to the short-name entry for a file multiple LFN records are used if the long filename does not fit into a single record the short-filename checksum byte is computed by adding up the eleven bytes of the short filename, rotating the intermediate sum right one bit before adding the next character the long filename is encoded as 16-bit Unicode characters; for most filenames, this appears in the directory as the ASCII character followed by 00h SeeAlso: #1007 Alexander Bokovoy, ---== The Soft Age coming soon ==---