[BACK]Return to testclient.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Diff for /OpenXM/src/ox_toolkit/testclient.c between version 1.1 and 1.4

version 1.1, 1999/12/15 05:21:25 version 1.4, 2000/03/10 12:24:40
Line 1 
Line 1 
 /* -*- mode: C -*- */  /* -*- mode: C -*- */
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/ox_toolkit/testclient.c,v 1.3 1999/12/22 11:26:37 ohara Exp $ */
   
 /* A sample implementation of an OpenXM client with OpenXM C library */  /* A sample implementation of an OpenXM client with OpenXM C library */
   
Line 9 
Line 9 
 #include <string.h>  #include <string.h>
 #include <errno.h>  #include <errno.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include "ox.h"  
   
   #include "ox_toolkit.h"
   
 ox_file_t sv;  ox_file_t sv;
   
 int dumpx(int fd, int n)  int dumpx(int fd, int n)
Line 30  int dumpx(int fd, int n)
Line 31  int dumpx(int fd, int n)
     return len;      return len;
 }  }
   
 #define VERSION 0x11121500  #define SIZE_CMDLINE  8192
 #define ID_STRING  "testclient version 0.11121500"  
   
 int prompt()  static int  size = SIZE_CMDLINE;
   static char cmdline[SIZE_CMDLINE];
   
   static int prompt()
 {  {
     printf("> ");      fprintf(stdout, "> ");
       fgets(cmdline, size, stdin);
       init_parser(cmdline);
 }  }
   
   #define VERSION 0x11121500
   #define ID_STRING  "testclient version 0.11121500"
   
 int test_0()  int test_0()
 {  {
     cmo* c = NULL;      cmo* c = NULL;
Line 76  int test_1()
Line 84  int test_1()
     fputc('\n', stderr);      fputc('\n', stderr);
 }  }
   
   /*  Example:
     testclient
     >(OX_DATA,(CMO_INT32,123))
     >(OX_COMMAND,(SM_popCMO))
    */
   
 int main(int argc, char* argv[])  int main(int argc, char* argv[])
 {  {
     ox* m = NULL;      ox* m = NULL;
Line 98  int main(int argc, char* argv[])
Line 112  int main(int argc, char* argv[])
     if (strcmp(server, "ox_math")==0) {      if (strcmp(server, "ox_math")==0) {
         test_1();          test_1();
     }      }
   
       setflag_parse(PFLAG_ADDREV);
   
     while(prompt(), (m = parse()) != NULL) {      while(prompt(), (m = parse()) != NULL) {
         send_ox(sv->stream, m);          send_ox(sv->stream, m);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>