Example #1
0
static int eval_if(int (*next)(void), void (*back)(int))
{
	int neg = 0;
	int ret;
	int c;
	do {
		c = next();
	} while (c == ' ' || c == '\t');
	if (c == '!') {
		neg = 1;
		c = next();
	}
	back(c);
	if (strchr("oetn", c)) {
		ret = if_cond(next, back);
	} else if (c == ' ') {
		ret = 0;
	} else if (!isdigit(c) && !strchr("-+*/%<=>&:.|()", c)) {
		ret = if_strcmp(next, back);
	} else {
		ret = if_eval(next, back);
	}
	return ret != neg;
}
Example #2
0
static ert_impl_type enkf_types_get_impl_type__(const char * impl_type_string) {
  ert_impl_type impl_type;
  if_strcmp(SUMMARY);
  else if_strcmp(FIELD);