Global whitespace fixes
authorNathan Binkert <binkertn@umich.edu>
Wed, 15 Oct 2003 20:39:37 +0000 (16:39 -0400)
committerNathan Binkert <binkertn@umich.edu>
Wed, 15 Oct 2003 20:39:37 +0000 (16:39 -0400)
Mainly removing whitespace at the end of lines.
This will reduce future diffs/conflicts.
Also adding a space after if, while, and for

This was all accomplished with:
#!/usr/bin/perl -pi~
s/[  ]+$//;           # there is a space and a tab in the brackets
s/if\(/if (/g;
s/for\(/for (/g;
s/while\(/while (/g;

arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/arguments.hh:
arch/alpha/ev5.cc:
arch/alpha/fake_syscall.cc:
arch/alpha/isa_traits.hh:
arch/alpha/vtophys.cc:
base/cprintf.cc:
base/cprintf.hh:
base/cprintf_formats.hh:
base/dbl_list.hh:
base/fast_alloc.cc:
base/fast_alloc.hh:
base/hybrid_pred.cc:
base/hybrid_pred.hh:
base/inet.cc:
base/inifile.cc:
base/intmath.cc:
base/intmath.hh:
base/misc.cc:
base/mod_num.hh:
base/pollevent.cc:
base/random.cc:
base/random.hh:
base/range.hh:
base/refcnt.hh:
base/remote_gdb.cc:
base/remote_gdb.hh:
base/res_list.hh:
base/sat_counter.cc:
base/sat_counter.hh:
base/sched_list.hh:
base/compression/lzss_compression.cc:
base/compression/lzss_compression.hh:
base/compression/null_compression.hh:
base/loader/coff_sym.h:
base/loader/coff_symconst.h:
base/loader/ecoff_object.cc:
base/loader/object_file.cc:
base/loader/object_file.hh:
base/loader/symtab.cc:
base/loader/symtab.hh:
base/socket.cc:
base/statistics.cc:
base/statistics.hh:
base/str.cc:
base/str.hh:
base/trace.cc:
base/trace.hh:
cpu/base_cpu.cc:
cpu/base_cpu.hh:
cpu/exec_context.hh:
cpu/exetrace.cc:
cpu/intr_control.hh:
cpu/pc_event.cc:
cpu/pc_event.hh:
cpu/static_inst.hh:
cpu/full_cpu/op_class.hh:
cpu/full_cpu/smt.hh:
cpu/memtest/memtest.cc:
cpu/memtest/memtest.hh:
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
dev/alpha_access.h:
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/console.cc:
dev/console.hh:
dev/disk_image.cc:
dev/disk_image.hh:
dev/etherbus.cc:
dev/etherdump.cc:
dev/etherint.cc:
dev/etherlink.cc:
dev/etherlink.hh:
dev/ethertap.cc:
dev/pcireg.h:
docs/stl.hh:
kern/tru64/dump_mbuf.cc:
kern/tru64/printf.cc:
kern/tru64/tru64_events.cc:
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/debug.cc:
sim/eventq.cc:
sim/eventq.hh:
sim/host.hh:
sim/main.cc:
sim/param.cc:
sim/param.hh:
sim/prog.cc:
sim/serialize.cc:
sim/serialize.hh:
sim/sim_events.cc:
sim/sim_object.cc:
sim/sim_time.cc:
sim/sim_time.hh:
sim/system.cc:
test/bitvectest.cc:
test/circletest.cc:
test/initest.cc:
test/lru_test.cc:
test/nmtest.cc:
test/offtest.cc:
test/sized_test.cc:
test/stattest.cc:
test/symtest.cc:
util/tap/tap.cc:
util/term/term.c:
    formatting fixes

--HG--
extra : convert_revision : 01e6dbc9615c5d0e923502b8410a416c0434cdf6

base/intmath.cc
base/intmath.hh
base/res_list.hh
base/trace.hh
cpu/exec_context.hh
cpu/simple_cpu/simple_cpu.cc
test/sized_test.cc
util/tap/tap.cc
util/term/term.c

index b9a478ba030330cb50f9613f441e7dd8ad008f67..2e220aa3b9590995cd14f156b6fb936b5bc3abc5 100644 (file)
@@ -47,7 +47,7 @@ PrevPrime(int n)
   else if (decr == 1)
     decr = 4;
 
-  for(;;) {
+  for (;;) {
     if (IsPrime(n))
       return n;
     n -= decr;
index ca1cce1e01b23fc4d4adb65d734cb8510f8cc34a..7f017a9014a1d90d92aa7e7961f7feadf53d2177 100644 (file)
@@ -192,7 +192,7 @@ Hex2Int(char c)
   if (c >= '0' && c <= '9')
     return (c - '0');
 
-  if(c >= 'A' && c <= 'F')
+  if (c >= 'A' && c <= 'F')
     return (c - 'A') + 10;
 
   if (c >= 'a' && c <= 'f')
index ee2ab28a291759ac4bb3f6f1f4408e444a9257ce..c856c12261cc713ecc2d3e683ecabc19fe6a40ab 100644 (file)
@@ -685,7 +685,7 @@ res_list<T>::free_extras(void)
         }
 
         p = unused_elements.res_el_ptr();
-        for(int i=0; i<to_free; ++i) {
+        for (int i=0; i<to_free; ++i) {
             res_element *q = p->next;
 
             delete p;
index 528311ca264dbf50b7e0e65d0bf81718853ac2dd..805a925a645b7b89891d4d09477ae13a5356e578 100644 (file)
@@ -208,10 +208,10 @@ do { \
 
 #define DTRACE(x) (false)
 #define DCOUT(x) if (0) DebugOut()
-#define DPRINTF(x, args...) do {} while(0)
-#define DPRINTFR(args...) do {} while(0)
-#define DPRINTFN(args...) do {} while(0)
-#define DDUMP(x, data, count) do {} while(0)
+#define DPRINTF(x, args...) do {} while (0)
+#define DPRINTFR(args...) do {} while (0)
+#define DPRINTFN(args...) do {} while (0)
+#define DDUMP(x, data, count) do {} while (0)
 
 #endif // TRACING_ON
 
index 6964b35b83c8a9da51e498aeb61f2e84c8a3b801..ddfc53684e3aae2dc8e580abb96568422eb02adf 100644 (file)
@@ -245,9 +245,9 @@ class ExecContext
         // stores (WH64?)
         // Unsuccesful Store Conditionals would have returned above,
         // and wouldn't fall through
-        for(int i = 0; i < system->xcvec.size(); i++){
+        for (int i = 0; i < system->xcvec.size(); i++){
             cregs = &system->xcvec[i]->regs.miscRegs;
-            if((cregs->lock_addr & ~0xf) == (req->paddr & ~0xf)) {
+            if ((cregs->lock_addr & ~0xf) == (req->paddr & ~0xf)) {
                 cregs->lock_flag = false;
             }
         }
index 8da4b1641fd404f45f180119e0dd6fce8687383e..f4fc1b8237f76baa072710f7027e3610c32c7c88 100644 (file)
@@ -535,7 +535,7 @@ SimpleCPU::tick()
         }
 
         uint64_t interrupts = xc->cpu->intr_status();
-        for(int i = TheISA::INTLEVEL_EXTERNAL_MIN;
+        for (int i = TheISA::INTLEVEL_EXTERNAL_MIN;
             i < TheISA::INTLEVEL_EXTERNAL_MAX; i++) {
             if (interrupts & (ULL(1) << i)) {
                 // See table 4-19 of 21164 hardware reference
index fe52b7a41c4ee199d08d067a1beb8d49b4e60a56..d984594095a065f9784b4f39d4a428d624dcd8e9 100644 (file)
@@ -38,7 +38,7 @@ void print(C &cont)
 {
   std::cout << std::endl;
   std::cout << "Printing " << typeid(cont).name() << std::endl;
-  while(!cont.empty()) {
+  while (!cont.empty()) {
     std::cout << cont.front() << " ";
     cont.pop();
   }
@@ -52,11 +52,11 @@ int main(void)
   sized<std::queue<int>, sized_drop_policy<std::queue<int> > >
     drop_queue(5);
 
-  for(int i = 0; i < 10; ++i) {
+  for (int i = 0; i < 10; ++i) {
     error_queue.push(i);
   }
 
-  for(int i = 0; i < 3; ++i) {
+  for (int i = 0; i < 3; ++i) {
     drop_queue.push(i);
   }
 
index 0d94f0b17c9d5697207f4b609542a27db09ea385..9c13051ca437638653d33a8a6370f1ffb6aa889a 100644 (file)
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
 
     program = basename(argv[0]);
 
-    while((c = getopt(argc, argv, "b:df:lp:v")) != -1) {
+    while ((c = getopt(argc, argv, "b:df:lp:v")) != -1) {
         switch (c) {
           case 'b':
             bufsize = atoi(optarg);
@@ -405,7 +405,7 @@ main(int argc, char *argv[])
     delete [] buffer;
     pcap_close(pcap);
     eth_close(ethernet);
-    if(listen_pfd)
+    if (listen_pfd)
         close(listen_pfd->fd);
 
     if (client_pfd)
index d445b4d37ff2914b8803479289dcf7a8f1c32a0f..199b8e9730f95048bc95cc777c22959f628e5f87 100644 (file)
@@ -202,7 +202,7 @@ readwrite(int nfd)
                                                 continue;
                                 }
 
-                                if((ret = atomicio(write, nfd, buf, n)) != n)
+                                if ((ret = atomicio(write, nfd, buf, n)) != n)
                                         return;
                         }
                 }