int	set_rule(DviContext *dvi, int opcode)
{
	Int32	a, b;
	int	h, w;
	
	a = dsget4(dvi);
	b = dsget4(dvi); w = rule_round(dvi, b);
	if(a > 0 && b > 0) {
		h = vrule_round(dvi, a); 
		SHOWCMD((dvi, opcode == DVI_SET_RULE ? "setrule" : "putrule", -1,
			"width %d, height %d (%dx%d pixels)\n",
			b, a, w, h));
		/* the `draw' functions expect the origin to be at the top left
		 * corner of the rule, not the bottom left, as in DVI files */
		if(dvi->curr_layer <= dvi->params.layer) {
			draw_shrink_rule(dvi,
					 dvi->pos.hh, dvi->pos.vv - h + 1, w, h, 1);
		}
	} else { 
		SHOWCMD((dvi, opcode == DVI_SET_RULE ? "setrule" : "putrule", -1,
			"(moving left only, by %d)\n", b));
	}
			
	if(opcode == DVI_SET_RULE) {
		dvi->pos.h  += b;
		dvi->pos.hh += w;
		fix_after_horizontal(dvi);
	}
	return 0;
}
int	set_rule(DviContext *dvi, int opcode)
{
	Int32	a, b;
	int	h, w;
	
	a = dsget4(dvi);
	b = dsget4(dvi); w = rule_round(dvi, b);
	if(a > 0 && b > 0) {
		h = vrule_round(dvi, a); 
		SHOWCMD((dvi, opcode == DVI_SET_RULE ? "setrule" : "putrule", -1,
			"width %d, height %d (%dx%d pixels)\n",
			b, a, w, h));
		 
		if(dvi->curr_layer <= dvi->params.layer) {
			draw_shrink_rule(dvi,
					 dvi->pos.hh, dvi->pos.vv - h + 1, w, h, 1);
		}
	} else { 
		SHOWCMD((dvi, opcode == DVI_SET_RULE ? "setrule" : "putrule", -1,
			"(moving left only, by %d)\n", b));
	}
			
	if(opcode == DVI_SET_RULE) {
		dvi->pos.h  += b;
		dvi->pos.hh += w;
		fix_after_horizontal(dvi);
	}
	return 0;
}