Changeset 09489b89 for message.c


Ignore:
Timestamp:
Jul 2, 2003, 6:15:24 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, 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
  • message.c

    r1d3e925 r09489b89  
    1 #include <zephyr/zephyr.h>
    21#include <stdlib.h>
    32#include <unistd.h>
     
    434433  return(&(m->notice));
    435434}
     435#else
     436void *owl_message_get_notice(owl_message *m)
     437{
     438  return(NULL);
     439}
    436440#endif
    437441
     
    473477    if (strcasecmp(owl_message_get_class(m), "message")) return(0);
    474478    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())) {
    477481      return(1);
    478482    }
     
    484488{
    485489  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())) {
    487491      return(1);
    488492    } else {
     
    534538
    535539  if (owl_message_is_type_zephyr(m)) {
    536     strcpy(sender, ZGetSender());
     540    strcpy(sender, owl_zephyr_get_sender());
    537541    ptr=strchr(sender, '@');
    538542    if (ptr) *ptr='\0';
     
    620624}
    621625
     626#ifdef HAVE_LIBZEPHYR
    622627void owl_message_create_from_znotice(owl_message *m, ZNotice_t *n)
    623628{
     
    654659    owl_message_set_realm(m, ptr+1);
    655660  } else {
    656     owl_message_set_realm(m, ZGetRealm());
     661    owl_message_set_realm(m, owl_zephyr_get_realm());
    657662  }
    658663
     
    667672
    668673  /* 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())) {
    670675    owl_message_set_isprivate(m);
    671676  }
     
    716721  m->time[strlen(m->time)-1]='\0';
    717722}
     723#else
     724void owl_message_create_from_znotice(owl_message *m, void *n)
     725{
     726}
     727#endif
    718728
    719729void owl_message_create_from_zwriteline(owl_message *m, char *line, char *body, char *zsig)
     
    730740  owl_message_set_direction_out(m);
    731741  owl_message_set_type_zephyr(m);
    732   owl_message_set_sender(m, ZGetSender());
     742  owl_message_set_sender(m, owl_zephyr_get_sender());
    733743  owl_message_set_class(m, owl_zwrite_get_class(&z));
    734744  owl_message_set_instance(m, owl_zwrite_get_instance(&z));
     
    765775  int i, j;
    766776  owl_pair *p;
    767    
     777#ifdef HAVE_LIBZEPHYR   
    768778  if (owl_message_is_type_zephyr(m) && owl_message_is_direction_in(m)) {
    769779    ZFreeNotice(&(m->notice));
    770780  }
     781#endif
    771782  if (m->time) owl_free(m->time);
    772783  if (m->zwriteline) owl_free(m->zwriteline);
Note: See TracChangeset for help on using the changeset viewer.