42 } |
42 } |
43 |
43 |
44 return dp; |
44 return dp; |
45 } |
45 } |
46 |
46 |
47 int iskeyword(char *word, const char** keywords) { |
47 int check_keyword(char *word, const char** keywords) { |
48 for (int i = 0 ; keywords[i] ; i++) { |
48 for (int i = 0 ; keywords[i] ; i++) { |
49 if (strncmp(keywords[i], word, WORDBUF_SIZE) == 0) { |
49 if (strncmp(keywords[i], word, WORDBUF_SIZE) == 0) { |
50 return 1; |
50 return 1; |
51 } |
51 } |
52 } |
52 } |
53 return 0; |
53 return 0; |
54 } |
54 } |
55 |
55 |
56 int iscapsonly(char *word, size_t wp) { |
56 int check_capsonly(char *word, size_t wp) { |
57 for (size_t i = 0 ; i < wp ; i++) { |
57 for (size_t i = 0 ; i < wp ; i++) { |
58 if (!isupper(word[i]) && !isdigit(word[i]) && word[i] != '_') { |
58 if (!isupper(word[i]) && !isdigit(word[i]) && word[i] != '_') { |
59 return 0; |
59 return 0; |
60 } |
60 } |
61 } |
61 } |