A
download c99-to-c89.diff
Language: NonCode
LOC: 0
Project Info
GNU Core Utilities(coreutils)
Server: Savannah GNU
Type: cvs
...ls\coreutils\coreutils\src\
   .gitignore
   base64.c
   basename.c
   c99-to-c89.diff
   cat.c
   chcon.c
   chgrp.c
   chmod.c
   chown-core.c
   chown-core.h
   chown.c
   chroot.c
   cksum.c
   comm.c
   copy.c
   copy.h
   cp-hash.c
   cp-hash.h
   cp.c
   csplit.c
   cut.c
   date.c
   dd.c
   df.c
   dircolors.c
   dircolors.hin
   dirname.c
   du.c
   echo.c
   env.c
   expand.c
   expr.c
   factor.c
   false.c
   fmt.c
   fold.c
   groups.sh
   head.c
   hostid.c
   hostname.c
   id.c
   install.c
   join.c
   kill.c
   lbracket.c
   link.c
   ln.c
   logname.c
   ls-dir.c
   ls-ls.c
   ls-vdir.c
   ls.c
   ls.h
   Makefile.am
   md5sum.c
   mkdir.c
   mkfifo.c
   mknod.c
   mv.c
   nice.c
   nl.c
   nohup.c
   od.c
   paste.c
   pathchk.c
   pinky.c
   pr.c
   printenv.c
   printf.c
   ptx.c
   pwd.c
   readlink.c
   remove.c
   remove.h
   rm.c
   rmdir.c
   runcon.c
   seq.c
   setuidgid.c
   shred.c
   shuf.c
   sleep.c
   sort.c
   split.c
   stat.c
   stty.c
   su.c
   sum.c
   sync.c
   system.h
   tac-pipe.c
   tac.c
   tail.c
   tee.c
   test.c
   touch.c
   tr.c
   true.c
   tsort.c
   tty.c
   uname-arch.c
   uname-uname.c
   uname.c
   uname.h
   unexpand.c
   uniq.c
   unlink.c
   uptime.c
   users.c
   wc.c
   wheel-gen.pl
   who.c
   whoami.c
   yes.c

diff -upr src/remove.c src/remove.c
--- src/remove.c	2007-07-23 12:56:20.000000000 +0200
+++ src/remove.c	2007-07-23 13:03:12.000000000 +0200
@@ -257,9 +257,10 @@ pop_dir (Dirstack_state *ds)
 {
   size_t n_lengths = obstack_object_size (&ds->len_stack) / sizeof (size_t);
   size_t *length = obstack_base (&ds->len_stack);
+  size_t top_len;

   assert (n_lengths > 0);
-  size_t top_len = length[n_lengths - 1];
+  top_len = length[n_lengths - 1];
   assert (top_len >= 2);

   /* Pop the specified length of file name.  */
@@ -391,10 +392,11 @@ AD_stack_top (Dirstack_state const *ds)
 static void
 AD_stack_pop (Dirstack_state *ds)
 {
+  struct AD_ent *top;
   assert (0 < AD_stack_height (ds));

   /* operate on Active_dir.  pop and free top entry */
-  struct AD_ent *top = AD_stack_top (ds);
+  top = AD_stack_top (ds);
   if (top->unremovable)
     hash_free (top->unremovable);
   obstack_blank (&ds->Active_dir, -(int) sizeof (struct AD_ent));
@@ -876,6 +878,7 @@ prompt (int fd_cwd, Dirstack_state const
 	    break;
 	  }

+      {
       char const *quoted_name = quote (full_filename (filename));

       if (0 < write_protected)
@@ -915,6 +918,7 @@ prompt (int fd_cwd, Dirstack_state const
 		    : _("%s: remove %s %s? ")),
 		   program_name, file_type (sbuf), quoted_name);
 	}
+      }

       if (!yesno ())
 	return RM_USER_DECLINED;
@@ -1515,6 +1519,7 @@ rm_1 (Dirstack_state *ds, char const *fi
       return RM_ERROR;
     }

+  {
   struct stat st;
   cache_stat_init (&st);
   cycle_check_init (&ds->cycle_check_state);
@@ -1537,6 +1542,7 @@ rm_1 (Dirstack_state *ds, char const *fi
   AD_push_initial (ds);
   AD_INIT_OTHER_MEMBERS ();

+  {
   enum RM_status status = remove_entry (AT_FDCWD, ds, filename,
 					DT_UNKNOWN, &st, x);
   if (status == RM_NONEMPTY_DIR)
@@ -1555,6 +1561,8 @@ rm_1 (Dirstack_state *ds, char const *fi
   ds_clear (ds);
   return status;
 }
+  }
+}

 /* Remove all files and/or directories specified by N_FILES and FILE.
    Apply the options in X.  */
diff -upr src/rm.c src/rm.c
--- src/rm.c	2007-07-23 12:56:20.000000000 +0200
+++ src/rm.c	2007-07-23 13:03:12.000000000 +0200
@@ -354,6 +354,7 @@ main (int argc, char **argv)
 	       quote ("/"));
     }

+  {
   size_t n_files = argc - optind;
   char const *const *file = (char const *const *) argv + optind;

@@ -367,7 +368,10 @@ main (int argc, char **argv)
       if (!yesno ())
 	exit (EXIT_SUCCESS);
     }
+  {
   enum RM_status status = rm (n_files, file, &x);
   assert (VALID_STATUS (status));
   exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
+  }
+  }
 }
diff -upr src/seq.c src/seq.c
--- src/seq.c	2007-07-23 12:56:20.000000000 +0200
+++ src/seq.c	2007-07-23 13:03:12.000000000 +0200
@@ -156,6 +156,7 @@ scan_arg (const char *arg)
 			: (decimal_point == arg                /* .#  -> 0.# */
 			   || ! ISDIGIT (decimal_point[-1]))); /* -.# -> 0.# */
 	}
+      {
       char const *e = strchr (arg, 'e');
       if (! e)
 	e = strchr (arg, 'E');
@@ -164,6 +165,7 @@ scan_arg (const char *arg)
 	  long exponent = strtol (e + 1, NULL, 10);
 	  ret.precision += exponent < 0 ? -exponent : 0;
 	}
+      }
     }

   return ret;
@@ -292,6 +294,7 @@ get_default_format (operand first, opera
 	  size_t last_width = last.width + (prec - last.precision);
 	  if (last.precision && prec == 0)
 	    last_width--;  /* don't include space for '.' */
+	  {
 	  size_t width = MAX (first_width, last_width);
 	  if (width <= INT_MAX)
 	    {
@@ -299,6 +302,7 @@ get_default_format (operand first, opera
 	      sprintf (format_buf, "%%0%d.%dLf", w, prec);
 	      return format_buf;
 	    }
+	  }
 	}
       else
 	{
diff -upr src/shred.c src/shred.c
--- src/shred.c	2007-07-23 12:56:20.000000000 +0200
+++ src/shred.c	2007-07-23 13:03:12.000000000 +0200
@@ -462,7 +462,7 @@ dopass (int fd, char const *qname, off_t
 		     out.  Thus, it shouldn't give up on bad blocks.  This
 		     code works because lim is always a multiple of
 		     SECTOR_SIZE, except at the end.  */
-		  verify (sizeof r % SECTOR_SIZE == 0);
+		  { verify (sizeof r % SECTOR_SIZE == 0); }
 		  if (errnum == EIO && 0 <= size && (soff | SECTOR_MASK) < lim)
 		    {
 		      size_t soff1 = (soff | SECTOR_MASK) + 1;

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us