Changes in functions.c [fea7992:35b3518]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rfea7992 r35b3518 13 13 #include "owl.h" 14 14 15 char *owl_function_command(c har *cmdbuff)15 char *owl_function_command(const char *cmdbuff) 16 16 { 17 17 owl_function_debugmsg("executing command: %s", cmdbuff); … … 20 20 } 21 21 22 char *owl_function_command_argv(c har **argv, int argc)22 char *owl_function_command_argv(const char *const *argv, int argc) 23 23 { 24 24 return owl_cmddict_execute_argv(owl_global_get_cmddict(&g), … … 27 27 } 28 28 29 void owl_function_command_norv(c har *cmdbuff)29 void owl_function_command_norv(const char *cmdbuff) 30 30 { 31 31 char *rv; … … 34 34 } 35 35 36 void owl_function_command_alias(c har *alias_from,char *alias_to)36 void owl_function_command_alias(const char *alias_from, const char *alias_to) 37 37 { 38 38 owl_cmddict_add_alias(owl_global_get_cmddict(&g), alias_from, alias_to); 39 39 } 40 40 41 owl_cmd *owl_function_get_cmd(char *name)41 const owl_cmd *owl_function_get_cmd(const char *name) 42 42 { 43 43 return owl_cmddict_find(owl_global_get_cmddict(&g), name); … … 60 60 } 61 61 62 void owl_function_show_view(c har *viewname)63 { 64 owl_view *v;62 void owl_function_show_view(const char *viewname) 63 { 64 const owl_view *v; 65 65 owl_fmtext fm; 66 66 … … 92 92 } 93 93 94 char *owl_function_style_describe(char *name) { 95 char *desc, *s; 96 owl_style *style; 94 char *owl_function_style_describe(const char *name) { 95 const char *desc; 96 char *s; 97 const owl_style *style; 97 98 style = owl_global_get_style_by_name(&g, name); 98 99 if (style) { … … 107 108 } 108 109 109 char *owl_function_cmd_describe(c har *name)110 { 111 owl_cmd *cmd = owl_cmddict_find(owl_global_get_cmddict(&g), name);110 char *owl_function_cmd_describe(const char *name) 111 { 112 const owl_cmd *cmd = owl_cmddict_find(owl_global_get_cmddict(&g), name); 112 113 if (cmd) return owl_cmd_describe(cmd); 113 114 else return(NULL); 114 115 } 115 116 116 void owl_function_show_command(c har *name)117 void owl_function_show_command(const char *name) 117 118 { 118 119 owl_function_help_for_command(name); … … 121 122 void owl_function_show_license() 122 123 { 123 c har *text;124 const char *text; 124 125 125 126 text="" … … 167 168 void owl_function_show_quickstart() 168 169 { 169 c har *message =170 const char *message = 170 171 "Move between messages with the arrow keys, and press 'r' to reply.\n" 171 172 "For more info, press 'h' or visit http://barnowl.mit.edu/\n\n" … … 198 199 * and redisplay if necessary. 199 200 */ 200 void owl_function_adminmsg(c har *header,char *body)201 void owl_function_adminmsg(const char *header, const char *body) 201 202 { 202 203 owl_message *m; … … 225 226 * that. 226 227 */ 227 owl_message *owl_function_make_outgoing_zephyr(c har *body, char *zwriteline,char *zsig)228 owl_message *owl_function_make_outgoing_zephyr(const char *body, const char *zwriteline, const char *zsig) 228 229 { 229 230 owl_message *m; … … 246 247 * owl_global_messagequeue_addmsg() for that . 247 248 */ 248 owl_message *owl_function_make_outgoing_aim(c har *body,char *to)249 owl_message *owl_function_make_outgoing_aim(const char *body, const char *to) 249 250 { 250 251 owl_message *m; … … 267 268 * owl_global_messagequeue_addmsg() for that. 268 269 */ 269 owl_message *owl_function_make_outgoing_loopback(c har *body)270 owl_message *owl_function_make_outgoing_loopback(const char *body) 270 271 { 271 272 owl_message *m; … … 279 280 } 280 281 281 void owl_function_zwrite_setup(c har *line)282 void owl_function_zwrite_setup(const char *line) 282 283 { 283 284 owl_editwin *e; … … 324 325 } 325 326 326 void owl_function_aimwrite_setup(c har *line)327 void owl_function_aimwrite_setup(const char *line) 327 328 { 328 329 owl_editwin *e; … … 388 389 * the message is expected to be set from the zwrite line itself 389 390 */ 390 void owl_function_zwrite(c har *line,char *msg)391 void owl_function_zwrite(const char *line, const char *msg) 391 392 { 392 393 owl_zwrite z; 393 c har *mymsg;394 const char *mymsg; 394 395 owl_message *m; 395 396 … … 428 429 * the message is expected to be set from the zwrite line itself 429 430 */ 430 void owl_function_zcrypt(c har *line,char *msg)431 void owl_function_zcrypt(const char *line, const char *msg) 431 432 { 432 433 owl_zwrite z; 433 c har *mymsg;434 const char *mymsg; 434 435 char *cryptmsg; 435 436 owl_message *m; … … 497 498 } 498 499 499 void owl_function_aimwrite(c har *line,char *msg)500 void owl_function_aimwrite(const char *line, const char *msg) 500 501 { 501 502 int ret; 502 char *to, *format_msg; 503 const char *to; 504 char *format_msg; 503 505 owl_message *m; 504 506 … … 529 531 } 530 532 531 void owl_function_send_aimawymsg(c har *to,char *msg)533 void owl_function_send_aimawymsg(const char *to, const char *msg) 532 534 { 533 535 int ret; … … 561 563 } 562 564 563 void owl_function_loopwrite(c har *msg)565 void owl_function_loopwrite(const char *msg) 564 566 { 565 567 owl_message *min, *mout; … … 588 590 * If last_if_none, will stop at the last message in the view 589 591 * if no matching messages are found. */ 590 void owl_function_nextmsg_full(c har *filter, int skip_deleted, int last_if_none)592 void owl_function_nextmsg_full(const char *filter, int skip_deleted, int last_if_none) 591 593 { 592 594 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; 596 598 597 599 v=owl_global_get_current_view(&g); … … 641 643 } 642 644 643 void owl_function_prevmsg_full(c har *filter, int skip_deleted, int first_if_none)645 void owl_function_prevmsg_full(const char *filter, int skip_deleted, int first_if_none) 644 646 { 645 647 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; 649 651 650 652 v=owl_global_get_current_view(&g); … … 772 774 { 773 775 int curmsg; 774 owl_message *m;776 const owl_message *m; 775 777 owl_messagelist *ml; 776 778 owl_view *v; … … 816 818 { 817 819 int oldcurmsg, curmsg; 818 owl_view *v;820 const owl_view *v; 819 821 820 822 v=owl_global_get_current_view(&g); … … 879 881 * only, no error message is printed. 880 882 */ 881 void owl_function_loadsubs(c har *file)883 void owl_function_loadsubs(const char *file) 882 884 { 883 885 int ret, ret2; 884 char *foo, *path; 886 const char *foo; 887 char *path; 885 888 886 889 if (file==NULL) { … … 911 914 } 912 915 913 void owl_function_loadloginsubs(c har *file)916 void owl_function_loadloginsubs(const char *file) 914 917 { 915 918 int ret; … … 931 934 } 932 935 933 void owl_function_aimlogin(c har *user,char *passwd) {936 void owl_function_aimlogin(const char *user, const char *passwd) { 934 937 int ret; 935 938 … … 1038 1041 { 1039 1042 int recwinlines, topmsg, curmsg; 1040 owl_view *v;1043 const owl_view *v; 1041 1044 1042 1045 v=owl_global_get_current_view(&g); … … 1082 1085 * and the number of lines in the recwin. 1083 1086 */ 1084 int owl_function_calculate_topmsg_top(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)1087 int owl_function_calculate_topmsg_top(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines) 1085 1088 { 1086 1089 return(curmsg); 1087 1090 } 1088 1091 1089 int owl_function_calculate_topmsg_neartop(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)1092 int owl_function_calculate_topmsg_neartop(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines) 1090 1093 { 1091 1094 if (curmsg>0 … … 1098 1101 } 1099 1102 1100 int owl_function_calculate_topmsg_center(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)1103 int owl_function_calculate_topmsg_center(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines) 1101 1104 { 1102 1105 int i, last, lines; … … 1112 1115 } 1113 1116 1114 int owl_function_calculate_topmsg_paged(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page)1117 int owl_function_calculate_topmsg_paged(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines, int center_on_page) 1115 1118 { 1116 1119 int i, last, lines, savey; … … 1152 1155 } 1153 1156 1154 int owl_function_calculate_topmsg_normal(int direction, owl_view *v, int curmsg, int topmsg, int recwinlines)1157 int owl_function_calculate_topmsg_normal(int direction, const owl_view *v, int curmsg, int topmsg, int recwinlines) 1155 1158 { 1156 1159 int savey, i, foo, y; … … 1233 1236 } 1234 1237 1235 void owl_function_debugmsg(c har *fmt, ...)1238 void owl_function_debugmsg(const char *fmt, ...) 1236 1239 { 1237 1240 FILE *file; … … 1268 1271 } 1269 1272 1270 int owl_function_subscribe(c har *class, char *inst,char *recip)1273 int owl_function_subscribe(const char *class, const char *inst, const char *recip) 1271 1274 { 1272 1275 int ret; … … 1281 1284 } 1282 1285 1283 void owl_function_unsubscribe(c har *class, char *inst,char *recip)1286 void owl_function_unsubscribe(const char *class, const char *inst, const char *recip) 1284 1287 { 1285 1288 int ret; … … 1323 1326 } 1324 1327 1325 void owl_function_popless_text(c har *text)1328 void owl_function_popless_text(const char *text) 1326 1329 { 1327 1330 owl_popwin *pw; … … 1340 1343 } 1341 1344 1342 void owl_function_popless_fmtext( owl_fmtext *fm)1345 void owl_function_popless_fmtext(const owl_fmtext *fm) 1343 1346 { 1344 1347 owl_popwin *pw; … … 1357 1360 } 1358 1361 1359 void owl_function_popless_file(c har *filename)1362 void owl_function_popless_file(const char *filename) 1360 1363 { 1361 1364 owl_fmtext fm; … … 1408 1411 void owl_function_info() 1409 1412 { 1410 owl_message *m;1413 const owl_message *m; 1411 1414 owl_fmtext fm, attrfm; 1412 owl_view *v;1415 const owl_view *v; 1413 1416 #ifdef HAVE_LIBZEPHYR 1414 ZNotice_t *n;1417 const ZNotice_t *n; 1415 1418 #endif 1416 1419 … … 1543 1546 void owl_function_curmsg_to_popwin() 1544 1547 { 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; 1548 1551 owl_fmtext fm; 1549 1552 … … 1570 1573 1571 1574 int offset, curmsg, lines; 1572 owl_view *v;1575 const owl_view *v; 1573 1576 owl_message *m; 1574 1577 … … 1662 1665 void owl_function_printallvars() 1663 1666 { 1664 c har *name;1667 const char *name; 1665 1668 char var[LINE]; 1666 1669 owl_list varnames; … … 1692 1695 owl_fmtext fm; 1693 1696 int i, numvarnames; 1694 c har *varname;1697 const char *varname; 1695 1698 1696 1699 owl_fmtext_init_null(&fm); … … 1710 1713 } 1711 1714 1712 void owl_function_show_variable(c har *name)1715 void owl_function_show_variable(const char *name) 1713 1716 { 1714 1717 owl_fmtext fm; … … 1724 1727 void owl_function_delete_by_id(int id, int flag) 1725 1728 { 1726 owl_messagelist *ml;1729 const owl_messagelist *ml; 1727 1730 owl_message *m; 1728 1731 ml = owl_global_get_msglist(&g); … … 1748 1751 int i, j, count; 1749 1752 owl_message *m; 1750 owl_view *v;1751 owl_filter *f;1753 const owl_view *v; 1754 const owl_filter *f; 1752 1755 1753 1756 /* get the trash filter */ … … 1883 1886 { 1884 1887 char *buff=NULL; 1885 owl_message *m;1886 owl_filter *f;1888 const owl_message *m; 1889 const owl_filter *f; 1887 1890 1888 1891 if (owl_view_get_size(owl_global_get_current_view(&g))==0) { … … 1936 1939 } 1937 1940 1938 void owl_function_zlocate(int argc, c har **argv, int auth)1941 void owl_function_zlocate(int argc, const char *const *argv, int auth) 1939 1942 { 1940 1943 owl_fmtext fm; … … 1955 1958 } 1956 1959 1957 void owl_function_start_command(c har *line)1960 void owl_function_start_command(const char *line) 1958 1961 { 1959 1962 owl_editwin *tw; … … 1974 1977 } 1975 1978 1976 void owl_function_start_question(c har *line)1979 void owl_function_start_question(const char *line) 1977 1980 { 1978 1981 owl_editwin *tw; … … 1991 1994 } 1992 1995 1993 void owl_function_start_password(c har *line)1996 void owl_function_start_password(const char *line) 1994 1997 { 1995 1998 owl_editwin *tw; … … 2009 2012 } 2010 2013 2011 char *owl_function_exec(int argc, c har **argv,char *buff, int type)2014 char *owl_function_exec(int argc, const char *const *argv, const char *buff, int type) 2012 2015 { 2013 2016 /* if type == 1 display in a popup … … 2016 2019 * else display in a popup 2017 2020 */ 2018 char *newbuff, *redirect = " 2>&1 < /dev/null"; 2021 const char *redirect = " 2>&1 < /dev/null"; 2022 char *newbuff; 2019 2023 char *out, buff2[1024]; 2020 2024 int size; … … 2063 2067 } 2064 2068 2065 char *owl_function_perl(int argc, c har **argv,char *buff, int type)2069 char *owl_function_perl(int argc, const char *const *argv, const char *buff, int type) 2066 2070 { 2067 2071 /* if type == 1 display in a popup … … 2100 2104 * should have the pointer. 2101 2105 */ 2102 void owl_function_change_currentview_filter(c har *filtname)2106 void owl_function_change_currentview_filter(const char *filtname) 2103 2107 { 2104 2108 owl_view *v; 2105 2109 owl_filter *f; 2106 2110 int curid=-1, newpos, curmsg; 2107 owl_message *curm=NULL;2111 const owl_message *curm=NULL; 2108 2112 2109 2113 v=owl_global_get_current_view(&g); … … 2148 2152 * with a new definition. 2149 2153 */ 2150 void owl_function_create_filter(int argc, c har **argv)2154 void owl_function_create_filter(int argc, const char *const *argv) 2151 2155 { 2152 2156 owl_filter *f; 2153 owl_view *v;2157 const owl_view *v; 2154 2158 int ret, inuse=0; 2155 2159 … … 2240 2244 * Returns the name of the negated filter, which the caller must free. 2241 2245 */ 2242 char *owl_function_create_negative_filter(c har *filtername)2246 char *owl_function_create_negative_filter(const char *filtername) 2243 2247 { 2244 2248 char *newname; 2245 owl_filter *tmpfilt;2246 c har *argv[5];2249 const owl_filter *tmpfilt; 2250 const char *argv[5]; 2247 2251 2248 2252 owl_function_debugmsg("owl_function_create_negative_filter"); … … 2270 2274 void owl_function_show_filters() 2271 2275 { 2272 owl_list *l;2273 owl_filter *f;2276 const owl_list *l; 2277 const owl_filter *f; 2274 2278 int i, j; 2275 2279 owl_fmtext fm; … … 2296 2300 } 2297 2301 2298 void owl_function_show_filter(c har *name)2299 { 2300 owl_filter *f;2302 void owl_function_show_filter(const char *name) 2303 { 2304 const owl_filter *f; 2301 2305 char *buff, *tmp; 2302 2306 … … 2315 2319 void owl_function_show_zpunts() 2316 2320 { 2317 owl_filter *f;2318 owl_list *fl;2321 const owl_filter *f; 2322 const owl_list *fl; 2319 2323 char buff[5000]; 2320 2324 char *tmp; … … 2344 2348 * name of the filter, which the caller must free. 2345 2349 */ 2346 char *owl_function_classinstfilt(c har *c,char *i)2350 char *owl_function_classinstfilt(const char *c, const char *i) 2347 2351 { 2348 2352 owl_filter *f; … … 2422 2426 * the filter, which the caller must free. 2423 2427 */ 2424 char *owl_function_zuserfilt(c har *user)2428 char *owl_function_zuserfilt(const char *user) 2425 2429 { 2426 2430 owl_filter *f; … … 2469 2473 * Returns the name of the filter, which the caller must free. 2470 2474 */ 2471 char *owl_function_aimuserfilt(c har *user)2475 char *owl_function_aimuserfilt(const char *user) 2472 2476 { 2473 2477 owl_filter *f; … … 2505 2509 } 2506 2510 2507 char *owl_function_typefilt(c har *type)2511 char *owl_function_typefilt(const char *type) 2508 2512 { 2509 2513 owl_filter *f; … … 2541 2545 void owl_function_delete_curview_msgs(int flag) 2542 2546 { 2543 owl_view *v;2547 const owl_view *v; 2544 2548 int i, j; 2545 2549 … … 2575 2579 char *owl_function_smartfilter(int type) 2576 2580 { 2577 owl_view *v;2578 owl_message *m;2581 const owl_view *v; 2582 const owl_message *m; 2579 2583 char *zperson, *filtname=NULL; 2580 c har *argv[1];2584 const char *argv[1]; 2581 2585 2582 2586 v=owl_global_get_current_view(&g); … … 2647 2651 /* Starts a zpunt command based on the current class,instance pair. 2648 2652 * 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; 2652 2657 2653 2658 v=owl_global_get_current_view(&g); … … 2697 2702 * be 'color' 2698 2703 */ 2699 void owl_function_color_current_filter(c har *fgcolor,char *bgcolor)2700 { 2701 c har *name;2704 void owl_function_color_current_filter(const char *fgcolor, const char *bgcolor) 2705 { 2706 const char *name; 2702 2707 2703 2708 name=owl_view_get_filtname(owl_global_get_current_view(&g)); … … 2709 2714 * the "all" filter, return -2. Return 0 on success 2710 2715 */ 2711 int owl_function_color_filter(c har *filtname, char *fgcolor,char *bgcolor)2716 int owl_function_color_filter(const char *filtname, const char *fgcolor, const char *bgcolor) 2712 2717 { 2713 2718 owl_filter *f; … … 2792 2797 * if direction==1 then unpunt 2793 2798 */ 2794 void owl_function_zpunt(c har *class, char *inst,char *recip, int direction)2799 void owl_function_zpunt(const char *class, const char *inst, const char *recip, int direction) 2795 2800 { 2796 2801 char *puntexpr, *classexpr, *instexpr, *recipexpr; … … 2839 2844 } 2840 2845 2841 void owl_function_punt(c har *filter, int direction)2846 void owl_function_punt(const char *filter, int direction) 2842 2847 { 2843 2848 owl_filter *f; … … 2885 2890 } 2886 2891 2887 void owl_function_activate_keymap(c har *keymap)2892 void owl_function_activate_keymap(const char *keymap) 2888 2893 { 2889 2894 if (!owl_keyhandler_activate(owl_global_get_keyhandler(&g), keymap)) { … … 2896 2901 owl_list l; 2897 2902 owl_fmtext fm; 2898 owl_keymap *km;2899 owl_keyhandler *kh;2903 const owl_keymap *km; 2904 const owl_keyhandler *kh; 2900 2905 int i, numkm; 2901 c har *kmname;2906 const char *kmname; 2902 2907 2903 2908 kh = owl_global_get_keyhandler(&g); … … 2923 2928 } 2924 2929 2925 char *owl_function_keymap_summary(c har *name)2926 { 2927 owl_keymap *km2930 char *owl_function_keymap_summary(const char *name) 2931 { 2932 const owl_keymap *km 2928 2933 = owl_keyhandler_get_keymap(owl_global_get_keyhandler(&g), name); 2929 2934 if (km) return owl_keymap_summary(km); … … 2932 2937 2933 2938 /* TODO: implement for real */ 2934 void owl_function_show_keymap(c har *name)2939 void owl_function_show_keymap(const char *name) 2935 2940 { 2936 2941 owl_fmtext fm; 2937 owl_keymap *km;2942 const owl_keymap *km; 2938 2943 2939 2944 owl_fmtext_init_null(&fm); … … 2948 2953 } 2949 2954 2950 void owl_function_help_for_command(c har *cmdname)2955 void owl_function_help_for_command(const char *cmdname) 2951 2956 { 2952 2957 owl_fmtext fm; … … 2958 2963 } 2959 2964 2960 void owl_function_search_start(c har *string, int direction)2965 void owl_function_search_start(const char *string, int direction) 2961 2966 { 2962 2967 /* direction is OWL_DIRECTION_DOWNWARDS or OWL_DIRECTION_UPWARDS or … … 2993 2998 */ 2994 2999 2995 owl_view *v;3000 const owl_view *v; 2996 3001 int viewsize, i, curmsg, start; 2997 3002 owl_message *m; … … 3054 3059 /* strips formatting from ztext and returns the unformatted text. 3055 3060 * caller is responsible for freeing. */ 3056 char *owl_function_ztext_stylestrip(c har *zt)3061 char *owl_function_ztext_stylestrip(const char *zt) 3057 3062 { 3058 3063 owl_fmtext fm; … … 3067 3072 3068 3073 /* Popup a buddylisting. If filename is NULL use the default .anyone */ 3069 void owl_function_buddylist(int aim, int zephyr, c har *filename)3074 void owl_function_buddylist(int aim, int zephyr, const char *filename) 3070 3075 { 3071 3076 int i, j, idle; 3072 3077 int interrupted = 0; 3073 3078 owl_fmtext fm; 3074 owl_buddylist *bl;3075 owl_buddy *b;3079 const owl_buddylist *bl; 3080 const owl_buddy *b; 3076 3081 char *timestr; 3077 3082 #ifdef HAVE_LIBZEPHYR 3078 3083 int x; 3079 3084 owl_list anyone; 3080 char *tmp, *user; 3085 const char *user; 3086 char *tmp; 3081 3087 ZLocations_t location[200]; 3082 3088 int numlocs, ret; … … 3126 3132 for (i=0; i<j; i++) { 3127 3133 user=owl_list_get_element(&anyone, i); 3128 ret=ZLocateUser( user, &numlocs, ZAUTH);3134 ret=ZLocateUser(zstr(user), &numlocs, ZAUTH); 3129 3135 3130 3136 owl_function_mask_sigint(NULL); … … 3183 3189 3184 3190 /* Dump messages in the current view to the file 'filename'. */ 3185 void owl_function_dump(c har *filename)3191 void owl_function_dump(const char *filename) 3186 3192 { 3187 3193 int i, j, count; 3188 3194 owl_message *m; 3189 owl_view *v;3195 const owl_view *v; 3190 3196 FILE *file; 3191 3197 char *plaintext; … … 3293 3299 * startupfile. 3294 3300 */ 3295 void owl_function_addstartup(c har *buff)3301 void owl_function_addstartup(const char *buff) 3296 3302 { 3297 3303 FILE *file; 3298 c har *filename;3304 const char *filename; 3299 3305 3300 3306 filename=owl_global_get_startupfile(&g); … … 3315 3321 3316 3322 /* Remove the specified command from the startup file. */ 3317 void owl_function_delstartup(c har *buff)3318 { 3319 c har *filename;3323 void owl_function_delstartup(const char *buff) 3324 { 3325 const char *filename; 3320 3326 filename=owl_global_get_startupfile(&g); 3321 3327 owl_util_file_deleteline(filename, buff, 1); … … 3325 3331 * is NULL, use the default owl startup commands file. 3326 3332 */ 3327 void owl_function_source(c har *filename)3333 void owl_function_source(const char *filename) 3328 3334 { 3329 3335 char *path; … … 3354 3360 } 3355 3361 3356 void owl_function_change_style(owl_view *v, c har *stylename)3357 { 3358 owl_style *s;3362 void owl_function_change_style(owl_view *v, const char *stylename) 3363 { 3364 const owl_style *s; 3359 3365 3360 3366 s=owl_global_get_style_by_name(&g, stylename); … … 3372 3378 { 3373 3379 owl_view *v; 3374 owl_style *s;3380 const owl_style *s; 3375 3381 3376 3382 v=owl_global_get_current_view(&g); … … 3388 3394 } 3389 3395 3390 void owl_function_error(c har *fmt, ...)3396 void owl_function_error(const char *fmt, ...) 3391 3397 { 3392 3398 va_list ap; 3393 3399 char *buff; 3394 c har *nl;3400 const char *nl; 3395 3401 3396 3402 va_start(ap, fmt); … … 3410 3416 } 3411 3417 3412 void owl_function_log_err(c har *string)3418 void owl_function_log_err(const char *string) 3413 3419 { 3414 3420 char *date; … … 3438 3444 } 3439 3445 3440 void owl_function_makemsg(c har *fmt, ...)3446 void owl_function_makemsg(const char *fmt, ...) 3441 3447 { 3442 3448 va_list ap; … … 3468 3474 owl_message *m; 3469 3475 owl_zbuddylist *zbl; 3470 c har *user;3476 const char *user; 3471 3477 ZLocations_t location[200]; 3472 3478 int numlocs, ret; … … 3480 3486 for (i=0; i<j; i++) { 3481 3487 user=owl_list_get_element(&anyone, i); 3482 ret=ZLocateUser( user, &numlocs, ZAUTH);3488 ret=ZLocateUser(zstr(user), &numlocs, ZAUTH); 3483 3489 if (ret!=ZERR_NONE) { 3484 3490 owl_function_error("Error getting location for %s", user); … … 3519 3525 } 3520 3526 3521 void owl_function_aimsearch_results(c har *email, owl_list *namelist)3527 void owl_function_aimsearch_results(const char *email, owl_list *namelist) 3522 3528 { 3523 3529 owl_fmtext fm; … … 3561 3567 } 3562 3568 3563 void _owl_function_mark_message( owl_message *m)3569 void _owl_function_mark_message(const owl_message *m) 3564 3570 { 3565 3571 if (m) … … 3569 3575 void owl_function_mark_message() 3570 3576 { 3571 owl_message *m;3572 owl_view *v;3577 const owl_message *m; 3578 const owl_view *v; 3573 3579 3574 3580 v=owl_global_get_current_view(&g); … … 3589 3595 { 3590 3596 int marked_id; 3591 owl_message *m;3592 owl_view *v;3597 const owl_message *m; 3598 const owl_view *v; 3593 3599 3594 3600 marked_id=owl_global_get_markedmsgid(&g);
Note: See TracChangeset
for help on using the changeset viewer.