摘要:太久不用, 都记不太清了.做个记录#include void (*signal(int signum, void (*handler))(int)))(int);kill -l 查看信号#include #include int kill(pid_t pid, int s...
阅读全文
摘要:#define DP1(format, arg...) printf("\x1b[0;31m"format"\x1b[0m", ##arg)#define DP(format, arg...) \ do { \ char debuf[2 * 1024]; \ snp...
阅读全文
摘要:time_t和struct tm1.time_t为typedef __int64 __time64_t;2.struct timeval{uint tv_sec;uint tv.usec;}----------struct tm{ int tm_sec; /* Seconds. [0-60] (1 ...
阅读全文
摘要:用ioctl获得本地ip地址时要用到两个结构体ifconf和ifreq,它们对于大多数人来说都是比较陌生的,这里给大家一种比较简单的理解方法,当然只一种帮助理解的方法,在描述中可能会有一些地方与真实定义有所出入,仅供参考.首先先认识一下ifconf和ifreq://ifconf通常是用来保存所有接口...
阅读全文
摘要:md5.c#include#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))#define H(x, y, z) ((x) ^ (y) ^ (z))#define...
阅读全文
摘要:目录project||-- Makefile.am [项目根目录 Makefile.am]||-- include [include子目录]||---Makefile.am [项目子目录 Makefile.am]||---xxx.h[头文件] ||-- src [src子目录] | |---Make...
阅读全文
摘要:#include #include char *l_opt_arg;char* const short_options = "c:";struct option long_options[] = { { "aa", 0, NULL, 0 }, { "bb", 0,...
阅读全文
摘要:struct dirent 与DIR1.存储目录中的文件信息(文件名、扩展名等等)#include struct dirent{ long d_ino; /* inode number 索引节点号 */ off_t d_off; /* offset to this dirent 在目录文件中的偏移 ...
阅读全文