MCPcopy Create free account
hub / github.com/git/git / re_string_elem_size_at

Function re_string_elem_size_at

compat/regex/regex_internal.h:780–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778
779# ifndef NOT_IN_libc
780static int
781internal_function __attribute ((pure))
782re_string_elem_size_at (const re_string_t *pstr, int idx)
783{
784# ifdef _LIBC
785 const unsigned char *p, *extra;
786 const int32_t *table, *indirect;
787 int32_t tmp;
788# include <locale/weight.h>
789 uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
790
791 if (nrules != 0)
792 {
793 table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
794 extra = (const unsigned char *)
795 _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
796 indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
797 _NL_COLLATE_INDIRECTMB);
798 p = pstr->mbs + idx;
799 tmp = findidx (&p);
800 return p - pstr->mbs - idx;
801 }
802 else
803# endif /* _LIBC */
804 return 1;
805}
806# endif
807#endif /* RE_ENABLE_I18N */

Callers 1

check_node_accept_bytesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected