diff options
author | John van Groningen | 2008-04-10 10:50:22 +0000 |
---|---|---|
committer | John van Groningen | 2008-04-10 10:50:22 +0000 |
commit | aadc7382adf50aaaa3e3ad002eb775c0fb9a6e99 (patch) | |
tree | 0a4f807d21d3bcf2bdbbc71eeefe4149c2dcb7ee | |
parent | export clean_init and clean_fini for initializing and finalizing (diff) |
fix printing of 64 bit integers (use all 64 bits, instead of only 32)
-rw-r--r-- | scon.c | 12 | ||||
-rw-r--r-- | scon.h | 8 | ||||
-rw-r--r-- | ufileIO2.c | 10 |
3 files changed, 29 insertions, 1 deletions
@@ -638,6 +638,17 @@ void ew_print_string (char *s) fputs (s,stderr); } +#ifdef A64 +void w_print_int (long n) +{ + printf ("%ld",n); +} + +void ew_print_int (long n) +{ + fprintf (stderr,"%ld",n); +} +#else void w_print_int (int n) { printf ("%d",n); @@ -647,6 +658,7 @@ void ew_print_int (int n) { fprintf (stderr,"%d",n); } +#endif void w_print_real (double r) { @@ -3,12 +3,20 @@ extern int w_get_int (int *i_p); extern int w_get_real (double *r_p); extern unsigned long w_get_text (char *string,unsigned long max_length); extern void w_print_char (char c); +#ifdef A64 +extern void w_print_int (long i); +#else extern void w_print_int (int i); +#endif extern void w_print_real (double r); extern void w_print_string (char *s); extern void w_print_text (char *s,unsigned long length); extern void ew_print_char (char c); +#ifdef A64 +extern void ew_print_int (long i); +#else extern void ew_print_int (int i); +#endif extern void ew_print_real (double r); extern void ew_print_string (char *s); extern void ew_print_text (char *s,unsigned long length); @@ -15,6 +15,10 @@ # include <string.h> #endif +#ifdef __x86_64__ +# define A64 +#endif + #include "scon.h" extern void IO_error (char*); @@ -807,8 +811,12 @@ void file_write_char (int c,long fn) } } +#ifdef A64 +void file_write_int (long i,long fn) +#else void file_write_int (int i,long fn) -{ +#endif +{ if (fn<FIRST_REAL_FILE){ switch (fn){ case 0: |