00001 ////////////////////////////////////////////////////////////////////////////// 00002 /*! \file Misc.h 00003 * \brief Miscellaneous utility functions (not hardware utilities) 00004 * \author $Author: jayhawk_hokie $ 00005 * \version $Revision: 1.6 $ 00006 * \date $Date: 2006/07/05 20:59:13 $ 00007 *//////////////////////////////////////////////////////////////////////////// 00008 /* 00009 */ 00010 00011 #ifndef __SSSL_MISC_H__ 00012 #define __SSSL_MISC_H__ 00013 00014 00015 /*! \brief Strip leading and/or trailing instances of the specified 00016 * character from a string. 00017 * */ 00018 int strip(char *dest, char c, int mode); 00019 00020 /*! \brief Strip possible multiple trailing CR/LF's at EOL. 00021 */ 00022 int crstrip(char *dest); 00023 00024 /*! \brief Allocate and copy in one step. 00025 */ 00026 int allocCpy(char **dest, char *src); 00027 00028 /*! \brief A simple word lookup routine, converts a word to its index 00029 * index number in the supplied list to make all lookups the same. 00030 */ 00031 int getCmdIndex(const char **cmds, const char *myCmd); 00032 00033 #endif 00034 // Do not change the comments below - they will be added automatically by CVS 00035 /***************************************************************************** 00036 * $Log: Misc.h,v $ 00037 * Revision 1.6 2006/07/05 20:59:13 jayhawk_hokie 00038 * *** empty log message *** 00039 * 00040 * 00041 * 00042 * 00043 ******************************************************************************/ 00044 00045