Changeset f6b319c for perlconfig.c


Ignore:
Timestamp:
Apr 29, 2007, 6:27:30 PM (14 years ago)
Author:
Sam Hartman <hartmans@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d791cdb
Parents:
03cf6b9
Message:
Implement hackish support for the wordwrap filter in the perl styles.
Note that while I think the user-visible parts of this are reasonably
OK the implementation needs cleanup.


* perlconfig.c: Add should_wordwrap attribute to message hashes.  This
   is a hack; a better solution is to expose an arbitrary interface for
   doing filter matches from perl.  That proved to be more than I had
   time for.
* perlglue.xs: expose owl_text_wordwrap
* perlwrap.pm: use in the default style
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    r0337203 rf6b319c  
    3333  int i, j;
    3434  owl_pair *pair;
     35  owl_filter *wrap;
    3536
    3637  if (!m) return &PL_sv_undef;
     38  wrap = owl_global_get_filter(&g, "wordwrap");
     39  if(!wrap) {
     40      owl_function_error("wrap filter is not defined");
     41      return &PL_sv_undef;
     42  }
     43
    3744  h = newHV();
    3845
     
    8592  hv_store(h, "deleted", strlen("deleted"), newSViv(owl_message_is_delete(m)),0);
    8693  hv_store(h, "private", strlen("private"), newSViv(owl_message_is_private(m)),0);
     94  hv_store(h, "should_wordwrap",
     95           strlen("should_wordwrap"), newSViv(
     96                                              owl_filter_message_match(wrap, m)),0);
    8797
    8898  type = owl_message_get_type(m);
Note: See TracChangeset for help on using the changeset viewer.