]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Uchar -> uchar_t for consistency
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 949559442021428f8555b8ce672dbb38c9d02330..7913034fe91692bc1183201179a398d3267ad198 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -40,7 +40,7 @@
 #endif
 
 #define GMQCC_VERSION_MAJOR 0
-#define GMQCC_VERSION_MINOR 2
+#define GMQCC_VERSION_MINOR 3
 #define GMQCC_VERSION_PATCH 0
 #define GMQCC_VERSION_BUILD(J,N,P) (((J)<<16)|((N)<<8)|(P))
 #define GMQCC_VERSION \
  * just plain textual subsitution.
  */
 #ifdef _MSC_VER
-#      define snprintf(X, Y, Z, ...) _snprintf(X, Y, Z, __VA_ARGS__)
+#    define snprintf(X, Y, Z, ...) _snprintf(X, Y, Z, __VA_ARGS__)
     /* strtof doesn't exist -> strtod does though :) */
-#      define strtof(X, Y)          (float)(strtod(X, Y))
+#    define strtof(X, Y)          (float)(strtod(X, Y))
 #endif
 
 /*
@@ -663,6 +663,9 @@ enum {
     LVL_ERROR
 };
 
+FILE *con_default_out();
+FILE *con_default_err();
+
 void con_vprintmsg (int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap);
 void con_printmsg  (int level, const char *name, size_t line, const char *msgtype, const char *msg, ...);
 void con_cvprintmsg(void *ctx, int lvl, const char *msgtype, const char *msg, va_list ap);
@@ -926,6 +929,18 @@ typedef uint32_t longbit;
 #define LONGBIT(bit) (bit)
 #endif
 
+/*===================================================================*/
+/*=========================== utf8lib.c =============================*/
+/*===================================================================*/
+typedef uint32_t uchar_t;
+
+bool    u8_analyze (const char *_s, size_t *_start, size_t *_len, uchar_t *_ch, size_t _maxlen);
+size_t  u8_strlen  (const char*);
+size_t  u8_strnlen (const char*, size_t);
+uchar_t u8_getchar (const char*, const char**);
+uchar_t u8_getnchar(const char*, const char**, size_t);
+int     u8_fromchar(uchar_t w,   char *to,     size_t maxlen);
+
 /*===================================================================*/
 /*============================= opts.c ==============================*/
 /*===================================================================*/