This is the mail archive of the glibc-cvs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libc/posix regex_internal.h


CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	drepper@sourceware.org	2003-11-29 03:39:00

Modified files:
	posix          : regex_internal.h 

Log message:
	(re_string_t): Remove mbs_case field.
	Add offsets, valid_raw_len, raw_len, raw_stop, mbs_allocated and
	offsets_needed fields.  Change icase, is_utf8 and map_notascii
	type from int bitfield to unsigned char.
	(MBS_ALLOCATED, MBS_CASE_ALLOCATED): Remove.
	(build_wcs_upper_buffer): Change prototype to return int.
	(re_string_peek_byte_case, re_string_fetch_byte_case): Remove
	defines, add prototypes.
	* posix/regex_internal.c (re_string_allocate): Don't initialize
	stop here.  Don't initialize mbs_case.  Set valid_raw_len.
	Use mbs_allocated instead of MBS_* macros.
	(re_string_construct): Don't initialize stop and valid_len here.
	Don't initialize mbs_case.  Use mbs_allocated instead of MBS_*
	macros.  Reallocate buffers if build_wcs_upper_buffer converted
	too few bytes.  Set valid_len to bufs_len only for single byte
	no translation and set in that case valid_raw_len as well.
	(re_string_realloc_buffers): Reallocate offsets if not NULL.
	Use mbs_allocated instead of MBS_ALLOCATED.  Don't reallocate mbs_case.
	(re_string_construct_common): Initialize raw_len, mbs_allocated,
	stop and raw_stop.
	(build_wcs_buffer): Apply pstr->trans before mbrtowc instead of
	after it.  Set valid_raw_len.  Don't set mbs_case.
	(build_wcs_upper_buffer): Return REG_NOERROR or REG_ESPACE.
	Only use the fast path if !pstr->offsets_needed.  Apply pstr->trans
	before mbrtowc instead of after it.  If upper case character
	uses different number of bytes than lower case, goto to the
	slow path.  Don't call towupper unnecessarily twice.  Set
	valid_raw_len as well.  Handle in the slow path the case if
	lower and upper case use different number of characters.
	Don't set mbs_case.
	(re_string_skip_chars): Use valid_raw_len instead of valid_len.
	(build_upper_buffer): Don't set mbs_case.  Add BE macro.  Set
	valid_raw_len.
	(re_string_translate_buffer): Set mbs instead of mbs_case.  Set
	valid_raw_len.
	(re_string_reconstruct): Use raw_len/raw_stop to initialize
	len/stop.  Clear valid_raw_len and offsets_needed when clearing
	valid_len.  Use mbs_allocated instead of MBS_* macros.
	Check original offset against valid_raw_len instead of valid_len.
	Remove mbs_case handling.  Adjust valid_raw_len together with
	valid_len.  If is_utf8 and looking for tip context, apply
	pstr->trans first.  If buffers start with partial multi-byte
	character, initialize mbs array as well if mbs_allocated.
	Check return value of build_wcs_upper_buffer.
	(re_string_peek_byte_case): New function.
	(re_string_fetch_byte_case): New function.
	(re_string_destruct): Use mbs_allocated instead of MBS_ALLOCATED.
	Don't free mbs_case.  Free offsets.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]