option -geo now accepts short names

This commit is contained in:
Zeno Rogue 2019-10-05 13:02:28 +02:00
parent 0e1b9c6720
commit 0b629c7bb2
1 changed files with 1 additions and 0 deletions

View File

@ -921,6 +921,7 @@ EX void runGeometryExperiments() {
#if CAP_COMMANDLINE
eGeometry readGeo(const string& ss) {
for(int i=0; i<isize(ginf); i++) if(ginf[i].shortname == ss) return eGeometry(i);
bool numeric = true;
for(char c: ss) if(c < '0' || c > '9') numeric = false;
if(numeric) return eGeometry(atoi(ss.c_str()));