aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrischka <grischka>2010-06-15 17:02:09 +0200
committergrischka <grischka>2010-06-15 17:02:09 +0200
commit5fcd1fef1cd724377a53a561972c8631d355585f (patch)
tree32ee8e0ae50037c7e8cdee573db7f2366b29fb39
parentd351384fdcbd4d895b3a43fdee4a62f2c0ca4a33 (diff)
downloadtinycc-5fcd1fef1cd724377a53a561972c8631d355585f.tar.gz
tinycc-5fcd1fef1cd724377a53a561972c8631d355585f.tar.bz2
Fix last commits: remove CRLF, chmod 644 tccgen.c
-rw-r--r--[-rwxr-xr-x]tccgen.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/tccgen.c b/tccgen.c
index a617d4c..5c5f26e 100755..100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -4824,7 +4824,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
/* patch type size if needed */
if (n < 0)
s->c = array_length;
- } else if ((type->t & VT_BTYPE) == VT_STRUCT &&
+ } else if ((type->t & VT_BTYPE) == VT_STRUCT &&
(sec || !first || tok == '{')) {
int par_count;
@@ -4837,7 +4837,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
to do it correctly (ideally, the expression parser should
be used in all cases) */
par_count = 0;
- /* Coo: I think we must not deal '(' */
+ /* Coo: I think we must not deal '(' */
if (tok == '(') {
AttributeDef ad1;
CType type1;
@@ -4861,15 +4861,15 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
no_oblock = 0;
}
s = type->ref;
- f = s->next;
- /* Coo: skip empty struct */
- while (f->next && (f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c)
- f=f->next;
+ f = s->next;
+ /* Coo: skip empty struct */
+ while (f->next && (f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c)
+ f=f->next;
array_length = 0;
index = 0;
n = s->c;
while (tok != '}') {
- int bit_pos;
+ int bit_pos;
decl_designator(type, sec, c, NULL, &f, size_only);
index = f->c;
if (!size_only && array_length < index) {
@@ -4880,25 +4880,25 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c,
if (index > array_length)
array_length = index;
- /* Coo: skip fields from same union */
- if (!(f->type.t&VT_BITFIELD))
- bit_pos=index*8;
- else
- bit_pos=f->c*8+((f->type.t>>VT_STRUCT_SHIFT)&0x3f)+((f->type.t>>(VT_STRUCT_SHIFT+6))&0x3f);
- do
- f=f->next;
- while (f && (((f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c) ||
- f->c*8+((f->type.t&VT_BITFIELD)?((f->type.t>>VT_STRUCT_SHIFT)&0x3f):0)<bit_pos));
-
- if (no_oblock && f == NULL)
- break;
+ /* Coo: skip fields from same union */
+ if (!(f->type.t&VT_BITFIELD))
+ bit_pos=index*8;
+ else
+ bit_pos=f->c*8+((f->type.t>>VT_STRUCT_SHIFT)&0x3f)+((f->type.t>>(VT_STRUCT_SHIFT+6))&0x3f);
+ do
+ f=f->next;
+ while (f && (((f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c) ||
+ f->c*8+((f->type.t&VT_BITFIELD)?((f->type.t>>VT_STRUCT_SHIFT)&0x3f):0)<bit_pos));
+
+ if (no_oblock && f == NULL)
+ break;
if (tok == '}')
break;
- /* Coo: skip ')' in front of ',' for initializer */
- while (tok==')' && par_count) {
- next();
- par_count--;
- }
+ /* Coo: skip ')' in front of ',' for initializer */
+ while (tok==')' && par_count) {
+ next();
+ par_count--;
+ }
skip(',');
}
/* put zeros at the end */