summaryrefslogtreecommitdiff
path: root/contrib/tsearch2/ts_locale.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tsearch2/ts_locale.h')
-rw-r--r--contrib/tsearch2/ts_locale.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/contrib/tsearch2/ts_locale.h b/contrib/tsearch2/ts_locale.h
index 2c0c52b23f..e2e2248137 100644
--- a/contrib/tsearch2/ts_locale.h
+++ b/contrib/tsearch2/ts_locale.h
@@ -35,44 +35,44 @@
size_t wchar2char(char *to, const wchar_t *from, size_t len);
size_t char2wchar(wchar_t *to, const char *from, size_t len);
-#else /* WIN32 */
+#else /* WIN32 */
/* correct mbstowcs */
#define char2wchar mbstowcs
#define wchar2char wcstombs
#endif /* WIN32 */
-#define t_isdigit(x) ( pg_mblen(x)==1 && isdigit( TOUCHAR(x) ) )
-#define t_isspace(x) ( pg_mblen(x)==1 && isspace( TOUCHAR(x) ) )
-extern int _t_isalpha( const char *ptr );
-#define t_isalpha(x) ( (pg_mblen(x)==1) ? isalpha( TOUCHAR(x) ) : _t_isalpha(x) )
-extern int _t_isprint( const char *ptr );
-#define t_isprint(x) ( (pg_mblen(x)==1) ? isprint( TOUCHAR(x) ) : _t_isprint(x) )
+#define t_isdigit(x) ( pg_mblen(x)==1 && isdigit( TOUCHAR(x) ) )
+#define t_isspace(x) ( pg_mblen(x)==1 && isspace( TOUCHAR(x) ) )
+extern int _t_isalpha(const char *ptr);
+
+#define t_isalpha(x) ( (pg_mblen(x)==1) ? isalpha( TOUCHAR(x) ) : _t_isalpha(x) )
+extern int _t_isprint(const char *ptr);
+
+#define t_isprint(x) ( (pg_mblen(x)==1) ? isprint( TOUCHAR(x) ) : _t_isprint(x) )
/*
- * t_iseq() should be called only for ASCII symbols
+ * t_iseq() should be called only for ASCII symbols
*/
-#define t_iseq(x,c) ( (pg_mblen(x)==1) ? ( TOUCHAR(x) == ((unsigned char)(c)) ) : false )
+#define t_iseq(x,c) ( (pg_mblen(x)==1) ? ( TOUCHAR(x) == ((unsigned char)(c)) ) : false )
#define COPYCHAR(d,s) do { \
int lll = pg_mblen( s ); \
\
- while( lll-- ) \
+ while( lll-- ) \
TOUCHAR((d)+lll) = TOUCHAR((s)+lll); \
} while(0)
-
-#else /* not def TS_USE_WIDE */
-
-#define t_isdigit(x) isdigit( TOUCHAR(x) )
-#define t_isspace(x) isspace( TOUCHAR(x) )
-#define t_isalpha(x) isalpha( TOUCHAR(x) )
-#define t_isprint(x) isprint( TOUCHAR(x) )
-#define t_iseq(x,c) ( TOUCHAR(x) == ((unsigned char)(c)) )
+#else /* not def TS_USE_WIDE */
-#define COPYCHAR(d,s) TOUCHAR(d) = TOUCHAR(s)
+#define t_isdigit(x) isdigit( TOUCHAR(x) )
+#define t_isspace(x) isspace( TOUCHAR(x) )
+#define t_isalpha(x) isalpha( TOUCHAR(x) )
+#define t_isprint(x) isprint( TOUCHAR(x) )
+#define t_iseq(x,c) ( TOUCHAR(x) == ((unsigned char)(c)) )
+#define COPYCHAR(d,s) TOUCHAR(d) = TOUCHAR(s)
#endif
-char* lowerstr(char *str);
+char *lowerstr(char *str);
#endif /* __TSLOCALE_H__ */