mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-06-20 17:58:56 +02:00
Improve error message for invalid box size on osx #54
This commit is contained in:
parent
056a497cc8
commit
7da5fc91f4
@ -675,11 +675,7 @@ static int process_commandline (int argc, char *argv[])
|
|||||||
opt.reqheight = strtol (pdummy+1, NULL, 10);
|
opt.reqheight = strtol (pdummy+1, NULL, 10);
|
||||||
*pdummy = 'x';
|
*pdummy = 'x';
|
||||||
}
|
}
|
||||||
if(errno){
|
if(errno || (opt.reqwidth == 0 && opt.reqheight == 0)
|
||||||
fprintf (stderr, "%s: box size: %s, '%s'\n",
|
|
||||||
PROJECT, strerror(idummy), optarg);
|
|
||||||
return 1;
|
|
||||||
} else if ((opt.reqwidth == 0 && opt.reqheight == 0)
|
|
||||||
|| opt.reqwidth < 0 || opt.reqheight < 0) {
|
|| opt.reqwidth < 0 || opt.reqheight < 0) {
|
||||||
fprintf (stderr, "%s: invalid box size specification -- %s\n",
|
fprintf (stderr, "%s: invalid box size specification -- %s\n",
|
||||||
PROJECT, optarg);
|
PROJECT, optarg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user