Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/forth/Forth.cpp b/forth/Forth.cpp
index be366fc..be240e3 100644
--- a/forth/Forth.cpp
+++ b/forth/Forth.cpp
@@ -101,12 +101,12 @@
/*
reading an initial 32bit value from the code stream:
-
+
xxxxxxxx xxxxxxxx xxxxxxxx xxxxxx00
-
+
Those last two bits are always 0 for a word, so we set those bits for other
opcodes
-
+
00 -- execute this word
01 -- push (value & ~3) on the data stack
10 -- push value >> 2 on the data stack (sign extended)
@@ -143,7 +143,7 @@
static unsigned MakeCode(Code code) {
return (code << kCodeShift) | kCodeShift2_Bits;
}
-
+
void appendInt(int32_t);
void appendWord(ForthWord*);
void appendIF();
@@ -159,7 +159,7 @@
this->done();
return fData.begin();
}
-
+
static void Exec(const intptr_t*, ForthEngine*);
private:
diff --git a/forth/ForthTests.cpp b/forth/ForthTests.cpp
index 7b9dd5b..08ab7f3 100644
--- a/forth/ForthTests.cpp
+++ b/forth/ForthTests.cpp
@@ -16,7 +16,7 @@
void reportFailure(const char expression[], const char file[], int line);
void reportFailure(const char msg[]);
};
-
+
typedef void (*ForthWordTestProc)(ForthWord*, ForthEngine*, Reporter*);
#define FORTH_ASSERT(reporter, expression) \
@@ -385,7 +385,7 @@
for (size_t i = 0; i < SK_ARRAY_COUNT(gRecs); i++) {
ForthEngine engine(NULL);
-
+
ForthWord* word = env.findWord(gRecs[i].fName);
if (NULL == word) {
SkString str;
@@ -398,7 +398,7 @@
gRecs[i].fProc(word, &engine, &reporter);
}
}
-
+
if (0 == reporter.fFailureCount) {
SkDebugf("--- success!\n");
} else {
diff --git a/forth/SampleForth.cpp b/forth/SampleForth.cpp
index df4110d..8fa6a4f 100644
--- a/forth/SampleForth.cpp
+++ b/forth/SampleForth.cpp
@@ -36,9 +36,9 @@
class SkForthCtx_FW : public ForthWord {
public:
SkForthCtx_FW() : fCtx(NULL) {}
-
+
void setCtx(SkForthCtx* ctx) { fCtx = ctx; }
-
+
SkCanvas* canvas() const { return &fCtx->fCanvas; }
SkPaint* paint() const { return &fCtx->fPaint; }
@@ -51,7 +51,7 @@
virtual void exec(ForthEngine* fe) {
paint()->setColor(fe->pop());
}
-
+
static SkForthCtx_FW* New() { return new setColor_FW; }
};
@@ -60,7 +60,7 @@
virtual void exec(ForthEngine* fe) {
paint()->setStyle((SkPaint::Style)fe->pop());
}
-
+
static SkForthCtx_FW* New() { return new setStyle_FW; }
};
@@ -69,7 +69,7 @@
virtual void exec(ForthEngine* fe) {
paint()->setStrokeWidth(fe->fpop());
}
-
+
static SkForthCtx_FW* New() { return new setStrokeWidth_FW; }
};
@@ -80,7 +80,7 @@
SkScalar dx = fe->fpop();
canvas()->translate(dx, dy);
}
-
+
static SkForthCtx_FW* New() { return new translate_FW; }
};
@@ -89,7 +89,7 @@
virtual void exec(ForthEngine* fe) {
canvas()->drawColor(fe->pop());
}
-
+
static SkForthCtx_FW* New() { return new drawColor_FW; }
};
@@ -103,7 +103,7 @@
r.fLeft = fe->fpop();
canvas()->drawRect(r, *paint());
}
-
+
static SkForthCtx_FW* New() { return new drawRect_FW; }
};
@@ -115,7 +115,7 @@
SkScalar x = fe->fpop();
canvas()->drawCircle(x, y, radius, *paint());
}
-
+
static SkForthCtx_FW* New() { return new drawCircle_FW; }
};
@@ -129,7 +129,7 @@
x0 = fe->fpop();
canvas()->drawLine(x0, y0, x1, y1, *paint());
}
-
+
static SkForthCtx_FW* New() { return new drawLine_FW; }
};
@@ -166,7 +166,7 @@
SkBitmap fBM;
SkForthCtx fContext;
public:
- ForthView() {
+ ForthView() {
Forth_test_stdwords(false);
load_words(&fEnv, &fContext);
@@ -194,7 +194,7 @@
);
#endif
}
-
+
virtual ~ForthView() {
}
@@ -207,11 +207,11 @@
}
return this->INHERITED::onQuery(evt);
}
-
+
void drawBG(SkCanvas* canvas) {
canvas->drawColor(0xFFDDDDDD);
}
-
+
void test_onClick(ForthEnv* env) {
ForthWord* word = env->findWord("view.onClick");
if (word) {
@@ -229,7 +229,7 @@
SkDebugf("------ view.onClick not found\n");
}
}
-
+
virtual void onDraw(SkCanvas* canvas) {
drawBG(canvas);
canvas->drawBitmap(fBM, 0, 0, NULL);
@@ -238,7 +238,7 @@
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) {
return fOnClickWord ? new Click(this) : NULL;
}
-
+
virtual bool onClick(Click* click) {
intptr_t idata[2] = {
f2i_bits(click->fCurr.fX), f2i_bits(click->fCurr.fY)
diff --git a/forth/StdWords.cpp b/forth/StdWords.cpp
index fe75342..8a781f8 100644
--- a/forth/StdWords.cpp
+++ b/forth/StdWords.cpp
@@ -408,7 +408,7 @@
ADD_LITERAL_WORD("2DUP", dup2);
ADD_LITERAL_WORD("2OVER", over2);
ADD_LITERAL_WORD("2DROP", drop2);
-
+
ADD_LITERAL_WORD("+", add);
ADD_LITERAL_WORD("-", sub);
ADD_LITERAL_WORD("*", mul);
@@ -451,7 +451,7 @@
ADD_LITERAL_WORD("0>", gt0);
ADD_LITERAL_WORD("0<=", le0);
ADD_LITERAL_WORD("0>=", ge0);
-
+
this->add("f=", 2, new feq_ForthWord);
this->add("f<>", 3, new fneq_ForthWord);
this->add("f<", 2, new flt_ForthWord);