Changeset b950088 for commands.c
- Timestamp:
- Jun 29, 2002, 11:55:06 AM (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:
- 855ebe7
- Parents:
- 61d27fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r1aee7d9 rb950088 193 193 "Scrolls up if <numlines> is negative, else scrolls down.\n"), 194 194 195 OWLCMD_VOID("next", owl_command_next, OWL_CTX_INTERACTIVE, 196 "move the pointer to the next message", "", ""), 195 OWLCMD_ARGS("next", owl_command_next, OWL_CTX_INTERACTIVE, 196 "move the pointer to the next message", 197 "recv:next [ --filter <name> ] [ --skip-deleted ] [ --last-if-none ]", 198 "Moves the pointer to the next message in the current view.\n" 199 "If --filter is specified, will only consider messages in\n" 200 "the filter <name>.\n" 201 "If --skip-deleted is specified, deleted messages will\n" 202 "be skipped.\n" 203 "If --last-if-none is specified, will stop at last message\n" 204 "in the view if no other suitable messages are found.\n"), 197 205 OWLCMD_ALIAS("recv:next", "next"), 198 206 199 OWLCMD_VOID("prev", owl_command_prev, OWL_CTX_INTERACTIVE, 200 "move the pointer to the previous message", "", ""), 207 OWLCMD_ARGS("prev", owl_command_prev, OWL_CTX_INTERACTIVE, 208 "move the pointer to the previous message", 209 "recv:prev [ --filter <name> ] [ --skip-deleted ] [ --first-if-none ]", 210 "Moves the pointer to the next message in the current view.\n" 211 "If --filter is specified, will only consider messages in\n" 212 "the filter <name>.\n" 213 "If --skip-deleted is specified, deleted messages will\n" 214 "be skipped.\n" 215 "If --first-if-none is specified, will stop at first message\n" 216 "in the view if no other suitable messages are found.\n"), 201 217 OWLCMD_ALIAS("recv:prev", "prev"), 202 218 203 OWLCMD_VOID("next-notdel", owl_command_next_notdeleted, OWL_CTX_INTERACTIVE, 204 "move the pointer to the next non-deleted message", "", ""), 205 OWLCMD_ALIAS("recv:next-notdel", "next-notdel"), 206 207 OWLCMD_VOID("prev-notdel", owl_command_prev_notdeleted, OWL_CTX_INTERACTIVE, 208 "move the pointer to the previous non-deleted message", "", ""), 209 OWLCMD_ALIAS("recv:prev-notdel", "prev-notdel"), 210 211 OWLCMD_VOID("recv:next-personal", owl_function_next_personal, 212 OWL_CTX_INTERACTIVE, 213 "move the pointer to the next personal message", "", ""), 214 215 OWLCMD_VOID("recv:prev-personal", owl_function_prev_personal, 216 OWL_CTX_INTERACTIVE, 217 "move the pointer to the previous personal message", "", ""), 219 OWLCMD_ALIAS("recv:next-notdel", "recv:next --skip-deleted --last-if-none"), 220 OWLCMD_ALIAS("next-notdel", "recv:next --skip-deleted --last-if-none"), 221 222 OWLCMD_ALIAS("recv:prev-notdel", "recv:prev --skip-deleted --first-if-none"), 223 OWLCMD_ALIAS("prev-notdel", "recv:prev --skip-deleted --first-if-none"), 224 225 OWLCMD_ALIAS("recv:next-personal", "recv:next --filter personal"), 226 227 OWLCMD_ALIAS("recv:prev-personal", "recv:prev --filter personal"), 218 228 219 229 OWLCMD_VOID("first", owl_command_first, OWL_CTX_INTERACTIVE, … … 417 427 OWLCMD_ARGS("delete", owl_command_delete, OWL_CTX_INTERACTIVE, 418 428 "mark a message for deletion", 419 "delete [ -id msgid ] \n"429 "delete [ -id msgid ] [ --no-move ]\n" 420 430 "delete view\n" 421 431 "delete trash", … … 423 433 "for deletion. Otherwise the message with the given message\n" 424 434 "id is marked for deltion.\n" 435 "If '--no-move' is specified, don't move after deletion.\n" 425 436 "If 'trash' is specified, deletes all trash/auto messages\n" 426 437 "in the current view.\n" … … 431 442 OWLCMD_ARGS("undelete", owl_command_undelete, OWL_CTX_INTERACTIVE, 432 443 "unmark a message for deletion", 433 "undelete [ -id msgid ] \n"444 "undelete [ -id msgid ] [ --no-move ]\n" 434 445 "undelete view", 435 446 "If no message id is specified the current message is\n" 436 447 "unmarked for deletion. Otherwise the message with the\n" 437 448 "given message id is marked for undeltion.\n" 449 "If '--no-move' is specified, don't move after deletion.\n" 438 450 "If 'view' is specified, undeletes all messages\n" 439 451 "in the current view.\n"), … … 649 661 } 650 662 651 void owl_command_next() { 652 owl_function_nextmsg(); 653 } 654 655 void owl_command_prev() { 656 owl_function_prevmsg(); 657 } 658 659 void owl_command_next_notdeleted() { 660 owl_function_nextmsg_notdeleted(); 661 } 662 663 void owl_command_prev_notdeleted() { 664 owl_function_prevmsg_notdeleted(); 663 char *owl_command_next(int argc, char **argv, char *buff) { 664 char *filter=NULL; 665 int skip_deleted=0, last_if_none=0; 666 while (argc>1) { 667 if (argc>=1 && !strcmp(argv[1], "--skip-deleted")) { 668 skip_deleted=1; 669 argc-=1; argv+=1; 670 } else if (argc>=1 && !strcmp(argv[1], "--last-if-none")) { 671 last_if_none=1; 672 argc-=1; argv+=1; 673 } else if (argc>=2 && !strcmp(argv[1], "--filter")) { 674 filter = argv[2]; 675 argc-=2; argv+=2; 676 } else { 677 owl_function_makemsg("Invalid arguments to command 'next'."); 678 return(NULL); 679 } 680 } 681 owl_function_nextmsg_full(filter, skip_deleted, last_if_none); 682 return(NULL); 683 } 684 685 char *owl_command_prev(int argc, char **argv, char *buff) { 686 char *filter=NULL; 687 int skip_deleted=0, first_if_none=0; 688 while (argc>1) { 689 if (argc>=1 && !strcmp(argv[1], "--skip-deleted")) { 690 skip_deleted=1; 691 argc-=1; argv+=1; 692 } else if (argc>=1 && !strcmp(argv[1], "--first-if-none")) { 693 first_if_none=1; 694 argc-=1; argv+=1; 695 } else if (argc>=2 && !strcmp(argv[1], "--filter")) { 696 filter = argv[2]; 697 argc-=2; argv+=2; 698 } else { 699 owl_function_makemsg("Invalid arguments to command 'prev'."); 700 return(NULL); 701 } 702 } 703 owl_function_prevmsg_full(filter, skip_deleted, first_if_none); 704 return(NULL); 665 705 } 666 706 … … 1170 1210 1171 1211 char *owl_command_delete(int argc, char **argv, char *buff) { 1212 int move_after = 1; 1213 1214 if (!strcmp(argv[1], "--no-move")) { 1215 move_after = 0; 1216 argc--; 1217 argv++; 1218 } 1219 1172 1220 if (argc==1) { 1173 owl_function_deletecur( );1221 owl_function_deletecur(move_after); 1174 1222 return NULL; 1175 1223 } … … 1195 1243 1196 1244 char *owl_command_undelete(int argc, char **argv, char *buff) { 1245 int move_after = 1; 1246 1247 if (!strcmp(argv[1], "--no-move")) { 1248 move_after = 0; 1249 argc--; 1250 argv++; 1251 } 1252 1197 1253 if (argc==1) { 1198 owl_function_undeletecur( );1254 owl_function_undeletecur(move_after); 1199 1255 return NULL; 1200 1256 }
Note: See TracChangeset
for help on using the changeset viewer.