Changeset 09489b89 for functions.c
- Timestamp:
- Jul 2, 2003, 6:15:24 PM (22 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note: See TracChangeset
for help on using the changeset viewer.