diff --git a/comms/jpilot/patches/patch-Expense_Makefile_in b/comms/jpilot/patches/patch-Expense_Makefile_in new file mode 100644 index 00000000000..12d620ca6d1 --- /dev/null +++ b/comms/jpilot/patches/patch-Expense_Makefile_in @@ -0,0 +1,28 @@ +$OpenBSD: patch-Expense_Makefile_in,v 1.1.1.1 2001/05/29 00:54:43 pvalchev Exp $ +--- Expense/Makefile.in.orig Thu Dec 7 15:44:26 2000 ++++ Expense/Makefile.in Sun May 27 18:37:21 2001 +@@ -1,5 +1,5 @@ + # Install variables +-prefix=@prefix@ ++prefix=${PREFIX} + + #Pilot flags (include dir), and Libraries + PILOT_FLAGS=@PILOT_FLAGS@ +@@ -52,13 +52,15 @@ distclean: clean + install: + ./install-sh -d -m 755 $(prefix)/lib/jpilot; \ + ./install-sh -d -m 755 $(prefix)/lib/jpilot/plugins; \ +- ../libtool --mode=install ./install-sh \ ++ ../libtool --mode=install ./install-sh -c \ + libexpense.la $(prefix)/lib/jpilot/plugins ++ ln $(prefix)/lib/jpilot/plugins/libexpense.so.1.1 \ ++ $(prefix)/lib/jpilot/plugins/libexpense.so + + local_install: + ./install-sh -d -m 755 $(HOME)/.jpilot; \ + ./install-sh -d -m 755 $(HOME)/.jpilot/plugins; \ +- ../libtool --mode=install ./install-sh \ ++ ../libtool --mode=install ./install-sh -c \ + libexpense.la $(HOME)/.jpilot/plugins + + uninstall: diff --git a/comms/jpilot/patches/patch-Expense_configure b/comms/jpilot/patches/patch-Expense_configure new file mode 100644 index 00000000000..17ae9407ee3 --- /dev/null +++ b/comms/jpilot/patches/patch-Expense_configure @@ -0,0 +1,112 @@ +$OpenBSD: patch-Expense_configure,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- Expense/configure.orig Sun May 27 17:22:06 2001 ++++ Expense/configure Sun May 27 17:22:20 2001 +@@ -782,8 +782,41 @@ fi + cflags=$CFLAGS + + ++pilot_prefix="" ++# Check whether --with-pilot_prefix or --without-pilot_prefix was given. ++if test "${with_pilot_prefix+set}" = set; then ++ withval="$with_pilot_prefix" ++ : ++fi ++ ++ ++if test "x$with_pilot_prefix" != "x"; then ++ pilot_prefix=$with_pilot_prefix ++fi ++ ++echo $ac_n "checking for pilot-link header files""... $ac_c" 1>&6 ++echo "configure:799: checking for pilot-link header files" >&5 ++pilotinclude=${FORCE_PILOT_INCLUDES:-no} ++if test $pilotinclude = no ; then ++for pilot_incl in $pilot_prefix/include /usr/include /usr/local/include \ ++ /usr/extra/pilot/include /usr/include/libpisock; do ++ if test -r "$pilot_incl/pi-config.h" ; then ++ pilotinclude=yes ++ PILOT_FLAGS="$PILOT_FLAGS -I$pilot_incl" ++ break ++ fi ++done ++fi ++ ++if test $pilotinclude = no ; then ++ echo "$ac_t""no" 1>&6 ++ { echo "configure: error: Could not find the pilot-link header files" 1>&2; exit 1; } ++else ++ echo "$ac_t""found at $pilot_incl" 1>&6 ++fi ++ + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +-echo "configure:787: checking for main in -lsocket" >&5 ++echo "configure:820: checking for main in -lsocket" >&5 + ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -791,14 +824,14 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -819,39 +852,6 @@ else + fi + + +-pilot_prefix="" +-# Check whether --with-pilot_prefix or --without-pilot_prefix was given. +-if test "${with_pilot_prefix+set}" = set; then +- withval="$with_pilot_prefix" +- : +-fi +- +- +-if test "x$with_pilot_prefix" != "x"; then +- pilot_prefix=$with_pilot_prefix +-fi +- +-echo $ac_n "checking for pilot-link header files""... $ac_c" 1>&6 +-echo "configure:836: checking for pilot-link header files" >&5 +-pilotinclude=${FORCE_PILOT_INCLUDES:-no} +-if test $pilotinclude = no ; then +-for pilot_incl in $pilot_prefix/include /usr/include /usr/local/include \ +- /usr/extra/pilot/include /usr/include/libpisock; do +- if test -r "$pilot_incl/pi-config.h" ; then +- pilotinclude=yes +- PILOT_FLAGS="$PILOT_FLAGS -I$pilot_incl" +- break +- fi +-done +-fi +- +-if test $pilotinclude = no ; then +- echo "$ac_t""no" 1>&6 +- { echo "configure: error: Could not find the pilot-link header files" 1>&2; exit 1; } +-else +- echo "$ac_t""found at $pilot_incl" 1>&6 +-fi +- + echo $ac_n "checking for pilot library files""... $ac_c" 1>&6 + echo "configure:857: checking for pilot library files" >&5 + pilotlibs=${FORCE_PILOT_LIBS:-no} +@@ -860,7 +860,7 @@ PILOT_LIBS="-lpisock" + if test $pilotlibs = no ; then + for pilot_libs in $pilot_prefix/lib /usr/lib /usr/local/lib/ \ + /usr/extra/pilot/lib ; do +- if test -r "$pilot_libs/libpisock.so" ; then ++ if test -r "$pilot_libs/libpisock.a" ; then + pilotlibs=yes + PILOT_LIBS="-L$pilot_libs $PILOT_LIBS" + break diff --git a/comms/jpilot/patches/patch-Expense_configure_in b/comms/jpilot/patches/patch-Expense_configure_in new file mode 100644 index 00000000000..ac10b3f0e45 --- /dev/null +++ b/comms/jpilot/patches/patch-Expense_configure_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-Expense_configure_in,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- Expense/configure.in.orig Sun May 27 17:22:02 2001 ++++ Expense/configure.in Sun May 27 17:22:19 2001 +@@ -65,7 +65,7 @@ PILOT_LIBS="-lpisock" + if test $pilotlibs = no ; then + for pilot_libs in $pilot_prefix/lib /usr/lib /usr/local/lib/ \ + /usr/extra/pilot/lib ; do +- if test -r "$pilot_libs/libpisock.so" ; then ++ if test -r "$pilot_libs/libpisock.a" ; then + pilotlibs=yes + PILOT_LIBS="-L$pilot_libs $PILOT_LIBS" + break diff --git a/comms/jpilot/patches/patch-SyncTime_Makefile_in b/comms/jpilot/patches/patch-SyncTime_Makefile_in new file mode 100644 index 00000000000..bac4e15cbc5 --- /dev/null +++ b/comms/jpilot/patches/patch-SyncTime_Makefile_in @@ -0,0 +1,28 @@ +$OpenBSD: patch-SyncTime_Makefile_in,v 1.1.1.1 2001/05/29 00:54:43 pvalchev Exp $ +--- SyncTime/Makefile.in.orig Thu Dec 7 15:44:26 2000 ++++ SyncTime/Makefile.in Sun May 27 18:37:28 2001 +@@ -1,5 +1,5 @@ + # Install variables +-prefix=@prefix@ ++prefix=${PREFIX} + + #Pilot flags (include dir), and Libraries + PILOT_FLAGS=@PILOT_FLAGS@ +@@ -52,13 +52,15 @@ distclean: clean + install: + ./install-sh -d -m 755 $(prefix)/lib/jpilot; \ + ./install-sh -d -m 755 $(prefix)/lib/jpilot/plugins; \ +- ../libtool --mode=install ./install-sh \ ++ ../libtool --mode=install ./install-sh -c \ + libsynctime.la $(prefix)/lib/jpilot/plugins ++ ln $(prefix)/lib/jpilot/plugins/libsynctime.so.1.1 \ ++ $(prefix)/lib/jpilot/plugins/libsynctime.so + + local_install: + ./install-sh -d -m 755 $(HOME)/.jpilot; \ + ./install-sh -d -m 755 $(HOME)/.jpilot/plugins; \ +- ../libtool --mode=install ./install-sh \ ++ ../libtool --mode=install ./install-sh -c \ + libsynctime.la $(HOME)/.jpilot/plugins + + uninstall: diff --git a/comms/jpilot/patches/patch-SyncTime_configure b/comms/jpilot/patches/patch-SyncTime_configure new file mode 100644 index 00000000000..943ef934ecf --- /dev/null +++ b/comms/jpilot/patches/patch-SyncTime_configure @@ -0,0 +1,123 @@ +$OpenBSD: patch-SyncTime_configure,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- SyncTime/configure.orig Sun May 27 17:20:39 2001 ++++ SyncTime/configure Sun May 27 17:20:58 2001 +@@ -782,8 +782,41 @@ fi + cflags=$CFLAGS + + ++pilot_prefix="" ++# Check whether --with-pilot_prefix or --without-pilot_prefix was given. ++if test "${with_pilot_prefix+set}" = set; then ++ withval="$with_pilot_prefix" ++ : ++fi ++ ++ ++if test "x$with_pilot_prefix" != "x"; then ++ pilot_prefix=$with_pilot_prefix ++fi ++ ++echo $ac_n "checking for pilot-link header files""... $ac_c" 1>&6 ++echo "configure:799: checking for pilot-link header files" >&5 ++pilotinclude=${FORCE_PILOT_INCLUDES:-no} ++if test $pilotinclude = no ; then ++for pilot_incl in $pilot_prefix/include /usr/include /usr/local/include \ ++ /usr/extra/pilot/include /usr/include/libpisock; do ++ if test -r "$pilot_incl/pi-config.h" ; then ++ pilotinclude=yes ++ PILOT_FLAGS="$PILOT_FLAGS -I$pilot_incl" ++ break ++ fi ++done ++fi ++ ++if test $pilotinclude = no ; then ++ echo "$ac_t""no" 1>&6 ++ { echo "configure: error: Could not find the pilot-link header files" 1>&2; exit 1; } ++else ++ echo "$ac_t""found at $pilot_incl" 1>&6 ++fi ++ + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +-echo "configure:787: checking for main in -lsocket" >&5 ++echo "configure:820: checking for main in -lsocket" >&5 + ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -791,14 +824,14 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -819,39 +852,6 @@ else + fi + + +-pilot_prefix="" +-# Check whether --with-pilot_prefix or --without-pilot_prefix was given. +-if test "${with_pilot_prefix+set}" = set; then +- withval="$with_pilot_prefix" +- : +-fi +- +- +-if test "x$with_pilot_prefix" != "x"; then +- pilot_prefix=$with_pilot_prefix +-fi +- +-echo $ac_n "checking for pilot-link header files""... $ac_c" 1>&6 +-echo "configure:836: checking for pilot-link header files" >&5 +-pilotinclude=${FORCE_PILOT_INCLUDES:-no} +-if test $pilotinclude = no ; then +-for pilot_incl in $pilot_prefix/include /usr/include /usr/local/include \ +- /usr/extra/pilot/include /usr/include/libpisock; do +- if test -r "$pilot_incl/pi-config.h" ; then +- pilotinclude=yes +- PILOT_FLAGS="$PILOT_FLAGS -I$pilot_incl" +- break +- fi +-done +-fi +- +-if test $pilotinclude = no ; then +- echo "$ac_t""no" 1>&6 +- { echo "configure: error: Could not find the pilot-link header files" 1>&2; exit 1; } +-else +- echo "$ac_t""found at $pilot_incl" 1>&6 +-fi +- + echo $ac_n "checking for pilot library files""... $ac_c" 1>&6 + echo "configure:857: checking for pilot library files" >&5 + pilotlibs=${FORCE_PILOT_LIBS:-no} +@@ -860,7 +860,7 @@ PILOT_LIBS="-lpisock" + if test $pilotlibs = no ; then + for pilot_libs in $pilot_prefix/lib /usr/lib /usr/local/lib/ \ + /usr/extra/pilot/lib ; do +- if test -r "$pilot_libs/libpisock.so" ; then ++ if test -r "$pilot_libs/libpisock.a" ; then + pilotlibs=yes + PILOT_LIBS="-L$pilot_libs $PILOT_LIBS" + break +@@ -934,8 +934,8 @@ echo "configure:927: checking to see if + cat > conftest.$ac_ext <entry[i]) charset_j2p(a->entry[i], strlen(a->entry[i])+1, char_set); ++ } ++ } + + rec_len = pack_Address(a, record, 65535); + if (!rec_len) { +@@ -274,36 +278,22 @@ int get_address_app_info(struct AddressA + return -1; + } + +- get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE || +- char_set==CHAR_SET_1250 || +- char_set==CHAR_SET_1251 || +- char_set==CHAR_SET_1251_B +- ) { ++ get_pref(PREF_CHAR_SET, &char_set, NULL); ++ if (char_set != CHAR_SET_ENGLISH) { + /* Convert to character set */ +- { + int i; + for (i = 0; i < 16; i++) + if (ai->category.name[i][0] != '\0') { +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(ai->category.name[i], 16); +- if (char_set==CHAR_SET_1250) Win2Lat(ai->category.name[i], 16); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(ai->category.name[i], 16); ++ charset_p2j(ai->category.name[i], 16, char_set); + } + for (i = 0; i < 19 + 3; i++) + if (ai->labels[i][0] != '\0') { +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(ai->labels[i], 16); +- if (char_set==CHAR_SET_1250) Win2Lat(ai->labels[i], 16); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(ai->labels[i], 16); +- if (char_set==CHAR_SET_1251_B) koi8_to_win1251(ai->labels[i], 16); ++ charset_p2j(ai->labels[i],16, char_set); + } + for (i = 0; i < 8; i++) + if (ai->phoneLabels[i][0] != '\0') { +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(ai->phoneLabels[i], 16); +- if (char_set==CHAR_SET_1250) Win2Lat(ai->phoneLabels[i], 16); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(ai->phoneLabels[i], 16); +- if (char_set==CHAR_SET_1251_B) koi8_to_win1251(ai->phoneLabels[i], 16); ++ charset_p2j(ai->phoneLabels[i],16, char_set); + } +- } + } + + return 0; +@@ -385,17 +375,11 @@ int get_addresses2(AddressList **address + } + + get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE || +- char_set==CHAR_SET_1250 || +- char_set==CHAR_SET_1251 || +- char_set==CHAR_SET_1251_B +- ) { +- int i; ++ if (char_set != CHAR_SET_ENGLISH) { + for (i = 0; i < 19; i++) { +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(a.entry[i], 65536); +- if (char_set==CHAR_SET_1250) Win2Lat(a.entry[i], 65536); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(a.entry[i], 65536); +- if (char_set==CHAR_SET_1251_B) koi8_to_win1251(a.entry[i], 65536); ++ if ((a.entry[i] != NULL) && (a.entry[i][0] != '\0')) { ++ charset_p2j(a.entry[i], strlen(a.entry[i])+1, char_set); ++ } + } + } + diff --git a/comms/jpilot/patches/patch-configure b/comms/jpilot/patches/patch-configure new file mode 100644 index 00000000000..ffeb503374f --- /dev/null +++ b/comms/jpilot/patches/patch-configure @@ -0,0 +1,712 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- configure.orig Tue Feb 6 12:31:18 2001 ++++ configure Sun May 27 17:15:18 2001 +@@ -3684,7 +3684,7 @@ PILOT_LIBS="-lpisock" + if test $pilotlibs = no ; then + for pilot_libs in $pilot_prefix/lib /usr/lib /usr/local/lib/ \ + /usr/extra/pilot/lib ; do +- if test -r "$pilot_libs/libpisock.so" ; then ++ if test -r $pilot_libs/libpisock.so* >/dev/null 2>&1 ; then + pilotlibs=yes + PILOT_LIBS="-L$pilot_libs $PILOT_LIBS" + break +@@ -3809,34 +3809,113 @@ fi + + + if test "x$enable_plugins" = "xyes"; then +- echo $ac_n "checking for dlopen""... $ac_c" 1>&6 +-echo "configure:3814: checking for dlopen" >&5 +- save_LIBS="$LIBS" +- LIBS="$LIBS -ldl" +- cat > conftest.$ac_ext <&6 ++echo "configure:3816: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext < ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func(); below. */ ++#include ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); ++ + int main() { +-dlopen("huh",0); ++ ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ + ; return 0; } + EOF +-if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* +- have_dlopen=yes ++ eval "ac_cv_func_$ac_func=yes" + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" + fi + rm -f conftest* +- LIBS="$save_LIBS" ++fi + ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.h <&6 ++fi ++done ++ ++ if test "x$ac_cv_func_dlopen" = "xyes"; then ++ have_dlopen=yes ++ else ++ for lib in dl; do ++ echo $ac_n "checking for dlopen in -l$lib""... $ac_c" 1>&6 ++echo "configure:3873: checking for dlopen in -l$lib" >&5 ++ac_lib_var=`echo $lib'_'dlopen | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-l$lib $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ LIBS="$LIBS -ldl"; ++ have_dlopen=yes; break ++else ++ echo "$ac_t""no" 1>&6 ++fi ++ ++ done ++ fi + if test "x$have_dlopen" = "xyes"; then + cat >> confdefs.h <<\EOF + #define ENABLE_PLUGINS 1 + EOF + +- echo "$ac_t""ok" 1>&6 + else + echo "$ac_t""Could not find dlopen - not using plugin support" 1>&6 + fi +@@ -3913,7 +3992,7 @@ fi + # Extract the first word of "gtk-config", so it can be a program name with args. + set dummy gtk-config; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:3917: checking for $ac_word" >&5 ++echo "configure:3996: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -3948,7 +4027,7 @@ fi + + min_gtk_version=1.2.0 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +-echo "configure:3952: checking for GTK - version >= $min_gtk_version" >&5 ++echo "configure:4031: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes +@@ -3971,7 +4050,7 @@ echo "configure:3952: checking for GTK - + echo $ac_n "cross compiling; assumed OK... $ac_c" + else + cat > conftest.$ac_ext < +@@ -4049,7 +4128,7 @@ main () + } + + EOF +-if { (eval echo configure:4053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -4083,7 +4162,7 @@ fi + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat > conftest.$ac_ext < +@@ -4093,7 +4172,7 @@ int main() { + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); + ; return 0; } + EOF +-if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" +@@ -4133,12 +4212,12 @@ rm -f conftest* + + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:4137: checking for ANSI C header files" >&5 ++echo "configure:4216: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -4146,7 +4225,7 @@ else + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -4163,7 +4242,7 @@ rm -f conftest* + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -4181,7 +4260,7 @@ fi + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -4202,7 +4281,7 @@ if test "$cross_compiling" = yes; then + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -4213,7 +4292,7 @@ if (XOR (islower (i), ISLOWER (i)) || to + exit (0); } + + EOF +-if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -4237,12 +4316,12 @@ EOF + fi + + echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +-echo "configure:4241: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++echo "configure:4320: checking for sys/wait.h that is POSIX.1 compatible" >&5 + if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -4258,7 +4337,7 @@ wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; return 0; } + EOF +-if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes + else +@@ -4282,17 +4361,17 @@ for ac_hdr in fcntl.h sys/file.h sys/tim + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:4286: checking for $ac_hdr" >&5 ++echo "configure:4365: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:4296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -4320,12 +4399,12 @@ done + + + echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +-echo "configure:4324: checking for pid_t" >&5 ++echo "configure:4403: checking for pid_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -4353,12 +4432,12 @@ EOF + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:4357: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:4436: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -4367,7 +4446,7 @@ int main() { + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -4388,12 +4467,12 @@ EOF + fi + + echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +-echo "configure:4392: checking whether struct tm is in sys/time.h or time.h" >&5 ++echo "configure:4471: checking whether struct tm is in sys/time.h or time.h" >&5 + if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -4401,7 +4480,7 @@ int main() { + struct tm *tp; tp->tm_sec; + ; return 0; } + EOF +-if { (eval echo configure:4405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h + else +@@ -4423,12 +4502,12 @@ fi + + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:4427: checking return type of signal handlers" >&5 ++echo "configure:4506: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -4445,7 +4524,7 @@ int main() { + int i; + ; return 0; } + EOF +-if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:4528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -4464,12 +4543,12 @@ EOF + + + echo $ac_n "checking for strftime""... $ac_c" 1>&6 +-echo "configure:4468: checking for strftime" >&5 ++echo "configure:4547: checking for strftime" >&5 + if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_strftime=yes" + else +@@ -4514,7 +4593,7 @@ else + echo "$ac_t""no" 1>&6 + # strftime is in -lintl on SCO UNIX. + echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 +-echo "configure:4518: checking for strftime in -lintl" >&5 ++echo "configure:4597: checking for strftime in -lintl" >&5 + ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -4522,7 +4601,7 @@ else + ac_save_LIBS="$LIBS" + LIBS="-lintl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -4560,7 +4639,7 @@ fi + fi + + echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +-echo "configure:4564: checking whether utime accepts a null argument" >&5 ++echo "configure:4643: checking whether utime accepts a null argument" >&5 + if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -4570,7 +4649,7 @@ if test "$cross_compiling" = yes; then + ac_cv_func_utime_null=no + else + cat > conftest.$ac_ext < + #include +@@ -4581,7 +4660,7 @@ exit(!(stat ("conftestdata", &s) == 0 && + && t.st_mtime - s.st_mtime < 120)); + } + EOF +-if { (eval echo configure:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:4664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_utime_null=yes + else +@@ -4609,12 +4688,12 @@ for ac_func in memmove strchr memcpy str + getcwd strerror + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4613: checking for $ac_func" >&5 ++echo "configure:4692: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -4664,12 +4743,12 @@ done + for ac_func in setenv + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:4668: checking for $ac_func" >&5 ++echo "configure:4747: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -5183,5 +5262,201 @@ EOF + chmod +x $CONFIG_STATUS + rm -fr confdefs* $ac_clean_files + test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 ++ ++ ++if test "$no_recursion" != yes; then ++ ++ # Remove --cache-file and --srcdir arguments so they do not pile up. ++ ac_sub_configure_args= ++ ac_prev= ++ for ac_arg in $ac_configure_args; do ++ if test -n "$ac_prev"; then ++ ac_prev= ++ continue ++ fi ++ case "$ac_arg" in ++ -cache-file | --cache-file | --cache-fil | --cache-fi \ ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ++ ac_prev=cache_file ;; ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ++ ;; ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ++ ac_prev=srcdir ;; ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ++ ;; ++ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; ++ esac ++ done ++ ++ for ac_config_dir in SyncTime; do ++ ++ # Do not complain, so a configure script can configure whichever ++ # parts of a large source tree are present. ++ if test ! -d $srcdir/$ac_config_dir; then ++ continue ++ fi ++ ++ echo configuring in $ac_config_dir ++ ++ case "$srcdir" in ++ .) ;; ++ *) ++ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; ++ else ++ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } ++ fi ++ ;; ++ esac ++ ++ ac_popdir=`pwd` ++ cd $ac_config_dir ++ ++ # A "../" for each directory in /$ac_config_dir. ++ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` ++ ++ case "$srcdir" in ++ .) # No --srcdir option. We are building in place. ++ ac_sub_srcdir=$srcdir ;; ++ /*) # Absolute path. ++ ac_sub_srcdir=$srcdir/$ac_config_dir ;; ++ *) # Relative path. ++ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; ++ esac ++ ++ # Check for guested configure; otherwise get Cygnus style configure. ++ if test -f $ac_sub_srcdir/configure; then ++ ac_sub_configure=$ac_sub_srcdir/configure ++ elif test -f $ac_sub_srcdir/configure.in; then ++ ac_sub_configure=$ac_configure ++ else ++ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 ++ ac_sub_configure= ++ fi ++ ++ # The recursion is here. ++ if test -n "$ac_sub_configure"; then ++ ++ # Make the cache file name correct relative to the subdirectory. ++ case "$cache_file" in ++ /*) ac_sub_cache_file=$cache_file ;; ++ *) # Relative path. ++ ac_sub_cache_file="$ac_dots$cache_file" ;; ++ esac ++ case "$ac_given_INSTALL" in ++ [/$]*) INSTALL="$ac_given_INSTALL" ;; ++ *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ++ esac ++ ++ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" ++ # The eval makes quoting arguments work. ++ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ++ then : ++ else ++ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } ++ fi ++ fi ++ ++ cd $ac_popdir ++ done ++fi ++ ++ ++if test "$no_recursion" != yes; then ++ ++ # Remove --cache-file and --srcdir arguments so they do not pile up. ++ ac_sub_configure_args= ++ ac_prev= ++ for ac_arg in $ac_configure_args; do ++ if test -n "$ac_prev"; then ++ ac_prev= ++ continue ++ fi ++ case "$ac_arg" in ++ -cache-file | --cache-file | --cache-fil | --cache-fi \ ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ++ ac_prev=cache_file ;; ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ++ ;; ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ++ ac_prev=srcdir ;; ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ++ ;; ++ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; ++ esac ++ done ++ ++ for ac_config_dir in Expense; do ++ ++ # Do not complain, so a configure script can configure whichever ++ # parts of a large source tree are present. ++ if test ! -d $srcdir/$ac_config_dir; then ++ continue ++ fi ++ ++ echo configuring in $ac_config_dir ++ ++ case "$srcdir" in ++ .) ;; ++ *) ++ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; ++ else ++ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } ++ fi ++ ;; ++ esac ++ ++ ac_popdir=`pwd` ++ cd $ac_config_dir ++ ++ # A "../" for each directory in /$ac_config_dir. ++ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` ++ ++ case "$srcdir" in ++ .) # No --srcdir option. We are building in place. ++ ac_sub_srcdir=$srcdir ;; ++ /*) # Absolute path. ++ ac_sub_srcdir=$srcdir/$ac_config_dir ;; ++ *) # Relative path. ++ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; ++ esac ++ ++ # Check for guested configure; otherwise get Cygnus style configure. ++ if test -f $ac_sub_srcdir/configure; then ++ ac_sub_configure=$ac_sub_srcdir/configure ++ elif test -f $ac_sub_srcdir/configure.in; then ++ ac_sub_configure=$ac_configure ++ else ++ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 ++ ac_sub_configure= ++ fi ++ ++ # The recursion is here. ++ if test -n "$ac_sub_configure"; then ++ ++ # Make the cache file name correct relative to the subdirectory. ++ case "$cache_file" in ++ /*) ac_sub_cache_file=$cache_file ;; ++ *) # Relative path. ++ ac_sub_cache_file="$ac_dots$cache_file" ;; ++ esac ++ case "$ac_given_INSTALL" in ++ [/$]*) INSTALL="$ac_given_INSTALL" ;; ++ *) INSTALL="$ac_dots$ac_given_INSTALL" ;; ++ esac ++ ++ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" ++ # The eval makes quoting arguments work. ++ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ++ then : ++ else ++ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } ++ fi ++ fi ++ ++ cd $ac_popdir ++ done ++fi + + diff --git a/comms/jpilot/patches/patch-datebook_c b/comms/jpilot/patches/patch-datebook_c new file mode 100644 index 00000000000..51f098d4fbb --- /dev/null +++ b/comms/jpilot/patches/patch-datebook_c @@ -0,0 +1,119 @@ +$OpenBSD: patch-datebook_c,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- datebook.c.orig Mon Feb 5 14:30:10 2001 ++++ datebook.c Sun May 27 17:12:01 2001 +@@ -36,10 +36,6 @@ + #include "libplugin.h" + #include "password.h" + +-#include "japanese.h" +-#include "cp1250.h" +-#include "russian.h" +- + #ifndef FALSE + #define FALSE 0 + #endif +@@ -204,6 +200,13 @@ int pc_datebook_write(struct Appointment + char record[65536]; + int rec_len; + buf_rec br; ++ long char_set; ++ ++ get_pref(PREF_CHAR_SET, &char_set, NULL); ++ if (char_set != CHAR_SET_ENGLISH) { ++ if (a->description) charset_j2p(a->description, strlen(a->description)+1, char_set); ++ if (a->note) charset_j2p(a->note, strlen(a->note)+1, char_set); ++ } + + rec_len = pack_Appointment(a, record, 65535); + if (!rec_len) { +@@ -211,7 +214,7 @@ int pc_datebook_write(struct Appointment + jpilot_logf(LOG_WARN, "pack_Appointment %s\n", _("error")); + return -1; + } +- br.rt=rt; ++ br.rt=rt; + br.attrib = attrib; + br.buf = record; + br.size = rec_len; +@@ -534,9 +537,10 @@ unsigned int isApptOnDate(struct Appoint + + int get_datebook_app_info(struct AppointmentAppInfo *ai) + { +- int num; ++ int num,i; + unsigned int rec_size; + unsigned char *buf; ++ long char_set; + + bzero(ai, sizeof(*ai)); + +@@ -549,6 +553,12 @@ int get_datebook_app_info(struct Appoint + jpilot_logf(LOG_WARN, _("Error reading"), "DatebookDB.pdb"); + return -1; + } ++ get_pref(PREF_CHAR_SET, &char_set, NULL); ++ if (char_set != CHAR_SET_ENGLISH) { ++ for (i = 0; i < 16; i++) { ++ if (ai->category.name[i][0] != '\0') charset_p2j(ai->category.name[i], 16, char_set); ++ } ++ } + + return 0; + } +@@ -687,14 +697,14 @@ int get_days_appointments2(AppointmentLi + AppointmentList *temp_a_list; + long keep_modified, keep_deleted; + int keep_priv; +- long char_set; + buf_rec *br; + #ifdef USE_DB3 + long use_db3_tags; + time_t ltime; + struct tm *today; + #endif +- ++ long char_set; ++ + #ifdef USE_DB3 + time(<ime); + today = localtime(<ime); +@@ -762,22 +772,8 @@ int get_days_appointments2(AppointmentLi + } + + get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE) { +- Sjis2Euc(a.description, 65536); +- Sjis2Euc(a.note, 65536); +- } +- if (char_set==CHAR_SET_1250) { +- Win2Lat(a.description, 65536); +- Win2Lat(a.note, 65536); +- } +- if (char_set==CHAR_SET_1251) { +- win1251_to_koi8(a.description, 65536); +- win1251_to_koi8(a.note, 65536); +- } +- if (char_set==CHAR_SET_1251_B) { +- koi8_to_win1251(a.description, 65536); +- koi8_to_win1251(a.note, 65536); +- } ++ if (a.description) charset_p2j(a.description, strlen(a.description)+1, char_set); ++ if (a.note) charset_p2j(a.note, strlen(a.note)+1, char_set); + + temp_a_list = malloc(sizeof(AppointmentList)); + if (!temp_a_list) { +@@ -792,6 +788,8 @@ int get_days_appointments2(AppointmentLi + temp_a_list->next = *appointment_list; + *appointment_list = temp_a_list; + recs_returned++; ++ ++ + } + + jp_free_DB_records(&records); +@@ -802,3 +800,5 @@ int get_days_appointments2(AppointmentLi + + return recs_returned; + } ++ ++ diff --git a/comms/jpilot/patches/patch-datebook_gui_c b/comms/jpilot/patches/patch-datebook_gui_c new file mode 100644 index 00000000000..cf4861e6113 --- /dev/null +++ b/comms/jpilot/patches/patch-datebook_gui_c @@ -0,0 +1,46 @@ +$OpenBSD: patch-datebook_gui_c,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- datebook_gui.c.orig Mon Feb 5 14:30:04 2001 ++++ datebook_gui.c Sun May 27 17:12:01 2001 +@@ -223,7 +223,6 @@ static void cb_toggle(GtkWidget *widget, + + void cb_date_cats(GtkWidget *widget, gpointer data) + { +- unsigned char *buf; + int size; + struct AppointmentAppInfo ai; + int i; +@@ -240,13 +239,7 @@ void cb_date_cats(GtkWidget *widget, gpo + return; + } + +- get_app_info("DatebookDB", &buf, &size); +- jpilot_logf(LOG_DEBUG, "Got datebook app info, size = %d", size); +- if (size<1) { +- return; +- } +- unpack_AppointmentAppInfo(&ai, buf, size); +- free(buf); ++ get_datebook_app_info(&ai); + + window_date_cats = gtk_window_new(GTK_WINDOW_TOPLEVEL); + +@@ -267,10 +260,8 @@ void cb_date_cats(GtkWidget *widget, gpo + gtk_table_set_col_spacings(GTK_TABLE(table),0); + gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); + +- get_pref(PREF_CHAR_SET, &char_set, NULL); + for (i=0, bit=1; i<16; i++, bit <<= 1) { + if (ai.category.name[i][0]) { +- if (char_set == CHAR_SET_JAPANESE) Sjis2Euc(ai.category.name[i], 65536); + toggle_button[i]=gtk_toggle_button_new_with_label + (ai.category.name[i]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_button[i]), +@@ -944,7 +935,7 @@ static int get_details(struct Appointmen + if (a->note) { + jpilot_logf(LOG_DEBUG, "text2=[%s]\n",a->note); + } +- ++ + /* We won't allow a repeat frequency of less than 1 */ + if ((page != PAGE_NONE) && (a->repeatFrequency < 1)) { + jpilot_logf(LOG_WARN, diff --git a/comms/jpilot/patches/patch-japanese_c b/comms/jpilot/patches/patch-japanese_c new file mode 100644 index 00000000000..b814542c280 --- /dev/null +++ b/comms/jpilot/patches/patch-japanese_c @@ -0,0 +1,154 @@ +$OpenBSD: patch-japanese_c,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- japanese.c.orig Wed Jan 31 09:51:33 2001 ++++ japanese.c Sun May 27 17:12:01 2001 +@@ -10,7 +10,7 @@ + + #include + #include +- ++ + /* In utils.c, also a prototype in utils.h */ + void multibyte_safe_strncpy(char *dst, char *src, size_t max_len); + +@@ -23,7 +23,14 @@ void multibyte_safe_strncpy(char *dst, c + #define isEuc(c) \ + (0xa0 < ((unsigned char) (c)) && ((unsigned char) (c)) < 0xff) + ++/* convert SJIS char to EUC char ++ ++ this does not support Machine dependent codes. ++ args: hi: first byte of sjis char. ++ lo: second byte of sjis char. ++ return: euc char in 16bit value. + ++ */ + static unsigned int SjisToEuc(unsigned char hi, unsigned char lo) + { + if (lo >= 0x9f) +@@ -33,7 +40,11 @@ static unsigned int SjisToEuc(unsigned c + (lo + (lo >= 0x7f ? 0x60 : 0x61)); + } + +- ++/* ++ args: source char pointer, destination source pointer, a length of srting ++ Length include null termination. ++ return the pointer of nul termination code. ++ */ + unsigned char *Sjis2EucCpy(unsigned char *dest, unsigned char *src, int max_len) + { + unsigned char *p, *q; +@@ -43,8 +54,8 @@ unsigned char *Sjis2EucCpy(unsigned char + + p = src; + q = dest; +- while ((*p) && (n < max_len-1)) { +- if (isSjis1stByte(*p)) { ++ while ((*p) && (n < max_len-2)) { ++ if (isSjis1stByte(*p)) { + hi = *p++; + lo = *p++; + w = SjisToEuc(hi, lo); +@@ -58,27 +69,48 @@ unsigned char *Sjis2EucCpy(unsigned char + } else if ((*p) & 0x80) { /* irregular japanese char */ + p++; /* ??abort and return NULL?? */ + /* discard it */ +- } else { ++ } else { + *q++ = *p++; + n++; + } + } +- *q = '\0'; +- return dest; ++ if ((*p) && !(*p & 0x80) && (n < max_len-1)) { ++ *q++ = *p++; ++ *q = '\0'; ++ } else { ++ *q = '\0'; ++ } ++ return q; + } + ++/* ++ convert strings from Sjis to EUC. ++ max_len includes null termiantion. ++ size of buf must be more than max_len. ++ ++*/ ++ + void Sjis2Euc(unsigned char *buf, int max_len) + { + unsigned char *dst; + + if (buf == NULL) return; +- if ((dst = (unsigned char *)malloc(max_len*2)) != NULL) { +- if (Sjis2EucCpy(dst, buf, max_len*2) != NULL) ++ if ((dst = (unsigned char *)malloc(max_len)) != NULL) { ++ /* assign buffer for destination. */ ++ if (Sjis2EucCpy(dst, buf, max_len) != NULL) { + multibyte_safe_strncpy(buf, dst, max_len); ++ buf[max_len-1] = '\0'; /* i am a paranoire B-) */ ++ } + free(dst); +- } ++ } + } + ++/* ++ Convert one char from euc to sjis. ++ args: hi: first byte of euc code. ++ lo: second byte of euc code. ++ return: 16bit value of sjis char code. ++ */ + static unsigned int EucToSjis(unsigned char hi, unsigned char lo) + { + if (hi & 1) +@@ -88,6 +120,11 @@ static unsigned int EucToSjis(unsigned c + return ((hi / 2 + (hi < 0xdf ? 0x30 : 0x70)) << 8) | (lo - 2); + } + ++/* ++ Convert string from euc to sjis with coping to another buffer. ++ Theoritically, strlen(EUC) >= strlen(SJIS), ++ then it is ok that dest == src. ++ */ + unsigned char *Euc2SjisCpy(unsigned char *dest, unsigned char *src, int max_len) + { + unsigned char *p, *q; +@@ -97,7 +134,7 @@ unsigned char *Euc2SjisCpy(unsigned char + + p = src; + q = dest; +- while ((*p) && (n < max_len-1)) { ++ while ((*p) && (n < max_len-2)) { + if (isEucKana(*p)) { /* euc kana(2byte) -> sjis(1byte) */ + p++; + *q++ = *p++; +@@ -114,12 +151,24 @@ unsigned char *Euc2SjisCpy(unsigned char + n++; + } + } +- *q = '\0'; ++ if ((*p) && !(*p & 0x80) && n < max_len-1) { ++ *q++ = *p++; ++ *q = '\0'; ++ } else { ++ *q = '\0'; ++ } + return dest; + } ++/* ++ convert euc to sjis. ++ size of buf must be more than man_len. ++ it simply call Euc2SjisCpy(). ++ this function exists for symmetry. ++ */ + + void Euc2Sjis(unsigned char *buf, int max_len) + { + if (buf == NULL) return; +- Euc2SjisCpy(buf, buf, max_len); ++ if (max_len <= 0) return; ++ (void *)Euc2SjisCpy(buf, buf, max_len); + } diff --git a/comms/jpilot/patches/patch-ltconfig b/comms/jpilot/patches/patch-ltconfig new file mode 100644 index 00000000000..dda9e275a8f --- /dev/null +++ b/comms/jpilot/patches/patch-ltconfig @@ -0,0 +1,52 @@ +$OpenBSD: patch-ltconfig,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- ltconfig.orig Sat Jul 17 23:11:50 1999 ++++ ltconfig Sun May 27 17:28:52 2001 +@@ -1061,6 +1061,9 @@ cygwin* | mingw*) + with_gnu_ld=no + fi + ;; ++openbsd*) ++ with_gnu_ld=no ++ ;; + + esac + +@@ -1317,10 +1320,21 @@ else + ;; + + openbsd*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' +- hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac + ;; + + os2*) +@@ -1857,13 +1871,10 @@ netbsd*) + + openbsd*) + version_type=sunos +- if test "$with_gnu_ld" = yes; then +- need_lib_prefix=no +- need_version=no +- fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH ++ deplibs_check_method='pass_all' + ;; + + os2*) diff --git a/comms/jpilot/patches/patch-ltmain_sh b/comms/jpilot/patches/patch-ltmain_sh new file mode 100644 index 00000000000..fb4cc494214 --- /dev/null +++ b/comms/jpilot/patches/patch-ltmain_sh @@ -0,0 +1,84 @@ +$OpenBSD: patch-ltmain_sh,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- ltmain.sh.orig Sat Jul 17 23:11:50 1999 ++++ ltmain.sh Sun May 27 17:28:52 2001 +@@ -1054,7 +1054,18 @@ compiler." + # These systems don't actually have c library (as such) + continue + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ continue ++ ;; + esac ++ elif test "$arg" = "-lc_r"; then ++ case "$host" in ++ *-*-openbsd*) ++ # Do not include libc_r directly, use -pthread flag. ++ continue ++ ;; ++ esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-beos*) +@@ -1066,6 +1077,10 @@ compiler." + deplibs="$deplibs $arg" + ;; + ++ -?thread) ++ deplibs="$deplibs $arg" ++ ;; ++ + -module) + module=yes + continue +@@ -1763,6 +1778,9 @@ compiler." + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; ++ *-*-openbsd*) ++ # do not include libc due to us having libc/libc_r. ++ ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" +@@ -3437,40 +3455,6 @@ libdir='$install_libdir'\ + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" + exit 0 + ;; + diff --git a/comms/jpilot/patches/patch-memo_c b/comms/jpilot/patches/patch-memo_c new file mode 100644 index 00000000000..f5fe5e1e5e2 --- /dev/null +++ b/comms/jpilot/patches/patch-memo_c @@ -0,0 +1,85 @@ +$OpenBSD: patch-memo_c,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- memo.c.orig Wed Jan 31 09:18:15 2001 ++++ memo.c Sun May 27 17:12:01 2001 +@@ -32,10 +32,6 @@ + #include "libplugin.h" + #include "password.h" + +-#include "japanese.h" +-#include "cp1250.h" +-#include "russian.h" +- + #define MEMO_EOF 7 + + int memo_compare(const void *v1, const void *v2) +@@ -133,6 +129,12 @@ int pc_memo_write(struct Memo *memo, PCR + char record[65536]; + int rec_len; + buf_rec br; ++ long char_set; ++ ++ get_pref(PREF_CHAR_SET, &char_set, NULL); ++ if (char_set != CHAR_SET_ENGLISH) { ++ if (memo->text) charset_j2p(memo->text, strlen(memo->text)+1, char_set); ++ } + + rec_len = pack_Memo(memo, record, 65535); + if (!rec_len) { +@@ -165,7 +167,7 @@ void free_MemoList(MemoList **memo) + + int get_memo_app_info(struct MemoAppInfo *ai) + { +- int num; ++ int num,i; + unsigned int rec_size; + unsigned char *buf; + long char_set; +@@ -183,18 +185,12 @@ int get_memo_app_info(struct MemoAppInfo + } + + get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE || +- char_set==CHAR_SET_1250 || +- char_set==CHAR_SET_1251 || +- char_set==CHAR_SET_1251_B) { +- int i; +- for (i = 0; i < 16; i++) +- if (ai->category.name[i][0] != '\0') { +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(ai->category.name[i], 16); +- if (char_set==CHAR_SET_1250) Win2Lat(ai->category.name[i], 16); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(ai->category.name[i], 16); +- if (char_set==CHAR_SET_1251_B) koi8_to_win1251(ai->category.name[i], 16); +- } ++ if (char_set != CHAR_SET_ENGLISH) { ++ for (i = 0; i < 16; i++) { ++ if (ai->category.name[i][0] != '\0') { ++ charset_p2j(ai->category.name[i], 16, char_set); ++ } ++ } + } + + return 0; +@@ -218,8 +214,8 @@ int get_memos2(MemoList **memo_list, int + MemoList *temp_memo_list; + long keep_modified, keep_deleted; + int keep_priv; +- long char_set; + buf_rec *br; ++ long char_set; + + jpilot_logf(LOG_DEBUG, "get_memos2()\n"); + if (modified==2) { +@@ -274,12 +270,8 @@ int get_memos2(MemoList **memo_list, int + if ( ((br->attrib & 0x0F) != category) && category != CATEGORY_ALL) { + continue; + } +- + get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE) Sjis2Euc(memo.text, 65536); +- if (char_set==CHAR_SET_1250) Win2Lat(memo.text, 65536); +- if (char_set==CHAR_SET_1251) win1251_to_koi8(memo.text, 65536); +- if (char_set==CHAR_SET_1251_B) koi8_to_win1251(memo.text, 65536); ++ if (memo.text) charset_p2j(memo.text, strlen(memo.text)+1, char_set); + + temp_memo_list = malloc(sizeof(MemoList)); + if (!temp_memo_list) { diff --git a/comms/jpilot/patches/patch-po_Makefile_in_in b/comms/jpilot/patches/patch-po_Makefile_in_in new file mode 100644 index 00000000000..d6416fa771e --- /dev/null +++ b/comms/jpilot/patches/patch-po_Makefile_in_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-po_Makefile_in_in,v 1.1.1.1 2001/05/29 00:54:44 pvalchev Exp $ +--- po/Makefile.in.in.orig Sun May 27 17:16:08 2001 ++++ po/Makefile.in.in Sun May 27 17:16:19 2001 +@@ -16,7 +16,7 @@ srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ + +-prefix = @prefix@ ++prefix = ${PREFIX} + exec_prefix = @exec_prefix@ + datadir = $(prefix)/@DATADIRNAME@ + localedir = $(datadir)/locale diff --git a/comms/jpilot/patches/patch-sync_c b/comms/jpilot/patches/patch-sync_c new file mode 100644 index 00000000000..6d53693cb53 --- /dev/null +++ b/comms/jpilot/patches/patch-sync_c @@ -0,0 +1,128 @@ +$OpenBSD: patch-sync_c,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- sync.c.orig Mon Feb 5 14:33:14 2001 ++++ sync.c Sun May 27 17:12:01 2001 +@@ -104,10 +104,6 @@ int pdb_file_read_record_by_id(char *DB_ + + int pdb_file_delete_record_by_id(char *DB_name, pi_uid_t uid_in); + +- +-void recode_packed_record(char *DB_name, void *record, int rec_len, long char_seet); +- +- + void sig_handler(int sig) + { + jpilot_logf(LOG_DEBUG, "caught signal SIGCHLD\n"); +@@ -631,10 +627,8 @@ int jpilot_sync(struct my_sync_info *syn + return 0; + } + get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(buf, 1023); +- if (char_set == CHAR_SET_1250) Lat2Win(buf, 1023); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(buf, 1023); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(buf, 1023); ++ charset_j2p(buf,1023,char_set); ++ + dlp_AddSyncLogEntry(sd, buf); + dlp_AddSyncLogEntry(sd, "\n\r"); + +@@ -760,15 +754,6 @@ int slow_sync_application(char *DB_name, + } + } + +- get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE || +- char_set==CHAR_SET_1250 || +- char_set==CHAR_SET_1251 || +- char_set==CHAR_SET_1251_B +- ) { +- recode_packed_record(DB_name, record, rec_len, char_set); +- } +- + ret = dlp_WriteRecord(sd, db, header.attrib & dlpRecAttrSecret, + 0, header.attrib & 0x0F, + record, rec_len, &new_id); +@@ -1479,61 +1464,6 @@ static int sync_rotate_backups(const int + return 0; + } + +-void recode_packed_record(char *DB_name, void *record, int rec_len, long char_set) +-{ +- /*todo move this to before the record is written out?*/ +- /* Convert to SJIS Japanese Kanji code (Palm use this code) */ +- /* or convert to different encoding */ +- /*Write the record to the Palm Pilot */ +- if (!strcmp(DB_name, "DatebookDB")) { +- struct Appointment a; +- unpack_Appointment(&a, record, rec_len); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(a.description, 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(a.description, 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(a.description, 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(a.description, 65536); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(a.note, 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(a.note, 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(a.note, 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(a.note, 65536); +- rec_len = pack_Appointment(&a, record, 65535); +- } +- if (!strcmp(DB_name, "AddressDB")) { +- struct Address a; +- int i; +- unpack_Address(&a, record, rec_len); +- for (i = 0; i < 19; i++) { +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(a.entry[i], 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(a.entry[i], 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(a.entry[i], 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(a.entry[i], 65536); +- } +- rec_len = pack_Address(&a, record, 65535); +- } +- if (!strcmp(DB_name, "ToDoDB")) { +- struct ToDo t; +- unpack_ToDo(&t, record, rec_len); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(t.description, 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(t.description, 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(t.description, 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(t.description, 65536); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(t.note, 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(t.note, 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(t.note, 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(t.note, 65536); +- rec_len = pack_ToDo(&t, record, 65535); +- } +- if (!strcmp(DB_name, "MemoDB")) { +- struct Memo m; +- unpack_Memo(&m, record, rec_len); +- if (char_set == CHAR_SET_JAPANESE) Euc2Sjis(m.text, 65536); +- if (char_set == CHAR_SET_1250) Lat2Win(m.text, 65536); +- if (char_set == CHAR_SET_1251) koi8_to_win1251(m.text, 65536); +- if (char_set == CHAR_SET_1251_B) win1251_to_koi8(m.text, 65536); +- rec_len = pack_Memo(&m, record, 65535); +- } +-} +- + int fast_sync_local_recs(char *DB_name, int sd, int db) + { + unsigned long new_id; +@@ -1551,7 +1481,6 @@ int fast_sync_local_recs(char *DB_name, + char error_log_message_d[256]; + char delete_log_message[256]; + int index, size, attr, category; +- long char_set; + + jpilot_logf(LOG_DEBUG, "fast_sync_local_recs\n"); + +@@ -1609,14 +1538,6 @@ int fast_sync_local_recs(char *DB_name, + if (ferror(pc_in)) { + break; + } +- } +- get_pref(PREF_CHAR_SET, &char_set, NULL); +- if (char_set==CHAR_SET_JAPANESE || +- char_set==CHAR_SET_1250 || +- char_set==CHAR_SET_1251 || +- char_set==CHAR_SET_1251_B +- ) { +- recode_packed_record(DB_name, record, rec_len, char_set); + } + + jpilot_logf(LOG_DEBUG, "Writing PC record to palm\n"); diff --git a/comms/jpilot/patches/patch-todo_c b/comms/jpilot/patches/patch-todo_c new file mode 100644 index 00000000000..d47367af795 --- /dev/null +++ b/comms/jpilot/patches/patch-todo_c @@ -0,0 +1,28 @@ +$OpenBSD: patch-todo_c,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- todo.c.orig Mon Feb 5 14:33:42 2001 ++++ todo.c Sun May 27 17:12:01 2001 +@@ -30,10 +30,6 @@ + #include "libplugin.h" + #include "password.h" + +-#include "japanese.h" +-#include "cp1250.h" +-#include "russian.h" +- + #define TODO_EOF 7 + + static struct ToDoAppInfo *glob_Ptodo_app_info; +@@ -240,6 +236,13 @@ int pc_todo_write(struct ToDo *todo, PCR + char record[65536]; + int rec_len; + buf_rec br; ++ long char_set; ++ ++ get_pref(PREF_CHAR_SET, &char_set, NULL); ++ if (char_set != CHAR_SET_ENGLISH) { ++ if (todo->description) charset_j2p(todo->description, strlen(todo->description)+1, char_set); ++ if (todo->note) charset_j2p(todo->note, strlen(todo->note)+1, char_set); ++ } + + rec_len = pack_ToDo(todo, record, 65535); + if (!rec_len) { diff --git a/comms/jpilot/patches/patch-todo_gui_c b/comms/jpilot/patches/patch-todo_gui_c new file mode 100644 index 00000000000..b990ac12830 --- /dev/null +++ b/comms/jpilot/patches/patch-todo_gui_c @@ -0,0 +1,20 @@ +$OpenBSD: patch-todo_gui_c,v 1.1.1.1 2001/05/29 00:54:46 pvalchev Exp $ +--- todo_gui.c.orig Mon Feb 5 14:33:52 2001 ++++ todo_gui.c Sun May 27 17:12:01 2001 +@@ -425,12 +425,16 @@ int todo_get_details(struct ToDo *new_to + /*it will show it though. I allow it. */ + new_todo->description = gtk_editable_get_chars + (GTK_EDITABLE(todo_text), 0, -1); ++/* charset_j2p(new_todo->description, 65536); */ + new_todo->note = gtk_editable_get_chars + (GTK_EDITABLE(todo_text_note), 0, -1); + if (new_todo->note[0]=='\0') { + free(new_todo->note); + new_todo->note=NULL; + } ++/* else { ++ charset_j2p(new_todo->note, 65536); ++ }*/ + + for (i=0; i + #include +@@ -1972,7 +1975,7 @@ void multibyte_safe_strncpy(char *dst, c + char *p, *q; + int n = 0; + p = src; q = dst; +- while ((*p) && n < (max_len-1)) { ++ while ((*p) && n < (max_len-2)) { + if ((*p) & 0x80) { + *q++ = *p++; + n++; +@@ -1985,11 +1988,10 @@ void multibyte_safe_strncpy(char *dst, c + n++; + } + } +- if ((*p & 0x80 ) && (n < max_len)) { +- *q = *p; +- } else { +- *q = '\0'; +- } ++ if (!(*p & 0x80 ) && (n < max_len-1)) ++ *q++ = *p++; ++ ++ *q = '\0'; + } else { + strncpy(dst, src, max_len); + } +@@ -2013,7 +2015,7 @@ char *multibyte_safe_memccpy(char *dst, + int n = 0; + + p = (char *)src; q = dst; +- while ((*p) && (n < (len -1))) { ++ while ((*p) && (n < (len -2))) { + if ((*p) & 0x80) { + *q++ = *p++; + n++; +@@ -2024,15 +2026,15 @@ char *multibyte_safe_memccpy(char *dst, + } else { + *q++ = *p++; + n++; ++ if (*(p-1) == (char)(c & 0xff)) return q; + } +- if (*(p-1) == (char)(c & 0xff)) return q; +- } +- if ((*p & 0x80) && (n < len)) { +- *q = *p; +- } else { +- *q = '\0'; + } ++ if (!(*p & 0x80) && (n < len-1)) ++ *q++ = *p++; ++ ++ *q = '\0'; + return NULL; + } else + return memccpy(dst, src, c, len); + } ++ diff --git a/comms/jpilot/patches/patch-utils_h b/comms/jpilot/patches/patch-utils_h new file mode 100644 index 00000000000..eb52b26045f --- /dev/null +++ b/comms/jpilot/patches/patch-utils_h @@ -0,0 +1,22 @@ +$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);} ++