2018-02-10 16:01:01 -08:00
|
|
|
#include "libabacus_util.h"
|
|
|
|
|
2018-02-11 21:09:41 -08:00
|
|
|
libab_result libab_convert_lex_result(liblex_result to_convert) {
|
2018-02-10 16:01:01 -08:00
|
|
|
libab_result result = LIBAB_SUCCESS;
|
|
|
|
if(to_convert == LIBLEX_MALLOC) {
|
|
|
|
result = LIBAB_MALLOC;
|
|
|
|
} else if(to_convert == LIBLEX_INVALID) {
|
|
|
|
result = LIBAB_BAD_PATTERN;
|
|
|
|
} else if(to_convert == LIBLEX_UNRECOGNIZED) {
|
|
|
|
result = LIBAB_FAILED_MATCH;
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
2018-02-11 21:09:41 -08:00
|
|
|
libab_result libab_convert_ds_result(libds_result to_convert) {
|
2018-02-10 16:01:01 -08:00
|
|
|
libab_result result = LIBAB_SUCCESS;
|
|
|
|
if(to_convert == LIBDS_MALLOC) {
|
|
|
|
result = LIBAB_MALLOC;
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|