sprint 1-alpha
|
00001 /****************************************************************************** 00002 * SPRINT::utils::hex 00003 * 00004 * Copyright (C) 2005-2010 Paolo Medici <www.pmx.it> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 *******************************************************************************/ 00021 00022 #ifndef _SPRINT_UTILS_HEX_H 00023 #define _SPRINT_UTILS_HEX_H 00024 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00033 extern char bcd2hex[16]; 00034 00036 unsigned int hex2c(char c); 00037 00039 unsigned int hex2b(const char *c); 00041 unsigned int hex2w(const char *c); 00043 unsigned int hex2dw(const char *c); 00044 00046 void w2hex(char *buf, unsigned short w); 00048 void dw2hex(char *buf, unsigned int w); 00049 00051 unsigned int hextoi(const char *hex); 00052 00053 #ifdef __cplusplus 00054 } 00055 #endif 00056 00057 #endif