=================================================================== RCS file: /home/cvs/OpenXM/src/util/test.c,v retrieving revision 1.6 retrieving revision 1.8 diff -u -p -r1.6 -r1.8 --- OpenXM/src/util/test.c 2004/03/02 06:23:34 1.6 +++ OpenXM/src/util/test.c 2015/10/13 10:16:53 1.8 @@ -1,13 +1,47 @@ -/* $OpenXM: OpenXM/src/util/test.c,v 1.5 2003/12/03 03:21:16 takayama Exp $ */ +/* $OpenXM: OpenXM/src/util/test.c,v 1.7 2004/08/12 12:11:41 takayama Exp $ */ #include #include "ox_pathfinder.h" sGC_malloc(int a) { - return GC_malloc(a); + // return GC_malloc(a); + return malloc(a); } +main() { + main_3(); +} +// getFieSize is for main_3 +#include +static int getFileSize(char *s) { + struct stat buf; + int m; + if (s == NULL) return -1; + m = stat(s,&buf); + if (m == -1) { + return -1; + /* fail */ + }else{ + /* success */ + return (int) buf.st_size; + } +} +main_3() { + int m; + m=getFileSize("/cygdrive/c/windows/system32/cmd.exe"); + printf("m=%d\n",m); +} +main_2() { + int n; + /* + n = oxpSendStringAsFile((char *)getenv("USER"), + "localhost", "t.t", "test\n"); + */ + n = oxpSendStringAsFile("taka", + "lemon2.math.kobe-u.ac.jp", "t.t", "test\n"); + printf("%d\n",n); +} /* which command */ -main(int argc,char *argv[]) { +main_1(int argc,char *argv[]) { char *s; char **a; int i;