- 博客(160)
- 资源 (25)
- 收藏
- 关注
原创 my_memmove,my_strcpy
#include <stdio.h> void *my_memmove(void *dest, const void *src, size_t count) { void *ret = dest; char *c_dest = (char*)dest; char *c_src = (char*)src; if((dest == NULL) || (src == NULL)) { return NULL; } if(c_dest <= c_src) { while.
2021-05-08 17:44:15
266
原创 udp_finder
//UDP 发送广播信息 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.
2020-11-17 10:41:25
233
原创 转小写
/** @brief Convert a string to lowercase. @param in String to convert. @param out Output buffer. @param len Size of the out buffer. @return ptr to the out buffer or NULL if an error occured. This function convert a string into ...
2020-11-06 11:26:17
249
原创 libxml2使用
参考 https://blog.youkuaiyun.com/fanwenjieok/article/details/52848092 1.wget http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz 2. . /autogen.sh ./configure CROSS_COMPILE=arm-linux-gnueabi --host=arm-linux-gnueabi --prefix=/home/xxx/libxml2 --enable-shared --.
2020-10-26 14:25:05
797
原创 便捷调试client和server
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<errno.h> #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include <unistd.h> #include <fcntl.h> #include <pthread.
2020-09-11 17:55:48
255
原创 linux信号使用注意事项
1.不要在信号处理函数中处理复杂的事情 2.信号处理函数中不能有互斥锁会造成死锁,可以用信号量替代 3.信号是置位方式实现,多次发送相同的信号可能只会收到一次 4.子进程具有继承父类信号屏蔽,不能在信号处理函数中启动自身 查看进程pcb(process control block) /proc/<pid>/status 文件更直观地查看到指定进程的信息屏蔽情况 cat /proc/21517/status SIGUSR1=16=0x8000 SIGUSR2=17=0x10000 0x1800
2020-08-12 16:17:56
550
原创 libpng创建及编辑图片
使用libpng读写PNG图片 https://blog.youkuaiyun.com/wang93IT/article/details/85003730 如何用libpng输出一个编辑后的png图片 https://blog.youkuaiyun.com/Rong_Toa/article/details/80685228 实例 保存一个width*height的黑白图 int make_wite_png(const char *outfile, int width, int height) { FILE *f.
2020-07-31 09:11:26
656
原创 sed匹配行替换行
udhcpc时分配默认dns DEFAULT_DNS="114.114.114.114" echo "nameserver $DEFAULT_DNS" > $RESOLV_CONF 替换匹配行 sed -i '/DEFAULT_DNS=/cDEFAULT_DNS="114.114.114.114"' /usr/share/udhcpc/defaul t.script
2020-07-07 16:09:10
2519
原创 修改iniparser适配ssid的特殊key
https://github.com/ndevilla/iniparser 下载iniparser 修改src/iniparser.c 支持‘;“#的获取 static line_status iniparser_line( 正则表达式 https://www.cnblogs.com/LiuYanYGZ/p/10300745.html 根据正则表达式修改为如下 支持psk = '434':!"@3#123!@#' 支持所有字符的获取'43...
2020-07-02 18:50:10
359
原创 freetype使用文泉驿显示及保存图片
https://blog.youkuaiyun.com/zb774095236/article/details/94016538 gcc example.c -o example -lfreetype -lm 1.使用开源库文泉驿字库 ./example wqy.ttc ni 2.使用FreeImage图形库和freetype显示字符及保存图片
2020-06-28 16:00:07
653
原创 qrcode生成二维码
https://blog.youkuaiyun.com/wang93IT/article/details/85050894
2020-06-24 14:49:41
542
原创 linux编译工具使用说明
nm ldconfig ld ldd readelf strings strip ar as ranlib objdump 1.readelf: 查看程序执行时所依赖的库有哪些 mipsel-linux-readelf -d microprint Dynamic section at offset 0x120 contains 39 entries: Tag Type Name/Value 0x00000001 (NEEDED)...
2020-06-15 11:40:27
255
原创 linux嵌入式常用调试命令
下载 tftp -g -l B.txt -r A.txt 192.168.1.2 上传 tftp -p -r B.txt -l A.TXT 服务器地址
2020-06-11 19:13:34
327
原创 linux串口操作例子
https://blog.youkuaiyun.com/morixinguan/article/details/80898172?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522159187175619725219943733%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=159187175619725219943733&am
2020-06-11 18:36:33
460
原创 SHA1,HMACSHA1,SHA256,HMACSHA256,BASE64
https://download.youkuaiyun.com/download/iamshuke/10172046
2020-06-09 09:37:05
1059
原创 openssh编译
zlib-1.2.5交叉编译 ./configure --prefix=$PWD/__INSTALL CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar rc CPP =arm-linux-gnueabi-gcc -E LDSHARED=arm-linux-gnueabi-gcc RANLIB=arm-linux-gnueabi-ranlib /home/zengzhihao/zlib-1.2.5/__INSTALL openssh-5.8p1.tar.g
2020-06-02 17:19:31
460
原创 字符串替换
char *strrpl(char *s, const char *s1, const char *s2) { char *ptr; char *cur_p = s; while ((ptr = strstr(cur_p, s1)) != NULL) /* 如果在s中找到s1 */ { memmove(ptr + strlen(s2) , ptr + strlen(s1), strlen(ptr) - strlen(s1) + 1); memcpy(ptr, &s2[0], .
2020-06-01 18:57:18
230
原创 sha512加密
参考 https://blog.youkuaiyun.com/u011280717/article/details/79430408 main.c /* * Copyright (c) 2018, Jiamin Ma * BSD License */ #include "easy_crypto.h" #include <stdio.h> #include <stdint.h> #include <string.h> #define TEST_VEC_NUM 3 stat
2020-06-01 14:56:52
1300
原创 获取png,jpeg,tga宽和高
1.准备好png,zlib库以及头文件 头文件 png.h pngconf.h zconf.h zlib.h 库文件 libpng.so libz.so 2.编译参数 arm-linux-gnueabi-gcc linux_imghw.c -o linux_imghw -lz -lpng -L./ 3.实例 #include <stdio.h> #include "png.h" void png_read(char *file_path) { png_st...
2020-05-28 19:25:50
548
原创 file命令交叉编译
https://blog.youkuaiyun.com/tiantang46800/article/details/7180519 ./configure --host=mipsel-linux --enable-static --disable-shared CC=mipsel-linux-gcc AS=mipsel-linux-as LD=mipsel-linux-ld AR=mipsel-linux-ar RANLIB=mipsel-linux-ranlib --prefix=$PWD/__INSTALL
2020-05-27 17:41:57
538
原创 mipsel下gdb调试工具编译
下载gdb-7.3a.tar.gz http://www.sourceware.org/pub/gdb/releases/ 执行./configure --host=mipsel-linux --target=mipsel-linux --prefix=/home/zengzhihao/gdb-all make && make install 拷贝至开发板,执行 /gdb -args /nfs/micro_sw/microprint 接收到信号忽略掉 handle S..
2020-05-25 18:55:05
490
原创 编译libcurl支持ssl,https下载
1.openssl-1.0.2k下载 进入openssl-1.0.2k 更改编译器CC= arm-linux-gnueabi-gcc 安装路径--prefix=~/openssl-1.0.2k-arm make && make install 2.curl-7.49.1.tar.gz ./configure --prefix=$PWD/_install --hos...
2020-04-16 19:16:47
595
原创 mutool交叉编译
https://www.mupdf.com/downloads/index.html 下载mupdf-1.16.0-source.tar.gz 解压后,修改Makefile 增加 CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ LD=arm-linux-gnueabi-ld AR=arm-linux-gnueabi-ar 编译出命令行...
2020-04-09 16:07:12
575
原创 jbig2转其它格式(支持png,pbm)
https://www.jbig2dec.com/ 下载源码编译 Usage: jbig2dec [options] <file.jbig2> or jbig2dec [options] <global_stream> <page_stream> When invoked with a single file, it attempts to p...
2020-04-02 14:49:27
1821
原创 zlib压缩解压
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <zlib.h> #include <assert.h> #define SIZE_CHUNK (8 * 1024) static int __do_inflate_write(z_stream ...
2020-04-02 13:42:11
465
原创 java与c互通aes加密解密
参考 https://blog.youkuaiyun.com/weiyuefei/article/details/72741729 SHA1PRNG与c语言的互通转换,随机数生成 https://blog.youkuaiyun.com/diliaolu1763/article/details/101628501 SHA1PRNG The name of the pseudo-random numb...
2020-01-09 15:52:37
3003
原创 wget支持ssl
arm-linux 交叉编译wget支持openssl, 使wget支持https链接地址下载文件 https://blog.youkuaiyun.com/Auris/article/details/88776450 openssl的编译与交叉编译 https://blog.youkuaiyun.com/fangye945a/article/details/86658621 ...
2019-12-11 16:00:05
2049
原创 qt融合图片并保存为本地图片
使用qt强大的图形处理功能 将两幅图融合后保存,可交叉编译供外部应用使用 #include <QImage> #include <QMatrix> #include <QDebug> #include <string.h> #include <QPainter> #include <QDesktopWidget> #in...
2019-12-06 15:22:53
1028
1
转载 beyond compare密钥
https://blog.youkuaiyun.com/yangyang031213/article/details/86301966
2019-11-29 09:19:26
15949
原创 格式化字符串
去掉字符串前后的空格换行符 #include <ctype.h> char *rtrim(char *str) { if (str == NULL || *str == '\0') { return str; } int len = strlen(str); char *p = str + len - 1; w...
2019-11-12 15:02:00
172
原创 毫秒为单位产生随机数
秒作为随机数,可能会重复 采用毫秒级别 #include <stdio.h> #include <time.h> #include <stdlib.h> #define SIZE 10 void get_rand(char *p, int length) { int i; unsigned int seed; char value[] =...
2019-10-30 17:02:38
1447
原创 编码转换
下载 https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz 编译使用 1.解压编译 tar -zxvf libiconv-1.16.tar.gz 2.配置 ./configure --enable-shared --host=arm-linux-gnueabi --prefix=/home/zengzhihao/workplac...
2019-09-11 13:41:42
510
转载 共享内存、消息队列、信号量之ipcs命令详解
https://blog.youkuaiyun.com/scott_bing/article/details/78959663
2019-09-09 11:06:42
285
转载 can总线
https://blog.youkuaiyun.com/qq_40589292/article/details/81066193 https://blog.youkuaiyun.com/wordwarwordwar/article/details/79405730 https://blog.youkuaiyun.com/wordwarwordwar/article/details/79405851 https://b...
2019-08-19 17:36:02
203
转载 记录操作记录
https://blog.youkuaiyun.com/hechaojie_com/article/details/85339835 https://blog.youkuaiyun.com/u014597198/article/details/81735481 PS1="`whoami`@`hostname`:"'[$PWD]' #add timestamp export HISTTIMEFORMAT=...
2019-06-14 13:48:42
215
madplay移植所需的压缩包
2013-08-03
tiny210(s5pv210)下的wm8960驱动
2013-08-03
dubs封装后的接口
2018-04-12
libpng-1.6.18.tar.gz
2015-09-17
jpegsrc.v6b.tar.gz
2015-09-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅