diff options
author | John van Groningen | 2010-11-25 13:41:14 +0000 |
---|---|---|
committer | John van Groningen | 2010-11-25 13:41:14 +0000 |
commit | 2e5e2bc048019c2e5058870835113e6f3302c4ca (patch) | |
tree | e867ddff4fc906c9ed5f4508a0ff75659e590e04 | |
parent | #include <stdlib.h> to prevent c compiler warnings for function free (diff) |
if close_file succeeds yield 1 on IA32 and AMD64 instead of -1
-rw-r--r-- | ufileIO2.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -64,6 +64,12 @@ struct clean_string { #endif }; +#ifdef I486 +# define CLEAN_TRUE 1 +#else +# define CLEAN_TRUE (-1) +#endif + static struct file file_table [MAX_N_FILES]; #ifdef LINUX @@ -393,7 +399,7 @@ int close_file (long fn) if (ferror (stdin) || ferror (stdout)) return 0; } - return -1; + return CLEAN_TRUE; } else { struct file *f; int result; @@ -403,7 +409,7 @@ int close_file (long fn) if (f->file==NULL) IO_error ("FClose: File not open"); - result=-1; + result=CLEAN_TRUE; if (fclose (f->file)!=0) result=0; |