The compiler almost certainly knows better.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Fri, 30 Oct 2009 06:35:22 +0000 (06:35 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Fri, 30 Oct 2009 06:35:22 +0000 (06:35 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@228 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libbb/unzip.c
libopkg/opkg_conf.c
libopkg/pkg_depends.c
libopkg/pkg_hash.c

index 954ee61a8b8882e4768fc2c610093ba141c86267..08c17d4a2927877a7ad10f85b2791eafd8eda4e7 100644 (file)
@@ -196,16 +196,16 @@ static int huft_build(unsigned int *b, const unsigned int n, const unsigned int
        unsigned f;             /* i repeats in table every f entries */
        int g;                  /* maximum code length */
        int h;                  /* table level */
        unsigned f;             /* i repeats in table every f entries */
        int g;                  /* maximum code length */
        int h;                  /* table level */
-       register unsigned i;    /* counter, current code */
-       register unsigned j;    /* counter */
-       register int k;         /* number of bits in current code */
+       unsigned i;     /* counter, current code */
+       unsigned j;     /* counter */
+       int k;          /* number of bits in current code */
        int l;                  /* bits per table (returned in m) */
        int l;                  /* bits per table (returned in m) */
-       register unsigned *p;           /* pointer into c[], b[], or v[] */
-       register huft_t *q;     /* points to current table */
+       unsigned *p;            /* pointer into c[], b[], or v[] */
+       huft_t *q;      /* points to current table */
        huft_t r;               /* table entry for structure assignment */
        huft_t *u[BMAX];        /* table stack */
        unsigned v[N_MAX];      /* values in order of bit length */
        huft_t r;               /* table entry for structure assignment */
        huft_t *u[BMAX];        /* table stack */
        unsigned v[N_MAX];      /* values in order of bit length */
-       register int w;         /* bits before this table == (l * h) */
+       int w;          /* bits before this table == (l * h) */
        unsigned x[BMAX + 1];   /* bit offsets, then code stack */
        unsigned *xp;           /* pointer into x */
        int y;                  /* number of dummy codes added */
        unsigned x[BMAX + 1];   /* bit offsets, then code stack */
        unsigned *xp;           /* pointer into x */
        int y;                  /* number of dummy codes added */
@@ -363,13 +363,13 @@ static int huft_build(unsigned int *b, const unsigned int n, const unsigned int
  */
 static int inflate_codes(huft_t *tl, huft_t *td, int bl, int bd)
 {
  */
 static int inflate_codes(huft_t *tl, huft_t *td, int bl, int bd)
 {
-       register unsigned long e;               /* table entry flag/number of extra bits */
+       unsigned long e;                /* table entry flag/number of extra bits */
        unsigned long n, d;                             /* length and index for copy */
        unsigned long w;                                /* current window position */
        huft_t *t;                              /* pointer to table entry */
        unsigned ml, md;                        /* masks for bl and bd bits */
        unsigned long n, d;                             /* length and index for copy */
        unsigned long w;                                /* current window position */
        huft_t *t;                              /* pointer to table entry */
        unsigned ml, md;                        /* masks for bl and bd bits */
-       register unsigned long b;                               /* bit buffer */
-       register unsigned k;            /* number of bits in bit buffer */
+       unsigned long b;                                /* bit buffer */
+       unsigned k;             /* number of bits in bit buffer */
 
        /* make local copies of globals */
        b = bb;                                 /* initialize bit buffer */
 
        /* make local copies of globals */
        b = bb;                                 /* initialize bit buffer */
@@ -490,8 +490,8 @@ static int inflate_codes(huft_t *tl, huft_t *td, int bl, int bd)
 static int inflate_block(int *e)
 {
        unsigned t;                     /* block type */
 static int inflate_block(int *e)
 {
        unsigned t;                     /* block type */
-       register unsigned long b;                       /* bit buffer */
-       register unsigned k;            /* number of bits in bit buffer */
+       unsigned long b;                        /* bit buffer */
+       unsigned k;             /* number of bits in bit buffer */
        static unsigned short cplens[] = {              /* Copy lengths for literal codes 257..285 */
                3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
                35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
        static unsigned short cplens[] = {              /* Copy lengths for literal codes 257..285 */
                3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
                35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
@@ -544,8 +544,8 @@ static int inflate_block(int *e)
                {
                        unsigned long n;                        /* number of bytes in block */
                        unsigned long w;                        /* current window position */
                {
                        unsigned long n;                        /* number of bytes in block */
                        unsigned long w;                        /* current window position */
-                       register unsigned long b_stored;                        /* bit buffer */
-                       register unsigned long k_stored;                /* number of bits in bit buffer */
+                       unsigned long b_stored;                 /* bit buffer */
+                       unsigned long k_stored;         /* number of bits in bit buffer */
 
                        /* make local copies of globals */
                        b_stored = bb;                          /* initialize bit buffer */
 
                        /* make local copies of globals */
                        b_stored = bb;                          /* initialize bit buffer */
@@ -670,8 +670,8 @@ static int inflate_block(int *e)
                        unsigned nd;                            /* number of distance codes */
 
                        unsigned ll[286 + 30];          /* literal/length and distance code lengths */
                        unsigned nd;                            /* number of distance codes */
 
                        unsigned ll[286 + 30];          /* literal/length and distance code lengths */
-                       register unsigned long b_dynamic;       /* bit buffer */
-                       register unsigned k_dynamic;            /* number of bits in bit buffer */
+                       unsigned long b_dynamic;        /* bit buffer */
+                       unsigned k_dynamic;             /* number of bits in bit buffer */
 
                        /* make local bit buffer */
                        b_dynamic = bb;
 
                        /* make local bit buffer */
                        b_dynamic = bb;
index 472b3191438223daab415a60acdf28b1f5be846f..1312c417165189b1841930fa80cd0276ad0c041e 100644 (file)
@@ -668,7 +668,7 @@ int opkg_conf_write_status_files(opkg_conf_t *conf)
      pkg_dest_t *dest;
      pkg_vec_t *all;
      pkg_t *pkg;
      pkg_dest_t *dest;
      pkg_vec_t *all;
      pkg_t *pkg;
-     register int i;
+     int i;
      int err;
      FILE * status_file=NULL;
 
      int err;
      FILE * status_file=NULL;
 
index bbe786815b1ae9171dd490c8ce84803304931a6c..e5c50c94d2786a2fa29392a382337f8968d796c2 100644 (file)
@@ -56,7 +56,7 @@ int pkg_hash_fetch_unsatisfied_dependencies(opkg_conf_t *conf, pkg_t * pkg,
                                            pkg_vec_t *unsatisfied, char *** unresolved)
 {
      pkg_t * satisfier_entry_pkg;
                                            pkg_vec_t *unsatisfied, char *** unresolved)
 {
      pkg_t * satisfier_entry_pkg;
-     register int i, j, k;
+     int i, j, k;
      int count, found;
      char ** the_lost;
      abstract_pkg_t * ab_pkg;
      int count, found;
      char ** the_lost;
      abstract_pkg_t * ab_pkg;
@@ -280,7 +280,7 @@ pkg_vec_t * pkg_hash_fetch_conflicts(hash_table_t * hash, pkg_t * pkg)
     compound_depend_t * conflicts;
     depend_t ** possible_satisfiers;
     depend_t * possible_satisfier;
     compound_depend_t * conflicts;
     depend_t ** possible_satisfiers;
     depend_t * possible_satisfier;
-    register int i, j, k;
+    int i, j, k;
     int count;
     abstract_pkg_t * ab_pkg;
     pkg_t **pkg_scouts; 
     int count;
     abstract_pkg_t * ab_pkg;
     pkg_t **pkg_scouts; 
@@ -437,7 +437,7 @@ int pkg_dependence_satisfied(opkg_conf_t *conf, depend_t *depend)
 
 static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg)
 {
 
 static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg)
 {
-    register int i;
+    int i;
     pkg_t ** pkgs = vec->pkgs;
 
     for(i = 0; i < vec->len; i++)
     pkg_t ** pkgs = vec->pkgs;
 
     for(i = 0; i < vec->len; i++)
@@ -568,7 +568,7 @@ static char ** merge_unresolved(char ** oldstuff, char ** newstuff)
 {
     int oldlen = 0, newlen = 0;
     char ** result;
 {
     int oldlen = 0, newlen = 0;
     char ** result;
-    register int i, j;
+    int i, j;
 
     if(!newstuff)
        return oldstuff;
 
     if(!newstuff)
        return oldstuff;
@@ -617,7 +617,7 @@ char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx)
        
 void printDepends(pkg_t * pkg)
 {
        
 void printDepends(pkg_t * pkg)
 {
-    register int i, j;
+    int i, j;
     compound_depend_t * depend;
     int count;
     
     compound_depend_t * depend;
     int count;
     
@@ -643,7 +643,7 @@ void printDepends(pkg_t * pkg)
 
 int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
 
 int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
-    register int i, j;
+    int i, j;
 
     /* every pkg provides itself */
     abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
 
     /* every pkg provides itself */
     abstract_pkg_vec_insert(ab_pkg->provided_by, ab_pkg);
@@ -677,7 +677,7 @@ int buildProvides(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 /* Abhaya: added conflicts support */
 int buildConflicts(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
 /* Abhaya: added conflicts support */
 int buildConflicts(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
-    register int i;
+    int i;
     compound_depend_t * conflicts;
 
     if (!pkg->conflicts_count)
     compound_depend_t * conflicts;
 
     if (!pkg->conflicts_count)
@@ -699,7 +699,7 @@ int buildConflicts(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 
 int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
 
 int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 {
-     register int i, j;
+     int i, j;
 
      if (!pkg->replaces_count)
          return 0;
 
      if (!pkg->replaces_count)
          return 0;
@@ -733,7 +733,7 @@ int buildReplaces(hash_table_t * hash, abstract_pkg_t * ab_pkg, pkg_t * pkg)
 int buildDepends(hash_table_t * hash, pkg_t * pkg)
 {
      int count;
 int buildDepends(hash_table_t * hash, pkg_t * pkg)
 {
      int count;
-     register int i;
+     int i;
      compound_depend_t * depends;
 
      if(!(count = pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count))
      compound_depend_t * depends;
 
      if(!(count = pkg->pre_depends_count + pkg->depends_count + pkg->recommends_count + pkg->suggests_count))
@@ -839,7 +839,7 @@ void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg)
 {
      compound_depend_t * depends;
      int count, othercount;
 {
      compound_depend_t * depends;
      int count, othercount;
-     register int i, j;
+     int i, j;
      abstract_pkg_t * ab_depend;
      abstract_pkg_t ** temp;
 
      abstract_pkg_t * ab_depend;
      abstract_pkg_t ** temp;
 
@@ -899,8 +899,8 @@ static int parseDepends(compound_depend_t *compound_depend,
 {
      char * pkg_name, buffer[2048];
      int num_of_ors = 0;
 {
      char * pkg_name, buffer[2048];
      int num_of_ors = 0;
-     register int i;
-     register char * src, * dest;
+     int i;
+     char * src, * dest;
      depend_t ** possibilities;
 
      /* first count the number of ored possibilities for satisfying dependency */
      depend_t ** possibilities;
 
      /* first count the number of ored possibilities for satisfying dependency */
index d15d441f54df793599179254b3d9e6f23152d369..5b7e3dd678de0897a680a3e7f8134c03b9723a7e 100644 (file)
@@ -388,7 +388,7 @@ pkg_t * pkg_hash_fetch_by_name_version(hash_table_t *hash,
                                       const char * version)
 {
     pkg_vec_t * vec;
                                       const char * version)
 {
     pkg_vec_t * vec;
-    register int i;
+    int i;
     char *version_str = NULL;
     
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name)))
     char *version_str = NULL;
     
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name)))
@@ -414,7 +414,7 @@ pkg_t *pkg_hash_fetch_installed_by_name_dest(hash_table_t *hash,
                                             pkg_dest_t *dest)
 {
     pkg_vec_t * vec;
                                             pkg_dest_t *dest)
 {
     pkg_vec_t * vec;
-    register int i;
+    int i;
 
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))) {
        return NULL;
 
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))) {
        return NULL;
@@ -431,7 +431,7 @@ pkg_t *pkg_hash_fetch_installed_by_name(hash_table_t *hash,
                                        const char *pkg_name)
 {
     pkg_vec_t * vec;
                                        const char *pkg_name)
 {
     pkg_vec_t * vec;
-    register int i;
+    int i;
 
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))){
        return NULL;
 
     if(!(vec = pkg_vec_fetch_by_name(hash, pkg_name))){
        return NULL;