diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-03-14 20:37:19 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-09 11:29:43 -0700 |
commit | 5afe1a53d8c662f26de048c8d954be323b96026b (patch) | |
tree | 0a45d68019e94160f2d402c34334a73c1bafcd5f /core/qthelper.h | |
parent | 36249f27802540e541bae132a7b644b4a8a2f148 (diff) | |
download | subsurface-5afe1a53d8c662f26de048c8d954be323b96026b.tar.gz |
Cleanup: Move *_loc formatting functions into new format.cpp file
qthelper.cpp is already quite voluminous. Move the recently
introduced localized versions of (v)snprintf() and put_format()
into their own translation unit.
Moreover, adopt C-style semantics for asprintf_loc(). This function
will be used to remove fixed-size buffers in core/plannernotes.c.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.h')
-rw-r--r-- | core/qthelper.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/core/qthelper.h b/core/qthelper.h index c699c5653..02fc629f8 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -6,13 +6,7 @@ #include "dive.h" #include "divelist.h" -// 1) Types and macros - -#ifdef __GNUC__ -#define __printf(x, y) __attribute__((__format__(__printf__, x, y))) -#else -#define __printf(x, y) -#endif +// 1) Types enum inertgas {N2, HE}; @@ -56,8 +50,6 @@ QString getUUID(); QStringList imageExtensionFilters(); char *intdup(int index); char *copy_qstring(const QString &); -__printf(1, 2) QString asprintf_loc(const char *cformat, ...); -__printf(1, 0) QString vasprintf_loc(const char *cformat, va_list ap); #endif // 3) Functions visible to C and C++ @@ -93,8 +85,6 @@ void cache_insert(int tissue, int timestep, enum inertgas gas, double value); void print_qt_versions(); void lock_planner(); void unlock_planner(); -__printf(3, 4) int snprintf_loc(char *dst, size_t size, const char *cformat, ...); -__printf(3, 0) int vsnprintf_loc(char *dst, size_t size, const char *cformat, va_list ap); #ifdef __cplusplus } |