Changeset ecd5dc5
- Timestamp:
- Apr 12, 2003, 4:54:57 PM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- e9b1f60
- Parents:
- 8262340
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r8262340 recd5dc5 33 33 with stale tickets 34 34 Added some hooks for malloc debugging 35 M-p is bound to 'view personal' by default 36 loadsubs and loadloginsubs only print messages if in interactive 37 mode 38 added the 'alert_filter' variable, defaults to 'none'. 39 added the 'alert_action' variable, which is an owl command that 40 will be executed when new messages arive that match the 41 alert_filter 42 added the 'term' command which takes the 'raise' and 'deiconify' 43 options. It assumes xterm for now. 35 44 36 45 1.2.8 -
commands.c
r7933748 recd5dc5 61 61 OWLCMD_ALIAS("exit", "quit"), 62 62 OWLCMD_ALIAS("q", "quit"), 63 64 OWLCMD_ARGS("term", owl_command_term, OWL_CTX_ANY, 65 "control the terminal", 66 "term raise\n" 67 "term deiconify\n", 68 ""), 69 70 OWLCMD_VOID("nop", owl_command_nop, OWL_CTX_ANY, 71 "do nothing", 72 "", 73 ""), 63 74 64 75 OWLCMD_ARGS("start-command", owl_command_start_command, OWL_CTX_INTERACTIVE, … … 750 761 } 751 762 763 void owl_command_nop() { 764 } 765 752 766 char *owl_command_help(int argc, char **argv, char *buff) { 753 767 if (argc!=2) { … … 1168 1182 if (argc<2) { 1169 1183 owl_function_makemsg("Need at least one argument to debug command"); 1170 return NULL;1184 return(NULL); 1171 1185 } 1172 1186 1173 1187 if (!owl_global_is_debug_fast(&g)) { 1174 1188 owl_function_makemsg("Debugging is not turned on"); 1175 return NULL;1189 return(NULL); 1176 1190 } 1177 1191 1178 1192 owl_function_debugmsg(argv[1]); 1179 return NULL; 1180 } 1181 1182 char *owl_command_ktest(int argc, char **argv, char *buff) { 1183 owl_function_popless_text("foobar"); 1184 return NULL; 1193 return(NULL); 1194 } 1195 1196 char *owl_command_term(int argc, char **argv, char *buff) { 1197 if (argc<2) { 1198 owl_function_makemsg("Need at least one argument to the term command"); 1199 return(NULL); 1200 } 1201 1202 if (!strcmp(argv[1], "raise")) { 1203 owl_function_xterm_raise(); 1204 } else if (!strcmp(argv[1], "deiconify")) { 1205 owl_function_xterm_deiconify(); 1206 } else { 1207 owl_function_makemsg("Uknown terminal subcommand"); 1208 } 1209 return(NULL); 1185 1210 } 1186 1211 -
context.c
r10b866d recd5dc5 44 44 } 45 45 46 int owl_context_is_interactive(owl_context *ctx) { 47 return(ctx->mode & OWL_CTX_INTERACTIVE)?1:0; 48 } 46 49 47 50 void owl_context_set_startup(owl_context *ctx) { -
functions.c
r8262340 recd5dc5 515 515 void owl_function_loadsubs(char *file) { 516 516 int ret; 517 517 518 ret=owl_zephyr_loadsubs(file); 519 520 if (!owl_context_is_interactive(owl_global_get_context(&g))) return; 518 521 if (ret==0) { 519 522 owl_function_makemsg("Subscribed to messages from file."); … … 527 530 void owl_function_loadloginsubs(char *file) { 528 531 int ret; 532 529 533 ret=owl_zephyr_loadloginsubs(file); 534 535 if (!owl_context_is_interactive(owl_global_get_context(&g))) return; 530 536 if (ret==0) { 531 537 owl_function_makemsg("Subscribed to login messages from file."); … … 2625 2631 } 2626 2632 } 2633 2634 void owl_function_xterm_raise() { 2635 char buff[10]; 2636 2637 buff[0]=0x1b; 2638 buff[1]='['; 2639 buff[2]='5'; 2640 buff[3]='t'; 2641 write(fileno(stdout), buff, 4); 2642 } 2643 2644 void owl_function_xterm_deiconify() { 2645 char buff[10]; 2646 2647 buff[0]=0x1b; 2648 buff[1]='['; 2649 buff[2]='1'; 2650 buff[3]='t'; 2651 write(fileno(stdout), buff, 4); 2652 } -
global.c
r8262340 recd5dc5 90 90 91 91 void _owl_global_setup_windows(owl_global *g) { 92 int lines, cols, typwin_lines; 93 94 lines=g->lines; 92 int cols, typwin_lines; 93 95 94 cols=g->cols; 96 typwin_lines =owl_global_get_typwin_lines(g);95 typwin_lines=owl_global_get_typwin_lines(g); 97 96 98 97 /* set the new window sizes */ 99 98 g->recwinlines=g->lines-(typwin_lines+2); 99 if (g->recwinlines<1) { 100 /* this will screw things up. I'm not sure what to do yet, 101 but this is better than nothing */ 102 /* g->recwinlines=1; */ 103 } 100 104 101 105 /* create the new windows */ 102 106 g->recwin=newwin(g->recwinlines, cols, 0, 0); 107 if (g->recwin==NULL) { 108 owl_function_debugmsg("\n\nI just received an error on creating a new receive window\n"); 109 owl_function_debugmsg("newwin was called with arguments (%i, %i, 0, 0) and returned NULL\n", 110 g->recwinlines, cols); 111 endwin(); 112 113 exit(50); 114 } 115 103 116 g->sepwin=newwin(1, cols, g->recwinlines, 0); 104 117 g->msgwin=newwin(1, cols, g->recwinlines+1, 0); … … 375 388 } 376 389 377 /* 378 char buff[1024]; 379 sprintf(buff, "New size is %i lines, %i cols.\n", size.ws_row, size.ws_col); 380 owl_function_makemsg(buff); 381 */ 390 owl_function_debugmsg("New size is %i lines, %i cols.", size.ws_row, size.ws_col); 382 391 owl_function_makemsg(""); 383 384 392 g->resizepending=0; 385 393 } -
keys.c
r42abb10 recd5dc5 203 203 BIND_CMD("M-n", "smartnarrow", "narrow to a view based on the current message"); 204 204 BIND_CMD("M-N", "smartnarrow -i", "narrow to a view based on the current message, and consider instance pair"); 205 205 BIND_CMD("M-p", "view personal", ""); 206 206 207 BIND_CMD("/", "start-command search ", "start a search command"); 207 208 BIND_CMD("?", "start-command search -r ", "start a revrerse search command"); -
message.c
r8262340 recd5dc5 472 472 tmp2=owl_util_stripnewlines(tmp); 473 473 owl_message_set_body(m, tmp2); 474 owl_free(tmp);475 474 owl_free(tmp2); 476 475 } else { 477 476 owl_message_set_body(m, tmp); 478 477 } 478 owl_free(tmp); 479 479 480 480 /* if zcrypt is enabled try to decrypt the message */ … … 743 743 744 744 /* get the body */ 745 body=owl_ malloc(strlen(owl_message_get_body(m)+30));746 strcpy(body, owl_message_get_body(m));745 body=owl_strdup(owl_message_get_body(m)); 746 body=realloc(body, strlen(body)+30); 747 747 748 748 /* add a newline if we need to */ -
owl.c
r7933748 recd5dc5 268 268 struct sockaddr_in from; 269 269 owl_message *m; 270 owl_filter *f; 270 271 271 272 /* grab a notice, but if we've done 20 without stopping, take … … 315 316 owl_function_beep(); 316 317 } 318 319 /* if it matches the alert filter, do the alert action */ 320 f=owl_global_get_filter(&g, owl_global_get_alert_filter(&g)); 321 if (f && owl_filter_message_match(f, m)) { 322 owl_function_command(owl_global_get_alert_action(&g)); 323 } 324 325 317 326 318 327 /* check for burning ears message */ -
variable.c
rced25d1 recd5dc5 187 187 "home view to switch to after 'X' and 'V'", 188 188 "SEE ALSO: view, filter\n" ), 189 190 OWLVAR_STRING( "alert_filter" /* %OwlVarStub */, "none", 191 "filter on which to trigger alert actions", 192 "" ), 193 194 OWLVAR_STRING( "alert_action" /* %OwlVarStub */, "nop", 195 "filter on which to trigger alert actions", 196 "" ), 189 197 190 198 OWLVAR_STRING_FULL( "tty" /* %OwlVarStub */, "", "tty name for zephyr location", "", … … 257 265 "to display the requested URL.\n", 258 266 "none,netscape,galeon,opera" ), 267 259 268 260 269 OWLVAR_BOOL( "_followlast" /* %OwlVarStub */, 0,
Note: See TracChangeset
for help on using the changeset viewer.