IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 18, 2006, 1:44:51 PM (20 years ago)
Author:
eugene
Message:

successful implementation of the threaded version of pcontrol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/include/shell.h

    r8174 r8424  
    1111# define MACRO_STRING(s) #s
    1212# define MACRO_NAME(s) MACRO_STRING(s)
     13
     14/* enums used by gprint functions */
     15typedef enum {GP_FILE, GP_BUFF} gpMode;
     16typedef enum {GP_LOG, GP_ERR} gpDest;
    1317
    1418typedef int CommandF ();
     
    3337} List;
    3438
     39/* structure used to represent the gprint i/o stream */
     40typedef struct {
     41  FILE *file;
     42  IOBuffer *buffer;
     43  gpMode mode;
     44  gpDest dest;
     45  pthread_t thread;
     46} gpStream;
     47
    3548/*** globals used to track the shell language concepts  ***/
    3649List         *lists;                    /* variable to store the list of all lists */
     
    4760void          program_init              PROTO((int *argc, char **argv));
    4861void          startup                   PROTO((int *argc, char **argv));
     62int           opihi                     PROTO((int argc, char **argv));
    4963int           multicommand              PROTO((char *line));
    5064void          multicommand_InitServer   PROTO((void));
     
    118132int           macro_list_f              PROTO((int, char **));  /* "macro_list" is a readline func */
    119133int           macro_read                PROTO((int, char **));
    120 int           macro_write               PROTO((int, char **));
     134int           macro_write               PROTO((int, char **));
    121135
    122 char *memstr (char *m1, char *m2, int n);
    123 int write_fmt (int fd, char *format, ...);
    124 char *opihi_version ();
    125 char *strip_version (char *input);
     136char         *memstr                    PROTO((char *m1, char *m2, int n));
     137int           write_fmt                 PROTO((int fd, char *format, ...));
     138char         *opihi_version             PROTO(());
     139char         *strip_version             PROTO((char *input));
    126140
    127 /*** gprint defines ***/
    128 
    129 /* enums used by gprint functions */
    130 typedef enum {GP_FILE, GP_BUFF} gpMode;
    131 typedef enum {GP_LOG, GP_ERR} gpDest;
    132 
    133 /* structure used to represent the gprint i/o stream */
    134 typedef struct {
    135   FILE *file;
    136   IOBuffer *buffer;
    137   gpMode mode;
    138   gpDest dest;
    139   pthread_t thread;
    140 } gpStream;
    141 
    142 void gprintInit ();
    143 gpStream *gprintGetStream (gpDest dest);
    144 void gprintSetBuffer (gpDest dest);
    145 IOBuffer *gprintGetBuffer (gpDest dest);
    146 void gprintSetFile (gpDest dest, char *filename);
    147 FILE *gprintGetFile (gpDest dest);
    148 int gprint (gpDest dest, char *format, ...);
    149 int gwrite (char *buffer, int size, int N, gpDest dest);
     141/* gprint functions */
     142void          gprintInit                PROTO(());
     143gpStream     *gprintGetStream           PROTO((gpDest dest));
     144void          gprintSetBuffer           PROTO((gpDest dest));
     145IOBuffer     *gprintGetBuffer           PROTO((gpDest dest));
     146void          gprintSetFile             PROTO((gpDest dest, char *filename));
     147FILE         *gprintGetFile             PROTO((gpDest dest));
     148int           gprint                    PROTO((gpDest dest, char *format, ...));
     149int           gwrite                    PROTO((char *buffer, int size, int N, gpDest dest));
    150150
    151151# endif
Note: See TracChangeset for help on using the changeset viewer.