/***************************************************************************/
/* */
/* ttinterp.c */
/* */
/* TrueType bytecode interpreter (body). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftcalc.h>
#include <freetype/ftsystem.h>
#ifdef FT_FLAT_COMPILE
#include "ttinterp.h"
#else
#include <truetype/ttinterp.h>
#endif
#include <freetype/internal/tterrors.h>
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_MULFIX FT_MulFix
#define TT_MULDIV FT_MulDiv
#define TT_INT64 FT_Int64
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT trace_ttinterp
#undef NO_APPLE_PATENT
#define APPLE_THRESHOLD 0x4000000L
/*************************************************************************/
/* */
/* In order to detect infinite loops in the code, we set up a counter */
/* within the run loop. A single stroke of interpretation is now */
/* limitet to a maximal number of opcodes defined below. */
/* */
#define MAX_RUNNABLE_OPCODES 1000000L
/*************************************************************************/
/* */
/* There are two kinds of implementations: */
/* */
/* a. static implementation */
/* */
/* The current execution context is a static variable, which fields */
/* are accessed directly by the interpreter during execution. The */
/* context is named `cur'. */
/* */
/* This version is non-reentrant, of course. */
/* */
/* b. indirect implementation */
/* */
/* The current execution context is passed to _each_ function as its */
/* first argument, and each field is thus accessed indirectly. */
/* */
/* This version is fully re-entrant. */
/* */
/* The idea is that an indirect implementation may be slower to execute */
/* on low-end processors that are used in some systems (like 386s or */
/* even 486s). */
/* */
/* As a consequence, the indirect implementation is now the default, as */
/* its performance costs can be considered negligible in our context. */
/* Note, however, that we kept the same source with macros because: */
/* */
/* - The code is kept very close in design to the Pascal code used for */
/* development. */
/* */
/* - It's much more readable that way! */
/* */
/* - It's still open to experimentation and tuning. */
/* */
/*************************************************************************/
#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */
#define CUR (*exc) /* see ttobjs.h */
#else /* static implementation */
#define CUR cur
static
TT_ExecContextRec cur; /* static exec. context variable */
/* apparently, we have a _lot_ of direct indexing when accessing */
/* the static `cur', which makes the code bigger (due to all the */
/* four bytes addresses). */
#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */
/*************************************************************************/
/* */
/* The instruction argument stack. */
/* */
#define INS_ARG EXEC_OP_ FT_Long* args /* see ttobjs.h for EXEC_OP_ */
/*************************************************************************/
/* */
/* This macro is used whenever `exec' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define FT_UNUSED_EXEC FT_UNUSED( CUR )
/*************************************************************************/
/* */
/* This macro is used whenever `args' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args )
/*************************************************************************/
/* */
/* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to */
/* increase readabilty of the code. */
/* */
/*************************************************************************/
#define SKIP_Code() \
SkipCode( EXEC_ARG )
#define GET_ShortIns() \
GetShortIns( EXEC_ARG )
#define NORMalize( x, y, v ) \
Normalize( EXEC_ARG_ x, y, v )
#define SET_SuperRound( sc
没有合适的资源?快使用搜索试试~ 我知道了~
qt-embedded-2.2.4.tar.gz
需积分: 0 2 下载量 81 浏览量
2009-09-03
11:06:45
上传
评论
收藏 13.5MB GZ 举报
温馨提示
共2000个文件
html:1184个
h:899个
3qt:660个
qt-embedded-2.2.4.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
qt-embedded-2.2.4.tar.gz (2000个子文件)
ttinterp.c 242KB
pnggccrd.c 202KB
pngvcrd.c 138KB
pngrtran.c 135KB
ftraster.c 103KB
pngrutil.c 84KB
lex.yy.c 83KB
pngwutil.c 77KB
ftobjs.c 71KB
ttload.c 62KB
t2gload.c 58KB
ftgrays.c 52KB
ttsbit.c 52KB
t1load.c 49KB
deflate.c 48KB
ttgload.c 48KB
ahglyph.c 44KB
trees.c 43KB
pngwrite.c 42KB
pngread.c 42KB
pngtest.c 41KB
pngpread.c 40KB
ahhint.c 39KB
psobjs.c 34KB
t1decode.c 32KB
ttobjs.c 31KB
example.c 28KB
gzio.c 25KB
pngset.c 25KB
ahoptim.c 24KB
ttdriver.c 23KB
sfobjs.c 23KB
pngget.c 22KB
t2objs.c 21KB
ftmac.c 20KB
t2load.c 20KB
ttcmap.c 19KB
pngtrans.c 19KB
png.c 19KB
ftglyph.c 19KB
winfnt.c 18KB
ftstream.c 18KB
ftbbox.c 17KB
t2driver.c 16KB
ftoutln.c 16KB
inftrees.c 16KB
example.c 16KB
t2parse.c 15KB
ttpost.c 15KB
t1driver.c 15KB
t1objs.c 15KB
t1parse.c 15KB
ftcglyph.c 15KB
pngwtran.c 15KB
cidobjs.c 14KB
cidload.c 14KB
ftsystem.c 14KB
ftsystem.c 14KB
pngmem.c 13KB
ftcmanag.c 13KB
ftcchunk.c 13KB
cidgload.c 13KB
ftsystem.c 13KB
ftcsbits.c 12KB
infblock.c 12KB
ftcalc.c 12KB
t1gload.c 12KB
ftextend.c 12KB
ahglobal.c 11KB
ftsynth.c 11KB
ttpload.c 10KB
cidriver.c 9KB
inflate.c 9KB
ftcimage.c 9KB
ftlru.c 8KB
psmodule.c 8KB
minigzip.c 8KB
ftrend1.c 8KB
infcodes.c 8KB
cidafm.c 7KB
t1afm.c 7KB
crc32.c 7KB
pngwio.c 7KB
ftsmooth.c 6KB
pngerror.c 6KB
inffast.c 6KB
ftinit.c 5KB
ftlist.c 5KB
cidparse.c 5KB
sfdriver.c 5KB
zutil.c 5KB
pngrio.c 5KB
ftdebug.c 4KB
ahangles.c 4KB
ftmm.c 4KB
ahmodule.c 4KB
psauxmod.c 3KB
ftnames.c 3KB
maketree.c 2KB
compress.c 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
free510
- 粉丝: 4
- 资源: 40
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功