luit.h revision 4ed31819
1/* 2Copyright (c) 2001 by Juliusz Chroboczek 3 4Permission is hereby granted, free of charge, to any person obtaining a copy 5of this software and associated documentation files (the "Software"), to deal 6in the Software without restriction, including without limitation the rights 7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8copies of the Software, and to permit persons to whom the Software is 9furnished to do so, subject to the following conditions: 10 11The above copyright notice and this permission notice shall be included in 12all copies or substantial portions of the Software. 13 14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20THE SOFTWARE. 21*/ 22 23#ifndef LUIT_LUIT_H 24#define LUIT_LUIT_H 1 25 26extern const char *locale_alias; 27extern int iso2022; 28extern int verbose; 29extern int sevenbit; 30extern int ilog; 31extern int olog; 32 33/* Not using Xfuncproto.h since that would pull in extra dependencies */ 34#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ 35 || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) 36# define LUIT_NORETURN __attribute__((noreturn)) 37#else 38# define LUIT_NORETURN /* nothing */ 39#endif 40 41#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) 42# define LUIT_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) 43#else /* not gcc >= 2.3 */ 44# define LUIT_PRINTF(x,y) /* nothing */ 45#endif 46 47void child(char *, char *, char *const *) LUIT_NORETURN; 48void parent(int, int); 49 50void ErrorF(const char *f,...) LUIT_PRINTF(1,2); 51 52void FatalError(const char *f,...) LUIT_NORETURN LUIT_PRINTF(1,2); 53 54#endif /* LUIT_LUIT_H */ 55