misc.c

来自「It s a tool designed to extract as much 」· C语言 代码 · 共 38 行

C
38
字号
#include "config.h"#include <stdio.h>#include <stdlib.h>#include "grab-ng.h"#include "misc.h"/* ------------------------------------------------------------------------ *//* prehistoric libc ;)                                                      */#ifndef HAVE_STRCASESTRchar* __used strcasestr(char *haystack, char *needle){    int hlen = strlen(haystack);    int nlen = strlen(needle);    int offset;    for (offset = 0; offset <= hlen - nlen; offset++)	if (0 == strncasecmp(haystack+offset,needle,nlen))	    return haystack+offset;    return NULL;}#endif#ifndef HAVE_MEMMEMvoid __used *memmem(unsigned char *haystack, size_t haystacklen,		    unsigned char *needle, size_t needlelen){    int i;    for (i = 0; i < haystacklen - needlelen; i++)	if (0 == memcmp(haystack+i,needle,needlelen))	    return haystack+i;    return NULL;}#endif

⌨️ 快捷键说明

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