/***************************************************************************** * strtab.h: misc label handling functions ***************************************************************************** * $Id: strtab.h,v 1.6 2006/05/16 15:10:34 estre Exp $ ***************************************************************************** * Copyright (C) 1997 Gerd Knorr <kraxel@cs.tu-berlin.de> * * 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, USA. *****************************************************************************/ #ifndef _STRTAB_H_ #define _STRTAB_H_ struct STRTAB { int nr; char *str; }; int str_to_int (const char *str,const struct STRTAB *tab); char * int_to_str (int n, const struct STRTAB *tab); int str_to_int_noatoi (const char *str,const struct STRTAB *tab); void free_strtab(struct STRTAB *tab); int srtab_size(const struct STRTAB *tab); struct STRTAB* strtab_copy_in_range(const struct STRTAB *tab , int beg , int num ); #endif // _STRTAB_H_