Commit 4760dc31 authored by Richard Levitte's avatar Richard Levitte
Browse files

Merge in the following changes (from the main trunk log):

>----------------------------
>revision 1.24
>date: 2001/04/29 16:30:59;  author: steve;  state: Exp;  lines: +5 -1
>Win32 fixes:
>
>define LLONG properly for VC++.
>
>stop compiler complaining about signed/unsigned mismatch in apps/engine.c
>----------------------------
>revision 1.22
>date: 2001/02/27 23:59:18;  author: ulf;  state: Exp;  lines: +1 -1
>%f conversion bug fix
>Submitted by: Henrik Eriksson <henrik.eriksson@axis.com>
>----------------------------
>revision 1.21
>date: 2000/10/22 12:44:12;  author: levitte;  state: Exp;  lines: +3 -3
>On some operating systems, MAX is defined.  Call ours OSSL_MAX instead
parent 5fde80cd
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -109,7 +109,11 @@
#endif

#if HAVE_LONG_LONG
# if defined(WIN32) && !defined(__GNUC__)
# define LLONG _int64
# else
# define LLONG long long
# endif
#else
#define LLONG long
#endif
@@ -152,7 +156,7 @@ static void _dopr(char **sbuffer, char **buffer,

/* some handy macros */
#define char_to_int(p) (p - '0')
#define MAX(p,q) ((p >= q) ? p : q)
#define OSSL_MAX(p,q) ((p >= q) ? p : q)

static void
_dopr(
@@ -503,13 +507,13 @@ fmtint(
    convert[place] = 0;

    zpadlen = max - place;
    spadlen = min - MAX(max, place) - (signvalue ? 1 : 0);
    spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0);
    if (zpadlen < 0)
        zpadlen = 0;
    if (spadlen < 0)
        spadlen = 0;
    if (flags & DP_F_ZERO) {
        zpadlen = MAX(zpadlen, spadlen);
        zpadlen = OSSL_MAX(zpadlen, spadlen);
        spadlen = 0;
    }
    if (flags & DP_F_MINUS)
@@ -641,7 +645,7 @@ fmtfp(
            (caps ? "0123456789ABCDEF"
              : "0123456789abcdef")[fracpart % 10];
        fracpart = (fracpart / 10);
    } while (fracpart && (fplace < 20));
    } while (fplace < max);
    if (fplace == 20)
        fplace--;
    fconvert[fplace] = 0;