static char sccsid
[] = "@(#)n7.c 2.3 (CWI) 86/08/14";
if( dip == d && numtab[NL].val == -1)
if (dip
== d
&& numtab
[NL
].val
== -1) {
} else if (pendw
&& !brflg
) {
if ((lastl
= ll
- un
) < ne
)
if (admod
&& ad
&& (brflg
!= 2)) {
un
+= quant(nel
/ 2, HOR
);
if (lastl
+ un
> dip
->maxl
)
for (i
= line
; nc
> 0; ) {
if ((cbits(j
= *i
++)) == ' ') {
} while ((cbits(j
= *i
++)) == ' ');
} else if ((totout
& 01) || adrem
/ resol
>= nwd
) {
if ((k
= ll
- un
- lastl
+ ics
) > 0)
if (numtab
[NL
].val
> dip
->hnl
)
dip
->hnl
= numtab
[NL
].val
;
for (k
= ls
- 1; k
> 0 && !trap
; k
--)
nw
= width('1' | nrbits
);
if (numtab
[LN
].val
% ndf
) {
un
+= nw
* (3 + nms
+ ni
);
if (numtab
[LN
].val
< 100)
fnumb(numtab
[LN
].val
, pchar
);
if ((dip
== d
) && (numtab
[NL
].val
== -1)) {
while ((cbits(i
= GETCH())) == ' ') {
nflush
= pendt
= ch
= spcnt
= 0;
adsp
= (adsp
/ HOR
) * HOR
;
adrem
= nel
- adsp
*(nwd
-1);
while ((j
= (cbits(i
= GETCH()))) != '\n') {
if ((i
= quant(nel
/ 2, HOR
)) > 0)
storeline((tchar
)FILLER
, 0);
if (it
&& (--it
== 0) && itmac
)
if (linep
>= line
+ lnsize
- 1) {
errprint("Line overflow.");
pchar1((tchar
)dip
->alss
);
if (dip
->ditrap
&& !dip
->ditf
&& dip
->dnl
>= dip
->ditrap
&& dip
->dimac
)
if (control(dip
->dimac
, 0)) {
nlss
= dip
->alss
+ dip
->blss
+ lss
;
dip
->alss
= dip
->blss
= 0;
ejf
= dip
->hnl
= numtab
[NL
].val
= 0;
if ((!nc
&& !wch
) || ndone
)
if (numtab
[PN
].val
== pfrom
) {
newpage(numtab
[PN
].val
); /* supposedly in a clean state so can pause */
if (numtab
[NL
].val
== 0) {
if ((j
= findn(0)) != NTRAP
)
trap
= control(mlist
[j
], 0);
} else if ((i
= findt(numtab
[NL
].val
- nlss
)) <= nlss
) {
if ((j
= findn1(numtab
[NL
].val
- nlss
+ i
)) == NTRAP
) {
trap
= control(mlist
[j
], 0);
for (i
= 0; i
< NTRAP
; i
++) {
pfrom
= pto
>=0 ? pto
: -pto
;
if (dip
->dimac
&& (i
= dip
->ditrap
- a
) > 0)
for (i
= 0; i
< NTRAP
; i
++) {
lss
= findt(numtab
[NL
].val
);
if (numtab
[NL
].val
&& !trap
)
while (cbits(i
= *wp
++) == ' ') {
if (wne
> nel
&& !hyoff
&& hyf
&& (!nwd
|| nel
> 3 * sps
) &&
(!(hyf
& 02) || (findt1() > lss
)))
while (*hyp
&& *hyp
<= wp
)
if (hyoff
!= 1 && *hyp
== wp
) {
if (!wdstart
|| (wp
> wdstart
+ 1 && wp
< wdend
&&
(!(hyf
& 04) || wp
< wdend
- 1) && /* 04 => last 2 */
(!(hyf
& 010) || wp
> wdstart
+ 2))) { /* 010 => 1st 2 */
storeline((tchar
)IMP
, 0);
return(0); /* line didn't fill up */
hys
= width((tchar
)HYPHEN
);
if ((i
= cbits(*(linep
- 1))) != '-' && i
!= EMDASH
) {
*linep
= (*(linep
- 1) & SFMASK
) | HYPHEN
;
return(1); /* line filled up */
while (1) { /* picks up 1st char of word */
hyoff
= 1; /* 1 => don't hyphenate */
storeword(' ' | chbits
, sps
);
storeword(' ' | chbits
, sps
);
if (hyp
> (hyptr
+ NHYP
- 1))
if (j
== '-' || j
== EMDASH
)
if (hyp
> (hyptr
+ NHYP
- 1))
static char *sentchar
= ".?!"; /* sentence terminators */
wp
= wordp
-1; /* handle extra space at end of sentence */
if (j
=='"' || j
=='\'' || j
==')' || j
==']' || j
=='*' || j
==DAGGER
)
for (k
= 0; sentchar
[k
]; k
++)
for (wp
= word
; *wp
; wp
++) {
if (!isdigit(j
) && j
!= '-')
if (*wp
== 0) /* all numbers, so don't hyphenate */
if (wordp
>= &word
[WDSIZE
- 3]) {
errprint("Word overflow.");
if (ismot(i
) || fbits(i
) != ulfont
)
setfbits(i
, FT
); /* default */
/* should test here for characters that ought to be underlined */
/* in the old nroff, that was the 200 bit on the width! */
/* for now, just do letters, digits and certain special chars */