Changeset f34dd65 for message.c


Ignore:
Timestamp:
Feb 11, 2009, 12:20:22 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
7980fb2
Parents:
823671c
git-author:
Nelson Elhage <nelhage@mit.edu> (02/08/09 16:31:14)
git-committer:
Nelson Elhage <nelhage@mit.edu> (02/11/09 12:20:22)
Message:
Kill a whole bunch of unused code.

I generated a list of dead functions by building with
-ffunction-sections and linking with -Wl,--gc-sections
-Wl,--print-gc-sections

I kept a number of functions that seemed to be logical parts of an
existing API, as well as stuff in varstubs.c, since that file is
autogenerated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r7d471c3 rf34dd65  
    338338}
    339339
    340 /* caller must free the return */
    341 char *owl_message_get_shorttimestr(owl_message *m)
    342 {
    343   struct tm *tmstruct;
    344   char *out;
    345 
    346   tmstruct=localtime(&(m->time));
    347   out=owl_sprintf("%2.2i:%2.2i", tmstruct->tm_hour, tmstruct->tm_min);
    348   if (out) return(out);
    349   return("??:??");
    350 }
    351 
    352340void owl_message_set_type_admin(owl_message *m)
    353341{
     
    384372{
    385373  return owl_message_is_type(m, "admin");
    386 }
    387 
    388 int owl_message_is_type_generic(owl_message *m)
    389 {
    390   char * t = owl_message_get_attribute_value(m, "type");
    391   return (t == NULL);
    392374}
    393375
     
    573555}
    574556
    575 int owl_message_is_from_me(owl_message *m)
    576 {
    577   if (owl_message_is_type_zephyr(m)) {
    578     if (!strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) {
    579       return(1);
    580     } else {
    581       return(0);
    582     }
    583   } else if (owl_message_is_type_aim(m)) {
    584     if (!strcasecmp(owl_message_get_sender(m), owl_global_get_aim_screenname(&g))) {
    585       return(1);
    586     } else {
    587       return(0);
    588     }
    589   } else if (owl_message_is_type_admin(m)) {
    590     return(0);
    591   }
    592   return(0);
    593 }
    594 
    595557int owl_message_is_mail(owl_message *m)
    596558{
    597559  if (owl_message_is_type_zephyr(m)) {
    598560    if (!strcasecmp(owl_message_get_class(m), "mail") && owl_message_is_private(m)) {
    599       return(1);
    600     } else {
    601       return(0);
    602     }
    603   }
    604   return(0);
    605 }
    606 
    607 int owl_message_is_ping(owl_message *m)
    608 {
    609   if (owl_message_is_type_zephyr(m)) {
    610     if (!strcasecmp(owl_message_get_opcode(m), "ping")) {
    611561      return(1);
    612562    } else {
     
    992942}
    993943
    994 void owl_message_pretty_zsig(owl_message *m, char *buff)
    995 {
    996   /* stick a one line version of the zsig in buff */
    997   char *ptr;
    998 
    999   strcpy(buff, owl_message_get_zsig(m));
    1000   ptr=strchr(buff, '\n');
    1001   if (ptr) ptr[0]='\0';
    1002 }
    1003 
    1004944void owl_message_free(owl_message *m)
    1005945{
Note: See TracChangeset for help on using the changeset viewer.