/*************************************************************************************************************************************/
/* */
/* T E S T D E L A F O N C T I O N ' fcntl(...) ' : */
/* */
/* */
/* Author of '$xtc/files.11$c' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, AAAAMMJJhhmmss). */
/* */
/*************************************************************************************************************************************/
#include <stdio.h>
#include <fcntl.h>
#define ENTREE \
0
main()
{
printf("\n RDONLY=%04x",O_RDONLY);
printf("\n WRONLY=%04x",O_WRONLY);
printf("\n RDWR =%04x",O_RDWR);
printf("\n TRUNC =%04x",O_TRUNC);
printf("\n flags=%08x\n",fcntl(ENTREE,F_GETFL));
/* On obtient les resultats suivants : */
/* */
/* $aPout flags=O_RDWR */
/* */
/* et : */
/* */
/* echo "" | $aPout flags=O_RDONLY */
/* */
/* et : */
/* */
/* ... | $xcg/remote.01$X machine=... c="tests/c$D/$aPout" flags=O_RDONLY+O_TRUNC */
/* */
/* mais ce dernier cas sur '$LACT29' uniquement... */
}