home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!ucselx!network.ucsd.edu!mvb.saic.com!vmsnet-sources
- From: flowers@memstvx1.memst.edu
- Newsgroups: vmsnet.sources
- Subject: C Swing v3.6.4 patches, part 01/04
- Message-ID: <9908347@MVB.SAIC.COM>
- Date: Mon, 04 Jan 1993 20:21:04 GMT
- Organization: Memphis State University
- Lines: 1619
- Approved: Mark.Berryman@Mvb.Saic.Com
-
- Submitted-by: flowers@memstvx1.memst.edu
- Posting-number: Volume 4, Issue 22
- Archive-name: cswing/patch3_01
- Patch-to: cswing: Volume 3, Issue 35-52,93,211-218
-
- $! ------------------ CUT HERE -----------------------
- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
- $!
- $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990
- $! On 10-DEC-1992 15:45:08.48 By user FLOWERS
- $!
- $! This VMS_SHARE Written by:
- $! Andy Harper, Kings College London UK
- $!
- $! Acknowledgements to:
- $! James Gray - Original VMS_SHARE
- $! Michael Bednarek - Original Concept and implementation
- $!
- $!+ THIS PACKAGE DISTRIBUTED IN 4 PARTS, TO KEEP EACH PART
- $! BELOW 100 BLOCKS
- $!
- $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
- $! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
- $!
- $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
- $! 1. AAAREADME_1ST.PAT;364
- $! 2. BUFFER_C.PAT;364
- $! 3. CMD_C.PAT;364
- $! 4. HELP_C.PAT;364
- $! 5. KEYM_C.PAT;364
- $! 6. LINE_C.PAT;364
- $! 7. LINK_V5_COM.PAT;364
- $! 8. MAIN_C.PAT;364
- $! 9. MOST_DOC_FM.PAT;364
- $! 10. MOST_H.PAT;364
- $! 11. MOST_OPTIONS_OPT.PAT;364
- $! 12. OPTIONS_FILE_OPT.PAT;364
- $! 13. PATCH.COM;364
- $! 14. SEARCH_C.PAT;364
- $! 15. SWING_38_C.PAT;364
- $! 16. SWING_C.PAT;364
- $! 17. SWING_H.PAT;364
- $! 18. WINDOW_C.PAT;364
- $!
- $set="set"
- $set symbol/scope=(nolocal,noglobal)
- $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
- $e="write sys$error ""%UNPACK"", "
- $w="write sys$output ""%UNPACK"", "
- $ if f$trnlnm("SHARE_LOG") then $ w = "!"
- $ ve=f$getsyi("version")
- $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START
- $ e "-E-OLDVER, Must run at least VMS 4.4"
- $ v=f$verify(v)
- $ exit 44
- $UNPACK: SUBROUTINE ! P1=filename, P2=checksum
- $ if f$search(P1) .eqs. "" then $ goto file_absent
- $ e "-W-EXISTS, File ''P1' exists. Skipped."
- $ delete 'f'*
- $ exit
- $file_absent:
- $ if f$parse(P1) .nes. "" then $ goto dirok
- $ dn=f$parse(P1,,,"DIRECTORY")
- $ w "-I-CREDIR, Creating directory ''dn'."
- $ create/dir 'dn'
- $ if $status then $ goto dirok
- $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
- $ delete 'f'*
- $ exit
- $dirok:
- $ w "-I-PROCESS, Processing file ''P1'."
- $ if .not. f$verify() then $ define/user sys$output nl:
- $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
- PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
- SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
- CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
- LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
- BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
- IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
- MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
- ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
- 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
- POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
- ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
- COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
- "output_file"));ENDPROCEDURE;Unpacker;QUIT;
- $ delete/nolog 'f'*
- $ CHECKSUM 'P1'
- $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
- $ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
- $ ENDSUBROUTINE
- $START:
- $ create 'f'
- X*** `5B--.vmsnet`5Daaareadme.1st
- X--- `5B--.src`5Daaareadme.1st
- X**************
- X*** 25,31
- X `20
- X The C language version of SWING was written by Simon Brown, and maintained
- V by
- X him through V3.2. It has been modified by many people, and is curre
- Vntly
- X! maintained primarily by Mats Akerberg and Harry Flowers (see end of fi
- Vle).
- X Most of the documentation has been rewitten by Chris Butler. Although
- V the
- X online help is good, you should read the manual. The re-write was necessar
- Vy as
- X he did not have a Fortran compiler, and felt that C was a more appropr
- Viate
- X--- 25,31 -----
- X `20
- X The C language version of SWING was written by Simon Brown, and maintained
- V by
- X him through V3.2. It has been modified by many people, and is curre
- Vntly
- X! maintained primarily by Mats Akerberg, Harry Flowers, and Foteos Macri
- Vdes.
- X Most of the documentation has been rewitten by Chris Butler. Although
- V the
- X online help is good, you should read the manual. The re-write was necessar
- Vy as
- X he did not have a Fortran compiler, and felt that C was a more appropr
- Viate
- X**************
- X*** 160,166
- X Foteos Macrides
- X Worcester Foundation for Experimental Biology
- X Shrewsbury, MA USA
- X! email: MACRIDES@WFEB2.BITNET (on BITNET)
- X `20
- X Chris Butler
- X NEW ZEALAND
- X--- 160,167 -----
- X Foteos Macrides
- X Worcester Foundation for Experimental Biology
- X Shrewsbury, MA USA
- X! email: MACRIDES@SCI.WFEB.EDU (on INTERNET)
- X! MACRIDES@WFEB2.BITNET (on BITNET)
- X `20
- X Chris Butler
- X NEW ZEALAND
- $ CALL UNPACK AAAREADME_1ST.PAT;364 1681350502
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dbuffer.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dbuffer.c;4
- X**************
- X*** 14,19
- X `20
- X unsigned char *C_POS;
- X int C_LINE;
- X `20
- X unsigned char *beg_of_line1()
- X `7B
- X--- 14,24 -----
- X `20
- X unsigned char *C_POS;
- X int C_LINE;
- X+ unsigned char *M_POS;
- X+ int M_FLAG;
- X+ int W_LINE;
- X+ int TAB_R;
- X+ int ESC_NUM;
- X `20
- X unsigned char *beg_of_line1()
- X `7B
- X**************
- X*** 48,65
- X return pos;
- X `7D
- X `20
- X- unsigned char *beg_of_line()
- X- `7B
- X- unsigned char *b;
- X- int d,n;
- X- `20
- X- if (!MOST_W_OPT) return beg_of_line1();
- X- b = beg_of_line1();
- X- d = C_POS - b;
- X- n = d / SCREEN_WIDTH_M1;
- X- return(b + (int) (n * SCREEN_WIDTH_M1));
- X- `7D
- X-`20
- X /* does not move point */
- X unsigned char *end_of_line1()
- X `7B
- X--- 53,58 -----
- X return pos;
- X `7D
- X `20
- X /* does not move point */
- X unsigned char *end_of_line1()
- X `7B
- X**************
- X*** 89,95
- X return pos;
- X `7D
- X `20
- X! unsigned char *end_of_line()
- X `7B
- X unsigned char *b, *e;
- X int n;
- X--- 82,88 -----
- X return pos;
- X `7D
- X `20
- X! unsigned char *beg_of_line()
- X `7B
- X unsigned char *b, *i, *e;
- X int ii = 0,j,k = 1,esc_num = 0;
- X**************
- X*** 91,98
- X `20
- X unsigned char *end_of_line()
- X `7B
- X! unsigned char *b, *e;
- X! int n;
- X `20
- X if (!MOST_W_OPT) return end_of_line1();
- X `20
- X--- 84,91 -----
- X `20
- X unsigned char *beg_of_line()
- X `7B
- X! unsigned char *b, *i, *e;
- X! int ii = 0,j,k = 1,esc_num = 0;
- X `20
- X b = beg_of_line1();
- X `20
- X**************
- X*** 94,100
- X unsigned char *b, *e;
- X int n;
- X `20
- X! if (!MOST_W_OPT) return end_of_line1();
- X `20
- X b = beg_of_line();
- X e = end_of_line1();
- X--- 87,98 -----
- X unsigned char *b, *i, *e;
- X int ii = 0,j,k = 1,esc_num = 0;
- X `20
- X! b = beg_of_line1();
- X! `20
- X! /*
- X! ** if not Wrap mode, return beginning of entire line
- X! */
- X! if (!MOST_W_OPT) return(b);
- X `20
- X M_FLAG = 0;
- X W_LINE = 0;
- X**************
- X*** 96,101
- X `20
- X if (!MOST_W_OPT) return end_of_line1();
- X `20
- X b = beg_of_line();
- X e = end_of_line1();
- X n = (e - b) / SCREEN_WIDTH;
- X--- 94,225 -----
- X */
- X if (!MOST_W_OPT) return(b);
- X `20
- X+ M_FLAG = 0;
- X+ W_LINE = 0;
- X+ TAB_R = 0;
- X+ ESC_NUM = 0;
- X+ e = end_of_line1();
- X+ M_POS = e + 1;
- X+`20
- X+ /*
- X+ ** if a `5EM is in the line and not Verbose mode,
- X+ ** set up overstriking for wrapped lines
- X+ */
- X+ if (!MOST_V_OPT)
- X+ for (i = b; i <= e; i++)
- X+ if (*i == '\015')
- X+ `7B
- X+ M_POS = i;
- X+ M_FLAG = 1;
- X+ `7D
- X+`20
- X+ /*
- X+ ** wrap mode
- X+ */
- X+ for (i = b; i < C_POS; i++)
- X+ `7B
- X+ if (i == e - 1)
- X+ `7B
- X+ return(b);
- X+ `7D
- X+`20
- X+ /*
- X+ ** make adjustments for non-printing characters
- X+ `09 ** if not Verbose mode
- X+ */
- X+ else if (!MOST_V_OPT && (*i < ' ' `7C`7C *i > 126))
- X+ `7B
- X+ /*
- X+ ** overstrike character via backspace (`5EH)
- X+ */
- X+ if (*i == '\b' && ii != 0) ii--;
- X+`20
- X+ /*
- X+ ** overstrike line via `5EM
- X+ */
- X+ else if (*i == '\015') return(b);
- X+ `20
- X+ /*
- X+ ** underline, bold, or reverse via <ESC>`5B#m
- X+ */
- X+ else if (*i == '\033' && i + 3 <= e &&
- X+ *(i + 1) == '`5B' &&
- X+ (*(i + 2) == '1' `7C`7C
- X+ *(i + 2) == '4' `7C`7C
- X+ *(i + 2) == '7' `7C`7C
- X+ *(i + 2) == '0') &&
- X+ *(i + 3) == 'm')
- X+ `7B
- X+ if (*(i + 2) == '1') esc_num = 1;
- X+ else if (*(i + 2) == '4') esc_num = 4;
- X+ else if (*(i + 2) == '7') esc_num = 7;
- X+ else esc_num = 0;
- X+ ii -= 3;
- X+ `7D
- X+`20
- X+ /*
- X+ ** tab (`5EI)
- X+ */
- X+ else if (*i == '\t')
- X+ `7B
- X+ j = 8 * (ii/8 + 1) - ii; /* 8 column tabs */
- X+ while(j--)
- X+ `7B
- X+ ii++;
- X+ if (ii == k*SCREEN_WIDTH_M1 + 1 &&
- X+ *(i + 1) != '\015')
- X+ `7B
- X+ b = i;
- X+ W_LINE++;
- X+ TAB_R +=
- X+ `09`09`09`09 8*(SCREEN_WIDTH_M1/8 + 1) - SCREEN_WIDTH_M1;
- X+ k++;
- X+ ESC_NUM = esc_num;
- X+ `7D
- X+ `7D
- X+ `7D
- X+`20
- X+ /*
- X+ ** don't count other control characters except
- X+ ** bell (`5EG), vertical tab (`5EK), linefeed (`5EL),
- X+ ** or escape (`5E`5B) not followed by `5B#m
- X+ */
- X+ else if (*i != '\007' && *i != '\013' &&
- X+ *i != '\014' && *i != '\033') ;
- X+ `7D
- X+`20
- X+ /*
- X+ ** printable character or always-explicit control character
- X+ */
- X+ else
- X+ `7B
- X+ ii++;
- X+ if (ii == k*SCREEN_WIDTH_M1 + 1 && *(i + 1) != '\015')
- X+ `7B
- X+ b = i;
- X+ W_LINE++;
- X+ TAB_R += 8*(SCREEN_WIDTH_M1/8 + 1) - SCREEN_WIDTH_M
- V1;
- X+ k++;
- X+ ESC_NUM = esc_num;
- X+ `7D
- X+ `7D
- X+ `7D
- X+`20
- X+ return(b);
- X+ `7D
- X+`20
- X+ unsigned char *end_of_line()
- X+ `7B
- X+ unsigned char *b, *e, *i;
- X+ int ii = 0,j;
- X+ `20
- X+ e = end_of_line1();
- X+`20
- X+ /*
- X+ ** if not Wrap mode, return end of entire line
- X+ */
- X+ if (!MOST_W_OPT) return(e);
- X+`20
- X b = beg_of_line();
- X `20
- X /*
- X**************
- X*** 97,105
- X if (!MOST_W_OPT) return end_of_line1();
- X `20
- X b = beg_of_line();
- X! e = end_of_line1();
- X! n = (e - b) / SCREEN_WIDTH;
- X! if (n) return(b + SCREEN_WIDTH_M1);
- X return (e);
- X `7D
- X `20
- X--- 221,307 -----
- X if (!MOST_W_OPT) return(e);
- X `20
- X b = beg_of_line();
- X!`20
- X! /*
- X! ** wrap mode
- X! */
- X! for (i = b; i <= e; i++)
- X! `7B
- X! /*
- X! ** make adjustments for non-printing characters
- X! `09 ** if not Verbose mode
- X! */
- X! if (!MOST_V_OPT && (*i < ' ' `7C`7C *i > 126))
- X! `7B
- X! /*
- X! ** overstrike character via backspace (`5EH)
- X! */
- X! if (*i == '\b' && ii != 0) ii--;
- X!`20
- X! /*
- X! ** overstrike line via `5EM
- X! */
- X! else if (*i == '\015') return(e);
- X!`20
- X! /*
- X! ** underline, bold, or reverse via <ESC>`5B#m
- X! */
- X! else if (*i == '\033' && i + 3 <= e &&
- X! *(i + 1) == '`5B' &&
- X! (*(i + 2) == '1' `7C`7C
- X! *(i + 2) == '4' `7C`7C
- X! *(i + 2) == '7' `7C`7C
- X! *(i + 2) == '0') &&
- X! *(i + 3) == 'm')
- X! `7B
- X! ii -= 3;
- X! `7D
- X!`20
- X! /*
- X! ** tab (`5EI)
- X! */
- X! else if (*i == '\t')
- X! `7B
- X! if (W_LINE)
- X! `7B
- X! if (ii == 0)
- X! j = TAB_R;
- X! else
- X! j = 8 * (ii/8 + 1) - ii + TAB_R;
- X! `7D
- X! else
- X! j = 8 * (ii/8 + 1) - ii; /* 8 column tabs */
- X!`20
- X! while(j--)
- X! `7B
- X! ii++;
- X! if (ii == SCREEN_WIDTH + 1)
- X! return (i);
- X! `7D
- X! `7D
- X!`20
- X! /*
- X! ** don't count other control characters except
- X! ** bell (`5EG), vertical tab (`5EK), linefeed (`5EL),
- X! ** or escape (`5E`5B) not followed by `5B#m
- X! */
- X! else if (*i != '\007' && *i != '\013' &&
- X! *i != '\014' && *i != '\033') ;
- X! `7D
- X!`20
- X! /*
- X! ** printable character or always-explicit control character
- X! */
- X! else
- X! `7B
- X! ii++;
- X! if (ii == SCREEN_WIDTH + 1)
- X! `7B
- X! return (i);
- X! `7D
- X! `7D
- X! `7D
- X!`20
- X return (e);
- X `7D
- X `20
- X**************
- X*** 122,128
- X `7B
- X C_POS = end_of_line();
- X /* next step handles newline at the EOB */
- X! if ((C_POS == EOB) `7C`7C (C_POS == EOB - 1) && (*C_POS ==
- V '\n')) return (save - n - 1);
- X C_LINE++;
- X C_POS++;
- X if (SELECTIVE_I_DISPLAY)
- X--- 324,331 -----
- X `7B
- X C_POS = end_of_line();
- X /* next step handles newline at the EOB */
- X! if ((C_POS == EOB) `7C`7C (C_POS == EOB - 1) && (*C_POS ==
- V '\n'))`20
- X! return (save - n - 1);
- X C_LINE++;
- X C_POS++;
- X if (SELECTIVE_I_DISPLAY && !MOST_W_OPT)
- X**************
- X*** 125,131
- X if ((C_POS == EOB) `7C`7C (C_POS == EOB - 1) && (*C_POS ==
- V '\n')) return (save - n - 1);
- X C_LINE++;
- X C_POS++;
- X! if (SELECTIVE_I_DISPLAY)
- X `7B
- X p = C_POS;
- X ok = 1;
- X--- 328,334 -----
- X return (save - n - 1);
- X C_LINE++;
- X C_POS++;
- X! if (SELECTIVE_I_DISPLAY && !MOST_W_OPT)
- X `7B
- X p = C_POS;
- X ok = 1;
- X**************
- X*** 160,166
- X if (C_POS == BEG) return (n - save - 1);
- X C_POS--;
- X C_LINE--;
- X! if (SELECTIVE_I_DISPLAY)
- X `7B
- X C_POS = beg_of_line();
- X p = C_POS;
- X--- 363,369 -----
- X if (C_POS == BEG) return (n - save - 1);
- X C_POS--;
- X C_LINE--;
- X! if (SELECTIVE_I_DISPLAY && !MOST_W_OPT)
- X `7B
- X C_POS = beg_of_line();
- X p = C_POS;
- X**************
- X*** 188,194
- X int save_line = C_LINE, n;
- X unsigned char *save_beg = beg, *save_eob = EOB, *save_pos = C_POS;
- X `20
- X! if (MOST_B_OPT) return((int)(end - beg) / 16);
- X BEG = C_POS = beg;
- X EOB = end;
- X n = 1;
- X--- 391,402 -----
- X int save_line = C_LINE, n;
- X unsigned char *save_beg = beg, *save_eob = EOB, *save_pos = C_POS;
- X `20
- X! if (MOST_B_OPT)
- X! `7B
- X! n = (int)(end - beg)/16;
- X! if ((n * 16) == (end - beg)) return(n);
- X! else return(n + 1);
- X! `7D
- X BEG = C_POS = beg;
- X EOB = end;
- X n = 1;
- X**************
- X*** 271,276
- X int save_line, dir;
- X register int dif_c, dif_b,dif_t;
- X int ret;
- X `20
- X if (MOST_B_OPT)
- X `7B
- X--- 479,485 -----
- X int save_line, dir;
- X register int dif_c, dif_b,dif_t;
- X int ret;
- X+ extern int S_DIFF;
- X `20
- X if (MOST_B_OPT)
- X `7B
- X**************
- X*** 277,283
- X return (1 + (pos - BEG)/16);
- X `7D
- X `20
- X- `20
- X save_pos = C_POS;
- X save_line = C_LINE;
- X `20
- X--- 486,491 -----
- X return (1 + (pos - BEG)/16);
- X `7D
- X `20
- X save_pos = C_POS;
- X save_line = C_LINE;
- X `20
- X**************
- X*** 319,324
- X C_POS++;
- X C_LINE++;
- X `7D
- X `7D
- X else
- X `7B
- X--- 527,542 -----
- X C_POS++;
- X C_LINE++;
- X `7D
- X+`20
- X+ /*
- X+ ** if this is the unseen portion of a wrapped line,
- X+ ** the display puts it on the next line
- X+ */
- X+ if (MOST_W_OPT &&
- X+ (C_POS == pos `7C`7C
- X+ (C_POS != end_of_line1() &&
- X+ apparant_distance(pos) + S_DIFF >= SCREEN_WIDTH)))
- X+ C_LINE++;
- X `7D
- X else
- X `7B
- X**************
- X*** 335,341
- X return(ret);
- X `7D
- X `20
- X! /* given a buffer position, find the line and column */
- X void find_row_column(unsigned char *pos, int *r, int *c)
- X `7B
- X unsigned char *beg, *save_pos;
- X--- 553,561 -----
- X return(ret);
- X `7D
- X `20
- X! /*
- X! ** Given a buffer position, find the line and column.
- X! */
- X void find_row_column(unsigned char *pos, int *r, int *c)
- X `7B
- X unsigned char *beg, *save_pos;
- X**************
- X*** 339,345
- X void find_row_column(unsigned char *pos, int *r, int *c)
- X `7B
- X unsigned char *beg, *save_pos;
- X! int save_line;
- X `20
- X `20
- X if (pos <= BEG)
- X--- 559,566 -----
- X void find_row_column(unsigned char *pos, int *r, int *c)
- X `7B
- X unsigned char *beg, *save_pos;
- X! int save_line,p;
- X! extern int S_DIFF;
- X `20
- X if (pos <= BEG)
- X `7B
- X**************
- X*** 341,347
- X unsigned char *beg, *save_pos;
- X int save_line;
- X `20
- X-`20
- X if (pos <= BEG)
- X `7B
- X *r = 1;
- X--- 562,567 -----
- X int save_line,p;
- X extern int S_DIFF;
- X `20
- X if (pos <= BEG)
- X `7B
- X *r = 1;
- X**************
- X*** 353,358
- X save_pos = C_POS;
- X *r = what_line(pos);
- X `20
- X if (MOST_B_OPT)
- X `7B
- X *c = (int) (pos - BEG) - *r * 16 + 1;
- X--- 573,581 -----
- X save_pos = C_POS;
- X *r = what_line(pos);
- X `20
- X+ /*`20
- X+ ** Now we have found the line it is on so get the column.
- X+ */
- X if (MOST_B_OPT)
- X `7B
- X *c = (unsigned char *)((int)(pos) - (((int)pos/16) * 16) + 41);
- X**************
- X*** 355,361
- X `20
- X if (MOST_B_OPT)
- X `7B
- X! *c = (int) (pos - BEG) - *r * 16 + 1;
- X return;
- X `7D
- X C_LINE = *r;
- X--- 578,584 -----
- X */
- X if (MOST_B_OPT)
- X `7B
- X! *c = (unsigned char *)((int)(pos) - (((int)pos/16) * 16) + 41);
- X return;
- X `7D
- X `20
- X**************
- X*** 358,363
- X *c = (int) (pos - BEG) - *r * 16 + 1;
- X return;
- X `7D
- X C_LINE = *r;
- X C_POS = pos;
- X `20
- X--- 581,587 -----
- X *c = (unsigned char *)((int)(pos) - (((int)pos/16) * 16) + 41);
- X return;
- X `7D
- X+`20
- X C_LINE = *r;
- X C_POS = pos;
- X *c = apparant_distance(pos) + S_DIFF;
- X**************
- X*** 360,370
- X `7D
- X C_LINE = *r;
- X C_POS = pos;
- X! `20
- X! /* Now we have found the line it is on so.... */
- X! beg = beg_of_line();
- X! *c = 1;
- X! while (beg++ < pos) *c = *c + 1;
- X C_LINE = save_line;
- X C_POS = save_pos;
- X `7D `20
- X--- 584,594 -----
- X `20
- X C_LINE = *r;
- X C_POS = pos;
- X! *c = apparant_distance(pos) + S_DIFF;
- X! if (MOST_W_OPT)
- X! if (end_of_line() != end_of_line1())
- X! if (*c >= SCREEN_WIDTH) *c -= (SCREEN_WIDTH - 1);
- X!`20
- X C_LINE = save_line;
- X C_POS = save_pos;
- X `7D `20
- X**************
- X*** 392,397
- X Buffer *buf;
- X `20
- X buf = (Buffer *) malloc(sizeof(Buffer));
- X strcpy(buf->file,file);
- X return(buf);
- X `7D
- X--- 616,622 -----
- X Buffer *buf;
- X `20
- X buf = (Buffer *) malloc(sizeof(Buffer));
- X+ buf->mark = 0;
- X strcpy(buf->file,file);
- X return(buf);
- X `7D
- X**************
- X*** 395,397
- X strcpy(buf->file,file);
- X return(buf);
- X `7D
- X--- 620,624 -----
- X strcpy(buf->file,file);
- X return(buf);
- X `7D
- X+`20
- X+`20
- $ CALL UNPACK BUFFER_C.PAT;364 1165202775
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dcmd.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dcmd.c;3
- X**************
- X*** 14,20
- X int do_extended_key()
- X `7B
- X char ch, och, junk`5B80`5D;
- X! int quit = 0, n;
- X unsigned char *save;
- X `20
- X select_minibuffer();
- X--- 14,20 -----
- X int do_extended_key()
- X `7B
- X char ch, och, junk`5B80`5D;
- X! int quit = 0, n, m_bell = 0;
- X unsigned char *save;
- X `20
- X select_minibuffer();
- X**************
- X*** 132,138
- X NUM_LINES = count_lines(BEG,EOB);
- X `7D
- X if (SELECTIVE_I_DISPLAY)
- X! sprintf(junk,
- X "Selective Indentation Display set at column %u.
- V",n);
- X else
- X sprintf(junk,
- X--- 132,139 -----
- X NUM_LINES = count_lines(BEG,EOB);
- X `7D
- X if (SELECTIVE_I_DISPLAY)
- X! `7B
- X! sprintf(junk,
- X "Selective Indentation Display set at column %u.
- V",n);
- X if (MOST_W_OPT)
- X `7B
- X**************
- X*** 134,139
- X if (SELECTIVE_I_DISPLAY)
- X sprintf(junk,
- X "Selective Indentation Display set at column %u.
- V",n);
- X else
- X sprintf(junk,
- X "Selective Indentation Display off. Precede the :O with a number to s
- Vet.");
- X--- 135,146 -----
- X `7B
- X sprintf(junk,
- X "Selective Indentation Display set at column %u.
- V",n);
- X+ if (MOST_W_OPT)
- X+ `7B
- X+ strcat(junk," Disable Wrap to implement.");
- X+ m_bell = 1;
- X+ `7D
- X+ `7D
- X else
- X `7B
- X strcpy(junk,"Selective Indentation Display off.");
- X**************
- X*** 135,143
- X sprintf(junk,
- X "Selective Indentation Display set at column %u.
- V",n);
- X else
- X! sprintf(junk,
- X! "Selective Indentation Display off. Precede the :O with a number to s
- Vet.");
- X! most_message(junk,0);
- X break;
- X `20
- X /*
- X--- 142,152 -----
- X `7D
- X `7D
- X else
- X! `7B
- X! strcpy(junk,"Selective Indentation Display off.");
- X! strcat(junk," Precede the :O with a number to set."
- V);
- X! `7D
- X! most_message(junk,m_bell);
- X break;
- X `20
- X /*
- X**************
- X*** 166,173
- X `7B
- X strcpy(junk,"Display Tabs as `5EI on.");
- X if (!MOST_V_OPT)
- X! strcat(junk," Toggle Verbose mode to implement.")
- V;
- X! most_message(junk,0);
- X `7D
- X break;
- X `20
- X--- 175,185 -----
- X `7B
- X strcpy(junk,"Display Tabs as `5EI on.");
- X if (!MOST_V_OPT)
- X! `7B
- X! strcat(junk," Toggle Verbose mode to implemen
- Vt.");
- X! m_bell = 1;
- X! `7D
- X! most_message(junk,m_bell);
- X `7D
- X break;
- X `20
- X**************
- X*** 192,198
- X MOST_W_OPT = !MOST_W_OPT;
- X NUM_LINES = count_lines(BEG,EOB);
- X if (MOST_W_OPT)
- X! most_message("Wrapping on.",0);
- X else
- X most_message("Wrapping off.",0);
- X break;
- X--- 204,219 -----
- X MOST_W_OPT = !MOST_W_OPT;
- X NUM_LINES = count_lines(BEG,EOB);
- X if (MOST_W_OPT)
- X! `7B
- X! strcpy(junk,"Wrapping on.");
- X! if (SELECTIVE_I_DISPLAY)
- X! `7B
- X! strcat(junk,
- X! " Selective Identation Display suppress
- Ved.");
- X! m_bell = 1;
- X! `7D
- X! most_message(junk,m_bell);
- X! `7D
- X else
- X `7B
- X strcpy(junk,"Wrapping off.");
- X**************
- X*** 194,200
- X if (MOST_W_OPT)
- X most_message("Wrapping on.",0);
- X else
- X! most_message("Wrapping off.",0);
- X break;
- X `20
- X default:
- X--- 215,230 -----
- X most_message(junk,m_bell);
- X `7D
- X else
- X! `7B
- X! strcpy(junk,"Wrapping off.");
- X! if (SELECTIVE_I_DISPLAY)
- X! `7B
- X! strcat(junk,
- X! " Selective Identation Display implement
- Ved.");
- X! m_bell = 1;
- X! `7D
- X! most_message(junk,m_bell);
- X! `7D
- X break;
- X `20
- X default:
- $ CALL UNPACK CMD_C.PAT;364 1698939476
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dhelp.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dhelp.c;4
- X**************
- X*** 100,106
- X if (file_visible(buf_name)) return;
- X if (!split_window())
- X `7B
- X! most_message("Two many windows.",1);
- X return;
- X `7D
- X update_status(1); /* create status line of prev. window */
- X--- 100,106 -----
- X if (file_visible(buf_name)) return;
- X if (!split_window())
- X `7B
- X! most_message("Too many windows.",1);
- X return;
- X `7D
- X update_status(1); /* create status line of prev. window */
- $ CALL UNPACK HELP_C.PAT;364 487664408
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dkeym.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dkeym.c;4
- X**************
- X*** 1046,1053
- X `7B
- X int mark = BUF->mark;
- X BUF->mark = C_LINE;
- X! update_window(mark);
- X! most_message("Mark Set.",0);
- X `7D
- X `20
- X void one_window_cmd()
- X--- 1046,1058 -----
- X `7B
- X int mark = BUF->mark;
- X BUF->mark = C_LINE;
- X! if (!mark `7C`7C mark == BUF->mark)
- X! most_message("Mark Set.",0);
- X! else
- X! `7B
- X! update_window(mark);
- X! most_message("Mark Set. Toggled to previous mark.",0);
- X! `7D
- X `7D
- X `20
- X void one_window_cmd()
- X**************
- X*** 1078,1083
- X int col, line, n = 1;
- X unsigned char *pos;
- X `20
- X if (DIGIT_ARG != NULL) n = *DIGIT_ARG;
- X line = search(CURS_POS + SEARCH_DIR, n, &col);
- X if (line < 1) return;
- X--- 1083,1094 -----
- X int col, line, n = 1;
- X unsigned char *pos;
- X `20
- X+ if (SELECTIVE_I_DISPLAY)
- X+ `7B
- X+ most_message
- X+ ("Search disabled when Selective Indentation Display is set
- V",1);
- X+ return;
- X+ `7D
- X if (DIGIT_ARG != NULL) n = *DIGIT_ARG;
- X line = search(CURS_POS + SEARCH_DIR, n, &col);
- X if (line < 1) return;
- X**************
- X*** 1091,1096
- X `20
- X void search_cmd()
- X `7B
- X SEARCH_DIR = 1;
- X if (read_from_minibuffer("Search /",SEARCH_STR) == -1)
- X `7B
- X--- 1102,1113 -----
- X `20
- X void search_cmd()
- X `7B
- X+ if (SELECTIVE_I_DISPLAY)
- X+ `7B
- X+ most_message
- X+ ("Search disabled when Selective Indentation Display is set
- V",1);
- X+ return;
- X+ `7D
- X SEARCH_DIR = 1;
- X if (read_from_minibuffer("Search /",SEARCH_STR) == -1)
- X `7B
- X**************
- X*** 1106,1111
- X `20
- X void search_back_cmd()
- X `7B
- X SEARCH_DIR = -1;
- X if (read_from_minibuffer("Search \\",SEARCH_STR) == -1)
- X `7B
- X--- 1123,1134 -----
- X `20
- X void search_back_cmd()
- X `7B
- X+ if (SELECTIVE_I_DISPLAY)
- X+ `7B
- X+ most_message
- X+ ("Search disabled when Selective Indentation Display is set
- V",1);
- X+ return;
- X+ `7D
- X SEARCH_DIR = -1;
- X if (read_from_minibuffer("Search \\",SEARCH_STR) == -1)
- X `7B
- X**************
- X*** 1174,1179
- X if (SCREEN_WIDTH == 80)
- X `7B
- X set_width(132);
- X `7D `20
- X else if (SCREEN_WIDTH == 132)
- X `7B
- X--- 1197,1203 -----
- X if (SCREEN_WIDTH == 80)
- X `7B
- X set_width(132);
- X+ most_message("Display Width toggled to 132.",0);
- X `7D `20
- X else if (SCREEN_WIDTH == 132)
- X `7B
- X**************
- X*** 1178,1182
- X else if (SCREEN_WIDTH == 132)
- X `7B
- X set_width(80);
- X! `7D `20
- X `7D
- X--- 1202,1209 -----
- X else if (SCREEN_WIDTH == 132)
- X `7B
- X set_width(80);
- X! most_message("Display Width toggled to 80.",0);
- X! `7D
- X! else
- X! most_message("Width can only be toggled for 80 or 132 column windows
- V",1);
- X `7D
- $ CALL UNPACK KEYM_C.PAT;364 524160985
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dline.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dline.c;6
- X**************
- X*** 5,10
- X #include "line.h"
- X `20
- X extern int COLUMN;
- X `20
- X #define MAX_LINE_LEN 500
- X `20
- X--- 5,15 -----
- X #include "line.h"
- X `20
- X extern int COLUMN;
- X+ extern unsigned char *M_POS;
- X+ extern int M_FLAG;
- X+ extern int W_LINE;
- X+ extern int TAB_R;
- X+ extern int ESC_NUM;
- X `20
- X #define MAX_LINE_LEN 500
- X `20
- X**************
- X*** 85,92
- X int analyse_line(unsigned char *beg,
- X unsigned char *end, char *out, char *attributes)
- X `7B
- X! int test, ii, fold, ii_max, j, ok;
- X! unsigned char ch,attr;
- X `20
- X test = 0;
- X ii = 0;
- X--- 90,97 -----
- X int analyse_line(unsigned char *beg,
- X unsigned char *end, char *out, char *attributes)
- X `7B
- X! int test, ii, fold, ii_max, j, ok, esc_flag = 0;
- X! unsigned char *b,*e,*b1,*e1,ch,attr,at_esc = ' ';
- X `20
- X test = 0;
- X ii = 0;
- X**************
- X*** 92,97
- X ii = 0;
- X ii_max = 0;
- X fold = 0;
- X /*
- X ** while character attributes need to be assigned
- X */
- X--- 97,121 -----
- X ii = 0;
- X ii_max = 0;
- X fold = 0;
- X+ if (MOST_W_OPT)
- X+ `7B
- X+ if (W_LINE)
- X+ `7B
- X+ esc_flag = 1;
- X+ if (ESC_NUM == 1) at_esc = 'b';
- X+ else if (ESC_NUM == 4) at_esc = 'u';
- X+ else if (ESC_NUM == 7) at_esc = 'r';
- X+ else esc_flag = 0;
- X+ `7D
- X+ if (M_FLAG)
- X+ `7B
- X+ b = beg;
- X+ e = end;
- X+ `09`09b1 = beg_of_line1();
- X+ e1 = end_of_line1();
- X+ `7D
- X+ `7D
- X+`20
- X /*
- X ** while character attributes need to be assigned
- X */
- X**************
- X*** 103,109
- X attr = ' '; /* turn off underlining or bolding attribute */
- X `20
- X /*
- X! ** set up bolding of line if `5EM
- X */
- X if (!MOST_V_OPT && ch == '\015')
- X `7B
- X--- 127,133 -----
- X attr = ' '; /* turn off underlining or bolding attribute */
- X `20
- X /*
- X! ** set up bolding of line via `5EM
- X */
- X if (!MOST_V_OPT && ch == '\015')
- X `7B
- X**************
- X*** 112,117
- X fold = 1;
- X if (ii > ii_max) ii_max = ii - 1; /* `5EM contribute
- Vs nil */
- X ii = 0;
- X `7D
- X `7D
- X `20
- X--- 136,149 -----
- X fold = 1;
- X if (ii > ii_max) ii_max = ii - 1; /* `5EM contribute
- Vs nil */
- X ii = 0;
- X+ if (MOST_W_OPT && W_LINE)
- X+ `7B
- X+ beg = M_POS - b1 + b + 1;
- X+ if (beg > e1)
- X+ `7B
- X+ beg = e1 + 1;
- X+ `7D
- X+ `7D
- X `7D
- X `7D
- X `20
- X**************
- X*** 125,131
- X `7D
- X `20
- X /*
- X! ** assign bolding or underlining attributes
- X */
- X else if (test `7C`7C fold)
- X `7B
- X--- 157,164 -----
- X `7D
- X `20
- X /*
- X! ** set up or turn off bolding, underlining or reversing
- X! ** invoked via an <ESC>`5B#m found within the line
- X */
- X else if (!MOST_V_OPT && ch == '\033' && *beg == '`5B' &&
- X (*(beg + 1) == '0' `7C`7C *(beg + 1) == '1' `7C`7C
- X**************
- X*** 127,132
- X /*
- X ** assign bolding or underlining attributes
- X */
- X else if (test `7C`7C fold)
- X `7B
- X test = 0;
- X--- 160,208 -----
- X ** set up or turn off bolding, underlining or reversing
- X ** invoked via an <ESC>`5B#m found within the line
- X */
- X+ else if (!MOST_V_OPT && ch == '\033' && *beg == '`5B' &&
- X+ (*(beg + 1) == '0' `7C`7C *(beg + 1) == '1' `7C`7C
- X+ *(beg + 1) == '4' `7C`7C *(beg + 1) == '7') &&
- X+ *(beg + 2) == 'm')
- X+ `7B
- X+ beg++;
- X+ esc_flag = 1;
- X+ if (*beg == '1') at_esc = 'b';
- X+ else if (*beg == '4') at_esc = 'u';
- X+ else if (*beg == '7') at_esc = 'r';
- X+ else
- X+ `7B
- X+ at_esc = ' ';
- X+ esc_flag = 0;
- X+ `7D
- X+ beg += 2;
- X+ `7D
- X+`20
- X+ /*
- X+ ** expand tabs to 8 spaces if '\t' (`5EI)
- X+ */
- X+ else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
- X+ `7B
- X+ if (MOST_W_OPT && W_LINE)
- X+ `7B
- X+ if (ii == 0)
- X+ j = TAB_R;
- X+ else
- X+ j = 8 * (ii/8 + 1) - ii + TAB_R;
- X+ `7D
- X+ else
- X+ j = 8 * (ii/8 + 1) - ii; /* 8 column tabs */
- X+ while(j--)
- X+ `7B
- X+ out`5Bii`5D = ' ';
- X+ attributes`5Bii++`5D = ' ';
- X+ `7D
- X+ `7D
- X+ `20
- X+ /*
- X+ ** assign bolding or underlining attributes
- X+ ** invoked via `5EM or '\b' (`5EH)
- X+ */
- X else if (test `7C`7C fold)
- X `7B
- X test = 0;
- X**************
- X*** 146,152
- X `7D
- X `20
- X /*
- X! ** expand tabs to 8 spaces if '\t' (`5EI)
- X */
- X else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
- X `7B
- X--- 222,229 -----
- X `7D
- X `20
- X /*
- X! ** assign bolding, underlining or reversing attributes
- X! ** invoked via an <ESC>`5B#m found within the line
- X */
- X else if (esc_flag)
- X `7B
- X**************
- X*** 148,154
- X /*
- X ** expand tabs to 8 spaces if '\t' (`5EI)
- X */
- X! else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
- X `7B
- X j = 8 * (ii/8 + 1) - ii; /* 8 column tabs */
- X while(j--)
- X--- 225,231 -----
- X ** assign bolding, underlining or reversing attributes
- X ** invoked via an <ESC>`5B#m found within the line
- X */
- X! else if (esc_flag)
- X `7B
- X attributes`5Bii`5D = at_esc; /* assign attribute */
- X out`5Bii++`5D = ch;
- X**************
- X*** 150,161
- X */
- X else if (ch == '\t' && (!MOST_T_OPT `7C`7C !MOST_V_OPT))
- X `7B
- X! j = 8 * (ii/8 + 1) - ii; /* 8 column tabs */
- X! while(j--)
- X! `7B
- X! out`5Bii`5D = ' ';
- X! attributes`5Bii++`5D = attr;
- X! `7D
- X `7D
- X `20
- X /*
- X--- 227,234 -----
- X */
- X else if (esc_flag)
- X `7B
- X! attributes`5Bii`5D = at_esc; /* assign attribute */
- X! out`5Bii++`5D = ch;
- X `7D
- X `20
- X /*
- X**************
- X*** 157,163
- X attributes`5Bii++`5D = attr;
- X `7D
- X `7D
- X! `20
- X /*
- X ** no bold or underline attribute
- X */
- X--- 230,236 -----
- X attributes`5Bii`5D = at_esc; /* assign attribute */
- X out`5Bii++`5D = ch;
- X `7D
- X!`20
- X /*
- X ** no bold, underline, or reverse attribute
- X */
- X**************
- X*** 159,165
- X `7D
- X `20
- X /*
- X! ** no bold or underline attribute
- X */
- X else
- X `7B
- X--- 232,238 -----
- X `7D
- X `20
- X /*
- X! ** no bold, underline, or reverse attribute
- X */
- X else
- X `7B
- X**************
- X*** 166,171
- X out`5Bii`5D = ch;
- X attributes`5Bii++`5D = attr;
- X `7D
- X `7D /* while */
- X if (fold) ii = ii_max + 1;
- X `20
- X--- 239,272 -----
- X out`5Bii`5D = ch;
- X attributes`5Bii++`5D = attr;
- X `7D
- X+`20
- X+ /*
- X+ ** handle overstriking of wrapped lines
- X+ ** via `5EM if it is in a later line
- X+ */
- X+ if (!MOST_V_OPT && MOST_W_OPT && M_FLAG &&
- X+ `09 (beg <= M_POS && beg == end + 1))
- X+ `7B
- X+ if (!W_LINE)
- X+ `7B
- X+ beg = M_POS + 1;
- X+ end = M_POS - b1 + e + 1;
- X+ `09`09 if (end > e1) end = e1;
- X+ `7D
- X+ else
- X+ `7B
- X+ beg = M_POS - b1 + b + 1;
- X+ if (beg > e1) beg = end + 1;
- X+ else
- X+ `7B
- X+ end = M_POS - b1 + e + 1;
- X+ if (end > e1) end = e1;
- X+ `7D
- X+ `7D
- X+ fold = 1;
- X+ ii_max = ii - 1;
- X+ ii = 0;
- X+ `7D
- X `7D /* while */
- X if (fold) ii = ii_max + 1;
- X `20
- X**************
- X*** 255,261
- X if (!MOST_V_OPT)
- X `7B
- X /*
- X! ** does bolding or underlining need to be turned on?
- X */
- X at = attr`5Bi`5D;
- X if ((at != ' ') && (!bold `7C`7C count == COLUMN))
- X--- 356,362 -----
- X if (!MOST_V_OPT)
- X `7B
- X /*
- X! ** does bold, underline, or reverse need to be turned on?
- X */
- X at = attr`5Bi`5D;
- X if ((at != ' ') && (!bold `7C`7C count == COLUMN))
- X**************
- X*** 261,267
- X if ((at != ' ') && (!bold `7C`7C count == COLUMN))
- X `7B
- X bold = 1;
- X! /* u and b have same length */
- X if (ok) for (j = 0; j < b_len; j++)
- X `7B
- X if (at == 'b') out`5Bii++`5D = b_str`5Bj`5D;
- X--- 362,368 -----
- X if ((at != ' ') && (!bold `7C`7C count == COLUMN))
- X `7B
- X bold = 1;
- X! /* u, b and r have same length */
- X if (ok) for (j = 0; j < b_len; j++)
- X `7B
- X if (at == 'b')
- X**************
- X*** 264,271
- X /* u and b have same length */
- X if (ok) for (j = 0; j < b_len; j++)
- X `7B
- X! if (at == 'b') out`5Bii++`5D = b_str`5Bj`5D;
- X! else out`5Bii++`5D = u_str`5Bj`5D;
- X `7D
- X `20
- X `7D
- X--- 365,376 -----
- X /* u, b and r have same length */
- X if (ok) for (j = 0; j < b_len; j++)
- X `7B
- X! if (at == 'b')
- X! out`5Bii++`5D = b_str`5Bj`5D;
- X! else if (at == 'u')
- X! out`5Bii++`5D = u_str`5Bj`5D;
- X! else
- X! out`5Bii++`5D = r_str`5Bj`5D;
- X `7D
- X `20
- X `7D
- X**************
- X*** 269,274
- X `7D
- X `20
- X `7D
- X /*
- X ** does bolding or underlining need to be turned off?
- X */
- X--- 374,380 -----
- X `7D
- X `20
- X `7D
- X+`20
- X /*
- X ** does bold, underline, or reverse need to be turned off
- V?
- X */
- X**************
- X*** 270,276
- X `20
- X `7D
- X /*
- X! ** does bolding or underlining need to be turned off?
- X */
- X else if ((at == ' ') && bold)
- X `7B
- X--- 376,382 -----
- X `7D
- X `20
- X /*
- X! ** does bold, underline, or reverse need to be turned off
- V?
- X */
- X else if ((at == ' ') && bold)
- X `7B
- X**************
- X*** 277,282
- X bold = 0;
- X if (ok) for (j = 0; j < n_len; j++) out`5Bii++`5D =
- V n_str`5Bj`5D;
- X `7D
- X /*
- X ** if its bold or underlined and line is wrapped,
- X ** increment count by 2
- X--- 383,389 -----
- X bold = 0;
- X if (ok) for (j = 0; j < n_len; j++) out`5Bii++`5D =
- V n_str`5Bj`5D;
- X `7D
- X+`20
- X /*
- X ** if it's an escape or control character
- X ** don't count it
- X**************
- X*** 278,285
- X if (ok) for (j = 0; j < n_len; j++) out`5Bii++`5D =
- V n_str`5Bj`5D;
- X `7D
- X /*
- X! ** if its bold or underlined and line is wrapped,
- X! ** increment count by 2
- X */
- X if (at != ' ' && MOST_W_OPT)
- X count += 2;
- X--- 385,392 -----
- X `7D
- X `20
- X /*
- X! ** if it's an escape or control character
- X! ** don't count it
- X */
- X if (ch < ' ' `7C`7C ch > 126)
- X `7B
- X**************
- X*** 281,297
- X ** if its bold or underlined and line is wrapped,
- X ** increment count by 2
- X */
- X! if (at != ' ' && MOST_W_OPT)
- X! count += 2;
- X! /*
- X! ** if it's an escape sequence or control character
- X! ** and line is not wrapped, don't count it
- X! */
- X! if (ch < ' ' && !MOST_W_OPT)
- X! if (ch == '\033')
- X! count -= b_len;
- X! else
- X! count--;
- X `7D /* if not Verbose mode */
- X `20
- X /*
- X--- 388,397 -----
- X ** if it's an escape or control character
- X ** don't count it
- X */
- X! if (ch < ' ' `7C`7C ch > 126)
- X! `7B
- X! count--;
- X! `7D
- X `7D /* if not Verbose mode */
- X `20
- X /*
- X**************
- X*** 331,337
- X j = max_col - save;
- X `7D
- X `20
- X! if (ok && (j > s_len))`20
- X `7B
- X ii = mark;
- X sprintf(work,s_str,j);
- X--- 431,437 -----
- X j = max_col - save;
- X `7D
- X `20
- X! if (ok && (j > s_len) && (count < max_col))`20
- X `7B
- X ii = mark;
- X sprintf(work,s_str,j);
- X**************
- X*** 337,343
- X sprintf(work,s_str,j);
- X work_len = strlen(work);
- X for (j = 0; j < work_len; j++) out`5Bii++`5D = work`
- V5Bj`5D;
- X- if (count > max_col) dollar = ii++;
- X `7D
- X else if (count > max_col)
- X `7B
- X--- 437,442 -----
- +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+-
-
-