Perform whitespace cleanup throughout.
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
This commit is contained in:
@@ -217,14 +217,14 @@ is_cp_multibyte (UINT cp)
|
||||
|
||||
/* OMYGOD! CharNextExA is not UTF-8 aware! It only works fine with
|
||||
double byte charsets. So we have to do it ourselves for UTF-8.
|
||||
|
||||
|
||||
While being at it, we do more. If a double-byte or multibyte
|
||||
sequence is truncated due to an early end, we need a way to recognize
|
||||
it. The reason is that multiple buffered write statements might
|
||||
accidentally stop and start in the middle of a single character byte
|
||||
sequence. If we have to interpret the byte sequences (as in
|
||||
fhandler_console), we would print wrong output in these cases.
|
||||
|
||||
|
||||
So we have four possible return values here:
|
||||
|
||||
ret = end if str >= end
|
||||
@@ -249,7 +249,7 @@ next_char (UINT cp, const unsigned char *str, const unsigned char *end)
|
||||
case 950:
|
||||
case 1361:
|
||||
if (*str <= 0x7f)
|
||||
ret = str + 1;
|
||||
ret = str + 1;
|
||||
else if (str == end - 1 && IsDBCSLeadByteEx (cp, *str))
|
||||
ret = str;
|
||||
else
|
||||
|
Reference in New Issue
Block a user