From db6757ab91e91dcd53d010401a89a61cc7894286 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Sun, 21 Dec 2008 11:29:15 +0000 Subject: [PATCH] Make scaling available at front end --- frontend/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/main.c b/frontend/main.c index 3c7a67ed..9b21ea55 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -196,6 +196,7 @@ int main(int argc, char **argv) {"case", 0, 0, 'c'}, {"mode=", 1, 0, 0}, {"primary=", 1, 0, 0}, + {"scale=", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index); @@ -215,6 +216,14 @@ int main(int argc, char **argv) if(!strcmp(long_options[option_index].name, "bg=")) { strncpy(my_symbol->bgcolour, optarg, 7); } + if(!strcmp(long_options[option_index].name, "scale=")) { + my_symbol->scale = (float)(atof(optarg)); + if(my_symbol->scale < 0.01) { + /* Zero and negative values are not permitted */ + fprintf(stderr, "Invalid scale value\n"); + my_symbol->scale = 1.0; + } + } if(!strcmp(long_options[option_index].name, "border=")) { error_number = validator(NESET, optarg); if(error_number == ERROR_INVALID_DATA) {