-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtokenizer.h
49 lines (31 loc) · 785 Bytes
/
tokenizer.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
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 1000
#endif
#ifndef TOKENIZERH
#define TOKENIZERH
#include "error.h"
#include "program.h"
#include "job.h"
#include "core.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
char *buffer;
int buffer_capacity;
int buffer_position;
void invite();
int initialize_buffer();
void destroy_buffer();
int read_line_to_buffer();
void skip_whitespaces_and_tabs();
int is_spec_symbol(char c);
int next_token1(char **res, char status, char *finish_status);
int next_token2(char **res);
int next_program(program **res);
int next_job(job **res);
void print_program(FILE *stream, const program *p);
void print_job(FILE *stream, const job *j);
int check_built_in_piped(const job *j);
#endif