diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-15 00:31:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-15 00:31:32 +1000 |
commit | 1105e38414fff26d6b1e278ee3bf19b9b981299c (patch) | |
tree | 0492188b192ddddc83595e55e18981dfb01a1fd5 /src/gfile/inc_printg.c | |
parent | a588740dc3005972892ba7d39d35d1228bc5f0aa (diff) | |
download | uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.gz uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.bz2 uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.zip |
Separate GFILE into separate source files to prevent future name and include file conflicts.
Diffstat (limited to 'src/gfile/inc_printg.c')
-rw-r--r-- | src/gfile/inc_printg.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/src/gfile/inc_printg.c b/src/gfile/inc_printg.c index 8d24b347..33db8bc8 100644 --- a/src/gfile/inc_printg.c +++ b/src/gfile/inc_printg.c @@ -5,14 +5,14 @@ * http://ugfx.org/license.html */ -/** - * This file is included by src/gfile/gfile.c - */ - /******************************************************** * Printg Routines ********************************************************/ +#include "gfx.h" + +#if GFX_USE_GFILE && GFILE_NEED_PRINTG + #include <stdarg.h> #define MAX_FILLER 11 @@ -220,42 +220,4 @@ int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) { return ret; } -#if GFILE_NEED_STRINGS - int snprintg(char *buf, int maxlen, const char *fmt, ...) { - int res; - GFILE f; - va_list ap; - - if (maxlen <= 1) { - if (maxlen == 1) { - *buf = 0; - return 0; - } - maxlen += 1; - } - - f.flags = GFILEFLG_WRITE|GFILEFLG_TRUNC; - gfileOpenStringFromStaticGFILE(&f, buf); - - va_start(ap, fmt); - res = vfnprintg(&f, maxlen-1, fmt, ap); - va_end(ap); - return res; - } - int vsnprintg(char *buf, int maxlen, const char *fmt, va_list arg) { - GFILE f; - - if (maxlen <= 1) { - if (maxlen == 1) { - *buf = 0; - return 0; - } - maxlen += 1; - } - - f.flags = GFILEFLG_WRITE|GFILEFLG_TRUNC; - gfileOpenStringFromStaticGFILE(&f, buf); - - return vfnprintg(&f, maxlen-1, fmt, arg); - } -#endif +#endif //GFX_USE_GFILE && GFILE_NEED_PRINTG |