1 /* 2 ** parse.h for zssh 3 ** 4 ** Made by Matthieu Lucotte 5 ** Login <gounter@users.sourceforge.net> 6 ** 7 ** Started on Thu Jun 29 19:10:32 2000 Matthieu Lucotte 8 ** Last update Thu Jun 29 19:10:33 2000 Matthieu Lucotte 9 */ 10 11 #ifndef __ESCAPE_H__ 12 #define __ESCAPE_H__ 13 14 #define TAB_STEP 512 15 16 17 typedef struct 18 { 19 char *str; 20 long (*f)(long, long); 21 int prio; 22 } t_arith_op; 23 24 25 #include <pwd.h> 26 27 typedef struct 28 { 29 char *user; 30 char *dir; 31 } t_tilde_ent; 32 33 #define TILDE_TAB_STEP 100 34 #define TILDE_SEARCH_STEP 10 35 36 typedef struct 37 { 38 t_tilde_ent *tilde_tab; 39 int tilde_tab_size; 40 } t_pc_env; 41 42 #define ESC_DQUOTES 1 43 #define ESC_SQUOTES 2 44 #define ESC_BCKSLASH 4 45 #define ESC_PARENT 8 46 #define ESC_DOLLAR_PAR 16 47 #define ESC_DOLLAR_BRA 32 48 #define ESC_BQUOTES 64 49 #define ESC_COMMON (ESC_DQUOTES | ESC_SQUOTES | ESC_BCKSLASH) 50 #define ESC_SPLIT (ESC_DQUOTES | ESC_SQUOTES | ESC_BQUOTES | \ 51 ESC_BCKSLASH | ESC_DOLLAR_PAR | ESC_DOLLAR_BRA) 52 53 54 typedef struct 55 { 56 int flag; 57 int (*f)(char *str, int *i, char c1, char c2); 58 char c1; 59 char c2; 60 } t_escape; 61 62 #endif /* __ESCAPE_H__ */ 63