X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: dos-man 64 Newsgroups: comp.os.msdos.djgpp Subject: Re: Is there some way to convert long filenames to short filenames? Date: Fri, 13 Mar 2009 08:47:45 -0700 (PDT) Organization: http://groups.google.com Lines: 49 Message-ID: <80df941e-7eb4-4662-8a0b-d8d753a1295d@e18g2000yqo.googlegroups.com> References: <275d23ac-69e7-4da0-88a0-a807a182477e AT a39g2000yqc DOT googlegroups DOT com> NNTP-Posting-Host: 65.78.101.94 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236959265 12697 127.0.0.1 (13 Mar 2009 15:47:45 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Fri, 13 Mar 2009 15:47:45 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: e18g2000yqo.googlegroups.com; posting-host=65.78.101.94; posting-account=KWQMBgkAAACyIBKFFEyMPc0WiKp5u-pU User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.63 (Windows NT 5.1; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mar 13, 3:25=A0am, "Rod Pemberton" wrote: > "dos-man 64" wrote in message > > news:275d23ac-69e7-4da0-88a0-a807a182477e AT a39g2000yqc DOT googlegroups DOT com... > So, the questions are: > 1) What environment are you using: real mode 16-bit DOS without LFN, Open= DOS > with LFN, or a Windows dosbox with LFN? =A0I.e., does it support LFN's? > 2) How are you attempting to use LFN's in your program? =A0Are you using > DJGPP's functions? =A0Or, are you calling the LFN API directly? I'm a windows 98 SE user. I can certainly use the appliction from Real- mode, but mostly I'm using from within windows. I really don't know what the LFN API is. This is my first time using this compiler. I was pleasantly surprised that I even was able to get the application to recompile at all. It's pretty compatible with the borland compiler. As stated, I had a bit of trouble with a few of the non-ansi functions like getcwd, and getdisk(). The getdisk() function gave me a lot of trouble, so I created a new function using int86( ). > > FYI, I don't usually use the LFN functionality of DJGPP. =A0What I typica= lly > do is use SFNs only. =A0The reason is because I need LFN's to work with t= he > OpenWatcom C compiler too which doesn't have LFN support or it only had S= FN > support when I started using it... =A0It might have LFNs in the current > version. =A0If I need to display an LFN, I convert from SFN to LFN callin= g the > LFN API directly. =A0If I'm passed an LFN, I convert from LFN to SFN call= ing > the LFN API directly and then use the SFN. =A0To obtain or convert betwee= n > SFNs and LFNs, you need only two of the LFN API's calls - except for > renaming an LFN. =A0I use __dpmi_int() to call the 0x71a0 and 0x7160 LFN > functions to determine: 1) if LFN's are available and 2) to obtain the LF= N, > SFN, or fullpathname from an LFN or SFN. =A0This works with both MS-DOS v= 7.10 > and Win98SE dosbox, DJGPP and OpenWatcom. =A0Once these two functions are > written, it's "cut-n-paste". > > Rod Pemberton I've been using this app for quite a few years. I definitely improved it last night. However, it's always been my dream to have this program work with long filenames.