Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cobj/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ static void joutput_base(struct cb_field *f) {
}

if (cb_field_variable_address(f)) {
int firstLoop = 1;
for (p = f->parent; p; f = f->parent, p = f->parent) {
for (p = p->children; p != f; p = p->sister) {
struct cb_field *v = cb_field_variable_size(p);
Expand All @@ -900,9 +901,16 @@ static void joutput_base(struct cb_field *f) {
}
joutput_integer(v->occurs_depending);
} else {
joutput(" + %d", p->size * p->occurs_max);
if (firstLoop) {
joutput(".getSubDataStorage(");
joutput("%d", p->size * p->occurs_max);
firstLoop = 0;
} else {
joutput(" + %d", p->size * p->occurs_max);
}
}
}
joutput(")");
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions cobj/pplex.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#line 1 "pplex.c"
#line 1 "pplex.c"

#line 3 "pplex.c"
#line 3 "pplex.c"

#define YY_INT_ALIGNED short int
#define YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */
Expand Down Expand Up @@ -385,6 +388,7 @@ typedef unsigned int flex_uint32_t;
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
Expand All @@ -403,6 +407,7 @@ typedef unsigned int flex_uint32_t;
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
Expand Down
6 changes: 6 additions & 0 deletions cobj/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -3618,6 +3618,12 @@ read_literal (int mark, enum cb_category category)
}

while ((c = input ()) != EOF) {
#if EOF != 0
if (unlikely (c == 0)){
cb_error(_("The literal is not properly closed by %c."), mark);
break;
}
#endif
plexbuff[i++] = c;
if (c == mark && (c = input ()) != mark) {
i--;
Expand Down
6 changes: 6 additions & 0 deletions cobj/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,12 @@ read_literal (int mark, enum cb_category category)
}

while ((c = input ()) != EOF) {
#if EOF != 0
if (unlikely (c == 0)){
cb_error(_("The literal is not properly closed by %c."), mark);
break;
}
#endif
plexbuff[i++] = c;
if (c == mark && (c = input ()) != mark) {
i--;
Expand Down
Loading