⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsearch.c

📁 linux下用PCMCIA无线网卡虚拟无线AP的程序源码
💻 C
字号:
/* * This file lifted in toto from 'Dlibs' on the atari ST  (RdeBath) * *  *    Dale Schumacher                         399 Beacon Ave. *    (alias: Dalnefre')                      St. Paul, MN  55104 *    dal@syntel.UUCP                         United States of America *  "It's not reality that's important, but how you perceive things." */#include <string.h>#include <stdio.h>char *lfind(key, base, num, size, cmp)register char *key, *base;unsigned int *num;register unsigned int size;register int (*cmp) ();{	register int n = *num;	while (n--) {		if ((*cmp) (base, key) == 0)			return (base);		base += size;	}	return (NULL);}char *lsearch(key, base, num, size, cmp)char *key, *base;register unsigned int *num;register unsigned int size;int (*cmp) ();{	register char *p;	if ((p = lfind(key, base, num, size, cmp)) == NULL) {		p = memcpy((base + (size * (*num))), key, size);		++(*num);	}	return (p);}

⌨️ 快捷键说明

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