?? util.h
字號:
/****************************************************************************** SCT, Serial Communication Tracer ** CopyRight (C) Bruce (ZhaoFei), makeidea@21cn.com* http://www.makeidea.net** All sources in the package are copyrighted under the the terms of GNU GPL****************************************************************************** * This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA** If you intend to use this pragram commercially on a regular basis you* must contact the author for an appropriate donation.* ***************************************************************************/#ifndef UTIL_H#define UTIL_H#ifndef UTIL_L#define UTIL_L extern#endif#ifndef uchar #define uchar unsigned char#endif#ifndef uint #define uint unsigned char#endif#ifndef ulong #define ulong unsigned char#endif#ifndef bool#define bool uint#endif#ifndef true#define true 1#endif#ifndef false#define false 0#endif//basic macro#ifndef max#define max(a,b) (((a) > (b)) ? (a) : (b))#endif#ifndef min#define min(a,b) (((a) < (b)) ? (a) : (b))#endifUTIL_L void hex2str(char *str, uchar *hex,int len);UTIL_L uchar asc2hex(char asccode);UTIL_L void ascs2hex(uchar *hex,uchar *ascs,int srclen);UTIL_L void str2hex(uchar *hex, int *len, char *str);UTIL_L void noz_str(char *str); //replace teminate null with ' ' of stringUTIL_L void disp_hexasc(uchar *data, int size);#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -