=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/builtin/miscf.c,v retrieving revision 1.29 retrieving revision 1.36 diff -u -p -r1.29 -r1.36 --- OpenXM_contrib2/asir2000/builtin/miscf.c 2013/06/13 07:45:28 1.29 +++ OpenXM_contrib2/asir2000/builtin/miscf.c 2015/08/14 13:51:54 1.36 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.28 2010/12/25 23:10:15 ohara Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/builtin/miscf.c,v 1.35 2015/08/07 01:25:39 fujimoto Exp $ */ #include "ca.h" #include "parse.h" @@ -55,7 +55,7 @@ #include #endif -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) #include #include #include @@ -83,6 +83,7 @@ void Pmodule_definedp(); void Ptest(); void delete_history(int,int); +void grab_pointer(); struct ftab misc_tab[] = { {"pwd",Pgetcwd,0}, @@ -129,7 +130,7 @@ struct ftab misc_tab[] = { void Pgetcwd(STRING *rp) { char *r; -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) char buf[_MAX_PATH]; _getcwd(buf, _MAX_PATH); #else @@ -144,7 +145,7 @@ void Pgetcwd(STRING *rp) void Pchdir(NODE arg, Q *rp) { char *dir = BDY((STRING)ARG0(arg)); -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) int status = _chdir(dir); #else int status = chdir(dir); @@ -208,7 +209,7 @@ Q *rp; int ms; ms = QTOS((Q)ARG0(arg)); -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) Sleep(ms); #else usleep(ms*1000); @@ -276,7 +277,7 @@ NODE arg; STRING *rp; { char *e,*f; - int len; + size_t len; e = (char *)getenv(BDY((STRING)ARG0(arg))); if ( e ) { @@ -369,13 +370,13 @@ Q *rp; h = get_heapsize(); if(sizeof(size_t)>sizeof(int)) { u = h>>(sizeof(int)*CHAR_BIT); l = h&(~0); - if ( !u ) STOQ(l,*rp); + if ( !u ) UTOQ(l,*rp); else { n = NALLOC(2); PL(n)=2; BD(n)[0] = l; BD(n)[1] = u; NTOQ(n,1,*rp); } }else { - STOQ(h,*rp); + UTOQ(h,*rp); } } @@ -447,7 +448,7 @@ Q *rp; s = ""; else s = BDY((STRING)ARG0(arg)); - toplevel(s); + goto_toplevel(s); *rp = 0; } @@ -464,7 +465,7 @@ Q *rp; code = QTOS((Q)ARG0(arg)); reason = BDY((STRING)ARG1(arg)); action = BDY((STRING)ARG2(arg)); -#if defined(VISUAL) +#if defined(VISUAL) || defined(__MINGW32__) set_error(code,reason,action); #endif error(""); @@ -609,7 +610,7 @@ init_display() rootwin = RootWindow(display,DefaultScreen(display)); } -grab_pointer() +void grab_pointer() { XEvent ev; static Cursor cursor;