From b79ab788a2c5882cf1b606845c67a59ae42571a4 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Fri, 7 Nov 2008 13:56:12 +0000 Subject: [PATCH] mps br/timing: tabs in source files. (p4 diff -db -- confirms whitespace changes only). Copied from Perforce Change: 166673 ServerID: perforce.ravenbrook.com --- mps/code/abq.c | 10 +++++----- mps/code/arenacl.c | 4 ++-- mps/code/arenacv.c | 4 ++-- mps/code/bt.c | 14 +++++++------- mps/code/dumper.c | 10 +++++----- mps/code/eventpro.c | 4 ++-- mps/code/fmtdy.c | 14 +++++++------- mps/code/fmtdytst.c | 6 +++--- mps/code/format.c | 4 ++-- mps/code/poolams.c | 10 +++++----- mps/code/poolawl.c | 6 +++--- mps/code/poolmv2.c | 36 ++++++++++++++++++------------------ mps/code/protan.c | 14 +++++++------- mps/code/root.c | 14 +++++++------- mps/code/seg.c | 8 ++++---- mps/code/table.c | 6 +++--- mps/code/teletest.c | 14 +++++++------- mps/code/vmi5.c | 8 ++++---- mps/code/vmw3.c | 2 +- 19 files changed, 94 insertions(+), 94 deletions(-) diff --git a/mps/code/abq.c b/mps/code/abq.c index 1ea2835907b..05792e4add4 100644 --- a/mps/code/abq.c +++ b/mps/code/abq.c @@ -215,12 +215,12 @@ Res ABQDescribe(ABQ abq, mps_lib_FILE *stream) AVER(stream != NULL); res = WriteF(stream, - "ABQ $P\n{\n", (WriteFP)abq, - " elements: $U \n", (WriteFU)abq->elements, - " in: $U \n", (WriteFU)abq->in, - " out: $U \n", (WriteFU)abq->out, + "ABQ $P\n{\n", (WriteFP)abq, + " elements: $U \n", (WriteFU)abq->elements, + " in: $U \n", (WriteFU)abq->in, + " out: $U \n", (WriteFU)abq->out, " queue: \n", - NULL); + NULL); if(res != ResOK) return res; diff --git a/mps/code/arenacl.c b/mps/code/arenacl.c index 329314ffb19..5d59abb9827 100644 --- a/mps/code/arenacl.c +++ b/mps/code/arenacl.c @@ -331,10 +331,10 @@ static Res chunkAlloc(Addr *baseReturn, Tract *baseTractReturn, if (pref->high) b = BTFindShortResRangeHigh(&baseIndex, &limitIndex, chunk->allocTable, - chunk->allocBase, chunk->pages, pages); + chunk->allocBase, chunk->pages, pages); else b = BTFindShortResRange(&baseIndex, &limitIndex, chunk->allocTable, - chunk->allocBase, chunk->pages, pages); + chunk->allocBase, chunk->pages, pages); if (!b) return ResRESOURCE; diff --git a/mps/code/arenacv.c b/mps/code/arenacv.c index 57d468df0df..e797116bd3d 100644 --- a/mps/code/arenacv.c +++ b/mps/code/arenacv.c @@ -323,7 +323,7 @@ static void testAllocAndIterate(Arena arena, Pool pool, } if(offset != 0) { allocator->test(&offsetRegion, arena); - allocator->free(&offsetRegion); + allocator->free(&offsetRegion); } } SegPrefExpress(&pref, SegPrefZoneSet, &zone); @@ -344,7 +344,7 @@ static void testPageTable(ArenaClass class, ...) va_end(args); die(PoolCreate(&pool, arena, PoolClassMV(), - (Size)65536, (Size)32, (Size)65536), + (Size)65536, (Size)32, (Size)65536), "PoolCreate"); pageSize = ArenaAlign(arena); diff --git a/mps/code/bt.c b/mps/code/bt.c index edd114675f0..3586b5ebcd2 100644 --- a/mps/code/bt.c +++ b/mps/code/bt.c @@ -705,7 +705,7 @@ static Bool BTFindResRangeHigh(Index *baseReturn, Index *limitReturn, BT bt, Index searchBase, Index searchLimit, unsigned long minLength, - unsigned long maxLength) + unsigned long maxLength) { Bool foundRes; /* true if a reset bit is found */ Index resLimit; /* limit of a candidate reset range */ @@ -850,15 +850,15 @@ Bool BTFindShortResRange(Index *baseReturn, Index *limitReturn, */ Bool BTFindShortResRangeHigh(Index *baseReturn, Index *limitReturn, - BT bt, - Index searchBase, Index searchLimit, - unsigned long length) + BT bt, + Index searchBase, Index searchLimit, + unsigned long length) { /* All parameters are checked by BTFindResRangeHigh. */ return BTFindResRangeHigh(baseReturn, limitReturn, - bt, - searchBase, searchLimit, - length, length); + bt, + searchBase, searchLimit, + length, length); } diff --git a/mps/code/dumper.c b/mps/code/dumper.c index 34e9d70edba..bb8889d6632 100644 --- a/mps/code/dumper.c +++ b/mps/code/dumper.c @@ -64,7 +64,7 @@ static void error (const char *format, ...) { static void readEvent(char *type, char *format, Word code, Word length, - Word cpuTime) { + Word cpuTime) { AVER(type != NULL); AVER(format != NULL); @@ -127,15 +127,15 @@ int main(int argc, char *argv[]) { size_t n; n = fread(header, sizeof(Word), 3, progin); if(n < 3) { - if(feof(progin)) - continue; - error("Can't read from input"); + if(feof(progin)) + continue; + error("Can't read from input"); } switch(header[0]) { #include "eventdef.h" default: - error("Unknown event code %08lX", header[0]); + error("Unknown event code %08lX", header[0]); } } } while(arg < argc); diff --git a/mps/code/eventpro.c b/mps/code/eventpro.c index 0fe4101a902..1997243ceb5 100644 --- a/mps/code/eventpro.c +++ b/mps/code/eventpro.c @@ -303,7 +303,7 @@ Res EventRecord(EventProc proc, Event event, Word etime) Res res; switch(event->any.code) { - case EventIntern: { /* id, label */ + case EventIntern: { /* id, label */ Symbol sym = malloc(sizeof(symbolStruct)); if (sym == NULL) return ResMEMORY; @@ -315,7 +315,7 @@ Res EventRecord(EventProc proc, Event event, Word etime) } res = TableDefine(proc->internTable, sym->id, sym); } break; - case EventLabel: { /* addr, id */ + case EventLabel: { /* addr, id */ Label label = malloc(sizeof(labelStruct)); void *entry; diff --git a/mps/code/fmtdy.c b/mps/code/fmtdy.c index 84638bcda0e..1485476394f 100644 --- a/mps/code/fmtdy.c +++ b/mps/code/fmtdy.c @@ -264,8 +264,8 @@ extern mps_addr_t dylan_weak_dependent(mps_addr_t parent) static mps_res_t dylan_scan_contig_weak(mps_ss_t mps_ss, - mps_addr_t *base, mps_addr_t *limit, - mps_addr_t *objectBase, mps_addr_t *assoc) + mps_addr_t *base, mps_addr_t *limit, + mps_addr_t *objectBase, mps_addr_t *assoc) { mps_addr_t *p; mps_res_t res; @@ -287,9 +287,9 @@ dylan_scan_contig_weak(mps_ss_t mps_ss, res = MPS_FIX2(mps_ss, p); if(res == MPS_RES_OK) { if(*p == 0 && r != 0) { - if(assoc != NULL) { - assoc[p-objectBase] = 0; /* delete corresponding entry */ - } + if(assoc != NULL) { + assoc[p-objectBase] = 0; /* delete corresponding entry */ + } } goto loop; } @@ -564,7 +564,7 @@ extern mps_res_t dylan_scan1_weak(mps_ss_t mps_ss, mps_addr_t *object_io) assert(dylan_wrapper_check(w)); - ++p; /* skip header */ + ++p; /* skip header */ fword = w[WF]; fl = fword >> 2; @@ -601,7 +601,7 @@ extern mps_res_t dylan_scan1_weak(mps_ss_t mps_ss, mps_addr_t *object_io) static mps_res_t dylan_scan_weak(mps_ss_t mps_ss, - mps_addr_t base, mps_addr_t limit) + mps_addr_t base, mps_addr_t limit) { mps_res_t res; diff --git a/mps/code/fmtdytst.c b/mps/code/fmtdytst.c index 0442ebd1a13..5880e2a9cc9 100644 --- a/mps/code/fmtdytst.c +++ b/mps/code/fmtdytst.c @@ -45,9 +45,9 @@ static mps_word_t dylan_make_WV(mps_word_t version, mps_word_t vb, /* VERSION- ... VB------ reserved ES---VF- */ return((version << (MPS_WORD_WIDTH - 8)) | - (vb << 16) | - (es << 3) | - vf); + (vb << 16) | + (es << 3) | + vf); } static mps_res_t dylan_make_wrapper_wrapper(void) diff --git a/mps/code/format.c b/mps/code/format.c index db25b7131c3..5155a740eb5 100644 --- a/mps/code/format.c +++ b/mps/code/format.c @@ -52,14 +52,14 @@ static Addr FormatDefaultClass(Addr object) Res FormatCreate(Format *formatReturn, Arena arena, Align alignment, - FormatVariety variety, + FormatVariety variety, FormatScanMethod scan, FormatSkipMethod skip, FormatMoveMethod move, FormatIsMovedMethod isMoved, FormatCopyMethod copy, FormatPadMethod pad, - FormatClassMethod class, + FormatClassMethod class, Size headerSize) { Format format; diff --git a/mps/code/poolams.c b/mps/code/poolams.c index d1d9b4b343a..913195aab7c 100644 --- a/mps/code/poolams.c +++ b/mps/code/poolams.c @@ -1164,8 +1164,8 @@ static Res amsIterate(Seg seg, AMSObjectFunction f, void *closure) AVER(AddrIsAligned(next, alignment)); } else { AVER((buffer == NULL) - || (p < BufferScanLimit(buffer)) - || (p >= BufferLimit(buffer))); /* not in the buffer */ + || (p < BufferScanLimit(buffer)) + || (p >= BufferLimit(buffer))); /* not in the buffer */ i = AMS_ADDR_INDEX(seg, p); if (!AMS_ALLOCED(seg, i)) { /* no object here */ @@ -1191,9 +1191,9 @@ static Res amsIterate(Seg seg, AMSObjectFunction f, void *closure) next = AddrAdd(p, alignment); } AVER(AddrIsAligned(next, alignment)); - res = (*f)(seg, i, p, next, closure); - if (res != ResOK) - return res; + res = (*f)(seg, i, p, next, closure); + if (res != ResOK) + return res; } } AVER(next > p); /* make sure we make progress */ diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index d52e157ce24..f2c6a977c15 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c @@ -697,7 +697,7 @@ static Res AWLWhiten(Pool pool, Trace trace, Seg seg) /* Whiten everything except the buffer. */ Addr base = SegBase(seg); Index scanLimitIndex = awlIndexOfAddr(base, awl, - BufferScanLimit(buffer)); + BufferScanLimit(buffer)); Index limitIndex = awlIndexOfAddr(base, awl, BufferLimit(buffer)); @@ -762,10 +762,10 @@ static void AWLGrey(Pool pool, Trace trace, Seg seg) AWLRangeGrey(awlseg, 0, - awlIndexOfAddr(base, awl, BufferScanLimit(buffer))); + awlIndexOfAddr(base, awl, BufferScanLimit(buffer))); AWLRangeGrey(awlseg, awlIndexOfAddr(base, awl, BufferLimit(buffer)), - awlseg->grains); + awlseg->grains); } else { AWLRangeGrey(awlseg, 0, awlseg->grains); } diff --git a/mps/code/poolmv2.c b/mps/code/poolmv2.c index 7e4b24e3566..974112b7abe 100644 --- a/mps/code/poolmv2.c +++ b/mps/code/poolmv2.c @@ -691,24 +691,24 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream) if (stream == NULL) return ResFAIL; res = WriteF(stream, - "MVT $P\n{\n", (WriteFP)mvt, - " minSize: $U \n", (WriteFU)mvt->minSize, - " meanSize: $U \n", (WriteFU)mvt->meanSize, - " maxSize: $U \n", (WriteFU)mvt->maxSize, - " fragLimit: $U \n", (WriteFU)mvt->fragLimit, - " reuseSize: $U \n", (WriteFU)mvt->reuseSize, - " fillSize: $U \n", (WriteFU)mvt->fillSize, - " availLimit: $U \n", (WriteFU)mvt->availLimit, - " abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE", - " splinter: $S \n", mvt->splinter?"TRUE":"FALSE", - " splinterSeg: $P \n", (WriteFP)mvt->splinterSeg, - " splinterBase: $A \n", (WriteFA)mvt->splinterBase, - " splinterLimit: $A \n", (WriteFU)mvt->splinterLimit, - " size: $U \n", (WriteFU)mvt->size, - " allocated: $U \n", (WriteFU)mvt->allocated, - " available: $U \n", (WriteFU)mvt->available, - " unavailable: $U \n", (WriteFU)mvt->unavailable, - NULL); + "MVT $P\n{\n", (WriteFP)mvt, + " minSize: $U \n", (WriteFU)mvt->minSize, + " meanSize: $U \n", (WriteFU)mvt->meanSize, + " maxSize: $U \n", (WriteFU)mvt->maxSize, + " fragLimit: $U \n", (WriteFU)mvt->fragLimit, + " reuseSize: $U \n", (WriteFU)mvt->reuseSize, + " fillSize: $U \n", (WriteFU)mvt->fillSize, + " availLimit: $U \n", (WriteFU)mvt->availLimit, + " abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE", + " splinter: $S \n", mvt->splinter?"TRUE":"FALSE", + " splinterSeg: $P \n", (WriteFP)mvt->splinterSeg, + " splinterBase: $A \n", (WriteFA)mvt->splinterBase, + " splinterLimit: $A \n", (WriteFU)mvt->splinterLimit, + " size: $U \n", (WriteFU)mvt->size, + " allocated: $U \n", (WriteFU)mvt->allocated, + " available: $U \n", (WriteFU)mvt->available, + " unavailable: $U \n", (WriteFU)mvt->unavailable, + NULL); if(res != ResOK) return res; res = CBSDescribe(MVTCBS(mvt), stream); diff --git a/mps/code/protan.c b/mps/code/protan.c index 14bcbafc1dd..51b2edd6df8 100644 --- a/mps/code/protan.c +++ b/mps/code/protan.c @@ -52,13 +52,13 @@ void ProtSync(Arena arena) if (SegFirst(&seg, arena)) { Addr base; do { - base = SegBase(seg); - if (SegPM(seg) != AccessSetEMPTY) { /* */ - ShieldEnter(arena); - TraceSegAccess(arena, seg, SegPM(seg)); - ShieldLeave(arena); - synced = FALSE; - } + base = SegBase(seg); + if (SegPM(seg) != AccessSetEMPTY) { /* */ + ShieldEnter(arena); + TraceSegAccess(arena, seg, SegPM(seg)); + ShieldLeave(arena); + synced = FALSE; + } } while(SegNext(&seg, arena, base)); } } while(!synced); diff --git a/mps/code/root.c b/mps/code/root.c index 8ba4104bf7d..bd2dd21f5ea 100644 --- a/mps/code/root.c +++ b/mps/code/root.c @@ -205,8 +205,8 @@ static Res rootCreate(Root *rootReturn, Arena arena, static Res rootCreateProtectable(Root *rootReturn, Arena arena, Rank rank, RootMode mode, RootVar var, - Addr base, Addr limit, - union RootUnion *theUnion) + Addr base, Addr limit, + union RootUnion *theUnion) { Res res; Root root; @@ -223,7 +223,7 @@ static Res rootCreateProtectable(Root *rootReturn, Arena arena, if (!(root->protBase < root->protLimit)) { /* root had no inner pages */ root->protectable = FALSE; - root->mode &=~ (RootModePROTECTABLE|RootModePROTECTABLE_INNER); + root->mode &=~ (RootModePROTECTABLE|RootModePROTECTABLE_INNER); } } else { root->protBase = AddrAlignDown(base, ArenaAlign(arena)); @@ -240,9 +240,9 @@ static Res rootCreateProtectable(Root *rootReturn, Arena arena, /* is the "okay" state. The negation of this is: */ if (root->protBase < trial->protLimit && trial->protBase < root->protLimit) { - NOTREACHED; - RootDestroy(root); - return ResFAIL; + NOTREACHED; + RootDestroy(root); + return ResFAIL; } } } @@ -291,7 +291,7 @@ Res RootCreateTableMasked(Root *rootReturn, Arena arena, theUnion.tableMasked.mask = mask; return rootCreateProtectable(rootReturn, arena, rank, mode, RootTABLE_MASKED, - (Addr)base, (Addr)limit, &theUnion); + (Addr)base, (Addr)limit, &theUnion); } Res RootCreateReg(Root *rootReturn, Arena arena, diff --git a/mps/code/seg.c b/mps/code/seg.c index 9acf15f73c0..f45f5297c75 100644 --- a/mps/code/seg.c +++ b/mps/code/seg.c @@ -1146,10 +1146,10 @@ static void gcSegSetGreyInternal(Seg seg, TraceSet oldGrey, TraceSet grey) if (grey != TraceSetEMPTY) { AVER(RankSetIsSingle(seg->rankSet)); for(rank = 0; rank < RankLIMIT; ++rank) - if (RankSetIsMember(seg->rankSet, rank)) { - RingInsert(ArenaGreyRing(arena, rank), &gcseg->greyRing); - break; - } + if (RankSetIsMember(seg->rankSet, rank)) { + RingInsert(ArenaGreyRing(arena, rank), &gcseg->greyRing); + break; + } AVER(rank != RankLIMIT); /* there should've been a match */ } } else { diff --git a/mps/code/table.c b/mps/code/table.c index f719cb77616..e1db04202b3 100644 --- a/mps/code/table.c +++ b/mps/code/table.c @@ -23,7 +23,7 @@ typedef unsigned long ulong; -#define tableUNUSED ((Word)0x2AB7E040) +#define tableUNUSED ((Word)0x2AB7E040) #define tableDELETED ((Word)0x2AB7EDE7) #define tableACTIVE ((Word)0x2AB7EAC2) @@ -87,11 +87,11 @@ static TableEntry TableFind(Table table, Word key, int skip_deleted) switch (table->array[i].status) { case tableACTIVE: if (table->array[i].key == key) - return &table->array[i]; + return &table->array[i]; break; case tableDELETED: if (!skip_deleted) - return &table->array[i]; + return &table->array[i]; break; case tableUNUSED: return &table->array[i]; diff --git a/mps/code/teletest.c b/mps/code/teletest.c index ab2a742a891..b857494da73 100644 --- a/mps/code/teletest.c +++ b/mps/code/teletest.c @@ -157,7 +157,7 @@ static void obeyCommand(char *command) while ((*p == ' ') && (argCount < shape->int_args)) { /* get an argument */ char *newP; - mps_word_t word; + mps_word_t word; word = (mps_word_t)strtoul(p, &newP, 0); args[argCount] = word; if (newP == p) { /* strtoul failed */ @@ -168,15 +168,15 @@ static void obeyCommand(char *command) ++ argCount; } if(shape->string_arg) { - char *end; - while(*p == ' ') - ++p; + char *end; + while(*p == ' ') + ++p; for(end = p; *end != '\n'; end++) - NOOP; + NOOP; *end = '\0'; - stringArg = p; + stringArg = p; } else { - stringArg = NULL; + stringArg = NULL; } if (argCount < shape->int_args) { printf("insufficient arguments to command\n"); diff --git a/mps/code/vmi5.c b/mps/code/vmi5.c index 0da1f3c8b95..081174a0fc5 100644 --- a/mps/code/vmi5.c +++ b/mps/code/vmi5.c @@ -127,7 +127,7 @@ Res VMCreate(VM *vmReturn, Size size) /* .map.reserve: MAP_AUTORESRV is necessary to avoid reserving swap. */ addr = mmap((void *)0, (size_t)size, PROT_NONE, MAP_SHARED | MAP_AUTORESRV, - zero_fd, (off_t)0); + zero_fd, (off_t)0); if(addr == MAP_FAILED) { AVER(errno == ENOMEM); /* .assume.mmap.err */ res = (errno == ENOMEM) ? ResRESOURCE : ResFAIL; @@ -227,9 +227,9 @@ Res VMMap(VM vm, Addr base, Addr limit) /* Check it won't lose any bits. */ AVER(size <= (Size)(size_t)-1); addr = mmap((void *)base, (size_t)size, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_FIXED, - vm->zero_fd, (off_t)0); + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_FIXED, + vm->zero_fd, (off_t)0); if(addr == MAP_FAILED) { AVER(errno == ENOMEM || errno == EAGAIN); /* .assume.mmap.err */ return ResMEMORY; diff --git a/mps/code/vmw3.c b/mps/code/vmw3.c index 3bedbf7d13b..ee33544793b 100644 --- a/mps/code/vmw3.c +++ b/mps/code/vmw3.c @@ -122,7 +122,7 @@ Res VMCreate(VM *vmReturn, Size size) /* Allocate the vm descriptor. This is likely to be wasteful. */ vbase = VirtualAlloc(NULL, SizeAlignUp(sizeof(VMStruct), align), - MEM_COMMIT, PAGE_READWRITE); + MEM_COMMIT, PAGE_READWRITE); if (vbase == NULL) return ResMEMORY; vm = (VM)vbase;