svn commit: r305613 - head/usr.bin/sort
Author: gabor Date: Thu Sep 8 14:50:23 2016 New Revision: 305613 URL: https://svnweb.freebsd.org/changeset/base/305613 Log: - Fix typo PR: 211245 Submitted by: Christoph Schonweiler MFC after:5 days Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in == --- head/usr.bin/sort/sort.1.in Thu Sep 8 14:43:39 2016(r305612) +++ head/usr.bin/sort/sort.1.in Thu Sep 8 14:50:23 2016(r305613) @@ -133,7 +133,7 @@ also checks that there are no lines with .It Fl s Stable sort. This option maintains the original record order of records that have -and equal key. +an equal key. This is a non-standard feature, but it is widely accepted and used. .It Fl Fl version Print the version and silently exits. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289751 - head/usr.bin/sort
Author: gabor Date: Thu Oct 22 10:57:15 2015 New Revision: 289751 URL: https://svnweb.freebsd.org/changeset/base/289751 Log: -C and -c allow at most one input file. Ensure this is the case when the input files are specified through --files0-from. Submitted by: tim@OpenBSD Obtained from:OpenBSD MFC after:1 week Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cThu Oct 22 09:55:40 2015(r289750) +++ head/usr.bin/sort/sort.cThu Oct 22 10:57:15 2015(r289751) @@ -1168,6 +1168,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (argv_from_file0) { + argc = argc_from_file0; + argv = argv_from_file0; + } + #ifndef WITHOUT_NLS catalog = catopen("sort", NL_CAT_LOCALE); #endif @@ -1205,11 +1210,6 @@ main(int argc, char **argv) ks->sm.func = get_sort_func(&(ks->sm)); } - if (argv_from_file0) { - argc = argc_from_file0; - argv = argv_from_file0; - } - if (debug_sort) { printf("Memory to be used for sorting: %llu\n",available_free_memory); #if defined(SORT_THREADS) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r270132 - head/usr.bin/grep
Author: gabor Date: Mon Aug 18 12:29:28 2014 New Revision: 270132 URL: http://svnweb.freebsd.org/changeset/base/270132 Log: - Do not look for more matching lines if -L is specified Submitted by: eadler (based on) MFC after:2 weeks Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cMon Aug 18 09:40:19 2014(r270131) +++ head/usr.bin/grep/util.cMon Aug 18 12:29:28 2014(r270132) @@ -336,7 +336,7 @@ procline(struct str *l, int nottext) } /* One pass if we are not recording matches */ - if (!wflag && ((color == NULL && !oflag) || qflag || lflag)) + if (!wflag && ((color == NULL && !oflag) || qflag || lflag || Lflag)) break; if (st == (size_t)pmatch.rm_so) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r257801 - in head/release/doc: de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 de_DE.IS...
Author: gabor Date: Thu Nov 7 16:42:28 2013 New Revision: 257801 URL: http://svnweb.freebsd.org/changeset/base/257801 Log: - Update release noted to DocBook 5.0 so that they work with the new tree Deleted: head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml head/release/doc/de_DE.ISO8859-1/errata/article.xml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml head/release/doc/de_DE.ISO8859-1/installation/common/install.ent head/release/doc/de_DE.ISO8859-1/installation/common/install.xml head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml head/release/doc/de_DE.ISO8859-1/installation/i386/Makefile head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml head/release/doc/de_DE.ISO8859-1/readme/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml head/release/doc/en_US.ISO8859-1/errata/article.xml head/release/doc/en_US.ISO8859-1/hardware/article.xml head/release/doc/en_US.ISO8859-1/readme/article.xml head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml head/release/doc/fr_FR.ISO8859-1/errata/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml head/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml head/release/doc/fr_FR.ISO8859-1/installation/common/install.ent head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml head/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml head/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml head/release/doc/fr_FR.ISO8859
Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk
Em 13-08-2013 09:15, Peter Wemm escreveu: Author: peter Date: Tue Aug 13 07:15:01 2013 New Revision: 254273 URL:http://svnweb.freebsd.org/changeset/base/254273 Log: The iconv in libc did two things - implement the standard APIs, the GNU extensions and also tried to be link time compatible with ports libiconv. This splits that functionality and enables the parts that shouldn't interfere with the port by default. WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker symbols and even a stub libiconv.so.3 that are good enough to be able to 'pkg delete -f libiconv' on a running system and reasonably expect it to work. Thank you! Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251245 - head/usr.bin/sort
Author: gabor Date: Sun Jun 2 09:43:48 2013 New Revision: 251245 URL: http://svnweb.freebsd.org/changeset/base/251245 Log: - Update Oleg Moskalenko's email address Requested by: Oleg Moskalenko Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/bwstring.h head/usr.bin/sort/coll.c head/usr.bin/sort/coll.h head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/mem.c head/usr.bin/sort/mem.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/radixsort.h head/usr.bin/sort/sort.1.in head/usr.bin/sort/sort.c head/usr.bin/sort/sort.h head/usr.bin/sort/vsort.c head/usr.bin/sort/vsort.h Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cSun Jun 2 09:02:12 2013 (r251244) +++ head/usr.bin/sort/bwstring.cSun Jun 2 09:43:48 2013 (r251245) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/bwstring.h == --- head/usr.bin/sort/bwstring.hSun Jun 2 09:02:12 2013 (r251244) +++ head/usr.bin/sort/bwstring.hSun Jun 2 09:43:48 2013 (r251245) @@ -2,7 +2,7 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/coll.c == --- head/usr.bin/sort/coll.cSun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/coll.cSun Jun 2 09:43:48 2013(r251245) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/coll.h == --- head/usr.bin/sort/coll.hSun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/coll.hSun Jun 2 09:43:48 2013(r251245) @@ -2,7 +2,7 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cSun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/file.cSun Jun 2 09:43:48 2013(r251245) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/file.h == --- head/usr.bin/sort/file.hSun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/file.hSun Jun 2 09:43:48 2013(r251245) @@ -2,7 +2,7 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/mem.c == --- head/usr.bin/sort/mem.c Sun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/mem.c Sun Jun 2 09:43:48 2013(r251245) @@ -1,6 +1,6 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/mem.h == --- head/usr.bin/sort/mem.h Sun Jun 2 09:02:12 2013(r251244) +++ head/usr.bin/sort/mem.h Sun Jun 2 09:43:48 2013(r251245) @@ -2,7 +2,7 @@ /*- * Copyright (C) 2009 Gabor Kovesdan - * Copyright (C) 2012 Oleg Moskalenko + * Copyright (C) 2012 Oleg Moskalenko * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sort/radixsort.c == --- head/usr.bin/sort/radixsort.c Sun Jun 2 09:02:12 2013 (r251244) +++ head/usr.bin/sort/radixsort.c Sun Jun 2 09:43:48
Re: svn commit: r250883 - in head: include include/xlocale lib/libc/locale sys/sys tools/regression/lib/libc/locale
Em 25-05-2013 16:00, Ed Schouten escreveu: Jilles, Gabor, could you please take a look at the patch, whether it's any good? Now we still have the case where the system is built WITHOUT_ICONV=. I think it really depends on the future of iconv in base how complete we should attempt to make it. Gabor, is there a chance WITH_ICONV= will become the default in FreeBSD 10? In general, I think the idea is good. In the original Citrus implementation, there were also plans to use iconv for a ctype functions but the it wasn't actually finished so I removed those bits when I imported iconv to FreeBSD. As for the status, at the moment I have other focuses and higher priority tasks but eventually I would like to get back to iconv. However, I cannot foresee when I will be able to fix the remaining problems, which are: 1, Compatibility with GNU iconv. It achieves a good level of compatibility but it should be almost perfect so that all ports compile. 2, As for the performance, it is quite behind GNU iconv. The loadable modules may have some overhead but it needs some investigation. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r249588 - in head: share/i18n/csmapper/KAZAKH sys/amd64/include/xen sys/dev/xen/netback sys/fs/msdosfs sys/i386/isa
Author: gabor Date: Wed Apr 17 11:56:11 2013 New Revision: 249588 URL: http://svnweb.freebsd.org/changeset/base/249588 Log: - Correct spelling in comments Submitted by: Christoph Mallon (via private mail) Modified: head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src head/sys/amd64/include/xen/xen-os.h head/sys/dev/xen/netback/netback.c head/sys/fs/msdosfs/msdosfs_conv.c head/sys/i386/isa/spic.c Modified: head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src == --- head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src Wed Apr 17 11:48:46 2013(r249587) +++ head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src Wed Apr 17 11:56:11 2013(r249588) @@ -22,7 +22,7 @@ BEGIN_MAP # Suitability for use in MIME text: # Yes # Published specification(s): -# The official Standard STRK1048-2002 was created by the Committee of standartization of +# The official Standard STRK1048-2002 was created by the Committee of standardization of # Ministry of economy and trade of Kazakhstan Republic and was published in print by the # Kazakhstan Standard Committee, Astana, February 7, 2002 # Modified: head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src == --- head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src Wed Apr 17 11:48:46 2013(r249587) +++ head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src Wed Apr 17 11:56:11 2013(r249588) @@ -22,7 +22,7 @@ BEGIN_MAP # Suitability for use in MIME text: # Yes # Published specification(s): -# The official Standard STRK1048-2002 was created by the Committee of standartization of +# The official Standard STRK1048-2002 was created by the Committee of standardization of # Ministry of economy and trade of Kazakhstan Republic and was published in print by the # Kazakhstan Standard Committee, Astana, February 7, 2002 # Modified: head/sys/amd64/include/xen/xen-os.h == --- head/sys/amd64/include/xen/xen-os.h Wed Apr 17 11:48:46 2013 (r249587) +++ head/sys/amd64/include/xen/xen-os.h Wed Apr 17 11:56:11 2013 (r249588) @@ -2,6 +2,8 @@ * os.h * * random collection of macros and definition + * + * $FreeBSD$ */ #ifndef _XEN_OS_H_ @@ -57,7 +59,7 @@ void trap_init(void); /* * STI/CLI equivalents. These basically set and clear the virtual - * event_enable flag in teh shared_info structure. Note that when + * event_enable flag in the shared_info structure. Note that when * the enable bit is set, there may be pending events to be handled. * We may therefore call into do_hypervisor_callback() directly. */ Modified: head/sys/dev/xen/netback/netback.c == --- head/sys/dev/xen/netback/netback.c Wed Apr 17 11:48:46 2013 (r249587) +++ head/sys/dev/xen/netback/netback.c Wed Apr 17 11:56:11 2013 (r249588) @@ -1811,7 +1811,7 @@ xnb_recv(netif_tx_back_ring_t *txb, domi if (num_consumed == 0) return 0; /* Nothing to receive */ - /* update statistics indepdent of errors */ + /* update statistics independent of errors */ ifnet->if_ipackets++; /* Modified: head/sys/fs/msdosfs/msdosfs_conv.c == --- head/sys/fs/msdosfs/msdosfs_conv.c Wed Apr 17 11:48:46 2013 (r249587) +++ head/sys/fs/msdosfs/msdosfs_conv.c Wed Apr 17 11:56:11 2013 (r249588) @@ -788,7 +788,7 @@ winLenFixup(un, unlen) } /* - * Store an area with multi byte string instr, and reterns left + * Store an area with multi byte string instr, and returns left * byte of instr and moves pointer forward. The area's size is * inlen or outlen. */ Modified: head/sys/i386/isa/spic.c == --- head/sys/i386/isa/spic.cWed Apr 17 11:48:46 2013(r249587) +++ head/sys/i386/isa/spic.cWed Apr 17 11:56:11 2013(r249588) @@ -41,7 +41,7 @@ * It sends a single character per event: * u = up, d = down -- that's the jog button * l = left, r = right -- that's the dial. - * "left" and "right" are rather caprecious. They actually represent + * "left" and "right" are rather capricious. They actually represent * ccw and cw, respectively * * What documentation exists is thanks to Andrew Tridge, and his page at ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r249587 - in head: share/i18n/csmapper/KAZAKH sys/dev/sound/pci tools/tools/notescheck
Author: gabor Date: Wed Apr 17 11:48:46 2013 New Revision: 249587 URL: http://svnweb.freebsd.org/changeset/base/249587 Log: - Correct mispellings of word and Submitted by: Christoph Mallon (via private mail) Modified: head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src head/sys/dev/sound/pci/emu10kx.c head/tools/tools/notescheck/notescheck.py Modified: head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src == --- head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src Wed Apr 17 11:47:32 2013(r249586) +++ head/share/i18n/csmapper/KAZAKH/KZ1048%UCS.src Wed Apr 17 11:48:46 2013(r249587) @@ -23,7 +23,7 @@ BEGIN_MAP # Yes # Published specification(s): # The official Standard STRK1048-2002 was created by the Committee of standartization of -# Ministry of economy and trade of Kazakhstan Republic ans was published in print by the +# Ministry of economy and trade of Kazakhstan Republic and was published in print by the # Kazakhstan Standard Committee, Astana, February 7, 2002 # # Mapping data are available online at http://www.sci.kz/~sairan/kazcode/TableA.html Modified: head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src == --- head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src Wed Apr 17 11:47:32 2013(r249586) +++ head/share/i18n/csmapper/KAZAKH/UCS%KZ1048.src Wed Apr 17 11:48:46 2013(r249587) @@ -23,7 +23,7 @@ BEGIN_MAP # Yes # Published specification(s): # The official Standard STRK1048-2002 was created by the Committee of standartization of -# Ministry of economy and trade of Kazakhstan Republic ans was published in print by the +# Ministry of economy and trade of Kazakhstan Republic and was published in print by the # Kazakhstan Standard Committee, Astana, February 7, 2002 # # Mapping data are available online at http://www.sci.kz/~sairan/kazcode/TableA.html Modified: head/sys/dev/sound/pci/emu10kx.c == --- head/sys/dev/sound/pci/emu10kx.cWed Apr 17 11:47:32 2013 (r249586) +++ head/sys/dev/sound/pci/emu10kx.cWed Apr 17 11:48:46 2013 (r249587) @@ -1928,7 +1928,7 @@ emu_initefx(struct emu_sc_info *sc) /* * Substream map (in byte offsets, each substream is 2 bytes): * 0x00..0x1E - outputs -* 0x20..0x3E - FX, inputs ans sync stream +* 0x20..0x3E - FX, inputs and sync stream */ /* First 2 channels (offset 0x20,0x22) are empty */ Modified: head/tools/tools/notescheck/notescheck.py == --- head/tools/tools/notescheck/notescheck.py Wed Apr 17 11:47:32 2013 (r249586) +++ head/tools/tools/notescheck/notescheck.py Wed Apr 17 11:48:46 2013 (r249587) @@ -93,7 +93,7 @@ class Option: return if global_platform in self.defines: -# If the device is defined globally ans is never tested, whine. +# If the device is defined globally and is never tested, whine. if len(self.tests) == 0: print('WARN: %s is defined globally but never tested' % \ (self.title())) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r249586 - in head/sys: arm/ti/omap4 dev/isci/scil dev/mxge pc98/pc98
Author: gabor Date: Wed Apr 17 11:47:32 2013 New Revision: 249586 URL: http://svnweb.freebsd.org/changeset/base/249586 Log: - Correct mispellings of word resource Submitted by: Christoph Mallon Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c head/sys/dev/isci/scil/scic_sds_phy.c head/sys/dev/isci/scil/scic_sds_port.c head/sys/dev/isci/scil/scic_sds_port_configuration_agent.c head/sys/dev/mxge/if_mxge.c head/sys/pc98/pc98/canbus.c Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c == --- head/sys/arm/ti/omap4/omap4_prcm_clks.c Wed Apr 17 11:45:15 2013 (r249585) +++ head/sys/arm/ti/omap4/omap4_prcm_clks.c Wed Apr 17 11:47:32 2013 (r249586) @@ -1003,7 +1003,7 @@ omap4_clk_get_arm_fclk_freq(struct ti_cl /** * omap4_clk_hsusbhost_activate - activates the USB clocks for the given module * @clkdev: pointer to the clock device structure. - * @mem_res: array of memory resouces allocated by the top level PRCM driver. + * @mem_res: array of memory resources allocated by the top level PRCM driver. * * The USB clocking setup seems to be a bit more tricky than the other modules, * to start with the clocking diagram for the HS host module shows 13 different @@ -1153,7 +1153,7 @@ omap4_clk_hsusbhost_activate(struct ti_c /** * omap4_clk_generic_deactivate - checks if a module is accessible * @clkdev: pointer to the clock device structure. - * @mem_res: array of memory resouces allocated by the top level PRCM driver. + * @mem_res: array of memory resources allocated by the top level PRCM driver. * * * @@ -1242,7 +1242,7 @@ omap4_clk_hsusbhost_deactivate(struct ti /** * omap4_clk_hsusbhost_accessible - checks if a module is accessible * @clkdev: pointer to the clock device structure. - * @mem_res: array of memory resouces allocated by the top level PRCM driver. + * @mem_res: array of memory resources allocated by the top level PRCM driver. * * * @@ -1291,7 +1291,7 @@ omap4_clk_hsusbhost_accessible(struct ti * omap4_clk_hsusbhost_set_source - sets the source clocks * @clkdev: pointer to the clock device structure. * @clksrc: the clock source ID for the given clock. - * @mem_res: array of memory resouces allocated by the top level PRCM driver. + * @mem_res: array of memory resources allocated by the top level PRCM driver. * * * Modified: head/sys/dev/isci/scil/scic_sds_phy.c == --- head/sys/dev/isci/scil/scic_sds_phy.c Wed Apr 17 11:45:15 2013 (r249585) +++ head/sys/dev/isci/scil/scic_sds_phy.c Wed Apr 17 11:47:32 2013 (r249586) @@ -975,7 +975,7 @@ void scic_sds_phy_get_attached_phy_proto * * @param[in] controller This parameter specifies the core controller, one of *its phy's resources are to be released. - * @param[in] this_phy This parameter specifies the phy whose resourse is to + * @param[in] this_phy This parameter specifies the phy whose resource is to *be released. */ void scic_sds_phy_release_resource( Modified: head/sys/dev/isci/scil/scic_sds_port.c == --- head/sys/dev/isci/scil/scic_sds_port.c Wed Apr 17 11:45:15 2013 (r249585) +++ head/sys/dev/isci/scil/scic_sds_port.c Wed Apr 17 11:47:32 2013 (r249586) @@ -1537,7 +1537,7 @@ void scic_port_enable_broadcast_change_n * * @param[in] controller This parameter specifies the core controller, one of *its phy's resources are to be released. - * @param[in] this_port This parameter specifies the port whose resourse is to + * @param[in] this_port This parameter specifies the port whose resource is to *be released. */ void scic_sds_port_release_resource( Modified: head/sys/dev/isci/scil/scic_sds_port_configuration_agent.c == --- head/sys/dev/isci/scil/scic_sds_port_configuration_agent.c Wed Apr 17 11:45:15 2013(r249585) +++ head/sys/dev/isci/scil/scic_sds_port_configuration_agent.c Wed Apr 17 11:47:32 2013(r249586) @@ -1109,7 +1109,7 @@ void scic_sds_port_configuration_agent_d * * @param[in] controller This parameter specifies the core controller, one of *its phy's resources are to be released. - * @param[in] this_phy This parameter specifies the phy whose resourse is to + * @param[in] this_phy This parameter specifies the phy whose resource is to *be released. */ void scic_sds_port_configuration_agent_release_resource( Modified: head/sys/dev/mxge/if_mxge.c == --- head/sys/dev/mxge/if_mxge.c Wed Apr 17 11:45:15 20
svn commit: r249585 - in head/sys: cam dev/bktr dev/ppbus dev/sound/pcm netinet pci
Author: gabor Date: Wed Apr 17 11:45:15 2013 New Revision: 249585 URL: http://svnweb.freebsd.org/changeset/base/249585 Log: - Corrrect mispellings of word useful Submitted by: Christoph Mallon (via private mail) Modified: head/sys/cam/cam_periph.h head/sys/dev/bktr/CHANGELOG.TXT head/sys/dev/bktr/bktr_os.c head/sys/dev/ppbus/ppbconf.c head/sys/dev/sound/pcm/dsp.c head/sys/netinet/tcp_subr.c head/sys/pci/ncr.c Modified: head/sys/cam/cam_periph.h == --- head/sys/cam/cam_periph.h Wed Apr 17 11:43:46 2013(r249584) +++ head/sys/cam/cam_periph.h Wed Apr 17 11:45:15 2013(r249585) @@ -90,7 +90,7 @@ typedef enum { CAM_PERIPH_BIO } cam_periph_type; -/* Generically usefull offsets into the peripheral private area */ +/* Generically useful offsets into the peripheral private area */ #define ppriv_ptr0 periph_priv.entries[0].ptr #define ppriv_ptr1 periph_priv.entries[1].ptr #define ppriv_field0 periph_priv.entries[0].field Modified: head/sys/dev/bktr/CHANGELOG.TXT == --- head/sys/dev/bktr/CHANGELOG.TXT Wed Apr 17 11:43:46 2013 (r249584) +++ head/sys/dev/bktr/CHANGELOG.TXT Wed Apr 17 11:45:15 2013 (r249585) @@ -285,7 +285,7 @@ Fix row=0/columns=0 bug. From Randal Hopper Add option to block the reset of the MSP34xx audio chip by adding options BKTR_NO_MSP_RESET to the kernel config file. -This is usefull if you run another operating system +This is useful if you run another operating system first to initialise the audio chip, then do a soft reboot. Added for Yuri Gindin Modified: head/sys/dev/bktr/bktr_os.c == --- head/sys/dev/bktr/bktr_os.c Wed Apr 17 11:43:46 2013(r249584) +++ head/sys/dev/bktr/bktr_os.c Wed Apr 17 11:45:15 2013(r249585) @@ -404,7 +404,7 @@ bktr_attach( device_t dev ) #if defined( BKTR_SIS_VIA_MODE ) if (bootverbose) printf("Using SiS/VIA chipset compatibilty mode\n"); -fun = fun | 4; /* Enable SiS/VIA compatibility mode (usefull for +fun = fun | 4; /* Enable SiS/VIA compatibility mode (useful for OPTi chipset motherboards too */ #endif pci_write_config(dev, 0x40, fun, 2); Modified: head/sys/dev/ppbus/ppbconf.c == --- head/sys/dev/ppbus/ppbconf.cWed Apr 17 11:43:46 2013 (r249584) +++ head/sys/dev/ppbus/ppbconf.cWed Apr 17 11:45:15 2013 (r249585) @@ -531,7 +531,7 @@ ppb_request_bus(device_t bus, device_t d /* restore the context of the device * The first time, ctx.valid is certainly false -* then do not change anything. This is usefull for +* then do not change anything. This is useful for * drivers that do not set there operating mode * during attachement */ Modified: head/sys/dev/sound/pcm/dsp.c == --- head/sys/dev/sound/pcm/dsp.cWed Apr 17 11:43:46 2013 (r249584) +++ head/sys/dev/sound/pcm/dsp.cWed Apr 17 11:45:15 2013 (r249585) @@ -2011,7 +2011,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd * OSSv4 docs: "All errors and counters will automatically be * cleared to zeroes after the call so each call will return only * the errors that occurred after the previous invocation. ... The -* play_underruns and rec_overrun fields are the only usefull fields +* play_underruns and rec_overrun fields are the only useful fields * returned by OSS 4.0." */ { Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Wed Apr 17 11:43:46 2013(r249584) +++ head/sys/netinet/tcp_subr.c Wed Apr 17 11:45:15 2013(r249585) @@ -1060,7 +1060,7 @@ tcp_drain(void) * XXX: The "Net/3" implementation doesn't imply that the TCP * reassembly queue should be flushed, but in a situation * where we're really low on mbufs, this is potentially -* usefull. +* useful. */ INP_INFO_RLOCK(&V_tcbinfo); LIST_FOREACH(inpb, V_tcbinfo.ipi_listhead, inp_list) { Modified: head/sys/pci/ncr.c == --- head/sys/pci/ncr.c Wed Apr 17 11:43:46 2013(r249584) +++ head/sys/pci/n
svn commit: r249584 - in head/sys: dev/usb/wlan i386/isa
Author: gabor Date: Wed Apr 17 11:43:46 2013 New Revision: 249584 URL: http://svnweb.freebsd.org/changeset/base/249584 Log: - Correct mispellings of word miscellaneous Submitted by: Christoph Mallon (via private mail) Modified: head/sys/dev/usb/wlan/if_zydreg.h head/sys/i386/isa/spic.c Modified: head/sys/dev/usb/wlan/if_zydreg.h == --- head/sys/dev/usb/wlan/if_zydreg.h Wed Apr 17 11:42:40 2013 (r249583) +++ head/sys/dev/usb/wlan/if_zydreg.h Wed Apr 17 11:43:46 2013 (r249584) @@ -112,7 +112,7 @@ #define ZYD_MACB_MAX_RETRY 0x9b28 /* - * Miscellanous registers. + * Miscellaneous registers. */ #define ZYD_FIRMWARE_START_ADDR0xee00 #define ZYD_FIRMWARE_BASE_ADDR 0xee1d /* Firmware base address */ Modified: head/sys/i386/isa/spic.c == --- head/sys/i386/isa/spic.cWed Apr 17 11:42:40 2013(r249583) +++ head/sys/i386/isa/spic.cWed Apr 17 11:43:46 2013(r249584) @@ -34,7 +34,7 @@ * and mouse button out of the jog dial. I suspect that this device will * end up having to support at least 2 different minor devices: One to be * the jog wheel device for moused to camp out on and the other to perform - * all of the other miscelaneous functions of this device. But for now, + * all of the other miscellaneous functions of this device. But for now, * the jog wheel is all you get. * * At the moment, the data sent back by the device is rather primitive. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r249583 - in head: include/rpcsvc sys/dev/cas sys/dev/xen/netback sys/fs/devfs sys/fs/msdosfs sys/kern sys/netgraph usr.sbin/nandsim
Author: gabor Date: Wed Apr 17 11:42:40 2013 New Revision: 249583 URL: http://svnweb.freebsd.org/changeset/base/249583 Log: - Correct mispellings of the word necessary Submitted by: Christoph Mallon (via private mail) Modified: head/include/rpcsvc/ypxfrd.x head/sys/dev/cas/if_casvar.h head/sys/dev/xen/netback/netback.c head/sys/fs/devfs/devfs_devs.c head/sys/fs/msdosfs/msdosfs_conv.c head/sys/kern/imgact_gzip.c head/sys/netgraph/ng_base.c head/usr.sbin/nandsim/nandsim_cfgparse.c Modified: head/include/rpcsvc/ypxfrd.x == --- head/include/rpcsvc/ypxfrd.xWed Apr 17 11:40:10 2013 (r249582) +++ head/include/rpcsvc/ypxfrd.xWed Apr 17 11:42:40 2013 (r249583) @@ -75,7 +75,7 @@ const _YPMAXDOMAIN = 64; const _YPMAXMAP = 64; const _YPMAXPEER = 64; -/* Suggested default -- not necesarrily the one used. */ +/* Suggested default -- not necessarily the one used. */ const YPXFRBLOCK = 32767; /* Modified: head/sys/dev/cas/if_casvar.h == --- head/sys/dev/cas/if_casvar.hWed Apr 17 11:40:10 2013 (r249582) +++ head/sys/dev/cas/if_casvar.hWed Apr 17 11:42:40 2013 (r249583) @@ -56,7 +56,7 @@ /* * Receive completion ring size - we have one completion per - * incoming packet (though the opposite isn't necesarrily true), + * incoming packet (though the opposite isn't necessarily true), * so this logic is a little simpler. */ #defineCAS_NRXCOMP 4096 Modified: head/sys/dev/xen/netback/netback.c == --- head/sys/dev/xen/netback/netback.c Wed Apr 17 11:40:10 2013 (r249582) +++ head/sys/dev/xen/netback/netback.c Wed Apr 17 11:42:40 2013 (r249583) @@ -1816,7 +1816,7 @@ xnb_recv(netif_tx_back_ring_t *txb, domi /* * if we got here, then 1 or more requests was consumed, but the packet -* is not necesarily valid. +* is not necessarily valid. */ if (xnb_pkt_is_valid(&pkt) == 0) { /* got a garbage packet, respond and drop it */ Modified: head/sys/fs/devfs/devfs_devs.c == --- head/sys/fs/devfs/devfs_devs.c Wed Apr 17 11:40:10 2013 (r249582) +++ head/sys/fs/devfs/devfs_devs.c Wed Apr 17 11:42:40 2013 (r249583) @@ -655,7 +655,7 @@ devfs_cleanup(struct devfs_mount *dm) /* * devfs_create() and devfs_destroy() are called from kern_conf.c and * in both cases the devlock() mutex is held, so no further locking - * is necesary and no sleeping allowed. + * is necessary and no sleeping allowed. */ void Modified: head/sys/fs/msdosfs/msdosfs_conv.c == --- head/sys/fs/msdosfs/msdosfs_conv.c Wed Apr 17 11:40:10 2013 (r249582) +++ head/sys/fs/msdosfs/msdosfs_conv.c Wed Apr 17 11:42:40 2013 (r249583) @@ -774,7 +774,7 @@ winSlotCnt(un, unlen, pmp) } /* - * Determine the number of bytes neccesary for Win95 names + * Determine the number of bytes neccessary for Win95 names */ size_t winLenFixup(un, unlen) Modified: head/sys/kern/imgact_gzip.c == --- head/sys/kern/imgact_gzip.c Wed Apr 17 11:40:10 2013(r249582) +++ head/sys/kern/imgact_gzip.c Wed Apr 17 11:42:40 2013(r249583) @@ -18,7 +18,7 @@ * inflate isn't quite reentrant yet... * error-handling is a mess... * so is the rest... - * tidy up unnecesary includes + * tidy up unnecessary includes */ #include Modified: head/sys/netgraph/ng_base.c == --- head/sys/netgraph/ng_base.c Wed Apr 17 11:40:10 2013(r249582) +++ head/sys/netgraph/ng_base.c Wed Apr 17 11:42:40 2013(r249583) @@ -92,7 +92,7 @@ static void ng_dumphooks(void); #endif /* NETGRAPH_DEBUG */ /* * DEAD versions of the structures. - * In order to avoid races, it is sometimes neccesary to point + * In order to avoid races, it is sometimes necessary to point * at SOMETHING even though theoretically, the current entity is * INVALID. Use these to avoid these races. */ Modified: head/usr.sbin/nandsim/nandsim_cfgparse.c == --- head/usr.sbin/nandsim/nandsim_cfgparse.cWed Apr 17 11:40:10 2013 (r249582) +++ head/usr.sbin/nandsim/nandsim_cfgparse.cWed Apr 17 11:42:40 2013 (r249583) @@ -575,7 +575,7 @@ parse_config(char *cfgfname, const char /* * Function tries to get appropriate value for given key, convert it to - * array of ints (of given size), and perform all the neccesary checks and +
svn commit: r249582 - in head: lib/libc/i386/string lib/libc/stdlib lib/libz sys/arm/include sys/arm/xscale/ixp425 sys/cam/scsi sys/dev/cxgb/common sys/dev/msk sys/dev/ppbus sys/dev/rndtest sys/ker...
Author: gabor Date: Wed Apr 17 11:40:10 2013 New Revision: 249582 URL: http://svnweb.freebsd.org/changeset/base/249582 Log: - Correct mispellings of the word occurrence Submitted by: Christoph Mallon (via private mail) Modified: head/lib/libc/i386/string/memchr.S head/lib/libc/i386/string/strchr.S head/lib/libc/i386/string/strrchr.S head/lib/libc/stdlib/realpath.c head/lib/libz/zlib.h head/sys/arm/include/sysarch.h head/sys/arm/xscale/ixp425/ixp425_npe.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_target.c head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/msk/if_msk.c head/sys/dev/ppbus/ppbconf.c head/sys/dev/rndtest/rndtest.c head/sys/kern/vfs_mount.c head/sys/ufs/ffs/ffs_balloc.c head/tools/regression/usr.bin/yacc/grammar.y head/tools/regression/usr.bin/yacc/regress.08.out head/usr.sbin/ppp/command.c Modified: head/lib/libc/i386/string/memchr.S == --- head/lib/libc/i386/string/memchr.S Wed Apr 17 09:19:29 2013 (r249581) +++ head/lib/libc/i386/string/memchr.S Wed Apr 17 11:40:10 2013 (r249582) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); /* * memchr (b, c, len) - * locates the first occurance of c in string b. + * locates the first occurrence of c in string b. * * Written by: * J.T. Conklin (j...@wimsey.com), Winning Strategies, Inc. Modified: head/lib/libc/i386/string/strchr.S == --- head/lib/libc/i386/string/strchr.S Wed Apr 17 09:19:29 2013 (r249581) +++ head/lib/libc/i386/string/strchr.S Wed Apr 17 11:40:10 2013 (r249582) @@ -33,11 +33,11 @@ __FBSDID("$FreeBSD$"); /* * strchr(s, c) - * return a pointer to the first occurance of the character c in + * return a pointer to the first occurrence of the character c in * string s, or NULL if c does not occur in the string. * * %edx - pointer iterating through string - * %eax - pointer to first occurance of 'c' + * %eax - pointer to first occurrence of 'c' * %cl - character we're comparing against * %bl - character at %edx * Modified: head/lib/libc/i386/string/strrchr.S == --- head/lib/libc/i386/string/strrchr.S Wed Apr 17 09:19:29 2013 (r249581) +++ head/lib/libc/i386/string/strrchr.S Wed Apr 17 11:40:10 2013 (r249582) @@ -33,11 +33,11 @@ __FBSDID("$FreeBSD$"); /* * strrchr(s, c) - * return a pointer to the last occurance of the character c in + * return a pointer to the last occurrence of the character c in * string s, or NULL if c does not occur in the string. * * %edx - pointer iterating through string - * %eax - pointer to last occurance of 'c' + * %eax - pointer to last occurrence of 'c' * %cl - character we're comparing against * %bl - character at %edx * Modified: head/lib/libc/stdlib/realpath.c == --- head/lib/libc/stdlib/realpath.c Wed Apr 17 09:19:29 2013 (r249581) +++ head/lib/libc/stdlib/realpath.c Wed Apr 17 11:40:10 2013 (r249582) @@ -139,7 +139,7 @@ realpath(const char * __restrict path, c * Only the trailing slashes are not covered * by other checks in the loop, but we verify * the prefix for any (rare) "//" or "/\0" -* occurence to not implement lookahead. +* occurrence to not implement lookahead. */ if (lstat(resolved, &sb) != 0) { if (m) Modified: head/lib/libz/zlib.h == --- head/lib/libz/zlib.hWed Apr 17 09:19:29 2013(r249581) +++ head/lib/libz/zlib.hWed Apr 17 11:40:10 2013(r249582) @@ -846,7 +846,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_st available input is skipped. No output is provided. inflateSync searches for a 00 00 FF FF pattern in the compressed data. - All full flush points have this pattern, but not all occurences of this + All full flush points have this pattern, but not all occurrences of this pattern are full flush points. inflateSync returns Z_OK if a possible full flush point has been found, Modified: head/sys/arm/include/sysarch.h == --- head/sys/arm/include/sysarch.h Wed Apr 17 09:19:29 2013 (r249581) +++ head/sys/arm/include/sysarch.h Wed Apr 17 11:40:10 2013 (r249582) @@ -47,7 +47,7 @@ * update the cpu_switch() (and cpu_throw()) code as well. * In addition, code in arm/include/atomic.h and arm/include/asmacros.h * assumes that ARM_RAS_END is at ARM_RAS_START+4, s
svn commit: r246114 - head
Author: gabor Date: Wed Jan 30 10:23:38 2013 New Revision: 246114 URL: http://svnweb.freebsd.org/changeset/base/246114 Log: - Fix typo Submitted by: jkim Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Wed Jan 30 07:48:43 2013(r246113) +++ head/UPDATING Wed Jan 30 10:23:38 2013(r246114) @@ -31,7 +31,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 as bsdpatch, being the GNU version the default patch. To inverse the logic and use the BSD-licensed one as default, while having the GNU version installed as gnupatch, rebuild - ans install world with the WITH_BSD_PATCH knob set. + and install world with the WITH_BSD_PATCH knob set. 20130118: The install(1) option -M has changed meaning and now takes an ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r246075 - head/share/man/man5
Author: gabor Date: Tue Jan 29 17:05:21 2013 New Revision: 246075 URL: http://svnweb.freebsd.org/changeset/base/246075 Log: - Regen Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Tue Jan 29 17:03:18 2013 (r246074) +++ head/share/man/man5/src.conf.5 Tue Jan 29 17:05:21 2013 (r246075) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd January 17, 2013 +.Dd January 29, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -100,6 +100,9 @@ Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. +.It Va WITH_ARM_EABI +.\" from FreeBSD: head/tools/build/options/WITH_ARM_EABI 245539 2013-01-17 05:56:28Z andrew +Set the ARM ABI to EABI. .It Va WITHOUT_ASSERT_DEBUG .\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the @@ -242,6 +245,9 @@ Set to not build the BSD licensed versio .It Va WITH_BSD_GREP .\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 73 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. +.It Va WITH_BSD_PATCH +.\" from FreeBSD: head/tools/build/options/WITH_BSD_PATCH 246074 2013-01-29 17:03:18Z gabor +Install BSD-licensed patch as 'patch' instead of GNU patch. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -476,9 +482,6 @@ Set to not build GPIB bus support. Set to not build .Xr gpioctl 8 as part of the base system. -.It Va WITH_GPL_DTC -Set to build the GPL'd version of the device tree compiler from elinux.org, -instead of the BSD licensed one. .It Va WITHOUT_GROFF .\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build @@ -888,6 +891,11 @@ Set to build some programs without PAM s .Xr ftpd 8 and .Xr ppp 8 . +.It Va WITHOUT_PC_SYSINSTALL +.\" from FreeBSD: head/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler +Set to not build +.Xr pc-sysinstall 8 +and related programs. .It Va WITHOUT_PF .\" from FreeBSD: head/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r246074 - in head: . gnu/usr.bin/patch share/mk tools/build/options usr.bin usr.bin/patch
Author: gabor Date: Tue Jan 29 17:03:18 2013 New Revision: 246074 URL: http://svnweb.freebsd.org/changeset/base/246074 Log: - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from DragonflyBSD and install it as bsdpatch. WITH_BSD_PATCH makes it default and installs GNU patch as gnupatch. Submitted by: pfg Obtained from:The DragonflyBSD Project Added: head/tools/build/options/WITH_BSD_PATCH (contents, props changed) head/usr.bin/patch/ head/usr.bin/patch/Makefile (contents, props changed) head/usr.bin/patch/backupfile.c (contents, props changed) head/usr.bin/patch/backupfile.h (contents, props changed) head/usr.bin/patch/common.h (contents, props changed) head/usr.bin/patch/inp.c (contents, props changed) head/usr.bin/patch/inp.h (contents, props changed) head/usr.bin/patch/mkpath.c (contents, props changed) head/usr.bin/patch/patch.1 (contents, props changed) head/usr.bin/patch/patch.c (contents, props changed) head/usr.bin/patch/pathnames.h (contents, props changed) head/usr.bin/patch/pch.c (contents, props changed) head/usr.bin/patch/pch.h (contents, props changed) head/usr.bin/patch/util.c (contents, props changed) head/usr.bin/patch/util.h (contents, props changed) Modified: head/UPDATING head/gnu/usr.bin/patch/Makefile head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/UPDATING == --- head/UPDATING Tue Jan 29 16:00:43 2013(r246073) +++ head/UPDATING Tue Jan 29 17:03:18 2013(r246074) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130129: + A BSD-licensed patch(1) variant has been added and is installed + as bsdpatch, being the GNU version the default patch. + To inverse the logic and use the BSD-licensed one as default, + while having the GNU version installed as gnupatch, rebuild + ans install world with the WITH_BSD_PATCH knob set. + 20130118: The install(1) option -M has changed meaning and now takes an argument that is a file or path to append logs to. In the Modified: head/gnu/usr.bin/patch/Makefile == --- head/gnu/usr.bin/patch/Makefile Tue Jan 29 16:00:43 2013 (r246073) +++ head/gnu/usr.bin/patch/Makefile Tue Jan 29 17:03:18 2013 (r246074) @@ -1,6 +1,17 @@ # $FreeBSD$ -PROG= patch +.include + +.if ${MK_BSD_PATCH} == "yes" +PROG= gnupatch +CLEANFILES+= gnupatch.1 + +gnupatch.1: patch.1 + cp ${.ALLSRC} ${.TARGET} +.else +PROG= patch +.endif + SRCS= backupfile.c inp.c patch.c pch.c util.c version.c CFLAGS+=-DHAVE_CONFIG_H Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkTue Jan 29 16:00:43 2013(r246073) +++ head/share/mk/bsd.own.mkTue Jan 29 17:03:18 2013(r246074) @@ -354,6 +354,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ ARM_EABI \ +BSD_PATCH \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ Added: head/tools/build/options/WITH_BSD_PATCH == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BSD_PATCH Tue Jan 29 17:03:18 2013 (r246074) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install BSD-licensed patch as 'patch' instead of GNU patch. Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Tue Jan 29 16:00:43 2013(r246073) +++ head/usr.bin/Makefile Tue Jan 29 17:03:18 2013(r246074) @@ -123,6 +123,7 @@ SUBDIR= alias \ pagesize \ passwd \ paste \ + patch \ pathchk \ perror \ pr \ Added: head/usr.bin/patch/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/patch/Makefile Tue Jan 29 17:03:18 2013(r246074) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.4 2005/05/16 15:22:46 espie Exp $ +# $DragonFly: src/usr.bin/patch/Makefile,v 1.8 2008/08/10 23:50:12 joerg Exp $ + +.include + +.if ${MK_BSD_PATCH} == "yes" +PROG= patch +.else +PROG= bsdpatch +CLEANFILES+= bsdpatch.1 + +bsdpatch.1: patch.1 + cp ${.ALLSRC} ${.TARGET} +.endif + +SRCS= backupfile.c inp.c mkpath.c patch.c pch.c util.c + +.include Added: head/usr.bin/patch/backupfile.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) ++
svn commit: r245998 - head/usr.bin/sort
Author: gabor Date: Sun Jan 27 19:50:24 2013 New Revision: 245998 URL: http://svnweb.freebsd.org/changeset/base/245998 Log: - Remove forgotten commented out debug code Submitted by: Christoph Mallon Reviewed by: Oleg Moskalenko Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cSun Jan 27 19:49:10 2013(r245997) +++ head/usr.bin/sort/sort.cSun Jan 27 19:50:24 2013(r245998) @@ -986,21 +986,6 @@ main(int argc, char **argv) set_tmpdir(); set_sort_opts(); -#if 0 - { - static int counter = 0; - char fn[128]; - sprintf(fn, "/var/tmp/debug.sort.%d", counter++); - FILE* f = fopen(fn, "w"); - fprintf(f, ">>sort>>"); - for (int i = 0; i < argc; i++) { - fprintf(f, "<%s>", argv[i]); - } - fprintf(f, "
svn commit: r245997 - head/usr.bin/sort
Author: gabor Date: Sun Jan 27 19:49:10 2013 New Revision: 245997 URL: http://svnweb.freebsd.org/changeset/base/245997 Log: - Simplify and unify diagnostic and error message handling Submitted by: Christoph Mallon Reviewed by: Oleg Moskalenko Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cSun Jan 27 19:44:41 2013(r245996) +++ head/usr.bin/sort/sort.cSun Jan 27 19:49:10 2013(r245997) @@ -434,8 +434,7 @@ parse_memory_buffer_value(const char *va 100; break; default: - fprintf(stderr, "%s: %s\n", strerror(EINVAL), - optarg); + warnc(EINVAL, "%s", optarg); membuf = available_free_memory; } } @@ -658,7 +657,7 @@ parse_pos(const char *s, struct key_spec errno = 0; ks->f2 = (size_t) strtoul(f, NULL, 10); if (errno != 0) - errx(2, "%s: -k", strerror(errno)); + err(2, "-k"); if (ks->f2 == 0) { warn("%s",getstr(5)); goto end; @@ -667,7 +666,7 @@ parse_pos(const char *s, struct key_spec errno = 0; ks->f1 = (size_t) strtoul(f, NULL, 10); if (errno != 0) - errx(2, "%s: -k", strerror(errno)); + err(2, "-k"); if (ks->f1 == 0) { warn("%s",getstr(5)); goto end; @@ -685,12 +684,12 @@ parse_pos(const char *s, struct key_spec errno = 0; ks->c2 = (size_t) strtoul(c, NULL, 10); if (errno != 0) - errx(2, "%s: -k", strerror(errno)); + err(2, "-k"); } else { errno = 0; ks->c1 = (size_t) strtoul(c, NULL, 10); if (errno != 0) - errx(2, "%s: -k", strerror(errno)); + err(2, "-k"); if (ks->c1 == 0) { warn("%s",getstr(6)); goto end; @@ -1041,8 +1040,7 @@ main(int argc, char **argv) if (parse_k(optarg, &(keys[keys_num - 1])) < 0) { - errx(2, "%s: -k %s\n", - strerror(EINVAL), optarg); + errc(2, EINVAL, "-k %s", optarg); } break; @@ -1067,8 +1065,7 @@ main(int argc, char **argv) case 't': while (strlen(optarg) > 1) { if (optarg[0] != '\\') { - errx(2, "%s: %s\n", - strerror(EINVAL), optarg); + errc(2, EINVAL, "%s", optarg); } optarg += 1; if (*optarg == '0') { @@ -1155,8 +1152,7 @@ main(int argc, char **argv) errno = 0; long mof = strtol(optarg, NULL, 10); if (errno != 0) - errx(2, "--batch-size: %s", - strerror(errno)); + err(2, "--batch-size"); if (mof >= 2) max_open_files = (size_t) mof + 1; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r245688 - head/usr.bin/grep
Author: gabor Date: Sun Jan 20 11:58:49 2013 New Revision: 245688 URL: http://svnweb.freebsd.org/changeset/base/245688 Log: - Avoid unnecessary strdup() Submitted by: ache MFC after:5 days Modified: head/usr.bin/grep/grep.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cSun Jan 20 11:18:29 2013(r245687) +++ head/usr.bin/grep/grep.cSun Jan 20 11:58:49 2013(r245688) @@ -481,7 +481,7 @@ main(int argc, char *argv[]) case 'e': { char *token; - char *string = strdup(optarg); + char *string = optarg; while ((token = strsep(&string, "\n")) != NULL) add_pattern(token, strlen(token)); @@ -675,7 +675,7 @@ main(int argc, char *argv[]) /* Process patterns from command line */ if (aargc != 0 && needpattern) { char *token; - char *string = strdup(*aargv); + char *string = *aargv; while ((token = strsep(&string, "\n")) != NULL) add_pattern(token, strlen(token)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r245057 - head/usr.bin/grep
Author: gabor Date: Sat Jan 5 14:52:31 2013 New Revision: 245057 URL: http://svnweb.freebsd.org/changeset/base/245057 Log: - Fix handling of the case when multiple patterns are specified in a single command line argument, separated by newlines PR: bin/173673 Submitted by: ache MFC after:1 week Modified: head/usr.bin/grep/grep.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cSat Jan 5 11:13:48 2013(r245056) +++ head/usr.bin/grep/grep.cSat Jan 5 14:52:31 2013(r245057) @@ -479,7 +479,13 @@ main(int argc, char *argv[]) grepbehave = GREP_EXTENDED; break; case 'e': - add_pattern(optarg, strlen(optarg)); + { + char *token; + char *string = strdup(optarg); + + while ((token = strsep(&string, "\n")) != NULL) + add_pattern(token, strlen(token)); + } needpattern = 0; break; case 'F': @@ -668,7 +674,11 @@ main(int argc, char *argv[]) /* Process patterns from command line */ if (aargc != 0 && needpattern) { - add_pattern(*aargv, strlen(*aargv)); + char *token; + char *string = strdup(*aargv); + + while ((token = strsep(&string, "\n")) != NULL) + add_pattern(token, strlen(token)); --aargc; ++aargv; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244515 - head/usr.bin/sort
Author: gabor Date: Thu Dec 20 22:30:40 2012 New Revision: 244515 URL: http://svnweb.freebsd.org/changeset/base/244515 Log: - Change the memory heuristics to an actually working one Submitted by: Oleg Moskalenko Prodded by: kib Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cThu Dec 20 22:26:03 2012(r244514) +++ head/usr.bin/sort/sort.cThu Dec 20 22:30:40 2012(r244515) @@ -265,33 +265,27 @@ read_fns_from_file0(const char *fn) static void set_hw_params(void) { -#if defined(SORT_THREADS) - size_t ncpusz; -#endif - unsigned int pages, psize; - size_t psz, pszsz; + long pages, psize; pages = psize = 0; + #if defined(SORT_THREADS) ncpu = 1; - ncpusz = sizeof(size_t); #endif - psz = sizeof(pages); - pszsz = sizeof(psize); - if (sysctlbyname("vm.stats.vm.v_free_count", &pages, &psz, - NULL, 0) < 0) { - perror("vm.stats.vm.v_free_count"); - return; - } - if (sysctlbyname("vm.stats.vm.v_page_size", &psize, &pszsz, - NULL, 0) < 0) { - perror("vm.stats.vm.v_page_size"); - return; + pages = sysconf(_SC_PHYS_PAGES); + if (pages < 1) { + perror("sysconf pages"); + psize = 1; + } + psize = sysconf(_SC_PAGESIZE); + if (psize < 1) { + perror("sysconf psize"); + psize = 4096; } #if defined(SORT_THREADS) - if (sysctlbyname("hw.ncpu", &ncpu, &ncpusz, - NULL, 0) < 0) + ncpu = (unsigned int)sysconf(_SC_NPROCESSORS_ONLN); + if (ncpu < 1) ncpu = 1; else if(ncpu > 32) ncpu = 32; @@ -300,7 +294,7 @@ set_hw_params(void) #endif free_memory = (unsigned long long) pages * (unsigned long long) psize; - available_free_memory = (free_memory * 9) / 10; + available_free_memory = free_memory / 2; if (available_free_memory < 1024) available_free_memory = 1024; @@ -1232,7 +1226,9 @@ main(int argc, char **argv) } if (debug_sort) { + printf("Memory to be used for sorting: %llu\n",available_free_memory); #if defined(SORT_THREADS) + printf("Number of CPUs: %d\n",(int)ncpu); nthreads = 1; #endif printf("Using collate rules of %s locale\n", ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244348 - head/share/i18n/csmapper
Author: gabor Date: Mon Dec 17 10:12:12 2012 New Revision: 244348 URL: http://svnweb.freebsd.org/changeset/base/244348 Log: - Fix handling of .mps files PR: bin/161454 Submitted by: Yamaya Takashi Modified: head/share/i18n/csmapper/Makefile.part Modified: head/share/i18n/csmapper/Makefile.part == --- head/share/i18n/csmapper/Makefile.part Mon Dec 17 10:10:13 2012 (r244347) +++ head/share/i18n/csmapper/Makefile.part Mon Dec 17 10:12:12 2012 (r244348) @@ -28,9 +28,9 @@ mapper.dir.${ESUBDIR}: ${CODE}.part echo "# ${ESUBDIR}" > ${.TARGET} .for i in ${PART} printf "%-32s%-32s%s\n" ${ENCID:S@%%PART%%@${i}@}/UCS ${MAPPER} \ - ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@}${ENCEXT} >> ${.TARGET} + ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} printf "%-32s%-32s%s\n" UCS/${ENCID:S@%%PART%%@${i}@} ${MAPPER} \ - ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@}${ENCEXT} >> ${.TARGET} + ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} .endfor echo >> ${.TARGET} .else @@ -59,13 +59,13 @@ CLEANFILES+= charset.pivot.${ESUBDIR} .if !defined(MAPS) .for i in ${PART} -.if exists(${TABLENAME:S@%%PART%%@${i}@}.src) -FILES+=${TABLENAME:S@%%PART%%@${i}@}.mps -CLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@}.mps -.endif -.if exists(${RTABLENAME:S@%%PART%%@${i}@}.src) -FILES+=${RTABLENAME:S@%%PART%%@${i}@}.mps -CLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@}.mps +.if exists(${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) +FILES+=${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps +CLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps +.endif +.if exists(${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) +FILES+=${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps +CLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps .endif .endfor .else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r244346 - head/usr.bin/sort
Author: gabor Date: Mon Dec 17 09:36:43 2012 New Revision: 244346 URL: http://svnweb.freebsd.org/changeset/base/244346 Log: - Use unsigned int for values obtained with sysctlbyname(). This fixes sparc64 performance problems. Submitted by: Oleg Moskalenko Tested by:trasz Modified: head/usr.bin/sort/sort.c head/usr.bin/sort/sort.h Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cMon Dec 17 06:44:16 2012(r244345) +++ head/usr.bin/sort/sort.cMon Dec 17 09:36:43 2012(r244346) @@ -103,7 +103,7 @@ bool debug_sort; bool need_hint; #if defined(SORT_THREADS) -size_t ncpu = 1; +unsigned int ncpu = 1; size_t nthreads = 1; #endif @@ -268,14 +268,16 @@ set_hw_params(void) #if defined(SORT_THREADS) size_t ncpusz; #endif - size_t pages, psize, psz, pszsz; + unsigned int pages, psize; + size_t psz, pszsz; pages = psize = 0; #if defined(SORT_THREADS) ncpu = 1; ncpusz = sizeof(size_t); #endif - psz = pszsz = sizeof(size_t); + psz = sizeof(pages); + pszsz = sizeof(psize); if (sysctlbyname("vm.stats.vm.v_free_count", &pages, &psz, NULL, 0) < 0) { @@ -299,6 +301,9 @@ set_hw_params(void) free_memory = (unsigned long long) pages * (unsigned long long) psize; available_free_memory = (free_memory * 9) / 10; + + if (available_free_memory < 1024) + available_free_memory = 1024; } /* Modified: head/usr.bin/sort/sort.h == --- head/usr.bin/sort/sort.hMon Dec 17 06:44:16 2012(r244345) +++ head/usr.bin/sort/sort.hMon Dec 17 09:36:43 2012(r244346) @@ -54,7 +54,7 @@ extern const char *nlsstr[]; #if defined(SORT_THREADS) #define MT_SORT_THRESHOLD (1) -extern size_t ncpu; +extern unsigned int ncpu; extern size_t nthreads; #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r242430 - head/usr.bin/sort
Author: gabor Date: Thu Nov 1 11:38:34 2012 New Revision: 242430 URL: http://svn.freebsd.org/changeset/base/242430 Log: - Portability changes for ARM - Allow larger sort memory on 64-bit platforms Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/bwstring.h head/usr.bin/sort/coll.c head/usr.bin/sort/coll.h head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c head/usr.bin/sort/sort.h Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cThu Nov 1 09:38:28 2012 (r242429) +++ head/usr.bin/sort/bwstring.cThu Nov 1 11:38:34 2012 (r242430) @@ -69,7 +69,7 @@ initialise_months(void) continue; if (debug_sort) printf("month[%d]=%s\n", i, tmp); - len = strlen(tmp); + len = strlen((char*)tmp); if (len < 1) continue; while (isblank(*tmp)) @@ -95,13 +95,13 @@ initialise_months(void) continue; if (debug_sort) printf("month[%d]=%s\n", i, tmp); - len = strlen(tmp); + len = strlen((char*)tmp); if (len < 1) continue; while (isblank(*tmp)) ++tmp; m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); - if (mbstowcs(m, tmp, len) == ((size_t) -1)) + if (mbstowcs(m, (char*)tmp, len) == ((size_t) -1)) continue; m[len] = L'\0'; for (unsigned int j = 0; j < len; j++) @@ -421,7 +421,7 @@ bwsnocpy(struct bwstring *dst, const str * The output is ended either with '\n' (nl == true) * or '\0' (nl == false). */ -int +size_t bwsfwrite(struct bwstring *bws, FILE *f, bool zero_ended) { @@ -442,11 +442,11 @@ bwsfwrite(struct bwstring *bws, FILE *f, } else { wchar_t eols; - int printed = 0; + size_t printed = 0; eols = zero_ended ? btowc('\0') : btowc('\n'); - while (printed < (int) BWSLEN(bws)) { + while (printed < BWSLEN(bws)) { const wchar_t *s = bws->data.wstr + printed; if (*s == L'\0') { @@ -479,7 +479,7 @@ bwsfwrite(struct bwstring *bws, FILE *f, struct bwstring * bwsfgetln(FILE *f, size_t *len, bool zero_ended, struct reader_buffer *rb) { - wchar_t eols; + wint_t eols; eols = zero_ended ? btowc('\0') : btowc('\n'); @@ -494,7 +494,7 @@ bwsfgetln(FILE *f, size_t *len, bool zer return (NULL); } if (*len > 0) { - if (ret[*len - 1] == eols) + if (ret[*len - 1] == (wchar_t)eols) --(*len); } return (bwssbdup(ret, *len)); @@ -513,11 +513,9 @@ bwsfgetln(FILE *f, size_t *len, bool zer if (ret[*len - 1] == '\n') --(*len); } - return (bwscsbdup(ret, *len)); + return (bwscsbdup((unsigned char*)ret, *len)); } else { - wchar_t c = 0; - *len = 0; if (feof(f)) @@ -532,6 +530,8 @@ bwsfgetln(FILE *f, size_t *len, bool zer if (MB_CUR_MAX == 1) while (!feof(f)) { + int c; + c = fgetc(f); if (c == EOF) { @@ -553,6 +553,8 @@ bwsfgetln(FILE *f, size_t *len, bool zer } else while (!feof(f)) { + wint_t c = 0; + c = fgetwc(f); if (c == WEOF) { @@ -750,7 +752,7 @@ bwscoll(const struct bwstring *bws1, con } else if (s2[i] == 0) return (+1); - res = strcoll(s1 + i, s2 + i); + res = strcoll((const char*)(s1 + i), (const char*)(s2 + i)); if (res) return (res); @
svn commit: r241515 - head
Author: gabor Date: Sat Oct 13 19:37:58 2012 New Revision: 241515 URL: http://svn.freebsd.org/changeset/base/241515 Log: - Fix typo Spotted by: glebius Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sat Oct 13 19:29:38 2012(r241514) +++ head/UPDATING Sat Oct 13 19:37:58 2012(r241515) @@ -28,7 +28,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 The GNU sort(1) program has been removed since the BSD-licensed sort(1) has been the default for quite some time and no serious problems have been reported. The corresponding WITH_GNU_SORT - knob has als gone. + knob has also gone. 20121006: The pfil(9) API/ABI for AF_INET family has been changed. Packet ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241514 - head/share/man/man5
Author: gabor Date: Sat Oct 13 19:29:38 2012 New Revision: 241514 URL: http://svn.freebsd.org/changeset/base/241514 Log: - Regen after GNU sort removal Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Sat Oct 13 19:29:07 2012 (r241513) +++ head/share/man/man5/src.conf.5 Sat Oct 13 19:29:38 2012 (r241514) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd October 6, 2012 +.Dd October 13, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -449,9 +449,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_SORT -.\" from FreeBSD: head/tools/build/options/WITH_GNU_SORT 237629 2012-06-27 05:59:01Z gabor -Install GNU-licensed sort as 'sort' instead of BSD sort. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241513 - head/share/mk
Author: gabor Date: Sat Oct 13 19:29:07 2012 New Revision: 241513 URL: http://svn.freebsd.org/changeset/base/241513 Log: - Remove WITH_GNU_SORT support Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkSat Oct 13 18:46:46 2012(r241512) +++ head/share/mk/bsd.own.mkSat Oct 13 19:29:07 2012(r241513) @@ -428,7 +428,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CLANG_IS_CC \ CTF \ -GNU_SORT \ HESIOD \ ICONV \ IDEA \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241511 - in head: . contrib/gnu-sort gnu/usr.bin gnu/usr.bin/sort tools/build/options usr.bin/sort
Author: gabor Date: Sat Oct 13 18:40:39 2012 New Revision: 241511 URL: http://svn.freebsd.org/changeset/base/241511 Log: - Remove GNU sort and the WITH_GNU_SORT knob Deleted: head/contrib/gnu-sort/ head/gnu/usr.bin/sort/ head/tools/build/options/WITH_GNU_SORT Modified: head/UPDATING head/gnu/usr.bin/Makefile head/usr.bin/sort/Makefile Modified: head/UPDATING == --- head/UPDATING Sat Oct 13 18:24:52 2012(r241510) +++ head/UPDATING Sat Oct 13 18:40:39 2012(r241511) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121013: + The GNU sort(1) program has been removed since the BSD-licensed + sort(1) has been the default for quite some time and no serious + problems have been reported. The corresponding WITH_GNU_SORT + knob has als gone. + 20121006: The pfil(9) API/ABI for AF_INET family has been changed. Packet filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled Modified: head/gnu/usr.bin/Makefile == --- head/gnu/usr.bin/Makefile Sat Oct 13 18:24:52 2012(r241510) +++ head/gnu/usr.bin/Makefile Sat Oct 13 18:40:39 2012(r241511) @@ -17,7 +17,6 @@ SUBDIR= ${_binutils} \ ${_rcs} \ sdiff \ send-pr \ - sort \ ${_texinfo} .if ${MK_CXX} != "no" Modified: head/usr.bin/sort/Makefile == --- head/usr.bin/sort/Makefile Sat Oct 13 18:24:52 2012(r241510) +++ head/usr.bin/sort/Makefile Sat Oct 13 18:40:39 2012(r241511) @@ -2,15 +2,7 @@ .include -.if ${MK_GNU_SORT} != "yes" PROG= sort -.else -PROG= bsdsort -CLEANFILES+= bsdsort.1 - -bsdsort.1: sort.1 - cp ${.ALLSRC} ${.TARGET} -.endif SRCS= bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r240519 - in head/release/doc/fr_FR.ISO8859-1: early-adopter errata hardware/alpha hardware/common hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installa...
Author: gabor Date: Fri Sep 14 21:36:01 2012 New Revision: 240519 URL: http://svn.freebsd.org/changeset/base/240519 Log: - Fix build of French release notes with the XMLified doc tree Modified: head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml Modified: head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml == --- head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:36:01 2012(r240519) @@ -1,3 +1,14 @@ + + +%entities; + +%release; + +X"> +X"> +]> + - -%man; - - -%freebsd; - - -%authors; - - -%teams; - - -%mailing-lists; - - -%release; -X"> -X"> - -]> Modified: head/release/doc/fr_FR.ISO8859-1/errata/article.sgml == --- head/release/doc/fr_FR.ISO8859-1/errata/article.sgmlFri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/errata/article.sgmlFri Sep 14 21:36:01 2012(r240519) @@ -1,3 +1,11 @@ + + +%entities; + +%release; +]> + - -%man; - -%authors; - -%mlists; - -%release; -]> - Modified: head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml == --- head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgmlFri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgmlFri Sep 14 21:36:01 2012(r240519) @@ -1,31 +1,26 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml == --- head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml Fri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml Fri Sep 14 21:36:01 2012(r240519) @@ -833,7 +833,7 @@ Carte RAID ATA Promise SuperTrak SX6000 - + Cartes LSI Logic Fusion/MP architecture Fiber Channel (gestionnaire mpt) @@ -857,6 +857,7 @@ Tekram DC315U + Sur toutes les cartes SCSI supportées, le support total @@ -1375,7 +1376,7 @@ NetGear FA310-TX Rev. D1 - Cartes Macronix 98713, 98713A, 98715, @@ -1747,7 +1748,7 @@ ELECOM LD-PCI2T, LD-PCITS (PCI) - Corega FastEther PCI-TX (PCI) + Corega FastEther PCI-TX (PCI) Modified: head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml == --- head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:36:01 2012(r240519) @@ -1,31 +1,26 @@ - - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; §.intro; Modified: head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml == --- head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:28:56 2012(r240518) +++ head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:36:01 2012(r240519) @@ -1,30 +1,26 @@ - - - -%man; - -%authors; - -%mlists; + + +%entitie
svn commit: r240516 - in head/release/doc/de_DE.ISO8859-1: early-adopter errata hardware/alpha hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installation/common inst...
Author: gabor Date: Fri Sep 14 21:12:41 2012 New Revision: 240516 URL: http://svn.freebsd.org/changeset/base/240516 Log: - Fix build of the German release notes with the XMLified doc tree Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml == --- head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 21:12:41 2012(r240516) @@ -1,3 +1,14 @@ + + +%entities; + +%release; + +X"> +X"> +]> + - -%man; - - -%freebsd; - - -%authors; - - -%teams; - - -%mailing-lists; - - -%release; - -X"> -X"> - -]> - Hinweise für die ersten Anwender von &os; Modified: head/release/doc/de_DE.ISO8859-1/errata/article.sgml == --- head/release/doc/de_DE.ISO8859-1/errata/article.sgmlFri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/errata/article.sgmlFri Sep 14 21:12:41 2012(r240516) @@ -1,3 +1,11 @@ + + +%entities; + +%release; +]> + - -%man; - -%authors; - -%translators; - -%mlists; - -%release; -]> - Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml == --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgmlFri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgmlFri Sep 14 21:12:41 2012(r240516) @@ -1,29 +1,23 @@ - - - -%man; - -%authors; - -%translators; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml == --- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 21:12:41 2012(r240516) @@ -1,27 +1,23 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml == --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 21:12:41 2012(r240516) @@ -1,27 +1,23 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml == --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 21:12:41 2012(r240516) @@ -1,27 +1,23 @@ - - - -%man; - -%authors; - -%mlists; + + +%entities; %release; - %sections; + %sections - ]> + + &artheader; §.intro; Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml == --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml Fri Sep 14 20:51:35 2012(r240515) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc6
svn commit: r238108 - head/usr.bin/sort
Author: gabor Date: Wed Jul 4 16:25:11 2012 New Revision: 238108 URL: http://svn.freebsd.org/changeset/base/238108 Log: - Change --nthreads parameter to --parallel for GNU compatibility - Change default sort method to mergesort, which has a better worst case performance than qsort Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.1.in head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cWed Jul 4 14:25:14 2012(r238107) +++ head/usr.bin/sort/file.cWed Jul 4 16:25:11 2012(r238108) @@ -1297,7 +1297,7 @@ sort_list_to_file(struct sort_list *list } if (sort_opts_vals.sort_method == SORT_DEFAULT) - sort_opts_vals.sort_method = SORT_QSORT; + sort_opts_vals.sort_method = DEFAULT_SORT_ALGORITHM; if (debug_sort) printf("sort_method=%s\n", @@ -1314,9 +1314,12 @@ sort_list_to_file(struct sort_list *list case SORT_HEAPSORT: mt_sort(list, heapsort, outfile); break; - default: + case SORT_QSORT: mt_sort(list, sort_qsort, outfile); break; + default: + mt_sort(list, DEFAULT_SORT_FUNC, outfile); + break; } } Modified: head/usr.bin/sort/file.h == --- head/usr.bin/sort/file.hWed Jul 4 14:25:14 2012(r238107) +++ head/usr.bin/sort/file.hWed Jul 4 16:25:11 2012(r238108) @@ -39,6 +39,9 @@ #defineSORT_HEAPSORT 3 #defineSORT_RADIXSORT 4 +#define DEFAULT_SORT_ALGORITHM SORT_HEAPSORT +#define DEFAULT_SORT_FUNC heapsort + /* * List of data to be sorted. */ Modified: head/usr.bin/sort/radixsort.c == --- head/usr.bin/sort/radixsort.c Wed Jul 4 14:25:14 2012 (r238107) +++ head/usr.bin/sort/radixsort.c Wed Jul 4 16:25:11 2012 (r238108) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "radixsort.h" +#define DEFAULT_SORT_FUNC_RADIXSORT mergesort + #define TINY_NODE(sl) ((sl)->tosort_num < 65) #define SMALL_NODE(sl) ((sl)->tosort_num < 5) @@ -349,7 +351,7 @@ run_sort_level_next(struct sort_level *s /* NOTREACHED */ err(2, "Radix sort error 3"); } else - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) func); @@ -389,12 +391,12 @@ run_sort_level_next(struct sort_level *s sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } else { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } } else if (!sort_opts_vals.sflag && sort_opts_vals.complex_sort) { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll_by_str_only); } @@ -541,12 +543,12 @@ run_top_sort_level(struct sort_level *sl sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } else { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll); } } else if (!sort_opts_vals.sflag && sort_opts_vals.complex_sort) { - qsort(sl->leaves, sl->leaves_num, + DEFAULT_SORT_FUNC_RADIXSORT(sl->leaves, sl->leaves_num, sizeof(struct sort_list_item *), (int(*)(const void *, const void *)) list_coll_by_str_only); } Modified: head/usr.bin/sort/sort.1.in
svn commit: r237696 - head
Author: gabor Date: Thu Jun 28 08:22:00 2012 New Revision: 237696 URL: http://svn.freebsd.org/changeset/base/237696 Log: - Add UPDATING entry for BSD sort Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Thu Jun 28 07:37:46 2012(r237695) +++ head/UPDATING Thu Jun 28 08:22:00 2012(r237696) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120628: + The sort utility has been replaced with BSD sort. For now, GNU sort + is also available as "gnusort" or the default can be set back to + GNU sort by setting WITH_GNU_SORT. In this case, BSD sort will be + installed as "bsdsort". + 20120611: A new version of ZFS (pool version 5000) has been merged to -HEAD. Starting with this version the old system of ZFS pool versioning ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r237628 - head/usr.bin/sort
On 2012.06.27. 8:48, Eitan Adler wrote: >Log: > - Disable threaded sort by default Curious, why? We just want to test it a bit more before we enable it. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237631 - head/sys/sys
Author: gabor Date: Wed Jun 27 06:08:02 2012 New Revision: 237631 URL: http://svn.freebsd.org/changeset/base/237631 Log: - Bump __FreeBSD_version: default sort is BSD sort Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hWed Jun 27 06:00:58 2012(r237630) +++ head/sys/sys/param.hWed Jun 27 06:08:02 2012(r237631) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 113 /* Master, propagated to newvers */ +#define __FreeBSD_version 114 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237630 - head/share/man/man5
Author: gabor Date: Wed Jun 27 06:00:58 2012 New Revision: 237630 URL: http://svn.freebsd.org/changeset/base/237630 Log: - Regen after BSD sort change Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Jun 27 05:59:01 2012 (r237629) +++ head/share/man/man5/src.conf.5 Wed Jun 27 06:00:58 2012 (r237630) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd May 29, 2012 +.Dd June 27, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -227,9 +227,6 @@ Set to not build the BSD licensed versio .It Va WITH_BSD_GREP .\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 73 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. -.It Va WITH_BSD_SORT -.\" from FreeBSD: head/tools/build/options/WITH_BSD_SORT 235268 2012-05-11 12:47:21Z gabor -Install BSD-licensed sort as 'sort' instead of GNU sort. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -440,6 +437,9 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El +.It Va WITH_GNU_SORT +.\" from FreeBSD: head/tools/build/options/WITH_GNU_SORT 237629 2012-06-27 05:59:01Z gabor +Install GNU-licensed sort as 'sort' instead of BSD sort. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237629 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin/sort
Author: gabor Date: Wed Jun 27 05:59:01 2012 New Revision: 237629 URL: http://svn.freebsd.org/changeset/base/237629 Log: - Switch to BSD sort as default sort. GNU sort will still be installed as "gnusort". Most of the BSD sort development work was done by Oleg Moskalenko . - GNU grep can be set to default by setting WITH_GNU_GREP. It will cause BSD sort to be installed as "bsdsort". Portbuild tested by:linimon Added: head/tools/build/options/WITH_GNU_SORT (contents, props changed) Deleted: head/tools/build/options/WITH_BSD_SORT Modified: head/gnu/usr.bin/sort/Makefile head/share/mk/bsd.own.mk head/usr.bin/sort/Makefile Modified: head/gnu/usr.bin/sort/Makefile == --- head/gnu/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012 (r237628) +++ head/gnu/usr.bin/sort/Makefile Wed Jun 27 05:59:01 2012 (r237629) @@ -5,7 +5,7 @@ SORTDIR= ${.CURDIR}/../../../contrib/gnu .include -.if ${MK_BSD_SORT} != "yes" +.if ${MK_GNU_SORT} == "yes" PROG= sort .else PROG= gnusort Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkWed Jun 27 05:50:15 2012(r237628) +++ head/share/mk/bsd.own.mkWed Jun 27 05:59:01 2012(r237629) @@ -415,7 +415,6 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ -BSD_SORT \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ @@ -424,6 +423,7 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CLANG_IS_CC \ CTF \ +GNU_SORT \ HESIOD \ ICONV \ IDEA \ Added: head/tools/build/options/WITH_GNU_SORT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GNU_SORT Wed Jun 27 05:59:01 2012 (r237629) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install GNU-licensed sort as 'sort' instead of BSD sort. Modified: head/usr.bin/sort/Makefile == --- head/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012(r237628) +++ head/usr.bin/sort/Makefile Wed Jun 27 05:59:01 2012(r237629) @@ -2,7 +2,7 @@ .include -.if ${MK_BSD_SORT} == "yes" +.if ${MK_GNU_SORT} != "yes" PROG= sort .else PROG= bsdsort ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r237628 - head/usr.bin/sort
Author: gabor Date: Wed Jun 27 05:50:15 2012 New Revision: 237628 URL: http://svn.freebsd.org/changeset/base/237628 Log: - Disable threaded sort by default - Fix typo in the NLS support Modified: head/usr.bin/sort/Makefile Modified: head/usr.bin/sort/Makefile == --- head/usr.bin/sort/Makefile Wed Jun 27 05:38:39 2012(r237627) +++ head/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012(r237628) @@ -21,7 +21,7 @@ sort.1: sort.1.in CLEANFILES+= sort.1 -.if !defined(WITHOUT_THREADS) +.if defined(WITH_THREADS) CFLAGS+= -DSORT_THREADS LDFLAGS+= -lpthread -lmd MAN_SUB+= -e 's|%%THREADS%%||g' @@ -39,7 +39,7 @@ NLSSRCDIR_${lang}= ${.CURDIR}/nls .endfor .else CFLAGS+= -DWITHOUT_NLS -MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +MAN_SUB+= -e 's|%%NLS%%|\.\\"|g' .endif .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236764 - head/usr.bin/sort
Author: gabor Date: Fri Jun 8 19:21:49 2012 New Revision: 236764 URL: http://svn.freebsd.org/changeset/base/236764 Log: - Remove the UNUSED_ARG macro and use __unused in argument lists Reviewed by: dim MFC after:3 days Modified: head/usr.bin/sort/coll.c head/usr.bin/sort/sort.h Modified: head/usr.bin/sort/coll.c == --- head/usr.bin/sort/coll.cFri Jun 8 18:44:54 2012(r236763) +++ head/usr.bin/sort/coll.cFri Jun 8 19:21:49 2012(r236764) @@ -792,7 +792,8 @@ cmpsuffix(unsigned char si1, unsigned ch * Implements numeric sort for -n and -h. */ static int -numcoll_impl(struct key_value *kv1, struct key_value *kv2, size_t offset, bool use_suffix) +numcoll_impl(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused, bool use_suffix) { struct bwstring *s1, *s2; wchar_t sfrac1[MAX_NUM_SIZE + 1], sfrac2[MAX_NUM_SIZE + 1]; @@ -810,8 +811,6 @@ numcoll_impl(struct key_value *kv1, stru cmp_res = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, s1, "; k1=<", ">"); bwsprintf(stdout, s2, ", k2=<", ">"); @@ -968,14 +967,13 @@ hnumcoll(struct key_value *kv1, struct k * Implements random sort (-R). */ static int -randomcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +randomcoll(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused) { struct bwstring *s1, *s2; MD5_CTX ctx1, ctx2; char *b1, *b2; - UNUSED_ARG(offset); - s1 = kv1->k; s2 = kv2->k; @@ -1022,12 +1020,11 @@ randomcoll(struct key_value *kv1, struct * Implements version sort (-V). */ static int -versioncoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +versioncoll(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused) { struct bwstring *s1, *s2; - UNUSED_ARG(offset); - s1 = kv1->k; s2 = kv2->k; @@ -1098,7 +1095,8 @@ cmp_nans(double d1, double d2) * Implements general numeric sort (-g). */ static int -gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +gnumcoll(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused) { double d1, d2; int err1, err2; @@ -1108,8 +1106,6 @@ gnumcoll(struct key_value *kv1, struct k err1 = err2 = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, kv1->k, "; k1=<", ">"); bwsprintf(stdout, kv2->k, "; k2=<", ">"); @@ -1256,7 +1252,7 @@ gnumcoll(struct key_value *kv1, struct k * Implements month sort (-M). */ static int -monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused) { int val1, val2; bool key1_read, key2_read; @@ -1264,8 +1260,6 @@ monthcoll(struct key_value *kv1, struct val1 = val2 = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, kv1->k, "; k1=<", ">"); bwsprintf(stdout, kv2->k, "; k2=<", ">"); Modified: head/usr.bin/sort/sort.h == --- head/usr.bin/sort/sort.hFri Jun 8 18:44:54 2012(r236763) +++ head/usr.bin/sort/sort.hFri Jun 8 19:21:49 2012(r236764) @@ -41,8 +41,6 @@ #defineVERSION "2.3-FreeBSD" -#defineUNUSED_ARG(A) do { (void)(A); } while(0) - #ifdef WITHOUT_NLS #definegetstr(n)nlsstr[n] #else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r236759 - head/usr.bin/sort
On 2012.06.08. 19:08, Dimitry Andric wrote: In usr.bin/sort, use another method of silencing warnings about unused arguments, which does not trigger self-assignment warnings in certain circumstances (for example, using clang with ccache). MFC after: 3 days Modified: head/usr.bin/sort/sort.h Modified: head/usr.bin/sort/sort.h == --- head/usr.bin/sort/sort.hFri Jun 8 16:16:03 2012(r236758) +++ head/usr.bin/sort/sort.hFri Jun 8 17:08:27 2012(r236759) @@ -41,7 +41,7 @@ #define VERSION "2.3-FreeBSD" -#define UNUSED_ARG(A) do { A=A; } while(0) +#defineUNUSED_ARG(A) do { (void)(A); } while(0) My fault, I should have fixed this. But what about this version? I think it is more elegant and this is how it should have been done initially: Index: coll.c === --- coll.c (revision 236759) +++ coll.c (working copy) @@ -792,7 +792,8 @@ * Implements numeric sort for -n and -h. */ static int -numcoll_impl(struct key_value *kv1, struct key_value *kv2, size_t offset, bool use_suffix) +numcoll_impl(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused, bool use_suffix) { struct bwstring *s1, *s2; wchar_t sfrac1[MAX_NUM_SIZE + 1], sfrac2[MAX_NUM_SIZE + 1]; @@ -810,8 +811,6 @@ cmp_res = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, s1, "; k1=<", ">"); bwsprintf(stdout, s2, ", k2=<", ">"); @@ -968,14 +967,13 @@ * Implements random sort (-R). */ static int -randomcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +randomcoll(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused) { struct bwstring *s1, *s2; MD5_CTX ctx1, ctx2; char *b1, *b2; - UNUSED_ARG(offset); - s1 = kv1->k; s2 = kv2->k; @@ -1022,12 +1020,11 @@ * Implements version sort (-V). */ static int -versioncoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +versioncoll(struct key_value *kv1, struct key_value *kv2, +size_t offset __unused) { struct bwstring *s1, *s2; - UNUSED_ARG(offset); - s1 = kv1->k; s2 = kv2->k; @@ -1098,7 +1095,7 @@ * Implements general numeric sort (-g). */ static int -gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +gnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused) { double d1, d2; int err1, err2; @@ -1108,8 +1105,6 @@ err1 = err2 = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, kv1->k, "; k1=<", ">"); bwsprintf(stdout, kv2->k, "; k2=<", ">"); @@ -1256,7 +1251,7 @@ * Implements month sort (-M). */ static int -monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) +monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused) { int val1, val2; bool key1_read, key2_read; @@ -1264,8 +1259,6 @@ val1 = val2 = 0; key1_read = key2_read = false; - UNUSED_ARG(offset); - if (debug_sort) { bwsprintf(stdout, kv1->k, "; k1=<", ">"); bwsprintf(stdout, kv2->k, "; k2=<", ">"); Index: sort.h === --- sort.h (revision 236759) +++ sort.h (working copy) @@ -41,8 +41,6 @@ #defineVERSION "2.3-FreeBSD" -#defineUNUSED_ARG(A) do { (void)(A); } while(0) - #ifdef WITHOUT_NLS #definegetstr(n)nlsstr[n] #else Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236185 - head/lib/libkiconv
Author: gabor Date: Mon May 28 14:45:12 2012 New Revision: 236185 URL: http://svn.freebsd.org/changeset/base/236185 Log: - Include forgotten bsd.own.mk and fix condition Reported by: Jan Beich Modified: head/lib/libkiconv/Makefile Modified: head/lib/libkiconv/Makefile == --- head/lib/libkiconv/Makefile Mon May 28 14:33:15 2012(r236184) +++ head/lib/libkiconv/Makefile Mon May 28 14:45:12 2012(r236185) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= kiconv SHLIBDIR?= /lib SRCS= kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c @@ -17,7 +19,7 @@ CFLAGS+= -I${.CURDIR}/../../sys WARNS?=1 -.if !defined(MK_ICONV) +.if ${MK_ICONV} == "no" CFLAGS+= -DICONV_DLOPEN .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r236028 - head/lib/libkiconv
Author: gabor Date: Fri May 25 22:07:13 2012 New Revision: 236028 URL: http://svn.freebsd.org/changeset/base/236028 Log: - Add support for BSD iconv when it is build into libc PR: bin/162670 Submitted by: Jan Beich MFC after:2 weeks Modified: head/lib/libkiconv/Makefile head/lib/libkiconv/xlat16_iconv.c Modified: head/lib/libkiconv/Makefile == --- head/lib/libkiconv/Makefile Fri May 25 21:52:57 2012(r236027) +++ head/lib/libkiconv/Makefile Fri May 25 22:07:13 2012(r236028) @@ -17,4 +17,8 @@ CFLAGS+= -I${.CURDIR}/../../sys WARNS?=1 +.if !defined(MK_ICONV) +CFLAGS+= -DICONV_DLOPEN +.endif + .include Modified: head/lib/libkiconv/xlat16_iconv.c == --- head/lib/libkiconv/xlat16_iconv.c Fri May 25 21:52:57 2012 (r236027) +++ head/lib/libkiconv/xlat16_iconv.c Fri May 25 22:07:13 2012 (r236028) @@ -60,10 +60,18 @@ struct xlat16_table { static struct xlat16_table kiconv_xlat16_open(const char *, const char *, int); static int chklocale(int, const char *); +#ifdef ICONV_DLOPEN static int my_iconv_init(void); static iconv_t (*my_iconv_open)(const char *, const char *); static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); static int (*my_iconv_close)(iconv_t); +#else +#include +#define my_iconv_init() 0 +#define my_iconv_open iconv_open +#define my_iconv iconv +#define my_iconv_close iconv_close +#endif static size_t my_iconv_char(iconv_t, const u_char **, size_t *, u_char **, size_t *); int @@ -310,6 +318,7 @@ chklocale(int category, const char *code return (error); } +#ifdef ICONV_DLOPEN static int my_iconv_init(void) { @@ -327,6 +336,7 @@ my_iconv_init(void) return (0); } +#endif static size_t my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235987 - head/usr.bin/sort
Author: gabor Date: Fri May 25 09:30:16 2012 New Revision: 235987 URL: http://svn.freebsd.org/changeset/base/235987 Log: - Only use multi-threading for large files - Do not use mmap() by default; it can be enabled by --mmap - Add some minor optimizations for -u - Update manual page according to the changes Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.1.in head/usr.bin/sort/sort.c head/usr.bin/sort/sort.h Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cFri May 25 09:27:16 2012 (r235986) +++ head/usr.bin/sort/bwstring.cFri May 25 09:30:16 2012 (r235987) @@ -499,6 +499,22 @@ bwsfgetln(FILE *f, size_t *len, bool zer } return (bwssbdup(ret, *len)); + } else if (!zero_ended && (MB_CUR_MAX == 1)) { + char *ret; + + ret = fgetln(f, len); + + if (ret == NULL) { + if (!feof(f)) + err(2, NULL); + return (NULL); + } + if (*len > 0) { + if (ret[*len - 1] == '\n') + --(*len); + } + return (bwscsbdup(ret, *len)); + } else { wchar_t c = 0; Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cFri May 25 09:27:16 2012(r235986) +++ head/usr.bin/sort/file.cFri May 25 09:30:16 2012(r235987) @@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$"); unsigned long long free_memory = 100; unsigned long long available_free_memory = 100; +bool use_mmap; + const char *tmpdir = "/var/tmp"; const char *compress_program; @@ -404,23 +406,21 @@ sort_list_dump(struct sort_list *l, cons err(2, NULL); if (l->list) { - struct sort_list_item *last_printed_item; size_t i; - - last_printed_item = NULL; - - for (i = 0; i < l->count; i++) { - struct sort_list_item *item; - - item = l->list[i]; - - if (!(sort_opts_vals.uflag) || - (last_printed_item == NULL) || - list_coll(&last_printed_item, &item)) { - bwsfwrite(item->str, f, + if (!(sort_opts_vals.uflag)) { + for (i = 0; i < l->count; ++i) + bwsfwrite(l->list[i]->str, f, sort_opts_vals.zflag); - if (sort_opts_vals.uflag) + } else { + struct sort_list_item *last_printed_item = NULL; + struct sort_list_item *item; + for (i = 0; i < l->count; ++i) { + item = l->list[i]; + if ((last_printed_item == NULL) || + list_coll(&last_printed_item, &item)) { + bwsfwrite(item->str, f, sort_opts_vals.zflag); last_printed_item = item; + } } } } @@ -657,7 +657,7 @@ file_reader_init(const char *fsrc) ret->fname = sort_strdup(fsrc); - if (strcmp(fsrc, "-") && (compress_program == NULL)) { + if (strcmp(fsrc, "-") && (compress_program == NULL) && use_mmap) { do { struct stat stat_buf; @@ -1539,7 +1539,9 @@ mt_sort(struct sort_list *list, const char* fn) { #if defined(SORT_THREADS) - if (nthreads < 2 || list->count < nthreads) { + if (nthreads < 2 || list->count < MT_SORT_THRESHOLD) { + size_t nthreads_save = nthreads; + nthreads = 1; #endif /* if single thread or small data, do simple sort */ sort_func(list->list, list->count, @@ -1547,6 +1549,7 @@ mt_sort(struct sort_list *list, (int(*)(const void *, const void *)) list_coll); sort_list_dump(list, fn); #if defined(SORT_THREADS) + nthreads = nthreads_save; } else { /* multi-threaded sort */ struct sort_list **parts; @@ -1590,7 +1593,18 @@ mt_sort(struct sort_list *list, pthread_attr_init(&attr);
Re: svn commit: r235723 - in head: contrib/byacc tools/regression/usr.bin/yacc usr.bin/yacc usr.bin/yacc/test
On 2012.05.22. 17:03, Dimitry Andric wrote: ... > I mentioned it in a private email, but the issue is that the yacc >used during the build seems to be coming from the base system (despite >the fact that it's a bootstrap tool). Once I installed yacc onto my >stable-9 system at work, all of the changes that should have been >checked in with this commit became apparent. >Thanks, >-Garrett > >1022 .if ${BOOTSTRAPPING} < 96 Yes, Dag-Erling mentioned he will fix this particular test for head, which needs a version bump. Maybe I'm missing some point but what if we always use yacc and lex from the source tree instead of from the base system? That would be the most logical way of doing this and whether they are built early or just in the world phase does not make that much difference, does it? Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235546 - head/usr.bin/sort
Author: gabor Date: Thu May 17 13:08:30 2012 New Revision: 235546 URL: http://svn.freebsd.org/changeset/base/235546 Log: - Fix -o option that was broken by my clang compile fix Submitted by: Oleg Moskalenko Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cThu May 17 11:53:38 2012(r235545) +++ head/usr.bin/sort/sort.cThu May 17 13:08:30 2012(r235546) @@ -1049,9 +1049,8 @@ main(int argc, char **argv) sort_opts_vals.mflag = true; break; case 'o': - outfile = sort_realloc(outfile, sizeof(char) * - (strlen(optarg) + 1)); - strlcpy(outfile, optarg, strlen(outfile)); + outfile = sort_realloc(outfile, (strlen(optarg) + 1)); + strcpy(outfile, optarg); break; case 's': sort_opts_vals.sflag = true; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235435 - head/usr.bin/sort
Author: gabor Date: Mon May 14 10:06:49 2012 New Revision: 235435 URL: http://svn.freebsd.org/changeset/base/235435 Log: - Eliminate initializations if global variables. Compilers are not required to optimize these so it may result in larger binary size. Pointed out by: kib Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/bwstring.c == --- head/usr.bin/sort/bwstring.cMon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/bwstring.cMon May 14 10:06:49 2012 (r235435) @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include "bwstring.h" #include "sort.h" -bool byte_sort = false; +bool byte_sort; -static wchar_t **wmonths = NULL; -static unsigned char **cmonths = NULL; +static wchar_t **wmonths; +static unsigned char **cmonths; /* initialise months */ Modified: head/usr.bin/sort/coll.c == --- head/usr.bin/sort/coll.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/coll.cMon May 14 10:06:49 2012(r235435) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "coll.h" #include "vsort.h" -struct key_specs *keys = NULL; +struct key_specs *keys; size_t keys_num = 0; wchar_t symbol_decimal_point = L'.'; Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/file.cMon May 14 10:06:49 2012(r235435) @@ -54,7 +54,7 @@ unsigned long long free_memory = 100 unsigned long long available_free_memory = 100; const char *tmpdir = "/var/tmp"; -const char* compress_program = NULL; +const char *compress_program; size_t max_open_files = 16; Modified: head/usr.bin/sort/radixsort.c == --- head/usr.bin/sort/radixsort.c Mon May 14 09:55:23 2012 (r235434) +++ head/usr.bin/sort/radixsort.c Mon May 14 10:06:49 2012 (r235435) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define SMALL_NODE(sl) ((sl)->tosort_num < 5) /* are we sorting in reverse order ? */ -static bool reverse_sort = false; +static bool reverse_sort; /* sort sub-levels array size */ static const size_t slsz = 256 * sizeof(struct sort_level*); @@ -77,14 +77,14 @@ struct level_stack { struct sort_level*sl; }; -static struct level_stack *g_ls = NULL; +static struct level_stack *g_ls; #if defined(SORT_THREADS) /* stack guarding mutex */ static pthread_mutex_t g_ls_mutex; /* counter: how many items are left */ -static size_t sort_left = 0; +static size_t sort_left; /* guarding mutex */ static pthread_mutex_t sort_left_mutex; Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cMon May 14 09:55:23 2012(r235434) +++ head/usr.bin/sort/sort.cMon May 14 10:06:49 2012(r235435) @@ -62,10 +62,10 @@ nl_catd catalog; #define DEFAULT_RANDOM_SORT_SEED_FILE ("/dev/random") #define MAX_DEFAULT_RANDOM_SEED_DATA_SIZE (1024) -static bool need_random = false; -static const char* random_source = DEFAULT_RANDOM_SORT_SEED_FILE; -static const void* random_seed = NULL; -static size_t random_seed_size = 0; +static bool need_random; +static const char *random_source = DEFAULT_RANDOM_SORT_SEED_FILE; +static const void *random_seed; +static size_t random_seed_size; MD5_CTX md5_ctx; @@ -98,26 +98,26 @@ const char *nlsstr[] = { "", struct sort_opts sort_opts_vals; -bool debug_sort = false; -bool need_hint = false; +bool debug_sort; +bool need_hint; #if defined(SORT_THREADS) size_t ncpu = 1; size_t nthreads = 1; #endif -static bool gnusort_numeric_compatibility = false; +static bool gnusort_numeric_compatibility; static struct sort_mods default_sort_mods_object; struct sort_mods * const default_sort_mods = &default_sort_mods_object; -static bool print_symbols_on_debug = false; +static bool print_symbols_on_debug; /* * Arguments from file (when file0-from option is used: */ static int argc_from_file0 = -1; -static char **argv_from_file0 = NULL; +static char **argv_from_file0; /* * Placeholder symbols for options which have no single-character equivalent ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235434 - head/usr.bin/sort/nls
Author: gabor Date: Mon May 14 09:55:23 2012 New Revision: 235434 URL: http://svn.freebsd.org/changeset/base/235434 Log: - Update catalogs Modified: head/usr.bin/sort/nls/C.msg head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Modified: head/usr.bin/sort/nls/C.msg == --- head/usr.bin/sort/nls/C.msg Mon May 14 09:54:16 2012(r235433) +++ head/usr.bin/sort/nls/C.msg Mon May 14 09:55:23 2012(r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "you cannot use -%c and -%c together" +1 "mutually exclusive flags" 2 "extra argument not allowed with -c" -3 "Unknown feature: %s\n" +3 "Unknown feature" 4 "Wrong memory buffer specification" -5 "0 field in key specs\n" -6 "0 column in key specs\n" +5 "0 field in key specs" +6 "0 column in key specs" +7 "Wrong file mode" +8 "Cannot open file for reading" +9 "Radix sort cannot be used with these sort options" +10 "The chosen sort method cannot be used with stable and/or unique sort" +11 "Invalid key position" +12 "Usage: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S memsize] [-T tmpdir] [-t separator] [-o outfile] [--batch-size size] [--files0-from file] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads thread_no] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source file]] [--compress-program program] [file ...]\n" Modified: head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg == --- head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:54:16 2012 (r235433) +++ head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg Mon May 14 09:55:23 2012 (r235434) @@ -2,9 +2,15 @@ $ $FreeBSD$ $ $set 1 $quote " -1 "a -%c �s -%c opci�k nem haszn�lhat�k egy�tt" +1 "egym�st kiz�r� opci�k" 2 "extra argumentum a -%c opci�val" -3 "Ismeretlen funkci�: %s\n" +3 "Ismeretlen funkci�\n" 4 "Rossz mem�ria puffer �rt�k" 5 "0 mez� a kulcsspecifik�ci�ban\n" 6 "0 oszlop a kulcsspecifik�ci�ban\n" +7 "Helytelen f�jl m�d" +8 "A f�jl nem nyithat� meg olvas�sra" +9 "A radix rendez�s nem haszn�lhat� a megadott rendez�si opci�kkal" +10 "A v�lasztott rendez�si m�d nem haszn�lhat� a --stable �s --unique opci�kkal" +11 "�rv�nytelen kulcs poz�ci�" +12 "Haszn�lat: %s [-bcCdfigMmnrsuz] [-kPOS1[,POS2] ... ] [+POS1 [-POS2]] [-S mem�riam�ret] [-T ideiglenes_k�nyvt�r] [-t elv�laszt�] [-o kimeneti_f�jl] [--batch-size m�ret] [--files0-from f�jl] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads sz�lak_sz�ma] [--human-numeric-sort] [--version-sort] [--random-sort [--random-source f�jl]] [--compress-program program] [f�jl ...]\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235432 - head/usr.bin/sort
Author: gabor Date: Mon May 14 09:53:54 2012 New Revision: 235432 URL: http://svn.freebsd.org/changeset/base/235432 Log: - Fix build with clang Modified: head/usr.bin/sort/file.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c == --- head/usr.bin/sort/file.cMon May 14 09:51:43 2012(r235431) +++ head/usr.bin/sort/file.cMon May 14 09:53:54 2012(r235432) @@ -598,7 +598,7 @@ openfile(const char *fn, const char *mod snprintf(cmd, cmdsz - 1, "%s > %s", compress_program, fn); else - err(2, getstr(7)); + err(2, "%s", getstr(7)); if ((file = popen(cmd, mode)) == NULL) err(2, NULL); @@ -939,7 +939,7 @@ file_header_init(struct file_header **fh (*fh)->fr = file_reader_init(fn); if ((*fh)->fr == NULL) { perror(fn); - err(2, getstr(8)); + err(2, "%s", getstr(8)); } line = file_reader_readline((*fh)->fr); if (line == NULL) { @@ -1276,7 +1276,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_RADIXSORT; } else if (sort_opts_vals.sort_method == SORT_RADIXSORT) - err(2, getstr(9)); + err(2, "%s", getstr(9)); /* * to handle stable sort and the unique cases in the @@ -1292,7 +1292,7 @@ sort_list_to_file(struct sort_list *list sort_opts_vals.sort_method = SORT_MERGESORT; break; default: - errx(2, getstr(10)); + errx(2, "%s", getstr(10)); }; } Modified: head/usr.bin/sort/sort.c == --- head/usr.bin/sort/sort.cMon May 14 09:51:43 2012(r235431) +++ head/usr.bin/sort/sort.cMon May 14 09:53:54 2012(r235432) @@ -74,9 +74,9 @@ MD5_CTX md5_ctx; * is found. */ const char *nlsstr[] = { "", -/* 1*/"you cannot use -%c and -%c together", +/* 1*/"mutually exclusive flags", /* 2*/"extra argument not allowed with -c", -/* 3*/"Unknown feature: %s", +/* 3*/"Unknown feature", /* 4*/"Wrong memory buffer specification", /* 5*/"0 field in key specs", /* 6*/"0 column in key specs", @@ -396,7 +396,7 @@ parse_memory_buffer_value(const char *va membuf = strtoll(value, &endptr, 10); if (errno != 0) { - warn(getstr(4)); + warn("%s",getstr(4)); membuf = available_free_memory; } else { switch (*endptr){ @@ -445,12 +445,10 @@ parse_memory_buffer_value(const char *va * Signal handler that clears the temporary files. */ static void -sig_handler(int sig, siginfo_t *siginfo, void *context) +sig_handler(int sig __unused, siginfo_t *siginfo __unused, +void *context __unused) { - sig = sig; - siginfo = siginfo; - context = context; clear_tmp_files(); exit(-1); } @@ -512,7 +510,7 @@ static void unknown(const char *what) { - errx(2, getstr(3), what); + errx(2, "%s: %s", getstr(3), what); } /* @@ -533,14 +531,13 @@ check_mutually_exclusive_flags(char c, b if (mec != c) { if (mef_flags[i]) { if (found_this) - errx(1, getstr(1), c, mec); + errx(1, "%c:%c: %s", c, mec, getstr(1)); found_others = true; fo_index = i; } } else { if (found_others) - errx(1, getstr(1), c, - mutually_exclusive_flags[fo_index]); + errx(1, "%c:%c: %s", c, mutually_exclusive_flags[fo_index], getstr(1)); mef_flags[i] = true; found_this = true; } @@ -661,7 +658,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f2 == 0) { - warn(getstr(5)); + warn("%s",getstr(5)); goto end; } } else { @@ -670,7 +667,7 @@ parse_pos(const char *s, struct key_spec if (errno != 0) errx(2, "%s: -k", strerror(errno)); if (ks->f1 == 0) { - warn(getstr(5)); + warn("%s",getstr(5
Re: svn commit: r235267 - in head/usr.bin/sort: . nls
On 2012.05.11. 15:02, Colin Percival wrote: On 05/11/12 05:48, Konstantin Belousov wrote: >On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>+bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >>unsigned char **cmonths = NULL; > >Such initializations are useless. You only increase the size of the binary >on the disk as the consequence. I just tested this hypothesis, and found no change in binary size using either clang or gcc46. Presumably they're smart enough to ignore explicit (and unnecessary) initializations of statics to zero. Thanks Colin and thanks Konstantin for raising this doubt. I will clean these up later for better style, anyway. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235269 - head/share/man/man5
Author: gabor Date: Fri May 11 13:03:52 2012 New Revision: 235269 URL: http://svn.freebsd.org/changeset/base/235269 Log: - Regen Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri May 11 12:47:21 2012 (r235268) +++ head/share/man/man5/src.conf.5 Fri May 11 13:03:52 2012 (r235269) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd April 29, 2012 +.Dd May 11, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -227,6 +227,9 @@ Set to not build the BSD licensed versio .It Va WITH_BSD_GREP .\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 73 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. +.It Va WITH_BSD_SORT +.\" from FreeBSD: head/tools/build/options/WITH_BSD_SORT 235268 2012-05-11 12:47:21Z gabor +Install BSD-licensed sort as 'sort' instead of GNU sort. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -270,7 +273,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and sparc64/sparc64. +arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -284,7 +287,7 @@ When set, it also enforces the following Set to build the Clang C/C++ compiler. .Pp It is a default setting on -amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc64. +amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_CLANG_EXTRAS .\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235268 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin
Author: gabor Date: Fri May 11 12:47:21 2012 New Revision: 235268 URL: http://svn.freebsd.org/changeset/base/235268 Log: - Hook up BSD sort to the build. By default, it will be installed as "bsdsort" and GNU sort will be the default "sort". When WITH_BSD_SORT is set, BSD sort will be the default "sort" and GNU sort will be installed as "gnusort". Added: head/tools/build/options/WITH_BSD_SORT (contents, props changed) Modified: head/gnu/usr.bin/sort/Makefile head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/gnu/usr.bin/sort/Makefile == --- head/gnu/usr.bin/sort/Makefile Fri May 11 12:37:16 2012 (r235267) +++ head/gnu/usr.bin/sort/Makefile Fri May 11 12:47:21 2012 (r235268) @@ -3,7 +3,18 @@ SORTDIR= ${.CURDIR}/../../../contrib/gnu-sort .PATH: ${SORTDIR}/lib ${SORTDIR}/src ${SORTDIR}/man +.include + +.if ${MK_BSD_SORT} != "yes" PROG= sort +.else +PROG= gnusort + +CLEANFILES+= gnusort.1 +gnusort.1: sort.1 + cp ${.ALLSRC} ${.TARGET} +.endif + SRCS= sort.c \ __fpending.c \ argmatch.c \ Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkFri May 11 12:37:16 2012(r235267) +++ head/share/mk/bsd.own.mkFri May 11 12:47:21 2012(r235268) @@ -413,6 +413,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ +BSD_SORT \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ Added: head/tools/build/options/WITH_BSD_SORT == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BSD_SORT Fri May 11 12:47:21 2012 (r235268) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install BSD-licensed sort as 'sort' instead of GNU sort. Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Fri May 11 12:37:16 2012(r235267) +++ head/usr.bin/Makefile Fri May 11 12:47:21 2012(r235268) @@ -141,6 +141,7 @@ SUBDIR= alias \ shar \ showmount \ sockstat \ + sort \ split \ stat \ stdbuf \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235267 - in head/usr.bin/sort: . nls
Author: gabor Date: Fri May 11 12:37:16 2012 New Revision: 235267 URL: http://svn.freebsd.org/changeset/base/235267 Log: Add a BSD-licensed sort rewrite that was started by me and later completed with the major functionality and optimizations by Oleg Moskalenko. It is compatible with the latest version of POSIX and the current GNU sort version that we have in base. Beside this, it implements all the functionality introduced in later versions of GNU sort. For now, it will be installed as "bsdsort", keeping GNU sort as the default sort implementation. Added: head/usr.bin/sort/ head/usr.bin/sort/Makefile (contents, props changed) head/usr.bin/sort/bwstring.c (contents, props changed) head/usr.bin/sort/bwstring.h (contents, props changed) head/usr.bin/sort/coll.c (contents, props changed) head/usr.bin/sort/coll.h (contents, props changed) head/usr.bin/sort/file.c (contents, props changed) head/usr.bin/sort/file.h (contents, props changed) head/usr.bin/sort/mem.c (contents, props changed) head/usr.bin/sort/mem.h (contents, props changed) head/usr.bin/sort/nls/ head/usr.bin/sort/nls/C.msg (contents, props changed) head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg (contents, props changed) head/usr.bin/sort/radixsort.c (contents, props changed) head/usr.bin/sort/radixsort.h (contents, props changed) head/usr.bin/sort/sort.1.in (contents, props changed) head/usr.bin/sort/sort.c (contents, props changed) head/usr.bin/sort/sort.h (contents, props changed) head/usr.bin/sort/vsort.c (contents, props changed) head/usr.bin/sort/vsort.h (contents, props changed) Added: head/usr.bin/sort/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sort/Makefile Fri May 11 12:37:16 2012(r235267) @@ -0,0 +1,45 @@ +# $FreeBSD$ + +.include + +.if ${MK_BSD_SORT} == "yes" +PROG= sort +.else +PROG= bsdsort +CLEANFILES+= bsdsort.1 + +bsdsort.1: sort.1 + cp ${.ALLSRC} ${.TARGET} +.endif + +SRCS= bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c + +WARNS= 6 + +sort.1: sort.1.in + /usr/bin/sed ${MAN_SUB} ${.ALLSRC} >${.TARGET} + +CLEANFILES+= sort.1 + +.if !defined(WITHOUT_THREADS) +CFLAGS+= -DSORT_THREADS +LDFLAGS+= -lpthread -lmd +MAN_SUB+= -e 's|%%THREADS%%||g' +.else +LDFLAGS+= -lmd +MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +.endif + +.if !defined(WITHOUT_NLS) +NLS+= hu_HU.ISO8859-2 +NLSSRCFILES= ${NLS:S@$@.msg@} +MAN_SUB+= -e 's|%%NLS%%||g' +.for lang in ${NLS} +NLSSRCDIR_${lang}= ${.CURDIR}/nls +.endfor +.else +CFLAGS+= -DWITHOUT_NLS +MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +.endif + +.include Added: head/usr.bin/sort/bwstring.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sort/bwstring.cFri May 11 12:37:16 2012 (r235267) @@ -0,0 +1,1138 @@ +/*- + * Copyright (C) 2009 Gabor Kovesdan + * Copyright (C) 2012 Oleg Moskalenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bwstring.h" +#include "sort.h" + +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static unsigned char **cmonths = NULL; + +/* initialise months */ + +void +initialise_months(void) +{ + const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, +
svn commit: r228766 - head/usr.bin/mkesdb
Author: gabor Date: Wed Dec 21 12:07:14 2011 New Revision: 228766 URL: http://svn.freebsd.org/changeset/base/228766 Log: - Remove a GCC-specific compiler flag that was added before to eliminate some warnings but at the moment does not seem to be necessary. Submitted by: arundel (via private mail) Tested by:arundel MFC after:1 week Modified: head/usr.bin/mkesdb/Makefile.inc Modified: head/usr.bin/mkesdb/Makefile.inc == --- head/usr.bin/mkesdb/Makefile.incWed Dec 21 11:49:33 2011 (r228765) +++ head/usr.bin/mkesdb/Makefile.incWed Dec 21 12:07:14 2011 (r228766) @@ -2,5 +2,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \ --I${.CURDIR}/../../lib/libc/iconv \ ---param max-inline-insns-single=64 +-I${.CURDIR}/../../lib/libc/iconv ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228319 - head/usr.bin/grep
Author: gabor Date: Wed Dec 7 12:25:28 2011 New Revision: 228319 URL: http://svn.freebsd.org/changeset/base/228319 Log: - Match GNU behavior of exit code - Rename variable that has a different meaning now PR: bin/162930 Submitted by: Jan Beich MFC after:1 week Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cWed Dec 7 11:06:18 2011(r228318) +++ head/usr.bin/grep/grep.cWed Dec 7 12:25:28 2011(r228319) @@ -148,7 +148,7 @@ static inline const char*init_color(con boolfirst = true; /* flag whether we are processing the first match */ boolprev; /* flag whether or not the previous line matched */ int tail; /* lines left to print */ -boolnotfound; /* file not found */ +boolfile_err; /* file reading error */ /* * Prints usage information and returns 2. @@ -728,5 +728,5 @@ main(int argc, char *argv[]) /* Find out the correct return value according to the results and the command line option. */ - exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); + exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1)); } Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hWed Dec 7 11:06:18 2011(r228318) +++ head/usr.bin/grep/grep.hWed Dec 7 12:25:28 2011(r228319) @@ -119,7 +119,7 @@ extern char *label; extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; -extern bool first, matchall, notfound, prev; +extern bool file_err, first, matchall, prev; extern int tail; extern unsigned int dpatterns, fpatterns, patterns; extern struct pat *pattern; Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cWed Dec 7 11:06:18 2011(r228318) +++ head/usr.bin/grep/util.cWed Dec 7 12:25:28 2011(r228319) @@ -130,7 +130,7 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - notfound = true; + file_err = true; if(!sflag) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; @@ -195,10 +195,9 @@ procfile(const char *fn) f = grep_open(fn); } if (f == NULL) { + file_err = true; if (!sflag) warn("%s", fn); - if (errno == ENOENT) - notfound = true; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228099 - head/usr.bin/grep
Author: gabor Date: Mon Nov 28 20:16:55 2011 New Revision: 228099 URL: http://svn.freebsd.org/changeset/base/228099 Log: - Create links to the xz and lzma versions even if BSD grep is not the default. Nor GNU nor liblzma in base provides such functionality so it may be useful. MFC after:3 days Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Mon Nov 28 20:08:19 2011(r228098) +++ head/usr.bin/grep/Makefile Mon Nov 28 20:16:55 2011(r228099) @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/xzgrep \ - ${BINDIR}/grep ${BINDIR}/xzegrep \ - ${BINDIR}/grep ${BINDIR}/xzfgrep \ - ${BINDIR}/grep ${BINDIR}/lzgrep \ - ${BINDIR}/grep ${BINDIR}/lzegrep \ - ${BINDIR}/grep ${BINDIR}/lzfgrep + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif +LINKS+=${BINDIR}/${PROG} ${BINDIR}/xzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + LDADD= -lz -llzma DPADD= ${LIBZ} ${LIBLZMA} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228097 - head/usr.bin/grep
Author: gabor Date: Mon Nov 28 20:04:26 2011 New Revision: 228097 URL: http://svn.freebsd.org/changeset/base/228097 Log: - Call warnx() instead of errx() if a directory is not readable when using a recursive search. This is the expected behavior instead of aborting. PR: bin/162907 Submitted by: Jan Beich MFC after:3 days Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cMon Nov 28 20:03:33 2011(r228096) +++ head/usr.bin/grep/util.cMon Nov 28 20:04:26 2011(r228097) @@ -130,7 +130,9 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno)); + notfound = true; + if(!sflag) + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; case FTS_D: /* FALLTHROUGH */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r228093 - head/usr.bin/grep
Author: gabor Date: Mon Nov 28 20:00:31 2011 New Revision: 228093 URL: http://svn.freebsd.org/changeset/base/228093 Log: - Fix behavior of --null to match GNU grep PR: bin/162906 Submitted by: Jan Beich MFC after:3 days Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cMon Nov 28 19:53:16 2011(r228092) +++ head/usr.bin/grep/util.cMon Nov 28 20:00:31 2011(r228093) @@ -246,9 +246,9 @@ procfile(const char *fn) printf("%u\n", c); } if (lflag && !qflag && c != 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (Lflag && !qflag && c == 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) printf(getstr(8), fn); @@ -440,13 +440,13 @@ printline(struct str *line, int sep, reg int i, n = 0; if (!hflag) { - if (nullflag == 0) + if (!nullflag) { fputs(line->file, stdout); - else { + ++n; + } else { printf("%s", line->file); putchar(0); } - ++n; } if (nflag) { if (n > 0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226664 - head/usr.bin/grep
Author: gabor Date: Sun Oct 23 16:04:07 2011 New Revision: 226664 URL: http://svn.freebsd.org/changeset/base/226664 Log: - Fix installation when WITH_BSD_GREP is set to yes Submitted by: Aleksandr Rybalko Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Sun Oct 23 15:15:17 2011(r226663) +++ head/usr.bin/grep/Makefile Sun Oct 23 16:04:07 2011(r226664) @@ -53,12 +53,14 @@ DPADD= ${LIBZ} ${LIBLZMA} LDADD+=-lbz2 DPADD+=${LIBBZ2} +.if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ ${BINDIR}/grep ${BINDIR}/bzegrep \ ${BINDIR}/grep ${BINDIR}/bzfgrep MLINKS+= grep.1 bzgrep.1 \ grep.1 bzegrep.1 \ grep.1 bzfgrep.1 +.endif .else CFLAGS+= -DWITHOUT_BZIP2 .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226273 - head/usr.bin/grep
Author: gabor Date: Wed Oct 12 01:09:57 2011 New Revision: 226273 URL: http://svn.freebsd.org/changeset/base/226273 Log: - Fix counting of match limit (-m) Reported by: Nali Toja Approved by: delphij (mentor) Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cWed Oct 12 00:17:43 2011(r226272) +++ head/usr.bin/grep/util.cWed Oct 12 01:09:57 2011(r226273) @@ -233,7 +233,7 @@ procfile(const char *fn) linesqueued++; } c += t; - if (mflag && mcount < 0) + if (mflag && mcount <= 0) break; } if (Bflag > 0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226271 - in head/usr.bin/grep: . regex
Author: gabor Date: Tue Oct 11 22:27:23 2011 New Revision: 226271 URL: http://svn.freebsd.org/changeset/base/226271 Log: - Use getprogname() instead of __progname - Allow disabling bzip2 support with WITHOUT_BZIP2 - Fix handling patterns that start with a dot - Remove superfluous semicolon Approved by: delphij (mentor) Modified: head/usr.bin/grep/Makefile head/usr.bin/grep/file.c head/usr.bin/grep/grep.c head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Tue Oct 11 21:52:24 2011(r226270) +++ head/usr.bin/grep/Makefile Tue Oct 11 22:27:23 2011(r226271) @@ -26,9 +26,6 @@ LINKS=${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/bzgrep \ - ${BINDIR}/grep ${BINDIR}/bzegrep \ - ${BINDIR}/grep ${BINDIR}/bzfgrep \ ${BINDIR}/grep ${BINDIR}/xzgrep \ ${BINDIR}/grep ${BINDIR}/xzegrep \ ${BINDIR}/grep ${BINDIR}/xzfgrep \ @@ -41,9 +38,6 @@ MLINKS= grep.1 egrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ grep.1 zfgrep.1 \ - grep.1 bzgrep.1 \ - grep.1 bzegrep.1 \ - grep.1 bzfgrep.1 \ grep.1 xzgrep.1 \ grep.1 xzegrep.1 \ grep.1 xzfgrep.1 \ @@ -52,8 +46,22 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif -LDADD= -lz -lbz2 -llzma -DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} +LDADD= -lz -llzma +DPADD= ${LIBZ} ${LIBLZMA} + +.if !defined(WITHOUT_BZIP2) +LDADD+=-lbz2 +DPADD+=${LIBBZ2} + +LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ + ${BINDIR}/grep ${BINDIR}/bzegrep \ + ${BINDIR}/grep ${BINDIR}/bzfgrep +MLINKS+= grep.1 bzgrep.1 \ +grep.1 bzegrep.1 \ +grep.1 bzfgrep.1 +.else +CFLAGS+= -DWITHOUT_BZIP2 +.endif .if !defined(WITHOUT_GNU_COMPAT) CFLAGS+= -I/usr/include/gnu Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cTue Oct 11 21:52:24 2011(r226270) +++ head/usr.bin/grep/file.cTue Oct 11 22:27:23 2011(r226271) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -51,14 +50,20 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_BZIP2 +#include +#endif + #include "grep.h" #defineMAXBUFSIZ (32 * 1024) #defineLNBUFBUMP 80 static gzFile gzbufdesc; -static BZFILE* bzbufdesc; static lzma_stream lstrm = LZMA_STREAM_INIT; +#ifndef WITHOUT_BZIP2 +static BZFILE* bzbufdesc; +#endif static unsigned char *buffer; static unsigned char *bufpos; @@ -72,7 +77,6 @@ static inline int grep_refill(struct file *f) { ssize_t nr; - int bzerr; if (filebehave == FILE_MMAP) return (0); @@ -80,9 +84,12 @@ grep_refill(struct file *f) bufpos = buffer; bufrem = 0; - if (filebehave == FILE_GZIP) + if (filebehave == FILE_GZIP) { nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); - else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { +#ifndef WITHOUT_BZIP2 + } else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { + int bzerr; + nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); switch (bzerr) { case BZ_OK: @@ -108,6 +115,7 @@ grep_refill(struct file *f) /* Make sure we exit with an error */ nr = -1; } +#endif } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { lzma_action action = LZMA_RUN; uint8_t in_buf[MAXBUFSIZ]; @@ -271,9 +279,11 @@ grep_open(const char *path) (gzbufdesc = gzdopen(f->fd, "r")) == NULL) goto error2; +#ifndef WITHOUT_BZIP2 if (filebehave == FILE_BZIP && (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cTue Oct 11 21:52:24 2011(r226270) +++ head/usr.bin/grep/grep.cTue Oct 11 22:27:23 2011(r226271) @@ -150,15 +150,13 @@ bool prev; /* flag whether or not the int tail; /* lines left to print */ boolnotfound; /* file not found */ -extern char*__progname; - /* * Prints usage information and returns 2. */ static void usage(void) { - fprintf(stderr, getstr(4), __progname); + fprintf(stderr, getstr(4), getprogname()); fprintf(stderr, "%s", getstr(5));
svn commit: r226035 - in head/usr.bin/grep: . regex
RE_ERROR_BUF); - errx(2, "%s", re_error); - } + + /* Check if cheating is allowed (always is for fgrep). */ + for (i = 0; i < patterns; ++i) { + if (fastncomp(&fg_pattern[i], pattern[i].pat, + pattern[i].len, cflags) != 0) { + /* Fall back to full regex library */ + c = regcomp(&r_pattern[i], pattern[i].pat, cflags); + if (c != 0) { + regerror(c, &r_pattern[i], re_error, + RE_ERROR_BUF); + errx(2, "%s", re_error); } } } Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hWed Oct 5 08:33:50 2011(r226034) +++ head/usr.bin/grep/grep.hWed Oct 5 09:56:43 2011(r226035) @@ -36,6 +36,8 @@ #include #include +#include "fastmatch.h" + #ifdef WITHOUT_NLS #define getstr(n) errstr[n] #else @@ -58,8 +60,11 @@ extern const char*errstr[]; #define BINFILE_TEXT 2 #define FILE_STDIO 0 -#define FILE_GZIP 1 -#define FILE_BZIP 2 +#define FILE_MMAP 1 +#define FILE_GZIP 2 +#define FILE_BZIP 3 +#define FILE_XZ4 +#define FILE_LZMA 5 #define DIR_READ 0 #define DIR_SKIP 1 @@ -90,22 +95,16 @@ struct str { int line_no; }; +struct pat { + char*pat; + int len; +}; + struct epat { char*pat; int mode; }; -typedef struct { - size_t len; - unsigned char *pattern; - int qsBc[UCHAR_MAX + 1]; - /* flags */ - bool bol; - bool eol; - bool reversed; - bool word; -} fastgrep_t; - /* Flags passed to regcomp() and regexec() */ extern int cflags, eflags; @@ -114,7 +113,8 @@ extern bool Eflag, Fflag, Gflag, Hflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; extern bool dexclude, dinclude, fexclude, finclude, lbflag, nullflag; -extern unsigned long long Aflag, Bflag, mcount; +extern unsigned long long Aflag, Bflag; +extern long long mcount; extern char*label; extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; @@ -122,10 +122,10 @@ extern int binbehave, devbehave, dirbeh extern bool first, matchall, notfound, prev; extern int tail; extern unsigned int dpatterns, fpatterns, patterns; -extern char**pattern; +extern struct pat *pattern; extern struct epat *dpattern, *fpattern; extern regex_t *er_pattern, *r_pattern; -extern fastgrep_t *fg_pattern; +extern fastmatch_t *fg_pattern; /* For regex errors */ #define RE_ERROR_BUF 512 @@ -150,8 +150,3 @@ void clearqueue(void); voidgrep_close(struct file *f); struct file*grep_open(const char *path); char *grep_fgetln(struct file *f, size_t *len); - -/* fastgrep.c */ -int fastcomp(fastgrep_t *, const char *); -voidfgrepcomp(fastgrep_t *, const char *); -int grep_search(fastgrep_t *, const unsigned char *, size_t, regmatch_t *); Added: head/usr.bin/grep/regex/fastmatch.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/regex/fastmatch.c Wed Oct 5 09:56:43 2011 (r226035) @@ -0,0 +1,169 @@ +/* $FreeBSD$ */ + +/*- + * Copyright (C) 2011 Gabor Kovesdan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HO
svn commit: r225775 - head/share/man/man4
Author: gabor Date: Tue Sep 27 07:00:24 2011 New Revision: 225775 URL: http://svn.freebsd.org/changeset/base/225775 Log: - Move misplaced reference [1] - Sort references [1] - s/Since/Because/ [2] Submitted by: arundel [1], Chad Perrin [2] MFC after:3 days Modified: head/share/man/man4/smp.4 Modified: head/share/man/man4/smp.4 == --- head/share/man/man4/smp.4 Tue Sep 27 06:53:30 2011(r225774) +++ head/share/man/man4/smp.4 Tue Sep 27 07:00:24 2011(r225775) @@ -120,25 +120,24 @@ tasks on CPUs that are closely grouped t .Pp .Fx supports hyperthreading on Intel CPU's on the i386 and AMD64 platforms. -Since using logical CPUs can cause performance penalties under certain loads, +Because using logical CPUs can cause performance penalties under certain loads, the logical CPUs can be disabled by setting the .Va machdep.hyperthreading_allowed tunable to zero. -.Xr cpuset 1 . .Sh SEE ALSO +.Xr cpuset 1 , .Xr mptable 1 , +.Xr sched_4bsd 4 , +.Xr sched_ule 4 , .Xr loader 8 , .Xr sysctl 8 , .Xr condvar 9 , .Xr msleep 9 , .Xr mtx_pool 9 , .Xr mutex 9 , -.Xr sema 9 , -.Xr sx 9 , .Xr rwlock 9 , -.Xr sched_4bsd 4 , -.Xr sched_ule 4 , -.Xr cpuset 1 +.Xr sema 9 , +.Xr sx 9 .Sh HISTORY The .Nm ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r225678 - head/lib/libc/iconv
Author: gabor Date: Mon Sep 19 22:49:36 2011 New Revision: 225678 URL: http://svn.freebsd.org/changeset/base/225678 Log: - Fix a trivial bug in iconv. When there is no space to perform the conversion, conversion must fail and errno must be set to E2BIG. PR: standards/160673 Submitted by: Henning Petersen Reviewed by: pluknet Approved by: re (kib), delphij (mentor) Modified: head/lib/libc/iconv/citrus_none.c Modified: head/lib/libc/iconv/citrus_none.c == --- head/lib/libc/iconv/citrus_none.c Mon Sep 19 22:35:54 2011 (r225677) +++ head/lib/libc/iconv/citrus_none.c Mon Sep 19 22:49:36 2011 (r225678) @@ -190,7 +190,6 @@ _citrus_NONE_stdenc_wctomb(struct _citru void * __restrict pspriv __unused, size_t * __restrict nresult, struct iconv_hooks *hooks __unused) { - int ret; if ((wc & ~0xFFU) != 0) { *nresult = (size_t)-1; @@ -198,7 +197,7 @@ _citrus_NONE_stdenc_wctomb(struct _citru } if (n == 0) { *nresult = (size_t)-1; - ret = E2BIG; + return (E2BIG); } *nresult = 1; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r224938 - head/usr.bin/grep
Author: gabor Date: Wed Aug 17 13:58:39 2011 New Revision: 224938 URL: http://svn.freebsd.org/changeset/base/224938 Log: - Fix exclusion of directories from a recursive search - Use FTS_SKIP for exclusion instead of custom code Submitted by: ttse...@gmail.com Approved by: re (kib), delphij (mentor) Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cWed Aug 17 13:56:33 2011(r224937) +++ head/usr.bin/grep/util.cWed Aug 17 13:58:39 2011(r224938) @@ -84,7 +84,7 @@ dir_matching(const char *dname) for (unsigned int i = 0; i < dpatterns; ++i) { if (dname != NULL && - fnmatch(dname, dpattern[i].pat, 0) == 0) { + fnmatch(dpattern[i].pat, dname, 0) == 0) { if (dpattern[i].mode == EXCL_PAT) return (false); else @@ -103,7 +103,6 @@ grep_tree(char **argv) { FTS *fts; FTSENT *p; - char *d, *dir = NULL; int c, fts_flags; bool ok; @@ -135,6 +134,10 @@ grep_tree(char **argv) case FTS_D: /* FALLTHROUGH */ case FTS_DP: + if (dexclude || dinclude) + if (!dir_matching(p->fts_name) || + !dir_matching(p->fts_path)) + fts_set(fts, p, FTS_SKIP); break; case FTS_DC: /* Print a warning for recursive directory loop */ @@ -144,18 +147,6 @@ grep_tree(char **argv) default: /* Check for file exclusion/inclusion */ ok = true; - if (dexclude || dinclude) { - if ((d = strrchr(p->fts_path, '/')) != NULL) { - dir = grep_malloc(sizeof(char) * - (d - p->fts_path + 1)); - memcpy(dir, p->fts_path, - d - p->fts_path); - dir[d - p->fts_path] = '\0'; - } - ok = dir_matching(dir); - free(dir); - dir = NULL; - } if (fexclude || finclude) ok &= file_matching(p->fts_path); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r224937 - head/usr.bin/grep
Author: gabor Date: Wed Aug 17 13:56:33 2011 New Revision: 224937 URL: http://svn.freebsd.org/changeset/base/224937 Log: - Fix handling of environmental variables when they are set to empty string Submitted by: ttse...@gmail.com Approved by: re (kib), delphij (mentor) Modified: head/usr.bin/grep/grep.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cWed Aug 17 13:02:50 2011(r224936) +++ head/usr.bin/grep/grep.cWed Aug 17 13:56:33 2011(r224937) @@ -304,7 +304,7 @@ init_color(const char *d) char *c; c = getenv("GREP_COLOR"); - return (c != NULL ? c : d); + return (c != NULL && c[0] != '\0' ? c : d); } int @@ -360,7 +360,7 @@ main(int argc, char *argv[]) /* support for extra arguments in GREP_OPTIONS */ eargc = 0; - if (eopts != NULL) { + if (eopts != NULL && eopts[0] != '\0') { char *str; /* make an estimation of how many extra arguments we have */ @@ -373,7 +373,8 @@ main(int argc, char *argv[]) eargc = 0; /* parse extra arguments */ while ((str = strsep(&eopts, " ")) != NULL) - eargv[eargc++] = grep_strdup(str); + if (str[0] != '\0') + eargv[eargc++] = grep_strdup(str); aargv = (char **)grep_calloc(eargc + argc + 1, sizeof(char *)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r223296 - head/lib/libc/iconv
Em 19-06-2011 14:35, Alexander Kabaev escreveu: Author: kan Date: Sun Jun 19 13:35:46 2011 New Revision: 223296 URL: http://svn.freebsd.org/changeset/base/223296 Log: Put a quick bandaid on internal citrus locking. The code is not quite right still, but it programs from deadlocking on themselves if one enables new citrus code by mistake. Thanks, I still have this on my TODO list, I just haven't had time so far. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r223009 - head/usr.bin/grep
Author: gabor Date: Sun Jun 12 12:51:58 2011 New Revision: 223009 URL: http://svn.freebsd.org/changeset/base/223009 Log: - Use REG_NOSUB to bypass submatch counting when not necessary. This may yield in somewhat better performance in a few cases. Approved by: delphij (mentor) Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cSun Jun 12 12:44:02 2011(r223008) +++ head/usr.bin/grep/grep.cSun Jun 12 12:51:58 2011(r223009) @@ -73,7 +73,7 @@ const char*errstr[] = { }; /* Flags passed to regcomp() and regexec() */ -int cflags = 0; +int cflags = REG_NOSUB; int eflags = REG_STARTEND; /* Shortcut for matching all cases like empty regex */ @@ -519,6 +519,7 @@ main(int argc, char *argv[]) break; case 'o': oflag = true; + cflags &= ~REG_NOSUB; break; case 'p': linkbehave = LINK_SKIP; @@ -552,9 +553,11 @@ main(int argc, char *argv[]) break; case 'w': wflag = true; + cflags &= ~REG_NOSUB; break; case 'x': xflag = true; + cflags &= ~REG_NOSUB; break; case 'Z': filebehave = FILE_GZIP; @@ -588,6 +591,7 @@ main(int argc, char *argv[]) strcasecmp("none", optarg) != 0 && strcasecmp("no", optarg) != 0) errx(2, getstr(3), "--color"); + cflags &= ~REG_NOSUB; break; case LABEL_OPT: label = optarg; Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cSun Jun 12 12:44:02 2011(r223008) +++ head/usr.bin/grep/util.cSun Jun 12 12:51:58 2011(r223009) @@ -309,7 +309,9 @@ procline(struct str *l, int nottext) r = regexec(&r_pattern[i], l->dat, 1, &pmatch, eflags); r = (r == 0) ? 0 : REG_NOMATCH; - st = pmatch.rm_eo; + st = (cflags & REG_NOSUB) + ? (size_t)l->len + : (size_t)pmatch.rm_eo; if (r == REG_NOMATCH) continue; /* Check for full match */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r223008 - head/usr.bin/grep
Author: gabor Date: Sun Jun 12 12:44:02 2011 New Revision: 223008 URL: http://svn.freebsd.org/changeset/base/223008 Log: - Fix -w behavior - Make -F and -w work together - Fix --color to colorize all of the matches PR: bin/156826 Submitted by: Yuri Pankov Approved by: delphij (mentor) Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cSun Jun 12 12:27:17 2011 (r223007) +++ head/usr.bin/grep/fastgrep.cSun Jun 12 12:44:02 2011 (r223008) @@ -89,7 +89,7 @@ fastcomp(fastgrep_t *fg, const char *pat fg->bol = false; fg->eol = false; fg->reversed = false; - fg->word = wflag; + fg->word = false; /* Remove end-of-line character ('$'). */ if (fg->len > 0 && pat[fg->len - 1] == '$') { Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cSun Jun 12 12:27:17 2011(r223007) +++ head/usr.bin/grep/util.cSun Jun 12 12:44:02 2011(r223008) @@ -301,18 +301,15 @@ procline(struct str *l, int nottext) * XXX: grep_search() is a workaround for speed up and should be * removed in the future. See fastgrep.c. */ - if (fg_pattern[i].pattern) { + if (fg_pattern[i].pattern) r = grep_search(&fg_pattern[i], (unsigned char *)l->dat, l->len, &pmatch); - r = (r == 0) ? 0 : REG_NOMATCH; - st = pmatch.rm_eo; - } else { + else r = regexec(&r_pattern[i], l->dat, 1, &pmatch, eflags); - r = (r == 0) ? 0 : REG_NOMATCH; - st = pmatch.rm_eo; - } + r = (r == 0) ? 0 : REG_NOMATCH; + st = pmatch.rm_eo; if (r == REG_NOMATCH) continue; /* Check for full match */ @@ -321,8 +318,7 @@ procline(struct str *l, int nottext) (size_t)pmatch.rm_eo != l->len) r = REG_NOMATCH; /* Check for whole word match */ - if (r == 0 && fg_pattern[i].word && - pmatch.rm_so != 0) { + if (r == 0 && (wflag || fg_pattern[i].word)) { wint_t wbegin, wend; wbegin = wend = L' '; @@ -330,11 +326,13 @@ procline(struct str *l, int nottext) sscanf(&l->dat[pmatch.rm_so - 1], "%lc", &wbegin) != 1) r = REG_NOMATCH; - else if ((size_t)pmatch.rm_eo != l->len && + else if ((size_t)pmatch.rm_eo != + l->len && sscanf(&l->dat[pmatch.rm_eo], "%lc", &wend) != 1) r = REG_NOMATCH; - else if (iswword(wbegin) || iswword(wend)) + else if (iswword(wbegin) || + iswword(wend)) r = REG_NOMATCH; } if (r == 0) { @@ -343,7 +341,8 @@ procline(struct str *l, int nottext) if (m < MAX_LINE_MATCHES) matches[m++] = pmatch; /* matches - skip further patterns */ - if ((color != NULL && !oflag) || qflag || lflag) + if ((color == NULL && !oflag) || + qflag || lflag) break; } } @@ -353,7 +352,7 @@ procline(struct str *l, int nottext) break; } /* One pass if we are not recording matches */ - if ((color != NULL && !of
svn commit: r222354 - head/lib/libc/iconv
Author: gabor Date: Fri May 27 10:40:34 2011 New Revision: 222354 URL: http://svn.freebsd.org/changeset/base/222354 Log: - Move some internal functions to the private namespace Submitted by: kan Approved by: delphij (mentor) Modified: head/lib/libc/iconv/Symbol.map Modified: head/lib/libc/iconv/Symbol.map == --- head/lib/libc/iconv/Symbol.map Fri May 27 10:08:26 2011 (r222353) +++ head/lib/libc/iconv/Symbol.map Fri May 27 10:40:34 2011 (r222354) @@ -6,6 +6,18 @@ FBSD_1.2 { __iconv; __iconv_free_list; __iconv_get_list; + _libiconv_version; + iconv_canonicalize; + libiconv; + libiconv_close; + libiconv_open; + libiconv_open_into; + libiconv_set_relocation_prefix; + libiconvctl; + libiconvlist; +}; + +FBSDprivate_1.0 { _citrus_bcs_convert_to_lower; _citrus_bcs_convert_to_upper; _citrus_bcs_isalnum; @@ -89,13 +101,4 @@ FBSD_1.2 { _citrus_stdenc_close; _citrus_stdenc_open; _citrus_unmap_file; - _libiconv_version; - iconv_canonicalize; - libiconv; - libiconv_close; - libiconv_open; - libiconv_open_into; - libiconv_set_relocation_prefix; - libiconvctl; - libiconvlist; }; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r220422 - head/usr.bin/grep
Author: gabor Date: Thu Apr 7 13:03:35 2011 New Revision: 220422 URL: http://svn.freebsd.org/changeset/base/220422 Log: - Adjust a comment to actual behaviour - Makefile nit - Add more CVS/SVN keywords to make it easier to track changes from NetBSD in case they add further improvements Approved by: delphij (mentor) Obtained from:The NetBSD Project Modified: head/usr.bin/grep/Makefile head/usr.bin/grep/fastgrep.c head/usr.bin/grep/file.c head/usr.bin/grep/grep.1 head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/Makefile == --- head/usr.bin/grep/Makefile Thu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/Makefile Thu Apr 7 13:03:35 2011(r220422) @@ -1,13 +1,15 @@ +# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $ # $FreeBSD$ # $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ PROG= grep SRCS= fastgrep.c file.c grep.c queue.c util.c + LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cThu Apr 7 13:01:03 2011 (r220421) +++ head/usr.bin/grep/fastgrep.cThu Apr 7 13:03:35 2011 (r220422) @@ -1,4 +1,6 @@ /* $OpenBSD: util.c,v 1.36 2007/10/02 17:59:18 otto Exp $ */ +/* $NetBSD: fastgrep.c,v 1.4 2011/02/27 17:33:37 joerg Exp $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -112,9 +114,9 @@ fastcomp(fastgrep_t *fg, const char *pat } /* -* Copy pattern minus '^' and '$' characters as well as word -* match character classes at the beginning and ending of the -* string respectively. +* pat has been adjusted earlier to not include '^', '$' or +* the word match character classes at the beginning and ending +* of the string respectively. */ fg->pattern = grep_malloc(fg->len + 1); memcpy(fg->pattern, pat, fg->len); Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cThu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/file.cThu Apr 7 13:03:35 2011(r220422) @@ -1,3 +1,5 @@ +/* $NetBSD: file.c,v 1.5 2011/02/16 18:35:39 joerg Exp $ */ +/* $FreeBSD$ */ /* $OpenBSD: file.c,v 1.11 2010/07/02 20:48:48 nicm Exp $ */ /*- Modified: head/usr.bin/grep/grep.1 == --- head/usr.bin/grep/grep.1Thu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/grep.1Thu Apr 7 13:03:35 2011(r220422) @@ -1,3 +1,4 @@ +.\"$NetBSD: grep.1,v 1.2 2011/02/16 01:31:33 joerg Exp $ .\"$FreeBSD$ .\"$OpenBSD: grep.1,v 1.38 2010/04/05 06:30:59 jmc Exp $ .\" Copyright (c) 1980, 1990, 1993 Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cThu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/grep.cThu Apr 7 13:03:35 2011(r220422) @@ -1,3 +1,5 @@ +/* $NetBSD: grep.c,v 1.4 2011/02/16 01:31:33 joerg Exp $ */ +/* $FreeBSD$ */ /* $OpenBSD: grep.c,v 1.42 2010/07/02 22:18:03 tedu Exp $ */ /*- Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hThu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/grep.hThu Apr 7 13:03:35 2011(r220422) @@ -1,3 +1,4 @@ +/* $NetBSD: grep.h,v 1.5 2011/02/27 17:33:37 joerg Exp $ */ /* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */ /* $FreeBSD$ */ Modified: head/usr.bin/grep/queue.c == --- head/usr.bin/grep/queue.c Thu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/queue.c Thu Apr 7 13:03:35 2011(r220422) @@ -1,3 +1,6 @@ +/* $NetBSD: queue.c,v 1.2 2011/02/16 01:31:33 joerg Exp $ */ +/* $FreeBSD$ */ + /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cThu Apr 7 13:01:03 2011(r220421) +++ head/usr.bin/grep/util.cThu Apr 7 13:03:35 2011
svn commit: r220421 - head/usr.bin/grep
Author: gabor Date: Thu Apr 7 13:01:03 2011 New Revision: 220421 URL: http://svn.freebsd.org/changeset/base/220421 Log: - Simplify the fixed string pattern preprocessing code - Improve readability Approved by: delphij (mentor) Obtained from:The NetBSD Project Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cThu Apr 7 12:52:46 2011 (r220420) +++ head/usr.bin/grep/fastgrep.cThu Apr 7 13:01:03 2011 (r220421) @@ -81,27 +81,25 @@ fastcomp(fastgrep_t *fg, const char *pat int hasDot = 0; int lastHalfDot = 0; int shiftPatternLen; - bool bol = false; - bool eol = false; /* Initialize. */ fg->len = strlen(pat); fg->bol = false; fg->eol = false; fg->reversed = false; + fg->word = wflag; /* Remove end-of-line character ('$'). */ if (fg->len > 0 && pat[fg->len - 1] == '$') { - eol = true; fg->eol = true; fg->len--; } /* Remove beginning-of-line character ('^'). */ if (pat[0] == '^') { - bol = true; fg->bol = true; fg->len--; + pat++; } if (fg->len >= 14 && @@ -110,7 +108,7 @@ fastcomp(fastgrep_t *fg, const char *pat fg->len -= 14; pat += 7; /* Word boundary is handled separately in util.c */ - wflag = true; + fg->word = true; } /* @@ -149,7 +147,7 @@ fastcomp(fastgrep_t *fg, const char *pat * Determine if a reverse search would be faster based on the placement * of the dots. */ - if ((!(lflag || cflag)) && ((!(bol || eol)) && + if ((!(lflag || cflag)) && ((!(fg->bol || fg->eol)) && ((lastHalfDot) && ((firstHalfDot < 0) || ((fg->len - (lastHalfDot + 1)) < (size_t)firstHalfDot && !oflag && !color) { Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hThu Apr 7 12:52:46 2011(r220420) +++ head/usr.bin/grep/grep.hThu Apr 7 13:01:03 2011(r220421) @@ -102,6 +102,7 @@ typedef struct { bool bol; bool eol; bool reversed; + bool word; } fastgrep_t; /* Flags passed to regcomp() and regexec() */ Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cThu Apr 7 12:52:46 2011(r220420) +++ head/usr.bin/grep/util.cThu Apr 7 13:01:03 2011(r220421) @@ -55,14 +55,15 @@ static int procline(struct str *l, int) bool file_matching(const char *fname) { + char *fname_base; bool ret; ret = finclude ? false : true; + fname_base = basename(fname); for (unsigned int i = 0; i < fpatterns; ++i) { - if (fnmatch(fpattern[i].pat, - fname, 0) == 0 || fnmatch(fpattern[i].pat, - basename(fname), 0) == 0) { + if (fnmatch(fpattern[i].pat, fname, 0) == 0 || + fnmatch(fpattern[i].pat, fname_base, 0) == 0) { if (fpattern[i].mode == EXCL_PAT) return (false); else @@ -277,7 +278,7 @@ procfile(const char *fn) * matches. The matching lines are passed to printline() to display the * appropriate output. */ -static inline int +static int procline(struct str *l, int nottext) { regmatch_t matches[MAX_LINE_MATCHES]; @@ -318,7 +319,8 @@ procline(struct str *l, int nottext) (size_t)pmatch.rm_eo != l->len) r = REG_NOMATCH; /* Check for whole word match */ - if (r == 0 && wflag && pmatch.rm_so != 0) { + if (r == 0 && fg_pattern[i].word && + pmatch.rm_so != 0) { wint_t wbegin, wend; wbegin = wend = L' '; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r220420 - head/usr.bin/grep
Author: gabor Date: Thu Apr 7 12:52:46 2011 New Revision: 220420 URL: http://svn.freebsd.org/changeset/base/220420 Log: - Replace some strcpy()-family functions with memcpy() ones. It has been discussed earlier that the extra safeness is not required in these cases and we can avoid the overhead by using the more general memory copy functions. Approved by: delphij (mentor) Obtained from:The NetBSD Project Modified: head/usr.bin/grep/fastgrep.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cThu Apr 7 11:47:27 2011 (r220419) +++ head/usr.bin/grep/fastgrep.cThu Apr 7 12:52:46 2011 (r220420) @@ -60,8 +60,7 @@ fgrepcomp(fastgrep_t *fg, const char *pa fg->eol = false; fg->reversed = false; - fg->pattern = grep_malloc(strlen(pat) + 1); - strcpy(fg->pattern, pat); + fg->pattern = (unsigned char *)grep_strdup(pat); /* Preprocess pattern. */ for (i = 0; i <= UCHAR_MAX; i++) @@ -106,9 +105,10 @@ fastcomp(fastgrep_t *fg, const char *pat } if (fg->len >= 14 && - strncmp(pat + (fg->bol ? 1 : 0), "[[:<:]]", 7) == 0 && - strncmp(pat + (fg->bol ? 1 : 0) + fg->len - 7, "[[:>:]]", 7) == 0) { + memcmp(pat, "[[:<:]]", 7) == 0 && + memcmp(pat + fg->len - 7, "[[:>:]]", 7) == 0) { fg->len -= 14; + pat += 7; /* Word boundary is handled separately in util.c */ wflag = true; } @@ -119,7 +119,8 @@ fastcomp(fastgrep_t *fg, const char *pat * string respectively. */ fg->pattern = grep_malloc(fg->len + 1); - strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); + memcpy(fg->pattern, pat, fg->len); + fg->pattern[fg->len] = '\0'; /* Look for ways to cheat...er...avoid the full regex engine. */ for (i = 0; i < fg->len; i++) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r219020 - in head/tools: build/options test/iconv
Author: gabor Date: Fri Feb 25 00:10:26 2011 New Revision: 219020 URL: http://svn.freebsd.org/changeset/base/219020 Log: - Add two more iconv-related files, which were left out from previous commit Approved by: delphij (mentor) Added: head/tools/build/options/WITH_ICONV (contents, props changed) head/tools/test/iconv/const-gnuism.c (contents, props changed) Added: head/tools/build/options/WITH_ICONV == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_ICONV Fri Feb 25 00:10:26 2011 (r219020) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build iconv as part of libc. Added: head/tools/test/iconv/const-gnuism.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/iconv/const-gnuism.cFri Feb 25 00:10:26 2011 (r219020) @@ -0,0 +1,70 @@ +/*- + * Copyright (C) 2010 Gabor Kovesdan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include + +int +main(void) +{ + iconv_t cd; + size_t inbytes, outbytes; + char *str1 = "FOOBAR"; + const char *str2 = "FOOBAR"; + char ** in1; + const char ** in2 = &str2; + char *out1, *out2; + + inbytes = outbytes = strlen("FOOBAR"); + + if ((cd = iconv_open("UTF-8", "ASCII")) == (iconv_t)-1) + err(1, NULL); + + if ((out2 = malloc(inbytes)) == NULL) + err(1, NULL); + + if (iconv(cd, in2, &inbytes, &out2, &outbytes) == -1) + err(1, NULL); + + in1 = &str1; + inbytes = outbytes = strlen("FOOBAR"); + + if ((out1 = malloc(inbytes)) == NULL) + err(1, NULL); + + if (iconv(cd, in1, &inbytes, &out1, &outbytes) == -1) + err(1, NULL); + + return (EXIT_SUCCESS); + +} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r211808 - head/share/man/man5
Author: gabor Date: Wed Aug 25 09:48:21 2010 New Revision: 211808 URL: http://svn.freebsd.org/changeset/base/211808 Log: - Regen after adding WITH_BSD_GREP and removing WITH_GNU_GREP Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Wed Aug 25 09:34:34 2010 (r211807) +++ head/share/man/man5/src.conf.5 Wed Aug 25 09:48:21 2010 (r211808) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd July 22, 2010 +.Dd August 25, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -214,6 +214,9 @@ Set to not build the boot blocks and loa .\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . +.It Va WITH_BSD_GREP +.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 211701 2010-08-23 10:04:26Z gabor +Build BSD-licensed grep instead of GNU grep. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -346,9 +349,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_GREP -.\" from FreeBSD: head/tools/build/options/WITH_GNU_GREP 210389 2010-07-22 19:11:57Z gabor -Set to build the base system with GNU grep instead of BSD grep .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r211701 - in head: gnu/usr.bin share/mk sys/sys tools/build/options usr.bin
Em 2010.08.23. 12:12, Brian Somers escreveu: Is this a permanent switch or is there a list of issues to be resolved before switching back to the BSD grep? I maintain my TODO list, which currently has the following items: - fix context grepping bug - fix loop on reading drectories on ZFS/NFS - print out warning and exit if writing to stdin fails - track down and fix -wq bug - support and install bz*grep binaries - performance issue: avoid copying strings everywhere where possible - performance issue: only check line boundaries on match - performance issue: compare various fixed string algorithms for fgrep Some of these are quite easy and the performance is much better now but some people objected so strongly that I decided to stop fighting and change back. I'll work these out and then we'll reevaluate if we can use BSD grep as default. I'll try to get them solved asap but I'll move to another country soon and given that I as forced to change it back without having some more time to arrange them, I don't like to be stressed any more so I'll concentrate on my move and calm settlement in Portugal, first. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r211701 - in head: gnu/usr.bin share/mk sys/sys tools/build/options usr.bin
Author: gabor Date: Mon Aug 23 10:04:26 2010 New Revision: 211701 URL: http://svn.freebsd.org/changeset/base/211701 Log: - Change default grep back to GNU version. BSD grep can be built with the WITH_BSD_GREP knob. - Bump __FreeBSD_version Requested by: dougb Approved by:delphij (mentor) Added: head/tools/build/options/WITH_BSD_GREP (contents, props changed) Deleted: head/tools/build/options/WITH_GNU_GREP Modified: head/gnu/usr.bin/Makefile head/share/mk/bsd.own.mk head/sys/sys/param.h head/usr.bin/Makefile Modified: head/gnu/usr.bin/Makefile == --- head/gnu/usr.bin/Makefile Mon Aug 23 09:54:32 2010(r211700) +++ head/gnu/usr.bin/Makefile Mon Aug 23 10:04:26 2010(r211701) @@ -28,6 +28,10 @@ _groff= groff .endif .endif +.if ${MK_BSD_GREP} != "yes" +_grep= grep +.endif + .if ${MK_CVS} != "no" _cvs= cvs .endif @@ -36,10 +40,6 @@ _cvs=cvs _dtc= dtc .endif -.if ${MK_GNU_GREP} != "no" -_grep= grep -.endif - .if ${MK_INFO} != "no" _texinfo= texinfo .endif Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkMon Aug 23 09:54:32 2010(r211700) +++ head/share/mk/bsd.own.mkMon Aug 23 10:04:26 2010(r211701) @@ -419,9 +419,9 @@ MK_${var}:= yes BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ +BSD_GREP \ ${_clang_no} \ FDT \ -GNU_GREP \ HESIOD \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) Modified: head/sys/sys/param.h == --- head/sys/sys/param.hMon Aug 23 09:54:32 2010(r211700) +++ head/sys/sys/param.hMon Aug 23 10:04:26 2010(r211701) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900016 /* Master, propagated to newvers */ +#define __FreeBSD_version 900017 /* Master, propagated to newvers */ #ifndef LOCORE #include Added: head/tools/build/options/WITH_BSD_GREP == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BSD_GREP Mon Aug 23 10:04:26 2010 (r211701) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Build BSD-licensed grep instead of GNU grep. Modified: head/usr.bin/Makefile == --- head/usr.bin/Makefile Mon Aug 23 09:54:32 2010(r211700) +++ head/usr.bin/Makefile Mon Aug 23 10:04:26 2010(r211701) @@ -277,6 +277,10 @@ _bluetooth=bluetooth _cpio= cpio .endif +.if ${MK_BSD_GREP} != "no" +_grep= grep +.endif + .if ${MK_CALENDAR} != "no" _calendar= calendar .endif @@ -285,10 +289,6 @@ _calendar= calendar _clang=clang .endif -.if ${MK_GNU_GREP} != "yes" -_grep= grep -.endif - .if ${MK_HESIOD} != "no" _hesinfo= hesinfo .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r211463 - head/usr.bin/grep
Em 2010.08.18. 22:48, m...@freebsd.org escreveu: On Wed, Aug 18, 2010 at 10:40 AM, Gabor Kovesdan wrote: Author: gabor Date: Wed Aug 18 17:40:10 2010 New Revision: 211463 URL: http://svn.freebsd.org/changeset/base/211463 Log: - Refactor file reading code to use pure syscalls and an internal buffer instead of stdio. This gives BSD grep a very big performance boost, its speed is now almost comparable to GNU grep. I didn't read all of the details in the profiling mails in the thread, but does this mean that work on stdio would give a performance boost to many apps? Or is there something specific about how grep(1) is using its input that makes it a horse of a different color? In stdio, there is some overhead of FILE * locking but in first phase we reduced that overhead by locking once after opening and releasing the lock once before closing (it's fine given that grep isn't threaded). In the previous code, grep read data by character (calling fgetc_unlocked) and now it reads in bigger chunks, this is another difference, which may have improved the performance. We haven't checked using stdio in chunks, because dealing directly with file descriptors made it easier to handle gzip/bzip2 files, so after having seen that the old solution was wrong, this idea came directly. So I cannot surely answer the question. It would be an interesting task to run a benchmark on this, though. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r211463 - head/usr.bin/grep
Author: gabor Date: Wed Aug 18 17:40:10 2010 New Revision: 211463 URL: http://svn.freebsd.org/changeset/base/211463 Log: - Refactor file reading code to use pure syscalls and an internal buffer instead of stdio. This gives BSD grep a very big performance boost, its speed is now almost comparable to GNU grep. Submitted by: Dimitry Andric Approved by: delphij (mentor) Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/file.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cWed Aug 18 17:39:47 2010 (r211462) +++ head/usr.bin/grep/fastgrep.cWed Aug 18 17:40:10 2010 (r211463) @@ -198,7 +198,7 @@ fastcomp(fastgrep_t *fg, const char *pat } int -grep_search(fastgrep_t *fg, unsigned char *data, size_t len, regmatch_t *pmatch) +grep_search(fastgrep_t *fg, const unsigned char *data, size_t len, regmatch_t *pmatch) { unsigned int j; int ret = REG_NOMATCH; Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cWed Aug 18 17:39:47 2010(r211462) +++ head/usr.bin/grep/file.cWed Aug 18 17:40:10 2010(r211463) @@ -2,7 +2,8 @@ /*- * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav - * Copyright (C) 2008-2009 Gabor Kovesdan + * Copyright (C) 2008-2010 Gabor Kovesdan + * Copyright (C) 2010 Dimitry Andric * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include +#include #include #include #include @@ -47,222 +49,204 @@ __FBSDID("$FreeBSD$"); #include "grep.h" -static char fname[MAXPATHLEN]; /* file name */ +#defineMAXBUFSIZ (32 * 1024) +#defineLNBUFBUMP 80 -#define MAXBUFSIZ (16 * 1024) -#define PREREAD_M 0.2 +static gzFile gzbufdesc; +static BZFILE* bzbufdesc; -/* Some global variables for the buffering and reading. */ -static char*lnbuf; -static size_t lnbuflen; -static unsigned char *binbuf; -static int binbufsiz; -unsigned char *binbufptr; -static int bzerr; +static unsigned char buffer[MAXBUFSIZ]; +static unsigned char *bufpos; +static size_t bufrem; -#define iswbinary(ch) (!iswspace((ch)) && iswcntrl((ch)) && \ - (ch != L'\b') && (ch != L'\0')) +static unsigned char *lnbuf; +static size_t lnbuflen; -/* - * Returns a single character according to the file type. - * Returns -1 on failure. - */ static inline int -grep_fgetc(struct file *f) +grep_refill(struct file *f) { - unsigned char c; + ssize_t nr; + int bzerr; - switch (filebehave) { - case FILE_STDIO: - return (getc_unlocked(f->f)); - case FILE_GZIP: - return (gzgetc(f->gzf)); - case FILE_BZIP: - BZ2_bzRead(&bzerr, f->bzf, &c, 1); - if (bzerr == BZ_STREAM_END) - return (-1); - else if (bzerr != BZ_SEQUENCE_ERROR && bzerr != BZ_OK) - errx(2, "%s", getstr(2)); - return (c); - } - return (-1); + bufpos = buffer; + bufrem = 0; + + if (filebehave == FILE_GZIP) + nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); + else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { + nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); + switch (bzerr) { + case BZ_OK: + case BZ_STREAM_END: + /* No problem, nr will be okay */ + break; + case BZ_DATA_ERROR_MAGIC: + /* +* As opposed to gzread(), which simply returns the +* plain file data, if it is not in the correct +* compressed format, BZ2_bzRead() instead aborts. +* +* So, just restart at the beginning of the file again, +* and use plain reads from now on. +*/ + BZ2_bzReadClose(&bzerr, bzbufdesc); + bzbufdesc = NULL; + if (lseek(f->fd, 0, SEEK_SET) == -1) + return (-1); + nr = read(f->fd, buffer, MAXBUFSIZ); + break; + default: + /* Make sure we exit with an error */ + nr = -1; + } + } else + nr = read(f->fd, buffer,
svn commit: r211364 - head/usr.bin/grep
Author: gabor Date: Sun Aug 15 22:15:04 2010 New Revision: 211364 URL: http://svn.freebsd.org/changeset/base/211364 Log: - Revert strlcpy() changes to memcpy() because it's more efficient and former may be safer but in this case it doesn't add extra safety [1] - Fix -w option [2] - Fix handling of GREP_OPTIONS [3] - Fix --line-buffered - Make stdin input imply --line-buffered so that tail -f can be piped to grep [4] - Imply -h if single file is grepped, this is the GNU behaviour - Reduce locking overhead to gain some more performance [5] - Inline some functions to help the compiler better optimize the code - Use shortcut for empty files [6] PR: bin/149425 [6] Prodded by: jilles [1] Reported by: Alex Kozlov [2] [3], swel...@gmail.com [2], poyop...@puripuri.plala.or.jp [4] Submitted by: scf [5], Shuichi KITAGUCHI [6] Approved by: delphij (mentor) Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/file.c head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cSun Aug 15 22:09:43 2010 (r211363) +++ head/usr.bin/grep/fastgrep.cSun Aug 15 22:15:04 2010 (r211364) @@ -46,8 +46,8 @@ __FBSDID("$FreeBSD$"); #include "grep.h" -static int grep_cmp(const unsigned char *, const unsigned char *, size_t); -static voidgrep_revstr(unsigned char *, int); +static inline int grep_cmp(const unsigned char *, const unsigned char *, size_t); +static inline void grep_revstr(unsigned char *, int); void fgrepcomp(fastgrep_t *fg, const char *pat) @@ -273,7 +273,7 @@ grep_search(fastgrep_t *fg, unsigned cha * Returns:i >= 0 on failure (position that it failed) * -1 on success */ -static int +static inline int grep_cmp(const unsigned char *pat, const unsigned char *data, size_t len) { size_t size; @@ -318,7 +318,7 @@ grep_cmp(const unsigned char *pat, const return (-1); } -static void +static inline void grep_revstr(unsigned char *str, int len) { int i; Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cSun Aug 15 22:09:43 2010(r211363) +++ head/usr.bin/grep/file.cSun Aug 15 22:15:04 2010(r211364) @@ -67,14 +67,14 @@ static int bzerr; * Returns a single character according to the file type. * Returns -1 on failure. */ -int +static inline int grep_fgetc(struct file *f) { unsigned char c; switch (filebehave) { case FILE_STDIO: - return (fgetc(f->f)); + return (getc_unlocked(f->f)); case FILE_GZIP: return (gzgetc(f->gzf)); case FILE_BZIP: @@ -92,13 +92,13 @@ grep_fgetc(struct file *f) * Returns true if the file position is a EOF, returns false * otherwise. */ -int +static inline int grep_feof(struct file *f) { switch (filebehave) { case FILE_STDIO: - return (feof(f->f)); + return (feof_unlocked(f->f)); case FILE_GZIP: return (gzeof(f->gzf)); case FILE_BZIP: @@ -131,6 +131,9 @@ grep_fgetln(struct file *f, size_t *len) st.st_size = MAXBUFSIZ; else if (stat(fname, &st) != 0) err(2, NULL); + /* no need to allocate buffer. */ + if (st.st_size == 0) + return (NULL); bufsiz = (MAXBUFSIZ > (st.st_size * PREREAD_M)) ? (st.st_size / 2) : MAXBUFSIZ; @@ -142,6 +145,8 @@ grep_fgetln(struct file *f, size_t *len) if (ch == EOF) break; binbuf[i++] = ch; + if ((ch == '\n') && lbflag) + break; } f->binary = memchr(binbuf, (filebehave != FILE_GZIP) ? @@ -184,11 +189,16 @@ grep_stdin_open(void) { struct file *f; + /* Processing stdin implies --line-buffered for tail -f to work. */ + lbflag = true; + snprintf(fname, sizeof fname, "%s", getstr(1)); f = grep_malloc(sizeof *f); + binbuf = NULL; if ((f->f = fdopen(STDIN_FILENO, "r")) != NULL) { + flockfile(f->f); f->stdin = true; return (f); } @@ -209,11 +219,14 @@ grep_open(const char *path) f = grep_malloc(sizeof *f); + binbuf = NULL; f->stdin = false; switch (filebehave) { case FILE_STDIO: - if ((f->
svn commit: r211141 - head/etc/periodic/security
Author: gabor Date: Tue Aug 10 11:15:17 2010 New Revision: 211141 URL: http://svn.freebsd.org/changeset/base/211141 Log: - Fixes to the chkportsum script to handle better some special cases, like spaces in filename Submitted by: Alex Kozlov Approved by: delphij (mentor) Modified: head/etc/periodic/security/460.chkportsum Modified: head/etc/periodic/security/460.chkportsum == --- head/etc/periodic/security/460.chkportsum Tue Aug 10 11:02:55 2010 (r211140) +++ head/etc/periodic/security/460.chkportsum Tue Aug 10 11:15:17 2010 (r211141) @@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched case "${daily_status_security_chkportsum_enable}" in [Yy][Ee][Ss]) + set -f pkg_info -ga 2>/dev/null | \ - while read one two three; do - case ${one} in + while IFS= read -r line; do + set -- $line + case $1 in Information) - case ${two} in - for) name=${three%%:} ;; - *) name='??' ;; + case $2 in + for) name="${3%%:}" ;; + *) name='??' ;; esac ;; Mismatched|'') ;; - *) - if [ -n ${name} ]; then - echo ${name}: ${one} - fi + *) [ -n "${name}" ] && + echo "${name}: ${line%% fails the original MD5 checksum}" ;; esac done ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210927 - head/usr.bin/grep/nls
Author: gabor Date: Fri Aug 6 10:34:48 2010 New Revision: 210927 URL: http://svn.freebsd.org/changeset/base/210927 Log: - Some fixes to Ukranian catalog Submitted by: avg, Alex Kozlov Modified: head/usr.bin/grep/nls/uk_UA.UTF-8.msg Modified: head/usr.bin/grep/nls/uk_UA.UTF-8.msg == --- head/usr.bin/grep/nls/uk_UA.UTF-8.msg Fri Aug 6 09:47:48 2010 (r210926) +++ head/usr.bin/grep/nls/uk_UA.UTF-8.msg Fri Aug 6 10:34:48 2010 (r210927) @@ -1,8 +1,8 @@ $ $FreeBSD$ $set 1 $quote " -1 "(стандартний ввод)" -2 "не можу прочитати стислий bzip2 файл" +1 "(стандартний ввід)" +2 "не можу прочитати стиснутий bzip2 файл" 3 "невiдома опція %s" 4 "використання: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A чис] [-B чис] [-C[чис]]\n" 5 "\t[-e шаблон] [-f файл] [--binary-files=значення] [--color=коли]\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210639 - head/usr.bin/grep/nls
Author: gabor Date: Fri Jul 30 11:07:24 2010 New Revision: 210639 URL: http://svn.freebsd.org/changeset/base/210639 Log: - Add Ukranian catalog Submitted by: Alex Kozlov Added: head/usr.bin/grep/nls/uk_UA.UTF-8.msg (contents, props changed) Modified: head/usr.bin/grep/nls/Makefile.inc Modified: head/usr.bin/grep/nls/Makefile.inc == --- head/usr.bin/grep/nls/Makefile.inc Fri Jul 30 09:38:47 2010 (r210638) +++ head/usr.bin/grep/nls/Makefile.inc Fri Jul 30 11:07:24 2010 (r210639) @@ -9,6 +9,7 @@ NLS+= ja_JP.SJIS NLS+= ja_JP.UTF-8 NLS+= pt_BR.ISO8859-1 NLS+= ru_RU.KOI8-R +NLS+= uk_UA.UTF-8 NLSSRCDIR= ${.CURDIR}/nls .for lang in ${NLS} Added: head/usr.bin/grep/nls/uk_UA.UTF-8.msg == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/uk_UA.UTF-8.msg Fri Jul 30 11:07:24 2010 (r210639) @@ -0,0 +1,12 @@ +$ $FreeBSD$ +$set 1 +$quote " +1 "(стандартний ввод)" +2 "не можу прочитати стислий bzip2 файл" +3 "невiдома опція %s" +4 "використання: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A чис] [-B чис] [-C[чис]]\n" +5 "\t[-e шаблон] [-f файл] [--binary-files=значення] [--color=коли]\n" +6 "\t[--context[=чис] [--directories=дія] [--label] [--line-buffered]\n" +7 "\t[--null] [шаблон] [файл ...]\n" +8 "двійковий файл %s співпадає\n" +9 "%s (BSD grep) %s\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r210578 - head/usr.bin/grep
Em 2010.07.29. 22:20, M. Warner Losh escreveu: In message:<20100729122034.ga28...@stack.nl> Jilles Tjoelker writes: : On Thu, Jul 29, 2010 at 12:11:14AM +, Gabor Kovesdan wrote: :> Author: gabor :> Date: Thu Jul 29 00:11:14 2010 :> New Revision: 210578 :> URL: http://svn.freebsd.org/changeset/base/210578 : :> Log: :>- Some improvements on the exiting code, like replacing memcpy with :> strlcpy/strcpy : : Hmm, I don't think this is an improvement :( I agree in this case. The changes don't actually improve the safety of the code, but may make the code slower due to the need to recompute the length... Thanks to both of you for the comments. I'll talk to my mentor and revert those changes. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210622 - in head/usr.bin/grep: . nls
Author: gabor Date: Thu Jul 29 18:02:57 2010 New Revision: 210622 URL: http://svn.freebsd.org/changeset/base/210622 Log: - Some minor changes to the messages to increase usefulness of error msgs Reviewed by: hrs (Japanese catalogs), pluknet (Russian catalog) Approved by: delphij (mentor) Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/nls/C.msg head/usr.bin/grep/nls/es_ES.ISO8859-1.msg head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg head/usr.bin/grep/nls/ja_JP.SJIS.msg head/usr.bin/grep/nls/ja_JP.UTF-8.msg head/usr.bin/grep/nls/ja_JP.eucJP.msg head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg head/usr.bin/grep/nls/ru_RU.KOI8-R.msg head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cThu Jul 29 17:52:23 2010(r210621) +++ head/usr.bin/grep/grep.cThu Jul 29 18:02:57 2010(r210622) @@ -61,14 +61,13 @@ const char *errstr[] = { "", /* 1*/ "(standard input)", /* 2*/ "cannot read bzip2 compressed file", -/* 3*/ "unknown --color option", +/* 3*/ "unknown %s option", /* 4*/ "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n", /* 5*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n", /* 6*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n", /* 7*/ "\t[--null] [pattern] [file ...]\n", -/* 8*/ "unknown --binary-files option", -/* 9*/ "Binary file %s matches\n", -/*10*/ "%s (BSD grep) %s\n", +/* 8*/ "Binary file %s matches\n", +/* 9*/ "%s (BSD grep) %s\n", }; /* Flags passed to regcomp() and regexec() */ @@ -445,10 +444,8 @@ main(int argc, char *argv[]) devbehave = DEV_SKIP; else if (strcasecmp(optarg, "read") == 0) devbehave = DEV_READ; - else { - errno = EINVAL; - err(2, NULL); - } + else + errx(2, getstr(3), "--devices"); break; case 'd': if (strcasecmp("recurse", optarg) == 0) { @@ -458,10 +455,8 @@ main(int argc, char *argv[]) dirbehave = DIR_SKIP; else if (strcasecmp("read", optarg) == 0) dirbehave = DIR_READ; - else { - errno = EINVAL; - err(2, NULL); - } + else + errx(2, getstr(3), "--directories"); break; case 'E': grepbehave = GREP_EXTENDED; @@ -552,7 +547,7 @@ main(int argc, char *argv[]) /* noop, compatibility */ break; case 'V': - printf(getstr(10), __progname, VERSION); + printf(getstr(9), __progname, VERSION); exit(0); case 'v': vflag = true; @@ -574,7 +569,7 @@ main(int argc, char *argv[]) else if (strcasecmp("text", optarg) == 0) binbehave = BINFILE_TEXT; else - errx(2, "%s", getstr(8)); + errx(2, getstr(3), "--binary-files"); break; case COLOR_OPT: color = NULL; @@ -594,7 +589,7 @@ main(int argc, char *argv[]) } else if (strcasecmp("never", optarg) != 0 && strcasecmp("none", optarg) != 0 && strcasecmp("no", optarg) != 0) - errx(2, "%s", getstr(3)); + errx(2, getstr(3), "--color"); break; case LABEL_OPT: label = optarg; Modified: head/usr.bin/grep/nls/C.msg == --- head/usr.bin/grep/nls/C.msg Thu Jul 29 17:52:23 2010(r210621) +++ head/usr.bin/grep/nls/C.msg Thu Jul 29 18:02:57 2010(r210622) @@ -4,11 +4,10 @@ $set 1 $quote " 1 "(standard input)" 2 "cannot read bzip2 compressed file" -3 "unknown --color option" +3 "unknown %s option" 4 "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n" 5 "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n" 6 "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n" 7 "\t[--null] [pattern] [file ...]\n" -8 "unknown --binary-files option" -9 "Binary file %s matches\n" -10 "%s (BSD grep) %s\n" +8 "Binary file %s matches\n" +9 "%s (BSD grep) %s\n"
svn commit: r210579 - head/usr.bin/grep/nls
Author: gabor Date: Thu Jul 29 01:15:26 2010 New Revision: 210579 URL: http://svn.freebsd.org/changeset/base/210579 Log: - Add Japanese NLS catalogs Submitted by: hrs Approved by: delphij (mentor) Added: head/usr.bin/grep/nls/ja_JP.SJIS.msg (contents, props changed) head/usr.bin/grep/nls/ja_JP.UTF-8.msg (contents, props changed) head/usr.bin/grep/nls/ja_JP.eucJP.msg (contents, props changed) Modified: head/usr.bin/grep/nls/Makefile.inc Modified: head/usr.bin/grep/nls/Makefile.inc == --- head/usr.bin/grep/nls/Makefile.inc Thu Jul 29 00:11:14 2010 (r210578) +++ head/usr.bin/grep/nls/Makefile.inc Thu Jul 29 01:15:26 2010 (r210579) @@ -4,6 +4,9 @@ NLSNAME= grep NLS= es_ES.ISO8859-1 NLS+= gl_ES.ISO8859-1 NLS+= hu_HU.ISO8859-2 +NLS+= ja_JP.eucJP +NLS+= ja_JP.SJIS +NLS+= ja_JP.UTF-8 NLS+= pt_BR.ISO8859-1 NLS+= ru_RU.KOI8-R Added: head/usr.bin/grep/nls/ja_JP.SJIS.msg == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.SJIS.msgThu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(�W��)" +2 "bzip2 ���k...@�c�ǂݍ��ނ��Ƃ��ł��܂���" +3 "--color �I�v�V�̎w���l�Ɍ��肪�܂�" +4 "�g: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ] [-B ] [-C[]]\n" +5 "\t[-e �p�^�[��] [-f �...@�c] [--binary-files=�l] [--color=�l]\n" +6 "\t[--context[=]] [--directories=] [--label] [--line-buffered]\n" +7 "\t[--null] [�p�^�[��] [...@�c ...]\n" +8 "--binary-files �I�v�V�̎w���l�Ɍ��肪�܂�" +9 "�o�c�i��...@�c�� %s �Ƀ}�b�`���܂���\n" +10 "%s (BSD grep) %s\n" Added: head/usr.bin/grep/nls/ja_JP.UTF-8.msg == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.UTF-8.msg Thu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(標準入力)" +2 "bzip2 圧縮ファイルを読み込むことができません" +3 "--color オプションの指定値に誤りがあります" +4 "使い方: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A 数字] [-B 数字] [-C[数字]]\n" +5 "\t[-e パターン] [-f ファイル名] [--binary-files=値] [--color=値]\n" +6 "\t[--context[=数字]] [--directories=動作] [--label] [--line-buffered]\n" +7 "\t[--null] [パターン] [ファイル名 ...]\n" +8 "--binary-files オプションの指定値に誤りがあります" +9 "バイナリファイル %s にマッチしました\n" +10 "%s (BSD grep) %s\n" Added: head/usr.bin/grep/nls/ja_JP.eucJP.msg == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ja_JP.eucJP.msg Thu Jul 29 01:15:26 2010 (r210579) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(ɸ��)" +2 "bzip2 ���̥եɤ߹��ळ�Ȥ��Ǥ��ޤ���" +3 "--color ���ץ��λͤ˸��꤬�ޤ�" +4 "�Ȥ���: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ] [-B ] [-C[]]\n" +5 "\t[-e �ѥ�] [-f �ե�̾] [--binary-files=��] [--color=��]\n" +6 "\t[--context[=]] [--directories=ư��] [--label] [--line-buffered]\n" +7 "\t[--null] [�ѥ�] [�ե�̾ ...]\n" +8 "--binary-files ���ץ��λͤ˸��꤬�ޤ�" +9 "�Х��ʥ��ե� %s �˥ޥåޤ���\n" +10 "%s (BSD grep) %s\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210578 - head/usr.bin/grep
Author: gabor Date: Thu Jul 29 00:11:14 2010 New Revision: 210578 URL: http://svn.freebsd.org/changeset/base/210578 Log: - Use the traditional behaviour for filename and directory name inclusion and exclusion patterns [1] - Some improvements on the exiting code, like replacing memcpy with strlcpy/strcpy Approved by: delphij (mentor) Pointed out by: bf [1], des [1] Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/grep.1 head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cWed Jul 28 21:52:09 2010 (r210577) +++ head/usr.bin/grep/fastgrep.cThu Jul 29 00:11:14 2010 (r210578) @@ -119,8 +119,7 @@ fastcomp(fastgrep_t *fg, const char *pat * string respectively. */ fg->pattern = grep_malloc(fg->len + 1); - memcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len); - fg->pattern[fg->len] = '\0'; + strlcpy(fg->pattern, pat + (bol ? 1 : 0) + wflag, fg->len + 1); /* Look for ways to cheat...er...avoid the full regex engine. */ for (i = 0; i < fg->len; i++) { Modified: head/usr.bin/grep/grep.1 == --- head/usr.bin/grep/grep.1Wed Jul 28 21:52:09 2010(r210577) +++ head/usr.bin/grep/grep.1Thu Jul 29 00:11:14 2010(r210578) @@ -29,7 +29,7 @@ .\" .\"@(#)grep.1 8.3 (Berkeley) 4/18/94 .\" -.Dd September 19, 2009 +.Dd July 28, 2010 .Dt GREP 1 .Os .Sh NAME @@ -186,15 +186,31 @@ options are used to specify multiple pat or when a pattern begins with a dash .Pq Sq - . .It Fl Fl exclude -If -.Fl R -is specified, it excludes files matching the given -filename pattern. +If specified, it excludes files matching the given +filename pattern from the search. +Note that +.Fl Fl exclude +patterns take priority over +.Fl Fl include +patterns, and if no +.Fl Fl include +pattern is specified, all files are searched that are +not excluded. +Patterns are matched to the full path specified, +not only to the filename component. .It Fl Fl exclude-dir If .Fl R is specified, it excludes directories matching the -given filename pattern. +given filename pattern from the search. +Note that +.Fl Fl exclude-dir +patterns take priority over +.Fl Fl include-dir +patterns, and if no +.Fl Fl include-dir +pattern is specified, all directories are searched that are +not excluded. .It Fl F , Fl Fl fixed-strings Interpret .Ar pattern @@ -238,15 +254,25 @@ By default, .Nm grep is case sensitive. .It Fl Fl include -If -.Fl R -is specified, it includes the files matching the -given filename pattern. +If specified, only files matching the +given filename pattern are searched. +Note that +.Fl Fl exclude +patterns take priority over +.Fl Fl include +patterns. +Patterns are matched to the full path specified, +not only to the filename component. .It Fl Fl include-dir If .Fl R -is specified, it includes the directories matching the -given filename pattern. +is specified, only directories matching the +given filename pattern are searched. +Note that +.Fl Fl exclude-dir +patterns take priority over +.Fl Fl include-dir +patterns. .It Fl J, Fl Fl bz2decompress Decompress the .Xr bzip2 1 Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cWed Jul 28 21:52:09 2010(r210577) +++ head/usr.bin/grep/grep.cThu Jul 29 00:11:14 2010(r210578) @@ -85,8 +85,9 @@ regex_t *r_pattern; fastgrep_t *fg_pattern; /* Filename exclusion/inclusion patterns */ -unsigned intepatterns, epattern_sz; -struct epat*epattern; +unsigned intfpatterns, fpattern_sz; +unsigned intdpatterns, dpattern_sz; +struct epat*dpattern, *fpattern; /* For regex errors */ charre_error[RE_ERROR_BUF + 1]; @@ -112,7 +113,6 @@ bool wflag; /* -w: pattern must start boolxflag; /* -x: pattern must match entire line */ boollbflag;/* --line-buffered */ boolnullflag; /* --null */ -boolexclflag; /* --exclude */ char *label; /* --label */ const char *color; /* --color */ int grepbehave = GREP_BASIC; /* -EFGP: type of the regex */ @@ -122,6 +122,9 @@ int devbehave = DEV_READ; /* -D: handl int dirbehave = DIR_READ; /* -dRr: handling of directories */ int linkbehave = LINK_READ;/* -OpS: handling of symlinks */ +booldexclude, dinclude;/* --exclude amd --include */ +boolfexclude, finclude;/* --exclude-dir and --include-dir */ + enum { BIN_OPT = CHAR_MAX + 1, COLOR_OPT, @@ -234,32 +237,44 @@ add_pattern(char *pat, size_t len) --len;
Re: svn commit: r210479 - head/usr.bin/grep
Em 2010.07.25. 22:17, Doug Barton escreveu: On Sun, 25 Jul 2010, Gabor Kovesdan wrote: Author: gabor Date: Sun Jul 25 18:57:48 2010 New Revision: 210479 URL: http://svn.freebsd.org/changeset/base/210479 Log: - Fix -l and -L by really surpressing output and just showing filenames Submitted by:swel...@gmail.com and dougb. :) (It was part of the patch I sent on Friday.) I had to merge your patch with another one that I had in my working copy and I didn't catch this part. Sorry for that, it was my mistake. And not to pile on, but regression testing should have caught this. First by you, and if all else fails, by your mentor. At very least the thought process could have gone something like: "Let's see, the patch that I/Gabor generated to fix this problem is different than the one Doug generated. Now Doug is not a _complete_ moron, so let's take a careful look at this change and see if it really does what we think it should do." Nobody told that you were a moron and I did run regression testing, the test suite that GNU grep has. It passes a good number of them and some only fail because of their non-standard regexes and GNU-specific idiotism, like whether gnu --help contains the "Report bugs to ." . Even the GNU version that we have in base fails on 6 tests of latest GNU grep's test suite. Regression testing is good but sometimes real users are necessary to axe out bugs and I think we are going into the right direction and I still don't consider importing BSD grep a mistake. Bugs might appear but as you can see I'm trying to fix them asap and grep is improving in this way. Although grep seems to be a little silly utility on the top of the regex library, it's quite complex and it involves a lot of things, like the GNU regex syntax. That's why it took so long to get it to base. There were 4 exp-runs and varios CFTs but these bugs haven't been found so far so I think this broader exposure was quite a good decision. Aside from the fact that despite its innocuous appearance grep really is an important tool; I've expressed frustration in the past that mentors are not in place to simply rubber stamp things. Mentors serve at least 2 critical functions; to introduce mentees to "The FreeBSD Culture," and to sanity-check changes. No matter how technically competent the mentee is (and obviously Gabor is a sharp guy) both of these functions are critical to their successful introduction into the wonderful world of DougBS^W I mean, uh, FreeBSD. :) My mentor really helped a lot and made lots of suggestions to improve the code but he's also a human being, he can't see everything either. :) These bugs survived lots of testing and review so it's not a surprise that he didn't found them either. Let's not flame about it any more just concentrate on bugfixing. Please send me more reports if you find anything. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210479 - head/usr.bin/grep
Author: gabor Date: Sun Jul 25 18:57:48 2010 New Revision: 210479 URL: http://svn.freebsd.org/changeset/base/210479 Log: - Fix -l and -L by really surpressing output and just showing filenames Submitted by: swel...@gmail.com Approved by: delphij (mentor) Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cSun Jul 25 18:32:59 2010(r210478) +++ head/usr.bin/grep/util.cSun Jul 25 18:57:48 2010(r210479) @@ -343,7 +343,7 @@ procline(struct str *l, int nottext) return (c); /* Binary file */ /* Dealing with the context */ - if ((tail || c) && !cflag && !qflag) { + if ((tail || c) && !cflag && !qflag && !lflag && !Lflag) { if (c) { if (!first && !prev && !tail && Aflag) printf("--\n"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210461 - head/usr.bin/grep
Author: gabor Date: Sun Jul 25 08:42:18 2010 New Revision: 210461 URL: http://svn.freebsd.org/changeset/base/210461 Log: - Fix --color behaviour to only output color sequences if stdout is a tty or if forced mode is specified [1] - While here, add some alternative names for the options and make then case-insensitive - Fix -q and -l behaviour [2] - Some small changes to make the code easier to review Submitted by: swel...@gmail.com [1], dougb [2] Approved by:delphij (mentor) Modified: head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/util.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cSun Jul 25 04:19:05 2010(r210460) +++ head/usr.bin/grep/grep.cSun Jul 25 08:42:18 2010(r210461) @@ -114,13 +114,13 @@ bool lbflag;/* --line-buffered */ boolnullflag; /* --null */ boolexclflag; /* --exclude */ char *label; /* --label */ -char *color; /* --color */ +const char *color; /* --color */ int grepbehave = GREP_BASIC; /* -EFGP: type of the regex */ int binbehave = BINFILE_BIN; /* -aIU: handling of binary files */ int filebehave = FILE_STDIO; /* -JZ: normal, gzip or bzip2 file */ -int devbehave = DEV_GREP; /* -D: handling of devices */ -int dirbehave = DIR_GREP; /* -dRr: handling of directories */ -int linkbehave = LINK_GREP;/* -OpS: handling of symlinks */ +int devbehave = DEV_READ; /* -D: handling of devices */ +int dirbehave = DIR_READ; /* -dRr: handling of directories */ +int linkbehave = LINK_READ;/* -OpS: handling of symlinks */ enum { BIN_OPT = CHAR_MAX + 1, @@ -136,6 +136,8 @@ enum { R_DINCLUDE_OPT }; +static inline const char *init_color(const char *); + /* Housekeeping */ boolfirst = true; /* flag whether we are processing the first match */ boolprev; /* flag whether or not the previous line matched */ @@ -279,6 +281,15 @@ read_patterns(const char *fn) fclose(f); } +static inline const char * +init_color(const char *d) +{ + char *c; + + c = getenv("GREP_COLOR"); + return (c != NULL ? c : d); +} + int main(int argc, char *argv[]) { @@ -415,16 +426,24 @@ main(int argc, char *argv[]) cflag = true; break; case 'D': - if (strcmp(optarg, "skip") == 0) + if (strcasecmp(optarg, "skip") == 0) devbehave = DEV_SKIP; + else if (strcasecmp(optarg, "read") == 0) + devbehave = DEV_READ; + else { + errno = EINVAL; + err(2, NULL); + } break; case 'd': - if (strcmp("recurse", optarg) == 0) { + if (strcasecmp("recurse", optarg) == 0) { Hflag = true; dirbehave = DIR_RECURSE; - } else if (strcmp("skip", optarg) == 0) + } else if (strcasecmp("skip", optarg) == 0) dirbehave = DIR_SKIP; - else if (strcmp("read", optarg) != 0) { + else if (strcasecmp("read", optarg) == 0) + dirbehave = DIR_READ; + else { errno = EINVAL; err(2, NULL); } @@ -466,11 +485,11 @@ main(int argc, char *argv[]) break; case 'L': lflag = false; - Lflag = qflag = true; + Lflag = true; break; case 'l': Lflag = false; - lflag = qflag = true; + lflag = true; break; case 'm': mflag = true; @@ -500,7 +519,7 @@ main(int argc, char *argv[]) qflag = true; break; case 'S': - linkbehave = LINK_GREP; + linkbehave = LINK_READ; break; case 'R': case 'r': @@ -533,26 +552,33 @@ main(int argc, char *argv[]) filebehave = FILE_GZIP; break; case BIN_OPT: - if (strcmp("binary", optarg) == 0) + if (strcasecmp("binary", optarg) == 0) binbehave = BINFILE_BIN; - else
Re: svn commit: r210430 - head/usr.bin/grep
Em 2010.07.23. 21:36, Xin LI escreveu: Author: delphij Date: Fri Jul 23 19:36:11 2010 New Revision: 210430 URL: http://svn.freebsd.org/changeset/base/210430 Log: Fix crashes when using grep -R: - Explicitly pre-zero memory for fts_open parameters. - Don't test against directory patterns when we are testing direct leaf of current directory. While I'm there plug a few of memory leaks. Thanks! Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210426 - in head/usr.bin/grep: . nls
Author: gabor Date: Fri Jul 23 17:42:42 2010 New Revision: 210426 URL: http://svn.freebsd.org/changeset/base/210426 Log: - Add Russian catalog [1] - Fix two minor nits in manpage [2] - style.Makefile(5) Submitted by: pluknet [1], Alex Kozlov [2] Reviewed by:delphij Added: head/usr.bin/grep/nls/ru_RU.KOI8-R.msg (contents, props changed) Modified: head/usr.bin/grep/grep.1 head/usr.bin/grep/nls/Makefile.inc Modified: head/usr.bin/grep/grep.1 == --- head/usr.bin/grep/grep.1Fri Jul 23 17:32:47 2010(r210425) +++ head/usr.bin/grep/grep.1Fri Jul 23 17:42:42 2010(r210426) @@ -29,7 +29,7 @@ .\" .\"@(#)grep.1 8.3 (Berkeley) 4/18/94 .\" -.Dd 19 September, 2009 +.Dd September 19, 2009 .Dt GREP 1 .Os .Sh NAME @@ -374,7 +374,7 @@ and block buffered otherwise. .Pp .El If no file arguments are specified, the standard input is used. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm grep utility exits with one of the following values: Modified: head/usr.bin/grep/nls/Makefile.inc == --- head/usr.bin/grep/nls/Makefile.inc Fri Jul 23 17:32:47 2010 (r210425) +++ head/usr.bin/grep/nls/Makefile.inc Fri Jul 23 17:42:42 2010 (r210426) @@ -1,12 +1,13 @@ # $FreeBSD$ -NLSNAME= grep +NLSNAME= grep NLS= es_ES.ISO8859-1 NLS+= gl_ES.ISO8859-1 NLS+= hu_HU.ISO8859-2 NLS+= pt_BR.ISO8859-1 +NLS+= ru_RU.KOI8-R -NLSSRCDIR= ${.CURDIR}/nls +NLSSRCDIR= ${.CURDIR}/nls .for lang in ${NLS} NLSSRCFILES_${lang}=${lang}.msg .endfor Added: head/usr.bin/grep/nls/ru_RU.KOI8-R.msg == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Fri Jul 23 17:42:42 2010 (r210426) @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(��� )" +2 "�� � �� � bzip2 " +3 "��� --color" +4 "�: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A ���] [-B ���] [-C[���]]\n" +5 "\t[-e ��] [-f ] [--binary-files=] [--color=�]\n" +6 "\t[--context[=���]] [--directories=] [--label] [--line-buffered]\n" +7 "\t[--null] [��] [ ...]\n" +8 "��� --binary-files" +9 " %s �\n" +10 "%s (BSD grep) %s\n" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210392 - head/share/man/man5
Author: gabor Date: Thu Jul 22 19:30:13 2010 New Revision: 210392 URL: http://svn.freebsd.org/changeset/base/210392 Log: - Regenerate after adding WITH_GNU_GREP Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Thu Jul 22 19:22:32 2010 (r210391) +++ head/share/man/man5/src.conf.5 Thu Jul 22 19:30:13 2010 (r210392) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd June 10, 2010 +.Dd July 22, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -346,9 +346,9 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITHOUT_GNU_GREP -.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP 179813 2008-06-16 05:48:15Z dougb -Set to not build GNU grep as a part of the base system. +.It Va WITH_GNU_GREP +.\" from FreeBSD: head/tools/build/options/WITH_GNU_GREP 210389 2010-07-22 19:11:57Z gabor +Set to build the base system with GNU grep instead of BSD grep .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210390 - head/sys/sys
Author: gabor Date: Thu Jul 22 19:15:26 2010 New Revision: 210390 URL: http://svn.freebsd.org/changeset/base/210390 Log: - Bump __FreeBSD_version for BSD grep import Approved by: delphij (mentor) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hThu Jul 22 19:11:57 2010(r210389) +++ head/sys/sys/param.hThu Jul 22 19:15:26 2010(r210390) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900014 /* Master, propagated to newvers */ +#define __FreeBSD_version 900015 /* Master, propagated to newvers */ #ifndef LOCORE #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210389 - in head: . share/mk tools/build/options usr.bin usr.bin/grep usr.bin/grep/nls
) +++ head/usr.bin/Makefile Thu Jul 22 19:11:57 2010(r210389) @@ -79,6 +79,7 @@ SUBDIR= alias \ getent \ getopt \ ${_gprof} \ + ${_grep} \ gzip \ head \ ${_hesinfo} \ @@ -284,6 +285,10 @@ _calendar= calendar _clang=clang .endif +.if ${MK_GNU_GREP} != "yes" +_grep= grep +.endif + .if ${MK_HESIOD} != "no" _hesinfo= hesinfo .endif Added: head/usr.bin/grep/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/Makefile Thu Jul 22 19:11:57 2010(r210389) @@ -0,0 +1,35 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ + +PROG= grep +SRCS= fastgrep.c file.c grep.c queue.c util.c +LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ + ${BINDIR}/grep ${BINDIR}/fgrep \ + ${BINDIR}/grep ${BINDIR}/zgrep \ + ${BINDIR}/grep ${BINDIR}/zegrep \ + ${BINDIR}/grep ${BINDIR}/zfgrep \ + +MLINKS= grep.1 egrep.1 \ + grep.1 fgrep.1 \ + grep.1 zgrep.1 \ + grep.1 zegrep.1 \ + grep.1 zfgrep.1 + +WARNS?=6 + +LDADD= -lz -lbz2 +DPADD= ${LIBZ} ${LIBBZ2} + +.if !defined(WITHOUT_GNU_COMPAT) +CFLAGS+= -I/usr/include/gnu +LDADD+=-lgnuregex +DPADD+=${LIBGNUREGEX} +.endif + +.if !defined(WITHOUT_NLS) +.include "${.CURDIR}/nls/Makefile.inc" +.else +CFLAGS+= -DWITHOUT_NLS +.endif + +.include Added: head/usr.bin/grep/fastgrep.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/grep/fastgrep.cThu Jul 22 19:11:57 2010 (r210389) @@ -0,0 +1,333 @@ +/* $OpenBSD: util.c,v 1.36 2007/10/02 17:59:18 otto Exp $ */ + +/*- + * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (C) 2008 Gabor Kovesdan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * XXX: This file is a speed up for grep to cover the defects of the + * regex library. These optimizations should practically be implemented + * there keeping this code clean. This is a future TODO, but for the + * meantime, we need to use this workaround. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include "grep.h" + +static int grep_cmp(const unsigned char *, const unsigned char *, size_t); +static voidgrep_revstr(unsigned char *, int); + +void +fgrepcomp(fastgrep_t *fg, const char *pat) +{ + unsigned int i; + + /* Initialize. */ + fg->len = strlen(pat); + fg->bol = false; + fg->eol = false; + fg->reversed = false; + + fg->pattern = grep_malloc(strlen(pat) + 1); + strcpy(fg->pattern, pat); + + /* Preprocess pattern. */ + for (i = 0; i <= UCHAR_MAX; i++) + fg->qsBc[i] = fg->len; + for (i = 1; i < fg->len; i++) + fg->qsBc[fg->pattern[i]] = fg->len - i; +} + +/* + * Returns: -1 on failure, 0 on success + */ +int +fastcomp(fastgrep_t *fg, const char *pat) +{ + unsigned int i; + int firstHalfDot = -1; + int firstLastHalfDot = -1; + int hasDot = 0; + int lastHalfDot = 0; + int shiftPatternLen; + bool bol = false; + bool eol = false; + + /* Initialize. */ + fg->len = strlen(pat); + fg->bol = false; + fg->eol = false; + fg->reversed = false; + + /* Remove end-of-line character ('$
svn commit: r210255 - head/usr.sbin/sysinstall
Author: gabor Date: Mon Jul 19 20:22:21 2010 New Revision: 210255 URL: http://svn.freebsd.org/changeset/base/210255 Log: - Add Latinamerican keymaps to sysinstall's Makefile so that it can find them [1] - While here, also add a missing Spanish entry PR: bin/67365 [1] Submitted by: Pedro F. Giffuni [1] Approved by: delphij (mentor) Modified: head/usr.sbin/sysinstall/Makefile Modified: head/usr.sbin/sysinstall/Makefile == --- head/usr.sbin/sysinstall/Makefile Mon Jul 19 20:19:14 2010 (r210254) +++ head/usr.sbin/sysinstall/Makefile Mon Jul 19 20:22:21 2010 (r210255) @@ -79,8 +79,9 @@ KEYMAPS= be.iso bg.bds.ctrlcaps bg.phone ce.iso2 cs.latin2.qwertz danish.iso el.iso07 \ estonian.cp850 estonian.iso estonian.iso15 finnish.iso fr.iso \ german.iso gr.elot.acc gr.us101.acc hr.iso hu.iso2.101keys \ - it.iso icelandic.iso jp.106 norwegian.iso pl_PL.ISO8859-2 \ - pt.iso ru.koi8-r si.iso sk.iso2 spanish.iso swedish.iso \ + it.iso icelandic.iso jp.106 latinamerican latinamerican.iso.acc \ + norwegian.iso pl_PL.ISO8859-2 \ + pt.iso ru.koi8-r si.iso sk.iso2 spanish.iso spanish.iso.acc swedish.iso \ swissfrench.iso \ swissgerman.iso ua.koi8-u ua.koi8-u.shift.alt uk.iso us.dvorak \ us.iso us.pc-ctrl us.unix ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r210254 - in head/etc: defaults periodic/security
Author: gabor Date: Mon Jul 19 20:19:14 2010 New Revision: 210254 URL: http://svn.freebsd.org/changeset/base/210254 Log: - Add a periodic script, which can be used to find installed ports' files with mismatched checksum PR: conf/124641 Submitted by: Alex Kozlov Approved by: delphij (mentor) Added: head/etc/periodic/security/460.chkportsum (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/security/Makefile Modified: head/etc/defaults/periodic.conf == --- head/etc/defaults/periodic.conf Mon Jul 19 19:54:37 2010 (r210253) +++ head/etc/defaults/periodic.conf Mon Jul 19 20:19:14 2010 (r210254) @@ -171,6 +171,9 @@ daily_status_security_passwdless_enable= # 410.logincheck daily_status_security_logincheck_enable="YES" +# 460.chkportsum +daily_status_security_chkportsum_enable="NO" # Check ports w/ wrong checksum + # 500.ipfwdenied daily_status_security_ipfwdenied_enable="YES" Added: head/etc/periodic/security/460.chkportsum == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/security/460.chkportsum Mon Jul 19 20:19:14 2010 (r210254) @@ -0,0 +1,68 @@ +#!/bin/sh - +# +# Copyright (c) 2010 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +if [ -r /etc/defaults/periodic.conf ] +then +. /etc/defaults/periodic.conf +source_periodic_confs +fi + +. /etc/periodic/security/security.functions + +rc=0 + +echo "" +echo 'Checking for ports with mismatched checksums:' + +case "${daily_status_security_chkportsum_enable}" in + [Yy][Ee][Ss]) + pkg_info -ga 2>/dev/null | \ + while read one two three; do + case ${one} in + Information) + case ${two} in + for) name=${three%%:} ;; + *) name='??' ;; + esac + ;; + Mismatched|'') ;; + *) + if [ -n ${name} ]; then + echo ${name}: ${one} + fi + ;; + esac + done + ;; + *) + rc=0 + ;; +esac + +exit $rc Modified: head/etc/periodic/security/Makefile == --- head/etc/periodic/security/Makefile Mon Jul 19 19:54:37 2010 (r210253) +++ head/etc/periodic/security/Makefile Mon Jul 19 20:19:14 2010 (r210254) @@ -7,6 +7,7 @@ FILES= 100.chksetuid \ 300.chkuid0 \ 400.passwdless \ 410.logincheck \ + 460.chkportsum \ 700.kernelmsg \ 800.loginfail \ 900.tcpwrap \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r209787 - head/usr.sbin/sysinstall
Em 2010.07.09. 23:31, Dag-Erling Smørgrav escreveu: Alexey Dokuchaev writes: Colin Percival writes: But a more *sensual* message is probably not necessary. :-) He'd probably meant sensitive. This is getting better and better... Actually, I was trying to guess the English equivalent of Spanish word "sensato", which means something like "of common sense". According to wordreference, it should have been sensible, so both of us were wrong. :) Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r209787 - head/usr.sbin/sysinstall
Em 2010.07.09. 23:24, Randi Harper escreveu: 2010/7/9 Dag-Erling Smørgrav: Gabor Kovesdan writes: First I tried freebsd-update but it [...] was unable to produce any sensual error message Frankly, I'd be more worried if it had *succeeded* to produce sensual error messages. Someone should file a PR. I demand sensual error messages from freebsd-update. :( Ok, I now, bad English. :) You can add it to fortunes if you like it so much. :) Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r209832 - head/usr.sbin/sysinstall
Em 2010.07.08. 23:26, Randi Harper escreveu: Author: randi Date: Thu Jul 8 21:26:26 2010 New Revision: 209832 URL: http://svn.freebsd.org/changeset/base/209832 Log: Revert r209787 pending further discussion. Approved by: cperciva (mentor) Thanks! As I mentioned on IRC, I'll also try to improve this feature, I'm just very busy with other projects at the moment. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r209787 - head/usr.sbin/sysinstall
Em 2010.07.08. 10:53, Colin Percival escreveu: I just used this feature yesterday to repair my -CURRENT installation on a netbook with an USB snapshot image. First I tried freebsd-update but it just failed to fetch the keys from the servers and was unable to produce any sensual error message Yes, freebsd-update should print a more useful error message when it is asked to upgrade to a release it doesn't support (freebsd-update only does RELEASEs, BETAs, and RCs). But a more *sensual* message is probably not necessary. :-) Btw, I'm not the only one who experienced this problem: http://forums.freebsd.org/showthread.php?t=1280 In my case, the system uses Wifi but everything just works with it, except freebsd-update. I don't know how it fetches the keys but that process should not be that difficult to require extra configuration, it should just work out of the box when network is up. Gabor ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"