Mail Archives: djgpp/2000/06/16/03:33:26
> 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.
- Raw text -