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