pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/scripts make local variables in a few functions be ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f948be181c38
branches:  trunk
changeset: 494152:f948be181c38
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Thu May 19 21:11:24 2005 +0000

description:
make local variables in a few functions be local

diffstat:

 mk/scripts/genreadme.awk |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 513ffee09ea1 -r f948be181c38 mk/scripts/genreadme.awk
--- a/mk/scripts/genreadme.awk  Thu May 19 21:11:23 2005 +0000
+++ b/mk/scripts/genreadme.awk  Thu May 19 21:11:24 2005 +0000
@@ -1,5 +1,5 @@
 #!/usr/bin/awk -f
-# $NetBSD: genreadme.awk,v 1.15 2005/05/19 11:46:40 dmcmahill Exp $
+# $NetBSD: genreadme.awk,v 1.16 2005/05/19 21:11:24 dmcmahill Exp $
 #
 # Copyright (c) 2002, 2003, 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -796,7 +796,7 @@
 }
 
 
-function load_cache_file( file ) {
+function load_cache_file( file, pkgfile, opsys, osver, march ) {
   fatal_check_file( file );
 
   if( debug ) printf("load_cache_file(%s)\n", file);
@@ -830,7 +830,9 @@
       opsys_list[pkgfile] = opsys;
       osver_list[pkgfile] = osver;
       march_list[pkgfile] = march;
-      pkg_list[pkgfile] = pkgfile;
+
+      # we only use this for a list of keys later so store something short...
+      pkg_list[pkgfile] = 1;
       pkgnm_list[pkgfile] = pkgfile;
       gsub(/.*\//, "", pkgnm_list[pkgfile]);
     } else {
@@ -842,7 +844,7 @@
   close( file );
 }
 
-function lookup_cache( wc, r, binpkgs) {
+function lookup_cache( wc, r, binpkgs, key) {
   if( debug ) printf("lookup_cache( %s )\n", wc);
   r = ".*/" glob2reg( wc );
   if( debug ) printf("lookup_cache():  Searching for \"%s\"\n", r );
@@ -858,3 +860,4 @@
   }
   return( binpkgs );
 }
+



Home | Main Index | Thread Index | Old Index