static bool vax () { return e == 0x44332211; };
} byteorder;
-template<typename T, typename U>
-static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
-template<typename T, typename U>
-static inline T max (T a, U b) { return a > (T)b ? a : (T)b; }
-template<typename T, typename U, typename V>
-static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; }
+template<typename T, typename U> static inline T min (T a, U b) { return a < (T)b ? a : (T)b; }
+template<typename T, typename U> static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; }
+template<typename T, typename U> static inline T max (T a, U b) { return a > (T)b ? a : (T)b; }
+template<typename T, typename U> static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; }
+
+template<typename T, typename U, typename V> static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; }
+template<typename T, typename U, typename V> static inline void clamp_it (T &v, U a, V b) { v = v < (T)a ? a : v >(T)b ? b : v; }
+
template<typename T, typename U>
static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; }
if (line->is_longer ()) /* break line continuation */
line->l = ncol;
- line->l = max (line->l - count, 0);
+ max_it (line->l - count, 0);
if (selection.op && current_screen == selection.screen
&& ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur))
#endif
#ifdef DEBUG_STRICT
- x = max (x, 0);
- x = min (x, (int)width);
- y = max (y, 0);
- y = min (y, (int)height);
+#if 0
+ // that's not debugging //TODO //FIXME
+ clamp_it (x, 0, width);
+ clamp_it (y, 0, height);
+#endif
#endif
/* round down */