Important unsuck update...
This commit is contained in:
parent
f3f489bc9a
commit
6d2c8407be
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
sudo cp xyntax.h /usr/include/xolatile/xyntax.h
|
cp xyntax.h /usr/include/xolatile/xyntax.h
|
||||||
sudo cp xyntax.c /usr/include/xolatile/xyntax.c
|
cp xyntax.c /usr/include/xolatile/xyntax.c
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
14
xyntax.c
14
xyntax.c
@ -20,18 +20,6 @@ char * syntax_escape = NULL;
|
|||||||
int * syntax_colour = NULL;
|
int * syntax_colour = NULL;
|
||||||
int * syntax_effect = NULL;
|
int * syntax_effect = NULL;
|
||||||
|
|
||||||
static int compare_character_array (char character, char * character_array, int count) {
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (character == character_array [i]) {
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
} while (++i != count);
|
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int syntax_define (int enrange, int derange, char * begin, char * end, char escape, int colour, int effect) {
|
int syntax_define (int enrange, int derange, char * begin, char * end, char escape, int colour, int effect) {
|
||||||
fatal_failure (begin == NULL, "syntax_define: Begin string is null pointer.");
|
fatal_failure (begin == NULL, "syntax_define: Begin string is null pointer.");
|
||||||
fatal_failure (end == NULL, "syntax_define: End string is null pointer.");
|
fatal_failure (end == NULL, "syntax_define: End string is null pointer.");
|
||||||
@ -74,7 +62,7 @@ int syntax_select (char * string, int * length) {
|
|||||||
if (syntax_derange [select] == 0) {
|
if (syntax_derange [select] == 0) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (compare_character_array (string [string_length (syntax_begin [select])], syntax_end [select], string_length (syntax_end [select]))) {
|
if (character_compare_array (string [string_length (syntax_begin [select])], syntax_end [select], string_length (syntax_end [select])) != 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user