Mail Archives: djgpp/2000/05/03/02:17:37
On Tue, 2 May 2000 14:10:13 Eli Zaretskii wrote:
>
>On Tue, 2 May 2000, nimrod a. abing wrote:
>
>> BTW. Why does it crash? Isn't `char *stringtable[]'
>> equivalent to `char **stringtable'? Please explain
>> what happens.
>
>I don't have the source anymore, so I cannot comment on your
>questions. As far as I remember, the code dereferenced a NULL
>pointer.
>
Here it is again:
code in file1.c:
char *a_string_array[] = {
"Now is the time for all good men",
"To destroy the earth",
"And have beer parties across the galaxy.",
""
};
code in file2.c:
#include <stdio.h>
extern char **a_string_array;
int main(void)
{
int i=0;
char *a_string;
a_string = a_string_array[i];
while (a_string[0])
{
printf("%s\n", a_string);
i++;
a_string = a_string_array[i];
}
return 0;
}
Good thing I save my messages. Now in most C books,
they say `char **string_array' is equivalent to
`char *string_array[]'. Now why does it crash?
>I was just pointing out that lobbying people to remove Windows while
>you yourself are using it looks---how shall I put it?---odd...
Yes, it is ;-). What was I thinking? But during the
time I wrote my sig, I thought of nothing else. (Have
any good ones?)
>> Just a thought, has anyone figured out how to use LFN
>> from MS-DOS mode in Win9x? In DOS mode, Win9x seems to
>> forget how to read long file names.
>
>You can't. The LFN support is part of the Windows file I/O layer,
>and that part of Windows is shut down when you go to DOS mode.
>
There was a thread discussing this a few days back. But
I never pay much attention to these things. But if I
know those MS guys, the VFAT entries for LFN must be
stored somewhere on the disk. Methinks a TSR can do
this. It should be possible to read and write these
entries in DOS mode using a TSR program. It loads into
memory when Windows shuts down to DOS mode and
replaces that part of Windows that does the LFN thing
in GUI mode. But then again, why do all that
unecessary work? That's why I still use Windows when I
program using DJGPP.
---
nimrod_a_abing
No sig for now...
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com
- Raw text -