Changeset bd3f232 for messagelist.c


Ignore:
Timestamp:
Jun 10, 2003, 3:14:59 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:
f14a7ee
Parents:
6e05655
Message:
Styles implemented
It's still a little buggy ... if a format_msg(); is used in perl admin
  messages (or maybe just the first admin message) are not formatted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • messagelist.c

    r1aee7d9 rbd3f232  
    55static const char fileIdent[] = "$Id$";
    66
    7 int owl_messagelist_create(owl_messagelist *ml) {
     7int owl_messagelist_create(owl_messagelist *ml)
     8{
    89  owl_list_create(&(ml->list));
    910  return(0);
    1011}
    1112
    12 int owl_messagelist_get_size(owl_messagelist *ml) {
     13int owl_messagelist_get_size(owl_messagelist *ml)
     14{
    1315  return(owl_list_get_size(&(ml->list)));
    1416}
    1517
    16 void *owl_messagelist_get_element(owl_messagelist *ml, int n) {
     18void *owl_messagelist_get_element(owl_messagelist *ml, int n)
     19{
    1720  return(owl_list_get_element(&(ml->list), n));
    1821}
    1922
    20 owl_message *owl_messagelist_get_by_id(owl_messagelist *ml, int id) {
     23owl_message *owl_messagelist_get_by_id(owl_messagelist *ml, int id)
     24{
    2125  /* return the message with id == 'id'.  If it doesn't exist return NULL. */
    2226  /* we could make this much more efficient at some point */
     
    3640}
    3741
    38 int owl_messagelist_append_element(owl_messagelist *ml, void *element) {
     42int owl_messagelist_append_element(owl_messagelist *ml, void *element)
     43{
    3944  return(owl_list_append_element(&(ml->list), element));
    4045}
    4146
    4247/* do we really still want this? */
    43 int owl_messagelist_delete_element(owl_messagelist *ml, int n) {
     48int owl_messagelist_delete_element(owl_messagelist *ml, int n)
     49{
    4450  /* mark a message as deleted */
    4551  owl_message_mark_delete(owl_list_get_element(&(ml->list), n));
     
    4753}
    4854
    49 int owl_messagelist_undelete_element(owl_messagelist *ml, int n) {
     55int owl_messagelist_undelete_element(owl_messagelist *ml, int n)
     56{
    5057  /* mark a message as deleted */
    5158  owl_message_unmark_delete(owl_list_get_element(&(ml->list), n));
     
    5360}
    5461
    55 int owl_messagelist_expunge(owl_messagelist *ml) {
     62int owl_messagelist_expunge(owl_messagelist *ml)
     63{
    5664  /* expunge deleted messages */
    5765  int i, j;
     
    7987  return(0);
    8088}
     89
     90void owl_messagelist_invalidate_formats(owl_messagelist *ml)
     91{
     92  int i, j;
     93  owl_message *m;
     94
     95  j=owl_list_get_size(&(ml->list));
     96  for (i=0; i<j; i++) {
     97    m=owl_list_get_element(&(ml->list), i);
     98    owl_message_invalidate_format(m);
     99  }
     100}
Note: See TracChangeset for help on using the changeset viewer.