- 博客(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 184
原创 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 160
原创 转小写
/** @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 185
原创 libxml2使用
参考https://blog.csdn.net/fanwenjieok/article/details/528480921.wget http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz2.. /autogen.sh./configure CROSS_COMPILE=arm-linux-gnueabi --host=arm-linux-gnueabi --prefix=/home/xxx/libxml2 --enable-shared --.
2020-10-26 14:25:05 704
原创 便捷调试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 186
原创 linux信号使用注意事项
1.不要在信号处理函数中处理复杂的事情2.信号处理函数中不能有互斥锁会造成死锁,可以用信号量替代3.信号是置位方式实现,多次发送相同的信号可能只会收到一次4.子进程具有继承父类信号屏蔽,不能在信号处理函数中启动自身查看进程pcb(process control block)/proc/<pid>/status 文件更直观地查看到指定进程的信息屏蔽情况cat /proc/21517/statusSIGUSR1=16=0x8000SIGUSR2=17=0x100000x1800
2020-08-12 16:17:56 451
原创 libpng创建及编辑图片
使用libpng读写PNG图片https://blog.csdn.net/wang93IT/article/details/85003730如何用libpng输出一个编辑后的png图片https://blog.csdn.net/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 528
原创 sed匹配行替换行
udhcpc时分配默认dnsDEFAULT_DNS="114.114.114.114"echo "nameserver $DEFAULT_DNS" > $RESOLV_CONF替换匹配行sed -i '/DEFAULT_DNS=/cDEFAULT_DNS="114.114.114.114"' /usr/share/udhcpc/default.script
2020-07-07 16:09:10 2421
原创 修改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 269
原创 freetype使用文泉驿显示及保存图片
https://blog.csdn.net/zb774095236/article/details/94016538gcc example.c -o example -lfreetype -lm1.使用开源库文泉驿字库./example wqy.ttc ni2.使用FreeImage图形库和freetype显示字符及保存图片
2020-06-28 16:00:07 510
原创 linux编译工具使用说明
nmldconfigldlddreadelfstringsstriparasranlibobjdump1.readelf:查看程序执行时所依赖的库有哪些mipsel-linux-readelf -d microprintDynamic section at offset 0x120 contains 39 entries: Tag Type Name/Value0x00000001 (NEEDED)...
2020-06-15 11:40:27 183
原创 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 261
原创 linux串口操作例子
https://blog.csdn.net/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 349
原创 SHA1,HMACSHA1,SHA256,HMACSHA256,BASE64
https://download.csdn.net/download/iamshuke/10172046
2020-06-09 09:37:05 951
原创 openssh编译
zlib-1.2.5交叉编译./configure --prefix=$PWD/__INSTALLCC=arm-linux-gnueabi-gccAR=arm-linux-gnueabi-ar rcCPP =arm-linux-gnueabi-gcc -ELDSHARED=arm-linux-gnueabi-gccRANLIB=arm-linux-gnueabi-ranlib/home/zengzhihao/zlib-1.2.5/__INSTALLopenssh-5.8p1.tar.g
2020-06-02 17:19:31 339
原创 字符串替换
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 179
原创 sha512加密
参考https://blog.csdn.net/u011280717/article/details/79430408main.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 3stat
2020-06-01 14:56:52 1121
原创 获取png,jpeg,tga宽和高
1.准备好png,zlib库以及头文件头文件png.h pngconf.h zconf.h zlib.h库文件libpng.so libz.so2.编译参数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 417
原创 file命令交叉编译
https://blog.csdn.net/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 427
原创 mipsel下gdb调试工具编译
下载gdb-7.3a.tar.gzhttp://www.sourceware.org/pub/gdb/releases/执行./configure --host=mipsel-linux --target=mipsel-linux --prefix=/home/zengzhihao/gdb-allmake && make install拷贝至开发板,执行/gdb -args /nfs/micro_sw/microprint接收到信号忽略掉handle S..
2020-05-25 18:55:05 366
原创 编译libcurl支持ssl,https下载
1.openssl-1.0.2k下载进入openssl-1.0.2k更改编译器CC= arm-linux-gnueabi-gcc安装路径--prefix=~/openssl-1.0.2k-armmake && make install2.curl-7.49.1.tar.gz./configure --prefix=$PWD/_install --hos...
2020-04-16 19:16:47 465
原创 mutool交叉编译
https://www.mupdf.com/downloads/index.html下载mupdf-1.16.0-source.tar.gz解压后,修改Makefile增加CC=arm-linux-gnueabi-gccCXX=arm-linux-gnueabi-g++LD=arm-linux-gnueabi-ldAR=arm-linux-gnueabi-ar编译出命令行...
2020-04-09 16:07:12 444
原创 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 1484
原创 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 373
原创 java与c互通aes加密解密
参考https://blog.csdn.net/weiyuefei/article/details/72741729SHA1PRNG与c语言的互通转换,随机数生成https://blog.csdn.net/diliaolu1763/article/details/101628501SHA1PRNG The name of the pseudo-random numb...
2020-01-09 15:52:37 2773
原创 wget支持ssl
arm-linux 交叉编译wget支持openssl, 使wget支持https链接地址下载文件https://blog.csdn.net/Auris/article/details/88776450openssl的编译与交叉编译https://blog.csdn.net/fangye945a/article/details/86658621...
2019-12-11 16:00:05 1910
原创 qt融合图片并保存为本地图片
使用qt强大的图形处理功能将两幅图融合后保存,可交叉编译供外部应用使用#include <QImage>#include <QMatrix>#include <QDebug>#include <string.h>#include <QPainter>#include <QDesktopWidget>#in...
2019-12-06 15:22:53 821 1
转载 beyond compare密钥
https://blog.csdn.net/yangyang031213/article/details/86301966
2019-11-29 09:19:26 15499
原创 格式化字符串
去掉字符串前后的空格换行符#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 124
原创 毫秒为单位产生随机数
秒作为随机数,可能会重复采用毫秒级别#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 1323
原创 编码转换
下载https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz编译使用1.解压编译tar -zxvf libiconv-1.16.tar.gz2.配置 ./configure --enable-shared --host=arm-linux-gnueabi --prefix=/home/zengzhihao/workplac...
2019-09-11 13:41:42 446
转载 共享内存、消息队列、信号量之ipcs命令详解
https://blog.csdn.net/scott_bing/article/details/78959663
2019-09-09 11:06:42 226
转载 can总线
https://blog.csdn.net/qq_40589292/article/details/81066193https://blog.csdn.net/wordwarwordwar/article/details/79405730https://blog.csdn.net/wordwarwordwar/article/details/79405851https://b...
2019-08-19 17:36:02 133
转载 记录操作记录
https://blog.csdn.net/hechaojie_com/article/details/85339835https://blog.csdn.net/u014597198/article/details/81735481PS1="`whoami`@`hostname`:"'[$PWD]'#add timestampexport HISTTIMEFORMAT=...
2019-06-14 13:48:42 154
dubs封装后的接口
2018-04-12
libpng-1.6.18.tar.gz
2015-09-17
jpegsrc.v6b.tar.gz
2015-09-17
madplay移植所需的压缩包
2013-08-03
tiny210(s5pv210)下的wm8960驱动
2013-08-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人