mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
641 B
31 lines
641 B
#include <windows.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <process.h>
|
|
#include <fcntl.h>
|
|
#include <io.h>
|
|
#include <string.h>
|
|
|
|
/* Simple but direct hash function that hashes across several bits by
|
|
multiplying by the greatest prime less than bits**2 and masking off the excess. */
|
|
|
|
#define PrimeHash(wOld, wNew, cBitsMax) (((wOld) + (wNew))*hashPrime[cBitsMax]&hashMask[cBitsMax])
|
|
|
|
WCHAR
|
|
GetCharacter(FILE *pFile);
|
|
|
|
WCHAR
|
|
PutCharacter(WCHAR wch, FILE *pFile);
|
|
|
|
WCHAR *
|
|
GetLine(
|
|
WCHAR *pStr0,
|
|
int maxlen,
|
|
FILE *pFile
|
|
);
|
|
|
|
void
|
|
PutLine(WCHAR *pString, FILE *pFile);
|
|
|
|
const unsigned int hashPrime[];
|
|
const unsigned int hashMask[];
|