Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

xlat.h

Go to the documentation of this file.
00001 /* xlat.h
00002  *
00003  *
00004  * $Id: xlat.h,v 1.6 2004/07/15 09:40:07 dsamersoff Exp $
00005  *
00006  */
00007 
00008 #ifndef xlat_h
00009 #define xlat_h
00010 
00011 #ifdef HAVE_CONFIG_H
00012 # include <config.h>
00013 #endif
00014 
00015 #include <stdlib.h>
00016 #include <string.h>
00017 
00018 #include <iostream>
00019 
00020 enum{ none =0x0, alt2koi, ansi2koi, iso2koi, web2koi, alt2ansi, iso2ansi, koi2ansi, koi2utf, koi2translit, ascii2ebcdic, ebcdic2ascii };
00021 
00022 
00023 inline int xlat_table(char *str)
00024 {    
00025      if ( strstr(str, "alt2koi")        != 0 ) return alt2koi; 
00026      if ( strstr(str, "ansi2koi")       != 0 ) return ansi2koi; 
00027      if ( strstr(str, "iso2koi")        != 0 ) return iso2koi; 
00028 
00029      if ( strstr(str, "alt2ansi")       != 0 ) return alt2ansi; 
00030      if ( strstr(str, "iso2ansi")       != 0 ) return iso2ansi; 
00031      if ( strstr(str, "koi2ansi")       != 0 ) return koi2ansi; 
00032      if ( strstr(str, "koi2translit")   != 0 ) return koi2translit; 
00033      if ( strstr(str, "koi2utf")        != 0 ) return koi2utf; 
00034      
00035      return  none;
00036 }
00037 
00038 inline void xlat_table_list(std::ostream& os)
00039 {
00040     os << "alt2koi,ansi2koi,iso2koi,alt2ansi,iso2ansi,koi2ansi,koi2translit,koi2utf";
00041 }
00042 
00043 void xlat_utf(char *s, int len, std::ostream& os);
00044 void xlat_translit(char *s, int len, std::ostream& os);
00045 
00046 void xlat(char *s, int len, std::ostream& os, int tb = ansi2koi);
00047 
00048 
00049 
00050 #endif

Generated on Mon May 16 18:26:58 2005 for libdms4 by doxygen1.3-rc2