Problem with stat
Václav Haisman
v.haisman@sh.cvut.cz
Tue Jun 26 09:34:00 GMT 2007
Erich Dollansky wrote:
[...]
>
> When I run this little C++ program:
>
> PRIVATE VOID StatLessdox (VOID)
> BEGIN
> struct stat Stat;
>
> IF (stat ("/usr/X11R6/share/doc/lesstif-0.94.4/html/Lessdox", &Stat)
> == 0) THEN
> printf ("Mode: %lX\n", (unsigned long) Stat.st_mode);
> IF (S_ISDIR (Stat.st_mode)) THEN
> printf ("Directory flag is set.\n");
> END;
> IF (S_ISREG (Stat.st_mode)) THEN
> printf ("Is a regular file.\n");
> END;
> IF (S_ISLNK (Stat.st_mode)) THEN
> printf ("Link flag is set.\n");
> END;
> END;
> END;
[...]
This is NOT C++. Not without some obscure header included before the source.
--
VH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 542 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070626/54a740d5/attachment.sig>
More information about the Cygwin
mailing list