svn commit: r207701 - head/usr.bin/calendar

2010-05-06 Thread Andrey A. Chernov
Author: ache Date: Thu May 6 16:37:50 2010 New Revision: 207701 URL: http://svn.freebsd.org/changeset/base/207701 Log: Fix recent space skipping: 1) add missing (unsigned char) cast to ctype() macro 2) fix off-by-one error causing last letter always doubled Modified: head/usr.bin/calenda

svn commit: r207703 - head/usr.bin/calendar

2010-05-06 Thread Andrey A. Chernov
Author: ache Date: Thu May 6 16:54:46 2010 New Revision: 207703 URL: http://svn.freebsd.org/changeset/base/207703 Log: While I am here, add more missing (unsigned char) casts to ctype() macros Modified: head/usr.bin/calendar/io.c head/usr.bin/calendar/parsedata.c Modified: head/usr.bin/ca

svn commit: r210853 - head/lib/libc/stdlib

2010-08-04 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 5 01:39:25 2010 New Revision: 210853 URL: http://svn.freebsd.org/changeset/base/210853 Log: Comment out IEEE Std 1003.1-2001 conformance proclaimed too early, see problems described in the comment to: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933 Modifie

svn commit: r226889 - head/usr.bin/sed

2011-10-28 Thread Andrey A. Chernov
Author: ache Date: Fri Oct 28 20:28:13 2011 New Revision: 226889 URL: http://svn.freebsd.org/changeset/base/226889 Log: Update '}' description to reflect reality (and POSIX) PR: 96236 Submitted by: "Andreas Kohn" MFC after: 7 days Modified: head/usr.bin/sed/sed.1

svn commit: r226895 - head/usr.bin/sed

2011-10-28 Thread Andrey A. Chernov
Author: ache Date: Sat Oct 29 06:13:47 2011 New Revision: 226895 URL: http://svn.freebsd.org/changeset/base/226895 Log: Reword '}' description to sound more clear. Submitted by: dougb MFC after: 7 days Modified: head/usr.bin/sed/sed.1 Modified: head/usr.bin/sed/sed.1 ==

svn commit: r304752 - head/sys/sys

2016-08-24 Thread Andrey A. Chernov
Author: ache Date: Wed Aug 24 15:36:48 2016 New Revision: 304752 URL: https://svnweb.freebsd.org/changeset/base/304752 Log: Bump __FreeBSD_version for LC_*_MASK fix for newlocale(3) and querylocale(3) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h =

svn commit: r304755 - head/lib/libc/nls

2016-08-24 Thread Andrey A. Chernov
Author: ache Date: Wed Aug 24 16:44:27 2016 New Revision: 304755 URL: https://svnweb.freebsd.org/changeset/base/304755 Log: Use current locale (f.e. set by thread). It was global locale always previously. MFC after: 7 days Modified: head/lib/libc/nls/msgcat.c Modified: head/lib/l

svn commit: r304810 - head/lib/libc/stdio

2016-08-25 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 25 17:13:04 2016 New Revision: 304810 URL: https://svnweb.freebsd.org/changeset/base/304810 Log: Don't check for __SERR which may stick from one of any previous stdio functions. __SERR is for user and the rest of stdio code do not check it for error sensing inter

svn commit: r304811 - head/lib/libc/stdio

2016-08-25 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 25 17:30:00 2016 New Revision: 304811 URL: https://svnweb.freebsd.org/changeset/base/304811 Log: Remove "Fast path", it bypass __wcrtomb() and all its error checking. One of affected encoding example: US-ASCII MFC after: 7 days Modified: head/lib/libc/st

svn commit: r304819 - head/lib/libc/stdio

2016-08-25 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 25 21:14:26 2016 New Revision: 304819 URL: https://svnweb.freebsd.org/changeset/base/304819 Log: Original fgetln() from 44lite return sucess for line tail errors, i.e. partial line, but set __SERR and errno in the same time, which is inconsistent. Now both OpenBS

svn commit: r304911 - head/lib/libc/net

2016-08-27 Thread Andrey A. Chernov
Author: ache Date: Sat Aug 27 14:43:13 2016 New Revision: 304911 URL: https://svnweb.freebsd.org/changeset/base/304911 Log: The formal behavior of qsort is unstable with regard to objects that are equal. Unfortunately, RFC 3484 requires that otherwise equal objects remain in the order suppli

svn commit: r305133 - head/lib/libc/net

2016-08-31 Thread Andrey A. Chernov
Author: ache Date: Wed Aug 31 15:47:58 2016 New Revision: 305133 URL: https://svnweb.freebsd.org/changeset/base/305133 Log: Apply the same qsort() usage fix as in r304911 getaddrinfo.c qsort() can't be stabilized with just return(-1) alone. MFC after: 3 days Modified: head/lib/lib

svn commit: r305144 - head/lib/libc/net

2016-08-31 Thread Andrey A. Chernov
Author: ache Date: Wed Aug 31 18:49:50 2016 New Revision: 305144 URL: https://svnweb.freebsd.org/changeset/base/305144 Log: 'addrlen' does not matter when we need to find the first non-zero bit in the byte from the left and 'addrlen' already counted in 'lim'. PR: 212121 Submitted by

svn commit: r305219 - head/lib/libc/stdio

2016-09-01 Thread Andrey A. Chernov
Author: ache Date: Thu Sep 1 18:12:53 2016 New Revision: 305219 URL: https://svnweb.freebsd.org/changeset/base/305219 Log: If error happens, don't overwrite original errno comes from __mbrtowc() and __srefill(). MFC after: 3 days Modified: head/lib/libc/stdio/fgetwc.c Modified:

svn commit: r305241 - head/lib/libc/stdio

2016-09-01 Thread Andrey A. Chernov
Author: ache Date: Thu Sep 1 20:45:04 2016 New Revision: 305241 URL: https://svnweb.freebsd.org/changeset/base/305241 Log: fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete sequence near EOF), so we can't just check for (wc == WEOF && !__sfeof(fp)) and must relay on __

svn commit: r305365 - head/contrib/one-true-awk

2016-09-03 Thread Andrey A. Chernov
Author: ache Date: Sat Sep 3 23:04:56 2016 New Revision: 305365 URL: https://svnweb.freebsd.org/changeset/base/305365 Log: The bug: $ echo x | awk '/[[:cntrl:]]/' x The NUL character in cntrl class truncates the pattern, and an empty pattern matches anything. The patch skips NUL as a

svn commit: r305406 - head/lib/libc/stdio

2016-09-04 Thread Andrey A. Chernov
Author: ache Date: Mon Sep 5 03:37:28 2016 New Revision: 305406 URL: https://svnweb.freebsd.org/changeset/base/305406 Log: Fix errors handling. MFC after: 3 days Modified: head/lib/libc/stdio/fgetws.c Modified: head/lib/libc/stdio/fgetws.c =

svn commit: r305409 - head/lib/libc/stdio

2016-09-04 Thread Andrey A. Chernov
Author: ache Date: Mon Sep 5 04:49:58 2016 New Revision: 305409 URL: https://svnweb.freebsd.org/changeset/base/305409 Log: 1) Prevent out of bounds access to ws[-1] (passed buffer) which happens when the first mb sequence is incomplete and there are not enougn chars in the read buffer. ws[-

svn commit: r305412 - head/lib/libc/stdio

2016-09-04 Thread Andrey A. Chernov
Author: ache Date: Mon Sep 5 06:10:51 2016 New Revision: 305412 URL: https://svnweb.freebsd.org/changeset/base/305412 Log: Fix n == 1 case. Here should be no physical read (fill buffer) attempt (we read n - 1 chars with the room for NUL, see fgets()), and no NULL return. MFC after:

svn commit: r305413 - head/lib/libc/stdio

2016-09-04 Thread Andrey A. Chernov
Author: ache Date: Mon Sep 5 06:46:04 2016 New Revision: 305413 URL: https://svnweb.freebsd.org/changeset/base/305413 Log: Fix error handling. MFC after: 3 days Modified: head/lib/libc/stdio/fgets.c Modified: head/lib/libc/stdio/fgets.c

svn commit: r305841 - head/bin/cat

2016-09-15 Thread Andrey A. Chernov
Author: ache Date: Thu Sep 15 17:24:39 2016 New Revision: 305841 URL: https://svnweb.freebsd.org/changeset/base/305841 Log: Implement multibyte encoding support for -v with fallback MFC after: 7 days Modified: head/bin/cat/cat.c Modified: head/bin/cat/cat.c

svn commit: r306075 - head/lib/libc/stdtime

2016-09-20 Thread Andrey A. Chernov
Author: ache Date: Wed Sep 21 06:44:32 2016 New Revision: 306075 URL: https://svnweb.freebsd.org/changeset/base/306075 Log: 1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such w

svn commit: r306109 - head/lib/libc/stdtime

2016-09-21 Thread Andrey A. Chernov
Author: ache Date: Wed Sep 21 15:47:40 2016 New Revision: 306109 URL: https://svnweb.freebsd.org/changeset/base/306109 Log: 1) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 2) Check for incorrect values for %z. MFC after: 7 days Modified: h

svn commit: r267756 - head/lib/libc/stdlib

2014-06-22 Thread Andrey A. Chernov
Author: ache Date: Sun Jun 22 21:54:57 2014 New Revision: 267756 URL: http://svnweb.freebsd.org/changeset/base/267756 Log: Merge intermediate OpenBSD v1.25 changes (almost identical to ours) to reduce diff and bump OpenBSD patch level to v1.26. MFC after: 2 weeks Modified: head/li

svn commit: r267758 - head

2014-06-22 Thread Andrey A. Chernov
Author: ache Date: Mon Jun 23 00:54:56 2014 New Revision: 267758 URL: http://svnweb.freebsd.org/changeset/base/267758 Log: Change suggestion how to set MAKESYSPATH as broken incremental build workaround. Magic ".../share/mk" (search directories up to /) does not work for f.e. /usr/src/gnu/li

svn commit: r268991 - head/lib/libc/stdio

2014-07-22 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 22 19:55:25 2014 New Revision: 268991 URL: http://svnweb.freebsd.org/changeset/base/268991 Log: Checking for __SAPP alone is not enough because it is emulated O_APPEND only, so works for only special fdopen() case. Add real O_APPEND too. Modified: head/lib/libc/st

svn commit: r268992 - head/lib/libc/stdio

2014-07-22 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 22 20:13:46 2014 New Revision: 268992 URL: http://svnweb.freebsd.org/changeset/base/268992 Log: Back the whole change out until I figure out how to obtain O_APPEND, it can't be used in this field at all. Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/li

svn commit: r268997 - head/lib/libc/stdio

2014-07-22 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 22 22:49:37 2014 New Revision: 268997 URL: http://svnweb.freebsd.org/changeset/base/268997 Log: For "a"-mode files and rewind/fseek + fwrite combination return meaningful value now, like Apple does, but avoid their __sflush physical write performance degradation as

svn commit: r269116 - head/lib/libc/stdio

2014-07-26 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 26 08:41:03 2014 New Revision: 269116 URL: http://svnweb.freebsd.org/changeset/base/269116 Log: In the "Too many open files" edge cases don't try to preserve old number for non-std* descriptors, but close old file and retry. Obtained from: inspired by Apple's c

svn commit: r269806 - in head/contrib/opie: . libopie

2014-08-11 Thread Andrey A . Chernov
Author: ache Date: Mon Aug 11 12:26:48 2014 New Revision: 269806 URL: http://svnweb.freebsd.org/changeset/base/269806 Log: Fix too long (seed length >12 chars) challenge handling. 1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places of opie code expects that). 2) Over

svn commit: r269809 - head/contrib/opie

2014-08-11 Thread Andrey A . Chernov
Author: ache Date: Mon Aug 11 13:36:02 2014 New Revision: 269809 URL: http://svnweb.freebsd.org/changeset/base/269809 Log: When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX MFC after: 1 week Modified: head/contrib/opie/opie.h Modified: head/contrib/opie/opie.h

svn commit: r269810 - head/usr.bin/opiekey

2014-08-11 Thread Andrey A . Chernov
Author: ache Date: Mon Aug 11 14:37:57 2014 New Revision: 269810 URL: http://svnweb.freebsd.org/changeset/base/269810 Log: Link otp-sha1 to match real challenge prompt, not otp-sha MFC after: 1 week Modified: head/usr.bin/opiekey/Makefile Modified: head/usr.bin/opiekey/Makefile ===

svn commit: r269811 - head/contrib/opie

2014-08-11 Thread Andrey A . Chernov
Author: ache Date: Mon Aug 11 14:46:09 2014 New Revision: 269811 URL: http://svnweb.freebsd.org/changeset/base/269811 Log: Last '/' for program name, not first one MFC after: 1 week Modified: head/contrib/opie/opiekey.c Modified: head/contrib/opie/opiekey.c

svn commit: r269815 - head

2014-08-11 Thread Andrey A . Chernov
Author: ache Date: Mon Aug 11 15:41:55 2014 New Revision: 269815 URL: http://svnweb.freebsd.org/changeset/base/269815 Log: Add otp-sha MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ===

svn commit: r269875 - head/lib/libpam/modules/pam_opie

2014-08-12 Thread Andrey A . Chernov
Author: ache Date: Tue Aug 12 13:28:46 2014 New Revision: 269875 URL: http://svnweb.freebsd.org/changeset/base/269875 Log: According to opie code and even direct mention in opie(4) challenge buffer size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX Reviewed by:des MFC after

svn commit: r269961 - in head: . lib/libopie

2014-08-13 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 14 04:42:09 2014 New Revision: 269961 URL: http://svnweb.freebsd.org/changeset/base/269961 Log: Bump version because challenge buffer size changed MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/libopie/Makefile Modified: head/ObsoleteFiles.

svn commit: r262689 - head/share/mk

2014-03-02 Thread Andrey A. Chernov
Author: ache Date: Sun Mar 2 13:12:06 2014 New Revision: 262689 URL: http://svnweb.freebsd.org/changeset/base/262689 Log: Add fetch and patch to .PHONY and .NOTMAIN only if PORTNAME is defined. Unconditional addition cause real fetch(1) and patch(1) programs are builded every time. MFC

svn commit: r261146 - head/usr.sbin/cron/cron

2014-01-24 Thread Andrey A. Chernov
Author: ache Date: Sat Jan 25 02:16:09 2014 New Revision: 261146 URL: http://svnweb.freebsd.org/changeset/base/261146 Log: Bad timespec_subtract() calculations produce negative tv_nsec on i386 which cause EINVAL returned from nanosleep() which cause loop in cron_sleep() and making all cron j

svn commit: r272562 - head/lib/libc/stdtime

2014-10-05 Thread Andrey A. Chernov
Author: ache Date: Sun Oct 5 07:29:50 2014 New Revision: 272562 URL: https://svnweb.freebsd.org/changeset/base/272562 Log: 1) For %Z format, understand "UTC" name too. 2) Return NULL if timegm() fails, because it means we can convert what we have in GMT to local time needed. Modified: he

svn commit: r272678 - head/lib/libc/stdtime

2014-10-06 Thread Andrey A. Chernov
Author: ache Date: Tue Oct 7 06:02:08 2014 New Revision: 272678 URL: https://svnweb.freebsd.org/changeset/base/272678 Log: Back out timegm error check from r272562. POSIX treats negative time_t as undefined (i.e. may be valid too, depends on system's policy we don't have) and we don't se

svn commit: r272679 - head/lib/libc/stdtime

2014-10-06 Thread Andrey A. Chernov
Author: ache Date: Tue Oct 7 06:34:05 2014 New Revision: 272679 URL: https://svnweb.freebsd.org/changeset/base/272679 Log: 1) Fix the case we have less arguments for format string than we expected. 2) Return error on unsupported format specs. (both according to POSIX) PR: 93197 Mo

svn commit: r302512 - in head/lib/libc: gen locale regex stdio

2016-07-09 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 10 03:49:38 2016 New Revision: 302512 URL: https://svnweb.freebsd.org/changeset/base/302512 Log: Remove broken support for collation in [a-z] type ranges. Only first 256 wide chars are considered currently, all other are just dropped from the range. Proper implemen

svn commit: r302594 - head/usr.bin/tr

2016-07-11 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 11 21:23:50 2016 New Revision: 302594 URL: https://svnweb.freebsd.org/changeset/base/302594 Log: 1) Following r302512 (remove collation support for [a-z]-ranges in libc) remove collation support for a-z ranges here too. It was implemented for single byte locales on

svn commit: r302599 - head/usr.bin/tr

2016-07-11 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 11 23:06:11 2016 New Revision: 302599 URL: https://svnweb.freebsd.org/changeset/base/302599 Log: Cast WCHAR_MAX to wint_t, it can be unsigned on some systems. Modified: head/usr.bin/tr/tr.c Modified: head/usr.bin/tr/tr.c

svn commit: r302601 - in head/sys: arm/include arm64/include

2016-07-11 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 12 00:37:48 2016 New Revision: 302601 URL: https://svnweb.freebsd.org/changeset/base/302601 Log: I don't know why unsigned int is choosed for wchar_t here, but WCHAR_MAX should be <= WINT_MAX. It is bigger, __UINT_MAX > INT32_MAX Modified: head/sys/arm/include/_ty

svn commit: r302615 - in head/sys: arm/include arm64/include

2016-07-11 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 12 04:20:44 2016 New Revision: 302615 URL: https://svnweb.freebsd.org/changeset/base/302615 Log: Undo r302601, WCHAR_MAX may not be a valid wchar value. Modified: head/sys/arm/include/_types.h head/sys/arm64/include/_types.h Modified: head/sys/arm/include/_types.

svn commit: r302616 - head/usr.bin/tr

2016-07-11 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 12 04:29:34 2016 New Revision: 302616 URL: https://svnweb.freebsd.org/changeset/base/302616 Log: Undo r302599 and partially r302594 case 2): since WCHAR_MAX can be not a valid wchar value, it is easier to stay inside wint_t. Modified: head/usr.bin/tr/tr.c Modif

svn commit: r302628 - head/sys/sys

2016-07-12 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 12 07:16:37 2016 New Revision: 302628 URL: https://svnweb.freebsd.org/changeset/base/302628 Log: Bump __FreeBSD_version after removing collation from [a-z]-type ranges. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ==

svn commit: r302711 - head/usr.bin/tr

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 07:56:01 2016 New Revision: 302711 URL: https://svnweb.freebsd.org/changeset/base/302711 Log: Fully back out r302594 case 2) since overflow may happens. Modified: head/usr.bin/tr/tr.c Modified: head/usr.bin/tr/tr.c ===

svn commit: r302712 - in head/bin/sh: . tests/builtins

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 08:13:09 2016 New Revision: 302712 URL: https://svnweb.freebsd.org/changeset/base/302712 Log: After removing collation for [a-z] ranges in r302512, do it here too. Approved by:jilles Modified: head/bin/sh/expand.c head/bin/sh/tests/builtins/case7.0 Mo

svn commit: r302742 - head/contrib/one-true-awk

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 10:01:31 2016 New Revision: 302742 URL: https://svnweb.freebsd.org/changeset/base/302742 Log: After removing collation for [a-z] ranges in r302512, do it here too. I'll try to keep the change very minimal to not touch contribed code much. I'll send it upstrea

svn commit: r302777 - head/contrib/tcsh

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 16:49:48 2016 New Revision: 302777 URL: https://svnweb.freebsd.org/changeset/base/302777 Log: After removing collation for [a-z] ranges in r302512, mimic system glob() here too. I try to keep the change minimal to not touch contribed code much. I'll send it

svn commit: r302780 - head/contrib/libgnuregex

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 18:51:19 2016 New Revision: 302780 URL: https://svnweb.freebsd.org/changeset/base/302780 Log: After removing collation for [a-z] ranges in r302512, do it here too. Instead of trying to expand whole range at regcomp() stage as we do, GNU regex allocates separa

svn commit: r302781 - head/gnu/usr.bin/grep

2016-07-13 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 13 19:02:59 2016 New Revision: 302781 URL: https://svnweb.freebsd.org/changeset/base/302781 Log: After removing collation for [a-z] ranges in r302512, do it here too. Instead of trying to expand whole range at regcomp() stage as we do, GNU regex allocates separa

svn commit: r302820 - in head/lib/libc: gen locale regex stdio

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 08:18:12 2016 New Revision: 302820 URL: https://svnweb.freebsd.org/changeset/base/302820 Log: Back out non-collating [a-z] ranges. Instead of changing whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore missin

svn commit: r302824 - in head/lib/libc: gen locale regex stdio

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:07:25 2016 New Revision: 302824 URL: https://svnweb.freebsd.org/changeset/base/302824 Log: 1) Eliminate possibility to call __*collate_range_cmp() with inclomplete locale (which cause core dump) by removing whole 'table' argument by which it passed. 2) R

svn commit: r302825 - head/usr.bin/tr

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:19:53 2016 New Revision: 302825 URL: https://svnweb.freebsd.org/changeset/base/302825 Log: Back out non-collating [a-z] ranges (r302594). Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely

svn commit: r302826 - head/usr.bin/tr

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:24:55 2016 New Revision: 302826 URL: https://svnweb.freebsd.org/changeset/base/302826 Log: Document incomplete support of [=equiv=] and collation for ranges. Modified: head/usr.bin/tr/tr.1 Modified: head/usr.bin/tr/tr.1 ===

svn commit: r302827 - head/usr.bin/tr

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:26:53 2016 New Revision: 302827 URL: https://svnweb.freebsd.org/changeset/base/302827 Log: Optimize [Cc]flag case: don't repeatedly add the last character of string2 to squeeze cset when string2 reach its EOS state. Modified: head/usr.bin/tr/tr.c Modified:

svn commit: r302828 - head/contrib/one-true-awk

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:31:52 2016 New Revision: 302828 URL: https://svnweb.freebsd.org/changeset/base/302828 Log: Back out non-collating [a-z] ranges. Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore mi

svn commit: r302829 - in head/bin/sh: . tests/builtins

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:34:42 2016 New Revision: 302829 URL: https://svnweb.freebsd.org/changeset/base/302829 Log: Back out non-collating [a-z] ranges. Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore mi

svn commit: r302830 - head/contrib/tcsh

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:37:16 2016 New Revision: 302830 URL: https://svnweb.freebsd.org/changeset/base/302830 Log: Back out non-collating [a-z] ranges. Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore mi

svn commit: r302831 - head/contrib/tcsh

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:40:42 2016 New Revision: 302831 URL: https://svnweb.freebsd.org/changeset/base/302831 Log: To mimic system glob, we definitely don't need manual upper/lower hack. The author clearly disagree in the comment, so this patch will be not submitted upstream. Modif

svn commit: r302832 - head/contrib/libgnuregex

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:45:07 2016 New Revision: 302832 URL: https://svnweb.freebsd.org/changeset/base/302832 Log: Back out non-collating [a-z] ranges. Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore mi

svn commit: r302833 - head/gnu/usr.bin/grep

2016-07-14 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 14 09:47:49 2016 New Revision: 302833 URL: https://svnweb.freebsd.org/changeset/base/302833 Log: Back out non-collating [a-z] ranges. Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore mi

svn commit: r302937 - in head/bin/sh: . tests/expansion

2016-07-16 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 16 13:26:18 2016 New Revision: 302937 URL: https://svnweb.freebsd.org/changeset/base/302937 Log: Path generation was not according to collate Approved by:jilles Added: head/bin/sh/tests/expansion/pathname6.0 (contents, props changed) Modified: head/bin/

svn commit: r302943 - head/lib/libc/gen

2016-07-17 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 17 09:39:59 2016 New Revision: 302943 URL: https://svnweb.freebsd.org/changeset/base/302943 Log: 1) This file full of direct char <-> wchar_t assignment, not converted, cut them down. This hack still remains: * 2. Illegal byte sequences in filenames are handled by

svn commit: r302944 - head/lib/libc/gen

2016-07-17 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 17 11:25:24 2016 New Revision: 302944 URL: https://svnweb.freebsd.org/changeset/base/302944 Log: In g_Ctoc() apply CHAR() macro to *str to strip all flags. It gains nothing right now, but some architectures theoretically may 64-bit wchar_t and the code looks more c

svn commit: r302948 - head/lib/libc/gen

2016-07-17 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 17 13:10:57 2016 New Revision: 302948 URL: https://svnweb.freebsd.org/changeset/base/302948 Log: Reflect pathnames sorting in collation order. Modified: head/lib/libc/gen/glob.3 Modified: head/lib/libc/gen/glob.3

svn commit: r303004 - head/lib/libc/gen

2016-07-18 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 18 16:06:21 2016 New Revision: 303004 URL: https://svnweb.freebsd.org/changeset/base/303004 Log: 1) POSIX defines well when GLOB_ABORTED can be returned (only for directory open/read errors and with GLOB_ERR and gl_errfunc processing), so we can't blindly return it

svn commit: r303010 - head/lib/libc/gen

2016-07-18 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 18 18:24:31 2016 New Revision: 303010 URL: https://svnweb.freebsd.org/changeset/base/303010 Log: 1) Add all characters from ~ expansion as protected to be not interpreted as pattern meta chars. 2) GLOB_ERR and gl_errfunc are supposed to work only for real direct

svn commit: r303011 - head/lib/libc/gen

2016-07-18 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 18 19:20:49 2016 New Revision: 303011 URL: https://svnweb.freebsd.org/changeset/base/303011 Log: Change patch from r303004 case 3. According to POSIX gl_errfunc should be called first, then GLOB_ERR should be considered. Modified: head/lib/libc/gen/glob.c Modifie

svn commit: r303013 - head/lib/libc/gen

2016-07-18 Thread Andrey A. Chernov
Author: ache Date: Mon Jul 18 20:24:13 2016 New Revision: 303013 URL: https://svnweb.freebsd.org/changeset/base/303013 Log: g_Ctoc() conversion buffers are smaller than needed up to MB_CUR_MAX - 1 since whole conversion needs a room for (len >= MB_CUR_MAX). It is no difference when MB_CUR_MA

svn commit: r303014 - head/lib/libc/gen

2016-07-18 Thread Andrey A. Chernov
Author: ache Date: Tue Jul 19 00:25:27 2016 New Revision: 303014 URL: https://svnweb.freebsd.org/changeset/base/303014 Log: 1) Don't protect \/ and \. even if user say so. They are not special chars in any case and needed for further processing. For ~ expansion too. 2) Don't terminate *pa

svn commit: r303074 - head/lib/libc/gen

2016-07-20 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 20 07:30:44 2016 New Revision: 303074 URL: https://svnweb.freebsd.org/changeset/base/303074 Log: 1) Per POSIX (and glibc) GLOB_NOCHECK should return original pattern, unmodified, if no matches found. But our original code strips all '\' returning it. Rewrite the co

svn commit: r303088 - head/lib/libc/gen

2016-07-20 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 20 12:46:21 2016 New Revision: 303088 URL: https://svnweb.freebsd.org/changeset/base/303088 Log: In addition to r303074 case 1, search for protected L'/' too in globtilde() Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ==

svn commit: r303094 - head/usr.bin

2016-07-20 Thread Andrey A. Chernov
Author: ache Date: Wed Jul 20 15:59:37 2016 New Revision: 303094 URL: https://svnweb.freebsd.org/changeset/base/303094 Log: Continuation lines with comments badly affects gprof, it is excluded from build on amd64 f.e. Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile

svn commit: r303142 - head/lib/libc/gen

2016-07-21 Thread Andrey A. Chernov
Author: ache Date: Thu Jul 21 12:53:36 2016 New Revision: 303142 URL: https://svnweb.freebsd.org/changeset/base/303142 Log: 1) GLOB_BRACE was somewhat broken. First it repeatedly calls glob0() in globexp1() recursive calls, but glob0() was not supposed to be called repeatedly in the original

svn commit: r303208 - head/lib/libc/gen

2016-07-22 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 23 01:21:58 2016 New Revision: 303208 URL: https://svnweb.freebsd.org/changeset/base/303208 Log: 1) We need the original pattern (in the next round of changes) not only in case it fully constructed, but for half-constructed too, so have no other choice to pass orig

svn commit: r303210 - head/lib/libc/gen

2016-07-22 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 23 03:49:02 2016 New Revision: 303210 URL: https://svnweb.freebsd.org/changeset/base/303210 Log: 1) POSIX defines well when GLOB_NOMATCH or original pattern (instead) should be returned, so we can't return GLOB_NOMATCH blindly just because we dislike something in t

svn commit: r303530 - head/lib/libc/gen

2016-07-29 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 30 02:09:11 2016 New Revision: 303530 URL: https://svnweb.freebsd.org/changeset/base/303530 Log: Reset errno for readdirfunc() before contunue. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ===

svn commit: r303536 - head/lib/libc/gen

2016-07-29 Thread Andrey A. Chernov
Author: ache Date: Sat Jul 30 03:11:54 2016 New Revision: 303536 URL: https://svnweb.freebsd.org/changeset/base/303536 Log: Rework r303074 case 4. Don't immediatelly skip directory entries which cause MAXPATHLEN exceeded. Process them first through gl_errfunc() and GLOB_ERR. Modified: hea

svn commit: r303564 - head/lib/libc/gen

2016-07-30 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 01:14:06 2016 New Revision: 303564 URL: https://svnweb.freebsd.org/changeset/base/303564 Log: Both C99 and POSIX directly prohibits any standard function to set errno to 0. Breaking this rule in 2001 NetBSD hack was imported which attempts to workaround very lim

svn commit: r303565 - head/lib/libc/gen

2016-07-30 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 02:28:50 2016 New Revision: 303565 URL: https://svnweb.freebsd.org/changeset/base/303565 Log: In addition to prev. commit. Since potentially glob2() can return error without setting errno, restore errno before its call. Modified: head/lib/libc/gen/glob.c Modif

svn commit: r303566 - head/usr.bin/calendar/calendars/ru_RU.UTF-8

2016-07-30 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 02:43:45 2016 New Revision: 303566 URL: https://svnweb.freebsd.org/changeset/base/303566 Log: Remove vestige of scripted conversion Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.common Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calend

svn commit: r303568 - head/usr.bin/calendar/calendars/ru_RU.UTF-8

2016-07-30 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 03:11:10 2016 New Revision: 303568 URL: https://svnweb.freebsd.org/changeset/base/303568 Log: Remove another vestige of scripted conversion Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8

svn commit: r303569 - head/usr.bin/calendar/calendars/ru_RU.KOI8-R

2016-07-30 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 03:26:53 2016 New Revision: 303569 URL: https://svnweb.freebsd.org/changeset/base/303569 Log: Reflect CLDR timedef changes Modified: head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.holiday (co

svn commit: r303581 - in head/usr.bin/calendar/calendars: ru_RU.KOI8-R ru_RU.UTF-8

2016-07-31 Thread Andrey A. Chernov
Author: ache Date: Sun Jul 31 10:15:04 2016 New Revision: 303581 URL: https://svnweb.freebsd.org/changeset/base/303581 Log: Fix date Modified: head/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Modified: head/usr.bin

svn commit: r303706 - head/lib/libc/gen

2016-08-03 Thread Andrey A. Chernov
Author: ache Date: Wed Aug 3 09:09:34 2016 New Revision: 303706 URL: https://svnweb.freebsd.org/changeset/base/303706 Log: Although the code amount is not big, move POSIX error processing into two sepatate functions to make glob(3) code less obscure and more simple. There is no needs to mak

svn commit: r304374 - head/usr.bin/calendar/calendars/ru_RU.UTF-8

2016-08-18 Thread Andrey A. Chernov
Author: ache Date: Thu Aug 18 10:18:11 2016 New Revision: 304374 URL: https://svnweb.freebsd.org/changeset/base/304374 Log: Fix TAB replaced with spaces in prev. commit. Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.pagan Modified: head/usr.bin/calendar/calendars/ru_RU.UTF-8

svn commit: r304607 - head/lib/libc/stdio

2016-08-22 Thread Andrey A. Chernov
Author: ache Date: Mon Aug 22 15:44:54 2016 New Revision: 304607 URL: https://svnweb.freebsd.org/changeset/base/304607 Log: Fix error processing. 1) Don't forget to set __SERR on __slbexpand() error. 2) Check for __fgetwc() errors using errno. Don't check for __SERR as PR suggested, it use

svn commit: r304641 - head/lib/libc/stdio

2016-08-22 Thread Andrey A. Chernov
Author: ache Date: Mon Aug 22 22:28:41 2016 New Revision: 304641 URL: https://svnweb.freebsd.org/changeset/base/304641 Log: 1) Back out r304607 case 2). fgetwln() as its pair fgetln() supposed to return partial line on any errors. See the comment in fgetln.c. Add corresponding comment to fge

svn commit: r304703 - head/include/xlocale

2016-08-23 Thread Andrey A. Chernov
Author: ache Date: Tue Aug 23 20:33:56 2016 New Revision: 304703 URL: https://svnweb.freebsd.org/changeset/base/304703 Log: LC_*_MASK bit shifting order was partially broken from the initial commit time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the right order. The ord

svn commit: r290549 - head/lib/libc/stdio

2015-11-08 Thread Andrey A. Chernov
Author: ache Date: Sun Nov 8 18:00:44 2015 New Revision: 290549 URL: https://svnweb.freebsd.org/changeset/base/290549 Log: Reorganize code to elimitate one _sseek() call for append modes. MFC after: 1 week Modified: head/lib/libc/stdio/ftell.c Modified: head/lib/libc/stdio/ftell.c

svn commit: r290729 - head/lib/libc/stdio

2015-11-12 Thread Andrey A. Chernov
Author: ache Date: Thu Nov 12 22:24:39 2015 New Revision: 290729 URL: https://svnweb.freebsd.org/changeset/base/290729 Log: 1) Remove my overcomplicated error fallback and just return error immediatelly as old code does, now for append modes too. Real use case for such fallback is impossible

svn commit: r300397 - head/lib/libc/stdlib

2016-05-21 Thread Andrey A. Chernov
Author: ache Date: Sun May 22 06:18:59 2016 New Revision: 300397 URL: https://svnweb.freebsd.org/changeset/base/300397 Log: 1) POSIX prohibits printing errors to stderr here and require returning NULL: "Upon successful completion, initstate() and setstate() shall return a pointer to the

svn commit: r300424 - head/sys/dev/cpuctl

2016-05-22 Thread Andrey A. Chernov
Author: ache Date: Sun May 22 15:22:45 2016 New Revision: 300424 URL: https://svnweb.freebsd.org/changeset/base/300424 Log: Improve panic message by specifying on which cpu it really is. Modified: head/sys/dev/cpuctl/cpuctl.c Modified: head/sys/dev/cpuctl/cpuctl.c ===

svn commit: r300953 - head/lib/libc/stdlib

2016-05-29 Thread Andrey A. Chernov
Author: ache Date: Sun May 29 11:54:09 2016 New Revision: 300953 URL: https://svnweb.freebsd.org/changeset/base/300953 Log: 1) Unifdef USE_WEAK_SEEDING it is too obsolete to support and makes reading harder. 2) ACM paper require seed to be in [1, 2^31-2] range, so use the same range shi

svn commit: r300956 - head/lib/libc/stdlib

2016-05-29 Thread Andrey A. Chernov
Author: ache Date: Sun May 29 13:57:06 2016 New Revision: 300956 URL: https://svnweb.freebsd.org/changeset/base/300956 Log: 1) Unifdef USE_WEAK_SEEDING since it is too obsolete to support and makes reading hard. 2) Instead of doing range transformation in each and every function here, d

svn commit: r300965 - head/lib/libc/stdlib

2016-05-29 Thread Andrey A. Chernov
Author: ache Date: Sun May 29 16:39:28 2016 New Revision: 300965 URL: https://svnweb.freebsd.org/changeset/base/300965 Log: Micro optimize: C standard guarantees that right shift for unsigned value fills left bits with zero, and we have exact 32bit unsigned value (uint32_t), so there is no r

  1   2   >