Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
itdan3344
stb
提交
0bd0a9ab
S
stb
项目概览
itdan3344
/
stb
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
stb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0bd0a9ab
编写于
1月 16, 2017
作者:
S
Sean Barrett
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stb_truetype: comment typo
stb_c_lexer: end-of-array wrapped overflow bug
上级
dead3815
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
5 deletion
+15
-5
stb_c_lexer.h
stb_c_lexer.h
+5
-2
stb_sprintf.h
stb_sprintf.h
+9
-2
stb_truetype.h
stb_truetype.h
+1
-1
未找到文件。
stb_c_lexer.h
浏览文件 @
0bd0a9ab
...
...
@@ -30,6 +30,9 @@
// - haven't implemented support for unicode CLEX_char
// - need to expand error reporting so you don't just get "CLEX_parse_error"
//
// Contributors:
// Arpad Goretity (bugfix)
//
// LICENSE
//
// This software is dual-licensed to the public domain and under the following
...
...
@@ -84,7 +87,7 @@
#define STB_C_LEX_DISCARD_PREPROCESSOR Y // discard C-preprocessor directives (e.g. after prepocess
// still have #line, #pragma, etc)
//#define STB_C_LEX_ISWHITE(str) ... // return length in bytes of
first character if it
is whitespace
//#define STB_C_LEX_ISWHITE(str) ... // return length in bytes of
whitespace characters if first char
is whitespace
#define STB_C_LEXER_DEFINITIONS // This line prevents the header file from replacing your definitions
// --END--
...
...
@@ -459,7 +462,7 @@ int stb_c_lexer_get_token(stb_lexer *lexer)
int
n
;
n
=
STB_C_LEX_ISWHITE
(
p
);
if
(
n
==
0
)
break
;
if
(
lexer
->
eof
&&
lexer
+
n
>
lexer
->
eof
)
if
(
lexer
->
eof
&&
lexer
->
eof
-
lexer
->
parse_point
<
n
)
return
stb__clex_token
(
tok
,
CLEX_parse_error
,
p
,
lexer
->
eof
-
1
);
p
+=
n
;
}
...
...
stb_sprintf.h
浏览文件 @
0bd0a9ab
...
...
@@ -769,9 +769,12 @@ STBSP__PUBLICDEF int STB_SPRINTF_DECORATE( vsprintfcb )( STBSP_SPRINTFCB * callb
STBSP__PUBLICDEF
int
STB_SPRINTF_DECORATE
(
sprintf
)(
char
*
buf
,
char
const
*
fmt
,
...
)
{
int
result
;
va_list
va
;
va_start
(
va
,
fmt
);
return
STB_SPRINTF_DECORATE
(
vsprintfcb
)(
0
,
0
,
buf
,
fmt
,
va
);
result
=
STB_SPRINTF_DECORATE
(
vsprintfcb
)(
0
,
0
,
buf
,
fmt
,
va
);
va_end
(
va
);
return
result
;
}
typedef
struct
stbsp__context
...
...
@@ -827,10 +830,14 @@ STBSP__PUBLICDEF int STB_SPRINTF_DECORATE( vsnprintf )( char * buf, int count, c
STBSP__PUBLICDEF
int
STB_SPRINTF_DECORATE
(
snprintf
)(
char
*
buf
,
int
count
,
char
const
*
fmt
,
...
)
{
int
result
;
va_list
va
;
va_start
(
va
,
fmt
);
return
STB_SPRINTF_DECORATE
(
vsnprintf
)(
buf
,
count
,
fmt
,
va
);
result
=
STB_SPRINTF_DECORATE
(
vsnprintf
)(
buf
,
count
,
fmt
,
va
);
va_end
(
va
);
return
result
;
}
STBSP__PUBLICDEF
int
STB_SPRINTF_DECORATE
(
vsprintf
)(
char
*
buf
,
char
const
*
fmt
,
va_list
va
)
...
...
stb_truetype.h
浏览文件 @
0bd0a9ab
...
...
@@ -534,7 +534,7 @@ typedef struct stbrp_rect stbrp_rect;
STBTT_DEF
int
stbtt_PackBegin
(
stbtt_pack_context
*
spc
,
unsigned
char
*
pixels
,
int
width
,
int
height
,
int
stride_in_bytes
,
int
padding
,
void
*
alloc_context
);
// Initializes a packing context stored in the passed-in stbtt_pack_context.
// Future calls using this context will pack characters into the bitmap passed
// in here: a 1-channel bitmap that is w
eight x
height. stride_in_bytes is
// in here: a 1-channel bitmap that is w
idth *
height. stride_in_bytes is
// the distance from one row to the next (or 0 to mean they are packed tightly
// together). "padding" is the amount of padding to leave between each
// character (normally you want '1' for bitmaps you'll use as textures with
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录