Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (0204fea286f12b0df63cdd7bacfaad502f4bcd64)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (0204fea286f12b0df63cdd7bacfaad502f4bcd64)
  • Date: Wed, 3 Dec 2014 06:22:53 -0600

GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:

usr/sbin/gaze | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)

New commits:
commit 0204fea286f12b0df63cdd7bacfaad502f4bcd64
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gaze: Port real_name_search to plain AWK

diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index d90ac2d..4849b19 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -4,7 +4,7 @@
## (gaze into the crystal ball)
## @Copyright First version of gaze written & copyrighted 2001 by Brian
Peterson
## @Copyright Current version contains none of Brian Peterson's code and is
Copyright 2001 by Kyle Sallee
-## @Copyright Other additions/corrections Copyright 2002 by the Source Mage
Team
+## @Copyright Other additions/corrections Copyright 2002-2014 by the Source
Mage Team
#---------------------------------------------------------------------


@@ -751,20 +751,17 @@ function real_name_search() {

for grimoire in $(codex_get_all_grimoires); do
for pattern in "$@"; do
- gawk ' BEGIN {
- OFS=""
- IGNORECASE=1
- quiet = "'$GAZE_VERBOSE'"
- }
- /^[^[:blank:]]*'"$pattern"'/ {
- if (quiet) {
- print $1
- }
- else {
- print "'"$pattern"' -> ", $1
- }
- }
- ' "$grimoire/$SPELL_INDEX_FILE" 2>/dev/null
+ awk -v pat="$pattern" -v quiet="$GAZE_VERBOSE" '
+ BEGIN {
+ OFS = ""
+ if (!quiet)
+ pfx = pat " -> "
+ pat = "^[^[:blank:]]*" tolower(pat)
+ }
+ tolower($0) ~ pat {
+ print pfx, $1
+ }
+ ' "$grimoire/$SPELL_INDEX_FILE" 2>/dev/null
done
done
}



  • [SM-Commit] GIT changes to master sorcery by Ismael Luceno (0204fea286f12b0df63cdd7bacfaad502f4bcd64), Ismael Luceno, 12/03/2014

Archive powered by MHonArc 2.6.24.

Top of Page