hash.h

来自「编译原理这门课确实不是很容易」· C头文件 代码 · 共 22 行

H
22
字号
#ifndef _HASH_H
#define _HASH_H

/* Local hash table functions.  Librarian uses a different set of functions */
/* Size is a prime number */
#define HASHSIZE 1021

/* Rotations in C */
#define ROTR(x,bits) (((x << (16 - bits)) | (x >> bits)) & 0xffff)
#define ROTL(x,bits) (((x << bits) | (x >> (16 - bits))) & 0xffff)

/* Hash table record definition, all entries in a hash table must be
 * structures with the first two elements as given because hash table
 * entries are sometimes handled generically */
typedef struct _hashrec_ {
   struct _hashrec_ *link;	/* Link to next element in list */
   char *key;	/* Full key */
} HASHREC;

#include "hash.p"

#endif _HASH_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?