From 4a07cd99a598aa1af8b71c80a9556fe3fd65ec83 Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 28 Jan 2008 23:35:04 +0000 Subject: [PATCH] win version was broken because wchar_t is unsigned in WIN32. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2070 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/alloc.c | 4 +- C/iopreds.c | 13 ++-- H/alloc.h | 2 +- H/yapio.h | 4 +- changes-5.1.html | 1 + console/yap.c | 4 +- docs/yap.tex | 157 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 169 insertions(+), 16 deletions(-) diff --git a/C/alloc.c b/C/alloc.c index a85d59db0..940338521 100644 --- a/C/alloc.c +++ b/C/alloc.c @@ -12,7 +12,7 @@ * Last rev: * * mods: * * comments: allocating space * -* version:$Id: alloc.c,v 1.88 2008-01-23 18:25:19 vsc Exp $ * +* version:$Id: alloc.c,v 1.89 2008-01-28 23:35:03 vsc Exp $ * *************************************************************************/ #ifdef SCCS static char SccsId[] = "%W% %G%"; @@ -752,7 +752,7 @@ InitWorkSpace(Int s) GetSystemInfo(&si); Yap_page_size = si.dwPageSize; - s = ((s+ (ALLOC_SIZE-1))/ALLOC_SIZE)*ALLOC_SIZE; + s = ((s+ (YAP_ALLOC_SIZE-1))/YAP_ALLOC_SIZE)*YAP_ALLOC_SIZE; brk = (LPVOID)Yap_page_size; if (!ExtendWorkSpace(s,0)) return FALSE; diff --git a/C/iopreds.c b/C/iopreds.c index b876bc331..938cd348f 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -691,12 +691,6 @@ Yap_DebugPutc(int sno, wchar_t ch) return (putc(ch, Yap_stderr)); } -void -Yap_DebugPlWrite(Term t) -{ - Yap_plwrite(t, Yap_DebugPutc, 0); -} - void Yap_DebugErrorPutc(int c) { @@ -1423,12 +1417,13 @@ ConsolePipeGetc(int sno) static int PlGetc (int sno) { - register StreamDesc *s = &Stream[sno]; - register Int ch; + StreamDesc *s = &Stream[sno]; + Int ch; ch = YP_getc (s->u.file.file); - if (ch == EOF) + if (ch == EOF) { return post_process_eof(s); + } return post_process_read_char(ch, s); } diff --git a/H/alloc.h b/H/alloc.h index 55c604aa9..5fec74739 100644 --- a/H/alloc.h +++ b/H/alloc.h @@ -81,7 +81,7 @@ typedef struct FREEB { #if _WIN32 /* in WIN32 VirtualAlloc works in multiples of 64K */ #define YAP_ALLOC_SIZE (64*1024) -#define LG_PAGE_SIZE ALLOC_SIZE +#define LGPAGE_SIZE YAP_ALLOC_SIZE #else #define YAP_ALLOC_SIZE Yap_page_size diff --git a/H/yapio.h b/H/yapio.h index d31cf5fff..bab81d759 100644 --- a/H/yapio.h +++ b/H/yapio.h @@ -264,10 +264,10 @@ typedef enum { #define NUMBER_OF_CHARS 256 extern char *Yap_chtype; -EXTERN inline int STD_PROTO(chtype,(wchar_t)); +EXTERN inline int STD_PROTO(chtype,(int)); EXTERN inline int -chtype(wchar_t ch) +chtype(int ch) { if (ch < 256) return Yap_chtype[ch]; diff --git a/changes-5.1.html b/changes-5.1.html index 02af03a52..5d5653e6a 100644 --- a/changes-5.1.html +++ b/changes-5.1.html @@ -17,6 +17,7 @@

Yap-5.1.3: