Message-Id: <200006160728.KAA28707@alpha.netvision.net.il> Date: Fri, 16 Jun 2000 10:31:17 +0200 X-Mailer: Emacs 20.6 (via feedmail 8.1.emacs20_6 I) and Blat ver 1.8.5b From: "Eli Zaretskii" To: sami3079 AT my-deja DOT com CC: djgpp AT delorie DOT com In-reply-to: <8iap4s$s5d$1@nnrp1.deja.com> (sami3079@my-deja.com) Subject: Re: File handling / argument globbing References: <8iap4s$s5d$1 AT nnrp1 DOT deja DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: sami3079 AT my-deja DOT com > Newsgroups: comp.os.msdos.djgpp > Date: Thu, 15 Jun 2000 14:28:04 GMT > First, please in the future try to deal with one subject in each message. Otherwise, you make the thread very difficult to read. > I'm trying to disable wildcard expansion as FAQ sais but > function like this has no effect at all: > > > char **__crt0_glob_function (char *arg) > > { > > return 0; > > } Is it a C++ program? If so, you need to declare the function ``extern "C"''. If it is a C program, please post here the shortest complete program that can be used to reproduce the effect, and please tell what do you mean by "has no effect at all". > And when I take ffblk from a file using findfirst/findnext, how > do I save the changes to a file if I want to? For example, I want > to change the file creation date, how do I do this? You cannot ``write back'' the info from findfirst, you need to call specialized functions for that. For example, to change file's times, use the library functioin `utime', to change file's attributes, use `chmod', etc. > How do I get to know long filename's short (8+3) -name? There is no library function for this, at the moment. You can use __dpmi_int to invoke subfunction 1 of function 7160h of interrupt 21h, which will do that. Ralf Brown's Interrupt List has the details. > And if I want to have a list of all files, including from > subdirectories, how do I do this easily? One way is to call the library function `glob' passing it the wildcard ".../*" as its argument. But please note that "..." is a special feature of DJGPP which will not work on any other platform, and `glob' is only portable to Unix/Linux, other DOS/Windows compilers generally don't have it.