[BACK]Return to main.cpp CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_ntl

Annotation of OpenXM/src/ox_ntl/main.cpp, Revision 1.1

1.1     ! iwane       1: /* $OpenXM$ */
        !             2:
        !             3: #include "ox_toolkit.h"
        !             4: #include "oxserv.h"
        !             5: #include "ntl.h"
        !             6:
        !             7: #define VERSION 0x00000001
        !             8: #define ID_STRING "$Revision: 1.1 $"
        !             9:
        !            10: #if 1
        !            11: extern "C" {
        !            12: void dprintf(const char *, ...);
        !            13: }
        !            14: #endif
        !            15:
        !            16: static cmo *
        !            17: ntl_executeFunction(const char *func, cmo **arg, int argc)
        !            18: {
        !            19:        if (strcmp(func, "fctr") == 0) {
        !            20:                return (ntl_fctr(arg, argc));
        !            21:        }
        !            22:
        !            23:        return (NULL);
        !            24: }
        !            25:
        !            26:
        !            27:
        !            28: int
        !            29: main(int argc, char *argv[])
        !            30: {
        !            31:        int fd = 3;
        !            32:        int i;
        !            33:        int ret;
        !            34:
        !            35:        OXFILE *oxfp;
        !            36:
        !            37:        oxfp = oxf_open(fd);
        !            38:
        !            39:        ox_stderr_init(stderr);
        !            40:
        !            41:        oxserv_set(OXSERV_SET_EXECUTE_FUNCTION, ntl_executeFunction, NULL);
        !            42:        oxserv_init(oxfp, VERSION, ID_STRING, "ox_ntl", NULL, NULL);
        !            43:
        !            44:        for (i = 0;; i++) {
        !            45:                ret = oxserv_receive(oxfp);
        !            46:                if (ret != OXSERV_SUCCESS)
        !            47:                        break;
        !            48:        }
        !            49:
        !            50:        oxserv_dest();
        !            51:        oxf_close(oxfp);
        !            52:
        !            53:        return (0);
        !            54: }
        !            55:
        !            56:

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