summaryrefslogtreecommitdiff
path: root/wcon.c
diff options
context:
space:
mode:
authorJohn van Groningen2012-12-21 16:07:23 +0000
committerJohn van Groningen2012-12-21 16:07:23 +0000
commit7daa52b36f5d741e943ec05320da13e184cb87ed (patch)
tree8350b1a5ec7c26c5b1093c0527dcf46da89c5ff0 /wcon.c
parentfix memory allocation of arrays of unboxed records of size 4 for 64 bit versions (diff)
on 64 bit versions of Windows
#define A64 and HFILE to be able to correctly compute the size of struct file defined in a header file, redirecting standard files did not work because of this bug
Diffstat (limited to 'wcon.c')
-rw-r--r--wcon.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/wcon.c b/wcon.c
index 596c9d9..56534ce 100644
--- a/wcon.c
+++ b/wcon.c
@@ -6,6 +6,7 @@
#ifdef _WIN64
# define AI64
+# define A64
#endif
#include <float.h>
@@ -44,6 +45,7 @@
} WIN32_FIND_DATA;
# endif
#endif
+#define HFILE HANDLE
#include "wfileIO3.h"
#define SHOW_EXECUTION_TIME_MASK 8
@@ -270,10 +272,10 @@ int w_get_char (void)
#define is_digit(n) ((unsigned)((n)-'0')<(unsigned)10)
-int w_get_int (int *i_p)
+int w_get_int (clean_int *i_p)
{
int c,negative;
- unsigned int i;
+ clean_int i;
#ifdef WINDOWS
if (std_input_from_file)
@@ -554,15 +556,15 @@ int w_get_real (double *r_p)
return result;
}
-unsigned long w_get_text (char *string,unsigned long max_length)
+unsigned long w_get_text (char *string,unsigned clean_int max_length)
{
- ULONG length;
+ unsigned clean_int length;
length=0;
#ifdef WINDOWS
if (std_input_from_file){
- unsigned long length;
+ unsigned clean_int length;
length=max_length;
return file_read_characters (&file_table[1],&length,string);
@@ -1282,9 +1284,9 @@ void ew_print_real (double r)
void wait_for_key_press (VOID)
{
DWORD console_mode;
-
+
SetConsoleTitleA ("press any key to exit");
-
+
GetConsoleMode (std_input_handle,&console_mode);
SetConsoleMode (std_input_handle,console_mode & ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT));
{