All pastes #244714 Raw Edit

Someone

public c v1 · immutable
#244714 ·published 2006-11-10 02:22 UTC
rendered paste body
#include "get_token.c"#include "rpn_stack.c"#include "ghash.c"int execute(char *line, int *curd_col) {	int empty = 0;	int cur_col = 0;	struct token t = get_token(line, &cur_col, &empty);	while (!empty) {		//printf("[%s] ", t.tvalue.data_string);		empty = 0;		//printf("poop is ymmu { } 4 ");		int ttype = t.ttype;		//printf("type=%d\n", ttype);		if (ttype == INT_TYPE || ttype == DOUBLE_TYPE || ttype == STRING_TYPE) {						push(&rpn_stack, t.tvalue, t.ttype);		} else if (ttype == SYMBOL_TYPE) {			char *tstring = t.tvalue.data_string;		//	printf("[%s]\n", tstring);			int empty = 0;		//	printf("hi\n");			pt2Func fp = hash_search(tstring, &empty);		//	printf("holy\n");			if (!empty && ( fp != NULL) ) {		//		printf("not empty\n");				fp(&rpn_stack);				//hash_search(tstring, &empty)(&rpn_stack);			}			free(tstring);					}				t = get_token(line, &cur_col, &empty);	}}