Changeset 09489b89 for functions.c


Ignore:
Timestamp:
Jul 2, 2003, 6:15:24 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
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
Message:
First pass at making owl build without zephyr
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r7c9c847 r09489b89  
    748748
    749749  /* final clean up */
    750   unsuball();
    751   ZClosePort();
     750  owl_zephyr_shutdown();
    752751  endwin();
    753752  owl_function_debugmsg("Quitting Owl");
     
    12561255  owl_message *m;
    12571256  owl_fmtext fm, attrfm;
     1257  char buff[10000];
     1258  owl_view *v;
     1259#ifdef HAVE_LIBZEPHYR
    12581260  ZNotice_t *n;
    1259   char buff[10000], tmpbuff[1024];
    1260   char *ptr;
    1261   int i, j, fields, len;
    1262   owl_view *v;
     1261#endif
    12631262
    12641263  owl_fmtext_init_null(&fm);
     
    13211320    owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
    13221321    owl_fmtext_append_normal(&fm, "\n");
    1323 
     1322#ifdef HAVE_LIBZEPHYR
    13241323    if (owl_message_is_direction_in(m)) {
     1324      char *ptr, tmpbuff[1024];
     1325      int i, j, fields, len;
     1326
    13251327      n=owl_message_get_notice(m);
    13261328
     
    13941396      owl_fmtext_append_normal(&fm, n->z_default_format);
    13951397    }
     1398#endif   
    13961399  }
    13971400
     
    15411544void owl_function_getsubs()
    15421545{
    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           
    15721556  owl_free(buff);
    1573   owl_free(tmpbuff);
    1574   ZFlushSubscriptions();
    15751557}
    15761558
     
    28632845void owl_function_buddylist(int aim, int zephyr, char *file)
    28642846{
    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;
    28692848  owl_fmtext fm;
    28702849  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
    28712856
    28722857  owl_fmtext_init_null(&fm);
     
    28842869  }
    28852870
     2871#ifdef HAVE_LIBZEPHYR
    28862872  if (zephyr) {
    28872873    if (file==NULL) {
     
    29042890      return;
    29052891    }
    2906    
     2892
    29072893    owl_fmtext_append_bold(&fm, "Zephyr users logged in:\n");
    29082894   
     
    29582944    owl_free(ourfile);
    29592945  }
     2946#endif
    29602947 
    29612948  owl_function_popless_fmtext(&fm);
Note: See TracChangeset for help on using the changeset viewer.