From 17349bffe429a953a031d171130a1138198ac7ab Mon Sep 17 00:00:00 2001 From: gabor Date: Thu, 22 Jul 2010 19:11:57 +0000 Subject: Add BSD grep to the base system and make it our default grep. Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC), lower memory usage than GNU grep, GNU compatibility, BSD license. TODO: Performance is somewhat behind GNU grep but it is only significant for bigger searches. The reason is complex, the most important factor is that GNU grep uses lots of optimizations to improve the speed of the regex library. First, we need a modern regex library (practically by adopting TRE), add support for GNU-style non-standard regexes and then reevalute the performance issues and look for bottlenecks. In the meantime, for those, who need better performance, it is possible to build GNU grep by setting WITH_GNU_GREP. Approved by: delphij (mentor) Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/), freegrep (http://github.com/howardjp/freegrep) Sponsored by: Google SoC 2008 Portbuild tests run by: kris, pav, erwin Acknowledgements to: fjoe (as SoC 2008 mentor), everyone who helped in reviewing and testing --- usr.bin/grep/nls/C.msg | 14 ++++++++++++++ usr.bin/grep/nls/Makefile.inc | 12 ++++++++++++ usr.bin/grep/nls/es_ES.ISO8859-1.msg | 14 ++++++++++++++ usr.bin/grep/nls/gl_ES.ISO8859-1.msg | 14 ++++++++++++++ usr.bin/grep/nls/hu_HU.ISO8859-2.msg | 14 ++++++++++++++ usr.bin/grep/nls/pt_BR.ISO8859-1.msg | 14 ++++++++++++++ 6 files changed, 82 insertions(+) create mode 100644 usr.bin/grep/nls/C.msg create mode 100644 usr.bin/grep/nls/Makefile.inc create mode 100644 usr.bin/grep/nls/es_ES.ISO8859-1.msg create mode 100644 usr.bin/grep/nls/gl_ES.ISO8859-1.msg create mode 100644 usr.bin/grep/nls/hu_HU.ISO8859-2.msg create mode 100644 usr.bin/grep/nls/pt_BR.ISO8859-1.msg (limited to 'usr.bin/grep/nls') diff --git a/usr.bin/grep/nls/C.msg b/usr.bin/grep/nls/C.msg new file mode 100644 index 0000000..d29e4ab --- /dev/null +++ b/usr.bin/grep/nls/C.msg @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(standard input)" +2 "cannot read bzip2 compressed file" +3 "unknown --color option" +4 "usage: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n" +5 "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n" +6 "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n" +7 "\t[--null] [pattern] [file ...]\n" +8 "unknown --binary-files option" +9 "Binary file %s matches\n" +10 "%s (BSD grep) %s\n" diff --git a/usr.bin/grep/nls/Makefile.inc b/usr.bin/grep/nls/Makefile.inc new file mode 100644 index 0000000..c32dacb --- /dev/null +++ b/usr.bin/grep/nls/Makefile.inc @@ -0,0 +1,12 @@ +# $FreeBSD$ +NLSNAME= grep + +NLS= es_ES.ISO8859-1 +NLS+= gl_ES.ISO8859-1 +NLS+= hu_HU.ISO8859-2 +NLS+= pt_BR.ISO8859-1 + +NLSSRCDIR= ${.CURDIR}/nls +.for lang in ${NLS} +NLSSRCFILES_${lang}=${lang}.msg +.endfor diff --git a/usr.bin/grep/nls/es_ES.ISO8859-1.msg b/usr.bin/grep/nls/es_ES.ISO8859-1.msg new file mode 100644 index 0000000..884d2f9 --- /dev/null +++ b/usr.bin/grep/nls/es_ES.ISO8859-1.msg @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(entrada estándar)" +2 "no se puede leer el fichero comprimido bzip2" +3 "opción desconocida de --color" +4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n" +5 "\t[-e pauta] [-f fichero] [--binary-files=valor] [--color=cuando]\n" +6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n" +7 "\t[--null] [pauta] [fichero ...]\n" +8 "opción desconocida de --binary-files" +9 "fichero binario %s se ajusta\n" +10 "%s (BSD grep) %s\n" diff --git a/usr.bin/grep/nls/gl_ES.ISO8859-1.msg b/usr.bin/grep/nls/gl_ES.ISO8859-1.msg new file mode 100644 index 0000000..77ffd84 --- /dev/null +++ b/usr.bin/grep/nls/gl_ES.ISO8859-1.msg @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(entrada estándar)" +2 "non se pode ler o ficheiro comprimido bzip2" +3 "opción descońecida de --color" +4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A no] [-B no] [-C[no]]\n" +5 "\t[-e pauta] [-f ficheiro] [--binary-files=valor] [--color=cando]\n" +6 "\t[--context[=no]] [--directories=acción] [--label] [--line-buffered]\n" +7 "\t[--null] [pauta] [ficheiro ...]\n" +8 "opción descońecida de --binary-files" +9 "ficheiro binario %s conforma\n" +10 "%s (BSD grep) %s\n" diff --git a/usr.bin/grep/nls/hu_HU.ISO8859-2.msg b/usr.bin/grep/nls/hu_HU.ISO8859-2.msg new file mode 100644 index 0000000..86d3d91 --- /dev/null +++ b/usr.bin/grep/nls/hu_HU.ISO8859-2.msg @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(szabványos bemenet)" +2 "bzip2 tömörített fájl nem olvasható" +3 "ismeretlen --color opció" +4 "használat: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A szám] [-B szám] [-C[szám]]\n" +5 "\t[-e minta] [-f fájl] [--binary-files=érték] [--color=mikor]\n" +6 "\t[--context[=szám]] [--directories=művelet] [--label] [--line-buffered]\n" +7 "\t[--null] [minta] [fájl ...]\n" +8 "ismeretlen --binary-files opció" +9 "%s bináris fájl illeszkedik\n" +10 "%s (BSD grep) %s\n" diff --git a/usr.bin/grep/nls/pt_BR.ISO8859-1.msg b/usr.bin/grep/nls/pt_BR.ISO8859-1.msg new file mode 100644 index 0000000..c7246f7 --- /dev/null +++ b/usr.bin/grep/nls/pt_BR.ISO8859-1.msg @@ -0,0 +1,14 @@ +$ $FreeBSD$ +$ +$set 1 +$quote " +1 "(entrada padrăo)" +2 "năo se posso ler o fichero comprimido bzip2" +3 "opcăo năo conhecida de --color" +4 "uso: %s [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\n" +5 "\t[-e padrăo] [-f arquivo] [--binary-files=valor] [--color=quando]\n" +6 "\t[--context[=num]] [--directories=açăo] [--label] [--line-buffered]\n" +7 "\t[--null] [padrăo] [arquivo ...]\n" +8 "opcăo năo conhecida de --binary-files" +9 "arquivo binário %s casa com o padrăo\n" +10 "%s (BSD grep) %s\n" -- cgit v1.1