summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-14 01:30:24 -0300
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-12-19 16:22:29 -0800
commitb6f793d7d5c7f7c55911e6524dede41b92dcbc22 (patch)
treea048c9f15315c72ae8e157c83bba9c186a09c491
parent282ac4226195d58e3818e7ac97093e396aa78086 (diff)
libXfont ansification and removal of xf86_ansic.h dependency
Basically the code is now compiled as if FONTMODULE was never defined, but also removed some "magic" defining _XOPEN_SOURCE before including math.h. Also removed some #if 0'ed code instead of fixing prototypes inside the "dead code". Changes to spdo_prv.h were due to defines like: <hash>define foo() sp_foo() that would not compile with the ansification in the format: type foo(void) due to the macro receiving "void" as an argument.
-rw-r--r--include/X11/fonts/bitmap.h4
-rw-r--r--include/X11/fonts/fntfilst.h2
-rw-r--r--include/X11/fonts/fontmisc.h11
-rw-r--r--src/FreeType/ft.h4
-rw-r--r--src/FreeType/ftenc.c6
-rw-r--r--src/FreeType/ftfuncs.c6
-rw-r--r--src/FreeType/fttools.c6
-rw-r--r--src/FreeType/xttcap.c24
-rw-r--r--src/Speedo/out_bl2d.c4
-rw-r--r--src/Speedo/out_blk.c6
-rw-r--r--src/Speedo/out_outl.c61
-rw-r--r--src/Speedo/out_scrn.c9
-rw-r--r--src/Speedo/out_util.c18
-rw-r--r--src/Speedo/reset.c3
-rw-r--r--src/Speedo/set_trns.c11
-rw-r--r--src/Speedo/spdo_prv.h32
-rw-r--r--src/Speedo/sperr.c2
-rw-r--r--src/Speedo/spfile.c4
-rw-r--r--src/Speedo/spfont.c11
-rw-r--r--src/Speedo/spfuncs.c4
-rw-r--r--src/Speedo/spglyph.c2
-rw-r--r--src/Speedo/spinfo.c6
-rw-r--r--src/Speedo/spint.h4
-rw-r--r--src/Type1/arith.c3
-rw-r--r--src/Type1/curves.c3
-rw-r--r--src/Type1/curves.h3
-rw-r--r--src/Type1/fontfcn.c6
-rw-r--r--src/Type1/hints.c3
-rw-r--r--src/Type1/lines.c10
-rw-r--r--src/Type1/objects.c9
-rw-r--r--src/Type1/objects.h2
-rw-r--r--src/Type1/paths.c3
-rw-r--r--src/Type1/paths.h7
-rw-r--r--src/Type1/regions.c9
-rw-r--r--src/Type1/regions.h8
-rw-r--r--src/Type1/scanfont.c6
-rw-r--r--src/Type1/spaces.c7
-rw-r--r--src/Type1/t1funcs.c16
-rw-r--r--src/Type1/t1info.c4
-rw-r--r--src/Type1/t1io.c6
-rw-r--r--src/Type1/t1malloc.c32
-rw-r--r--src/Type1/type1.c6
-rw-r--r--src/Type1/util.c6
-rw-r--r--src/bitmap/bdfread.c2
-rw-r--r--src/bitmap/bdfutils.c2
-rw-r--r--src/bitmap/bitscale.c8
-rw-r--r--src/bitmap/pcfread.c5
-rw-r--r--src/bitmap/snfread.c3
-rw-r--r--src/fontfile/fontscale.c6
49 files changed, 78 insertions, 337 deletions
diff --git a/include/X11/fonts/bitmap.h b/include/X11/fonts/bitmap.h
index 731c85f..fb4f76e 100644
--- a/include/X11/fonts/bitmap.h
+++ b/include/X11/fonts/bitmap.h
@@ -37,11 +37,7 @@ from The Open Group.
#define _BITMAP_H_
#include <X11/fonts/fntfilio.h>
-#ifndef FONTMODULE
#include <stdio.h> /* just for NULL */
-#else
-#include "xf86_ansic.h"
-#endif
/*
* Internal format used to store bitmap fonts
diff --git a/include/X11/fonts/fntfilst.h b/include/X11/fonts/fntfilst.h
index 1a71eae..407c4cf 100644
--- a/include/X11/fonts/fntfilst.h
+++ b/include/X11/fonts/fntfilst.h
@@ -34,9 +34,7 @@ in this Software without prior written authorization from The Open Group.
#ifndef _FONTFILEST_H_
#define _FONTFILEST_H_
-#ifndef FONTMODULE
#include <X11/Xos.h>
-#endif
#ifndef XP_PSTEXT
#include <X11/fonts/fontmisc.h>
#endif
diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h
index 7b86517..3fc60ff 100644
--- a/include/X11/fonts/fontmisc.h
+++ b/include/X11/fonts/fontmisc.h
@@ -34,19 +34,10 @@ in this Software without prior written authorization from The Open Group.
#ifndef _FONTMISC_H_
#define _FONTMISC_H_
-#ifndef FONTMODULE
#include <X11/Xfuncs.h>
#include <stdlib.h>
#include <stdio.h>
-
-#ifndef X_NOT_POSIX
#include <unistd.h>
-#else
-extern int close();
-#endif
-
-#endif /* FONTMODULE */
-
#include <X11/Xdefs.h>
@@ -89,7 +80,7 @@ extern int f_strcasecmp(const char *s1, const char *s2);
#define assert(x) ((void)0)
#ifndef strcasecmp
-#if defined(NEED_STRCASECMP) && !defined(FONTMODULE)
+#if defined(NEED_STRCASECMP)
#define strcasecmp(s1,s2) f_strcasecmp(s1,s2)
#endif
#endif
diff --git a/src/FreeType/ft.h b/src/FreeType/ft.h
index 7560c8d..d5d789e 100644
--- a/src/FreeType/ft.h
+++ b/src/FreeType/ft.h
@@ -76,10 +76,6 @@ typedef struct _FTMapping
/* ftfuncs.c */
-#if 0
-void FreeTypeRegisterFontFileFunctions(void);
-#endif
-
/* ftenc.c */
int FTPickMapping(char*, int, char*, FT_Face, FTMappingPtr);
diff --git a/src/FreeType/ftenc.c b/src/FreeType/ftenc.c
index f6436fc..27964b0 100644
--- a/src/FreeType/ftenc.c
+++ b/src/FreeType/ftenc.c
@@ -24,13 +24,7 @@ THE SOFTWARE.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <string.h>
-#else
-#include "Xmd.h"
-#include "Xdefs.h"
-#include "xf86_ansic.h"
-#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index fff6eec..9f3af5d 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -34,14 +34,8 @@ THE SOFTWARE.
#endif
#include <X11/fonts/fontmisc.h>
-#ifndef FONTMODULE
#include <string.h>
#include <math.h>
-#else
-#include "Xmd.h"
-#include "Xdefs.h"
-#include "xf86_ansic.h"
-#endif
#include <ctype.h>
#include <X11/fonts/fntfilst.h>
diff --git a/src/FreeType/fttools.c b/src/FreeType/fttools.c
index 10604b1..7277273 100644
--- a/src/FreeType/fttools.c
+++ b/src/FreeType/fttools.c
@@ -27,14 +27,8 @@
#include <config.h>
#endif
#include <X11/fonts/fontmisc.h>
-#ifndef FONTMODULE
#include <ctype.h>
#include <string.h>
-#else
-#include "Xmd.h"
-#include "Xdefs.h"
-#include "xf86_ansic.h"
-#endif
#include <X11/fonts/font.h>
#include <ft2build.h>
diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
index 507da80..49d2e8e 100644
--- a/src/FreeType/xttcap.c
+++ b/src/FreeType/xttcap.c
@@ -44,21 +44,8 @@ static char const * const releaseID =
#endif
#include <X11/fonts/fontmisc.h>
#include <string.h>
-#ifndef FONTMODULE
#include <ctype.h>
#include <math.h>
-#else
-#include "Xmd.h"
-#include "Xdefs.h"
-#include "xf86_ansic.h"
-#endif
-/*
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include <X11/Xfuncproto.h>
-#include "xf86Module.h"
-#include "xf86_ansic.h"
-*/
#ifndef True
#define True (-1)
@@ -69,17 +56,6 @@ static char const * const releaseID =
#include "xttcap.h"
-#if 0
-/*
- Prototypes for obsoleted OS (e.g. SunOS4)
- */
-
-#if (defined(sun) && !(defined(SVR4) || defined(__SVR4)))
-double strtod(char *str, char **ptr);
-double strtol(char *str, char **ptr, int base);
-#endif
-#endif
-
/**************************************************************************
Private Data Types
diff --git a/src/Speedo/out_bl2d.c b/src/Speedo/out_bl2d.c
index 6c38cb3..1f8091f 100644
--- a/src/Speedo/out_bl2d.c
+++ b/src/Speedo/out_bl2d.c
@@ -287,7 +287,7 @@ if (how_many_y < 0)
#endif
#if INCL_2D
-FUNCTION boolean end_char_2d()
+FUNCTION boolean end_char_2d(void)
/* Called when all character data has been output
* Return TRUE if output process is complete
* Return FALSE to repeat output of the transformed data beginning
@@ -605,7 +605,7 @@ if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */
#endif
#if INCL_2D
-FUNCTION static void sp_proc_intercepts_2d()
+FUNCTION static void sp_proc_intercepts_2d(void)
/* Called by sp_make_char to output accumulated intercept lists
* Clips output to xmin, xmax, sp_globals.ymin, ymax boundaries
*/
diff --git a/src/Speedo/out_blk.c b/src/Speedo/out_blk.c
index a5b669b..045d33e 100644
--- a/src/Speedo/out_blk.c
+++ b/src/Speedo/out_blk.c
@@ -280,8 +280,7 @@ if (how_many_y < 0)
}
#endif
#if INCL_BLACK
-FUNCTION boolean end_char_black()
-GDECL
+FUNCTION boolean end_char_black(/*** GDECL ***/ void)
/* Called when all character data has been output
* Return TRUE if output process is complete
* Return FALSE to repeat output of the transformed data beginning
@@ -584,8 +583,7 @@ if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */
#endif
#if INCL_BLACK
-FUNCTION LOCAL void sp_proc_intercepts_black()
-GDECL
+FUNCTION LOCAL void sp_proc_intercepts_black(/** GDECL **/ void)
/* Called by sp_make_char to output accumulated intercept lists
* Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries
diff --git a/src/Speedo/out_outl.c b/src/Speedo/out_outl.c
index 0139010..bf203f1 100644
--- a/src/Speedo/out_outl.c
+++ b/src/Speedo/out_outl.c
@@ -62,9 +62,9 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#if INCL_OUTLINE
-FUNCTION boolean init_outline(specsarg)
-GDECL
-specs_t GLOBALFAR *specsarg;
+FUNCTION boolean init_outline(
+ GDECL
+ specs_t GLOBALFAR *specsarg)
/*
* init_out2() is called by sp_set_specs() to initialize the output module.
* Returns TRUE if output module can accept requested specifications.
@@ -81,11 +81,11 @@ return (TRUE);
#endif
#if INCL_OUTLINE
-FUNCTION boolean begin_char_outline(Psw, Pmin, Pmax)
-GDECL
-point_t Psw; /* End of escapement vector (sub-pixels) */
-point_t Pmin; /* Bottom left corner of bounding box */
-point_t Pmax; /* Top right corner of bounding box */
+FUNCTION boolean begin_char_outline(
+ GDECL
+ point_t Psw, /* End of escapement vector (sub-pixels) */
+ point_t Pmin, /* Bottom left corner of bounding box */
+ point_t Pmax) /* Top right corner of bounding box */
/*
* If two or more output modules are included in the configuration, begin_char2()
* is called by begin_char() to signal the start of character output data.
@@ -123,11 +123,11 @@ return TRUE;
#endif
#if INCL_OUTLINE
-FUNCTION void begin_sub_char_outline(Psw, Pmin, Pmax)
-GDECL
-point_t Psw; /* End of sub-char escapement vector */
-point_t Pmin; /* Bottom left corner of sub-char bounding box */
-point_t Pmax; /* Top right corner of sub-char bounding box */
+FUNCTION void begin_sub_char_outline(
+ GDECL
+ point_t Psw, /* End of sub-char escapement vector */
+ point_t Pmin, /* Bottom left corner of sub-char bounding box */
+ point_t Pmax) /* Top right corner of sub-char bounding box */
/*
* If two or more output modules are included in the configuration, begin_sub_char2()
* is called by begin_sub_char() to signal the start of sub-character output data.
@@ -147,10 +147,10 @@ start_new_char();
#if INCL_OUTLINE
-FUNCTION void begin_contour_outline(P1, outside)
-GDECL
-point_t P1; /* Start point of contour */
-boolean outside; /* TRUE if outside (counter-clockwise) contour */
+FUNCTION void begin_contour_outline(
+ GDECL
+ point_t P1, /* Start point of contour */
+ boolean outside) /* TRUE if outside (counter-clockwise) contour */
/*
* If two or more output modules are included in the configuration, begin_contour2()
* is called by begin_contour() to define the start point of a new contour
@@ -173,12 +173,12 @@ start_contour((fix31)x << sp_globals.poshift, (fix31)y << sp_globals.poshift, ou
#endif
#if INCL_OUTLINE
-FUNCTION void curve_outline(P1, P2, P3,depth)
-GDECL
-point_t P1; /* First control point of Bezier curve */
-point_t P2; /* Second control point of Bezier curve */
-point_t P3; /* End point of Bezier curve */
-fix15 depth;
+FUNCTION void curve_outline(
+ GDECL
+ point_t P1, /* First control point of Bezier curve */
+ point_t P2, /* Second control point of Bezier curve */
+ point_t P3, /* End point of Bezier curve */
+ fix15 depth)
/*
* If two or more output modules are included in the configuration, curve2()
* is called by curve() to output one curve segment.
@@ -210,9 +210,9 @@ curve_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift,
#endif
#if INCL_OUTLINE
-FUNCTION void line_outline(P1)
-GDECL
-point_t P1; /* End point of vector */
+FUNCTION void line_outline(
+ GDECL
+ point_t P1) /* End point of vector */
/*
* If two or more output modules are included in the configuration, line2()
* is called by line() to output one vector.
@@ -233,8 +233,7 @@ line_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift);
#endif
#if INCL_OUTLINE
-FUNCTION void end_contour_outline()
-GDECL
+FUNCTION void end_contour_outline(/** GDECL **/ void)
/*
* If two or more output modules are included in the configuration, end_contour2()
* is called by end_contour() to signal the end of a contour.
@@ -251,8 +250,7 @@ close_contour();
#if INCL_OUTLINE
-FUNCTION void end_sub_char_outline()
-GDECL
+FUNCTION void end_sub_char_outline(/** GDECL **/ void)
/*
* If two or more output modules are included in the configuration, end_sub_char2()
* is called by end_sub_char() to signal the end of sub-character data.
@@ -268,8 +266,7 @@ printf("END_SUB_CHAR_2()\n");
#if INCL_OUTLINE
-FUNCTION boolean end_char_outline()
-GDECL
+FUNCTION boolean end_char_outline(/** GDECL **/ void)
/*
* If two or more output modules are included in the configuration, end_char2()
* is called by end_char() to signal the end of the character data.
diff --git a/src/Speedo/out_scrn.c b/src/Speedo/out_scrn.c
index 172386a..69d6743 100644
--- a/src/Speedo/out_scrn.c
+++ b/src/Speedo/out_scrn.c
@@ -426,8 +426,7 @@ if (how_many_y < 0)
#endif
#if INCL_SCREEN
-FUNCTION void end_contour_screen()
-GDECL
+FUNCTION void end_contour_screen(/** GDECL **/ void)
/* Called after the last vector in each contour
*/
{
@@ -441,8 +440,7 @@ sp_intercepts.inttype[sp_globals.next_offset-1] |= END_INT;
#if INCL_SCREEN
-FUNCTION boolean end_char_screen()
-GDECL
+FUNCTION boolean end_char_screen(/** GDECL **/ void)
/* Called when all character data has been output
* Return TRUE if output process is complete
* Return FALSE to repeat output of the transformed data beginning
@@ -751,8 +749,7 @@ if (++sp_globals.next_offset >= MAX_INTERCEPTS) /* Intercept buffer full? */
#endif
#if INCL_SCREEN
-FUNCTION LOCAL void sp_proc_intercepts_screen()
-GDECL
+FUNCTION LOCAL void sp_proc_intercepts_screen(/** GDECL **/ void)
/* Called by sp_make_char to output accumulated intercept lists
* Clips output to sp_globals.xmin, sp_globals.xmax, sp_globals.ymin, sp_globals.ymax boundaries
diff --git a/src/Speedo/out_util.c b/src/Speedo/out_util.c
index baf9427..bf2b0ee 100644
--- a/src/Speedo/out_util.c
+++ b/src/Speedo/out_util.c
@@ -41,8 +41,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define ABS(X) ( (X < 0) ? -X : X)
#if INCL_BLACK || INCL_2D || INCL_SCREEN
-static FUNCTION void restart_intercepts_out(void)
-GDECL
+static FUNCTION void restart_intercepts_out(/** GDECL **/ void)
/* Called by sp_make_char when a new sub character is started
* Freezes current sorted lists
*/
@@ -206,8 +205,7 @@ printf("CURVE_OUT(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n",
-FUNCTION void end_contour_out()
-GDECL
+FUNCTION void end_contour_out(/** GDECL **/ void)
/* Called after the last vector in each contour
*/
{
@@ -217,8 +215,7 @@ printf("END_CONTOUR_OUT()\n");
}
-FUNCTION void end_sub_char_out()
-GDECL
+FUNCTION void end_sub_char_out(/** GDECL **/ void)
/* Called after the last contour in each sub-character in a compound character
*/
{
@@ -228,8 +225,7 @@ printf("END_SUB_CHAR_OUT()\n");
}
-FUNCTION void init_intercepts_out()
-GDECL
+FUNCTION void init_intercepts_out(/** GDECL **/ void)
/* Called to initialize intercept storage data structure
*/
@@ -308,8 +304,7 @@ sp_intercepts.inttype[sp_globals.no_y_lists-1] = END_INT;
-FUNCTION void reduce_band_size_out()
-GDECL
+FUNCTION void reduce_band_size_out(/** GDECL **/ void)
{
sp_globals.y_band.band_min = sp_globals.y_band.band_max - ((sp_globals.y_band.band_max - sp_globals.y_band.band_min) >> 1);
#if INCL_2D
@@ -318,8 +313,7 @@ sp_globals.y_band.band_array_offset = sp_globals.y_band.band_min;
}
-FUNCTION boolean next_band_out()
-GDECL
+FUNCTION boolean next_band_out(/** GDECL **/ void)
{
fix15 tmpfix15;
diff --git a/src/Speedo/reset.c b/src/Speedo/reset.c
index 2153494..e31bd71 100644
--- a/src/Speedo/reset.c
+++ b/src/Speedo/reset.c
@@ -59,8 +59,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
/***** STATIC FUNCTIONS *****/
-FUNCTION void reset()
-GDECL
+FUNCTION void reset(/** GDECL **/ void)
/*
* Called by the host software to intialize the Speedo mechanism
*/
diff --git a/src/Speedo/set_trns.c b/src/Speedo/set_trns.c
index 35c2e33..cda7175 100644
--- a/src/Speedo/set_trns.c
+++ b/src/Speedo/set_trns.c
@@ -74,8 +74,7 @@ static ufix8 FONTFAR *sp_setup_pix_table(PROTO_DECL2 ufix8 FONTFAR *pointer,bool
static ufix8 FONTFAR *sp_setup_int_table(PROTO_DECL2 ufix8 FONTFAR *pointer,fix15 no_X_int_zones,fix15 no_Y_int_zones);
-FUNCTION void init_tcb()
-GDECL
+FUNCTION void init_tcb(/** GDECL **/ void)
/*
* Called by sp_make_char() and make_comp_char() to initialize the current
* transformation control block to the top level transformation.
@@ -246,8 +245,7 @@ end_plaid_data();
return pointer;
}
-FUNCTION static void sp_constr_update()
-GDECL
+FUNCTION static void sp_constr_update(/** GDECL **/ void)
/*
* Called by plaid_tcb() to update the constraint table for the current
* transformation.
@@ -584,7 +582,7 @@ if ((sp_globals.pspecs->flags & SQUEEZE_BOTTOM) &&
sp_plaid.pix[end_edge] = em_bot_pix;
}
-FUNCTION boolean calculate_x_scale(x_factor, x_offset, no_X_ctrl_zones)
+FUNCTION boolean calculate_x_scale(
GDECL
fix31 *x_factor,
fix31 *x_offset,
@@ -1199,8 +1197,7 @@ for (i = 0; i < n; i++)
return pointer;
}
#if INCL_ISW
-FUNCTION fix31 compute_isw_scale()
-GDECL
+FUNCTION fix31 compute_isw_scale(/** GDECL **/ void)
{
fix31 isw_scale;
diff --git a/src/Speedo/spdo_prv.h b/src/Speedo/spdo_prv.h
index 2b3882c..9c58b0c 100644
--- a/src/Speedo/spdo_prv.h
+++ b/src/Speedo/spdo_prv.h
@@ -119,7 +119,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define get_char_bbox(char_index,bbox) sp_get_char_bbox(char_index,bbox)
#define make_char(char_index) sp_make_char(char_index)
#if INCL_ISW
-#define compute_isw_scale() sp_compute_isw_scale()
+#define compute_isw_scale sp_compute_isw_scale
#define do_make_char(char_index) sp_do_make_char(char_index)
#define make_char_isw(char_index,imported_width) sp_make_char_isw(char_index,imported_width)
#define reset_xmax(xmax) sp_reset_xmax(xmax)
@@ -141,9 +141,9 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define begin_char_black(Psw,Pmin,Pmax) sp_begin_char_black(Psw,Pmin,Pmax)
#define begin_contour_black(P1,outside) sp_begin_contour_black(P1,outside)
#define line_black(P1) sp_line_black(P1)
-#define end_char_black() sp_end_char_black()
+#define end_char_black sp_end_char_black
#define add_intercept_black(y,x) sp_add_intercept_black(y,x)
-#define proc_intercepts_black() sp_proc_intercepts_black()
+#define proc_intercepts_black sp_proc_intercepts_black
#define init_screen(specsarg) sp_init_screen(specsarg)
#define begin_char_screen(Psw,Pmin,Pmax) sp_begin_char_screen(Psw,Pmin,Pmax)
@@ -152,8 +152,8 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3) sp_scan_curve_screen(X0,Y0,X1,Y1,X2,Y2,X3,Y3)
#define vert_line_screen(x,y1,y2) sp_vert_line_screen(x,y1,y2)
#define line_screen(P1) sp_line_screen(P1)
-#define end_contour_screen() sp_end_contour_screen()
-#define end_char_screen() sp_end_char_screen()
+#define end_contour_screen sp_end_contour_screen
+#define end_char_screen sp_end_char_screen
#define add_intercept_screen(y,x) sp_add_intercept_screen(y,x)
#define proc_intercepts_screen() sp_proc_intercepts_screen()
@@ -163,15 +163,15 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define begin_contour_outline(P1,outside) sp_begin_contour_outline(P1,outside)
#define curve_outline(P1,P2,P3,depth) sp_curve_outline(P1,P2,P3,depth)
#define line_outline(P1) sp_line_outline(P1)
-#define end_contour_outline() sp_end_contour_outline()
+#define end_contour_outline sp_end_contour_outline
#define end_sub_char_outline() sp_end_sub_char_outline()
-#define end_char_outline() sp_end_char_outline()
+#define end_char_outline sp_end_char_outline
#define init_2d(specsarg) sp_init_2d(specsarg)
#define begin_char_2d(Psw, Pmin, Pmax) sp_begin_char_2d(Psw, Pmin, Pmax)
#define begin_contour_2d(P1, outside) sp_begin_contour_2d(P1, outside)
#define line_2d(P1) sp_line_2d(P1)
-#define end_char_2d() sp_end_char_2d()
+#define end_char_2d sp_end_char_2d
#define add_intercept_2d(y, x) sp_add_intercept_2d(y, x)
#define proc_intercepts_2d() sp_proc_intercepts_2d()
#define draw_vector_to_2d(x0, y0, x1, y1, band) sp_draw_vector_to_2d(x0, y0, x1, y1, band)
@@ -179,17 +179,17 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define init_char_out(Psw,Pmin,Pmax) sp_init_char_out(Psw,Pmin,Pmax)
#define begin_sub_char_out(Psw,Pmin,Pmax) sp_begin_sub_char_out(Psw,Pmin,Pmax)
#define curve_out(P1,P2,P3,depth) sp_curve_out(P1,P2,P3,depth)
-#define end_contour_out() sp_end_contour_out()
-#define end_sub_char_out() sp_end_sub_char_out()
-#define init_intercepts_out() sp_init_intercepts_out()
+#define end_contour_out sp_end_contour_out
+#define end_sub_char_out sp_end_sub_char_out
+#define init_intercepts_out sp_init_intercepts_out
#define restart_intercepts_out sp_restart_intercepts_out
#define set_first_band_out(Pmin,Pmax) sp_set_first_band_out(Pmin,Pmax)
-#define reduce_band_size_out() sp_reduce_band_size_out()
-#define next_band_out() sp_next_band_out()
+#define reduce_band_size_out sp_reduce_band_size_out
+#define next_band_out sp_next_band_out
#define init_userout(specsarg) sp_init_userout(specsarg)
-#define reset() sp_reset()
+#define reset sp_reset
#define set_key(key) sp_set_key(key)
#define get_cust_no(font_buff) sp_get_cust_no(font_buff)
#define set_specs(specsarg) sp_set_specs(specsarg)
@@ -200,13 +200,13 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
#define type_tcb(ptcb) sp_type_tcb(ptcb)
#define read_long(pointer) sp_read_long(pointer)
#define read_word_u(pointer) sp_read_word_u(pointer)
-#define init_tcb() sp_init_tcb()
+#define init_tcb sp_init_tcb
#define scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale) sp_scale_tcb(ptcb,x_pos,y_pos,x_scale,y_scale)
#define plaid_tcb(ppointer,format) sp_plaid_tcb(ppointer,format)
#define skip_orus(ppointer,short_form,no_ctrl_zones) sp_skip_orus(ppointer,short_form,no_ctrl_zones)
#define skip_interpolation_table(ppointer,format) sp_skip_interpolation_table(ppointer,format)
#define skip_control_zone(ppointer,format) sp_skip_control_zone(ppointer,format)
-#define constr_update() sp_constr_update()
+#define constr_update sp_constr_update
#define read_oru_table(ppointer) sp_read_oru_table(ppointer)
#define calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix) sp_calculate_x_pix(start_edge,end_edge,constr_nr,x_scale,x_offset,ppo,setwidth_pix)
#define calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix) sp_calculate_y_pix(start_edge,end_edge,constr_nr,top_scale,bottom_scale,ppo,emtop_pix,embot_pix)
diff --git a/src/Speedo/sperr.c b/src/Speedo/sperr.c
index 36ce511..fa046d3 100644
--- a/src/Speedo/sperr.c
+++ b/src/Speedo/sperr.c
@@ -59,9 +59,7 @@ from The Open Group.
#endif
#include "spint.h"
-#ifndef FONTMODULE
#include <stdarg.h>
-#endif
extern void ErrorF(const char* f, ...);
diff --git a/src/Speedo/spfile.c b/src/Speedo/spfile.c
index c58c0e4..1e66415 100644
--- a/src/Speedo/spfile.c
+++ b/src/Speedo/spfile.c
@@ -56,11 +56,7 @@ from The Open Group.
#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontenc.h>
-#ifndef FONTMODULE
#include <stdio.h>
-#else
-#include "xf86_ansic.h"
-#endif
#include "spint.h"
#include "bics-unicode.h"
diff --git a/src/Speedo/spfont.c b/src/Speedo/spfont.c
index c209d5a..284f55f 100644
--- a/src/Speedo/spfont.c
+++ b/src/Speedo/spfont.c
@@ -61,18 +61,7 @@ from The Open Group.
#include <X11/fonts/FSproto.h>
#include "spint.h"
#include <X11/fonts/fontutil.h>
-#ifndef FONTMODULE
-#ifdef _XOPEN_SOURCE
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
-#else
-#include "servermd.h"
-#include "xf86_ansic.h"
-#endif
#ifndef M_PI
#define M_PI 3.14159
diff --git a/src/Speedo/spfuncs.c b/src/Speedo/spfuncs.c
index da4d5c5..3d6c190 100644
--- a/src/Speedo/spfuncs.c
+++ b/src/Speedo/spfuncs.c
@@ -54,9 +54,7 @@ from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <X11/Xos.h>
-#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
#include "spint.h"
@@ -159,7 +157,7 @@ static FontRendererRec renderer = {
};
void
-SpeedoRegisterFontFileFunctions()
+SpeedoRegisterFontFileFunctions(void)
{
sp_make_standard_props();
sp_reset();
diff --git a/src/Speedo/spglyph.c b/src/Speedo/spglyph.c
index 113f378..19e7cf8 100644
--- a/src/Speedo/spglyph.c
+++ b/src/Speedo/spglyph.c
@@ -280,7 +280,7 @@ sp_open_bitmap(fix31 x_set_width, fix31 y_set_width, fix31 xorg, fix31 yorg,
}
void
-sp_close_bitmap()
+sp_close_bitmap(void)
{
CharInfoPtr ci = &sp_fp_cur->encoding[cfv->char_id - sp_fp_cur->master->first_char_id];
int bpr = cfv->bpr;
diff --git a/src/Speedo/spinfo.c b/src/Speedo/spinfo.c
index d7a1edd..c682fe0 100644
--- a/src/Speedo/spinfo.c
+++ b/src/Speedo/spinfo.c
@@ -57,11 +57,7 @@ from The Open Group.
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
#include "spint.h"
-#ifndef FONTMODULE
#include <math.h>
-#else
-#include "xf86_ansic.h"
-#endif
/* percentage of pointsize used to specify ascent & descent */
#define STRETCH_FACTOR 120
@@ -126,7 +122,7 @@ static fontProp extraProps[] = {
#define NPROPS (NNAMEPROPS + NEXTRAPROPS)
void
-sp_make_standard_props()
+sp_make_standard_props(void)
{
int i;
fontProp *t;
diff --git a/src/Speedo/spint.h b/src/Speedo/spint.h
index 299882c..7ceae00 100644
--- a/src/Speedo/spint.h
+++ b/src/Speedo/spint.h
@@ -53,11 +53,7 @@ from The Open Group.
#define _SPINT_H_
#include <X11/fonts/fntfilst.h>
-#ifndef XFree86LOADER
#include <stdio.h>
-#else
-#include <xf86_ansic.h>
-#endif
#include <X11/Xfuncproto.h>
#include "speedo.h"
diff --git a/src/Type1/arith.c b/src/Type1/arith.c
index 92a372a..f09c0d3 100644
--- a/src/Type1/arith.c
+++ b/src/Type1/arith.c
@@ -53,9 +53,6 @@ The included files are:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-# include "os.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "arith.h"
diff --git a/src/Type1/curves.c b/src/Type1/curves.c
index 9d0c3f8..62dbf18 100644
--- a/src/Type1/curves.c
+++ b/src/Type1/curves.c
@@ -46,9 +46,6 @@ Include files needed:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-# include "os.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/curves.h b/src/Type1/curves.h
index ca54bad..ea9e128 100644
--- a/src/Type1/curves.h
+++ b/src/Type1/curves.h
@@ -36,9 +36,6 @@
#define FlattenConic(xM,yM,xC,yC,r) t1_StepConic(NULL,(fractpel)0,(fractpel)0,xM,yM,xC,yC,r)
#define FlattenBezier(xB,yB,xC,yC,xD,yD) t1_StepBezier(NULL,(fractpel)0,(fractpel)0,xB,yB,xC,yC,xD,yD)
-#if 0
-struct segment *t1_StepConic();
-#endif
extern struct segment *t1_StepBezier ( struct region *R, fractpel xA, fractpel yA, fractpel xB, fractpel yB, fractpel xC, fractpel yC, fractpel xD, fractpel yD );
/*END SHARED*/
diff --git a/src/Type1/fontfcn.c b/src/Type1/fontfcn.c
index ba5db0e..5aae0a6 100644
--- a/src/Type1/fontfcn.c
+++ b/src/Type1/fontfcn.c
@@ -34,14 +34,8 @@
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <stdio.h>
#include <string.h>
-#else
-#include "Xmd.h" /* For INT32 declaration */
-#include "Xdefs.h" /* For Bool */
-#include "xf86_ansic.h"
-#endif
#include "t1imager.h"
#include "util.h"
#include <X11/fonts/fntfilst.h>
diff --git a/src/Type1/hints.c b/src/Type1/hints.c
index 14deac2..3cdf8ba 100644
--- a/src/Type1/hints.c
+++ b/src/Type1/hints.c
@@ -43,9 +43,6 @@ The included files are:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-# include "os.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/lines.c b/src/Type1/lines.c
index 72fb79f..4edd7a1 100644
--- a/src/Type1/lines.c
+++ b/src/Type1/lines.c
@@ -162,10 +162,12 @@ The main work is done by Bresenham(); here we just perform checks and
get the line so that its Y direction is always increasing:
*/
-void StepLine(R, x1, y1, x2, y2)
- register struct region *R; /* region being built */
- register fractpel x1,y1; /* starting point */
- register fractpel x2,y2; /* ending point */
+void StepLine(
+ struct region *R, /* region being built */
+ fractpel x1, /* starting point */
+ fractpel y1,
+ fractpel x2, /* ending point */
+ fractpel y2)
{
register fractpel dy;
diff --git a/src/Type1/objects.c b/src/Type1/objects.c
index 7a49bcb..dc5f415 100644
--- a/src/Type1/objects.c
+++ b/src/Type1/objects.c
@@ -56,18 +56,11 @@ these may be defined as macros; if these ".h" files do not exist on your
system it is a pretty safe bet that these are external entry points and
you do do not need to include these header files.
*/
-
-#ifndef FONTMODULE
+
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
-#else
-#include "Xdefs.h" /* Bool declaration */
-#include "Xmd.h" /* INT32 declaration */
-#include "os.h"
-#include "xf86_ansic.h"
-#endif
/*
override incorrect system functions; for example you might define
diff --git a/src/Type1/objects.h b/src/Type1/objects.h
index ea48148..ea736e1 100644
--- a/src/Type1/objects.h
+++ b/src/Type1/objects.h
@@ -33,9 +33,7 @@
#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
-#ifndef FONTMODULE
#include <stdlib.h>
-#endif
/*SHARED*/
#define Permanent(obj) t1_Permanent(obj)
diff --git a/src/Type1/paths.c b/src/Type1/paths.c
index b8b1364..a0fe5a5 100644
--- a/src/Type1/paths.c
+++ b/src/Type1/paths.c
@@ -47,9 +47,6 @@ The included files are:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-# include "os.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/paths.h b/src/Type1/paths.h
index 3803c53..9e1d1a9 100644
--- a/src/Type1/paths.h
+++ b/src/Type1/paths.h
@@ -63,13 +63,6 @@ extern struct segment *t1_Line ( struct segment *P );
extern struct segment *t1_Join ( struct segment *p1, struct segment *p2 );
/* close a path or path set */
extern struct segment *t1_ClosePath ( struct segment *p0, int lastonly );
-#if 0
-struct conicsegment *t1_Conic(); /* conic curve path segment */
-
-struct conicsegment *t1_RoundConic(); /* ditto, specified another way */
-struct conicsegment *t1_ArcP3(); /* circular path segment with three points */
-struct conicsegment *t1_ArcCA(); /* ditto, with center point and angle */
-#endif
/* Bezier third order curve path segment */
extern struct beziersegment *t1_Bezier ( struct segment *B, struct segment *C,
struct segment *D );
diff --git a/src/Type1/regions.c b/src/Type1/regions.c
index a086821..6c70372 100644
--- a/src/Type1/regions.c
+++ b/src/Type1/regions.c
@@ -44,9 +44,6 @@ The included files are:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-# include "os.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
@@ -977,9 +974,9 @@ Then, we return the caller a pointer to 'new':
The two edges must be disjoint vertically.
*/
-static void vertjoin(top, bottom)
- register struct edgelist *top; /* uppermost region */
- register struct edgelist *bottom; /* bottommost region */
+static void vertjoin(
+ register struct edgelist *top, /* uppermost region */
+ register struct edgelist *bottom) /* bottommost region */
{
if (BOTTOM(top) > TOP(bottom))
Abort("vertjoin not disjoint");
diff --git a/src/Type1/regions.h b/src/Type1/regions.h
index d869cf7..0257ca7 100644
--- a/src/Type1/regions.h
+++ b/src/Type1/regions.h
@@ -38,12 +38,6 @@
/* returns the interior of a closed path */
extern struct region *t1_Interior ( struct segment *p, int fillrule );
-#if 0
-struct region *t1_Union(); /* set union of paths or regions */
-struct region *t1_Intersect(); /* set intersection of regions */
-struct region *t1_Complement(); /* complement of a region */
-int t1_Overlap(); /* returns a Boolean; TRUE if regions overlap */
-#endif
#define TT_INFINITY t1_Infinity
@@ -101,11 +95,9 @@ extern void t1_KillRegion ( struct region *area );
else if (x2 > R->edgexmax) R->edgexmax = x2; \
}
-#ifndef FONTMODULE
#ifndef __sxg__
#include <limits.h>
#endif
-#endif
#ifdef SHRT_MIN
#define MINPEL SHRT_MIN
#else
diff --git a/src/Type1/scanfont.c b/src/Type1/scanfont.c
index 8cad57f..054ab14 100644
--- a/src/Type1/scanfont.c
+++ b/src/Type1/scanfont.c
@@ -35,13 +35,7 @@
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <string.h>
-#else
-#include "Xdefs.h" /* Bool declaration */
-#include "Xmd.h" /* INT32 declaration */
-#include "xf86_ansic.h"
-#endif
#include "t1stdio.h"
#include "util.h"
#include "token.h"
diff --git a/src/Type1/spaces.c b/src/Type1/spaces.c
index 1f5a321..5f01590 100644
--- a/src/Type1/spaces.c
+++ b/src/Type1/spaces.c
@@ -42,15 +42,8 @@ This module is responsible for handling the TYPE1IMAGER "XYspace" object.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifdef FONTMODULE
-#include "Xdefs.h" /* Bool declaration ??? */
-#include "Xmd.h" /* INT32 declaration ??? */
-#include "os.h"
-#include "xf86_ansic.h"
-#else
#include "X11/Xos.h"
#include <stdio.h>
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/t1funcs.c b/src/Type1/t1funcs.c
index e4b2209..03c522d 100644
--- a/src/Type1/t1funcs.c
+++ b/src/Type1/t1funcs.c
@@ -88,29 +88,13 @@ from The Open Group.
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <string.h>
-#ifdef _XOPEN_SOURCE
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
#include "X11/Xfuncs.h"
#ifdef USE_MMAP
#include <sys/types.h>
#include <sys/mman.h>
#endif
-#else
-#include "Xmd.h"
-#include "Xdefs.h"
-#endif
-
-#ifdef FONTMODULE
-#include "os.h"
-#include "xf86_ansic.h"
-#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
diff --git a/src/Type1/t1info.c b/src/Type1/t1info.c
index eea22b3..f11a8ea 100644
--- a/src/Type1/t1info.c
+++ b/src/Type1/t1info.c
@@ -90,12 +90,8 @@ from The Open Group.
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
-#ifndef FONTMODULE
#include <stdio.h>
#include <math.h>
-#else
-#include "xf86_ansic.h"
-#endif
#include <X11/fonts/FSproto.h>
#include "objects.h"
diff --git a/src/Type1/t1io.c b/src/Type1/t1io.c
index ba2e580..9e09046 100644
--- a/src/Type1/t1io.c
+++ b/src/Type1/t1io.c
@@ -41,14 +41,8 @@
#define STATIC static
#endif
-#ifndef FONTMODULE
#include <fcntl.h>
#include <unistd.h>
-#else
-#include "Xdefs.h"
-#include "Xmd.h" /* INT32 declaration */
-#include "xf86_ansic.h"
-#endif
#include "t1stdio.h"
#include "t1hdigit.h"
#ifdef WIN32
diff --git a/src/Type1/t1malloc.c b/src/Type1/t1malloc.c
index df863a2..f421dda 100644
--- a/src/Type1/t1malloc.c
+++ b/src/Type1/t1malloc.c
@@ -41,40 +41,8 @@ routines (malloc/free).
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <stdio.h>
-#else
-#include "Xdefs.h" /* Bool declaration */
-#include "Xmd.h" /* INT32 declaration */
-#include "os.h"
-#include "xf86_ansic.h"
-#endif
#include "objects.h" /* get #define for Abort() */
-
-
-/*
-:h3.Define NULL
-
-In the beginning, C compilers made no assumptions about NULL. It was
-even theoretically possible that NULL would not be 0. ANSI has tied
-this down a bit. The following definition seems to be the most
-popular (in terms of reducing compiler complaints), however, if your
-compiler is unhappy about it, you can redefine it on the command line:
-*/
-#ifndef NULL
-#include <stddef.h>
-#endif
-/*
-Of course, NULL is important because xiMalloc() is defined to return
-NULL when out of memory.
-
-:h2.Data Structures Used to Manage Free Memory
-
-:h3.The "freeblock" Structure
-
-The list of available memory blocks is a doubly-linked list. Each
-block begins with the following structure:
-*/
struct freeblock {
long size; /* number of 'longs' in block,
diff --git a/src/Type1/type1.c b/src/Type1/type1.c
index 5515f46..24e79e0 100644
--- a/src/Type1/type1.c
+++ b/src/Type1/type1.c
@@ -51,14 +51,8 @@
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <stdio.h> /* a system-dependent include, usually */
#include <math.h>
-#else
-#include "Xdefs.h"
-#include "Xmd.h"
-#include "xf86_ansic.h"
-#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
diff --git a/src/Type1/util.c b/src/Type1/util.c
index 2eefc11..e98f6ba 100644
--- a/src/Type1/util.c
+++ b/src/Type1/util.c
@@ -34,13 +34,7 @@
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <stdio.h>
-#else
-#include "Xdefs.h"
-#include "Xmd.h"
-#include "xf86_ansic.h"
-#endif
#include "util.h"
#include <X11/fonts/fontmisc.h> /* for xalloc/xfree */
diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
index a6f0c1e..f9a3a5f 100644
--- a/src/bitmap/bdfread.c
+++ b/src/bitmap/bdfread.c
@@ -56,9 +56,7 @@ from The Open Group.
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <ctype.h>
-#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
/* use bitmap structure */
diff --git a/src/bitmap/bdfutils.c b/src/bitmap/bdfutils.c
index a0c5ae9..61406b8 100644
--- a/src/bitmap/bdfutils.c
+++ b/src/bitmap/bdfutils.c
@@ -55,11 +55,9 @@ from The Open Group.
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
-#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontstruct.h>
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index ffdbe1d..63e4f37 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -55,15 +55,7 @@ from The Open Group.
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include <X11/fonts/fontutil.h>
-#ifndef FONTMODULE
-#ifdef _XOPEN_SOURCE
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
-#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b)) ? a : b)
diff --git a/src/bitmap/pcfread.c b/src/bitmap/pcfread.c
index c5db255..3a0eeeb 100644
--- a/src/bitmap/pcfread.c
+++ b/src/bitmap/pcfread.c
@@ -868,11 +868,8 @@ pmfReadFont(FontPtr pFont, FontFilePtr file,
pci++;
}
-#ifdef FONTMODULE
- sizebitmaps = 1024; /* Default - we xalloc the size anyway */
-#else
sizebitmaps = BUFSIZ;
-#endif
+
/* guard against completely empty font */
bitmaps = (char *) xalloc(sizebitmaps);
if (!bitmaps) {
diff --git a/src/bitmap/snfread.c b/src/bitmap/snfread.c
index f48e2d8..b35073b 100644
--- a/src/bitmap/snfread.c
+++ b/src/bitmap/snfread.c
@@ -55,10 +55,7 @@ from The Open Group.
#include <config.h>
#endif
-#ifndef FONTMODULE
#include <ctype.h>
-#endif
-
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/bitmap.h>
#include "snfstr.h"
diff --git a/src/fontfile/fontscale.c b/src/fontfile/fontscale.c
index 8e9de51..a6eafc7 100644
--- a/src/fontfile/fontscale.c
+++ b/src/fontfile/fontscale.c
@@ -35,13 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
#include <X11/fonts/fntfilst.h>
-#ifdef _XOPEN_SOURCE
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
Bool
FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,