else {
str[pos++] = '\\';
if (pos == str_size)
- str = Srealloc(str, str_size += RSTRSIZE);
+ str = Srealloc(str,
+ str_size += RSTRSIZE);
ch = nch;
}
}
register arith bits_in_type = atype->tp_size * 8;
ch7bin(expp, LEFT,
- intexpr(bits_in_type - fd->fd_width - fd->fd_shift, INT)
+ intexpr(bits_in_type - fd->fd_width - fd->fd_shift,
+ INT)
);
ch7bin(expp, RIGHT, intexpr(bits_in_type - fd->fd_width, INT));
}
}
if ((*expp)->ex_type->tp_fund == POINTER) {
pointer_arithmetic(expp, oper, &expr);
- if (expr->ex_type->tp_size != (*expp)->ex_type->tp_size)
+ if ( expr->ex_type->tp_size !=
+ (*expp)->ex_type->tp_size
+ ) {
ch7cast(&expr, CAST, (*expp)->ex_type);
+ }
pointer_binary(expp, oper, expr);
}
else {
*/
if (def->df_sc == REGISTER) {
expr_error(*expp,
- "& on register variable not allowed");
+ "& on register variable not allowed");
(*expp)->ex_type = error_type;
break; /* break case '&' */
}
if (is_fp_cst(*expp))
switch_sign_fp(*expp);
else
- *expp = new_oper((*expp)->ex_type, NILEXPR, oper, *expp);
+ *expp = new_oper((*expp)->ex_type,
+ NILEXPR, oper, *expp);
break;
case '!':
if ((*expp)->ex_type->tp_fund == FUNCTION)
if (c == '\\') { /* check for "\\\n" */
LoadChar(c);
if (c == '\n') {
- /* more than one line is used for the
- replacement text. Replace "\\\n" by " ".
+ /* More than one line is used for the
+ replacement text.
+ Replace "\\\n" by " ".
*/
text[pos++] = ' ';
++LineNumber;
sprintf(buf, "<NILTYPE>");
return buf;
}
- sprintf(buf, "(@%lx, #%ld, &%d) ", tp, (long)tp->tp_size, tp->tp_align);
+ sprintf(buf, "(@%lx, #%ld, &%d) ",
+ tp, (long)tp->tp_size, tp->tp_align);
while (ops) {
switch (tp->tp_fund) {
case POINTER:
int code: indicates whether the expression tree must be
turned into EM code or not. E.g. the expression
statement "12;" delivers the expression "12" to
- EVAL while this should not result in any EM code
+ EVAL while this should not result in any EM
+ code
label false_label:
label true_label: if the expression is a logical or relational
expression and if the loop of the program
depends on the resulting value then EVAL
- generates jumps to the specified program labels,
- in case they are specified (i.e. are non-zero)
+ generates jumps to the specified program
+ labels, in case they are specified
+ (i.e. are non-zero)
*/
EVAL(expr, val, code, true_label, false_label)
EVAL(leftop, RVAL, code, NO_LABEL, NO_LABEL);
EVAL(rightop, RVAL, code, NO_LABEL, NO_LABEL);
if (gencode)
- if (tp->tp_fund == INT || tp->tp_fund == LONG) {
+ if ( tp->tp_fund == INT
+ || tp->tp_fund == LONG
+ ) {
if (tp->tp_unsigned)
C_rmu(tp->tp_size);
else
EVAL(rightop, RVAL, code, NO_LABEL, NO_LABEL);
if (gencode) {
/* The operands have the same type */
+ arith size = leftop->ex_type->tp_size;
+
switch (tp->tp_fund) {
case INT:
case LONG:
if (leftop->ex_type->tp_unsigned)
- C_cmu(leftop->ex_type->tp_size);
+ C_cmu(size);
else
- C_cmi(leftop->ex_type->tp_size);
+ C_cmi(size);
break;
case FLOAT:
case DOUBLE:
- C_cmf(leftop->ex_type->tp_size);
+ C_cmf(size);
break;
case POINTER:
C_cmp();
break;
case ENUM:
- C_cmi(leftop->ex_type->tp_size);
+ C_cmi(size);
break;
default:
CRASH();
EVAL(leftop, RVAL, TRUE, l_true, l_false);
C_df_ilb(l_true);
- EVAL(rightop->OP_LEFT, RVAL, code, NO_LABEL, NO_LABEL);
+ EVAL(rightop->OP_LEFT, RVAL, code,
+ NO_LABEL, NO_LABEL);
C_bra(l_end);
C_df_ilb(l_false);
- EVAL(rightop->OP_RIGHT, RVAL, code, NO_LABEL, NO_LABEL);
+ EVAL(rightop->OP_RIGHT, RVAL, code,
+ NO_LABEL, NO_LABEL);
C_df_ilb(l_end);
break;
}
expr->ex_type = long_type;
break;
case UNSIGNED:
- /* We cannot make a test like "ivalue <= max_unsigned"
- because, if sizeof(long) == int_size holds, max_unsigned
- may be a negative long in which case the comparison
- results in an unexpected answer. We assume that
- the type "unsigned long" is not part of portable C !
+ /* We cannot make a test like
+ ivalue <= max_unsigned
+ because, if
+ sizeof(long) == int_size
+ holds, max_unsigned may be a negative long in
+ which case the comparison results in an unexpected
+ answer. We assume that the type "unsigned long"
+ is not part of portable C !
*/
expr->ex_type =
(ivalue & ~max_unsigned) ? long_type : uint_type;
char *cbuf; /* pointer to buffer to be returned */
register tmp;
- if ((fd = sys_open(filename, OP_RDONLY)) < 0) /* can't open this file */
+ if ((fd = sys_open(filename, OP_RDONLY)) < 0) {
+ /* can't open this file */
return (char *) 0;
+ }
if ((*size = sys_fsize(fd)) < 0)
fatal("(readfile) cannot get size of file");
#ifndef READ_IN_ONE
#ifndef NOPP
- if (FilDes >= 0 && (head->bh_size = readblock(FilDes, head->bh_text)) > 0)
+ if ( FilDes >= 0
+ && (head->bh_size = readblock(FilDes, head->bh_text)) > 0
+ ) {
return ipp = &(head->bh_text[1]), *ipp++;
+ }
#else NOPP
if (FilDes >= 0 && (isize = readblock(FilDes, &ibuf[0])) > 0)
return ipp = &ibuf[1], *ipp++;
lastlineno = dot.tk_line;
if (!options['P'])
printf("\n#line %ld \"%s\"\n",
- lastlineno, lastfilenm);
+ lastlineno,
+ lastfilenm
+ );
}
}
else {
text[pos++] = *p;
if (pos == size) {
- text = Srealloc(text, size += RSTRSIZE);
+ text = Srealloc(text,
+ size += RSTRSIZE);
}
}
}
break;
case ',':
- if (!level) { /* next parameter encountered */
+ if (!level) {
+ /* next parameter encountered */
copy(EOS);
if (++nr_of_params >= NPARAMS) {
local_level->sl_next = stl;
stl->sl_previous = local_level;
stl->sl_level = ++level;
- stl->sl_local_offset = stl->sl_max_block = local_level->sl_local_offset;
+ stl->sl_local_offset =
+ stl->sl_max_block = local_level->sl_local_offset;
local_level = stl;
}
free_def(def);
update_ahead(idf);
}
- while ((sdef = idf->id_sdef) && sdef->sd_level >= level) {
+ while ( (sdef = idf->id_sdef)
+ && sdef->sd_level >= level
+ ) {
/* unlink it from the sdef list under the idf block */
idf->id_sdef = sdef->next;
free_sdef(sdef);
}
- while ((tag = idf->id_struct) && tag->tg_level >= level) {
+ while ( (tag = idf->id_struct)
+ && tag->tg_level >= level
+ ) {
/* unlink it from the struct list under the idf block */
idf->id_struct = tag->next;
free_tag(tag);
*/
lastlvl = local_level;
local_level = local_level->sl_previous;
- if (level > L_LOCAL && lastlvl->sl_max_block < local_level->sl_max_block)
- local_level->sl_max_block = lastlvl->sl_max_block;
+ if ( level > L_LOCAL
+ && lastlvl->sl_max_block < local_level->sl_max_block
+ ) {
+ local_level->sl_max_block = lastlvl->sl_max_block;
+ }
free_stack_level(lastlvl);
local_level->sl_next = (struct stack_level *) 0;
level = local_level->sl_level;
{
C_df_ilb(l_continue);
if (e_incr)
- code_expr(e_incr, RVAL, FALSE, NO_LABEL, NO_LABEL);
+ code_expr(e_incr, RVAL, FALSE,
+ NO_LABEL, NO_LABEL);
C_bra(l_test);
C_df_ilb(l_break);
stat_unstack();