/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <ctype.h>
#include "tdef.h"
#include "ext.h"
/*
* troff8.c
*
* hyphenation
*/
int
{
int j;
tchar *i;
i = wp;
;
return (0);
wdstart = i++;
;
;
if (*--i)
return (0);
return (0);
*hyp = 0;
hyoff = 2;
digram();
*hyp++ = 0;
if (*hyptr)
for (j = 1; j; ) {
j = 0;
j++;
i = *hyp;
*(hyp - 1) = i;
}
}
}
return (0);
}
int
punct(i)
{
if (!i || alph(i))
return(0);
else
return(1);
}
int
alph(i)
{
if (i >= 'a' && i <= 'z' || i >= 'A' && i <= 'Z')
return(1);
else
return(0);
}
int
caseht()
{
if (skip())
return (0);
noscale++;
noscale = 0;
return (0);
}
int
casehw()
{
int i, k;
char *j;
tchar t;
k = 0;
while (!skip()) {
goto full;
for (; ; ) {
continue;
i = cbits(t);
if (i == ' ' || i == '\n') {
*j++ = 0;
nexth = j;
*j = 0;
if (i == ' ')
break;
else
return (0);
}
if (i == '-') {
k = HY_BIT;
continue;
}
*j++ = maplow(i) | k;
k = 0;
goto full;
}
}
return (0);
full:
*nexth = 0;
return (0);
}
int
exword()
{
tchar *w;
char *e;
char *save;
e = hbuf;
while (1) {
save = e;
if (*e == 0)
return(0);
w = wdstart;
e++;
w++;
};
if (!*e) {
w = wdstart;
for (e = save; *e; e++) {
if (*e & HY_BIT)
*hyp++ = w;
w++;
}
return(1);
} else {
e++;
continue;
}
} else
while (*e++)
;
}
return (0);
}
int
suffix()
{
tchar *w;
char *s, *s0;
tchar i;
extern char *suftab[];
return(0);
if (i < 'a')
i -= 'A' - 'a';
return(0);
for (; ; ) {
if ((i = *s0 & 017) == 0)
return(0);
s = s0 + i - 1;
w = hyend - 1;
s--;
w--;
}
if (s == s0)
break;
s0 += i;
}
s = s0 + i - 1;
w = hyend;
goto mark;
while (s > s0) {
w--;
if (*s-- & HY_BIT) {
mark:
hyend = w - 1;
if (*s0 & 0100)
continue;
if (!chkvow(w))
return(0);
*hyp++ = w;
}
}
if (*s0 & 040)
return(0);
if (exword())
return(1);
goto again;
}
int
maplow(i)
int i;
{
i = tolower(i);
return(i);
}
int
vowel(i)
int i;
{
switch (maplow(i)) {
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
case 'y':
return(1);
default:
return(0);
}
}
tchar *w;
{
while (--w >= wdstart)
return(w);
return(0);
}
int
digram()
{
tchar *w;
int val;
int maxval;
return (0);
hyend = w;
return (0);
nhyend = w;
maxval = 0;
w--;
val = 1;
if (w == wdstart)
else if (w == wdstart + 1)
else
maxw = w + 1;
}
}
goto again;
}
int
dilook(a, b, t)
int a, b;
char t[26][13];
{
int i, j;
if (!(j & 01))
i >>= 4;
return(i & 017);
}