memmem.c (1829d5da5355930d5cfa8ec8add8ff47dc0bebab) | memmem.c (6050c8fe05cff5f6b5d0191db51223f86b7c04f0) |
---|---|
1/*- 2 * Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 22 unchanged lines hidden (view full) --- 31 32#include <string.h> 33 34/* 35 * Find the first occurrence of the byte string s in byte string l. 36 */ 37 38void * | 1/*- 2 * Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 22 unchanged lines hidden (view full) --- 31 32#include <string.h> 33 34/* 35 * Find the first occurrence of the byte string s in byte string l. 36 */ 37 38void * |
39memmem(const void *l, size_t l_len, const void *s, size_t s_len) | 39memmem(l, l_len, s, s_len) 40 const void *l; size_t l_len; 41 const void *s; size_t s_len; |
40{ 41 register char *cur, *last; 42 const char *cl = (const char *)l; 43 const char *cs = (const char *)s; 44 45 /* we need something to compare */ 46 if (l_len == 0 || s_len == 0) 47 return NULL; --- 18 unchanged lines hidden --- | 42{ 43 register char *cur, *last; 44 const char *cl = (const char *)l; 45 const char *cs = (const char *)s; 46 47 /* we need something to compare */ 48 if (l_len == 0 || s_len == 0) 49 return NULL; --- 18 unchanged lines hidden --- |