个人代码
文章平均质量分 60
core
这个作者很懒,什么都没留下…
展开
-
base64算法实现
intbase64_encode(unsigned char *out, unsigned char *in, int size){ register int position = 0; register unsigned char *dst = out, *src = in; in += size; while (src { switch (po原创 2005-01-18 15:20:00 · 958 阅读 · 0 评论 -
摘自PHP的HASH算法实现
/* * 头文件 * 说明:此实现不保存对象,只保存对象的引用 */#ifndef _HASH_H#define _HASH_H#ifdef __cplusplusextern "C" {#endiftypedef struct tagHASHBUCKET HASHBUCKET, *LPHASHBUCKET;typedef struct tagHASHTABLE HASHTABLE, *LPH原创 2005-01-18 20:26:00 · 1978 阅读 · 4 评论 -
简单的trace函数
#include #include #include #include #include #define __a2x(ch) (((ch) & 15) + ((ch) > 9? 9: 0))#define __x2a(n) ((n & 15) + (n > 9? 55: 48))#define __print_xdigital__(buffer, r, l) /do原创 2005-01-18 20:37:00 · 1496 阅读 · 1 评论 -
split实现
/* * strtok的替代函数 * int * split(int argc, char *argv[], char *string, char *delimiter) * argc - 最大分割token数 * argv - 保存token地址 * string - 要分割成token的字符串 * delimiter - 分界符,NULL表示默认空白字符 * 返回值:实际的token数,这个数原创 2005-01-18 19:53:00 · 846 阅读 · 0 评论 -
A* 算法实现
char g[24][81] = {{"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"},{"o o o o"},{"o o原创 2005-02-19 17:40:00 · 1020 阅读 · 0 评论 -
PHP5的哈希函数
static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength){ register ulong hash = 5381; /* variant with the hash unrolled eight times */ for (; nKeyLength >= 8; nKeyLen原创 2005-03-21 22:12:00 · 1108 阅读 · 1 评论 -
realtime library: struct sigevent introduce
struct sigevent:This element specifies how the calling process is notified once the operation terminates. If the `sigev_notify element is `SIGEV_NONE, no notification is sent. If it is`SIGEV_SIGNAL原创 2005-11-18 15:30:00 · 1188 阅读 · 0 评论