Changeset e19eb97 for filterelement.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1077891a
Parents:
fa4562c
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:37:51)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Add const qualifiers for char * and void *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • filterelement.c

    r65b2173 re19eb97  
    11#include "owl.h"
    22
    3 static char * owl_filterelement_get_field(owl_message *m, char * field)
    4 {
    5   char *match;
     3static const char * owl_filterelement_get_field(owl_message *m, const char * field)
     4{
     5  const char *match;
    66  if (!strcasecmp(field, "class")) {
    77    match=owl_message_get_class(m);
     
    6060static int owl_filterelement_match_re(owl_filterelement *fe, owl_message *m)
    6161{
    62   char * val = owl_filterelement_get_field(m, fe->field);
     62  const char * val = owl_filterelement_get_field(m, fe->field);
    6363  return !owl_regex_compare(&(fe->re), val, NULL, NULL);
    6464}
     
    7979static int owl_filterelement_match_perl(owl_filterelement *fe, owl_message *m)
    8080{
    81   char *subname;
     81  const char *subname;
    8282  char *perlrv;
    8383  int   tf=0;
     
    137137static void owl_filterelement_print_re(owl_filterelement *fe, GString *buf)
    138138{
    139   char *re, *q;
     139  const char *re, *q;
    140140  g_string_append(buf, fe->field);
    141141  g_string_append(buf, " ");
     
    212212}
    213213
    214 int owl_filterelement_create_re(owl_filterelement *fe, char *field, char *re)
     214int owl_filterelement_create_re(owl_filterelement *fe, const char *field, const char *re)
    215215{
    216216  owl_filterelement_create(fe);
     
    226226}
    227227
    228 void owl_filterelement_create_filter(owl_filterelement *fe, char *name)
     228void owl_filterelement_create_filter(owl_filterelement *fe, const char *name)
    229229{
    230230  owl_filterelement_create(fe);
     
    234234}
    235235
    236 void owl_filterelement_create_perl(owl_filterelement *fe, char *name)
     236void owl_filterelement_create_perl(owl_filterelement *fe, const char *name)
    237237{
    238238  owl_filterelement_create(fe);
Note: See TracChangeset for help on using the changeset viewer.