void itof(register sym_t *p) { #ifdef xOTR3 if (tTf(87, 2)) { printf("itof: "); prsym(p); } #endif if (p->len == 4) p->value.sym_data.f8type = p->value.sym_data.i4type; else if (p->len == 2) p->value.sym_data.f8type = p->value.sym_data.i2type; else p->value.sym_data.f8type = p->value.sym_data.i1type; p->type = FLOAT_CONST; p->len= 8; #ifdef xOTR3 if (tTf(87, 2)) { printf("itof rets: "); prsym(p); } #endif }
void print_letter(char c, int iline){ //printf("the number of %c is %d \n",c,c); int code = c; //printf("the number of %c is %d \n",c,code); prsym(code - 32, iline); }
void i4toi2(sym_t *pp) { register sym_t *p; #ifdef xOTR3 if (tTf(87, 1)) { printf("i4toi2: "); prsym(pp); } #endif p = pp; *(i2type *)&p->value = *(i4type *)&p->value; p->len = 2; #ifdef xOTR3 if (tTf(87, 1)) { printf("i4toi2 rets: "); prsym(p); } #endif }
void i2toi4(sym_t *pp) { register sym_t *p; #ifdef xOTR3 if (tTf(87, 0)) { printf("i2toi4: "); prsym(pp); } #endif p = pp; *(i4type *)&p->value = *(i2type *)&p->value; p->len = 4; #ifdef xOTR3 if (tTf(87, 0)) { printf("i2toi4 rets: "); prsym(p); } #endif }
void ftoi4(register sym_t *p) { #ifdef xOTR3 if (tTf(87, 4)) { printf("ftoi4: "); prsym(p); } #endif if (p->len == 4) p->value.sym_data.i4type = p->value.sym_data.f4type; else p->value.sym_data.i4type = p->value.sym_data.f8type; p->type = INT_CONST; p->len = 4; #ifdef xOTR3 if (tTf(87, 4)) { printf("ftoi4 rets: "); prsym(p); } #endif }
static void synbad(void) { prp(); prs(synmsg); if ((flags & ttyflg) == 0) { prs(atline); prn(standin->flin); } prs(colon); prc(LQ); if (wdval) prsym(wdval); else prs(wdarg->argval); prc(RQ); prs(unexpected); newline(); exitsh(SYNBAD); }