openbsd-ports/comms/jpilot/patches/patch-utils_h
pvalchev 3cd9cb8661 o Fix dynamic loading - prefix an underscore in symbol names for our a.out
platforms in order for dlsym() to work, hence plugins can be loaded.
o Build Expense plugin.
o Build synctime plugin.
o Put in libtool patches.
2001-05-29 00:54:43 +00:00

23 lines
1.1 KiB
Plaintext

$OpenBSD: patch-utils_h,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $
--- utils.h.orig Mon Feb 5 14:24:29 2001
+++ utils.h Sun May 27 17:12:01 2001
@@ -304,3 +304,18 @@ void weekview_gui(struct tm *date_in);
void multibyte_safe_strncpy(char *dst, char *src, size_t max_len);
char *multibyte_safe_memccpy(char *dst, const char *src, int c, size_t len);
+
+/*************************************
+ * convert char code
+ *************************************/
+#define charset_j2p(buf, max_len, char_set) {\
+ if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(buf, max_len);\
+ if (char_set == CHAR_SET_1250) Lat2Win(buf,max_len);\
+ if (char_set == CHAR_SET_1251) koi8_to_win1251(buf, max_len);\
+ if (char_set == CHAR_SET_1251_B) win1251_to_koi8(buf, max_len);}
+#define charset_p2j(buf, max_len, char_set) {\
+ if (char_set == CHAR_SET_JAPANESE) Sjis2Euc(buf, max_len);\
+ if (char_set == CHAR_SET_1250) Win2Lat(buf,max_len);\
+ if (char_set == CHAR_SET_1251) win1251_to_koi8(buf, max_len);\
+ if (char_set == CHAR_SET_1251_B) koi8_to_win1251(buf, max_len);}
+