Back to index

plt-scheme  4.2.1
gettextP.h
Go to the documentation of this file.
00001 /* gettextP.h -- header describing internals of gettext library
00002    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
00003 
00004 This program is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation; either version 2, or (at your option)
00007 any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00017 
00018 #ifndef _GETTEXTP_H
00019 #define _GETTEXTP_H
00020 
00021 #include "loadinfo.h"
00022 
00023 /* @@ end of prolog @@ */
00024 
00025 #ifndef PARAMS
00026 # if __STDC__
00027 #  define PARAMS(args) args
00028 # else
00029 #  define PARAMS(args) ()
00030 # endif
00031 #endif
00032 
00033 #ifndef W
00034 # define W(flag, data) ((flag) ? SWAP (data) : (data))
00035 #endif
00036 
00037 
00038 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
00039 
00040 static inline nls_uint32
00041 SWAP (i)
00042      nls_uint32 i;
00043 {
00044   return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
00045 }
00046 
00047 
00048 struct loaded_domain
00049 {
00050   const char *data;
00051   int must_swap;
00052   nls_uint32 nstrings;
00053   struct string_desc *orig_tab;
00054   struct string_desc *trans_tab;
00055   nls_uint32 hash_size;
00056   nls_uint32 *hash_tab;
00057 };
00058 
00059 struct binding
00060 {
00061   struct binding *next;
00062   char *domainname;
00063   char *dirname;
00064 };
00065 
00066 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
00067                                            char *__locale,
00068                                            const char *__domainname));
00069 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
00070 
00071 /* @@ begin of epilog @@ */
00072 
00073 #endif /* gettextP.h  */