Commit Graph

9 Commits

Author SHA1 Message Date
Chun-wei Fan 998e8dda93 util: Fix build on Visual Studio
Use the fallback implementation for lround() only on pre-2013 Visual
Studio, and ensure we are clear about the types of the parameters for
lround() and scalbnf(), since Visual Studio can be quite picky on
ambiguous parameter types.  Also, use g_ascii_strcasecmp() rather than
strcasecmp() as we are already using GLib for this code and we are
assured that g_ascii_strcasemp() is available.

For scalbnf() on pre-2013 Visaul Studio, a fallback implementation is
needed, but use another forced-included header for those compilers, which
will be added later.

Also use (char)27 on Visual Studio builds as '\e' is not a recognized
escape sequence, which will do the same thing.
2015-11-16 23:04:35 +08:00
Behdad Esfahbod ff0f210519 [util] Minor 2015-05-18 18:37:46 -07:00
Behdad Esfahbod 7235f33f9e Fix misc warnings reported by cppcheck
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Chun-wei Fan b4c5c52944 util/ansi-print.cc: Use fallback implementation for lround on MSVC
Unfortuately Visual Studio (still) does not support the C99 function
lround, so provide a fallback implementation for it.
2013-06-03 18:50:26 -04:00
Behdad Esfahbod 7ec83051c0 Fix warnings 2012-06-07 13:32:57 -04:00
Behdad Esfahbod 8caf5dcd66 Minor 2012-05-13 17:10:18 +02:00
Behdad Esfahbod 50f630c17c Remove ioctl checks
Ended up not using terminal size after all.
2012-05-13 13:03:44 +02:00
Behdad Esfahbod db0de7cd61 [util] Set ansi color only on color change 2012-05-13 13:02:38 +02:00
Behdad Esfahbod 52e7b1424a [util] Make hb-view print out Unicode art if stdout is a terminal 2012-05-13 07:55:00 +02:00