IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2012, 1:53:50 PM (14 years ago)
Author:
eugene
Message:

moving rconnect and myAssert,myAbort into libohana

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/libohana/include/ohana.h

    r33217 r33238  
    215215*/
    216216# define OHANA_WHITESPACE(c)(((c) == 0x09) || ((c) == 0x0a) || ((c) == 0x0b) || ((c) == 0x0b) || ((c) == 0x0c) || ((c) == 0x0d) || ((c) == 0x20))
     217# define OHANA_ASSERT(LOGIC,...) { if (!(LOGIC)) { fprintf (stderr, __VA_ARGS__); abort(); } }
     218# define myAssert(LOGIC,...) { if (!(LOGIC)) { fprintf (stderr, __VA_ARGS__); abort(); } }
     219# define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }
    217220
    218221// sorting is now defined as a macro call
     
    328331off_t   Fwrite                 PROTO((void *ptr, off_t size, off_t nitems, FILE *f, char *type));
    329332
     333char   *memstr                 PROTO((char *m1, char *m2, int n));
     334int     write_fmt              PROTO((int fd, char *format, ...));
     335
    330336char   **isolate_elements      PROTO((int argc, char **argv, int *nstack));
    331337
     
    337343// gprint gets a stub implementation in libohana. opihi implements the real one.
    338344int    gprint (gpDest dest, char *format, ...);
     345
     346// rconnect is used to run remote programs with a pipe for communication
     347typedef enum {
     348  RCONNECT_ERR_NONE    = 0,
     349  RCONNECT_ERR_EXEC    = 1,
     350  RCONNECT_ERR_PIPE    = 2,
     351  RCONNECT_ERR_CONNECT = 3,
     352} RconnectErrors;
     353
     354void rconnect_set_timeout (int timeout);
     355int rconnect (char *command, char *hostname, char *shell, int *stdio, int *errorInfo, int doHandshake);
    339356
    340357/*
Note: See TracChangeset for help on using the changeset viewer.