* %sccs.include.proprietary.c%
static char sccsid
[] = "@(#)what2.c 4.3 (Berkeley) %G%";
describe (file
, argc
, argv
, rf
)
char linbuf
[BUFSIZ
], *line
, *p
;
int i
, wrflg
= 0, wrote
= 0, ln
= 0;
while (gsent(linbuf
, BUFSIZ
, fi
))
for(line
=linbuf
; *line
==' '; line
++);
if (line
[0]==0) continue;
if (wrflg
&& line
[0]=='.' && isupper(line
[1]))
if (prefix(".DA", line
) || prefix(".ND", line
))
ns
=update(ns
, line
, count(line
,argc
,argv
));
for(sp
=sents
; sp
<sents
+ns
; sp
++)
1: looking for nl or space aftter '.'
2: looking for nl after line with dot.
while ( (c
= getc(fi
)) > 0 )
if (c
=='.' && oldc
== '\n')
*s
++ = (c
=='\n'? ' ': c
);
if (c
=='.' || c
== '?' || c
=='!')
leng
= (isalpha(c
) ? leng
+1 : 0);
case 1: /* found ., want nl or space */
*s
++ = (c
=='\n' ? ' ' : c
);
case 2: /* found trof line, want nl */
while ( (c
= *p
++) == *s
++)
while (*t
!= ' ' && t
>(s
+25))
printf("%s%s\n",ln
++ ? " " : " ", s
);
char sb
[BUFSIZ
], *s
= sb
;
*s
++ = isupper(c
) ? tolower(c
) : c
;
if (s
[-1]!=' ') continue;
/* see if sentence array should be updated */
struct sf
*sp
, *least
= NULL
;
if (kov
<=0) return (ns
) ; /* no*/
strcpy (sp
->text
= stext
[ns
], line
);
for(sp
=sents
+ns
-1; sp
>=sents
; sp
--)
if (kov
<= lval
) return(ns
);
while (++least
< sents
+NS
)
(least
-1)->text
= least
->text
;
(least
-1)->olap
= least
->olap
;
strcpy (sp
->text
=ob
, line
);