buf[0] = '\0'; switch (type) { case number: snprintf(buf, sizeof(buf), _(ent->out), val); break; case i_forward: type = normal; snprintf(buf, sizeof(buf), _(ent->out), val == 2 ? _("enabled") : _("disabled")); break; case i_outp_icmp: case i_inp_icmp: if (val > 0) snprintf(buf, sizeof(buf), _(ent->out), val); break; case i_rto_alg:  break; default: abort(); } if (buf[0]) printf("%*s%s\n",indent[type],"", buf);  state = type;
state = type;
void printval(struct tabtab *tab, char *title, int val) {	struct entry *ent, key; 	int type; 	char buf[512];	key.title = title; 	ent = bsearch(&key, tab->tab, tab->size/sizeof(struct entry),				  sizeof(struct entry), cmpentries); 	if (!ent)  { /* try our best */ 		printf("%*s%s: %d\n", indent[state], "", title, val);		return;	}	type = ent->type; 	if (type & I_STATIC) {		type &= ~I_STATIC; 		if (!print_static) 			return; 	}	if (*ent->out == '\0') 		return; 	if (type & I_TITLE) {		type &= ~I_TITLE;		if (state != type)			printf("%*s%s\n", indent[state], "", _(titles[type]));	}	buf[0] = '\0';	switch (type) {	case number:		snprintf(buf, sizeof(buf), _(ent->out), val);		break; 	case i_forward:		type = normal;		snprintf(buf, sizeof(buf), _(ent->out), val == 2 ? _("enabled") : _("disabled"));		break; 	case i_outp_icmp:	case i_inp_icmp: 		if (val > 0)			snprintf(buf, sizeof(buf), _(ent->out), val); 		break; 	case i_rto_alg: /* XXXX */		break; 	default:		abort(); 	}	if (buf[0]) 		printf("%*s%s\n",indent[type],"", buf);		state = type;}