Index: aim.c
===================================================================
--- aim.c	(revision 5227de4e6d37d96c92f1ab61cbf87c886f8f2b6f)
+++ aim.c	(revision e19eb97bacd75cf02905ec2b7a6a73b9642b907a)
@@ -26,5 +26,5 @@
 };
 
-static char *msgerrreasons[] = {
+static const char *msgerrreasons[] = {
 	"Invalid error",
 	"Invalid SNAC",
@@ -136,5 +136,5 @@
 
 
-int owl_aim_login(char *screenname, char *password)
+int owl_aim_login(const char *screenname, const char *password)
 {
   struct owlfaim_priv *priv;
@@ -209,5 +209,5 @@
 
 /* stuff to run once login has been successful */
-void owl_aim_successful_login(char *screenname)
+void owl_aim_successful_login(const char *screenname)
 {
   char *buff;
@@ -248,5 +248,5 @@
 }
 
-void owl_aim_login_error(char *message)
+void owl_aim_login_error(const char *message)
 {
   if (message) {
@@ -261,5 +261,5 @@
 }
 
-int owl_aim_send_im(char *to, char *msg)
+int owl_aim_send_im(const char *to, const char *msg)
 {
   int ret;
@@ -271,5 +271,5 @@
 }
 
-int owl_aim_send_awaymsg(char *to, char *msg)
+int owl_aim_send_awaymsg(const char *to, const char *msg)
 {
   int ret;
@@ -281,5 +281,5 @@
 }
 
-void owl_aim_addbuddy(char *name)
+void owl_aim_addbuddy(const char *name)
 {
 
@@ -295,5 +295,5 @@
 }
 
-void owl_aim_delbuddy(char *name)
+void owl_aim_delbuddy(const char *name)
 {
   aim_ssi_delbuddy(owl_global_get_aimsess(&g), name, "Buddies");
@@ -301,5 +301,5 @@
 }
 
-void owl_aim_search(char *email)
+void owl_aim_search(const char *email)
 {
   int ret;
@@ -314,5 +314,5 @@
 
 
-int owl_aim_set_awaymsg(char *msg)
+int owl_aim_set_awaymsg(const char *msg)
 {
   int len;
@@ -341,5 +341,5 @@
 }
 
-void owl_aim_chat_join(char *name, int exchange)
+void owl_aim_chat_join(const char *name, int exchange)
 {
   int ret;
@@ -347,5 +347,5 @@
   /*
   OscarData *od = g->proto_data;
-  char *name, *exchange;
+  const char *name, *exchange;
   */
 
@@ -392,9 +392,9 @@
 }
 
-void owl_aim_chat_leave(char *chatroom)
-{
-}
-
-int owl_aim_chat_sendmsg(char *chatroom, char *msg)
+void owl_aim_chat_leave(const char *chatroom)
+{
+}
+
+int owl_aim_chat_sendmsg(const char *chatroom, const char *msg)
 {
   return(0);
@@ -402,5 +402,5 @@
 
 /* caller must free the return */
-char *owl_aim_normalize_screenname(char *in)
+char *owl_aim_normalize_screenname(const char *in)
 {
   char *out;
@@ -482,9 +482,9 @@
   struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD;
     
-  char *key;
-  va_list ap;
-
-  va_start(ap, fr);
-  key = va_arg(ap, char *);
+  const char *key;
+  va_list ap;
+
+  va_start(ap, fr);
+  key = va_arg(ap, const char *);
   va_end(ap);
 
@@ -706,9 +706,9 @@
   va_list ap;
   fu16_t code;
-  char *msg;
+  const char *msg;
   
   va_start(ap, fr);
   code = va_arg(ap, int);
-  msg = va_arg(ap, char *);
+  msg = va_arg(ap, const char *);
   va_end(ap);
   
@@ -740,5 +740,5 @@
   fu16_t change = 0, perms, type;
   int length, str;
-  char *val;
+  const char *val;
   va_list ap;
   
@@ -748,5 +748,5 @@
   type = (fu16_t)va_arg(ap, unsigned int);
   length = va_arg(ap, int);
-  val = va_arg(ap, char *);
+  val = va_arg(ap, const char *);
   str = va_arg(ap, int);
   va_end(ap);
@@ -900,9 +900,9 @@
 static int faimtest_parse_motd(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  char *msg;
+  const char *msg;
   fu16_t id;
   va_list ap;
   static int codeslen = 5;
-  static char *codes[] = {
+  static const char *codes[] = {
     "Unknown",
     "Mandatory upgrade",
@@ -914,5 +914,5 @@
   va_start(ap, fr);
   id = va_arg(ap, int);
-  msg = va_arg(ap, char *);
+  msg = va_arg(ap, const char *);
   va_end(ap);
 
@@ -1072,5 +1072,5 @@
   va_list ap;
   fu32_t offset, len;
-  char *modname;
+  const char *modname;
   unsigned char *buf;
   int buflen;
@@ -1079,5 +1079,5 @@
   offset = va_arg(ap, fu32_t);
   len = va_arg(ap, fu32_t);
-  modname = va_arg(ap, char *);
+  modname = va_arg(ap, const char *);
   va_end(ap);
   
@@ -1112,6 +1112,6 @@
 {
   aim_userinfo_t *userinfo;
-  char *prof_encoding = NULL;
-  char *prof = NULL;
+  const char *prof_encoding = NULL;
+  const char *prof = NULL;
   fu16_t inforeq = 0;
   owl_buddy *b;
@@ -1120,6 +1120,6 @@
   userinfo = va_arg(ap, aim_userinfo_t *);
   inforeq = (fu16_t)va_arg(ap, unsigned int);
-  prof_encoding = va_arg(ap, char *);
-  prof = va_arg(ap, char *);
+  prof_encoding = va_arg(ap, const char *);
+  prof = va_arg(ap, const char *);
   va_end(ap);
 
@@ -1497,10 +1497,10 @@
 {
   va_list ap;
-  char *destsn;
+  const char *destsn;
   fu16_t reason;
   
   va_start(ap, fr);
   reason = (fu16_t)va_arg(ap, unsigned int);
-  destsn = va_arg(ap, char *);
+  destsn = va_arg(ap, const char *);
   va_end(ap);
   
@@ -1518,10 +1518,10 @@
 {
   va_list ap;
-  char *destsn;
+  const char *destsn;
   fu16_t reason;
   
   va_start(ap, fr);
   reason = (fu16_t)va_arg(ap, unsigned int);
-  destsn = va_arg(ap, char *);
+  destsn = va_arg(ap, const char *);
   va_end(ap);
   
@@ -1534,5 +1534,5 @@
 static int faimtest_parse_misses(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  static char *missedreasons[] = {
+  static const char *missedreasons[] = {
     "Invalid (0)",
     "Message too large",
@@ -1566,9 +1566,9 @@
   va_list ap;
   fu16_t type;
-  char *sn = NULL;
+  const char *sn = NULL;
   
   va_start(ap, fr);
   type = (fu16_t)va_arg(ap, unsigned int);
-  sn = va_arg(ap, char *);
+  sn = va_arg(ap, const char *);
   va_end(ap);
   
@@ -1580,5 +1580,5 @@
 static int faimtest_parse_ratechange(aim_session_t *sess, aim_frame_t *fr, ...)
 {
-  static char *codes[5] = {
+  static const char *codes[5] = {
     "invalid",
     "change",
@@ -1656,12 +1656,12 @@
 {
   va_list ap;
-  char *address, *SNs;
+  const char *address, *SNs;
   int num, i;
   owl_list list;
   
   va_start(ap, fr);
-  address = va_arg(ap, char *);
+  address = va_arg(ap, const char *);
   num = va_arg(ap, int);
-  SNs = va_arg(ap, char *);
+  SNs = va_arg(ap, const char *);
   va_end(ap);
 
@@ -1671,5 +1671,5 @@
   for (i=0; i<num; i++) {
     owl_function_debugmsg("  %s", &SNs[i*(MAXSNLEN+1)]);
-    owl_list_append_element(&list, &SNs[i*(MAXSNLEN+1)]);
+    owl_list_append_element(&list, (void *)&SNs[i*(MAXSNLEN+1)]);
   }
   owl_function_aimsearch_results(address, &list);
@@ -1681,8 +1681,8 @@
 {
   va_list ap;
-  char *address;
-  
-  va_start(ap, fr);
-  address = va_arg(ap, char *);
+  const char *address;
+  
+  va_start(ap, fr);
+  address = va_arg(ap, const char *);
   va_end(ap);
 
@@ -1696,10 +1696,10 @@
 {
   va_list ap;
-  char *msg, *url;
+  const char *msg, *url;
   fu16_t width, height, delay;
   
   va_start(ap, fr);
-  msg = va_arg(ap, char *);
-  url = va_arg(ap, char *);
+  msg = va_arg(ap, const char *);
+  url = va_arg(ap, const char *);
   width = va_arg(ap, unsigned int);
   height = va_arg(ap, unsigned int);
@@ -1722,9 +1722,9 @@
   va_list ap;
   aim_conn_t *bosconn;
-  char *bosip;
+  const char *bosip;
   fu8_t *cookie;
   
   va_start(ap, fr);
-  bosip = va_arg(ap, char *);
+  bosip = va_arg(ap, const char *);
   cookie = va_arg(ap, fu8_t *);
   va_end(ap);
@@ -1873,7 +1873,7 @@
   aim_userinfo_t *userinfo;
   struct aim_chat_roominfo *roominfo;
-  char *roomname;
+  const char *roomname;
   int usercount;
-  char *roomdesc;
+  const char *roomdesc;
   fu16_t flags, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen;
   fu32_t creationtime;
@@ -1885,8 +1885,8 @@
   va_start(ap, fr);
   roominfo = va_arg(ap, struct aim_chat_roominfo *);
-  roomname = va_arg(ap, char *);
+  roomname = va_arg(ap, const char *);
   usercount = va_arg(ap, int);
   userinfo = va_arg(ap, aim_userinfo_t *);
-  roomdesc = va_arg(ap, char *);
+  roomdesc = va_arg(ap, const char *);
   flags = (fu16_t)va_arg(ap, unsigned int);
   creationtime = va_arg(ap, fu32_t);
@@ -1928,10 +1928,10 @@
   va_list ap;
   aim_userinfo_t *userinfo;
-  char *msg;
+  const char *msg;
   char tmpbuf[1152];
   
   va_start(ap, fr);
   userinfo = va_arg(ap, aim_userinfo_t *);	
-  msg = va_arg(ap, char *);
+  msg = va_arg(ap, const char *);
   va_end(ap);
 
