From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Long filename problem Date: Mon, 16 Jun 1997 22:15:57 +0100 Organization: wot? me? Distribution: world Message-ID: References: <33A4C1C8 DOT 2FB9 AT tiac DOT net> Reply-To: Paul Shirley NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 Lines: 28 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <33A4C1C8 DOT 2FB9 AT tiac DOT net>, Claude Sassine writes >In trying to create a file from with a C program with filename longer >than 8 characters, two questions came about. One, can the size the >filename be changed by adjusting a header file variable? The stdio.h >file defines the FILENAME_MAX=260, but the only 8 characters are >permited. Is there some other variable that can changed to accomplish >this? > This is an OS specific limit, its the maximum length of a path:filename string that Win32 OS calls will handle. You cannot increase it, however theres no restriction to 8 character filenames, unless you impose the restriction yourself. Just make sure you don't use >FILENAME_MAX for the path:file combination, and the filename part cannot exceed the OS limit (not sure what that is but 250 chars should be safe). >Secondly, the information in a open file does not seem to be written >onto the hard drive until after the program ends. This was done using >the fopen and fclose commands. The header files seem to offer more >processing than I am aware of, but time has not allowed me the chance to >read the information at the DJGPP website. Can the data onto be stored >onto hard drive, intermittently, as the program continues processing? Have a look at fflush (info libc alpha fflush), just call it to get buffered data written to disk. --- Paul Shirley: my email address is 'obvious'ly anti-spammed