#include<stdio.h>
void closefile(FILE **hFile)
{
if (*hFile) {
printf("nettoyage handle %p\n",*hFile);
fclose(*hFile);
}
}
int main(void)
{
__attribute__ ((cleanup(closefile) )) FILE *hFile = 0;
hFile = fopen("cleanup_attribute.c","r");
return 0;
}
#include<stdio.h>
void closefile(FILE **hFile)
{
if (*hFile) {
printf("nettoyage handle %p\n",*hFile);
fclose(*hFile);
}
}
int main(void)
{
__attribute__ ((cleanup(closefile) )) FILE *hFile = 0;
hFile = fopen("cleanup_attribute.c","r");
return 0;
}
I remember François Lionnet had written in the introduction of the manual « i hope in the future, a hitmaker will tell me that he has begun with AMOS ! ». Well, i'm not a hitmaker, but at least i went beyond the basic(s) with AMOS.
I remember François Lionnet had written in the introduction of the manual « i hope in the future, a hitmaker will tell me that he has begun with AMOS ! ». Well, i'm not a hitmaker, but at least i went beyond the basic(s) with AMOS.