From 987942a206ef0f2342bf81d5de6432c6af42b7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 21 Nov 2023 09:56:26 +0100 Subject: New upstream version 4.17 --- assorted/unit2any.c | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 assorted/unit2any.c (limited to 'assorted/unit2any.c') diff --git a/assorted/unit2any.c b/assorted/unit2any.c deleted file mode 100644 index 74e87d3..0000000 --- a/assorted/unit2any.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include - -static double dpi = 96; - -static void px2any(const struct HXoptcb *cbi) -{ - double px = cbi->data_dbl; - - printf("%f px are (at %f DPI) equal to:\n", px, dpi); - printf("\t%f inch\n", px / dpi); - printf("\t%f pt\n", px * 72 / dpi); - printf("\t%f cm\n", px * 2.54 / dpi); -} - -static void pt2any(const struct HXoptcb *cbi) -{ - double pt = cbi->data_dbl; - - printf("%f pt are equal to:\n", pt); - printf("\t%f inch\n", pt / 72); - printf("\t%f px (at %f DPI)\n", dpi * pt / 72, dpi); - printf("\t%f cm\n", pt * 2.54 / 72); -} - -static const struct HXoption option_table[] = { - {.sh = 'D', .ln = "dpi", .type = HXTYPE_DOUBLE, .ptr = &dpi, - .help = "Resolution (default: 96 dpi)"}, - {.sh = 'P', .ln = "px", .type = HXTYPE_DOUBLE, .cb = px2any}, - {.sh = 'p', .ln = "pt", .type = HXTYPE_DOUBLE, .cb = pt2any}, - HXOPT_AUTOHELP, - HXOPT_TABLEEND, -}; - -static bool get_options(int *argc, const char ***argv) -{ -} - -int main(int argc, const char **argv) -{ - int ret; - - ret = HX_getopt(option_table, &argc, &argv, HXOPT_USAGEONERR); - if (ret != HXOPT_ERR_SUCCESS) - return EXIT_FAILURE; - - -} -- cgit v1.2.3