Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef SRC_GREP_S21_GREP_H_
- #define SRC_GREP_S21_GREP_H_
- #define GREP "s21_grep"
- #define MAX_LEN 1024
- #define DESTROY(VALUE) if (VALUE) free(VALUE)
- struct opts {
- int e;
- int i;
- int v;
- int c;
- int l;
- int n;
- int h;
- int s;
- int o;
- int f;
- char pattern[MAX_LEN];
- char file[MAX_LEN];
- };
- int create_pattern(struct opts* grep_opt);
- int regular(const char* str, const char* pattern, int opt_i);
- int regular_prn(const char* str, const char* grep_file, const size_t num_str, struct opts grep_opt);
- int output(const char* grep_file, struct opts grep_opt);
- void print_str(const char* str, const char* grep_file, const size_t num_str, struct opts grep_opt);
- void promt();
- #endif // SRC_GREP_S21_GREP_H_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement