diff sprintf/defs.h @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children a2d5d622e19e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sprintf/defs.h	Thu Jun 09 00:02:41 2016 +0000
@@ -0,0 +1,20 @@
+/*
+ * Embedded [v]sprintf() implementation by Michael Spacefalcon,
+ * loosely based on the 4.3BSD-Tahoe version.
+ *
+ * This header file contains some internal definitions used by
+ * different pieces of what used to be one giant _doprnt()
+ * function/module.
+ */
+
+#define	todigit(c)	((c) - '0')
+#define	tochar(n)	((n) + '0')
+
+#define	LONGINT		0x01		/* long integer */
+#define	LONGDBL		0x02		/* long double; unimplemented */
+#define	SHORTINT	0x04		/* short integer */
+#define	ALT		0x08		/* alternate form */
+#define	LADJUST		0x10		/* left adjustment */
+#define	ZEROPAD		0x20		/* zero (as opposed to blank) pad */
+#define	HEXPREFIX	0x40		/* add 0x or 0X prefix */
+#define	UPPERCASE	0x80		/* uppercase forms */