src/tinygettext/findlocale.hpp

Go to the documentation of this file.
00001 /*
00002  findlocale-0.46.tar.gz from http://icculus.org/~aspirin/findlocale/
00003 
00004 Copyright (C) 2004 Adam D. Moss (the "Author").  All Rights Reserved.
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is fur-
00011 nished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
00018 NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
00020 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
00021 NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 Except as contained in this notice, the name of the Author of the
00024 Software shall not be used in advertising or otherwise to promote the sale,
00025 use or other dealings in this Software without prior written authorization
00026 from the Author.
00027 
00028 */
00029 
00030 #ifndef __findlocale_h_
00031 #define __findlocale_h_
00032 
00033 typedef const char* FL_Lang;
00034 typedef const char* FL_Country;
00035 typedef const char* FL_Variant;
00036 
00037 typedef struct {
00038   FL_Lang    lang;
00039   FL_Country country;
00040   FL_Variant variant;
00041 } FL_Locale;
00042 
00043 typedef enum {
00044   /* for some reason we failed to even guess: this should never happen */
00045   FL_FAILED        = 0,
00046   /* couldn't query locale -- returning a guess (almost always English) */
00047   FL_DEFAULT_GUESS = 1,
00048   /* the returned locale type was found by successfully asking the system */
00049   FL_CONFIDENT     = 2
00050 } FL_Success;
00051 
00052 typedef enum {
00053   FL_MESSAGES = 0
00054 } FL_Domain;
00055 
00056 /* This allocates/fills in a FL_Locale structure with pointers to
00057    strings (which should be treated as static), or NULL for inappropriate /
00058    undetected fields. */
00059 FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain);
00060 /* This should be used to free the struct written by FL_FindLocale */
00061 void FL_FreeLocale(FL_Locale **locale);
00062 
00063 #endif /*__findlocale_h_*/

Generated on Mon Jun 9 03:38:23 2014 for SuperTux by  doxygen 1.5.1