-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokenize.h
More file actions
32 lines (19 loc) · 1016 Bytes
/
tokenize.h
File metadata and controls
32 lines (19 loc) · 1016 Bytes
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
#ifndef __TOKENIZE_H
#define __TOKENIZE_H
//#define __USE_ATFILE
//#define _DEFAULT_SOURCE
// if ndef
#define MAX_INPUT_LENGTH 200
#define MAX_INPUT_WORDS 50
#define MAX_WORD_LENGTH 200
/*
split up input string into words or special symbols, ignore weird spaces and tabs, and store it in an array of strings
*/
void AddToStringsWithoutThisChar(char** strings, char* input, int last_added, int index, int i, int* count);
void AddToStringsWithThisChar(char** strings, char* input, int last_added, int index, int i, int* count);
int OutsideQuotes(char** strings, char* input, int* last_added, int* index, int* i, int* len, int* count);
void SpaceorTab(char** strings, char* input, int* last_added, int* index, int* i, int* count);
int SpecialCharaters(char** strings, char* input, int* last_added, int* index, int* i, int* len, int* count);
int LastLetterandAmpersand(char** strings, char* input, int* last_added, int* index, int* i, int* len, int* count);
char** tokenize(char* input, int* count);
#endif