// sym.h MR 13/12/99 // // Pack a 6-character string/word inside an unsigned int. // /* ---------------------------------------------------------------------- Copyright (C) 1999 Menno Rubingh This source code / program is free software; you are allowed to redistribute it and/or to modify it under the terms of the GNU Public Licence (GNU GPL) as published by the Free Software Foundation. See the file 'COPYING' which should have accompanied this source file. This program comes with ABSOLUTELY NO WARRANTY. ---------------------------------------------------------------------- */ #ifndef _SYM_H_ #define _SYM_H_ #include #if ( UINT_MAX != (65536 * 65536 - 1) ) #error "This code assumes unsigned int of (at least) 32 bits" #error "Maybe change the 'sym_t' typedef to unsigned LONG" #endif typedef unsigned int sym_t; sym_t str2sym( const char * pstr ); //Any blanks or illegal characters in pstr are disregarded. //Case-insensitive. //When input string too long, chars at its end are disregarded. const char * sym2str( sym_t s ); #endif //_SYM_H_