Changeset 9e5c9f3


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:
1e94c0b
Parents:
4542047
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:38:09)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:20)
Message:
Add const qualifiers for owl_view *.

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

Legend:

Unmodified
Added
Removed
  • commands.c

    r4542047 r9e5c9f3  
    20142014  } else if (argc==2 && !strcmp(argv[1], "zaway")) {
    20152015    const owl_message *m;
    2016     owl_view    *v;
     2016    const owl_view    *v;
    20172017    v = owl_global_get_current_view(&g);   
    20182018    m = owl_view_get_element(v, owl_global_get_curmsg(&g));
     
    25872587{
    25882588  owl_message *m;
    2589   owl_view *v;
     2589  const owl_view *v;
    25902590  const char *cmd;
    25912591
     
    26212621{
    26222622  owl_message *m;
    2623   owl_view *v;
     2623  const owl_view *v;
    26242624  const char *cmd;
    26252625
  • functions.c

    r4542047 r9e5c9f3  
    6262void owl_function_show_view(const char *viewname)
    6363{
    64   owl_view *v;
     64  const owl_view *v;
    6565  owl_fmtext fm;
    6666
     
    593593{
    594594  int curmsg, i, viewsize, found;
    595   owl_view *v;
     595  const owl_view *v;
    596596  const owl_filter *f = NULL;
    597597  const owl_message *m;
     
    646646{
    647647  int curmsg, i, viewsize, found;
    648   owl_view *v;
     648  const owl_view *v;
    649649  const owl_filter *f = NULL;
    650650  const owl_message *m;
     
    818818{
    819819  int oldcurmsg, curmsg;
    820   owl_view *v;
     820  const owl_view *v;
    821821
    822822  v=owl_global_get_current_view(&g);
     
    10411041{
    10421042  int recwinlines, topmsg, curmsg;
    1043   owl_view *v;
     1043  const owl_view *v;
    10441044
    10451045  v=owl_global_get_current_view(&g);
     
    10851085 * and the number of lines in the recwin.
    10861086 */
    1087 int owl_function_calculate_topmsg_top(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
     1087int owl_function_calculate_topmsg_top(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    10881088{
    10891089  return(curmsg);
    10901090}
    10911091
    1092 int owl_function_calculate_topmsg_neartop(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
     1092int owl_function_calculate_topmsg_neartop(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    10931093{
    10941094  if (curmsg>0
     
    11011101}
    11021102 
    1103 int owl_function_calculate_topmsg_center(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
     1103int owl_function_calculate_topmsg_center(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    11041104{
    11051105  int i, last, lines;
     
    11151115}
    11161116 
    1117 int owl_function_calculate_topmsg_paged(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)
     1117int owl_function_calculate_topmsg_paged(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)
    11181118{
    11191119  int i, last, lines, savey;
     
    11551155}
    11561156
    1157 int owl_function_calculate_topmsg_normal(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
     1157int owl_function_calculate_topmsg_normal(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
    11581158{
    11591159  int savey, i, foo, y;
     
    14131413  const owl_message *m;
    14141414  owl_fmtext fm, attrfm;
    1415   owl_view *v;
     1415  const owl_view *v;
    14161416#ifdef HAVE_LIBZEPHYR
    14171417  const ZNotice_t *n;
     
    15461546void owl_function_curmsg_to_popwin()
    15471547{
    1548   owl_view *v;
     1548  const owl_view *v;
    15491549  const owl_message *m;
    15501550  const owl_style *s;
     
    15731573
    15741574  int offset, curmsg, lines;
    1575   owl_view *v;
     1575  const owl_view *v;
    15761576  owl_message *m;
    15771577
     
    17511751  int i, j, count;
    17521752  owl_message *m;
    1753   owl_view *v;
     1753  const owl_view *v;
    17541754  const owl_filter *f;
    17551755
     
    21552155{
    21562156  owl_filter *f;
    2157   owl_view *v;
     2157  const owl_view *v;
    21582158  int ret, inuse=0;
    21592159
     
    25452545void owl_function_delete_curview_msgs(int flag)
    25462546{
    2547   owl_view *v;
     2547  const owl_view *v;
    25482548  int i, j;
    25492549
     
    25792579char *owl_function_smartfilter(int type)
    25802580{
    2581   owl_view *v;
     2581  const owl_view *v;
    25822582  const owl_message *m;
    25832583  char *zperson, *filtname=NULL;
     
    26512651  /* Starts a zpunt command based on the current class,instance pair.
    26522652   * If type=0, uses just class.  If type=1, uses instance as well. */
    2653   owl_view *v;
     2653  const owl_view *v;
    26542654  const owl_message *m;
    26552655  const char *cmdprefix, *mclass, *minst;
     
    29982998   */
    29992999
    3000   owl_view *v;
     3000  const owl_view *v;
    30013001  int viewsize, i, curmsg, start;
    30023002  owl_message *m;
     
    31933193  int i, j, count;
    31943194  owl_message *m;
    3195   owl_view *v;
     3195  const owl_view *v;
    31963196  FILE *file;
    31973197  char *plaintext;
     
    35763576{
    35773577  const owl_message *m;
    3578   owl_view *v;
     3578  const owl_view *v;
    35793579
    35803580  v=owl_global_get_current_view(&g);
     
    35963596  int marked_id;
    35973597  const owl_message *m;
    3598   owl_view *v;
     3598  const owl_view *v;
    35993599
    36003600  marked_id=owl_global_get_markedmsgid(&g);
  • global.c

    r89b2daf r9e5c9f3  
    697697
    698698int owl_global_should_followlast(owl_global *g) {
    699   owl_view *v;
     699  const owl_view *v;
    700700 
    701701  if (!owl_global_is__followlast(g)) return(0);
  • mainwin.c

    r4542047 r9e5c9f3  
    1414  int topmsg, curmsg, fgcolor, bgcolor;
    1515  WINDOW *recwin;
    16   owl_view *v;
     16  const owl_view *v;
    1717  const owl_list *filtlist;
    1818  const owl_filter *f;
  • message.c

    r4542047 r9e5c9f3  
    146146{
    147147  const owl_style *s;
    148   owl_view *v;
     148  const owl_view *v;
    149149
    150150  if (!m->fmtext) {
  • perlconfig.c

    r4542047 r9e5c9f3  
    115115{
    116116  int curmsg;
    117   owl_view *v;
     117  const owl_view *v;
    118118  v=owl_global_get_current_view(&g);
    119119  if (owl_view_get_size(v) < 1) {
  • util.c

    r3eb599d r9e5c9f3  
    1111  WINDOW *sepwin;
    1212  const owl_messagelist *ml;
    13   owl_view *v;
     13  const owl_view *v;
    1414  int x, y, i;
    1515  const char *foo, *appendtosepbar;
  • view.c

    r3eb599d r9e5c9f3  
    1111}
    1212
    13 const char *owl_view_get_name(owl_view *v)
     13const char *owl_view_get_name(const owl_view *v)
    1414{
    1515  return(v->name);
     
    6262}
    6363
    64 const owl_style *owl_view_get_style(owl_view *v)
     64const owl_style *owl_view_get_style(const owl_view *v)
    6565{
    6666  return(v->style);
    6767}
    6868
    69 const char *owl_view_get_style_name(owl_view *v) {
     69const char *owl_view_get_style_name(const owl_view *v) {
    7070  return(owl_style_get_name(v->style));
    7171}
    7272
    73 owl_message *owl_view_get_element(owl_view *v, int index)
     73owl_message *owl_view_get_element(const owl_view *v, int index)
    7474{
    7575  return(owl_messagelist_get_element(&(v->ml), index));
     
    8686}
    8787
    88 int owl_view_get_size(owl_view *v)
     88int owl_view_get_size(const owl_view *v)
    8989{
    9090  return(owl_messagelist_get_size(&(v->ml)));
     
    9393/* Returns the position in the view with a message closest
    9494 * to the passed msgid. */
    95 int owl_view_get_nearest_to_msgid(owl_view *v, int targetid)
     95int owl_view_get_nearest_to_msgid(const owl_view *v, int targetid)
    9696{
    9797  int first, last, mid = 0, max, bestdist, curid = 0;
     
    122122}
    123123
    124 int owl_view_get_nearest_to_saved(owl_view *v)
     124int owl_view_get_nearest_to_saved(const owl_view *v)
    125125{
    126126  int cachedid;
     
    139139
    140140/* fmtext should already be initialized */
    141 void owl_view_to_fmtext(owl_view *v, owl_fmtext *fm)
     141void owl_view_to_fmtext(const owl_view *v, owl_fmtext *fm)
    142142{
    143143  owl_fmtext_append_normal(fm, "Name: ");
     
    154154}
    155155
    156 const char *owl_view_get_filtname(owl_view *v)
     156const char *owl_view_get_filtname(const owl_view *v)
    157157{
    158158  return(owl_filter_get_name(v->filter));
Note: See TracChangeset for help on using the changeset viewer.