History

Fix last commits: remove CRLF, chmod 644 tccgen.c

grischka committed 16 years ago

Commit 5fcd1fe1 parent d3513841 file · +24 −24Browse files

Unified · Split

tccgen.c+24−24
@@ -4824,7 +4824,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c, · 4823 unmodified lines
48244824 /* patch type size if needed */
48254825 if (n < 0)
48264826 s->c = array_length;
4827− } else if ((type->t & VT_BTYPE) == VT_STRUCT &&
4827+ } else if ((type->t & VT_BTYPE) == VT_STRUCT &&
48284828 (sec || !first || tok == '{')) {
48294829 int par_count;
48304830
@@ -4837,7 +4837,7 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c, · 6 unmodified lines
48374837 to do it correctly (ideally, the expression parser should
48384838 be used in all cases) */
48394839 par_count = 0;
4840− /* Coo: I think we must not deal '(' */
4840+ /* Coo: I think we must not deal '(' */
48414841 if (tok == '(') {
48424842 AttributeDef ad1;
48434843 CType type1;
@@ -4861,15 +4861,15 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c, · 17 unmodified lines
48614861 no_oblock = 0;
48624862 }
48634863 s = type->ref;
4864− f = s->next;
4865− /* Coo: skip empty struct */
4866− while (f->next && (f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c)
4867− f=f->next;
4864+ f = s->next;
4865+ /* Coo: skip empty struct */
4866+ while (f->next && (f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c)
4867+ f=f->next;
48684868 array_length = 0;
48694869 index = 0;
48704870 n = s->c;
48714871 while (tok != '}') {
4872− int bit_pos;
4872+ int bit_pos;
48734873 decl_designator(type, sec, c, NULL, &f, size_only);
48744874 index = f->c;
48754875 if (!size_only && array_length < index) {
@@ -4880,25 +4880,25 @@ static void decl_initializer(CType *type, Section *sec, unsigned long c, · 4 unmodified lines
48804880 if (index > array_length)
48814881 array_length = index;
48824882
4883− /* Coo: skip fields from same union */
4884− if (!(f->type.t&VT_BITFIELD))
4885− bit_pos=index*8;
4886− else
4887− bit_pos=f->c*8+((f->type.t>>VT_STRUCT_SHIFT)&0x3f)+((f->type.t>>(VT_STRUCT_SHIFT+6))&0x3f);
4888− do
4889− f=f->next;
4890− while (f && (((f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c) ||
4891− f->c*8+((f->type.t&VT_BITFIELD)?((f->type.t>>VT_STRUCT_SHIFT)&0x3f):0)<bit_pos));
4892−
4893− if (no_oblock && f == NULL)
4894− break;
4883+ /* Coo: skip fields from same union */
4884+ if (!(f->type.t&VT_BITFIELD))
4885+ bit_pos=index*8;
4886+ else
4887+ bit_pos=f->c*8+((f->type.t>>VT_STRUCT_SHIFT)&0x3f)+((f->type.t>>(VT_STRUCT_SHIFT+6))&0x3f);
4888+ do
4889+ f=f->next;
4890+ while (f && (((f->type.t&VT_BTYPE)==VT_STRUCT && !f->type.ref->c) ||
4891+ f->c*8+((f->type.t&VT_BITFIELD)?((f->type.t>>VT_STRUCT_SHIFT)&0x3f):0)<bit_pos));
4892+
4893+ if (no_oblock && f == NULL)
4894+ break;
48954895 if (tok == '}')
48964896 break;
4897− /* Coo: skip ')' in front of ',' for initializer */
4898− while (tok==')' && par_count) {
4899− next();
4900− par_count--;
4901− }
4897+ /* Coo: skip ')' in front of ',' for initializer */
4898+ while (tok==')' && par_count) {
4899+ next();
4900+ par_count--;
4901+ }
49024902 skip(',');
49034903 }
49044904 /* put zeros at the end */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t