Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | ea627b1d2f8502d936973e71fa1296b6f8adf7d1 |
|---|---|
| Date: | 2009-08-02 08:08:43 |
| User: | stephan |
| Comment: | minor internal cleanups |
Tags And Properties
- branch=trunk inherited from [f1bea87b3b]
- sym-trunk inherited from [f1bea87b3b]
Changes
[hide diffs]Changes to whprintf.c
@@ -26,11 +26,11 @@
#include <stdio.h> /* FILE */
#include <string.h> /* strlen() */
#include <stdlib.h> /* free/malloc() */
#include <ctype.h>
-
+#include <stdint.h>
#include "whprintf.h"
typedef long double LONGDOUBLE_TYPE;
/*
If WHPRINTF_OMIT_FLOATING_POINT is defined to a true value, then
@@ -344,19 +344,21 @@
*/
#ifndef WHPRINTF_BUF_SIZE
# define WHPRINTF_BUF_SIZE 350 /* Size of the output buffer for numeric conversions */
#endif
+#if ! defined(__STDC__) && !defined(__TINYC__)
#ifdef WHPRINTF_INT64_TYPE
typedef WHPRINTF_INT64_TYPE int64_t;
typedef unsigned WHPRINTF_INT64_TYPE uint64_t;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
+#endif
#endif
#if 0
/ Not yet used. */
enum PrintfArgTypes {
@@ -761,11 +763,11 @@
LONGDOUBLE_TYPE realvalue; /* Value for real types */
const et_info *infop = 0; /* Pointer to the appropriate info structure */
char buf[WHPRINTF_BUF_SIZE]; /* Conversion buffer */
char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */
etByte errorflag = 0; /* True if an error is encountered */
- etByte xtype; /* Conversion paradigm */
+ etByte xtype = 0; /* Conversion paradigm */
char * zExtra = 0; /* Extra memory used for etTCLESCAPE conversions */
#if ! WHPRINTF_OMIT_FLOATING_POINT
int exp, e2; /* exponent of real numbers */
double rounder; /* Used for rounding floating point values */
etByte flag_dp; /* True if decimal point should be shown */
Changes to whprintf.h
@@ -1,12 +1,13 @@
-#ifndef WHPRINTF_H_INCLUDED_
-#define WHPRINTF_H_INCLUDED_ 1
+#ifndef WANDERINGHORSE_NET_WHPRINTF_H_INCLUDED
+#define WANDERINGHORSE_NET_WHPRINTF_H_INCLUDED 1
#include <stdarg.h>
+#include <stdio.h> /* FILE handle */
#ifdef __cplusplus
extern "C" {
#endif
-/**@page whprintf_page_main whprintf: generic printf-like utilities
+/** @page whprintf_page_main whprintf printf-like API
This API contains a printf-like implementation which supports
aribtrary data destinations.
Authors: many, probably. This code supposedly goes back to the
@@ -161,6 +162,6 @@
char * whprintf_str( char const * fmt, ... );
#ifdef __cplusplus
} /* extern "C" */
#endif
-#endif /* WHPRINTF_H_INCLUDED_ */
+#endif /* WANDERINGHORSE_NET_WHPRINTF_H_INCLUDED */