mem.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) Sergey P. Derevyago, 2008.
00003  *
00004  * Permission to copy, use, modify, sell and distribute this software is granted
00005  * provided this copyright notice appears in all copies.
00006  * This software is provided "as is" without express or implied warranty, and
00007  * with no claim as to its suitability for any purpose.
00008  *
00009  */
00010 
00015 #ifndef __DERS__MEM_HPP__
00016 #define __DERS__MEM_HPP__
00017 
00018 #include <ders/config.hpp>
00019 
00020 namespace ders {  // ::ders
00021 
00022 void* mem_find(void* p1, int sz1, char ch);
00023 const void* mem_find(const void* p1, int sz1, char ch);
00024 void* mem_rev_find(void* p1, int sz1, char ch);
00025 const void* mem_rev_find(const void* p1, int sz1, char ch);
00026 
00027 void* mem_find(void* p1, int sz1, const void* p2, int sz2);
00028 const void* mem_find(const void* p1, int sz1, const void* p2, int sz2);
00029 void* mem_rev_find(void* p1, int sz1, const void* p2, int sz2);
00030 const void* mem_rev_find(const void* p1, int sz1, const void* p2, int sz2);
00031 
00032 inline const void* mem_find(const void* p1, int sz1, char ch)
00033 { return mem_find(const_cast<void*>(p1), sz1, ch); }
00034 
00035 inline const void* mem_rev_find(const void* p1, int sz1, char ch)
00036 { return mem_rev_find(const_cast<void*>(p1), sz1, ch); }
00037 
00038 inline const void* mem_find(const void* p1, int sz1, const void* p2, int sz2)
00039 { return mem_find(const_cast<void*>(p1), sz1, p2, sz2); }
00040 
00041 inline const void* mem_rev_find(const void* p1, int sz1, const void* p2, int
00042   sz2)
00043 { return mem_rev_find(const_cast<void*>(p1), sz1, p2, sz2); }
00044 
00045 }  // namespace ::ders
00046 
00047 #endif  // __DERS__MEM_HPP__
00048 

Generated on Tue Dec 8 11:35:32 2009 for derslib by  doxygen 1.5.5