📄 simpcl.c
字号:
/* Copyright (c) 1998 BEA Systems, Inc. All rights reserved THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF BEA Systems, Inc. The copyright notice above does not evidence any actual or intended publication of such source code.*//* Copyright 1996 BEA Systems, Inc. *//* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF *//* BEA Systems, Inc. *//* The copyright notice above does not evidence any *//* actual or intended publication of such source code. *//* #ident "@(#) apps/simpapp/simpcl.c $Revision: 1.1 $" */#include <stdio.h>#include <sys/types.h>#include <sys/timeb.h>#include "atmi.h" int main(int argc, char *argv[]){ char *sendbuf; long rcvlen; int ret; static struct timeb start, end; ftime(&start); /* Attach to System/T as a Client Process */ if (tpinit((TPINIT *) NULL) == -1) { (void) fprintf(stderr, "Tpinit failed\n"); exit(1); } if((sendbuf = (char *) tpalloc("STRING", NULL, 1000)) == NULL) { (void) fprintf(stderr,"Error allocating send buffer\n"); tpterm(); exit(1); } /* Request the service TOUPPER, waiting for a reply */ ret = tpcall("TEST", (char *)sendbuf, 0, (char **)&sendbuf, &rcvlen, TPNOTIME); if(ret == -1) { printf("tperrno=%ld,tpstrerr=%s\n",tperrno,tpstrerror(tperrno)); } ftime(&end); printf("finished,timecost=%ld\n",end.time-start.time); tpfree(sendbuf); tpterm(); return(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -