home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / common / ucnv_io.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-19  |  2.6 KB  |  65 lines

  1. /*
  2.    ********************************************************************************
  3.    *                                                                              *
  4.    * COPYRIGHT:                                                                   *
  5.    *   (C) Copyright International Business Machines Corporation, 1999            *
  6.    *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  7.    *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  8.    *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  9.    *                                                                              *
  10.    ********************************************************************************
  11.    *
  12.    *
  13.    *  uconv_io.h:
  14.    *  defines  variables and functions pertaining to file access, and name resolution
  15.    *  aspect of the library
  16.  */
  17.  
  18. #ifndef UCNV_IO_H
  19. #define UCNV_IO_H
  20.  
  21.  
  22. #include "utypes.h"
  23. #include "filestrm.h"
  24.  
  25.  
  26. /*filename containing aliasing information on the converter names */
  27. static const char CONVERTER_FILE_NAME[13] = "convrtrs.txt";
  28. static const char CONVERTER_FILE_EXTENSION[5] = ".cnv";
  29. static const char SPACE_SEPARATORS[4] = {'\n', '\t', ' ', 0x00};
  30.  
  31.  
  32. extern char **AVAILABLE_CONVERTERS_NAMES;
  33. extern int32_t AVAILABLE_CONVERTERS;
  34.  
  35. /*Checks if c is in the NULL terminated setOfChars */
  36. bool_t isInSet (char c, const char *setOfChars);
  37.  
  38. /*Remove all characters followed by '#' */
  39. U_CAPI char * U_EXPORT2 removeComments (char *line);
  40.  
  41.  
  42. /*Returns pointer to the next non-whitespace (or non-separators) */
  43. U_CAPI int32_t U_EXPORT2 nextTokenOffset (const char *line, const char *separators);
  44.  
  45. /*Copies the next string in token and returns an updated pointer to the next token */
  46. U_CAPI char * U_EXPORT2 getToken (char *token, char *line, const char *separators);
  47.  
  48. /*Takes an alias name and returns a FileStream pointer of the requested converter table or NULL, if not found */
  49. FileStream * U_EXPORT2 openConverterFile (const char *name);
  50.  
  51. /*Fills in the Actual name of a converter based on the convrtrs.txt file
  52.    returns TRUE if the name was resolved FALSE otherwise */
  53. bool_t resolveName (char *realName, const char *alias);
  54.  
  55. /*called through lazy evaluation. Sets up a hashtable containg all the aliases and an array with pointers
  56.    to the values inside the hashtable for quick indexing */
  57. void setupAliasTableAndAvailableConverters (UErrorCode * err);
  58.  
  59. /*Uppercases a null-terminate string */
  60. U_CAPI char * U_EXPORT2 strtoupper (char *);
  61.  
  62. /*case insensitive hash key*/
  63. U_CAPI int32_t U_EXPORT2 uhash_hashIString(const void* name);
  64. #endif /* _UCNV_IO */
  65.