Permalink
Browse files

(fix style) See previous commit.

Turns out storage modifiers have to be treated the same way. *sigh* fucking ugly…
  • Loading branch information...
1 parent dfdd96d commit 91b58602ce766f85f779e4f4ee2b2bddd639f5d8 @ELLIOTTCABLE ELLIOTTCABLE committed Mar 6, 2011
Showing with 38 additions and 38 deletions.
  1. +2 −2 Source/Paws.c
  2. +12 −12 Source/Types/fork/fork.c
  3. +4 −4 Source/Types/fork/fork.tests.c
  4. +8 −8 Source/Types/fork/ll.c
  5. +12 −12 Source/Types/fork/ll.tests.c
View
@@ -147,8 +147,8 @@ static void Paws__register_Paws (void);
Paws = NULL;
void Paws__register_Paws(void) { Paws = malloc(sizeof( struct Paws ));
- struct Paws // »
- auto data = {
+ auto struct Paws // »
+ data = {
.Threading = NULL,
.Unit = NULL,
View
@@ -66,11 +66,11 @@ static thing fork__at (fork this, ll_size idx);
void Paws__register_Fork(void) { Fork = malloc(sizeof( struct Fork ));
Paws->Fork = Fork;
- struct typeRepresentation // »
- auto type = { .family = Fork, .name = "fork" };
+ auto struct typeRepresentation // »
+ type = { .family = Fork, .name = "fork" };
- struct Fork // »
- auto data = {
+ auto struct Fork // »
+ data = {
.Fork = malloc(sizeof( struct typeRepresentation )),
.allocate = Fork__allocate,
@@ -89,22 +89,22 @@ void Paws__register_Fork(void) { Fork = malloc(sizeof( struct Fork ));
Paws__register_LL(); }
-fork Fork__allocate(void) { fork // »
- auto this = malloc(sizeof( struct fork ));
+fork Fork__allocate(void) { auto fork // »
+ this = malloc(sizeof( struct fork ));
this->content = LL->allocate();
return this; }
-fork fork__naughtify(fork this) { fork // »
- auto naughty = Fork->allocate();
+fork fork__naughtify(fork this) { auto fork // »
+ naughty = Fork->allocate();
Fork->insert(naughty, Fork->thing(naughty), 0);
Fork->insert( this, Fork->thing(naughty), 0);
return naughty; }
-thing fork__thing(fork this) { struct thing // »
- auto something = { .pointer = this, .isa = Fork->Fork };
+thing fork__thing(fork this) { auto struct thing // »
+ something = { .pointer = this, .isa = Fork->Fork };
return something; }
@@ -120,8 +120,8 @@ void fork__prefix(fork this, thing child) {
void fork__affix(fork this, thing child) {
LL->affix (this->content, Element->allocate(child)); }
-thing fork__at(fork this, ll_size idx) { element // »
- auto e = LL->at(this->content, idx);
+thing fork__at(fork this, ll_size idx) { auto element // »
+ e = LL->at(this->content, idx);
if (e == NULL) return (thing){ {NULL} };
else return e->thing; }
@@ -5,7 +5,7 @@
# undef DECLARATIONS
-CEST(Fork, allocate) { fork auto // »
+CEST(Fork, allocate) { auto fork // »
a_fork = Fork->allocate();
ASSERT( a_fork->content->first == NULL );
@@ -14,7 +14,7 @@ CEST(Fork, allocate) { fork auto // »
SUCCEED; }
-CEST(fork, naughtify) { fork auto rv, a_naughty, // »
+CEST(fork, naughtify) { auto fork rv, a_naughty, // »
a_fork = Fork->allocate();
rv = Fork->naughtify(a_fork);
@@ -29,15 +29,15 @@ CEST(fork, naughtify) { fork auto rv, a_naughty, // »
SUCCEED; }
-CEST(fork, thing) { fork auto // »
+CEST(fork, thing) { auto fork // »
a_fork = Fork->allocate();
ASSERT( Fork->thing(a_fork).pointer == a_fork );
ASSERT( Fork->thing(a_fork).isa == Fork->Fork );
SUCCEED; }
-CEST(fork, insert) { fork auto // »
+CEST(fork, insert) { auto fork // »
a_fork = Fork->allocate();
thing thing1 = Fork->thing(Fork->allocate()),
thing2 = Fork->thing(Fork->allocate()),
View
@@ -96,8 +96,8 @@ static void element__affix (element this, element other);
Element = NULL;
void Paws__register_Element(void) { Element = malloc(sizeof( struct Element ));
- struct Element // »
- auto data = {
+ auto struct Element // »
+ data = {
.allocate = Element__allocate,
.prefix = element__prefix,
@@ -119,8 +119,8 @@ IF_EXTERNALIZED(static) struct LL * // »
LL = NULL;
void Paws__register_LL(void) { LL = malloc(sizeof( struct LL ));
- struct LL // »
- auto data = {
+ auto struct LL // »
+ data = {
.allocate = LL__allocate,
.anterior_insert = ll__anterior_insert,
@@ -138,8 +138,8 @@ void Paws__register_LL(void) { LL = malloc(sizeof( struct LL ));
*
* Expects a `thing` as an argument, to be stored on this `element` as `e`.
*/
-element Element__allocate(thing target) { element // »
- auto this = malloc(sizeof( struct element ));
+element Element__allocate(thing target) { auto element // »
+ this = malloc(sizeof( struct element ));
this->next = NULL;
this->previous = NULL;
memcpy(&this->thing, &target, sizeof( struct thing ));
@@ -191,8 +191,8 @@ void element__affix(element this, element other) {
/* This method initializes a new `ll`, with no elements. The `first` and `last` are set to `NULL` pointers, and
* `length` is initialized to zero. */
-ll LL__allocate(void) { ll // »
- auto this = malloc(sizeof( struct ll ));
+ll LL__allocate(void) { auto ll // »
+ this = malloc(sizeof( struct ll ));
this->first = NULL;
this->last = NULL;
this->length = 0;
@@ -8,21 +8,21 @@
# define SOMETHING _make_something()//;
-thing static _make_something(void) { struct thing // »
- auto something = { .pointer = NULL, .isa = NULL };
+thing static _make_something(void) { auto struct thing // »
+ something = { .pointer = NULL, .isa = NULL };
return something; }
-CEST(LL, allocate) { ll // »
- auto a_ll = LL->allocate();
+CEST(LL, allocate) { auto ll // »
+ a_ll = LL->allocate();
ASSERT( a_ll->first == NULL );
ASSERT( a_ll->last == NULL );
ASSERT( a_ll->length == 0 );
SUCCEED; }
-CEST(ll, anterior_insert) { ll auto a_ll; element auto element1, element2, element3, elementA;
+CEST(ll, anterior_insert) { auto ll a_ll; auto element element1, element2, element3, elementA;
a_ll = LL->allocate();
element1 = Element->allocate(SOMETHING); LL->affix(a_ll, element1);
element2 = Element->allocate(SOMETHING); LL->affix(a_ll, element2);
@@ -40,7 +40,7 @@ CEST(ll, anterior_insert) { ll auto a_ll; element auto element1, element2, eleme
SUCCEED; }
-CEST(ll, posterior_insert) { ll auto a_ll; element auto element1, element2, element3, elementA;
+CEST(ll, posterior_insert) { auto ll a_ll; auto element element1, element2, element3, elementA;
a_ll = LL->allocate();
element1 = Element->allocate(SOMETHING); LL->affix(a_ll, element1);
element2 = Element->allocate(SOMETHING); LL->affix(a_ll, element2);
@@ -58,7 +58,7 @@ CEST(ll, posterior_insert) { ll auto a_ll; element auto element1, element2, elem
SUCCEED; }
-CEST(ll, prefix) { ll auto a_ll; element auto element1, element2, element3;
+CEST(ll, prefix) { auto ll a_ll; auto element element1, element2, element3;
a_ll = LL->allocate();
element1 = Element->allocate(SOMETHING);
element2 = Element->allocate(SOMETHING);
@@ -81,7 +81,7 @@ CEST(ll, prefix) { ll auto a_ll; element auto element1, element2, element3;
SUCCEED; }
-CEST(ll, affix) { ll auto a_ll; element auto element1, element2, element3;
+CEST(ll, affix) { auto ll a_ll; auto element element1, element2, element3;
a_ll = LL->allocate();
element1 = Element->allocate(SOMETHING);
element2 = Element->allocate(SOMETHING);
@@ -104,7 +104,7 @@ CEST(ll, affix) { ll auto a_ll; element auto element1, element2, element3;
SUCCEED; }
-CEST(ll, at) { ll auto a_ll; element auto element1, element2, element3;
+CEST(ll, at) { auto ll a_ll; auto element element1, element2, element3;
a_ll = LL->allocate();
/* Empty `ll`s */
@@ -128,14 +128,14 @@ CEST(ll, at) { ll auto a_ll; element auto element1, element2, element3;
SUCCEED; }
-CEST(Element, allocate) { element auto // »
+CEST(Element, allocate) { auto element // »
a_element = Element->allocate(SOMETHING);
ASSERT( a_element->next == NULL );
ASSERT( a_element->previous == NULL );
SUCCEED; }
-CEST(element, prefix) { element auto // »
+CEST(element, prefix) { auto element // »
element1 = Element->allocate(SOMETHING),
element2 = Element->allocate(SOMETHING),
element3 = Element->allocate(SOMETHING),
@@ -195,7 +195,7 @@ CEST(element, prefix) { element auto // »
SUCCEED; }
-CEST(element, affix) { element auto // »
+CEST(element, affix) { auto element // »
element1 = Element->allocate(SOMETHING),
element2 = Element->allocate(SOMETHING),
element3 = Element->allocate(SOMETHING),

0 comments on commit 91b5860

Please sign in to comment.