]> www.fi.muni.cz Git - evince.git/blob - backend/dvi/mdvi-lib/private.h
[dvi] Let kpathsea use ANSI C str(r)chr() instead of (r)index()
[evince.git] / backend / dvi / mdvi-lib / private.h
1 /*
2  * Copyright (C) 2000, Matias Atria
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18 #ifndef _MDVI_PRIVATE_H
19 #define _MDVI_PRIVATE_H 1
20
21 #define HAVE_PROTOTYPES 1
22
23 #if STDC_HEADERS
24 #  /* kpathsea's headers (wrongly!) redefine strchr() and strrchr() to
25 #     non ANSI C functions if HAVE_STRCHR and HAVE_STRRCHR are not defined.
26 #   */
27 #  ifndef HAVE_STRCHR
28 #     define HAVE_STRCHR
29 #   endif
30 #  ifndef HAVE_STRRCHR
31 #    define HAVE_STRRCHR
32 #  endif
33 #endif
34
35 #include <kpathsea/debug.h>
36 #include <kpathsea/tex-file.h>
37 #include <kpathsea/tex-glyph.h>
38 #include <kpathsea/cnf.h>
39 #include <kpathsea/proginit.h>
40 #include <kpathsea/progname.h>
41 #include <kpathsea/tex-make.h>
42
43 #define ISSP(p)         (*(p) == ' ' || *(p) == '\t')
44 #define SKIPSP(p)       while(ISSP(p)) p++
45 #define SKIPNSP(p)      while(*(p) && !ISSP(p)) p++
46
47 #ifdef ENABLE_NLS
48 #include <libintl.h>
49 #define _(x)    gettext(x)
50 #define _G(x)   x
51 #else
52 #define _(x)    x
53 #define _G(x)   x
54 #endif /* ENABLE_NLS */
55
56 #if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
57 #define _BREAKPOINT()           do { __asm__ __volatile__ ("int $03"); } while(0)
58 #elif defined (__alpha__) && defined (__GNUC__) && __GNUC__ >= 2
59 #define _BREAKPOINT()           do { __asm__ __volatile__ ("bpt"); } while(0)
60 #else   /* !__i386__ && !__alpha__ */
61 #define _BREAKPOINT()
62 #endif  /* __i386__ */
63
64 #endif /* _MDVI_PRIVATE_H */