MALOC 0.1
|
00001 00038 #ifndef _VSH_H_ 00039 #define _VSH_H_ 00040 00041 #include <maloc/maloc_base.h> 00042 00043 #include <maloc/vsys.h> 00044 00045 /* 00046 * *************************************************************************** 00047 * Class Vsh: Parameters and datatypes 00048 * *************************************************************************** 00049 */ 00050 00056 struct sVsh { 00057 00059 Vmem *vmem; 00061 int iMadeVmem; 00062 00064 char processArgs; 00065 00067 int envValuLen; 00069 int envInfoLen; 00071 char **envValu; 00073 char **envInfo; 00074 00076 FILE *inUnit; 00078 FILE *scUnit; 00080 FILE *clUnit; 00082 FILE *cinUnit; 00084 char cinName[VMAX_ARGLEN]; 00085 00087 char PR[VMAX_ARGLEN]; 00089 char PR_PATH[VMAX_ARGLEN]; 00091 char PR_EXIT[VMAX_ARGLEN]; 00092 00094 int cmdKey; 00096 void *Ext_thee; 00097 00099 char *buf; 00101 int bufsize; 00102 00104 int (*Ext_builtin)(void *thee, int argc, char **argv); 00105 00106 }; 00107 00113 typedef struct sVsh Vsh; 00114 00115 00116 /* 00117 * *************************************************************************** 00118 * Class Vsh: Inlineable methods (vsh.c) 00119 * *************************************************************************** 00120 */ 00121 00122 #if !defined(VINLINE_MALOC) 00123 #else /* if defined(VINLINE_MALOC) */ 00124 #endif /* if !defined(VINLINE_MALOC) */ 00125 00126 00137 Vsh* Vsh_ctor(Vmem *vmem, int argc, char **argv); 00138 00147 void Vsh_dtor(Vsh **thee); 00148 00160 int Vsh_shell(Vsh *thee, char *pPR, void *pthee, 00161 int (*builtin)(void *thee, int argc, char **argv)); 00162 00173 int Vsh_putenv(Vsh *thee, const char *envi, const char *valu); 00174 00185 int Vsh_putenvInfo(Vsh *thee, const char *envi, const char *valu); 00186 00197 int Vsh_putenvInt(Vsh *thee, const char *envi, const int valu); 00198 00209 int Vsh_putenvReal(Vsh *thee, const char *envi, const double valu); 00210 00220 char *Vsh_getenv(Vsh *thee, const char *envi); 00221 00231 char *Vsh_getenvInfo(Vsh *thee, const char *envi); 00232 00242 int Vsh_getenvInt(Vsh *thee, const char *envi); 00243 00253 double Vsh_getenvReal(Vsh *thee, const char *envi); 00254 00264 void Vsh_remove(Vsh *thee, const char *envi); 00265 00274 void Vsh_wipe(Vsh *thee); 00275 00284 void Vsh_memChk(Vsh *thee); 00285 00295 Vio *Vsh_ioSetup(Vsh *thee, char *key); 00296 00306 void Vsh_ioCleanup(Vsh *thee, Vio **sock); 00307 00308 #endif /* _VSH_H_ */ 00309 00310