home *** CD-ROM | disk | FTP | other *** search
- /* CHESS FUNCTION(S): double_down, double_up
- /* DATE: 3/1/93
- /* AUTHOR: C. Schanck
- /*
- /* DESCRIPTION:
- /* This is a pair of functions which can be attached to your pgup and
- /* pgdn keys and will give you some different functionality.
- /*
- /* In either case, pressing the key within a full, non-verically-split
- /* window will cause the keys to behave normally. If the window has
- /* a right or left neighbor however, the two windows will be scrolled
- /* together, side-by-side! Enjoy!
- /*
- double_down{
- int i;
- if(ask("file_w_width")!=ask("sys_cols)){
- /* boom! we have to do both
- if(ask("file_w_left")==1){
- /* here we are in the left one, must do the right as well
- i=b_cmd("down_page");
- i=i+b_cmd("window_next");
- i=i+b_cmd("down_page");
- i=i+b_cmd("window_prev");
- }
- else{
- /* here we are in the right one, must do the left as well
- i=b_cmd("down_page");
- i=i+b_cmd("window_prev");
- i=i+b_cmd("down_page");
- i=i+b_cmd("window_next");
- }
- if(i!=4)
- i=0
- }
- else{
- /* behave normally here
- i=b_cmd("down_page");
- }
- return(i);
- }
- double_up{
- int i;
- if(ask("file_w_width")!=ask("sys_cols)){
- /* boom! we have to do both
- if(ask("file_w_left")==1){
- i=b_cmd("up_page");
- i=i+b_cmd("window_next");
- i=i+b_cmd("down_page");
- i=i+b_cmd("window_prev");
- }
- else{
- i=b_cmd("up_page");
- i=i+b_cmd("window_prev");
- i=i+b_cmd("down_page");
- i=i+b_cmd("window_next");
- }
- if(i!=4)
- i=0;
- }
- else{
- i=b_cmd("down_page");
- }
- return(i);
- }