Thread View: alt.sources.patches
1 messages
1 total messages
Started by Kari E. Hurtta
Sun, 03 Oct 1993 14:51
kehpager V1.02 to V1.03 - Latin/2 charset (Patch 3/3)
Author: Kari E. Hurtta
Date: Sun, 03 Oct 1993 14:51
Date: Sun, 03 Oct 1993 14:51
752 lines
25691 bytes
25691 bytes
Archive-Name: kehpager0102/Patch01.3
Part: 3/3
Description: kehpager - charset aware pager for VTxxx terminals
Patch-to: kehpager V1.02
Environment: Ansi C, SunOS 4, SunOS 5 (??), HP-UX
Author: Kari E. Hurtta <Kari.Hurtta@Helsinki.FI>
#!/bin/sh
# this is part 3 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch01 continued
#
CurArch=3
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
exit 1; fi
( read Scheck
if test "$Scheck" != $CurArch
then echo "Please unpack part $Scheck next!"
exit 1;
else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> patch01
X+ EOF_IN_FILE = 1;
X break;
X } else if (0 == strcmp("-T",*arg_vec)) {
X set_window_status(WIN_TEXT,enable_tab,enable_wrapping);
X***************
X*** 1169,1175 ****
X--- 1376,1391 ----
X test_page(WIN_TEXT);
X arg_vec++;
X auto_input = 0;
X+ EOF_IN_FILE = 1;
X break;
X+ } else if (0 == strcmp("-T2",*arg_vec)) {
X+ set_window_status(WIN_TEXT,enable_tab,enable_wrapping);
X+ test_page2(WIN_TEXT);
X+ arg_vec++;
X+ auto_input = 0;
X+ if (-1 != FP) close_file(&FP);
X+ EOF_IN_FILE = 1;
X+ break;
X } else if (0 == strcmp("-CS",*arg_vec)) {
X if (arg_left > 0) {
X if ('\0' == (*++arg_vec)[0]) {
X***************
X*** 1198,1220 ****
X name = "-";
X
X if (name) {
X auto_input = 0;
X! read_file(name,&FP);
X }
X
X get_next = 0;
X }
X #ifdef _HPUX_SOURCE
X! if (-1 != FP && (readfs & (1 << FP)))
X #else
X! if (-1 != FP && FD_ISSET(FP,&readfs))
X #endif
X! handle_file(map,&FP);
X
X if (pager_state && !remove)
X update_prompt(have_error ? WIN_ERROR : WIN_TEXT,
X! !quitflag ? have_error ? 3 : FP != -1 ? 2 :
X! arg_left > 0 ? 1 : 4 : 0);
X
X }
X }
X--- 1414,1454 ----
X name = "-";
X
X if (name) {
X+ if (-1 != FP) close_file(&FP);
X auto_input = 0;
X! read_file(name,&FP,&EOF_IN_FILE);
X }
X
X get_next = 0;
X }
X #ifdef _HPUX_SOURCE
X! if (-1 != FP && !EOF_IN_FILE && (readfs & (1 << FP)))
X #else
X! if (-1 != FP && !EOF_IN_FILE && FD_ISSET(FP,&readfs))
X #endif
X! {
X! handle_file(map,&FP,&EOF_IN_FILE);
X
X+ if (do_forwarding) {
X+ int prev,offset,Y,roffset;
X+ for (window_pos(WIN_TEXT,&Y,&offset,&roffset),prev=roffset;
X+ window_rlines(WIN_TEXT) - roffset > lines -Y &&
X+ roffset - prev <lines;
X+ window_pos(WIN_TEXT,&Y,&offset,&roffset))
X+ scroll_window(WIN_TEXT);
X+ do_forwarding = 0;
X+ }
X+
X+ }
X+
X if (pager_state && !remove)
X update_prompt(have_error ? WIN_ERROR : WIN_TEXT,
X! !quitflag ?
X! have_error ? 3 :
X! !EOF_IN_FILE ? 2 :
X! arg_left > 0 ? 1 :
X! 4 :
X! 0);
X
X }
X }
Xdiff -c ./kehpager.init /home/hydra/hurtta/src/kehpager/kehpager.init
X*** ./kehpager.init Sun Oct 3 13:51:15 1993
X--- /home/hydra/hurtta/src/kehpager/kehpager.init Sun Oct 3 14:10:12 1993
X***************
X*** 11,16 ****
X--- 11,18 ----
X keyboard.toggle_wrapping: "w"
X keyboard.give_help: "?"
X keyboard.next_file: "N"
X+ keyboard.reread_file: "R"
X+ keyboard.forward: "F"
X keyboard.next_page: NEXT SCREEN
X keyboard.next_page: "f"
X keyboard.next_page: SPACE
X***************
X*** 40,48 ****
X keyboard.goto: "7"
X keyboard.goto: "8"
X keyboard.goto: "9"
X- # keyboard.goto.del: DEL # Default VERASE
X- # keyboard.goto.erase_line: Ctrl-U # Default VKILL
X- # keyboard.goto.erase_line: Ctrl-X
X keyboard.goto.enter: RETURN
X keyboard.goto.enter: "g"
X keyboard.goto.percent: "%"
X--- 42,47 ----
X***************
X*** 52,65 ****
X keyboard.search_first: PF1
X keyboard.search_next: PF2
X keyboard.search_next: "n"
X! # keyboard.search.del: DEL # Default VERASE
X keyboard.search.self_insert: LETTER
X keyboard.search.self_insert: TAB
X- # keyboard.search.erase_line: Ctrl-U # Default VKILL
X- # keyboard.search.erase_line: Ctrl-X
X keyboard.search.enter: RETURN
X keyboard.search.first: PF1
X keyboard.search.next: PF2
X
X # Control keys
X # keyboard.kill: Ctrl-C # Default VINTR
X--- 51,70 ----
X keyboard.search_first: PF1
X keyboard.search_next: PF2
X keyboard.search_next: "n"
X!
X keyboard.search.self_insert: LETTER
X keyboard.search.self_insert: TAB
X keyboard.search.enter: RETURN
X keyboard.search.first: PF1
X keyboard.search.next: PF2
X+ keyboard.charset: "C"
X+ keyboard.charset.self_insert: LETTER
X+ keyboard.charset.enter: RETURN
X+
X+ # keyboard.edit.del: DEL # Default VERASE
X+ # keyboard.edit.erase_line: Ctrl-U # Default VKILL
X+ # keyboard.edit.erase_line: Ctrl-X
X+
X
X # Control keys
X # keyboard.kill: Ctrl-C # Default VINTR
Xdiff -c ./kehpager.init.hpux /home/hydra/hurtta/src/kehpager/kehpager.init.hpux
X*** ./kehpager.init.hpux Sun Oct 3 13:51:15 1993
X--- /home/hydra/hurtta/src/kehpager/kehpager.init.hpux Sun Oct 3 14:10:13 1993
X***************
X*** 11,16 ****
X--- 11,18 ----
X keyboard.toggle_wrapping: "w"
X keyboard.give_help: "?"
X keyboard.next_file: "N"
X+ keyboard.reread_file: "R"
X+ keyboard.forward: "F"
X keyboard.next_page: NEXT SCREEN
X keyboard.next_page: "f"
X keyboard.next_page: SPACE
X***************
X*** 40,48 ****
X keyboard.goto: "7"
X keyboard.goto: "8"
X keyboard.goto: "9"
X- # keyboard.goto.del: DEL # Default VERASE
X- # keyboard.goto.erase_line: Ctrl-U # Default VKILL
X- # keyboard.goto.erase_line: Ctrl-X
X keyboard.goto.enter: RETURN
X keyboard.goto.enter: "g"
X keyboard.goto.percent: "%"
X--- 42,47 ----
X***************
X*** 52,65 ****
X keyboard.search_first: PF1
X keyboard.search_next: PF2
X keyboard.search_next: "n"
X- # keyboard.search.del: DEL # Default VERASE
X keyboard.search.self_insert: LETTER
X keyboard.search.self_insert: TAB
X- # keyboard.search.erase_line: Ctrl-U # Default VKILL
X- # keyboard.search.erase_line: Ctrl-X
X keyboard.search.enter: RETURN
X keyboard.search.first: PF1
X keyboard.search.next: PF2
X
X # Control keys
X # keyboard.kill: Ctrl-C # Default VINTR
X--- 51,69 ----
X keyboard.search_first: PF1
X keyboard.search_next: PF2
X keyboard.search_next: "n"
X keyboard.search.self_insert: LETTER
X keyboard.search.self_insert: TAB
X keyboard.search.enter: RETURN
X keyboard.search.first: PF1
X keyboard.search.next: PF2
X+
X+ keyboard.charset: "C"
X+ keyboard.charset.self_insert: LETTER
X+ keyboard.charset.enter: RETURN
X+
X+ # keyboard.edit.del: DEL # Default VERASE
X+ # keyboard.edit.erase_line: Ctrl-U # Default VKILL
X+ # keyboard.edit.erase_line: Ctrl-X
X
X # Control keys
X # keyboard.kill: Ctrl-C # Default VINTR
Xdiff -c ./kehpagerrc /home/hydra/hurtta/src/kehpager/kehpagerrc
X*** ./kehpagerrc Sun Oct 3 13:51:15 1993
X--- /home/hydra/hurtta/src/kehpager/kehpagerrc Sun Oct 3 15:59:35 1993
X***************
X*** 10,16 ****
X # Charset of input file(s)
X # Values: Ascii (option -A)
X # Latin/1 (option -L)
X! # Latin/1 (option -L)
X # Latin/4 (option -L4)
X # Latin/5 (option -L5)
X # Multinational (option -M)
X--- 10,16 ----
X # Charset of input file(s)
X # Values: Ascii (option -A)
X # Latin/1 (option -L)
X! # Latin/2 (option -L2)
X # Latin/4 (option -L4)
X # Latin/5 (option -L5)
X # Multinational (option -M)
X***************
X*** 18,23 ****
X--- 18,25 ----
X # UK-ASCII (option -UK)
X # Norwegian (option -NR)
X # Swedish (option -SW)
X+ # French Canadian (option -CA)
X+ # French/Belgian (oprion -FR)
X input.charset: Latin/1
X # What charset will use if with -CS option have used null name
X input.charset.null: Ascii
X***************
X*** 68,75 ****
X # Supported values:
X # 1 = North American (ASCII)
X # 2 = British (UK-ASCII)
X! # 6 = Finnish
X # 5 = Danish / 13 = Norwegian
X # 12 = Swedish
X # If yhis values is incorrect, kehpager works incorrectly !!!
X use.keyboard_language: 6 # (*)
X--- 70,80 ----
X # Supported values:
X # 1 = North American (ASCII)
X # 2 = British (UK-ASCII)
X! # 3 = Flemish / 14 = French/Belgian
X! # 4 = French Canadian
X # 5 = Danish / 13 = Norwegian
X+ # 6 = Finnish
X+ # 7 = German
X # 12 = Swedish
X # If yhis values is incorrect, kehpager works incorrectly !!!
X use.keyboard_language: 6 # (*)
Xdiff -c ./keyboard.c /home/hydra/hurtta/src/kehpager/keyboard.c
X*** ./keyboard.c Sun Oct 3 13:51:15 1993
X--- /home/hydra/hurtta/src/kehpager/keyboard.c Sun Oct 3 14:10:11 1993
X***************
X*** 26,33 ****
X int key_bottom = -1;
X int key_mquit = -1;
X int key_goto = -1;
X! int key_gdel = -1;
X! int key_gerase = -1;
X int key_genter = -1;
X int key_gpercnt = -1;
X int key_search = -1;
X--- 26,32 ----
X int key_bottom = -1;
X int key_mquit = -1;
X int key_goto = -1;
X!
X int key_genter = -1;
X int key_gpercnt = -1;
X int key_search = -1;
X***************
X*** 36,46 ****
X int key_ssearchn = -1;
X int key_ssearchf = -1;
X int key_sinsert = -1;
X- int key_sdel = -1;
X- int key_serase = -1;
X int key_senter = -1;
X int key_debug = -1;
X
X /* Control keys */
X int key_compose = -1;
X int key_kill = -1;
X--- 35,53 ----
X int key_ssearchn = -1;
X int key_ssearchf = -1;
X int key_sinsert = -1;
X int key_senter = -1;
X int key_debug = -1;
X
X+ int key_reread = -1;
X+ int key_forward = -1;
X+
X+ int key_charset = -1;
X+ int key_cinsert = -1;
X+ int key_center = -1;
X+
X+ int key_edel = -1;
X+ int key_eerase = -1;
X+
X /* Control keys */
X int key_compose = -1;
X int key_kill = -1;
X***************
X*** 79,108 ****
X { &key_top, "keyboard.top", V_KEY },
X { &key_bottom,"keyboard.bottom", V_KEY },
X { &key_mquit, "keyboard.message.clear", V_KEY },
X { &key_goto, "keyboard.goto", V_KEY },
X- { &key_gdel, "keyboard.goto.del", V_KEY },
X- { &key_gerase, "keyboard.goto.erase_line", V_KEY },
X { &key_genter,"keyboard.goto.enter", V_KEY },
X { &key_gpercnt,"keyboard.goto.percent", V_KEY },
X { &key_search,"keyboard.search", V_KEY },
X { &key_searchf,"keyboard.search_first", V_KEY },
X { &key_searchn,"keyboard.search_next", V_KEY },
X! { &key_ssearchn,"keyboard.search.next", V_KEY },
X! { &key_ssearchf,"keyboard.search.first", V_KEY },
X { &key_sinsert, "keyboard.search.self_insert", V_KEY },
X! { &key_sdel, "keyboard.search.del", V_KEY },
X! { &key_serase, "keyboard.search.erase_line", V_KEY },
X! { &key_senter,"keyboard.search.enter", V_KEY },
X
X { NULL, NULL, V_LAST }
X };
X
X! static int * groups [GROUP_count][20] = {
X /* G_PAGER */
X { &key_quit, &key_help, &key_tab, &key_prompt, &key_wrap,
X &key_next, &key_page, &key_prev, &key_redraw,
X &key_lnext, &key_lprev, &key_top, &key_bottom,
X &key_goto, &key_search, &key_searchn, &key_searchf,
X &key_debug, NULL },
X /* G_MESSAGE_LAST */
X { &key_quit, &key_help, &key_tab, &key_prompt, &key_wrap,
X--- 86,132 ----
X { &key_top, "keyboard.top", V_KEY },
X { &key_bottom,"keyboard.bottom", V_KEY },
X { &key_mquit, "keyboard.message.clear", V_KEY },
X+ { &key_reread, "keyboard.reread_file", V_KEY },
X+ { &key_forward, "keyboard.forward", V_KEY },
X { &key_goto, "keyboard.goto", V_KEY },
X { &key_genter,"keyboard.goto.enter", V_KEY },
X { &key_gpercnt,"keyboard.goto.percent", V_KEY },
X { &key_search,"keyboard.search", V_KEY },
X { &key_searchf,"keyboard.search_first", V_KEY },
X { &key_searchn,"keyboard.search_next", V_KEY },
X! { &key_ssearchn,"keyboard.search.next", V_KEY },
X! { &key_ssearchf,"keyboard.search.first", V_KEY },
X { &key_sinsert, "keyboard.search.self_insert", V_KEY },
X! { &key_senter,"keyboard.search.enter", V_KEY },
X! { &key_charset,"keyboard.charset", V_KEY },
X! { &key_cinsert,"keyboard.charset.self_insert", V_KEY },
X! { &key_center, "keyboard.charset.enter", V_KEY },
X
X+ { &key_edel, "keyboard.edit.del", V_KEY },
X+ { &key_eerase, "keyboard.edit.erase_line", V_KEY },
X+
X+ /* OBSOLENT: */
X+ { &key_edel, "keyboard.goto.del", V_KEY },
X+ { &key_eerase, "keyboard.goto.erase_line", V_KEY },
X+ { &key_edel, "keyboard.search.del", V_KEY },
X+ { &key_eerase, "keyboard.search.erase_line", V_KEY },
X+
X { NULL, NULL, V_LAST }
X };
X
X! static int * groups [GROUP_count][40] = {
X /* G_PAGER */
X { &key_quit, &key_help, &key_tab, &key_prompt, &key_wrap,
X &key_next, &key_page, &key_prev, &key_redraw,
X &key_lnext, &key_lprev, &key_top, &key_bottom,
X &key_goto, &key_search, &key_searchn, &key_searchf,
X+ &key_debug, &key_reread, &key_forward, &key_charset,
X+ NULL },
X+ /* G_MESSAGE */
X+ { &key_quit, &key_help, &key_tab, &key_prompt, &key_wrap,
X+ &key_next, &key_page, &key_prev, &key_redraw,
X+ &key_lnext, &key_lprev, &key_top, &key_bottom,
X+ &key_goto, &key_search, &key_searchn, &key_searchf,
X &key_debug, NULL },
X /* G_MESSAGE_LAST */
X { &key_quit, &key_help, &key_tab, &key_prompt, &key_wrap,
X***************
X*** 111,122 ****
X &key_goto, &key_search, &key_searchn, &key_searchf,
X &key_debug, NULL },
X /* G_GOTO */
X! { &key_quit, &key_goto, &key_gdel, &key_genter, &key_gpercnt,
X! &key_redraw, &key_gerase, NULL },
X /* G_SEARCH */
X! { &key_quit, &key_senter, &key_sdel, &key_ssearchn, &key_ssearchf,
X! &key_redraw, &key_serase, &key_sinsert, NULL },
X!
X };
X
X static struct KL {
X--- 135,149 ----
X &key_goto, &key_search, &key_searchn, &key_searchf,
X &key_debug, NULL },
X /* G_GOTO */
X! { &key_quit, &key_goto, &key_edel, &key_genter, &key_gpercnt,
X! &key_redraw, &key_eerase, NULL },
X /* G_SEARCH */
X! { &key_quit, &key_senter, &key_edel, &key_ssearchn, &key_ssearchf,
X! &key_redraw, &key_eerase, &key_sinsert, NULL },
X! /* G_CHARSET */
X! { &key_quit, &key_edel, &key_center, &key_cinsert,
X! &key_redraw, &key_eerase, NULL },
X!
X };
X
X static struct KL {
Xdiff -c ./keyboard.h /home/hydra/hurtta/src/kehpager/keyboard.h
X*** ./keyboard.h Sun Oct 3 13:51:16 1993
X--- /home/hydra/hurtta/src/kehpager/keyboard.h Sun Oct 3 14:10:12 1993
X***************
X*** 21,34 ****
X extern int key_top;
X extern int key_bottom;
X extern int key_mquit;
X extern int key_goto;
X- extern int key_gdel;
X- extern int key_gerase;
X extern int key_genter;
X extern int key_gpercnt;
X- extern int key_debug;
X
X- extern int key_nogroup;
X extern int key_search;
X extern int key_searchf;
X extern int key_searchn;
X--- 21,34 ----
X extern int key_top;
X extern int key_bottom;
X extern int key_mquit;
X+ extern int key_debug;
X+
X+ extern int key_nogroup;
X+
X extern int key_goto;
X extern int key_genter;
X extern int key_gpercnt;
X
X extern int key_search;
X extern int key_searchf;
X extern int key_searchn;
X***************
X*** 35,44 ****
X extern int key_ssearchn;
X extern int key_ssearchf;
X extern int key_sinsert;
X- extern int key_sdel;
X- extern int key_serase;
X extern int key_senter;
X
X extern int key_compose;
X extern int key_kill;
X extern int key_suspend;
X--- 35,51 ----
X extern int key_ssearchn;
X extern int key_ssearchf;
X extern int key_sinsert;
X extern int key_senter;
X
X+ extern int key_edel;
X+ extern int key_eerase;
X+
X+ extern int key_reread;
X+ extern int key_forward;
X+ extern int key_charset;
X+ extern int key_cinsert;
X+ extern int key_center;
X+
X extern int key_compose;
X extern int key_kill;
X extern int key_suspend;
X***************
X*** 47,54 ****
X extern int key_res1;
X extern int key_res2;
X
X! #define GROUP_count 4
X #define G_PAGER 0
X! #define G_MESSAGE_LAST 1
X! #define G_GOTO 2
X! #define G_SEARCH 3
X--- 54,63 ----
X extern int key_res1;
X extern int key_res2;
X
X! #define GROUP_count 6
X #define G_PAGER 0
X! #define G_MESSAGE 1
X! #define G_MESSAGE_LAST 2
X! #define G_GOTO 3
X! #define G_SEARCH 4
X! #define G_CHARSET 5
Xdiff -c ./terminal.c /home/hydra/hurtta/src/kehpager/terminal.c
X*** ./terminal.c Sun Oct 3 13:51:16 1993
X--- /home/hydra/hurtta/src/kehpager/terminal.c Sun Oct 3 14:10:08 1993
X***************
X*** 272,281 ****
X #ifdef VREPRINT
X make_default(&key_redraw,tty_state.c_cc[VREPRINT]);
X #endif
X! make_default(&key_gerase,tty_state.c_cc[VKILL]);
X! make_default(&key_gdel,tty_state.c_cc[VERASE]);
X! make_default(&key_serase,tty_state.c_cc[VKILL]);
X! make_default(&key_sdel,tty_state.c_cc[VERASE]);
X
X /* LNEXT Character is SunOS 4 and SunOS 5 works differently */
X #ifdef SUNOS4
X--- 272,279 ----
X #ifdef VREPRINT
X make_default(&key_redraw,tty_state.c_cc[VREPRINT]);
X #endif
X! make_default(&key_eerase,tty_state.c_cc[VKILL]);
X! make_default(&key_edel,tty_state.c_cc[VERASE]);
X
X /* LNEXT Character is SunOS 4 and SunOS 5 works differently */
X #ifdef SUNOS4
Xdiff -c ./window.c /home/hydra/hurtta/src/kehpager/window.c
X*** ./window.c Sun Oct 3 13:51:16 1993
X--- /home/hydra/hurtta/src/kehpager/window.c Sun Oct 3 14:10:08 1993
X***************
X*** 497,516 ****
X windows[win].buffer_lines[i].wrappos += -W1+WL;
X
X if (windows[win].mapped &&
X! YS+WL >= windows[win].first &&
X! YS+WL <= bl) {
X
X! set_margins(windows[win].first,bl);
X
X! for (i=0; i < W1-WL; i++) delete_line(YS+WL);
X
X- set_margins(-1,-1);
X-
X /* print_win_line may need this */
X! for (i=0; i < WL; i++) {
X! windows[win].line_mapping[ry1+i].offset=wraplist[i];
X! windows[win].line_mapping[ry1+i].line = Y-1;
X! }
X
X for (i=0; i < W1-WL && i < vl; i++)
X print_win_line(win,
X--- 497,518 ----
X windows[win].buffer_lines[i].wrappos += -W1+WL;
X
X if (windows[win].mapped &&
X! (YS+WL >= windows[win].first && YS+WL <= bl ||
X! YS+W1 >= windows[win].first && YS+W1 <= bl)) {
X
X! if (YS+WL >= windows[win].first && YS+WL <= bl) {
X! set_margins(windows[win].first,bl);
X!
X! for (i=0; i < W1-WL; i++) delete_line(YS+WL);
X
X! set_margins(-1,-1);
X! }
X
X /* print_win_line may need this */
X! for (i=0; i < WL; i++) {
X! windows[win].line_mapping[ry1+i].offset=wraplist[i];
X! windows[win].line_mapping[ry1+i].line = Y-1;
X! }
X
X for (i=0; i < W1-WL && i < vl; i++)
X print_win_line(win,
X***************
X*** 607,613 ****
X {
X int x;
X
X! if (-1 == Y) Y = windows[win].mapping_len +1;
X if (-1 == X) {
X if (Y <= windows[win].buffer_len)
X X = windows[win].buffer_lines[Y-1].len +1;
X--- 609,615 ----
X {
X int x;
X
X! if (-1 == Y) Y = windows[win].buffer_len +1;
X if (-1 == X) {
X if (Y <= windows[win].buffer_len)
X X = windows[win].buffer_lines[Y-1].len +1;
X***************
X*** 627,633 ****
X }
X
X void clear_window_line(int win,int Y) {
X! if (-1 == Y) Y = windows[win].mapping_len +1;
X reserve_line(win,Y);
X
X if (windows[win].buffer_lines[Y-1].chars) {
X--- 629,635 ----
X }
X
X void clear_window_line(int win,int Y) {
X! if (-1 == Y) Y = windows[win].buffer_len +1;
X reserve_line(win,Y);
X
X if (windows[win].buffer_lines[Y-1].chars) {
X***************
X*** 816,822 ****
X calculate_prompt();
X }
X
X! int find_buffer_text(int win,int len,int *mapped,int *X,int *Y,int *rY) {
X int y;
X if (*Y < 1) *Y = 1;
X if (*X < 1) *X = 1;
X--- 818,834 ----
X calculate_prompt();
X }
X
X! static int eq_pair(int M1, int M2) {
X! if (M1 == M2) return 1;
X! if (CH_HY == M1 && CH_SHY == M2) return 1;
X! if (CH_SHY == M1 && CH_HY == M2) return 1;
X! if (CH_SPC == M1 && CH_NBSP == M2) return 1;
X! if (CH_NBSP == M1 && CH_SPC == M2) return 1;
X! return 0;
X! }
X!
X! int find_buffer_text(int win,int len,int *mapped,int *X,int *Y,int *rY,
X! int *mlen) {
X int y;
X if (*Y < 1) *Y = 1;
X if (*X < 1) *X = 1;
X***************
X*** 824,833 ****
X for (y = *Y-1; y < windows[win].buffer_len; y++) {
X int x;
X for (x = y == *Y-1 ? *X-1 : 0; x < windows[win].buffer_lines[y].len; x++) {
X! int i;
X! for (i = 0; i < len && x + i < windows[win].buffer_lines[y].len; i++)
X! if (windows[win].buffer_lines[y].chars[x+i].mapped_ch != mapped[i])
X! break;
X if (len == i) {
X int ml;
X *X = x+1;
X--- 836,853 ----
X for (y = *Y-1; y < windows[win].buffer_len; y++) {
X int x;
X for (x = y == *Y-1 ? *X-1 : 0; x < windows[win].buffer_lines[y].len; x++) {
X! int i,j;
X! for (i = 0, j=0;
X! i < len && x + j < windows[win].buffer_lines[y].len; i++,j++)
X! if (!eq_pair(windows[win].buffer_lines[y].chars[x+j].mapped_ch,
X! mapped[i])) {
X! if (CH_SHY == windows[win].buffer_lines[y].chars[x+j].mapped_ch)
X! i--;
X! else if (CH_SHY == mapped[i])
X! j--;
X! else break;
X! }
X!
X if (len == i) {
X int ml;
X *X = x+1;
X***************
X*** 838,843 ****
X--- 858,864 ----
X x >= windows[win].line_mapping[ml+1].offset)
X ml++;
X *rY = ml+1;
X+ *mlen = j;
X return 1;
X }
X }
Xdiff -c ./window.h /home/hydra/hurtta/src/kehpager/window.h
X*** ./window.h Sun Oct 3 13:51:16 1993
X--- /home/hydra/hurtta/src/kehpager/window.h Sun Oct 3 14:10:11 1993
X***************
X*** 23,28 ****
X extern void set_window_status(int win,int tab, int wrap);
X extern void set_win_prompt(int win,int X,int Y);
X extern void set_win_hl(int win,int flags,int X1,int X2,int Y);
X! extern int find_buffer_text(int win,int len,int *mapped,int *X,int *Y,int *rY);
X extern int read_win_char(int win, int X, int Y);
X extern int win_line_len(int win,int Y);
X--- 23,29 ----
X extern void set_window_status(int win,int tab, int wrap);
X extern void set_win_prompt(int win,int X,int Y);
X extern void set_win_hl(int win,int flags,int X1,int X2,int Y);
X! extern int find_buffer_text(int win,int len,int *mapped,int *X,int *Y,int *rY,
X! int *mlen);
X extern int read_win_char(int win, int X, int Y);
X extern int win_line_len(int win,int Y);
SHAR_EOF
chmod 0644 patch01 || echo "restore of patch01 fails"
sed 's/^X//' << 'SHAR_EOF' > patch01.sh &&
X#!/bin/sh
Xset -v
Xif fgrep -s 'Version = "kehpager V1.02"' < kehpager.c ; then
X mv charset.c charset.c.orig && mv charset.c.new charset.c
X patch -c <patch01
Xelse
X echo "Wrong version of kehpager!" 1>&2
X exit 1
Xfi
X
SHAR_EOF
chmod 0644 patch01.sh || echo "restore of patch01.sh fails"
rm -f s2_seq_.tmp
echo "You have unpacked the last part"
exit 0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads