svn commit: r338185 - svnadmin/conf

2018-08-22 Thread Gabor Kovesdan
Author: gabor
Date: Wed Aug 22 08:31:35 2018
New Revision: 338185
URL: https://svnweb.freebsd.org/changeset/base/338185

Log:
  - Disable my mail forward; I prefer tracking commits elsewhere
  
  Approved by:  core (implicit)

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessWed Aug 22 08:27:49 2018(r338184)
+++ svnadmin/conf/accessWed Aug 22 08:31:35 2018(r338185)
@@ -79,7 +79,7 @@ eugen
 fabient
 fanf
 fsu
-gabor
+gabor  devnull
 gad
 gallatin
 ganbold
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r305613 - head/usr.bin/sort

2016-09-08 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289751 - head/usr.bin/sort

2015-10-22 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r270132 - head/usr.bin/grep

2014-08-18 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-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...

2013-11-07 Thread Gabor Kovesdan
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
  

svn commit: r257810 - in stable/9/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/installation en_US.ISO8859-1/readme en_US.ISO8859-1/relnotes share/misc share/xml

2013-11-07 Thread Gabor Kovesdan
Author: gabor
Date: Thu Nov  7 19:51:19 2013
New Revision: 257810
URL: http://svnweb.freebsd.org/changeset/base/257810

Log:
  MFH r257801:
- Update release noted to DocBook 5.0 so that they work with the new tree

Modified:
  stable/9/release/doc/en_US.ISO8859-1/errata/article.xml
  stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml
  stable/9/release/doc/en_US.ISO8859-1/installation/article.xml
  stable/9/release/doc/en_US.ISO8859-1/readme/article.xml
  stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml
  stable/9/release/doc/share/misc/man2hwnotes.pl
  stable/9/release/doc/share/xml/catalog.xml
Directory Properties:
  stable/9/release/   (props changed)
  stable/9/release/doc/   (props changed)
  stable/9/release/doc/en_US.ISO8859-1/hardware/   (props changed)

Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml
==
--- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Thu Nov  7 
19:40:52 2013(r257809)
+++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Thu Nov  7 
19:51:19 2013(r257810)
@@ -1,10 +1,9 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN
-../../../share/xml/freebsd45.dtd [
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN
+../../../share/xml/freebsd50.dtd [
 !ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN 
release.ent
 %release;
 ]
-
 !--
FreeBSD errata document.  Unlike some of the other RELNOTESng
files, this file should remain as a single SGML file, so that
@@ -16,14 +15,13 @@
not be the one that received the last change in the document.)
 
 --
+article xmlns=http://docbook.org/ns/docbook; 
xmlns:xlink=http://www.w3.org/1999/xlink; version=5.0
+  infotitleos; release.current; Errata/title
+
 
-article
-  articleinfo
-titleos; release.current; Errata/title
-
-corpauthor
+authororgname
 The os; Project
-/corpauthor
+/orgname/author
 
 pubdate$FreeBSD$/pubdate
 
@@ -32,30 +30,30 @@
   holder role=mailto:d...@freebsd.org;The os; Documentation 
Project/holder
 /copyright
 
-legalnotice id=trademarks role=trademarks
+legalnotice xml:id=trademarks role=trademarks
   tm-attrib.freebsd;
   tm-attrib.intel;
   tm-attrib.sparc;
   tm-attrib.general;
 /legalnotice
-  /articleinfo
 
-  abstract
-paraThis document lists errata items for os; release.current;,
-  containing significant information discovered after the release
-  or too late in the release cycle to be otherwise included in the
-  release documentation.
-  This information includes security advisories, as well as news
-  relating to the software or documentation that could affect its
-  operation or usability.  An up-to-date version of this document
-  should always be consulted before installing this version of
-  os;./para
-
-paraThis errata document for os; release.current;
-  will be maintained until the release of os; release.next;./para
-  /abstract
+abstract
+  paraThis document lists errata items for os; release.current;,
+containing significant information discovered after the release
+or too late in the release cycle to be otherwise included in the
+release documentation.
+This information includes security advisories, as well as news
+relating to the software or documentation that could affect its
+operation or usability.  An up-to-date version of this document
+should always be consulted before installing this version of
+os;./para
+
+  paraThis errata document for os; release.current;
+will be maintained until the release of os; release.next;./para
+/abstract
+  /info
 
-  sect1 id=intro
+  sect1 xml:id=intro
 titleIntroduction/title
 
 paraThis errata document contains quotelate-breaking news/quote
@@ -69,33 +67,30 @@
   out of date by definition, but other copies are kept updated on
   the Internet and should be consulted as the quotecurrent
   errata/quote for this release.  These other copies of the
-  errata are located at ulink
-  url=http://www.FreeBSD.org/releases/;/ulink, plus any sites
+  errata are located at uri 
xlink:href=http://www.FreeBSD.org/releases/;http://www.FreeBSD.org/releases//uri,
 plus any sites
   which keep up-to-date mirrors of this location./para
 
 paraSource and binary snapshots of os; release.branch; also
   contain up-to-date copies of this document (as of the time of
   the snapshot)./para
 
-paraFor a list of all os; CERT security advisories, see ulink
-  url=http://www.FreeBSD.org/security/;/ulink or ulink
-  url=ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/;/ulink./para
+paraFor a list of all os; CERT security advisories, see uri 

Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk

2013-08-13 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r250883 - in head: include include/xlocale lib/libc/locale sys/sys tools/regression/lib/libc/locale

2013-06-02 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251245 - head/usr.bin/sort

2013-06-02 Thread Gabor Kovesdan
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 mom040...@gmail.com

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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga...@freebsd.org
- * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * Copyright (C) 2012 Oleg Moskalenko mom040...@gmail.com
  * 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 ga

svn commit: r250746 - 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...

2013-05-17 Thread Gabor Kovesdan
Author: gabor
Date: Fri May 17 18:53:29 2013
New Revision: 250746
URL: http://svnweb.freebsd.org/changeset/base/250746

Log:
  - Update the release notes to DocBook 4.5 XML to build with the
updated documentation tree

Added:
  head/release/doc/ja_JP.eucJP/share/xml/catalog.xml
 - copied, changed from r250633, 
head/release/doc/ja_JP.eucJP/share/xml/catalog
  head/release/doc/ru_RU.KOI8-R/share/xml/catalog.xml
 - copied, changed from r250633, 
head/release/doc/ru_RU.KOI8-R/share/xml/catalog
  head/release/doc/share/xml/catalog.xml
 - copied, changed from r250633, head/release/doc/share/xml/catalog
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/dev.xml
  head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml
  head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml
  head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml
  head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml
  head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml
  head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml
  head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml
  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/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/Makefile
  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/dev.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/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/proc-sparc64.xml
  head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml
  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/i386/article.xml
  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-1/relnotes/alpha/article.xml
  head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml
  head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml
  head/release/doc/ja_JP.eucJP/errata/article.xml   (contents, props changed)
  head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml
  head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml
  head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml   (contents, props 
changed)
  head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml
  head/release/doc/ja_JP.eucJP/hardware/common/dev.xml
  head/release/doc/ja_JP.eucJP/hardware/common/intro.xml   (contents, props 
changed)
  head/release/doc/ja_JP.eucJP/hardware/i386/article.xml
  head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml   (contents, props 
changed)
  head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml
  head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml   (contents, props 
changed)
  head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml
  head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml   (contents, props 
changed)
  head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml
  head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml
  head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml
  head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml
  head/release/doc/ja_JP.eucJP/relnotes/common/new.xml
  head/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent
  head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml
  head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml
  head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml
  

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...

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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 

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

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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 sys/cdefs.h

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 

svn commit: r249584 - in head/sys: dev/usb/wlan i386/isa

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r249585 - in head/sys: cam dev/bktr dev/ppbus dev/sound/pcm netinet pci

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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 
Hopperaa...@ipass.net
 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 y...@xpert.com
 

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 

svn commit: r249586 - in head/sys: arm/ti/omap4 dev/isci/scil dev/mxge pc98/pc98

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de

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
==
--- 

svn commit: r249587 - in head: share/i18n/csmapper/KAZAKH sys/dev/sound/pci tools/tools/notescheck

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-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

2013-04-17 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de (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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246114 - head

2013-01-30 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r246074 - in head: . gnu/usr.bin/patch share/mk tools/build/options usr.bin usr.bin/patch

2013-01-29 Thread Gabor Kovesdan
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 bsd.own.mk
+
+.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 bsd.own.mk
+
+.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 bsd.prog.mk

Added: head/usr.bin/patch/backupfile.c
==
--- /dev/null   00:00:00 1970   (empty, 

svn commit: r246075 - head/share/man/man5

2013-01-29 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245996 - stable/9/usr.bin/grep

2013-01-27 Thread Gabor Kovesdan
Author: gabor
Date: Sun Jan 27 19:44:41 2013
New Revision: 245996
URL: http://svnweb.freebsd.org/changeset/base/245996

Log:
  MFC r245057, r245688
  
- Fix handling of the case when multiple patterns are specified in a single
  command line argument, separated by newlines

Modified:
  stable/9/usr.bin/grep/grep.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/grep.c
==
--- stable/9/usr.bin/grep/grep.cSun Jan 27 18:01:03 2013
(r245995)
+++ stable/9/usr.bin/grep/grep.cSun Jan 27 19:44:41 2013
(r245996)
@@ -477,7 +477,13 @@ main(int argc, char *argv[])
grepbehave = GREP_EXTENDED;
break;
case 'e':
-   add_pattern(optarg, strlen(optarg));
+   {
+   char *token;
+   char *string = optarg;
+
+   while ((token = strsep(string, \n)) != NULL)
+   add_pattern(token, strlen(token));
+   }
needpattern = 0;
break;
case 'F':
@@ -666,7 +672,11 @@ main(int argc, char *argv[])
 
/* Process patterns from command line */
if (aargc != 0  needpattern) {
-   add_pattern(*aargv, strlen(*aargv));
+   char *token;
+   char *string = *aargv;
+
+   while ((token = strsep(string, \n)) != NULL)
+   add_pattern(token, strlen(token));
--aargc;
++aargv;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245997 - head/usr.bin/sort

2013-01-27 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de
  Reviewed by:  Oleg Moskalenko oleg.moskale...@citrix.com

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245998 - head/usr.bin/sort

2013-01-27 Thread Gabor Kovesdan
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 christoph.mal...@gmx.de
  Reviewed by:  Oleg Moskalenko oleg.moskale...@citrix.com

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, sort\n);
-   fclose(f);
-   }
-#endif
-
fix_obsolete_keys(argc, argv);
 
while (((c = getopt_long(argc, argv, OPTIONS, long_options, NULL))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245688 - head/usr.bin/grep

2013-01-20 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245057 - head/usr.bin/grep

2013-01-05 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r245062 - stable/9/share/i18n/csmapper

2013-01-05 Thread Gabor Kovesdan
Author: gabor
Date: Sat Jan  5 16:35:46 2013
New Revision: 245062
URL: http://svnweb.freebsd.org/changeset/base/245062

Log:
  MFC r244348:
- Fix handling of .mps files

Modified:
  stable/9/share/i18n/csmapper/Makefile.part
Directory Properties:
  stable/9/share/i18n/csmapper/   (props changed)

Modified: stable/9/share/i18n/csmapper/Makefile.part
==
--- stable/9/share/i18n/csmapper/Makefile.part  Sat Jan  5 16:23:18 2013
(r245061)
+++ stable/9/share/i18n/csmapper/Makefile.part  Sat Jan  5 16:35:46 2013
(r245062)
@@ -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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244515 - head/usr.bin/sort

2012-12-20 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244346 - head/usr.bin/sort

2012-12-17 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r244348 - head/share/i18n/csmapper

2012-12-17 Thread Gabor Kovesdan
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 yama...@kbh.biglobe.ne.jp

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242430 - head/usr.bin/sort

2012-11-01 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com

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)

svn commit: r241511 - in head: . contrib/gnu-sort gnu/usr.bin gnu/usr.bin/sort tools/build/options usr.bin/sort

2012-10-13 Thread Gabor Kovesdan
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 bsd.own.mk
 
-.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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r241513 - head/share/mk

2012-10-13 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r241514 - head/share/man/man5

2012-10-13 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r241515 - head

2012-10-13 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r240508 - in head/release/doc/en_US.ISO8859-1: errata hardware readme relnotes

2012-09-14 Thread Gabor Kovesdan
Author: gabor
Date: Fri Sep 14 18:33:12 2012
New Revision: 240508
URL: http://svn.freebsd.org/changeset/base/240508

Log:
  - Make the release notes build with the XMLified doc tree

Modified:
  head/release/doc/en_US.ISO8859-1/errata/article.sgml
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml
  head/release/doc/en_US.ISO8859-1/readme/article.sgml
  head/release/doc/en_US.ISO8859-1/relnotes/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/errata/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/errata/article.sgmlFri Sep 14 
18:32:20 2012(r240507)
+++ head/release/doc/en_US.ISO8859-1/errata/article.sgmlFri Sep 14 
18:33:12 2012(r240508)
@@ -1,3 +1,22 @@
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//EN
+%entities;
+
+!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
+%release;
+
+![ %release.type.current [
+!ENTITY release release.current;
+]]
+![ %release.type.snapshot [
+!ENTITY release release.prev;
+]]
+![ %release.type.release [
+!ENTITY release release.current;
+]]
+]
+
 !--
FreeBSD errata document.  Unlike some of the other RELNOTESng
files, this file should remain as a single SGML file, so that
@@ -10,27 +29,9 @@
 
 --
 
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % articles.ent PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Articles 
Entity Set//EN
-%articles.ent;
-
-!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
-%release;
-]
-
 article
   articleinfo
-titleos;
-![ %release.type.current [
-release.current;
-]]
-![ %release.type.snapshot [
-release.prev;
-]]
-![ %release.type.release [
-release.current;
-]]
-Errata/title
+titleos; release; Errata /title
 
 corpauthor
 The os; Project

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Fri Sep 14 
18:32:20 2012(r240507)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Fri Sep 14 
18:33:12 2012(r240508)
@@ -1,14 +1,12 @@
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % articles.ent PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Articles 
Entity Set//EN
-%articles.ent;
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//EN
+%entities;
 
 !ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
 %release;
 !ENTITY % devauto PUBLIC -//FreeBSD//ENTITIES Auto Generated Device 
Lists//EN
 %devauto;
-
-!-- Text constants which probably don't need to be changed.--
-
 ]
 
 article

Modified: head/release/doc/en_US.ISO8859-1/readme/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/readme/article.sgmlFri Sep 14 
18:32:20 2012(r240507)
+++ head/release/doc/en_US.ISO8859-1/readme/article.sgmlFri Sep 14 
18:33:12 2012(r240508)
@@ -1,6 +1,7 @@
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % articles.ent PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Articles 
Entity Set//EN
-%articles.ent;
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//EN
+%entities;
 
 !ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
 %release;
@@ -192,7 +193,7 @@
emailfreebsd-ad...@freebsd.org/email for more details on
becoming an official mirror site.  You can also find useful
 information for mirror sites at the ulink
-URL=url.articles.hubs;/Mirroring
+url=url.articles.hubs;/Mirroring
 os;/ulink article./para
 
   paraMirrors generally contain the ISO images generally used to

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml  Fri Sep 14 
18:32:20 2012(r240507)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml  Fri Sep 14 
18:33:12 2012(r240508)
@@ -1,6 +1,7 @@
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % articles.ent PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Articles 
Entity Set//EN
-%articles.ent;
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC 

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...

2012-09-14 Thread Gabor Kovesdan
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 @@
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//DE
+%entities;
+!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
+%release;
+
+!ENTITY release.4x 4.replaceableX/replaceable
+!ENTITY release.5x 5.replaceableX/replaceable
+]
+
 !--
   The FreeBSD Documentation Project
   The FreeBSD German Documentation Project
@@ -6,30 +17,6 @@
   basiert auf: 1.15
 --
 
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % man PUBLIC -//FreeBSD//ENTITIES DocBook Manual Page Entities//EN
-%man;
-
-!ENTITY % freebsd PUBLIC -//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD 
Entities//EN
-%freebsd;
-
-!ENTITY % authors PUBLIC -//FreeBSD//ENTITIES DocBook Author Entities//EN
-%authors;
-
-!ENTITY % teams PUBLIC -//FreeBSD//ENTITIES DocBook Team Entities//EN
-%teams;
-
-!ENTITY % mailing-lists PUBLIC -//FreeBSD//ENTITIES DocBook Mailing List 
Entities//DE
-%mailing-lists;
-
-!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
-%release;
-
-!ENTITY release.4x 4.replaceableX/replaceable
-!ENTITY release.5x 5.replaceableX/replaceable
-
-]
-
 article lang=de
   articleinfo
 titleHinweise fuuml;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 @@
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//DE
+%entities;
+!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
+%release;
+]
+
 !--
FreeBSD errata document.  Unlike some of the other RELNOTESng
files, this file should remain as a single SGML file, so that
@@ -12,19 +20,6 @@
basiert auf: 1.38
 --
 
-!DOCTYPE ARTICLE PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % man PUBLIC -//FreeBSD//ENTITIES DocBook Manual Page Entities//EN
-%man;
-!ENTITY % authors PUBLIC  -//FreeBSD//ENTITIES DocBook Author Entities//EN
-%authors;
-!ENTITY % translators PUBLIC -//FreeBSD//ENTITIES DocBook Translator 
Entities//DE
-%translators;
-!ENTITY % mlists PUBLIC -//FreeBSD//ENTITIES DocBook Mailing List 
Entities//DE
-%mlists;
-!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
-%release;
-]
-
 article lang=de
   articleinfo
 

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 

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...

2012-09-14 Thread Gabor Kovesdan
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 @@
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//FR
+%entities;
+!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
+%release;
+
+!ENTITY release.4x 4.replaceableX/replaceable
+!ENTITY release.5x 5.replaceableX/replaceable
+]
+
 !--
  The FreeBSD Documentation Project
  The FreeBSD French Documentation Project
@@ -6,28 +17,6 @@
  $FreeBSD$
  Original revision: 1.3
 --
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % man PUBLIC -//FreeBSD//ENTITIES DocBook Manual Page Entities//EN
-%man;
-
-!ENTITY % freebsd PUBLIC -//FreeBSD//ENTITIES DocBook Miscellaneous FreeBSD 
Entities//EN
-%freebsd;
-
-!ENTITY % authors PUBLIC -//FreeBSD//ENTITIES DocBook Author Entities//EN
-%authors;
-
-!ENTITY % teams PUBLIC -//FreeBSD//ENTITIES DocBook Team Entities//FR
-%teams;
-
-!ENTITY % mailing-lists PUBLIC -//FreeBSD//ENTITIES DocBook Mailing List 
Entities//FR
-%mailing-lists;
-
-!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
-%release;
-!ENTITY release.4x 4.replaceableX/replaceable
-!ENTITY release.5x 5.replaceableX/replaceable
-
-]
 
 article
   articleinfo

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 @@
+?xml version=1.0 encoding=iso-8859-1 standalone=no?
+!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook XML V4.2-Based 
Extension//EN [
+!ENTITY % entities PUBLIC -//FreeBSD//ENTITIES DocBook FreeBSD Entity 
Set//FR
+%entities;
+!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
+%release;
+]
+
 !--
  The FreeBSD Documentation Project
  The FreeBSD French Documentation Project
@@ -17,17 +25,6 @@
 
 --
 
-!DOCTYPE article PUBLIC -//FreeBSD//DTD DocBook V4.1-Based Extension//EN [
-!ENTITY % man PUBLIC -//FreeBSD//ENTITIES DocBook Manual Page Entities//EN
-%man;
-!ENTITY % authors PUBLIC  -//FreeBSD//ENTITIES DocBook Author Entities//EN
-%authors;
-!ENTITY % mlists PUBLIC -//FreeBSD//ENTITIES DocBook Mailing List 
Entities//FR
-%mlists;
-!ENTITY % release PUBLIC -//FreeBSD//ENTITIES Release Specification//EN
-%release;
-]
-
 article
   articleinfo
 

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 @@
-!--
- The FreeBSD Documentation Project
- The FreeBSD French Documentation Project
-
- $Id$
- $FreeBSD$
- Original revision: 1.4
---
-

svn commit: r238108 - head/usr.bin/sort

2012-07-04 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com

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

2012-06-28 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r237698 - stable/9/lib/libkiconv

2012-06-28 Thread Gabor Kovesdan
Author: gabor
Date: Thu Jun 28 09:18:11 2012
New Revision: 237698
URL: http://svn.freebsd.org/changeset/base/237698

Log:
  MFC 236028, 236185, 236972
  
  - Add support for BSD iconv when it is built into libc

Modified:
  stable/9/lib/libkiconv/Makefile
  stable/9/lib/libkiconv/xlat16_iconv.c
Directory Properties:
  stable/9/lib/libkiconv/   (props changed)

Modified: stable/9/lib/libkiconv/Makefile
==
--- stable/9/lib/libkiconv/Makefile Thu Jun 28 08:25:19 2012
(r237697)
+++ stable/9/lib/libkiconv/Makefile Thu Jun 28 09:18:11 2012
(r237698)
@@ -1,7 +1,10 @@
 # $FreeBSD$
 
-LIB=   kiconv
 SHLIBDIR?= /lib
+
+.include bsd.own.mk
+
+LIB=   kiconv
 SRCS=  kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c
 SRCS+= quirks.c
 
@@ -17,4 +20,8 @@ CFLAGS+=  -I${.CURDIR}/../../sys
 
 WARNS?=1
 
+.if ${MK_ICONV} == no
+CFLAGS+=   -DICONV_DLOPEN
+.endif
+
 .include bsd.lib.mk

Modified: stable/9/lib/libkiconv/xlat16_iconv.c
==
--- stable/9/lib/libkiconv/xlat16_iconv.c   Thu Jun 28 08:25:19 2012
(r237697)
+++ stable/9/lib/libkiconv/xlat16_iconv.c   Thu Jun 28 09:18:11 2012
(r237698)
@@ -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 iconv.h
+#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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r237629 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin/sort

2012-06-27 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com.
  - 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 bsd.own.mk
 
-.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 bsd.own.mk
 
-.if ${MK_BSD_SORT} == yes
+.if ${MK_GNU_SORT} != yes
 PROG=  sort
 .else
 PROG=  bsdsort
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r237630 - head/share/man/man5

2012-06-27 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r237631 - head/sys/sys

2012-06-27 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r237628 - head/usr.bin/sort

2012-06-27 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r237628 - head/usr.bin/sort

2012-06-26 Thread Gabor Kovesdan
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 bsd.prog.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r236759 - head/usr.bin/sort

2012-06-08 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r236764 - head/usr.bin/sort

2012-06-08 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r236185 - head/lib/libkiconv

2012-05-28 Thread Gabor Kovesdan
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 jbe...@tormail.org

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 bsd.own.mk
+
 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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235987 - head/usr.bin/sort

2012-05-25 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com

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);

svn commit: r236028 - head/lib/libkiconv

2012-05-25 Thread Gabor Kovesdan
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 jbe...@tormail.net
  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 bsd.lib.mk

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 iconv.h
+#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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r235723 - in head: contrib/byacc tools/regression/usr.bin/yacc usr.bin/yacc usr.bin/yacc/test

2012-05-22 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235546 - head/usr.bin/sort

2012-05-17 Thread Gabor Kovesdan
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 oleg.moskale...@citrix.com

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235432 - head/usr.bin/sort

2012-05-14 Thread Gabor Kovesdan
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));
goto end;
 

svn commit: r235434 - head/usr.bin/sort/nls

2012-05-14 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235435 - head/usr.bin/sort

2012-05-14 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235267 - in head/usr.bin/sort: . nls

2012-05-11 Thread Gabor Kovesdan
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 bsd.own.mk
+
+.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 bsd.prog.mk

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 ga...@freebsd.org
+ * Copyright (C) 2012 Oleg Moskalenko oleg.moskale...@citrix.com
+ * 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 sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include ctype.h
+#include errno.h
+#include err.h
+#include langinfo.h
+#include math.h
+#include stdlib.h
+#include string.h
+#include wchar.h
+#include wctype.h
+
+#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

svn commit: r235268 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin

2012-05-11 Thread Gabor Kovesdan
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 bsd.own.mk
+
+.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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r235269 - head/share/man/man5

2012-05-11 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r235267 - in head/usr.bin/sort: . nls

2012-05-11 Thread Gabor Kovesdan

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 +, 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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231135 - stable/9/usr.bin/grep

2012-02-07 Thread Gabor Kovesdan
Author: gabor
Date: Tue Feb  7 17:42:10 2012
New Revision: 231135
URL: http://svn.freebsd.org/changeset/base/231135

Log:
  MFC r230141 (eadler):
  - Remove duplicate line from usage()

Modified:
  stable/9/usr.bin/grep/grep.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/grep.c
==
--- stable/9/usr.bin/grep/grep.cTue Feb  7 17:21:54 2012
(r231134)
+++ stable/9/usr.bin/grep/grep.cTue Feb  7 17:42:10 2012
(r231135)
@@ -158,7 +158,6 @@ usage(void)
 {
fprintf(stderr, getstr(4), getprogname());
fprintf(stderr, %s, getstr(5));
-   fprintf(stderr, %s, getstr(5));
fprintf(stderr, %s, getstr(6));
fprintf(stderr, %s, getstr(7));
exit(2);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r229081 - stable/9/usr.bin/grep

2011-12-31 Thread Gabor Kovesdan
Author: gabor
Date: Sat Dec 31 13:12:10 2011
New Revision: 229081
URL: http://svn.freebsd.org/changeset/base/229081

Log:
  MFC r228099:
- 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 r228319:
- Match GNU behavior of exit code
- Rename variable that has a different meaning now

Modified:
  stable/9/usr.bin/grep/Makefile
  stable/9/usr.bin/grep/grep.c
  stable/9/usr.bin/grep/grep.h
  stable/9/usr.bin/grep/util.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/Makefile
==
--- stable/9/usr.bin/grep/Makefile  Sat Dec 31 13:07:09 2011
(r229080)
+++ stable/9/usr.bin/grep/Makefile  Sat Dec 31 13:12:10 2011
(r229081)
@@ -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}
 

Modified: stable/9/usr.bin/grep/grep.c
==
--- stable/9/usr.bin/grep/grep.cSat Dec 31 13:07:09 2011
(r229080)
+++ stable/9/usr.bin/grep/grep.cSat Dec 31 13:12:10 2011
(r229081)
@@ -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: stable/9/usr.bin/grep/grep.h
==
--- stable/9/usr.bin/grep/grep.hSat Dec 31 13:07:09 2011
(r229080)
+++ stable/9/usr.bin/grep/grep.hSat Dec 31 13:12:10 2011
(r229081)
@@ -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: stable/9/usr.bin/grep/util.c
==
--- stable/9/usr.bin/grep/util.cSat Dec 31 13:07:09 2011
(r229080)
+++ stable/9/usr.bin/grep/util.cSat Dec 31 13:12:10 2011
(r229081)
@@ -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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228766 - head/usr.bin/mkesdb

2011-12-21 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228319 - head/usr.bin/grep

2011-12-07 Thread Gabor Kovesdan
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 jbe...@tormail.net
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228179 - stable/9/usr.bin/grep

2011-12-01 Thread Gabor Kovesdan
Author: gabor
Date: Thu Dec  1 13:53:08 2011
New Revision: 228179
URL: http://svn.freebsd.org/changeset/base/228179

Log:
  MFC 228093
  
- Fix behavior of --null to match GNU grep
  
  MFC 228097
  
- Call warnx() instead of errx() if a directory is not readable when using
  a recursive search.  This is the expected behavior instead of aborting.
  
  Approved by:  re (kib)

Modified:
  stable/9/usr.bin/grep/util.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/util.c
==
--- stable/9/usr.bin/grep/util.cThu Dec  1 11:36:41 2011
(r228178)
+++ stable/9/usr.bin/grep/util.cThu Dec  1 13:53:08 2011
(r228179)
@@ -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 */
@@ -246,9 +248,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 +442,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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228180 - releng/9.0/usr.bin/grep

2011-12-01 Thread Gabor Kovesdan
Author: gabor
Date: Thu Dec  1 13:53:33 2011
New Revision: 228180
URL: http://svn.freebsd.org/changeset/base/228180

Log:
  MFC 228093
  
- Fix behavior of --null to match GNU grep
  
  MFC 228097
  
- Call warnx() instead of errx() if a directory is not readable when using
  a recursive search.  This is the expected behavior instead of aborting.
  
  Approved by:  re (kib)

Modified:
  releng/9.0/usr.bin/grep/util.c
Directory Properties:
  releng/9.0/usr.bin/grep/   (props changed)

Modified: releng/9.0/usr.bin/grep/util.c
==
--- releng/9.0/usr.bin/grep/util.c  Thu Dec  1 13:53:08 2011
(r228179)
+++ releng/9.0/usr.bin/grep/util.c  Thu Dec  1 13:53:33 2011
(r228180)
@@ -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 */
@@ -246,9 +248,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 +442,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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228093 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
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 jbe...@tormail.net
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228097 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
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 jbe...@tormail.net
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r228099 - head/usr.bin/grep

2011-11-28 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r226853 - stable/9/usr.bin/grep

2011-10-27 Thread Gabor Kovesdan
Author: gabor
Date: Thu Oct 27 19:18:54 2011
New Revision: 226853
URL: http://svn.freebsd.org/changeset/base/226853

Log:
  MFC r226664:
  - Install BSD grep properly, based on the value of WITH_BSD_GREP
  
  Approved by:  re (kib)

Modified:
  stable/9/usr.bin/grep/Makefile
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/Makefile
==
--- stable/9/usr.bin/grep/Makefile  Thu Oct 27 18:49:16 2011
(r226852)
+++ stable/9/usr.bin/grep/Makefile  Thu Oct 27 19:18:54 2011
(r226853)
@@ -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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r226664 - head/usr.bin/grep

2011-10-23 Thread Gabor Kovesdan
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 r...@ddteam.net

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r226573 - in stable/9/usr.bin/grep: . regex

2011-10-20 Thread Gabor Kovesdan
Author: gabor
Date: Thu Oct 20 16:08:11 2011
New Revision: 226573
URL: http://svn.freebsd.org/changeset/base/226573

Log:
  MFC r226432, r226273:
- Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon
- Fix counting of match limit (-m)
  
  Approved by:  re (kib), delphij (mentor, implicit)

Modified:
  stable/9/usr.bin/grep/Makefile
  stable/9/usr.bin/grep/file.c
  stable/9/usr.bin/grep/grep.c
  stable/9/usr.bin/grep/regex/tre-fastmatch.c
  stable/9/usr.bin/grep/util.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/Makefile
==
--- stable/9/usr.bin/grep/Makefile  Thu Oct 20 15:58:05 2011
(r226572)
+++ stable/9/usr.bin/grep/Makefile  Thu Oct 20 16:08:11 2011
(r226573)
@@ -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: stable/9/usr.bin/grep/file.c
==
--- stable/9/usr.bin/grep/file.cThu Oct 20 15:58:05 2011
(r226572)
+++ stable/9/usr.bin/grep/file.cThu Oct 20 16:08:11 2011
(r226573)
@@ -38,7 +38,6 @@ __FBSDID($FreeBSD$);
 #include sys/stat.h
 #include sys/types.h
 
-#include bzlib.h
 #include err.h
 #include errno.h
 #include fcntl.h
@@ -51,14 +50,20 @@ __FBSDID($FreeBSD$);
 #include wctype.h
 #include zlib.h
 
+#ifndef WITHOUT_BZIP2
+#include bzlib.h
+#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: stable/9/usr.bin/grep/grep.c
==
--- stable/9/usr.bin/grep/grep.cThu Oct 20 15:58:05 2011
(r226572)
+++ stable/9/usr.bin/grep/grep.cThu Oct 20 16:08:11 2011
(r226573)
@@ -150,15 +150,13 @@ bool   prev;  /* flag whether or not the 
 int tail;  /* lines left 

svn commit: r226261 - in stable/9/usr.bin/grep: . regex

2011-10-11 Thread Gabor Kovesdan
Author: gabor
Date: Tue Oct 11 15:03:42 2011
New Revision: 226261
URL: http://svn.freebsd.org/changeset/base/226261

Log:
  MFC 226035, 226047:
  
Update BSD grep to the latest development version.  It has some code
backported that was written for the TRE integration project in Google
Summer of Code 2011.  This is a temporary solution until the whole
regex library is not replaced so that BSD grep development can continue
and the backported code gets some review and testing.  This change only
improves scalability slightly, there is no big performance boost yet
but several minor bugs have been found and fixed.
  
  Approved by:  re (kib), delphij (mentor, implicit)
  Sposored by:  Google Summer of Code 2011

Added:
  stable/9/usr.bin/grep/regex/
 - copied from r226035, head/usr.bin/grep/regex/
Deleted:
  stable/9/usr.bin/grep/fastgrep.c
Modified:
  stable/9/usr.bin/grep/Makefile
  stable/9/usr.bin/grep/file.c
  stable/9/usr.bin/grep/grep.c
  stable/9/usr.bin/grep/grep.h
  stable/9/usr.bin/grep/regex/tre-fastmatch.c
  stable/9/usr.bin/grep/util.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/Makefile
==
--- stable/9/usr.bin/grep/Makefile  Tue Oct 11 14:39:19 2011
(r226260)
+++ stable/9/usr.bin/grep/Makefile  Tue Oct 11 15:03:42 2011
(r226261)
@@ -8,28 +8,52 @@
 PROG=  grep
 .else
 PROG=  bsdgrep
+CLEANFILES+= bsdgrep.1
+
+bsdgrep.1: grep.1
+   cp ${.ALLSRC} ${.TARGET}
 .endif
-SRCS=  fastgrep.c file.c grep.c queue.c util.c
+SRCS=  file.c grep.c queue.c util.c
+
+# Extra files ported backported form some regex improvements
+.PATH: ${.CURDIR}/regex
+SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c xmalloc.c
+CFLAGS+=-I${.CURDIR}/regex
 
 .if ${MK_BSD_GREP} == yes
 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 \
+   ${BINDIR}/grep ${BINDIR}/bzgrep \
+   ${BINDIR}/grep ${BINDIR}/bzegrep \
+   ${BINDIR}/grep ${BINDIR}/bzfgrep \
+   ${BINDIR}/grep ${BINDIR}/xzgrep \
+   ${BINDIR}/grep ${BINDIR}/xzegrep \
+   ${BINDIR}/grep ${BINDIR}/xzfgrep \
+   ${BINDIR}/grep ${BINDIR}/lzgrep \
+   ${BINDIR}/grep ${BINDIR}/lzegrep \
+   ${BINDIR}/grep ${BINDIR}/lzfgrep
 
 MLINKS= grep.1 egrep.1 \
grep.1 fgrep.1 \
grep.1 zgrep.1 \
grep.1 zegrep.1 \
-   grep.1 zfgrep.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 \
+   grep.1 lzgrep.1 \
+   grep.1 lzegrep.1 \
+   grep.1 lzfgrep.1
 .endif
 
-bsdgrep.1: grep.1
-   cp ${.ALLSRC} ${.TARGET}
-
-LDADD= -lz -lbz2
-DPADD= ${LIBZ} ${LIBBZ2}
+LDADD= -lz -lbz2 -llzma
+DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA}
 
 .if !defined(WITHOUT_GNU_COMPAT)
 CFLAGS+= -I/usr/include/gnu

Modified: stable/9/usr.bin/grep/file.c
==
--- stable/9/usr.bin/grep/file.cTue Oct 11 14:39:19 2011
(r226260)
+++ stable/9/usr.bin/grep/file.cTue Oct 11 15:03:42 2011
(r226261)
@@ -34,13 +34,15 @@
 __FBSDID($FreeBSD$);
 
 #include sys/param.h
-#include sys/types.h
+#include sys/mman.h
 #include sys/stat.h
+#include sys/types.h
 
 #include bzlib.h
 #include err.h
 #include errno.h
 #include fcntl.h
+#include lzma.h
 #include stddef.h
 #include stdlib.h
 #include string.h
@@ -56,10 +58,12 @@ __FBSDID($FreeBSD$);
 
 static gzFile gzbufdesc;
 static BZFILE* bzbufdesc;
+static lzma_stream lstrm = LZMA_STREAM_INIT;
 
-static unsigned char buffer[MAXBUFSIZ];
+static unsigned char *buffer;
 static unsigned char *bufpos;
 static size_t bufrem;
+static size_t fsiz;
 
 static unsigned char *lnbuf;
 static size_t lnbuflen;
@@ -70,6 +74,9 @@ grep_refill(struct file *f)
ssize_t nr;
int bzerr;
 
+   if (filebehave == FILE_MMAP)
+   return (0);
+
bufpos = buffer;
bufrem = 0;
 
@@ -101,6 +108,36 @@ grep_refill(struct file *f)
/* Make sure we exit with an error */
nr = -1;
}
+   } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) {
+   lzma_action action = LZMA_RUN;
+   uint8_t in_buf[MAXBUFSIZ];
+   lzma_ret ret;
+
+   ret = (filebehave == FILE_XZ) ?
+   lzma_stream_decoder(lstrm, UINT64_MAX,
+   LZMA_CONCATENATED) :
+   lzma_alone_decoder(lstrm, UINT64_MAX);
+
+   if (ret != LZMA_OK)
+   return (-1);
+
+   lstrm.next_out = buffer;
+   lstrm.avail_out = 

svn commit: r226271 - in head/usr.bin/grep: . regex

2011-10-11 Thread Gabor Kovesdan
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 sys/stat.h
 #include sys/types.h
 
-#include bzlib.h
 #include err.h
 #include errno.h
 #include fcntl.h
@@ -51,14 +50,20 @@ __FBSDID($FreeBSD$);
 #include wctype.h
 #include zlib.h
 
+#ifndef WITHOUT_BZIP2
+#include bzlib.h
+#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), 

svn commit: r226273 - head/usr.bin/grep

2011-10-11 Thread Gabor Kovesdan
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 nalit...@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.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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r226035 - in head/usr.bin/grep: . regex

2011-10-05 Thread Gabor Kovesdan
==
--- 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 stdio.h
 #include zlib.h
 
+#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 ga...@freebsd.org
+ * 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 glue.h
+
+#include errno.h
+#include fastmatch.h
+#include regex.h
+#include string.h
+
+#include tre-fastmatch.h
+#include xmalloc.h
+
+int
+tre_fixncomp(fastmatch_t *preg, const char *regex, size_t n, int cflags)
+{
+  int ret;
+  tre_char_t *wregex;
+  size_t wlen;
+
+  if (n != 0)
+{
+  ret = tre_convert_pattern(regex, n, wregex, wlen);
+  if (ret != REG_OK)
+   return ret;
+  else 
+   ret = tre_compile_literal(preg, wregex, wlen, cflags);
+  tre_free_pattern(wregex);
+  return ret;
+}
+  else
+return tre_compile_literal(preg, NULL, 0, cflags);
+}
+
+int
+tre_fastncomp

svn commit: r225902 - stable/9/share/man/man4

2011-10-01 Thread Gabor Kovesdan
Author: gabor
Date: Sat Oct  1 13:47:50 2011
New Revision: 225902
URL: http://svn.freebsd.org/changeset/base/225902

Log:
  MFC: r225775
- Move misplaced reference
- Sort references
- s/Since/Because/
  
  Approved by:  re (kib)

Modified:
  stable/9/share/man/man4/smp.4
Directory Properties:
  stable/9/share/man/man4/   (props changed)

Modified: stable/9/share/man/man4/smp.4
==
--- stable/9/share/man/man4/smp.4   Sat Oct  1 13:33:14 2011
(r225901)
+++ stable/9/share/man/man4/smp.4   Sat Oct  1 13:47:50 2011
(r225902)
@@ -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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r225903 - stable/8/share/man/man4

2011-10-01 Thread Gabor Kovesdan
Author: gabor
Date: Sat Oct  1 13:54:48 2011
New Revision: 225903
URL: http://svn.freebsd.org/changeset/base/225903

Log:
  MFC: r225775
- Move misplaced reference
- Sort references
- s/Since/Because/

Modified:
  stable/8/share/man/man4/smp.4
Directory Properties:
  stable/8/share/man/man4/   (props changed)

Modified: stable/8/share/man/man4/smp.4
==
--- stable/8/share/man/man4/smp.4   Sat Oct  1 13:47:50 2011
(r225902)
+++ stable/8/share/man/man4/smp.4   Sat Oct  1 13:54:48 2011
(r225903)
@@ -120,25 +120,25 @@ 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.hlt_logical_cpus
 sysctl to one. 
 Note that this operation is different from the mechanism used by the
-.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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r225775 - head/share/man/man4

2011-09-27 Thread Gabor Kovesdan
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 per...@apotheon.com [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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r225733 - stable/8/lib/libc/nls

2011-09-22 Thread Gabor Kovesdan
Author: gabor
Date: Thu Sep 22 22:08:09 2011
New Revision: 225733
URL: http://svn.freebsd.org/changeset/base/225733

Log:
  MFC r202992:
  
  Cache failing and opened catalogs in catopen() and related functions.
  Continuous catopen() calls cause 4 failig stat(2) each, which means a lot
  of overhead.  It is also a good idea to keep the opened catalogs in the memory
  to speed up further catopen() calls to the same catalog since these catalogs
  are not big at all.  In this case, we count references and only free() the
  allocated space when the reference count reaches 0.  The reads and writes to
  the cache are syncronized with an rwlock when these functions are called from
  a threaded program.
  
  MFC r202993, r203174, r203719, r204110:
  
  Small fixes and style nits for the above change.
  
  Approved by:  delphij (mentor)

Modified:
  stable/8/lib/libc/nls/msgcat.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/nls/msgcat.c
==
--- stable/8/lib/libc/nls/msgcat.c  Thu Sep 22 18:21:15 2011
(r225732)
+++ stable/8/lib/libc/nls/msgcat.c  Thu Sep 22 22:08:09 2011
(r225733)
@@ -1,5 +1,6 @@
 /***
 Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
+Copyright 2010, Gabor Kovesdan ga...@freebsd.org
 
 All Rights Reserved
 
@@ -39,6 +40,7 @@ __FBSDID($FreeBSD$);
 #include sys/types.h
 #include sys/stat.h
 #include sys/mman.h
+#include sys/queue.h
 
 #include arpa/inet.h /* for ntohl() */
 
@@ -47,6 +49,7 @@ __FBSDID($FreeBSD$);
 #include limits.h
 #include locale.h
 #include nl_types.h
+#include pthread.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -57,38 +60,109 @@ __FBSDID($FreeBSD$);
 
 #define _DEFAULT_NLS_PATH 
/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L
 
+#define RLOCK(fail){ int ret;  
\
+ if (__isthreaded
\
+ ((ret = _pthread_rwlock_rdlock(rwlock)) != 0)) { 
\
+ errno = ret;  
\
+ return (fail);
\
+ }}
+#define WLOCK(fail){ int ret;  
\
+ if (__isthreaded
\
+ ((ret = _pthread_rwlock_wrlock(rwlock)) != 0)) { 
\
+ errno = ret;  
\
+ return (fail);
\
+ }}
+#define UNLOCK { if (__isthreaded) 
\
+ _pthread_rwlock_unlock(rwlock); }
+
 #defineNLERR   ((nl_catd) -1)
 #define NLRETERR(errc)  { errno = errc; return (NLERR); }
+#define SAVEFAIL(n, l, e)  { WLOCK(NLERR); 
\
+ np = malloc(sizeof(struct catentry)); 
\
+ if (np != NULL) { 
\
+   np-name = strdup(n);   
\
+   np-path = NULL;
\
+   np-lang = (l == NULL) ? NULL : 
\
+   strdup(l);  
\
+   np-caterrno = e;   
\
+   SLIST_INSERT_HEAD(cache, np, list);
\
+ } 
\
+ UNLOCK;   
\
+ errno = e;
\
+   }
+
+static nl_catd load_msgcat(const char *, const char *, const char *);
 
-static nl_catd load_msgcat(const char *);
+static pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
+
+struct catentry {
+   SLIST_ENTRY(catentry)list;
+   char*name;
+   char*path;
+   int  caterrno;
+   nl_catd  catd;
+   char*lang;
+   int  refcount;
+};
+
+SLIST_HEAD(listhead, catentry) cache =
+SLIST_HEAD_INITIALIZER(cache);
 
 nl_catd
 catopen(const char *name, int type)
 {
-   int spcleft, saverr;
-   charpath[PATH_MAX];
-   char*nlspath, *lang, *base, *cptr, *pathP

svn commit: r225678 - head/lib/libc/iconv

2011-09-19 Thread Gabor Kovesdan
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 henning.peter...@t-online.de
  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r224937 - head/usr.bin/grep

2011-08-17 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r224938 - head/usr.bin/grep

2011-08-17 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r223296 - head/lib/libc/iconv

2011-06-19 Thread Gabor Kovesdan

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r223008 - head/usr.bin/grep

2011-06-12 Thread Gabor Kovesdan
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 yuri.pan...@gmail.com
  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  !oflag) || qflag || lflag)
+ 

svn commit: r223009 - head/usr.bin/grep

2011-06-12 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r222354 - head/lib/libc/iconv

2011-05-27 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r221437 - in vendor/tre/dist: . doc lib m4 po src tests tests/agrep utils win32

2011-05-04 Thread Gabor Kovesdan
Author: gabor
Date: Wed May  4 13:28:53 2011
New Revision: 221437
URL: http://svn.freebsd.org/changeset/base/221437

Log:
  - Trim some unnecessary files

Deleted:
  vendor/tre/dist/Makefile
  vendor/tre/dist/Makefile.am
  vendor/tre/dist/Makefile.in
  vendor/tre/dist/aclocal.m4
  vendor/tre/dist/config.h
  vendor/tre/dist/config.h.in
  vendor/tre/dist/config.log
  vendor/tre/dist/config.status
  vendor/tre/dist/configure
  vendor/tre/dist/configure.ac
  vendor/tre/dist/doc/Makefile
  vendor/tre/dist/lib/Makefile
  vendor/tre/dist/lib/stamp-h2
  vendor/tre/dist/lib/tre-config.h
  vendor/tre/dist/libtool
  vendor/tre/dist/m4/
  vendor/tre/dist/po/Makefile
  vendor/tre/dist/po/Makefile.in
  vendor/tre/dist/po/POTFILES
  vendor/tre/dist/src/Makefile
  vendor/tre/dist/stamp-h1
  vendor/tre/dist/tests/Makefile
  vendor/tre/dist/tests/agrep/Makefile
  vendor/tre/dist/tre.pc
  vendor/tre/dist/tre.pc.in
  vendor/tre/dist/tre.spec
  vendor/tre/dist/tre.spec.in
  vendor/tre/dist/utils/Makefile
  vendor/tre/dist/win32/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r221403 - vendor/tre/0.8.0

2011-05-03 Thread Gabor Kovesdan
Author: gabor
Date: Tue May  3 19:35:50 2011
New Revision: 221403
URL: http://svn.freebsd.org/changeset/base/221403

Log:
  - Tag TRE 0.8.0

Added:
  vendor/tre/0.8.0/
 - copied from r221402, vendor/tre/dist/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r221406 - in vendor/tre/dist: lib/.deps src/.deps tests/.deps

2011-05-03 Thread Gabor Kovesdan
Author: gabor
Date: Tue May  3 19:50:39 2011
New Revision: 221406
URL: http://svn.freebsd.org/changeset/base/221406

Log:
  - Delete unnecessary garbage files

Deleted:
  vendor/tre/dist/lib/.deps/
  vendor/tre/dist/src/.deps/
  vendor/tre/dist/tests/.deps/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r221402 - in vendor/tre: . dist dist/doc dist/lib dist/lib/.deps dist/m4 dist/po dist/python dist/src dist/src/.deps dist/tests dist/tests/.deps dist/tests/agrep dist/utils dist/win32

2011-05-03 Thread Gabor Kovesdan

Em 03-05-2011 20:40, Kostik Belousov escreveu:

On Tue, May 03, 2011 at 07:33:10PM +, Gabor Kovesdan wrote:

Author: gabor
Date: Tue May  3 19:33:09 2011
New Revision: 221402
URL: http://svn.freebsd.org/changeset/base/221402

Log:
   - Vendor import of TRE 0.8.0

What is this ? Why we do need it in base ?
This is for SoC 2011. With my SoC mentor (brooks), we discussed that it 
can go directly into /vendor and I can create my branch from there.

I am sure that all .deps dirs are garbage.

Yes, I'll clean it up now.

Gabor
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r220420 - head/usr.bin/grep

2011-04-07 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r220421 - head/usr.bin/grep

2011-04-07 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r220422 - head/usr.bin/grep

2011-04-07 Thread Gabor Kovesdan
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: r219015 - svnadmin/conf

2011-02-24 Thread Gabor Kovesdan
Author: gabor
Date: Thu Feb 24 22:59:24 2011
New Revision: 219015
URL: http://svn.freebsd.org/changeset/base/219015

Log:
  - Raise my limit for BSD iconv import

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confThu Feb 24 22:58:15 2011
(r219014)
+++ svnadmin/conf/sizelimit.confThu Feb 24 22:59:24 2011
(r219015)
@@ -33,3 +33,4 @@ kmacy
 jb
 jeff
 dim
+gabor
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r219020 - in head/tools: build/options test/iconv

2011-02-24 Thread Gabor Kovesdan
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 ga...@freebsd.org
+ * 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 sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/types.h
+
+#include err.h
+#include iconv.h
+#include stdlib.h
+#include string.h
+
+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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r214897 - stable/8/etc/periodic/security

2010-11-06 Thread Gabor Kovesdan
Author: gabor
Date: Sat Nov  6 21:04:01 2010
New Revision: 214897
URL: http://svn.freebsd.org/changeset/base/214897

Log:
  MFC r210254:
  
- Add a periodic script, which can be used to find installed ports' files 
with
  mismatched checksum
  
  MFC r211141
  
- Fixes to the chkportsum script to handle better some special cases,
  like spaces in filename
  
  Approved by:  delphij (mentor)

Added:
 - copied unchanged from r214895, head/etc/periodic/security/460.chkportsum
Directory Properties:
  stable/8/etc/periodic/security/460.chkportsum   (props changed)
Modified:
  stable/8/etc/periodic/security/Makefile

Copied: stable/8/etc/periodic/security/460.chkportsum (from r214895, 
head/etc/periodic/security/460.chkportsum)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/8/etc/periodic/security/460.chkportsum   Sat Nov  6 21:04:01 
2010(r214897, copy of r214895, 
head/etc/periodic/security/460.chkportsum)
@@ -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])
+   set -f
+   pkg_info -ga 2/dev/null | \
+   while IFS= read -r line; do
+   set -- $line
+   case $1 in
+   Information)
+   case $2 in
+   for) name=${3%%:} ;;
+   *) name='??' ;;
+   esac
+   ;;
+   Mismatched|'') ;;
+   *) [ -n ${name} ] 
+   echo ${name}: ${line%% fails the original MD5 
checksum}
+   ;;
+   esac
+   done
+   ;;
+   *)
+   rc=0
+   ;;
+esac
+
+exit $rc

Modified: stable/8/etc/periodic/security/Makefile
==
--- stable/8/etc/periodic/security/Makefile Sat Nov  6 19:11:49 2010
(r214896)
+++ stable/8/etc/periodic/security/Makefile Sat Nov  6 21:04:01 2010
(r214897)
@@ -6,6 +6,7 @@ FILES=  100.chksetuid \
200.chkmounts \
300.chkuid0 \
400.passwdless \
+   460.chkportsum \
410.logincheck \
700.kernelmsg \
800.loginfail \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r211808 - head/share/man/man5

2010-08-25 Thread Gabor Kovesdan
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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r211701 - in head: gnu/usr.bin share/mk sys/sys tools/build/options usr.bin

2010-08-23 Thread Gabor Kovesdan
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 sys/types.h

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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r211463 - head/usr.bin/grep

2010-08-18 Thread Gabor Kovesdan
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 dimi...@andric.com
  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 ga...@freebsd.org
+ * Copyright (C) 2008-2010 Gabor Kovesdan ga...@freebsd.org
+ * Copyright (C) 2010 Dimitry Andric dimi...@andric.com
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,7 +38,8 @@ __FBSDID($FreeBSD$);
 #include bzlib.h
 #include err.h
 #include errno.h
-#include stdio.h
+#include fcntl.h
+#include stddef.h
 #include stdlib.h
 #include string.h
 #include unistd.h
@@ -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, MAXBUFSIZ);
+
+   if (nr

Re: svn commit: r211463 - head/usr.bin/grep

2010-08-18 Thread Gabor Kovesdan

 Em 2010.08.18. 22:48, m...@freebsd.org escreveu:

On Wed, Aug 18, 2010 at 10:40 AM, Gabor Kovesdanga...@freebsd.org  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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


  1   2   >