From 576b24c96ee4ac4ca7fb9fc116b6e8ce3704227d Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 18 Oct 2012 21:14:43 +0000 Subject: Move ui-independent object export routines to the common ui directory. Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export files. C++-ize epan/tap.h. Fix an apparent memory leak in eo_save_all_clicked_cb. The Qt dialog has an indeterminate progress bar. I tried adding something similar to the GTK+ dialog but event processing led down a rabbit hole. svn path=/trunk/; revision=45647 --- wsutil/str_util.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'wsutil/str_util.h') diff --git a/wsutil/str_util.h b/wsutil/str_util.h index c43e2e05de..302afd0096 100644 --- a/wsutil/str_util.h +++ b/wsutil/str_util.h @@ -25,6 +25,10 @@ #ifndef __STR_UTIL_H__ #define __STR_UTIL_H__ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /** Convert all upper-case ASCII letters to their ASCII lower-case * equivalents, in place, with a simple non-locale-dependent * ASCII mapping (A-Z -> a-z). @@ -84,6 +88,13 @@ typedef enum { /* XXX format_size_prefix_default_for_this_particular_os ? */ } format_size_flags_e; +#ifdef __cplusplus +/* Should we just have separate unit and prefix enums instead? */ +format_size_flags_e operator|(format_size_flags_e lhs, format_size_flags_e rhs) { + return (format_size_flags_e) ((int)lhs| (int)rhs); +} +#endif /* __cplusplus */ + /** Given a size, return its value in a human-readable format * * Prefixes up to "T/Ti" (tera, tebi) are currently supported. @@ -95,4 +106,9 @@ typedef enum { */ gchar *format_size(gint64 size, format_size_flags_e flags); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* __STR_UTIL_H__ */ -- cgit v1.2.3