Message-Id: <199612021709.JAA24530@ridge.spiritone.com> From: "Rodger D. Ballard Jr." To: "Eli Zaretskii" Cc: Subject: Re: DJGPP w/long file name support Date: Mon, 2 Dec 1996 09:13:43 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit THANK YOU! you did answer my question. In addition this just proves that DJ is just that much more up to date ;) ---------- > From: Eli Zaretskii > To: Rodger D. Ballard Jr. > Cc: djgpp AT delorie DOT com > Subject: Re: DJGPP w/long file name support > Date: Monday, December 02, 1996 6:57 AM > > > On Sun, 1 Dec 1996, Rodger D. Ballard Jr. wrote: > > > I am sorry for not being too clear on that one. This question pertains more > > towards C and for instance if I wanted to make a program that supports long > > file name support under a Win95 dos box. I was curious if anyone knew how > > to implement this in a seperate program via DJGPP C code (I have a feeling > > it would involve inline assembler, something I have never touched under > > DJ.) > > Unless I misunderstand you completely, I already answered this: *every* > program compiled with DJGPP supports long filenames when you run it from > Windows 95 DOS box. This includes programs compiled by you, not only > those that come pre-built with the DJGPP distribution. You don't have to > do anything special to get this support: it's built into the DJGPP runtime > library functions which your program calls. For instance, you can say > this in your program: > > FILE *fp = fopen ("this_is_the_file_name.txt", "r"); > > When this is run on Windows 95, the function `fopen' will see that long > filenames are supported on this platform and will then use the long > filename version of DOS OpenFile function. This is all entirely > automatic. > > > A perfect example is this: > > > > Construct a program that will add line numbers and colons in front of every > > line in a specified file that supports long file names: > > > > A sample run might be: > > > > disptext this_is_the_file_name.txt > > Write your `disptext' in C, compile it with DJGPP, and you will get a > program that can be run like that.