Index: commands.c
===================================================================
--- commands.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ commands.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -2014,5 +2014,5 @@
   } else if (argc==2 && !strcmp(argv[1], "zaway")) {
     const owl_message *m;
-    owl_view    *v;
+    const owl_view    *v;
     v = owl_global_get_current_view(&g);    
     m = owl_view_get_element(v, owl_global_get_curmsg(&g));
@@ -2587,5 +2587,5 @@
 {
   owl_message *m;
-  owl_view *v;
+  const owl_view *v;
   const char *cmd;
 
@@ -2621,5 +2621,5 @@
 {
   owl_message *m;
-  owl_view *v;
+  const owl_view *v;
   const char *cmd;
 
Index: functions.c
===================================================================
--- functions.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ functions.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -62,5 +62,5 @@
 void owl_function_show_view(const char *viewname)
 {
-  owl_view *v;
+  const owl_view *v;
   owl_fmtext fm;
 
@@ -593,5 +593,5 @@
 {
   int curmsg, i, viewsize, found;
-  owl_view *v;
+  const owl_view *v;
   const owl_filter *f = NULL;
   const owl_message *m;
@@ -646,5 +646,5 @@
 {
   int curmsg, i, viewsize, found;
-  owl_view *v;
+  const owl_view *v;
   const owl_filter *f = NULL;
   const owl_message *m;
@@ -818,5 +818,5 @@
 {
   int oldcurmsg, curmsg;
-  owl_view *v;
+  const owl_view *v;
 
   v=owl_global_get_current_view(&g);
@@ -1041,5 +1041,5 @@
 {
   int recwinlines, topmsg, curmsg;
-  owl_view *v;
+  const owl_view *v;
 
   v=owl_global_get_current_view(&g);
@@ -1085,10 +1085,10 @@
  * and the number of lines in the recwin.
  */
-int owl_function_calculate_topmsg_top(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
+int owl_function_calculate_topmsg_top(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
 {
   return(curmsg);
 }
 
-int owl_function_calculate_topmsg_neartop(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
+int owl_function_calculate_topmsg_neartop(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
 {
   if (curmsg>0 
@@ -1101,5 +1101,5 @@
 }
   
-int owl_function_calculate_topmsg_center(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
+int owl_function_calculate_topmsg_center(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
 {
   int i, last, lines;
@@ -1115,5 +1115,5 @@
 }
   
-int owl_function_calculate_topmsg_paged(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)
+int owl_function_calculate_topmsg_paged(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)
 {
   int i, last, lines, savey;
@@ -1155,5 +1155,5 @@
 }
 
-int owl_function_calculate_topmsg_normal(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)
+int owl_function_calculate_topmsg_normal(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines)
 {
   int savey, i, foo, y;
@@ -1413,5 +1413,5 @@
   const owl_message *m;
   owl_fmtext fm, attrfm;
-  owl_view *v;
+  const owl_view *v;
 #ifdef HAVE_LIBZEPHYR
   const ZNotice_t *n;
@@ -1546,5 +1546,5 @@
 void owl_function_curmsg_to_popwin()
 {
-  owl_view *v;
+  const owl_view *v;
   const owl_message *m;
   const owl_style *s;
@@ -1573,5 +1573,5 @@
 
   int offset, curmsg, lines;
-  owl_view *v;
+  const owl_view *v;
   owl_message *m;
 
@@ -1751,5 +1751,5 @@
   int i, j, count;
   owl_message *m;
-  owl_view *v;
+  const owl_view *v;
   const owl_filter *f;
 
@@ -2155,5 +2155,5 @@
 {
   owl_filter *f;
-  owl_view *v;
+  const owl_view *v;
   int ret, inuse=0;
 
@@ -2545,5 +2545,5 @@
 void owl_function_delete_curview_msgs(int flag)
 {
-  owl_view *v;
+  const owl_view *v;
   int i, j;
 
@@ -2579,5 +2579,5 @@
 char *owl_function_smartfilter(int type)
 {
-  owl_view *v;
+  const owl_view *v;
   const owl_message *m;
   char *zperson, *filtname=NULL;
@@ -2651,5 +2651,5 @@
   /* Starts a zpunt command based on the current class,instance pair. 
    * If type=0, uses just class.  If type=1, uses instance as well. */
-  owl_view *v;
+  const owl_view *v;
   const owl_message *m;
   const char *cmdprefix, *mclass, *minst;
@@ -2998,5 +2998,5 @@
    */
 
-  owl_view *v;
+  const owl_view *v;
   int viewsize, i, curmsg, start;
   owl_message *m;
@@ -3193,5 +3193,5 @@
   int i, j, count;
   owl_message *m;
-  owl_view *v;
+  const owl_view *v;
   FILE *file;
   char *plaintext;
@@ -3576,5 +3576,5 @@
 {
   const owl_message *m;
-  owl_view *v;
+  const owl_view *v;
 
   v=owl_global_get_current_view(&g);
@@ -3596,5 +3596,5 @@
   int marked_id;
   const owl_message *m;
-  owl_view *v;
+  const owl_view *v;
 
   marked_id=owl_global_get_markedmsgid(&g);
Index: global.c
===================================================================
--- global.c	(revision 89b2daf7d22d93c2bb63d2f78e2e0afb608fe732)
+++ global.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -697,5 +697,5 @@
 
 int owl_global_should_followlast(owl_global *g) {
-  owl_view *v;
+  const owl_view *v;
   
   if (!owl_global_is__followlast(g)) return(0);
Index: mainwin.c
===================================================================
--- mainwin.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ mainwin.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -14,5 +14,5 @@
   int topmsg, curmsg, fgcolor, bgcolor;
   WINDOW *recwin;
-  owl_view *v;
+  const owl_view *v;
   const owl_list *filtlist;
   const owl_filter *f;
Index: message.c
===================================================================
--- message.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ message.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -146,5 +146,5 @@
 {
   const owl_style *s;
-  owl_view *v;
+  const owl_view *v;
 
   if (!m->fmtext) {
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision 4542047a899dadba958a360ac1cb146c7b5a41dd)
+++ perlconfig.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -115,5 +115,5 @@
 {
   int curmsg;
-  owl_view *v;
+  const owl_view *v;
   v=owl_global_get_current_view(&g);
   if (owl_view_get_size(v) < 1) {
Index: util.c
===================================================================
--- util.c	(revision 3eb599d4e501b791fddcf669422a37133f60d453)
+++ util.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -11,5 +11,5 @@
   WINDOW *sepwin;
   const owl_messagelist *ml;
-  owl_view *v;
+  const owl_view *v;
   int x, y, i;
   const char *foo, *appendtosepbar;
Index: view.c
===================================================================
--- view.c	(revision 3eb599d4e501b791fddcf669422a37133f60d453)
+++ view.c	(revision 9e5c9f3896b2bcb356b0ca00fbab6361fd85e7c5)
@@ -11,5 +11,5 @@
 }
 
-const char *owl_view_get_name(owl_view *v)
+const char *owl_view_get_name(const owl_view *v)
 {
   return(v->name);
@@ -62,14 +62,14 @@
 }
 
-const owl_style *owl_view_get_style(owl_view *v)
+const owl_style *owl_view_get_style(const owl_view *v)
 {
   return(v->style);
 }
 
-const char *owl_view_get_style_name(owl_view *v) {
+const char *owl_view_get_style_name(const owl_view *v) {
   return(owl_style_get_name(v->style));
 }
 
-owl_message *owl_view_get_element(owl_view *v, int index)
+owl_message *owl_view_get_element(const owl_view *v, int index)
 {
   return(owl_messagelist_get_element(&(v->ml), index));
@@ -86,5 +86,5 @@
 }
 
-int owl_view_get_size(owl_view *v)
+int owl_view_get_size(const owl_view *v)
 {
   return(owl_messagelist_get_size(&(v->ml)));
@@ -93,5 +93,5 @@
 /* Returns the position in the view with a message closest 
  * to the passed msgid. */
-int owl_view_get_nearest_to_msgid(owl_view *v, int targetid)
+int owl_view_get_nearest_to_msgid(const owl_view *v, int targetid)
 {
   int first, last, mid = 0, max, bestdist, curid = 0;
@@ -122,5 +122,5 @@
 }
 
-int owl_view_get_nearest_to_saved(owl_view *v)
+int owl_view_get_nearest_to_saved(const owl_view *v)
 {
   int cachedid;
@@ -139,5 +139,5 @@
 
 /* fmtext should already be initialized */
-void owl_view_to_fmtext(owl_view *v, owl_fmtext *fm)
+void owl_view_to_fmtext(const owl_view *v, owl_fmtext *fm)
 {
   owl_fmtext_append_normal(fm, "Name: ");
@@ -154,5 +154,5 @@
 }
 
-const char *owl_view_get_filtname(owl_view *v)
+const char *owl_view_get_filtname(const owl_view *v)
 {
   return(owl_filter_get_name(v->filter));
