Changeset e19eb97 for aim.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 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:
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
  • aim.c

    rfa4562c re19eb97  
    2626};
    2727
    28 static char *msgerrreasons[] = {
     28static const char *msgerrreasons[] = {
    2929        "Invalid error",
    3030        "Invalid SNAC",
     
    136136
    137137
    138 int owl_aim_login(char *screenname, char *password)
     138int owl_aim_login(const char *screenname, const char *password)
    139139{
    140140  struct owlfaim_priv *priv;
     
    209209
    210210/* stuff to run once login has been successful */
    211 void owl_aim_successful_login(char *screenname)
     211void owl_aim_successful_login(const char *screenname)
    212212{
    213213  char *buff;
     
    248248}
    249249
    250 void owl_aim_login_error(char *message)
     250void owl_aim_login_error(const char *message)
    251251{
    252252  if (message) {
     
    261261}
    262262
    263 int owl_aim_send_im(char *to, char *msg)
     263int owl_aim_send_im(const char *to, const char *msg)
    264264{
    265265  int ret;
     
    271271}
    272272
    273 int owl_aim_send_awaymsg(char *to, char *msg)
     273int owl_aim_send_awaymsg(const char *to, const char *msg)
    274274{
    275275  int ret;
     
    281281}
    282282
    283 void owl_aim_addbuddy(char *name)
     283void owl_aim_addbuddy(const char *name)
    284284{
    285285
     
    295295}
    296296
    297 void owl_aim_delbuddy(char *name)
     297void owl_aim_delbuddy(const char *name)
    298298{
    299299  aim_ssi_delbuddy(owl_global_get_aimsess(&g), name, "Buddies");
     
    301301}
    302302
    303 void owl_aim_search(char *email)
     303void owl_aim_search(const char *email)
    304304{
    305305  int ret;
     
    314314
    315315
    316 int owl_aim_set_awaymsg(char *msg)
     316int owl_aim_set_awaymsg(const char *msg)
    317317{
    318318  int len;
     
    341341}
    342342
    343 void owl_aim_chat_join(char *name, int exchange)
     343void owl_aim_chat_join(const char *name, int exchange)
    344344{
    345345  int ret;
     
    347347  /*
    348348  OscarData *od = g->proto_data;
    349   char *name, *exchange;
     349  const char *name, *exchange;
    350350  */
    351351
     
    392392}
    393393
    394 void owl_aim_chat_leave(char *chatroom)
    395 {
    396 }
    397 
    398 int owl_aim_chat_sendmsg(char *chatroom, char *msg)
     394void owl_aim_chat_leave(const char *chatroom)
     395{
     396}
     397
     398int owl_aim_chat_sendmsg(const char *chatroom, const char *msg)
    399399{
    400400  return(0);
     
    402402
    403403/* caller must free the return */
    404 char *owl_aim_normalize_screenname(char *in)
     404char *owl_aim_normalize_screenname(const char *in)
    405405{
    406406  char *out;
     
    482482  struct client_info_s info = CLIENTINFO_AIM_KNOWNGOOD;
    483483   
    484   char *key;
    485   va_list ap;
    486 
    487   va_start(ap, fr);
    488   key = va_arg(ap, char *);
     484  const char *key;
     485  va_list ap;
     486
     487  va_start(ap, fr);
     488  key = va_arg(ap, const char *);
    489489  va_end(ap);
    490490
     
    706706  va_list ap;
    707707  fu16_t code;
    708   char *msg;
     708  const char *msg;
    709709 
    710710  va_start(ap, fr);
    711711  code = va_arg(ap, int);
    712   msg = va_arg(ap, char *);
     712  msg = va_arg(ap, const char *);
    713713  va_end(ap);
    714714 
     
    740740  fu16_t change = 0, perms, type;
    741741  int length, str;
    742   char *val;
     742  const char *val;
    743743  va_list ap;
    744744 
     
    748748  type = (fu16_t)va_arg(ap, unsigned int);
    749749  length = va_arg(ap, int);
    750   val = va_arg(ap, char *);
     750  val = va_arg(ap, const char *);
    751751  str = va_arg(ap, int);
    752752  va_end(ap);
     
    900900static int faimtest_parse_motd(aim_session_t *sess, aim_frame_t *fr, ...)
    901901{
    902   char *msg;
     902  const char *msg;
    903903  fu16_t id;
    904904  va_list ap;
    905905  static int codeslen = 5;
    906   static char *codes[] = {
     906  static const char *codes[] = {
    907907    "Unknown",
    908908    "Mandatory upgrade",
     
    914914  va_start(ap, fr);
    915915  id = va_arg(ap, int);
    916   msg = va_arg(ap, char *);
     916  msg = va_arg(ap, const char *);
    917917  va_end(ap);
    918918
     
    10721072  va_list ap;
    10731073  fu32_t offset, len;
    1074   char *modname;
     1074  const char *modname;
    10751075  unsigned char *buf;
    10761076  int buflen;
     
    10791079  offset = va_arg(ap, fu32_t);
    10801080  len = va_arg(ap, fu32_t);
    1081   modname = va_arg(ap, char *);
     1081  modname = va_arg(ap, const char *);
    10821082  va_end(ap);
    10831083 
     
    11121112{
    11131113  aim_userinfo_t *userinfo;
    1114   char *prof_encoding = NULL;
    1115   char *prof = NULL;
     1114  const char *prof_encoding = NULL;
     1115  const char *prof = NULL;
    11161116  fu16_t inforeq = 0;
    11171117  owl_buddy *b;
     
    11201120  userinfo = va_arg(ap, aim_userinfo_t *);
    11211121  inforeq = (fu16_t)va_arg(ap, unsigned int);
    1122   prof_encoding = va_arg(ap, char *);
    1123   prof = va_arg(ap, char *);
     1122  prof_encoding = va_arg(ap, const char *);
     1123  prof = va_arg(ap, const char *);
    11241124  va_end(ap);
    11251125
     
    14971497{
    14981498  va_list ap;
    1499   char *destsn;
     1499  const char *destsn;
    15001500  fu16_t reason;
    15011501 
    15021502  va_start(ap, fr);
    15031503  reason = (fu16_t)va_arg(ap, unsigned int);
    1504   destsn = va_arg(ap, char *);
     1504  destsn = va_arg(ap, const char *);
    15051505  va_end(ap);
    15061506 
     
    15181518{
    15191519  va_list ap;
    1520   char *destsn;
     1520  const char *destsn;
    15211521  fu16_t reason;
    15221522 
    15231523  va_start(ap, fr);
    15241524  reason = (fu16_t)va_arg(ap, unsigned int);
    1525   destsn = va_arg(ap, char *);
     1525  destsn = va_arg(ap, const char *);
    15261526  va_end(ap);
    15271527 
     
    15341534static int faimtest_parse_misses(aim_session_t *sess, aim_frame_t *fr, ...)
    15351535{
    1536   static char *missedreasons[] = {
     1536  static const char *missedreasons[] = {
    15371537    "Invalid (0)",
    15381538    "Message too large",
     
    15661566  va_list ap;
    15671567  fu16_t type;
    1568   char *sn = NULL;
     1568  const char *sn = NULL;
    15691569 
    15701570  va_start(ap, fr);
    15711571  type = (fu16_t)va_arg(ap, unsigned int);
    1572   sn = va_arg(ap, char *);
     1572  sn = va_arg(ap, const char *);
    15731573  va_end(ap);
    15741574 
     
    15801580static int faimtest_parse_ratechange(aim_session_t *sess, aim_frame_t *fr, ...)
    15811581{
    1582   static char *codes[5] = {
     1582  static const char *codes[5] = {
    15831583    "invalid",
    15841584    "change",
     
    16561656{
    16571657  va_list ap;
    1658   char *address, *SNs;
     1658  const char *address, *SNs;
    16591659  int num, i;
    16601660  owl_list list;
    16611661 
    16621662  va_start(ap, fr);
    1663   address = va_arg(ap, char *);
     1663  address = va_arg(ap, const char *);
    16641664  num = va_arg(ap, int);
    1665   SNs = va_arg(ap, char *);
     1665  SNs = va_arg(ap, const char *);
    16661666  va_end(ap);
    16671667
     
    16811681{
    16821682  va_list ap;
    1683   char *address;
    1684  
    1685   va_start(ap, fr);
    1686   address = va_arg(ap, char *);
     1683  const char *address;
     1684 
     1685  va_start(ap, fr);
     1686  address = va_arg(ap, const char *);
    16871687  va_end(ap);
    16881688
     
    16961696{
    16971697  va_list ap;
    1698   char *msg, *url;
     1698  const char *msg, *url;
    16991699  fu16_t width, height, delay;
    17001700 
    17011701  va_start(ap, fr);
    1702   msg = va_arg(ap, char *);
    1703   url = va_arg(ap, char *);
     1702  msg = va_arg(ap, const char *);
     1703  url = va_arg(ap, const char *);
    17041704  width = va_arg(ap, unsigned int);
    17051705  height = va_arg(ap, unsigned int);
     
    17221722  va_list ap;
    17231723  aim_conn_t *bosconn;
    1724   char *bosip;
     1724  const char *bosip;
    17251725  fu8_t *cookie;
    17261726 
    17271727  va_start(ap, fr);
    1728   bosip = va_arg(ap, char *);
     1728  bosip = va_arg(ap, const char *);
    17291729  cookie = va_arg(ap, fu8_t *);
    17301730  va_end(ap);
     
    18731873  aim_userinfo_t *userinfo;
    18741874  struct aim_chat_roominfo *roominfo;
    1875   char *roomname;
     1875  const char *roomname;
    18761876  int usercount;
    1877   char *roomdesc;
     1877  const char *roomdesc;
    18781878  fu16_t flags, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen;
    18791879  fu32_t creationtime;
     
    18851885  va_start(ap, fr);
    18861886  roominfo = va_arg(ap, struct aim_chat_roominfo *);
    1887   roomname = va_arg(ap, char *);
     1887  roomname = va_arg(ap, const char *);
    18881888  usercount = va_arg(ap, int);
    18891889  userinfo = va_arg(ap, aim_userinfo_t *);
    1890   roomdesc = va_arg(ap, char *);
     1890  roomdesc = va_arg(ap, const char *);
    18911891  flags = (fu16_t)va_arg(ap, unsigned int);
    18921892  creationtime = va_arg(ap, fu32_t);
     
    19281928  va_list ap;
    19291929  aim_userinfo_t *userinfo;
    1930   char *msg;
     1930  const char *msg;
    19311931  char tmpbuf[1152];
    19321932 
    19331933  va_start(ap, fr);
    19341934  userinfo = va_arg(ap, aim_userinfo_t *);     
    1935   msg = va_arg(ap, char *);
     1935  msg = va_arg(ap, const char *);
    19361936  va_end(ap);
    19371937
Note: See TracChangeset for help on using the changeset viewer.