Changeset 09489b89
- Timestamp:
- Jul 2, 2003, 6:15:24 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 373b7e7
- Parents:
- 7c9c847
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r7c9c847 r09489b89 1 1 $Id$ 2 2 3 2.0.7-pre-1 4 First pass at making owl build without zephyr 5 3 6 2.0.6 4 7 aimlogin will now accept the screenname without a password and ask -
codelist.pl
r0ff8fb57 r09489b89 22 22 && !/\/\*/ 23 23 && !/ZWRITEOPTIONS/ 24 && !/owlfaim_priv/) 24 && !/owlfaim_priv/) 25 25 { 26 26 27 s/\s+\{/\;/; 27 28 s/\)[ \t]*$/\)\;/; 28 29 print "extern "; 30 print; 31 } elsif (/^#if/ || /^#else/ || /^#endif/) { 29 32 print; 30 33 } -
configure
re016fc2 r09489b89 1380 1380 else 1381 1381 echo "$ac_t""no" 1>&6 1382 { echo "configure: error: No zephyr library found." 1>&2; exit 1; }1383 1382 fi 1384 1383 1385 1384 echo $ac_n "checking for ZInitLocationInfo in -lzephyr""... $ac_c" 1>&6 1386 echo "configure:138 7: checking for ZInitLocationInfo in -lzephyr" >&51385 echo "configure:1386: checking for ZInitLocationInfo in -lzephyr" >&5 1387 1386 ac_lib_var=`echo zephyr'_'ZInitLocationInfo | sed 'y%./+-%__p_%'` 1388 1387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1392 1391 LIBS="-lzephyr $LIBS" 1393 1392 cat > conftest.$ac_ext <<EOF 1394 #line 139 5"configure"1393 #line 1394 "configure" 1395 1394 #include "confdefs.h" 1396 1395 /* Override any gcc2 internal prototype to avoid an error. */ … … 1403 1402 ; return 0; } 1404 1403 EOF 1405 if { (eval echo configure:140 6: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1404 if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1406 1405 rm -rf conftest* 1407 1406 eval "ac_cv_lib_$ac_lib_var=yes" … … 1430 1429 do 1431 1430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1432 echo "configure:143 3: checking for $ac_func" >&51431 echo "configure:1432: checking for $ac_func" >&5 1433 1432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1434 1433 echo $ac_n "(cached) $ac_c" 1>&6 1435 1434 else 1436 1435 cat > conftest.$ac_ext <<EOF 1437 #line 143 8"configure"1436 #line 1437 "configure" 1438 1437 #include "confdefs.h" 1439 1438 /* System header to define __stub macros and hopefully few prototypes, … … 1458 1457 ; return 0; } 1459 1458 EOF 1460 if { (eval echo configure:146 1: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1459 if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1461 1460 rm -rf conftest* 1462 1461 eval "ac_cv_func_$ac_func=yes" … … 1484 1483 1485 1484 echo $ac_n "checking for des_ecb_encrypt prototype""... $ac_c" 1>&6 1486 echo "configure:148 7: checking for des_ecb_encrypt prototype" >&51485 echo "configure:1486: checking for des_ecb_encrypt prototype" >&5 1487 1486 cat > conftest.$ac_ext <<EOF 1488 #line 148 9"configure"1487 #line 1488 "configure" 1489 1488 #include "confdefs.h" 1490 1489 #include <des.h> … … 1494 1493 ; return 0; } 1495 1494 EOF 1496 if { (eval echo configure:149 7: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1495 if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1497 1496 rm -rf conftest* 1498 1497 ac_cv_des_ecb_encrypt_proto=no … … 1513 1512 1514 1513 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1515 echo "configure:151 6: checking how to run the C preprocessor" >&51514 echo "configure:1515: checking how to run the C preprocessor" >&5 1516 1515 # On Suns, sometimes $CPP names a directory. 1517 1516 if test -n "$CPP" && test -d "$CPP"; then … … 1528 1527 # not just through cpp. 1529 1528 cat > conftest.$ac_ext <<EOF 1530 #line 153 1"configure"1529 #line 1530 "configure" 1531 1530 #include "confdefs.h" 1532 1531 #include <assert.h> … … 1534 1533 EOF 1535 1534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1536 { (eval echo configure:153 7: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1535 { (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1537 1536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1538 1537 if test -z "$ac_err"; then … … 1545 1544 CPP="${CC-cc} -E -traditional-cpp" 1546 1545 cat > conftest.$ac_ext <<EOF 1547 #line 154 8"configure"1546 #line 1547 "configure" 1548 1547 #include "confdefs.h" 1549 1548 #include <assert.h> … … 1551 1550 EOF 1552 1551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1553 { (eval echo configure:155 4: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1552 { (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1554 1553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1555 1554 if test -z "$ac_err"; then … … 1562 1561 CPP="${CC-cc} -nologo -E" 1563 1562 cat > conftest.$ac_ext <<EOF 1564 #line 156 5"configure"1563 #line 1564 "configure" 1565 1564 #include "confdefs.h" 1566 1565 #include <assert.h> … … 1568 1567 EOF 1569 1568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1570 { (eval echo configure:157 1: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1569 { (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1571 1570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1572 1571 if test -z "$ac_err"; then … … 1593 1592 1594 1593 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 1595 echo "configure:159 6: checking for ANSI C header files" >&51594 echo "configure:1595: checking for ANSI C header files" >&5 1596 1595 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 1597 1596 echo $ac_n "(cached) $ac_c" 1>&6 1598 1597 else 1599 1598 cat > conftest.$ac_ext <<EOF 1600 #line 160 1"configure"1599 #line 1600 "configure" 1601 1600 #include "confdefs.h" 1602 1601 #include <stdlib.h> … … 1606 1605 EOF 1607 1606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1608 { (eval echo configure:160 9: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1607 { (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1609 1608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1610 1609 if test -z "$ac_err"; then … … 1623 1622 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 1624 1623 cat > conftest.$ac_ext <<EOF 1625 #line 162 6"configure"1624 #line 1625 "configure" 1626 1625 #include "confdefs.h" 1627 1626 #include <string.h> … … 1641 1640 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 1642 1641 cat > conftest.$ac_ext <<EOF 1643 #line 164 4"configure"1642 #line 1643 "configure" 1644 1643 #include "confdefs.h" 1645 1644 #include <stdlib.h> … … 1662 1661 else 1663 1662 cat > conftest.$ac_ext <<EOF 1664 #line 166 5"configure"1663 #line 1664 "configure" 1665 1664 #include "confdefs.h" 1666 1665 #include <ctype.h> … … 1673 1672 1674 1673 EOF 1675 if { (eval echo configure:167 6: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null1674 if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1676 1675 then 1677 1676 : … … 1697 1696 1698 1697 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 1699 echo "configure:1 700: checking for sys/wait.h that is POSIX.1 compatible" >&51698 echo "configure:1699: checking for sys/wait.h that is POSIX.1 compatible" >&5 1700 1699 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then 1701 1700 echo $ac_n "(cached) $ac_c" 1>&6 1702 1701 else 1703 1702 cat > conftest.$ac_ext <<EOF 1704 #line 170 5"configure"1703 #line 1704 "configure" 1705 1704 #include "confdefs.h" 1706 1705 #include <sys/types.h> … … 1718 1717 ; return 0; } 1719 1718 EOF 1720 if { (eval echo configure:172 1: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1719 if { (eval echo configure:1720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1721 1720 rm -rf conftest* 1722 1721 ac_cv_header_sys_wait_h=yes … … 1742 1741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1743 1742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1744 echo "configure:174 5: checking for $ac_hdr" >&51743 echo "configure:1744: checking for $ac_hdr" >&5 1745 1744 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1746 1745 echo $ac_n "(cached) $ac_c" 1>&6 1747 1746 else 1748 1747 cat > conftest.$ac_ext <<EOF 1749 #line 17 50"configure"1748 #line 1749 "configure" 1750 1749 #include "confdefs.h" 1751 1750 #include <$ac_hdr> 1752 1751 EOF 1753 1752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1754 { (eval echo configure:175 5: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }1753 { (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1755 1754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1756 1755 if test -z "$ac_err"; then … … 1784 1783 1785 1784 echo $ac_n "checking for the perl xsubpp precompiler""... $ac_c" 1>&6 1786 echo "configure:178 7: checking for the perl xsubpp precompiler" >&51785 echo "configure:1786: checking for the perl xsubpp precompiler" >&5 1787 1786 XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" 1788 1787 if test -n "${XSUBPPDIR}"; then … … 1799 1798 ac_safe=`echo "/usr/share/terminfo" | sed 'y%./+-%__p_%'` 1800 1799 echo $ac_n "checking for /usr/share/terminfo""... $ac_c" 1>&6 1801 echo "configure:180 2: checking for /usr/share/terminfo" >&51800 echo "configure:1801: checking for /usr/share/terminfo" >&5 1802 1801 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then 1803 1802 echo $ac_n "(cached) $ac_c" 1>&6 … … 1824 1823 ac_safe=`echo "/usr/share/lib/terminfo" | sed 'y%./+-%__p_%'` 1825 1824 echo $ac_n "checking for /usr/share/lib/terminfo""... $ac_c" 1>&6 1826 echo "configure:182 7: checking for /usr/share/lib/terminfo" >&51825 echo "configure:1826: checking for /usr/share/lib/terminfo" >&5 1827 1826 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then 1828 1827 echo $ac_n "(cached) $ac_c" 1>&6 … … 1885 1884 # ./install, which can be erroneously created by make from ./install.sh. 1886 1885 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1887 echo "configure:188 8: checking for a BSD compatible install" >&51886 echo "configure:1887: checking for a BSD compatible install" >&5 1888 1887 if test -z "$INSTALL"; then 1889 1888 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then -
configure.in
re016fc2 r09489b89 41 41 AC_CHECK_LIB(krb4, krb_sendauth,, 42 42 AC_CHECK_LIB(krb, krb_sendauth)) 43 AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) 44 dnl AC_CHECK_LIB(zephyr, ZGetSender) 43 dnl These are both off right now to simluate zephyr not being present 44 dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) 45 AC_CHECK_LIB(zephyr, ZGetSender) 45 46 AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) 46 47 -
filter.c
re187445 r09489b89 69 69 !strcasecmp(argv[i], "direction") || 70 70 !strcasecmp(argv[i], "login")) { 71 regexstr=owl_util_substitute(argv[i+1], "%me%", ZGetSender());71 regexstr=owl_util_substitute(argv[i+1], "%me%", owl_zephyr_get_sender()); 72 72 owl_filterelement_create_re(fe, argv[i], regexstr); 73 73 owl_free(regexstr); -
functions.c
r7c9c847 r09489b89 748 748 749 749 /* final clean up */ 750 unsuball(); 751 ZClosePort(); 750 owl_zephyr_shutdown(); 752 751 endwin(); 753 752 owl_function_debugmsg("Quitting Owl"); … … 1256 1255 owl_message *m; 1257 1256 owl_fmtext fm, attrfm; 1257 char buff[10000]; 1258 owl_view *v; 1259 #ifdef HAVE_LIBZEPHYR 1258 1260 ZNotice_t *n; 1259 char buff[10000], tmpbuff[1024]; 1260 char *ptr; 1261 int i, j, fields, len; 1262 owl_view *v; 1261 #endif 1263 1262 1264 1263 owl_fmtext_init_null(&fm); … … 1321 1320 owl_fmtext_append_normal(&fm, owl_message_get_timestr(m)); 1322 1321 owl_fmtext_append_normal(&fm, "\n"); 1323 1322 #ifdef HAVE_LIBZEPHYR 1324 1323 if (owl_message_is_direction_in(m)) { 1324 char *ptr, tmpbuff[1024]; 1325 int i, j, fields, len; 1326 1325 1327 n=owl_message_get_notice(m); 1326 1328 … … 1394 1396 owl_fmtext_append_normal(&fm, n->z_default_format); 1395 1397 } 1398 #endif 1396 1399 } 1397 1400 … … 1541 1544 void owl_function_getsubs() 1542 1545 { 1543 int ret, num, i, one; 1544 ZSubscription_t sub; 1545 char *buff, *tmpbuff; 1546 1547 one = 1; 1548 1549 ret=ZRetrieveSubscriptions(0, &num); 1550 if (ret == ZERR_TOOMANYSUBS) { 1551 owl_function_makemsg("Zephyr: too many subscriptions"); 1552 return; 1553 } 1554 1555 buff=owl_malloc(num*500); 1556 tmpbuff=owl_malloc(num*500); 1557 strcpy(buff, ""); 1558 for (i=0; i<num; i++) { 1559 if ((ret = ZGetSubscriptions(&sub, &one)) != ZERR_NONE) { 1560 owl_function_makemsg("Error while getting subscriptions"); 1561 owl_free(buff); 1562 owl_free(tmpbuff); 1563 ZFlushSubscriptions(); 1564 return; 1565 } else { 1566 sprintf(tmpbuff, "<%s,%s,%s>\n%s", sub.zsub_class, sub.zsub_classinst, sub.zsub_recipient, buff); 1567 strcpy(buff, tmpbuff); 1568 } 1569 } 1570 1571 owl_function_popless_text(buff); 1546 char *buff; 1547 1548 buff=owl_zephyr_getsubs(); 1549 1550 if (buff) { 1551 owl_function_popless_text(buff); 1552 } else { 1553 owl_function_popless_text("Error getting subscriptions"); 1554 } 1555 1572 1556 owl_free(buff); 1573 owl_free(tmpbuff);1574 ZFlushSubscriptions();1575 1557 } 1576 1558 … … 2863 2845 void owl_function_buddylist(int aim, int zephyr, char *file) 2864 2846 { 2865 char *ourfile, *tmp, buff[LINE], *line; 2866 FILE *f; 2867 int numlocs, ret, i, j; 2868 ZLocations_t location[200]; 2847 int i, j; 2869 2848 owl_fmtext fm; 2870 2849 owl_buddylist *b; 2850 #ifdef HAVE_LIBZEPHYR 2851 char *ourfile, *tmp, buff[LINE], *line; 2852 ZLocations_t location[200]; 2853 FILE *f; 2854 int numlocs, ret; 2855 #endif 2871 2856 2872 2857 owl_fmtext_init_null(&fm); … … 2884 2869 } 2885 2870 2871 #ifdef HAVE_LIBZEPHYR 2886 2872 if (zephyr) { 2887 2873 if (file==NULL) { … … 2904 2890 return; 2905 2891 } 2906 2892 2907 2893 owl_fmtext_append_bold(&fm, "Zephyr users logged in:\n"); 2908 2894 … … 2958 2944 owl_free(ourfile); 2959 2945 } 2946 #endif 2960 2947 2961 2948 owl_function_popless_fmtext(&fm); -
global.c
rcf83b7a r09489b89 97 97 owl_buddylist_init(&(g->buddylist)); 98 98 g->response=NULL; 99 g->havezephyr=0; 100 g->haveaim=0; 99 101 } 100 102 … … 779 781 g->response=resp; 780 782 } 783 784 785 void owl_global_set_haveaim(owl_global *g) 786 { 787 g->haveaim=1; 788 } 789 790 int owl_global_is_haveaim(owl_global *g) 791 { 792 if (g->haveaim) return(1); 793 return(0); 794 } 795 796 void owl_global_set_havezephyr(owl_global *g) 797 { 798 g->havezephyr=1; 799 } 800 801 int owl_global_is_havezephyr(owl_global *g) 802 { 803 if (g->havezephyr) return(1); 804 return(0); 805 } -
logging.c
r723c427 r09489b89 17 17 /* chop off a local realm */ 18 18 ptr=strchr(tobuff, '@'); 19 if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {19 if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) { 20 20 *ptr='\0'; 21 21 } … … 129 129 from=frombuff=owl_strdup(owl_message_get_sender(m)); 130 130 ptr=strchr(frombuff, '@'); 131 if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {131 if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) { 132 132 *ptr='\0'; 133 133 } -
message.c
r1d3e925 r09489b89 1 #include <zephyr/zephyr.h>2 1 #include <stdlib.h> 3 2 #include <unistd.h> … … 434 433 return(&(m->notice)); 435 434 } 435 #else 436 void *owl_message_get_notice(owl_message *m) 437 { 438 return(NULL); 439 } 436 440 #endif 437 441 … … 473 477 if (strcasecmp(owl_message_get_class(m), "message")) return(0); 474 478 if (strcasecmp(owl_message_get_instance(m), "personal")) return(0); 475 if (!strcasecmp(owl_message_get_recipient(m), ZGetSender()) ||476 !strcasecmp(owl_message_get_sender(m), ZGetSender())) {479 if (!strcasecmp(owl_message_get_recipient(m), owl_zephyr_get_sender()) || 480 !strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) { 477 481 return(1); 478 482 } … … 484 488 { 485 489 if (owl_message_is_type_zephyr(m)) { 486 if (!strcasecmp(owl_message_get_sender(m), ZGetSender())) {490 if (!strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) { 487 491 return(1); 488 492 } else { … … 534 538 535 539 if (owl_message_is_type_zephyr(m)) { 536 strcpy(sender, ZGetSender());540 strcpy(sender, owl_zephyr_get_sender()); 537 541 ptr=strchr(sender, '@'); 538 542 if (ptr) *ptr='\0'; … … 620 624 } 621 625 626 #ifdef HAVE_LIBZEPHYR 622 627 void owl_message_create_from_znotice(owl_message *m, ZNotice_t *n) 623 628 { … … 654 659 owl_message_set_realm(m, ptr+1); 655 660 } else { 656 owl_message_set_realm(m, ZGetRealm());661 owl_message_set_realm(m, owl_zephyr_get_realm()); 657 662 } 658 663 … … 667 672 668 673 /* is the "isprivate" attribute if it's a private zephyr */ 669 if (!strcasecmp(n->z_recipient, ZGetSender())) {674 if (!strcasecmp(n->z_recipient, owl_zephyr_get_sender())) { 670 675 owl_message_set_isprivate(m); 671 676 } … … 716 721 m->time[strlen(m->time)-1]='\0'; 717 722 } 723 #else 724 void owl_message_create_from_znotice(owl_message *m, void *n) 725 { 726 } 727 #endif 718 728 719 729 void owl_message_create_from_zwriteline(owl_message *m, char *line, char *body, char *zsig) … … 730 740 owl_message_set_direction_out(m); 731 741 owl_message_set_type_zephyr(m); 732 owl_message_set_sender(m, ZGetSender());742 owl_message_set_sender(m, owl_zephyr_get_sender()); 733 743 owl_message_set_class(m, owl_zwrite_get_class(&z)); 734 744 owl_message_set_instance(m, owl_zwrite_get_instance(&z)); … … 765 775 int i, j; 766 776 owl_pair *p; 767 777 #ifdef HAVE_LIBZEPHYR 768 778 if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) { 769 779 ZFreeNotice(&(m->notice)); 770 780 } 781 #endif 771 782 if (m->time) owl_free(m->time); 772 783 if (m->zwriteline) owl_free(m->zwriteline); -
owl.c
rcf83b7a r09489b89 15 15 #include <stdlib.h> 16 16 #include <string.h> 17 #include <zephyr/zephyr.h>18 17 #include <com_err.h> 19 18 #include <signal.h> … … 41 40 struct tm *today; 42 41 char *dir; 42 #ifdef HAVE_LIBZEPHYR 43 43 ZNotice_t notice; 44 #endif 44 45 45 46 argcsave=argc; … … 133 134 if (debug) owl_global_set_debug_on(&g); 134 135 owl_global_set_startupargs(&g, argcsave, argvsave); 135 136 #ifdef HAVE_LIBZEPHYR 137 owl_global_set_havezephyr(&g); 138 #endif 139 owl_global_set_haveaim(&g); 140 136 141 /* create the owl directory, in case it does not exist */ 137 142 dir=owl_sprintf("%s/%s", owl_global_get_homedir(&g), OWL_CONFIG_DIR); … … 340 345 zpendcount=0; 341 346 while(owl_zephyr_zpending() || owl_global_messagequeue_pending(&g)) { 347 #ifdef HAVE_LIBZEPHYR 342 348 struct sockaddr_in from; 349 #endif 343 350 owl_message *m; 344 351 owl_filter *f; 345 352 346 353 /* grab the new message, stick it in 'm' */ 347 354 if (owl_zephyr_zpending()) { 355 #ifdef HAVE_LIBZEPHYR 348 356 /* grab a zephyr notice, but if we've done 20 without stopping, 349 357 take a break to process keystrokes etc. */ … … 366 374 m=owl_malloc(sizeof(owl_message)); 367 375 owl_message_create_from_znotice(m, ¬ice); 376 #endif 368 377 } else if (owl_global_messagequeue_pending(&g)) { 369 378 m=owl_global_messageuque_popmsg(&g); -
owl.h
r7c9c847 r09489b89 11 11 #include "config.h" 12 12 #ifdef HAVE_LIBZEPHYR 13 #include <zephyr/zephyr.h> 13 #undef HAVE_LIBZEPHYR 14 /* #include <zephyr/zephyr.h> */ /* this is to simulate not having zephyr */ 14 15 #endif 15 16 … … 17 18 static const char owl_h_fileIdent[] = "$Id$"; 18 19 19 #define OWL_VERSION 2.0. 620 #define OWL_VERSION_STRING "2.0. 6"20 #define OWL_VERSION 2.0.7-pre-1 21 #define OWL_VERSION_STRING "2.0.7-pre-1" 21 22 22 23 #define OWL_DEBUG 0 … … 446 447 owl_list stylelist; /* global list of available styles */ 447 448 char *response; /* response to the last question asked */ 449 int havezephyr; 450 int haveaim; 448 451 } owl_global; 449 452 -
stylefunc.c
r778d0a9 r09489b89 9 9 void owl_stylefunc_basic(owl_fmtext *fm, owl_message *m) 10 10 { 11 #ifdef HAVE_LIBZEPHYR 11 12 char *body, *indent, *ptr, *zsigbuff, frombuff[LINE]; 12 13 ZNotice_t *n; 14 #endif 13 15 14 16 if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) { 17 #ifdef HAVE_LIBZEPHYR 15 18 n=owl_message_get_notice(m); 16 19 17 20 /* get the body */ 18 21 body=owl_strdup(owl_message_get_body(m)); … … 31 34 strcpy(frombuff, owl_message_get_sender(m)); 32 35 ptr=strchr(frombuff, '@'); 33 if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {36 if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) { 34 37 *ptr='\0'; 35 38 } … … 84 87 } 85 88 owl_fmtext_append_normal(fm, frombuff); 86 if (strcasecmp(owl_message_get_realm(m), ZGetRealm())) {89 if (strcasecmp(owl_message_get_realm(m), owl_zephyr_get_realm()) { 87 90 owl_fmtext_append_normal(fm, " {"); 88 91 owl_fmtext_append_normal(fm, owl_message_get_realm(m)); … … 112 115 owl_free(body); 113 116 owl_free(indent); 117 #endif 114 118 } else if (owl_message_is_type_zephyr(m) && owl_message_is_direction_out(m)) { 115 119 char *indent, *text, *zsigbuff, *foo; … … 200 204 void owl_stylefunc_default(owl_fmtext *fm, owl_message *m) 201 205 { 206 #ifdef HAVE_LIBZEPHYR 202 207 char *body, *indent, *ptr, *zsigbuff, frombuff[LINE]; 203 208 ZNotice_t *n; 209 #endif 204 210 205 211 if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) { 212 #ifdef HAVE_LIBZEPHYR 206 213 n=owl_message_get_notice(m); 207 214 208 215 /* get the body */ 209 216 body=owl_malloc(strlen(owl_message_get_body(m))+30); … … 222 229 strcpy(frombuff, owl_message_get_sender(m)); 223 230 ptr=strchr(frombuff, '@'); 224 if (ptr && !strncmp(ptr+1, ZGetRealm(), strlen(ZGetRealm()))) {231 if (ptr && !strncmp(ptr+1, owl_zephyr_get_realm(), strlen(owl_zephyr_get_realm()))) { 225 232 *ptr='\0'; 226 233 } … … 254 261 } 255 262 owl_fmtext_append_normal(fm, " for "); 256 ptr=short_zuser( n->z_class_inst);263 ptr=short_zuser(owl_zephyr_get_instance(m)); 257 264 owl_fmtext_append_bold(fm, ptr); 258 265 owl_free(ptr); … … 276 283 owl_fmtext_append_normal(fm, "} "); 277 284 } 278 if ( n->z_opcode[0]!='\0') {285 if (strccmp(owl_zephyr_get_opcode(m), "")) { 279 286 owl_fmtext_append_normal(fm, " ["); 280 287 owl_fmtext_append_normal(fm, owl_message_get_opcode(m)); … … 304 311 owl_free(body); 305 312 owl_free(indent); 313 #endif 306 314 } else if (owl_message_is_type_zephyr(m) && owl_message_is_direction_out(m)) { 307 315 char *indent, *text, *zsigbuff, *foo; … … 395 403 char *baseformat="%s %-13.13s %-11.11s %-12.12s "; 396 404 char *sender, *recip; 405 #ifdef HAVE_LIBZEPHYR 397 406 ZNotice_t *n; 398 407 #endif 399 408 400 409 sender=short_zuser(owl_message_get_sender(m)); … … 402 411 403 412 if (owl_message_is_type_zephyr(m)) { 413 #ifdef HAVE_LIBZEPHYR 404 414 n=owl_message_get_notice(m); 405 415 … … 472 482 owl_free(sender); 473 483 owl_free(recip); 474 484 #endif 475 485 } else if (owl_message_is_type_aim(m)) { 476 486 owl_fmtext_append_spaces(fm, OWL_TAB); -
util.c
re7cc1c3 r09489b89 427 427 ptr=strchr(out, '@'); 428 428 if (ptr) { 429 if (!strcasecmp(ptr+1, ZGetRealm())) {429 if (!strcasecmp(ptr+1, owl_zephyr_get_realm())) { 430 430 *ptr='\0'; 431 431 } … … 444 444 return owl_strdup(in); 445 445 } else { 446 return owl_sprintf("%s@%s", in, ZGetRealm());446 return owl_sprintf("%s@%s", in, owl_zephyr_get_realm()); 447 447 } 448 448 } -
variable.c
rb278973 r09489b89 354 354 355 355 int owl_variable_tty_set(owl_variable *v, void *newval) { 356 ZInitLocationInfo(owl_global_get_hostname(&g), newval);356 owl_zephyr_set_locationinfo(owl_global_get_hostname(&g), newval); 357 357 return(owl_variable_string_set_default(v, newval)); 358 358 } -
zcrypt.c
rc86a35c r09489b89 26 26 #include <sys/types.h> 27 27 #include <des.h> 28 #include <zephyr/zephyr.h>29 28 30 29 #define MAX_KEY 128 -
zephyr.c
rb2a91b6 r09489b89 4 4 #include <sys/wait.h> 5 5 #include <string.h> 6 #include <zephyr/zephyr.h>7 6 #include <com_err.h> 8 7 #include "owl.h" … … 10 9 static const char fileIdent[] = "$Id$"; 11 10 11 #ifdef HAVE_LIBZEPHYR 12 12 Code_t ZResetAuthentication(); 13 #endif 13 14 14 15 int owl_zephyr_initialize() 15 16 { 17 #ifdef HAVE_LIBZEPHYR 16 18 int ret; 17 19 … … 24 26 return(1); 25 27 } 28 #endif 29 return(0); 30 } 31 32 33 int owl_zephyr_shutdown() 34 { 35 #ifdef HAVE_LIBZEPHYR 36 unsuball(); 37 ZClosePort(); 38 #endif 26 39 return(0); 27 40 } … … 33 46 #else 34 47 return(0); 48 #endif 49 } 50 51 char *owl_zephyr_get_realm() 52 { 53 #ifdef HAVE_LIBZEPHYR 54 return(ZGetRealm()); 55 #else 56 return(""); 57 #endif 58 } 59 60 char *owl_zephyr_get_sender() 61 { 62 #ifdef HAVE_LIBZEPHYR 63 return(ZGetSender()); 64 #else 65 return(""); 35 66 #endif 36 67 } … … 258 289 return(""); 259 290 } 291 #else 292 char *owl_zephyr_get_field(void *n, int j, int *k) 293 { 294 return(""); 295 } 260 296 #endif 261 297 … … 271 307 272 308 return(fields); 309 } 310 #else 311 int owl_zephyr_get_num_fields(void *n) 312 { 313 return(0); 273 314 } 274 315 #endif … … 298 339 *k=strlen(n->z_message); 299 340 return(n->z_message); 341 } 342 #else 343 char *owl_zephyr_get_zsig(void *n, int *k) 344 { 345 return(""); 300 346 } 301 347 #endif … … 396 442 } 397 443 } 444 #else 445 void owl_zephyr_handle_ack(void *retnotice) 446 { 447 } 398 448 #endif 399 449 … … 405 455 return(1); 406 456 } 457 return(0); 458 } 459 #else 460 int owl_zephyr_notice_is_ack(void *n) 461 { 407 462 return(0); 408 463 } … … 654 709 655 710 /* return auth string */ 711 #ifdef HAVE_LIBZEPHYR 656 712 char *owl_zephyr_get_authstr(ZNotice_t *n) 657 713 { … … 669 725 } 670 726 } 671 672 727 #else 728 char *owl_zephyr_get_authstr(void *n) 729 { 730 return(""); 731 } 732 #endif 733 734 735 /* returns a buffer of subscriptions or an error message. 736 * Caller must free the return. 737 */ 738 char *owl_zephyr_getsubs() 739 { 740 #ifdef HAVE_LIBZEPHYR 741 int ret, num, i, one; 742 ZSubscription_t sub; 743 char *out, *tmpbuff; 744 one=1; 745 746 ret=ZRetrieveSubscriptions(0, &num); 747 if (ret==ZERR_TOOMANYSUBS) { 748 out=owl_strdup("Zephyr: too many subscriptions\n"); 749 return(out); 750 } 751 752 out=owl_malloc(num*500); 753 tmpbuff=owl_malloc(num*500); 754 strcpy(out, ""); 755 for (i=0; i<num; i++) { 756 if ((ret = ZGetSubscriptions(&sub, &one)) != ZERR_NONE) { 757 owl_free(out); 758 owl_free(tmpbuff); 759 ZFlushSubscriptions(); 760 out=owl_strdup("Error while getting subscriptions\n"); 761 return(out); 762 } else { 763 sprintf(tmpbuff, "<%s,%s,%s>\n%s", sub.zsub_class, sub.zsub_classinst, sub.zsub_recipient, buff); 764 strcpy(out, tmpbuff); 765 } 766 } 767 768 owl_free(tmpbuff); 769 ZFlushSubscriptions(); 770 return(out); 771 #else 772 return(""); 773 #endif 774 } 775 776 char *owl_zephyr_get_variable(char *var) 777 { 778 #ifdef HAVE_LIBZEPHYR 779 return(ZGetVariable(var)); 780 #else 781 return(""); 782 #endif 783 } 784 785 void owl_zephyr_set_locationinfo(char *host, char *val) 786 { 787 #ifdef HAVE_LIBZEPHYR 788 ZInitLocationInfo(host, val); 789 #endif 790 } 791 -
zwrite.c
re016fc2 r09489b89 143 143 zsigproc = owl_global_get_zsigproc(&g); 144 144 zsigowlvar = owl_global_get_zsig(&g); 145 zsigzvar = ZGetVariable("zwrite-signature");145 zsigzvar = owl_zephyr_get_variable("zwrite-signature"); 146 146 147 147 if (zsigowlvar && *zsigowlvar) {
Note: See TracChangeset
for help on using the changeset viewer.