Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rfea7992 r35b3518  
    1313#include "owl.h"
    1414
    15 char *owl_function_command(char *cmdbuff)
     15char *owl_function_command(const char *cmdbuff)
    1616{
    1717  owl_function_debugmsg("executing command: %s", cmdbuff);
     
    2020}
    2121
    22 char *owl_function_command_argv(char **argv, int argc)
     22char *owl_function_command_argv(const char *const *argv, int argc)
    2323{
    2424  return owl_cmddict_execute_argv(owl_global_get_cmddict(&g),
     
    2727}
    2828
    29 void owl_function_command_norv(char *cmdbuff)
     29void owl_function_command_norv(const char *cmdbuff)
    3030{
    3131  char *rv;
     
    3434}
    3535
    36 void owl_function_command_alias(char *alias_from, char *alias_to)
     36void owl_function_command_alias(const char *alias_from, const char *alias_to)
    3737{
    3838  owl_cmddict_add_alias(owl_global_get_cmddict(&g), alias_from, alias_to);
    3939}
    4040
    41 owl_cmd *owl_function_get_cmd(char *name)
     41const owl_cmd *owl_function_get_cmd(const char *name)
    4242{
    4343  return owl_cmddict_find(owl_global_get_cmddict(&g), name);
     
    6060}
    6161
    62 void owl_function_show_view(char *viewname)
    63 {
    64   owl_view *v;
     62void owl_function_show_view(const char *viewname)
     63{
     64  const owl_view *v;
    6565  owl_fmtext fm;
    6666
     
    9292}
    9393
    94 char *owl_function_style_describe(char *name) {
    95   char *desc, *s;
    96   owl_style *style;
     94char *owl_function_style_describe(const char *name) {
     95  const char *desc;
     96  char *s;
     97  const owl_style *style;
    9798  style = owl_global_get_style_by_name(&g, name);
    9899  if (style) {
     
    107108}
    108109
    109 char *owl_function_cmd_describe(char *name)
    110 {
    111   owl_cmd *cmd = owl_cmddict_find(owl_global_get_cmddict(&g), name);
     110char *owl_function_cmd_describe(const char *name)
     111{
     112  const owl_cmd *cmd = owl_cmddict_find(owl_global_get_cmddict(&g), name);
    112113  if (cmd) return owl_cmd_describe(cmd);
    113114  else return(NULL);
    114115}
    115116
    116 void owl_function_show_command(char *name)
     117void owl_function_show_command(const char *name)
    117118{
    118119  owl_function_help_for_command(name);
     
    121122void owl_function_show_license()
    122123{
    123   char *text;
     124  const char *text;
    124125
    125126  text=""
     
    167168void owl_function_show_quickstart()
    168169{
    169     char *message =
     170    const char *message =
    170171    "Move between messages with the arrow keys, and press 'r' to reply.\n"
    171172    "For more info, press 'h' or visit http://barnowl.mit.edu/\n\n"
     
    198199 * and redisplay if necessary.
    199200 */
    200 void owl_function_adminmsg(char *header, char *body)
     201void owl_function_adminmsg(const char *header, const char *body)
    201202{
    202203  owl_message *m;
     
    225226 * that.
    226227 */
    227 owl_message *owl_function_make_outgoing_zephyr(char *body, char *zwriteline, char *zsig)
     228owl_message *owl_function_make_outgoing_zephyr(const char *body, const char *zwriteline, const char *zsig)
    228229{
    229230  owl_message *m;
     
    246247 * owl_global_messagequeue_addmsg() for that .
    247248 */
    248 owl_message *owl_function_make_outgoing_aim(char *body, char *to)
     249owl_message *owl_function_make_outgoing_aim(const char *body, const char *to)
    249250{
    250251  owl_message *m;
     
    267268 * owl_global_messagequeue_addmsg() for that.
    268269 */
    269 owl_message *owl_function_make_outgoing_loopback(char *body)
     270owl_message *owl_function_make_outgoing_loopback(const char *body)
    270271{
    271272  owl_message *m;
     
    279280}
    280281
    281 void owl_function_zwrite_setup(char *line)
     282void owl_function_zwrite_setup(const char *line)
    282283{
    283284  owl_editwin *e;
     
    324325}
    325326
    326 void owl_function_aimwrite_setup(char *line)
     327void owl_function_aimwrite_setup(const char *line)
    327328{
    328329  owl_editwin *e;
     
    388389 * the message is expected to be set from the zwrite line itself
    389390 */
    390 void owl_function_zwrite(char *line, char *msg)
     391void owl_function_zwrite(const char *line, const char *msg)
    391392{
    392393  owl_zwrite z;
    393   char *mymsg;
     394  const char *mymsg;
    394395  owl_message *m;
    395396
     
    428429 * the message is expected to be set from the zwrite line itself
    429430 */
    430 void owl_function_zcrypt(char *line, char *msg)
     431void owl_function_zcrypt(const char *line, const char *msg)
    431432{
    432433  owl_zwrite z;
    433   char *mymsg;
     434  const char *mymsg;
    434435  char *cryptmsg;
    435436  owl_message *m;
     
    497498}
    498499
    499 void owl_function_aimwrite(char *line, char *msg)
     500void owl_function_aimwrite(const char *line, const char *msg)
    500501{
    501502  int ret;
    502   char *to, *format_msg;
     503  const char *to;
     504  char *format_msg;
    503505  owl_message *m;
    504506
     
    529531}
    530532
    531 void owl_function_send_aimawymsg(char *to, char *msg)
     533void owl_function_send_aimawymsg(const char *to, const char *msg)
    532534{
    533535  int ret;
     
    561563}
    562564
    563 void owl_function_loopwrite(char *msg)
     565void owl_function_loopwrite(const char *msg)
    564566{
    565567  owl_message *min, *mout;
     
    588590 * If last_if_none, will stop at the last message in the view
    589591 * if no matching messages are found.  */
    590 void owl_function_nextmsg_full(char *filter, int skip_deleted, int last_if_none)
     592void owl_function_nextmsg_full(const char *filter, int skip_deleted, int last_if_none)
    591593{
    592594  int curmsg, i, viewsize, found;
    593   owl_view *v;
    594   owl_filter *f = NULL;
    595   owl_message *m;
     595  const owl_view *v;
     596  const owl_filter *f = NULL;
     597  const owl_message *m;
    596598
    597599  v=owl_global_get_current_view(&g);
     
    641643}
    642644
    643 void owl_function_prevmsg_full(char *filter, int skip_deleted, int first_if_none)
     645void owl_function_prevmsg_full(const char *filter, int skip_deleted, int first_if_none)
    644646{
    645647  int curmsg, i, viewsize, found;
    646   owl_view *v;
    647   owl_filter *f = NULL;
    648   owl_message *m;
     648  const owl_view *v;
     649  const owl_filter *f = NULL;
     650  const owl_message *m;
    649651
    650652  v=owl_global_get_current_view(&g);
     
    772774{
    773775  int curmsg;
    774   owl_message *m;
     776  const owl_message *m;
    775777  owl_messagelist *ml;
    776778  owl_view *v;
     
    816818{
    817819  int oldcurmsg, curmsg;
    818   owl_view *v;
     820  const owl_view *v;
    819821
    820822  v=owl_global_get_current_view(&g);
     
    879881 * only, no error message is printed.
    880882 */
    881 void owl_function_loadsubs(char *file)
     883void owl_function_loadsubs(const char *file)
    882884{
    883885  int ret, ret2;
    884   char *foo, *path;
     886  const char *foo;
     887  char *path;
    885888
    886889  if (file==NULL) {
     
    911914}
    912915
    913 void owl_function_loadloginsubs(char *file)
     916void owl_function_loadloginsubs(const char *file)
    914917{
    915918  int ret;
     
    931934}
    932935
    933 void owl_function_aimlogin(char *user, char *passwd) {
     936void owl_function_aimlogin(const char *user, const char *passwd) {
    934937  int ret;
    935938
     
    10381041{
    10391042  int recwinlines, topmsg, curmsg;
    1040   owl_view *v;
     1043  const owl_view *v;
    10411044
    10421045  v=owl_global_get_current_view(&g);
     
    10821085 * and the number of lines in the recwin.
    10831086 */
    1084 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)
    10851088{
    10861089  return(curmsg);
    10871090}
    10881091
    1089 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)
    10901093{
    10911094  if (curmsg>0
     
    10981101}
    10991102 
    1100 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)
    11011104{
    11021105  int i, last, lines;
     
    11121115}
    11131116 
    1114 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)
    11151118{
    11161119  int i, last, lines, savey;
     
    11521155}
    11531156
    1154 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)
    11551158{
    11561159  int savey, i, foo, y;
     
    12331236}
    12341237
    1235 void owl_function_debugmsg(char *fmt, ...)
     1238void owl_function_debugmsg(const char *fmt, ...)
    12361239{
    12371240  FILE *file;
     
    12681271}
    12691272
    1270 int owl_function_subscribe(char *class, char *inst, char *recip)
     1273int owl_function_subscribe(const char *class, const char *inst, const char *recip)
    12711274{
    12721275  int ret;
     
    12811284}
    12821285
    1283 void owl_function_unsubscribe(char *class, char *inst, char *recip)
     1286void owl_function_unsubscribe(const char *class, const char *inst, const char *recip)
    12841287{
    12851288  int ret;
     
    13231326}
    13241327
    1325 void owl_function_popless_text(char *text)
     1328void owl_function_popless_text(const char *text)
    13261329{
    13271330  owl_popwin *pw;
     
    13401343}
    13411344
    1342 void owl_function_popless_fmtext(owl_fmtext *fm)
     1345void owl_function_popless_fmtext(const owl_fmtext *fm)
    13431346{
    13441347  owl_popwin *pw;
     
    13571360}
    13581361
    1359 void owl_function_popless_file(char *filename)
     1362void owl_function_popless_file(const char *filename)
    13601363{
    13611364  owl_fmtext fm;
     
    14081411void owl_function_info()
    14091412{
    1410   owl_message *m;
     1413  const owl_message *m;
    14111414  owl_fmtext fm, attrfm;
    1412   owl_view *v;
     1415  const owl_view *v;
    14131416#ifdef HAVE_LIBZEPHYR
    1414   ZNotice_t *n;
     1417  const ZNotice_t *n;
    14151418#endif
    14161419
     
    15431546void owl_function_curmsg_to_popwin()
    15441547{
    1545   owl_view *v;
    1546   owl_message *m;
    1547   owl_style *s;
     1548  const owl_view *v;
     1549  const owl_message *m;
     1550  const owl_style *s;
    15481551  owl_fmtext fm;
    15491552
     
    15701573
    15711574  int offset, curmsg, lines;
    1572   owl_view *v;
     1575  const owl_view *v;
    15731576  owl_message *m;
    15741577
     
    16621665void owl_function_printallvars()
    16631666{
    1664   char *name;
     1667  const char *name;
    16651668  char var[LINE];
    16661669  owl_list varnames;
     
    16921695  owl_fmtext fm; 
    16931696  int i, numvarnames;
    1694   char *varname;
     1697  const char *varname;
    16951698
    16961699  owl_fmtext_init_null(&fm);
     
    17101713}
    17111714
    1712 void owl_function_show_variable(char *name)
     1715void owl_function_show_variable(const char *name)
    17131716{
    17141717  owl_fmtext fm; 
     
    17241727void owl_function_delete_by_id(int id, int flag)
    17251728{
    1726   owl_messagelist *ml;
     1729  const owl_messagelist *ml;
    17271730  owl_message *m;
    17281731  ml = owl_global_get_msglist(&g);
     
    17481751  int i, j, count;
    17491752  owl_message *m;
    1750   owl_view *v;
    1751   owl_filter *f;
     1753  const owl_view *v;
     1754  const owl_filter *f;
    17521755
    17531756  /* get the trash filter */
     
    18831886{
    18841887  char *buff=NULL;
    1885   owl_message *m;
    1886   owl_filter *f;
     1888  const owl_message *m;
     1889  const owl_filter *f;
    18871890 
    18881891  if (owl_view_get_size(owl_global_get_current_view(&g))==0) {
     
    19361939}
    19371940
    1938 void owl_function_zlocate(int argc, char **argv, int auth)
     1941void owl_function_zlocate(int argc, const char *const *argv, int auth)
    19391942{
    19401943  owl_fmtext fm;
     
    19551958}
    19561959
    1957 void owl_function_start_command(char *line)
     1960void owl_function_start_command(const char *line)
    19581961{
    19591962  owl_editwin *tw;
     
    19741977}
    19751978
    1976 void owl_function_start_question(char *line)
     1979void owl_function_start_question(const char *line)
    19771980{
    19781981  owl_editwin *tw;
     
    19911994}
    19921995
    1993 void owl_function_start_password(char *line)
     1996void owl_function_start_password(const char *line)
    19941997{
    19951998  owl_editwin *tw;
     
    20092012}
    20102013
    2011 char *owl_function_exec(int argc, char **argv, char *buff, int type)
     2014char *owl_function_exec(int argc, const char *const *argv, const char *buff, int type)
    20122015{
    20132016  /* if type == 1 display in a popup
     
    20162019   * else display in a popup
    20172020   */
    2018   char *newbuff, *redirect = " 2>&1 < /dev/null";
     2021  const char *redirect = " 2>&1 < /dev/null";
     2022  char *newbuff;
    20192023  char *out, buff2[1024];
    20202024  int size;
     
    20632067}
    20642068
    2065 char *owl_function_perl(int argc, char **argv, char *buff, int type)
     2069char *owl_function_perl(int argc, const char *const *argv, const char *buff, int type)
    20662070{
    20672071  /* if type == 1 display in a popup
     
    21002104 * should have the pointer.
    21012105 */
    2102 void owl_function_change_currentview_filter(char *filtname)
     2106void owl_function_change_currentview_filter(const char *filtname)
    21032107{
    21042108  owl_view *v;
    21052109  owl_filter *f;
    21062110  int curid=-1, newpos, curmsg;
    2107   owl_message *curm=NULL;
     2111  const owl_message *curm=NULL;
    21082112
    21092113  v=owl_global_get_current_view(&g);
     
    21482152 * with a new definition.
    21492153 */
    2150 void owl_function_create_filter(int argc, char **argv)
     2154void owl_function_create_filter(int argc, const char *const *argv)
    21512155{
    21522156  owl_filter *f;
    2153   owl_view *v;
     2157  const owl_view *v;
    21542158  int ret, inuse=0;
    21552159
     
    22402244 * Returns the name of the negated filter, which the caller must free.
    22412245 */
    2242 char *owl_function_create_negative_filter(char *filtername)
     2246char *owl_function_create_negative_filter(const char *filtername)
    22432247{
    22442248  char *newname;
    2245   owl_filter *tmpfilt;
    2246   char *argv[5];
     2249  const owl_filter *tmpfilt;
     2250  const char *argv[5];
    22472251
    22482252  owl_function_debugmsg("owl_function_create_negative_filter");
     
    22702274void owl_function_show_filters()
    22712275{
    2272   owl_list *l;
    2273   owl_filter *f;
     2276  const owl_list *l;
     2277  const owl_filter *f;
    22742278  int i, j;
    22752279  owl_fmtext fm;
     
    22962300}
    22972301
    2298 void owl_function_show_filter(char *name)
    2299 {
    2300   owl_filter *f;
     2302void owl_function_show_filter(const char *name)
     2303{
     2304  const owl_filter *f;
    23012305  char *buff, *tmp;
    23022306
     
    23152319void owl_function_show_zpunts()
    23162320{
    2317   owl_filter *f;
    2318   owl_list *fl;
     2321  const owl_filter *f;
     2322  const owl_list *fl;
    23192323  char buff[5000];
    23202324  char *tmp;
     
    23442348 * name of the filter, which the caller must free.
    23452349 */
    2346 char *owl_function_classinstfilt(char *c, char *i)
     2350char *owl_function_classinstfilt(const char *c, const char *i)
    23472351{
    23482352  owl_filter *f;
     
    24222426 * the filter, which the caller must free.
    24232427 */
    2424 char *owl_function_zuserfilt(char *user)
     2428char *owl_function_zuserfilt(const char *user)
    24252429{
    24262430  owl_filter *f;
     
    24692473 * Returns the name of the filter, which the caller must free.
    24702474 */
    2471 char *owl_function_aimuserfilt(char *user)
     2475char *owl_function_aimuserfilt(const char *user)
    24722476{
    24732477  owl_filter *f;
     
    25052509}
    25062510
    2507 char *owl_function_typefilt(char *type)
     2511char *owl_function_typefilt(const char *type)
    25082512{
    25092513  owl_filter *f;
     
    25412545void owl_function_delete_curview_msgs(int flag)
    25422546{
    2543   owl_view *v;
     2547  const owl_view *v;
    25442548  int i, j;
    25452549
     
    25752579char *owl_function_smartfilter(int type)
    25762580{
    2577   owl_view *v;
    2578   owl_message *m;
     2581  const owl_view *v;
     2582  const owl_message *m;
    25792583  char *zperson, *filtname=NULL;
    2580   char *argv[1];
     2584  const char *argv[1];
    25812585 
    25822586  v=owl_global_get_current_view(&g);
     
    26472651  /* Starts a zpunt command based on the current class,instance pair.
    26482652   * If type=0, uses just class.  If type=1, uses instance as well. */
    2649   owl_view *v;
    2650   owl_message *m;
    2651   char *cmd, *cmdprefix, *mclass, *minst;
     2653  const owl_view *v;
     2654  const owl_message *m;
     2655  const char *cmdprefix, *mclass, *minst;
     2656  char *cmd;
    26522657 
    26532658  v=owl_global_get_current_view(&g);
     
    26972702 * be 'color'
    26982703 */
    2699 void owl_function_color_current_filter(char *fgcolor, char *bgcolor)
    2700 {
    2701   char *name;
     2704void owl_function_color_current_filter(const char *fgcolor, const char *bgcolor)
     2705{
     2706  const char *name;
    27022707
    27032708  name=owl_view_get_filtname(owl_global_get_current_view(&g));
     
    27092714 * the "all" filter, return -2.  Return 0 on success
    27102715 */
    2711 int owl_function_color_filter(char *filtname, char *fgcolor, char *bgcolor)
     2716int owl_function_color_filter(const char *filtname, const char *fgcolor, const char *bgcolor)
    27122717{
    27132718  owl_filter *f;
     
    27922797 *   if direction==1 then unpunt
    27932798 */
    2794 void owl_function_zpunt(char *class, char *inst, char *recip, int direction)
     2799void owl_function_zpunt(const char *class, const char *inst, const char *recip, int direction)
    27952800{
    27962801  char *puntexpr, *classexpr, *instexpr, *recipexpr;
     
    28392844}
    28402845
    2841 void owl_function_punt(char *filter, int direction)
     2846void owl_function_punt(const char *filter, int direction)
    28422847{
    28432848  owl_filter *f;
     
    28852890}
    28862891
    2887 void owl_function_activate_keymap(char *keymap)
     2892void owl_function_activate_keymap(const char *keymap)
    28882893{
    28892894  if (!owl_keyhandler_activate(owl_global_get_keyhandler(&g), keymap)) {
     
    28962901  owl_list l;
    28972902  owl_fmtext fm;
    2898   owl_keymap *km;
    2899   owl_keyhandler *kh;
     2903  const owl_keymap *km;
     2904  const owl_keyhandler *kh;
    29002905  int i, numkm;
    2901   char *kmname;
     2906  const char *kmname;
    29022907
    29032908  kh = owl_global_get_keyhandler(&g);
     
    29232928}
    29242929
    2925 char *owl_function_keymap_summary(char *name)
    2926 {
    2927   owl_keymap *km
     2930char *owl_function_keymap_summary(const char *name)
     2931{
     2932  const owl_keymap *km
    29282933    = owl_keyhandler_get_keymap(owl_global_get_keyhandler(&g), name);
    29292934  if (km) return owl_keymap_summary(km);
     
    29322937
    29332938/* TODO: implement for real */
    2934 void owl_function_show_keymap(char *name)
     2939void owl_function_show_keymap(const char *name)
    29352940{
    29362941  owl_fmtext fm;
    2937   owl_keymap *km;
     2942  const owl_keymap *km;
    29382943
    29392944  owl_fmtext_init_null(&fm);
     
    29482953}
    29492954
    2950 void owl_function_help_for_command(char *cmdname)
     2955void owl_function_help_for_command(const char *cmdname)
    29512956{
    29522957  owl_fmtext fm;
     
    29582963}
    29592964
    2960 void owl_function_search_start(char *string, int direction)
     2965void owl_function_search_start(const char *string, int direction)
    29612966{
    29622967  /* direction is OWL_DIRECTION_DOWNWARDS or OWL_DIRECTION_UPWARDS or
     
    29932998   */
    29942999
    2995   owl_view *v;
     3000  const owl_view *v;
    29963001  int viewsize, i, curmsg, start;
    29973002  owl_message *m;
     
    30543059/* strips formatting from ztext and returns the unformatted text.
    30553060 * caller is responsible for freeing. */
    3056 char *owl_function_ztext_stylestrip(char *zt)
     3061char *owl_function_ztext_stylestrip(const char *zt)
    30573062{
    30583063  owl_fmtext fm;
     
    30673072
    30683073/* Popup a buddylisting.  If filename is NULL use the default .anyone */
    3069 void owl_function_buddylist(int aim, int zephyr, char *filename)
     3074void owl_function_buddylist(int aim, int zephyr, const char *filename)
    30703075{
    30713076  int i, j, idle;
    30723077  int interrupted = 0;
    30733078  owl_fmtext fm;
    3074   owl_buddylist *bl;
    3075   owl_buddy *b;
     3079  const owl_buddylist *bl;
     3080  const owl_buddy *b;
    30763081  char *timestr;
    30773082#ifdef HAVE_LIBZEPHYR
    30783083  int x;
    30793084  owl_list anyone;
    3080   char *tmp, *user;
     3085  const char *user;
     3086  char *tmp;
    30813087  ZLocations_t location[200];
    30823088  int numlocs, ret;
     
    31263132        for (i=0; i<j; i++) {
    31273133          user=owl_list_get_element(&anyone, i);
    3128           ret=ZLocateUser(user, &numlocs, ZAUTH);
     3134          ret=ZLocateUser(zstr(user), &numlocs, ZAUTH);
    31293135
    31303136          owl_function_mask_sigint(NULL);
     
    31833189
    31843190/* Dump messages in the current view to the file 'filename'. */
    3185 void owl_function_dump(char *filename)
     3191void owl_function_dump(const char *filename)
    31863192{
    31873193  int i, j, count;
    31883194  owl_message *m;
    3189   owl_view *v;
     3195  const owl_view *v;
    31903196  FILE *file;
    31913197  char *plaintext;
     
    32933299 * startupfile.
    32943300 */
    3295 void owl_function_addstartup(char *buff)
     3301void owl_function_addstartup(const char *buff)
    32963302{
    32973303  FILE *file;
    3298   char *filename;
     3304  const char *filename;
    32993305
    33003306  filename=owl_global_get_startupfile(&g);
     
    33153321
    33163322/* Remove the specified command from the startup file. */
    3317 void owl_function_delstartup(char *buff)
    3318 {
    3319   char *filename;
     3323void owl_function_delstartup(const char *buff)
     3324{
     3325  const char *filename;
    33203326  filename=owl_global_get_startupfile(&g);
    33213327  owl_util_file_deleteline(filename, buff, 1);
     
    33253331 * is NULL, use the default owl startup commands file.
    33263332 */
    3327 void owl_function_source(char *filename)
     3333void owl_function_source(const char *filename)
    33283334{
    33293335  char *path;
     
    33543360}
    33553361
    3356 void owl_function_change_style(owl_view *v, char *stylename)
    3357 {
    3358   owl_style *s;
     3362void owl_function_change_style(owl_view *v, const char *stylename)
     3363{
     3364  const owl_style *s;
    33593365
    33603366  s=owl_global_get_style_by_name(&g, stylename);
     
    33723378{
    33733379  owl_view *v;
    3374   owl_style *s;
     3380  const owl_style *s;
    33753381
    33763382  v=owl_global_get_current_view(&g);
     
    33883394}
    33893395
    3390 void owl_function_error(char *fmt, ...)
     3396void owl_function_error(const char *fmt, ...)
    33913397{
    33923398  va_list ap;
    33933399  char *buff;
    3394   char *nl;
     3400  const char *nl;
    33953401
    33963402  va_start(ap, fmt);
     
    34103416}
    34113417
    3412 void owl_function_log_err(char *string)
     3418void owl_function_log_err(const char *string)
    34133419{
    34143420  char *date;
     
    34383444}
    34393445
    3440 void owl_function_makemsg(char *fmt, ...)
     3446void owl_function_makemsg(const char *fmt, ...)
    34413447{
    34423448  va_list ap;
     
    34683474  owl_message *m;
    34693475  owl_zbuddylist *zbl;
    3470   char *user;
     3476  const char *user;
    34713477  ZLocations_t location[200];
    34723478  int numlocs, ret;
     
    34803486  for (i=0; i<j; i++) {
    34813487    user=owl_list_get_element(&anyone, i);
    3482     ret=ZLocateUser(user, &numlocs, ZAUTH);
     3488    ret=ZLocateUser(zstr(user), &numlocs, ZAUTH);
    34833489    if (ret!=ZERR_NONE) {
    34843490      owl_function_error("Error getting location for %s", user);
     
    35193525}
    35203526
    3521 void owl_function_aimsearch_results(char *email, owl_list *namelist)
     3527void owl_function_aimsearch_results(const char *email, owl_list *namelist)
    35223528{
    35233529  owl_fmtext fm;
     
    35613567}
    35623568
    3563 void _owl_function_mark_message(owl_message *m)
     3569void _owl_function_mark_message(const owl_message *m)
    35643570{
    35653571  if (m)
     
    35693575void owl_function_mark_message()
    35703576{
    3571   owl_message *m;
    3572   owl_view *v;
     3577  const owl_message *m;
     3578  const owl_view *v;
    35733579
    35743580  v=owl_global_get_current_view(&g);
     
    35893595{
    35903596  int marked_id;
    3591   owl_message *m;
    3592   owl_view *v;
     3597  const owl_message *m;
     3598  const owl_view *v;
    35933599
    35943600  marked_id=owl_global_get_markedmsgid(&g);
Note: See TracChangeset for help on using the changeset viewer.