Changeset 8424 for trunk/Ohana/src/opihi/include/shell.h
- Timestamp:
- Aug 18, 2006, 1:44:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/include/shell.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/include/shell.h
r8174 r8424 11 11 # define MACRO_STRING(s) #s 12 12 # define MACRO_NAME(s) MACRO_STRING(s) 13 14 /* enums used by gprint functions */ 15 typedef enum {GP_FILE, GP_BUFF} gpMode; 16 typedef enum {GP_LOG, GP_ERR} gpDest; 13 17 14 18 typedef int CommandF (); … … 33 37 } List; 34 38 39 /* structure used to represent the gprint i/o stream */ 40 typedef struct { 41 FILE *file; 42 IOBuffer *buffer; 43 gpMode mode; 44 gpDest dest; 45 pthread_t thread; 46 } gpStream; 47 35 48 /*** globals used to track the shell language concepts ***/ 36 49 List *lists; /* variable to store the list of all lists */ … … 47 60 void program_init PROTO((int *argc, char **argv)); 48 61 void startup PROTO((int *argc, char **argv)); 62 int opihi PROTO((int argc, char **argv)); 49 63 int multicommand PROTO((char *line)); 50 64 void multicommand_InitServer PROTO((void)); … … 118 132 int macro_list_f PROTO((int, char **)); /* "macro_list" is a readline func */ 119 133 int macro_read PROTO((int, char **)); 120 int macro_write PROTO((int, char **));134 int macro_write PROTO((int, char **)); 121 135 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);136 char *memstr PROTO((char *m1, char *m2, int n)); 137 int write_fmt PROTO((int fd, char *format, ...)); 138 char *opihi_version PROTO(()); 139 char *strip_version PROTO((char *input)); 126 140 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 */ 142 void gprintInit PROTO(()); 143 gpStream *gprintGetStream PROTO((gpDest dest)); 144 void gprintSetBuffer PROTO((gpDest dest)); 145 IOBuffer *gprintGetBuffer PROTO((gpDest dest)); 146 void gprintSetFile PROTO((gpDest dest, char *filename)); 147 FILE *gprintGetFile PROTO((gpDest dest)); 148 int gprint PROTO((gpDest dest, char *format, ...)); 149 int gwrite PROTO((char *buffer, int size, int N, gpDest dest)); 150 150 151 151 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
