/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int fold;
int dict;
int tab;
int compare(char *, char *);
void canon(char *, char *);
int getword(char *);
int
{
int c;
for(;;) {
switch(*++argv[1]) {
case 'd':
dict++;
continue;
case 'f':
fold++;
continue;
case 't':
if(tab)
++argv[1];
continue;
case 0:
break;
default:
continue;
}
break;
}
argc --;
argv++;
}
if(argc<=1)
return (1);
if(argc==2) {
fold++;
dict++;
} else
exit(2);
}
*++ptr = '\0';
}
}
bot = 0;
for(;;) {
do {
mid++;
} while(c!=EOF && c!='\n');
break;
case -2:
case -1:
case 0:
break;
continue;
case 1:
case 2:
continue;
}
break;
}
return (0);
case -2:
return (0);
case -1:
case 0:
break;
case 1:
case 2:
continue;
}
break;
}
case -1:
case 0:
continue;
}
break;
}
return (0);
}
int
compare(char *s, char *t)
{
for(;*s==*t;s++,t++)
if(*s==0)
return(0);
return(*s==0? -1:
*t==0? 1:
*s<*t? -2:
2);
}
int
getword(char *w)
{
int c;
while(avail--) {
if(c==EOF)
return(0);
if(c=='\n')
break;
*w++ = c;
}
while (c != '\n')
*w = 0;
return(1);
}
void
{
int c;
for(;;) {
if(c==0) {
*new = 0;
break;
}
if(dict) {
if(!isalnum(c))
continue;
}
if(fold) {
if(isupper(c))
}
new++;
avail--;
if (avail <= 0) {
*new = 0;
break;
}
}
}