Changeset 1fdab04


Ignore:
Timestamp:
Aug 15, 2009, 7:08:19 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:
eaa9053
Parents:
c08c70a
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:38:02)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:19)
Message:
Add const qualifiers for owl_style *.

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

Legend:

Unmodified
Added
Removed
  • functions.c

    rc08c70a r1fdab04  
    9595  const char *desc;
    9696  char *s;
    97   owl_style *style;
     97  const owl_style *style;
    9898  style = owl_global_get_style_by_name(&g, name);
    9999  if (style) {
     
    15481548  owl_view *v;
    15491549  const owl_message *m;
    1550   owl_style *s;
     1550  const owl_style *s;
    15511551  owl_fmtext fm;
    15521552
     
    33623362void owl_function_change_style(owl_view *v, const char *stylename)
    33633363{
    3364   owl_style *s;
     3364  const owl_style *s;
    33653365
    33663366  s=owl_global_get_style_by_name(&g, stylename);
     
    33783378{
    33793379  owl_view *v;
    3380   owl_style *s;
     3380  const owl_style *s;
    33813381
    33823382  v=owl_global_get_current_view(&g);
  • global.c

    rc08c70a r1fdab04  
    843843/* Return the style with name 'name'.  If it does not exist return
    844844 * NULL */
    845 owl_style *owl_global_get_style_by_name(owl_global *g, const char *name)
     845const owl_style *owl_global_get_style_by_name(owl_global *g, const char *name)
    846846{
    847847  return owl_dict_find_element(&(g->styledict), name);
  • message.c

    rc08c70a r1fdab04  
    145145void owl_message_format(owl_message *m)
    146146{
    147   owl_style *s;
     147  const owl_style *s;
    148148  owl_view *v;
    149149
  • owl.c

    re19eb97 r1fdab04  
    4848  const char *confdir;
    4949  owl_filter *f;
    50   owl_style *s;
     50  const owl_style *s;
    5151  time_t nexttime, now;
    5252  struct tm *today;
  • owl.h

    rc08c70a r1fdab04  
    421421  owl_filter *filter;
    422422  owl_messagelist ml;
    423   owl_style *style;
     423  const owl_style *style;
    424424} owl_view;
    425425
  • style.c

    rc08c70a r1fdab04  
    88}
    99
    10 int owl_style_matches_name(owl_style *s, const char *name)
     10int owl_style_matches_name(const owl_style *s, const char *name)
    1111{
    1212  if (!strcmp(s->name, name)) return(1);
     
    1414}
    1515
    16 const char *owl_style_get_name(owl_style *s)
     16const char *owl_style_get_name(const owl_style *s)
    1717{
    1818  return(s->name);
    1919}
    2020
    21 const char *owl_style_get_description(owl_style *s)
     21const char *owl_style_get_description(const owl_style *s)
    2222{
    2323  SV *sv = NULL;
     
    3939 * 'fm' should already be be initialzed
    4040 */
    41 void owl_style_get_formattext(owl_style *s, owl_fmtext *fm, const owl_message *m)
     41void owl_style_get_formattext(const owl_style *s, owl_fmtext *fm, const owl_message *m)
    4242{
    4343  const char *body;
     
    7979}
    8080
    81 int owl_style_validate(owl_style *s) {
     81int owl_style_validate(const owl_style *s) {
    8282  if (!s || !s->perlobj || !SvOK(s->perlobj)) {
    8383    return -1;
  • view.c

    re19eb97 r1fdab04  
    22#include "owl.h"
    33
    4 void owl_view_create(owl_view *v, const char *name, owl_filter *f, owl_style *s)
     4void owl_view_create(owl_view *v, const char *name, owl_filter *f, const owl_style *s)
    55{
    66  v->name=owl_strdup(name);
     
    5757}
    5858
    59 void owl_view_set_style(owl_view *v, owl_style *s)
     59void owl_view_set_style(owl_view *v, const owl_style *s)
    6060{
    6161  v->style=s;
    6262}
    6363
    64 owl_style *owl_view_get_style(owl_view *v)
     64const owl_style *owl_view_get_style(owl_view *v)
    6565{
    6666  return(v->style);
Note: See TracChangeset for help on using the changeset viewer.