随笔分类 -  程序设计

摘要:#include "main.h" #include <stdio.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <signal.h> #include <stri 阅读全文
posted @ 2020-09-18 10:24 卷哭你 阅读(564) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include 阅读全文
posted @ 2020-09-18 08:04 卷哭你 阅读(414) 评论(0) 推荐(0)
摘要:#include "main.h" #include <stdio.h> #include <signal.h> //void (*signal(int sig, void (*func)(int)))(int) static void signal_handler(int signo) { pri 阅读全文
posted @ 2020-09-17 20:26 卷哭你 阅读(340) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include 阅读全文
posted @ 2020-09-16 23:34 卷哭你 阅读(340) 评论(0) 推荐(0)
摘要:#include "main.h" static int check_param(void) { int ret = -1; do { if(1) { break; } ret = 0; }while(0); return ret; } int main() { printf("param is % 阅读全文
posted @ 2020-09-15 21:39 卷哭你 阅读(285) 评论(0) 推荐(0)
摘要:#ifdef UAC_INIT #endif #if defined(__UAC_INIT) || defined(__UVC_INIT) #endif #define ARRAY_SIZE(a) ((sizeof(a) / sizeof(a[0]))) do { }while(0); #inclu 阅读全文
posted @ 2020-09-15 20:16 卷哭你 阅读(160) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include 阅读全文
posted @ 2020-09-14 01:06 卷哭你 阅读(148) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-13 20:03 卷哭你 阅读(383) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include 阅读全文
posted @ 2020-09-13 19:39 卷哭你 阅读(496) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-13 11:48 卷哭你 阅读(770) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-13 11:24 卷哭你 阅读(335) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-13 11:04 卷哭你 阅读(344) 评论(0) 推荐(0)
摘要:(1)字符串必须要有'\0',有了这个后面strlen strcmp strsr strchr putc 这些字符串函数才能使用, 他们的源码实现就是依赖'\0' (2) 传参要注意 char xxx[] 还是 "xxx" 根据函数原型 不然出现默名问题 (3) 用于存放字符的数组称为字符数组。在 阅读全文
posted @ 2020-09-13 08:04 卷哭你 阅读(514) 评论(0) 推荐(0)
摘要:char fn[256]; int rc; pcm = calloc(1, sizeof(struct pcm)); if (!pcm || !config) return &bad_pcm; /* TODO: could support default config here */ pcm->co 阅读全文
posted @ 2020-09-13 05:37 卷哭你 阅读(433) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-12 22:04 卷哭你 阅读(216) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include <semaphore.h> #include <unistd.h> #include <signal.h> #include 阅读全文
posted @ 2020-09-12 08:16 卷哭你 阅读(390) 评论(0) 推荐(0)
摘要:static struct usb_function_instance *try_get_usb_function_instance(const char *name) { struct usb_function_driver *fd; struct usb_function_instance *f 阅读全文
posted @ 2020-09-11 23:38 卷哭你 阅读(1040) 评论(0) 推荐(0)
摘要:处理:第二个参数有些东西: :后面须接参数 -bxx和:: 后面可不接参数,后面多个选项,-mnzxc argv[optind]:可以得到后面 -axx -bxx 后面这个-bxx的值,不过是string类型的.optarg:得到是-a后面的值. #include <stdio.h> #includ 阅读全文
posted @ 2020-09-10 15:04 卷哭你 阅读(683) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2020-08-26 22:06 卷哭你 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2020-08-26 22:00 卷哭你 阅读(0) 评论(0) 推荐(0)