struct wst
{ char *tx
; int ct
; } ;
# define TSIZE HASHF*ZIPF*NW
static struct wst word
[TSIZE
];
static char tbuf
[NW
*ZIPF
*WLEN
], *tp tbuf
;
int nw
0, i
, any
, nf
, j
, wexch(), wcomp();
for(HSIZE
=TSIZE
; !prime(HSIZE
); HSIZE
--);
for(nf
=0; fn
[nf
] && nf
<NF
; nf
++)
fi
[nf
] = fn
[nf
][0] ? fopen(fn
[nf
], "r") : NULL
;
if (fi
[i
]==NULL
) continue;
if (common(tw
)) continue;
if (strlen(tw
)<3) continue;
_assert (tp
< tbuf
+NW
*ZIPF
*WLEN
);
shell ( TSIZE
, wcomp
, wexch
);
for(nw
=0; word
[nw
].ct
>0 && nw
<TSIZE
; nw
++)
if (nw
>=nin
*2 && word
[nw
].ct
!= word
[0].ct
)
for( h
= h
%HSIZE
; word
[h
].tx
; h
= (h
+1)%HSIZE
)
if (strcmp(wt
, word
[h
].tx
) == SAME
)
int start
1, oldc
' ', c
;
while ( (c
=getc(f
)) != EOF
)
if (isupper(c
)) c
= tolower(c
);
if (isalpha(c
) || isdigit(c
)) return(1);
if (c
== '\'' || c
== '-') return(1);
return (word
[n1
].ct
>= word
[n2
].ct
);
tt
.tx
= word
[n1
].tx
; tt
.ct
= word
[n1
].ct
;
word
[n1
].tx
= word
[n2
].tx
; word
[n1
].ct
= word
[n2
].ct
;
word
[n2
].tx
= tt
.tx
; word
[n2
].ct
= tt
.ct
;
/* only executed once- slow is ok */
/* this is the test for what4.c as a standalone prog ...
char *ff[10], *wd[20], **ffp ff;
printf("total of %d items\n",n);