--- classes/tdisplay.cc.orig 2017-08-18 14:39:55 UTC +++ classes/tdisplay.cc @@ -22,6 +22,11 @@ same used in original Turbo Vision for compatibility p #define Uses_TVCodePage #include +inline unsigned int absdiff(unsigned int a, unsigned int b) +{ + return (a>=b)?a-b:b-a; +} + // Remove me please! int TDisplay::dual_display=0; @@ -381,10 +386,10 @@ Boolean TDisplay::searchClosestRes(TScreenResolution * if (firstXMatch!=-1) {// Return the closest y that match x i=indexMin=firstXMatch; - minDif=abs(res[i].y-y); + minDif=absdiff(res[i].y,y); while (++i