1 static void checkOpen (/*@open@*/ /*@null@*/ FILE *);
2 static void checkClosed (/*@closed@*/ /*@null@*/ FILE *);
9 checkClosed (fle
); /* okay */
10 checkOpen (fle
); /* error */
12 fle
= fopen ("test", "r");
13 checkClosed (fle
); /* error */
14 checkOpen (fle
); /* okay */
18 checkOpen (fle
); /* error */
19 checkClosed (fle
); /* okay */
21 return 0; /* error: f is not closed */
29 (void) fgets (s
, 3, fle
);
31 (void) fgets (s
, 3, fle
); /* error: f is not open */
32 (void) freopen ("test", "r", fle
);
33 (void) fgets (s
, 3, fle
);