Changeset 4542047


Ignore:
Timestamp:
Aug 15, 2009, 7:08:20 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9e5c9f3
Parents:
bd65108
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:38:07)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:20)
Message:
Add const qualifiers for owl_filter *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    rc08c70a r4542047  
    24852485char *owl_command_getfilter(int argc, const char *const *argv, const char *buf)
    24862486{
    2487   owl_filter *f;
     2487  const owl_filter *f;
    24882488  if (argc != 2) {
    24892489    owl_function_makemsg("Wrong number of arguments for %s", argv[0]);
  • filter.c

    rc08c70a r4542047  
    151151}
    152152
    153 const char *owl_filter_get_name(owl_filter *f)
     153const char *owl_filter_get_name(const owl_filter *f)
    154154{
    155155  return(f->name);
     
    161161}
    162162
    163 int owl_filter_get_fgcolor(owl_filter *f)
     163int owl_filter_get_fgcolor(const owl_filter *f)
    164164{
    165165  return(f->fgcolor);
     
    171171}
    172172
    173 int owl_filter_get_bgcolor(owl_filter *f)
     173int owl_filter_get_bgcolor(const owl_filter *f)
    174174{
    175175  return(f->bgcolor);
     
    181181}
    182182
    183 int owl_filter_get_cachedmsgid(owl_filter *f)
     183int owl_filter_get_cachedmsgid(const owl_filter *f)
    184184{
    185185  return(f->cachedmsgid);
     
    189189 * return 0.
    190190 */
    191 int owl_filter_message_match(owl_filter *f, const owl_message *m)
     191int owl_filter_message_match(const owl_filter *f, const owl_message *m)
    192192{
    193193  int ret;
     
    198198
    199199
    200 char* owl_filter_print(owl_filter *f)
     200char* owl_filter_print(const owl_filter *f)
    201201{
    202202  GString *out = g_string_new("");
     
    231231
    232232/* Return 1 if the filters 'a' and 'b' are equivalent, 0 otherwise */
    233 int owl_filter_equiv(owl_filter *a, owl_filter *b)
     233int owl_filter_equiv(const owl_filter *a, const owl_filter *b)
    234234{
    235235  char *buffa, *buffb;
     
    250250
    251251
    252 int owl_filter_is_toodeep(owl_filter *f)
     252int owl_filter_is_toodeep(const owl_filter *f)
    253253{
    254254  return owl_filterelement_is_toodeep(f, f->root);
  • filterelement.c

    rbd65108 r4542047  
    6666static int owl_filterelement_match_filter(const owl_filterelement *fe, const owl_message *m)
    6767{
    68   owl_filter *subfilter;
     68  const owl_filter *subfilter;
    6969  subfilter=owl_global_get_filter(&g, fe->field);
    7070  if (!subfilter) {
     
    286286static int fe_visited  = 1;
    287287
    288 int owl_filterelement_is_toodeep(owl_filter *f, const owl_filterelement *fe)
     288int owl_filterelement_is_toodeep(const owl_filter *f, const owl_filterelement *fe)
    289289{
    290290  int rv;
     
    303303{
    304304  int rv = 0;
    305   owl_filter *f;
     305  const owl_filter *f;
    306306
    307307  if(fe->match_message == owl_filterelement_match_filter) {
  • functions.c

    r3eb599d r4542047  
    594594  int curmsg, i, viewsize, found;
    595595  owl_view *v;
    596   owl_filter *f = NULL;
     596  const owl_filter *f = NULL;
    597597  const owl_message *m;
    598598
     
    647647  int curmsg, i, viewsize, found;
    648648  owl_view *v;
    649   owl_filter *f = NULL;
     649  const owl_filter *f = NULL;
    650650  const owl_message *m;
    651651
     
    17521752  owl_message *m;
    17531753  owl_view *v;
    1754   owl_filter *f;
     1754  const owl_filter *f;
    17551755
    17561756  /* get the trash filter */
     
    18871887  char *buff=NULL;
    18881888  const owl_message *m;
    1889   owl_filter *f;
     1889  const owl_filter *f;
    18901890 
    18911891  if (owl_view_get_size(owl_global_get_current_view(&g))==0) {
     
    22472247{
    22482248  char *newname;
    2249   owl_filter *tmpfilt;
     2249  const owl_filter *tmpfilt;
    22502250  const char *argv[5];
    22512251
     
    22752275{
    22762276  const owl_list *l;
    2277   owl_filter *f;
     2277  const owl_filter *f;
    22782278  int i, j;
    22792279  owl_fmtext fm;
     
    23022302void owl_function_show_filter(const char *name)
    23032303{
    2304   owl_filter *f;
     2304  const owl_filter *f;
    23052305  char *buff, *tmp;
    23062306
     
    23192319void owl_function_show_zpunts()
    23202320{
    2321   owl_filter *f;
     2321  const owl_filter *f;
    23222322  const owl_list *fl;
    23232323  char buff[5000];
  • logging.c

    rc08c70a r4542047  
    3838/* Return 1 if we should log the given message, otherwise return 0 */
    3939int owl_log_shouldlog_message(const owl_message *m) {
    40   owl_filter *f;
     40  const owl_filter *f;
    4141
    4242  /* If there's a logfilter and this message matches it, log */
  • mainwin.c

    reaa9053 r4542047  
    1616  owl_view *v;
    1717  const owl_list *filtlist;
    18   owl_filter *f;
     18  const owl_filter *f;
    1919
    2020  recwin=owl_global_get_curs_recwin(&g);
  • message.c

    r89b2daf r4542047  
    526526int owl_message_is_personal(const owl_message *m)
    527527{
    528   owl_filter * f = owl_global_get_filter(&g, "personal");
     528  const owl_filter * f = owl_global_get_filter(&g, "personal");
    529529  if(!f) {
    530530      owl_function_error("personal filter is not defined");
  • owl.c

    r1fdab04 r4542047  
    487487 */
    488488int owl_process_message(owl_message *m) {
    489   owl_filter *f;
     489  const owl_filter *f;
    490490  /* if this message it on the puntlist, nuke it and continue */
    491491  if (owl_global_message_is_puntable(&g, m)) {
  • perlconfig.c

    rc08c70a r4542047  
    3030  int i, j;
    3131  const owl_pair *pair;
    32   owl_filter *wrap;
     32  const owl_filter *wrap;
    3333
    3434  if (!m) return &PL_sv_undef;
  • perlglue.xs

    r77bced3 r4542047  
    347347                AV *filters;
    348348                const owl_list *fl;
    349                 owl_filter *f;
     349                const owl_filter *f;
    350350                int i;
    351351        CODE:
Note: See TracChangeset for help on using the changeset viewer.