[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Freetype 2.0.6 on OpenVMS
From: |
zinser |
Subject: |
[Devel] Freetype 2.0.6 on OpenVMS |
Date: |
Sun, 20 Jan 2002 02:26:20 +0100 |
Hello,
I've build the latest release Freetype version 2.0.6 with
Compaq C V6.4-005 on OpenVMS Alpha V7.3 and ran into a few
minor issues that I'd like to suggest remedies for.
During the compilation of ftcache the following messages were
produced:
MMK
CC/include=([--.include],[--.src.cache]) FTCACHE.C
if ( --family->num_nodes <= 0 )
.........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "--family->num_no
des" is being compared with a relational operator to a constant whose value is n
ot greater than zero. This might not be what you intended.
at line number 47 in file PUBLIC$ROOT:[XTOOLS.LIBS.FT2.SRC.CACHE]ftccache.c;1
if ( manager->num_nodes <= 0 )
.........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "manager->num_nod
es" is being compared with a relational operator to a constant whose value is no
t greater than zero. This might not be what you intended.
at line number 216 in file PUBLIC$ROOT:[XTOOLS.LIBS.FT2.SRC.CACHE]ftccache.c;1
The compiler is correct to complain since num_nodes is in both
cases defined ad FT_UInt (unsigned int), which by definition can
not become negative. This is easily fixed using the following patch:
*** cache/ftccache.c Mon Jan 14 17:07:58 2002
--- cache/ftccache.c.orig Mon Jan 14 17:06:42 2002
***************
*** 44,50 ****
family = entry->family;
/* remove from parent set table - eventually destroy the set */
! if ( --family->num_nodes == 0 )
FT_LruList_Remove( cache->families, (FT_LruNode) family );
}
--- 44,50 ----
family = entry->family;
/* remove from parent set table - eventually destroy the set */
! if ( --family->num_nodes <= 0 )
FT_LruList_Remove( cache->families, (FT_LruNode) family );
}
***************
*** 213,219 ****
FREE( node );
/* check, just in case of general corruption :-) */
! if ( manager->num_nodes == 0 )
FT_ERROR(( "ftc_node_destroy: invalid cache node count! = %d\n",
manager->num_nodes ));
}
--- 213,219 ----
FREE( node );
/* check, just in case of general corruption :-) */
! if ( manager->num_nodes <= 0 )
FT_ERROR(( "ftc_node_destroy: invalid cache node count! = %d\n",
manager->num_nodes ));
}
This was cross tested against a Linux (SuSe 7.3 Kernel 2.4.10,
gcc 2.95.3) and compiled fine on this platform too.
Else I would only like to suggest the following improvements to
the VMS specific makefiles (descrip.mms) to
a.) Allow the correct compilation of the demos (see below), which
needed the routines from ftmm
b.) Catch all the dependcies of ftcache (like ftccache ;-)
*** base/descrip.mms Mon Jan 14 17:08:08 2002
--- base/descrip.mms.orig Mon Jan 14 17:06:23 2002
***************
*** 15,21 ****
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
! OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftmm.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
--- 15,21 ----
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
! OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
*** cache/descrip.mms Mon Jan 14 17:07:52 2002
--- cache/descrip.mms.orig Mon Jan 14 17:06:51 2002
***************
*** 21,26 ****
library [--.lib]freetype.olb $(OBJS)
# EOF
-
- ftcache.obj : ftcache.c ftlru.c ftcmanag.c ftccache.c ftcglyph.c ftcimage.c \
- ftcsbits.c ftccmap.c
--- 21,23 ----
On a positive note I was able to build successfully all of the
demo programs for Freetype on the same system with really minor
modifications, which also are definite #ifdef VMS cases, i.e. no
impact on other platforms at all. The only other "change" to get this
to work is the addtion of one descrip.mms file to the toplevel
directory of the demos source-tree which can be found below:
*** src/common.h Mon Jan 14 18:07:43 2002
--- src/common.h.orig Mon Jan 14 18:06:47 2002
***************
*** 12,23 ****
/* Note that by default, both functions are implemented in common.c */
- #ifdef VMS
- #define getopt local_getopt
- #define optind local_optind
- #define opterr local_opterr
- #endif
-
#ifdef __cplusplus
extern "C" {
#endif
--- 12,17 ----
*** graph/grinit.c Mon Jan 14 18:07:55 2002
--- graph/grinit.c.orig Mon Jan 14 18:07:03 2002
***************
*** 6,16 ****
#define GR_INIT_BUILD
#ifdef DEVICE_X11
- #ifndef VMS
#include "x11/grx11.h"
- #else
- #include "grx11.h"
- #endif
#endif
#ifdef DEVICE_OS2_PM
--- 6,12 ----
# This file is part of the FreeType project.
#
# DESCRIP.MMS: Make file for OpenVMS using MMS or MMK
# Created by Martin P.J. Zinser
# (address@hidden (preferred) or address@hidden (work))
.FIRST
define freetype [-.include.freetype]
CC = cc
# location of src for Test programs
SRCDIR = [.src]
GRAPHSRC = [.graph]
GRX11SRC = [.graph.x11]
OBJDIR = [.obj]
SRC = $(SRCDIR)common.c \
$(SRCDIR)compos.c \
$(SRCDIR)ftdump.c \
$(SRCDIR)ftlint.c \
$(SRCDIR)ftmemchk.c \
$(SRCDIR)testnames.c \
$(SRCDIR)ftmulti.c \
$(SRCDIR)fttimer.c \
$(SRCDIR)ftstring.c \
$(SRCDIR)fttry.c \
$(SRCDIR)ftview.c \
# include paths
INCLUDES = /include=([-.include],[.graph])
GRAPHOBJ = $(OBJDIR)grblit.obj, \
$(OBJDIR)grobjs.obj, \
$(OBJDIR)grfont.obj, \
$(OBJDIR)grinit.obj, \
$(OBJDIR)grdevice.obj,\
$(OBJDIR)grx11.obj
# C flags
CFLAGS = $(CCOPT)$(INCLUDES)/obj=$(OBJDIR)
ALL : $(OBJDIR)test.opt ftlint.exe ftmemchk.exe ftdump.exe testnames.exe \
ftview.exe ftmulti.exe ftstring.exe fttimer.exe
$(OBJDIR)test.opt :
open/write opt $(OBJDIR)test.opt
write opt "[-.lib]freetype.olb/lib"
write opt "sys$share:decw$xlibshr.exe/share"
close opt
ftlint.exe : $(OBJDIR)ftlint.obj
link $(OBJDIR)ftlint.obj,test.opt/opt
ftmemchk.exe : $(OBJDIR)ftmemchk.obj
link $(OBJDIR)ftmemchk.obj,test.opt/opt
ftdump.exe : $(OBJDIR)ftdump.obj,$(OBJDIR)common.obj
link $(OBJDIR)ftdump.obj,common.obj,test.opt/opt
testnames.exe : $(OBJDIR)testnames.obj
link $(OBJDIR)testnames.obj,test.opt/opt
ftview.exe : $(OBJDIR)ftview.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(OBJDIR)ftview.obj,common.obj,$(GRAPHOBJ),test.opt/opt
ftmulti.exe : $(OBJDIR)ftmulti.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(OBJDIR)ftmulti.obj,common.obj,$(GRAPHOBJ),test.opt/opt
ftstring.exe : $(OBJDIR)ftstring.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(OBJDIR)ftstring.obj,common.obj,$(GRAPHOBJ),test.opt/opt
fttimer.exe : $(OBJDIR)fttimer.obj
link $(OBJDIR)fttimer.obj,test.opt/opt
$(OBJDIR)common.obj : $(SRCDIR)common.c , $(SRCDIR)common.h
$(OBJDIR)ftlint.obj : $(SRCDIR)ftlint.c
$(OBJDIR)ftmemchk.obj : $(SRCDIR)ftmemchk.c
$(OBJDIR)ftdump.obj : $(SRCDIR)ftdump.c
$(OBJDIR)testnames.obj : $(SRCDIR)testnames.c
$(OBJDIR)ftview.obj : $(SRCDIR)ftview.c
$(OBJDIR)grblit.obj : $(GRAPHSRC)grblit.c
$(OBJDIR)grobjs.obj : $(GRAPHSRC)grobjs.c
$(OBJDIR)grfont.obj : $(GRAPHSRC)grfont.c
$(OBJDIR)grinit.obj : $(GRAPHSRC)grinit.c
set def $(GRAPHSRC)
$(CC)/include=([.x11],[])/define=(DEVICE_X11)/obj=[-.obj] grinit.c
set def [-]
$(OBJDIR)grx11.obj : $(GRX11SRC)grx11.c
set def $(GRX11SRC)
$(CC)/obj=[--.obj]/include=([-]) grx11.c
set def [--]
$(OBJDIR)grdevice.obj : $(GRAPHSRC)grdevice.c
$(OBJDIR)ftmulti.obj : $(SRCDIR)ftmulti.c
$(OBJDIR)ftstring.obj : $(SRCDIR)ftstring.c
$(OBJDIR)fttimer.obj : $(SRCDIR)fttimer.c
I hope you might consider these changes for inclusion in the
next version.
Greetings, Martin
Dr. Martin P.J. Zinser Email: address@hidden
2512 Victor Avenue Phone: +1 312 523 6659
Glenview, IL, 60025 FAX: +1 312 408 3071
USA
- [Devel] Freetype 2.0.6 on OpenVMS,
zinser <=