add: if (neg) ip->data.fval = -ip->data.fval; neg = 0; comma = 0;
context: parse_aperture_macro(gerb_file_t *fd){    amacro_t *amacro;    instruction_t *ip = NULL;    int primitive = 0;    enum opcodes math_op = NOP;    amacro = new_amacro();    /*     * Get macroname     */    amacro->name = gerb_fgetstring(fd, '*');    /*     * Since I'm lazy I have a dummy head. Therefore the first      * instruction in all programs will be NOP.     */    amacro->program = new_instruction();    ip = amacro->program;    while(1) {	/*	 * First element describes which primitive element to use	 */	if (primitive == 0) {	    primitive = gerb_fgetint(fd);	}	switch (gerb_fgetc(fd)) {	case '$':	    ip->next = new_instruction(); /* XXX Check return value */	    ip = ip->next;	    ip->opcode = PPUSH;	    ip->data.ival = gerb_fgetint(fd);	    break;	case '*':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;		math_op = NOP;	    }	    /*	     * Check is due to some gerber files has spurious empty lines.	     * (EagleCad of course).	     */	    if (primitive != 0) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = PRIM;		ip->data.ival = primitive;		primitive = 0;	    }	    break;	case ',':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;		math_op = NOP;	    }	    break;	case '+':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;	    }	    math_op = ADD;	    break;	case '-':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;	    }	    math_op = SUB;	    break;	case '/':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;	    }	    math_op = DIV;	    break;	case 'X':	case 'x':	    if (math_op != NOP) {		ip->next = new_instruction(); /* XXX Check return value */		ip = ip->next;		ip->opcode = math_op;	    }	    math_op = MUL;	    break;	case '0':	case '1':	case '2':	case '3':	case '4':	case '5':	case '6':	case '7':	case '8':	case '9':	    (void)gerb_ungetc(fd);	    ip->next = new_instruction(); /* XXX Check return value */	    ip = ip->next;	    ip->opcode = PUSH;	    ip->data.fval = gerb_fgetdouble(fd);	    break;	case '%':	    gerb_ungetc(fd);  /* Must return with % first in string				 since the main parser needs it */	    return amacro;	default :	    /* Whitespace */	}    }}