cmd_debug_paper_size (struct lexer *lexer, struct dataset *ds UNUSED)
{
const char *paper_size;
- int h, v;
+ double h, v;
if (!lex_force_string (lexer))
return CMD_FAILURE;
printf ("\"%s\" => ", paper_size);
if (measure_paper (paper_size, &h, &v))
- printf ("%.1f x %.1f in, %.0f x %.0f mm\n",
- h / 72000., v / 72000.,
- h / (72000 / 25.4), v / (72000 / 25.4));
+ printf ("%.1f x %.1f in, %.0f x %.0f mm\n", h, v, h * 25.4, v * 25.4);
else
printf ("error\n");
lex_get (lexer);
- return lex_end_of_command (lexer);
+ return CMD_SUCCESS;
}