static int string_to_bstring (unsigned char a_type, VOID_STAR ap, unsigned int na, unsigned char b_type, VOID_STAR bp) { char **s; SLang_BString_Type **b; (void) a_type; (void) b_type; s = (char **) ap; b = (SLang_BString_Type **) bp; if (NULL == make_n_bstrings (b, s, na, IS_SLSTRING)) return -1; return 1; }
static int string_to_bstring (SLtype a_type, VOID_STAR ap, SLuindex_Type na, SLtype b_type, VOID_STAR bp) { char **s; SLang_BString_Type **b; (void) a_type; (void) b_type; s = (char **) ap; b = (SLang_BString_Type **) bp; if (NULL == make_n_bstrings (b, s, na, IS_SLSTRING)) return -1; return 1; }
static int bstring_string_bin_op (int op, unsigned char a_type, VOID_STAR ap, unsigned int na, unsigned char b_type, VOID_STAR bp, unsigned int nb, VOID_STAR cp) { SLang_BString_Type **b; int ret; if (NULL == (b = make_n_bstrings (NULL, (char **)bp, nb, IS_NOT_TO_BE_FREED))) return -1; b_type = SLANG_BSTRING_TYPE; ret = bstring_bstring_bin_op (op, a_type, ap, na, b_type, (VOID_STAR) b, nb, cp); free_n_bstrings (b, nb); SLfree ((char *) b); return ret; }
static int string_bstring_bin_op (int op, SLtype a_type, VOID_STAR ap, SLuindex_Type na, SLtype b_type, VOID_STAR bp, SLuindex_Type nb, VOID_STAR cp) { SLang_BString_Type **a; int ret; if (NULL == (a = make_n_bstrings (NULL, (char **)ap, na, IS_NOT_TO_BE_FREED))) return -1; a_type = SLANG_BSTRING_TYPE; ret = bstring_bstring_bin_op (op, a_type, (VOID_STAR) a, na, b_type, bp, nb, cp); free_n_bstrings (a, na); SLfree ((char *) a); return ret; }