commit
d8371d8e74
7
text.c
7
text.c
@ -293,9 +293,10 @@ void save_file(PAGE *p)
|
|||||||
int file_exists(char *filename)
|
int file_exists(char *filename)
|
||||||
{
|
{
|
||||||
FILE *fp = fopen(filename, "r");
|
FILE *fp = fopen(filename, "r");
|
||||||
int result = (fp == NULL);
|
if(fp != NULL) {
|
||||||
if(result)
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return !result;
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/* saving and loading */
|
/* saving and loading */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user