Make scaling available at front end

This commit is contained in:
hooper114 2008-12-21 11:29:15 +00:00
parent 262df78145
commit db6757ab91

View File

@ -196,6 +196,7 @@ int main(int argc, char **argv)
{"case", 0, 0, 'c'}, {"case", 0, 0, 'c'},
{"mode=", 1, 0, 0}, {"mode=", 1, 0, 0},
{"primary=", 1, 0, 0}, {"primary=", 1, 0, 0},
{"scale=", 1, 0, 0},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmp", long_options, &option_index); 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=")) { if(!strcmp(long_options[option_index].name, "bg=")) {
strncpy(my_symbol->bgcolour, optarg, 7); 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=")) { if(!strcmp(long_options[option_index].name, "border=")) {
error_number = validator(NESET, optarg); error_number = validator(NESET, optarg);
if(error_number == ERROR_INVALID_DATA) { if(error_number == ERROR_INVALID_DATA) {