Skip to content

Commit a4ba31a

Browse files
authored
Minor ffi refresh (koreader#997)
* Fix posix & pthread on AArch64 * Minor third-party updates: * Update LodePNG * Update FBInk * Minor CMake cleanups: * Use the KO_PATCH wrapper everywhere
1 parent a1fc4e4 commit a4ba31a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+263
-265
lines changed

ffi-cdecl/include/mxcfb-kindle.h

+34-22
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
* - Frankensteined w/ KOA2 stuff
1717
* Upstream could afford to break backward compatibility, we can't,
1818
* so all the KOA2 pre/suffixing is ours. -- NiLuJe
19+
*
20+
* - Frankensteined w/ Rex (PW4 & KT4) stuff -- NiLuJe
21+
*
22+
* - Frankensteined w/ KOA3 stuff
23+
* Consolidated as Zelda w/ the KOA2 stuff
24+
* Note that most of it is actually shared w/ Rex,
25+
* although some fancier features may not actually work on lower end Rex devices
26+
* (i.e., the KT4). -- NiLuJe
27+
*
1928
*/
2029

2130
/*
@@ -146,25 +155,25 @@ struct mxcfb_rect {
146155
//#define WAVEFORM_MODE_INIT 0x0
147156
//#define WAVEFORM_MODE_DU 0x1
148157
//#define WAVEFORM_MODE_GC16 0x2
149-
#define WAVEFORM_MODE_KOA2_GL16 0x3
158+
#define WAVEFORM_MODE_ZELDA_GL16 0x3
150159

151-
#define WAVEFORM_MODE_KOA2_A2 0x6
152-
//#define WAVEFORM_MODE_KOA2_DU4 0x7
153-
#define WAVEFORM_MODE_KOA2_LAST 0x7
160+
#define WAVEFORM_MODE_ZELDA_A2 0x6
161+
//#define WAVEFORM_MODE_ZELDA_DU4 0x7
162+
#define WAVEFORM_MODE_ZELDA_LAST 0x7
154163

155-
#define WAVEFORM_MODE_KOA2_REAGL WAVEFORM_MODE_KOA2_GLR16
156-
#define WAVEFORM_MODE_KOA2_REAGLD WAVEFORM_MODE_KOA2_GLD16
164+
#define WAVEFORM_MODE_ZELDA_REAGL WAVEFORM_MODE_ZELDA_GLR16
165+
#define WAVEFORM_MODE_ZELDA_REAGLD WAVEFORM_MODE_ZELDA_GLD16
157166

158-
#define WAVEFORM_MODE_KOA2_GC16_FAST WAVEFORM_MODE_GC16
159-
#define WAVEFORM_MODE_KOA2_GL16_FAST WAVEFORM_MODE_KOA2_GL16
160-
#define WAVEFORM_MODE_KOA2_GLR16 4
161-
#define WAVEFORM_MODE_KOA2_GLD16 5
162-
#define WAVEFORM_MODE_KOA2_GCK16 8
163-
#define WAVEFORM_MODE_KOA2_GLKW16 9
167+
#define WAVEFORM_MODE_ZELDA_GC16_FAST WAVEFORM_MODE_GC16
168+
#define WAVEFORM_MODE_ZELDA_GL16_FAST WAVEFORM_MODE_ZELDA_GL16
169+
#define WAVEFORM_MODE_ZELDA_GLR16 4
170+
#define WAVEFORM_MODE_ZELDA_GLD16 5
171+
#define WAVEFORM_MODE_ZELDA_GCK16 8
172+
#define WAVEFORM_MODE_ZELDA_GLKW16 9
164173

165174
/* for backward compatible */
166-
#define WAVEFORM_MODE_KOA2_GL4 WAVEFORM_MODE_KOA2_GL16
167-
#define WAVEFORM_MODE_KOA2_GL16_INV WAVEFORM_MODE_KOA2_GL16
175+
#define WAVEFORM_MODE_ZELDA_GL4 WAVEFORM_MODE_ZELDA_GL16
176+
#define WAVEFORM_MODE_ZELDA_GL16_INV WAVEFORM_MODE_ZELDA_GL16
168177

169178

170179
#define WAVEFORM_MODE_AUTO 257
@@ -178,7 +187,7 @@ struct mxcfb_rect {
178187
#define TEMP_USE_AUTO 0x1001
179188

180189
/* KOA2... Once again breaking backward compat... (NOTE: TEMP_USE_AMBIENT hasn't budged, though) */
181-
#define TEMP_USE_KOA2_AUTO TEMP_USE_AMBIENT
190+
#define TEMP_USE_ZELDA_AUTO TEMP_USE_AMBIENT
182191

183192
/* PXP Operations */
184193
#define EPDC_FLAG_ENABLE_INVERSION 0x01
@@ -201,8 +210,8 @@ struct mxcfb_rect {
201210
#define EPDC_FLAG_USE_DITHERING_Y4 0x8000
202211

203212
/* KOA2... Once again breaking backward compat... */
204-
#define EPDC_FLAG_USE_KOA2_DITHERING_Y4 0x4000
205-
#define EPDC_FLAG_USE_KOA2_REGAL 0x8000
213+
#define EPDC_FLAG_USE_ZELDA_DITHERING_Y4 0x4000
214+
#define EPDC_FLAG_USE_ZELDA_REGAL 0x8000
206215

207216

208217
/* PW2 */
@@ -219,6 +228,9 @@ struct mxcfb_rect {
219228
/* KOA2 */
220229
#define EPD_MATERIAL_CARTA_1_2 0x02
221230

231+
/* KOA3 */
232+
#define EPD_MATERIAL_V400 0x03
233+
222234
/* KOA2 */
223235
enum mxcfb_dithering_mode {
224236
EPDC_FLAG_USE_DITHERING_PASSTHROUGH = 0x0,
@@ -253,7 +265,7 @@ struct mxcfb_update_data {
253265
};
254266

255267
/* KOA2... Once again breaking backward compat. */
256-
struct mxcfb_update_data_koa2 {
268+
struct mxcfb_update_data_zelda {
257269
struct mxcfb_rect update_region;
258270
__u32 waveform_mode;
259271
__u32 update_mode;
@@ -340,7 +352,7 @@ struct mxcfb_waveform_modes {
340352
};
341353

342354
/* KOA2... Breaking backward compat. */
343-
struct mxcfb_waveform_modes_koa2 {
355+
struct mxcfb_waveform_modes_zelda {
344356
int mode_init;
345357
int mode_du;
346358
int mode_gc4;
@@ -386,8 +398,8 @@ struct mxcfb_csc_matrix {
386398
#define MXCFB_SEND_UPDATE _IOW('F', 0x2E, struct mxcfb_update_data)
387399

388400
/* KOA2, because backward compat went kablooey */
389-
#define MXCFB_SET_WAVEFORM_MODES_KOA2 _IOW('F', 0x2B, struct mxcfb_waveform_modes_koa2)
390-
#define MXCFB_SEND_UPDATE_KOA2 _IOW('F', 0x2E, struct mxcfb_update_data_koa2)
401+
#define MXCFB_SET_WAVEFORM_MODES_ZELDA _IOW('F', 0x2B, struct mxcfb_waveform_modes_zelda)
402+
#define MXCFB_SEND_UPDATE_ZELDA _IOW('F', 0x2E, struct mxcfb_update_data_zelda)
391403

392404
/* PW4, same dealio... */
393405
#define MXCFB_SEND_UPDATE_REX _IOW('F', 0x2E, struct mxcfb_update_data_rex)
@@ -406,7 +418,7 @@ struct mxcfb_csc_matrix {
406418
#define MXCFB_SET_RESUME _IOW('F', 0x35, __u32)
407419

408420
/* KOA2 */
409-
#define MXCFB_GET_WORK_BUFFER_KOA2 _IOWR('F', 0x34, unsigned long)
421+
#define MXCFB_GET_WORK_BUFFER_ZELDA _IOWR('F', 0x34, unsigned long)
410422
#define MXCFB_DISABLE_EPDC_ACCESS _IO('F', 0x35)
411423
#define MXCFB_ENABLE_EPDC_ACCESS _IO('F', 0x36)
412424

ffi-cdecl/include/mxcfb-kobo.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Copyright (C) 2004-2015 Freescale Semiconductor, Inc. All Rights Reserved.
33
*
44
* - slightly modified (commented out include of fb.h) for Lua integration
5-
* - Frankensteined w/ Mark6 stuff -- NiLuJe
5+
* - Frankensteined w/ Mark 6 stuff -- NiLuJe
6+
* - Frankensteined w/ Mark 7 stuff -- NiLuJe
67
*/
78

89
/*

ffi-cdecl/koptcontext_cdecl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// CPPFLAGS="-I../koreader-base/ -I../koreader-base/thirdparty/libk2pdfopt/libk2pdfopt/k2pdfoptlib -I../koreader-base/thirdparty/libk2pdfopt/libk2pdfopt -I../koreader-base/thirdparty/libk2pdfopt/libk2pdfopt/willuslib -I../koreader-base/thirdparty/libk2pdfopt/libk2pdfopt/include_mod -I../koreader-base/thirdparty/leptonica/leptonica/src -I/usr/include/luajit-2.0" ./ffi-cdecl ...
1+
// CPPFLAGS="-I../koreader-base/ -I/var/tmp/niluje/libk2pdfopt/k2pdfoptlib -I/var/tmp/niluje/libk2pdfopt -I/var/tmp/niluje/libk2pdfopt/willuslib -I/var/tmp/niluje/libk2pdfopt/include_mod -I/var/tmp/niluje/leptonica/src -I/usr/include/luajit-2.0"
22
//#include "alltypes.h"
33
#include "koptcontext.h"
44
#include "koptreflow.h"

ffi-cdecl/leptonica_cdecl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// CPPFLAGS="-I../koreader-base/thirdparty/leptonica/leptonica/src" ./ffi-cdecl
1+
// CPPFLAGS="-I/var/tmp/niluje/leptonica/src"
22
#include <allheaders.h>
33

44
#include "ffi-cdecl.h"

ffi-cdecl/mupdf_decl.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include <mupdf/fitz.h>
1+
// We need to make generate first...
2+
// CPPFLAGS="-I../koreader-base -I/var/tmp/niluje/mupdf/include"
23
#include "wrap-mupdf.h"
34

45
#include "ffi-cdecl.h"
@@ -83,7 +84,7 @@ cdecl_struct(fz_outline_s)
8384
cdecl_type(fz_document)
8485
cdecl_type(fz_page)
8586
cdecl_type(fz_link)
86-
cdecl_struct(fz_document_s)
87+
cdecl_struct(fz_document_s) // NOTE: And now it's intptr_t that's being converted... >_<"
8788
cdecl_struct(fz_page_s)
8889

8990
cdecl_func(mupdf_open_document)

ffi-cdecl/mxcfb_kindle_decl.c

+21-21
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ cdecl_const(WAVEFORM_MODE_GL4)
2525
cdecl_const(WAVEFORM_MODE_GL16_INV)
2626
cdecl_const(WAVEFORM_MODE_AUTO)
2727

28-
cdecl_const(WAVEFORM_MODE_KOA2_GL16)
29-
cdecl_const(WAVEFORM_MODE_KOA2_A2)
30-
cdecl_const(WAVEFORM_MODE_KOA2_LAST)
31-
cdecl_const(WAVEFORM_MODE_KOA2_REAGL)
32-
cdecl_const(WAVEFORM_MODE_KOA2_REAGLD)
33-
cdecl_const(WAVEFORM_MODE_KOA2_GC16_FAST)
34-
cdecl_const(WAVEFORM_MODE_KOA2_GL16_FAST)
35-
cdecl_const(WAVEFORM_MODE_KOA2_GLR16)
36-
cdecl_const(WAVEFORM_MODE_KOA2_GLD16)
37-
cdecl_const(WAVEFORM_MODE_KOA2_GCK16)
38-
cdecl_const(WAVEFORM_MODE_KOA2_GLKW16)
39-
cdecl_const(WAVEFORM_MODE_KOA2_GL4)
40-
cdecl_const(WAVEFORM_MODE_KOA2_GL16_INV)
28+
cdecl_const(WAVEFORM_MODE_ZELDA_GL16)
29+
cdecl_const(WAVEFORM_MODE_ZELDA_A2)
30+
cdecl_const(WAVEFORM_MODE_ZELDA_LAST)
31+
cdecl_const(WAVEFORM_MODE_ZELDA_REAGL)
32+
cdecl_const(WAVEFORM_MODE_ZELDA_REAGLD)
33+
cdecl_const(WAVEFORM_MODE_ZELDA_GC16_FAST)
34+
cdecl_const(WAVEFORM_MODE_ZELDA_GL16_FAST)
35+
cdecl_const(WAVEFORM_MODE_ZELDA_GLR16)
36+
cdecl_const(WAVEFORM_MODE_ZELDA_GLD16)
37+
cdecl_const(WAVEFORM_MODE_ZELDA_GCK16)
38+
cdecl_const(WAVEFORM_MODE_ZELDA_GLKW16)
39+
cdecl_const(WAVEFORM_MODE_ZELDA_GL4)
40+
cdecl_const(WAVEFORM_MODE_ZELDA_GL16_INV)
4141

4242
cdecl_const(TEMP_USE_AMBIENT)
4343
cdecl_const(TEMP_USE_PAPYRUS)
4444
cdecl_const(TEMP_USE_AUTO)
4545

46-
cdecl_const(TEMP_USE_KOA2_AUTO)
46+
cdecl_const(TEMP_USE_ZELDA_AUTO)
4747

4848
cdecl_const(EPDC_FLAG_ENABLE_INVERSION)
4949
cdecl_const(EPDC_FLAG_FORCE_MONOCHROME)
@@ -57,24 +57,24 @@ cdecl_const(EPDC_FLAG_USE_DITHERING_Y1)
5757
cdecl_const(EPDC_FLAG_USE_DITHERING_Y2)
5858
cdecl_const(EPDC_FLAG_USE_DITHERING_Y4)
5959

60-
cdecl_const(EPDC_FLAG_USE_KOA2_DITHERING_Y4)
61-
cdecl_const(EPDC_FLAG_USE_KOA2_REGAL)
60+
cdecl_const(EPDC_FLAG_USE_ZELDA_DITHERING_Y4)
61+
cdecl_const(EPDC_FLAG_USE_ZELDA_REGAL)
6262

6363
cdecl_enum(mxcfb_dithering_mode)
6464

6565
cdecl_struct(mxcfb_rect)
6666
cdecl_struct(mxcfb_alt_buffer_data)
6767
cdecl_struct(mxcfb_update_data)
6868

69-
cdecl_struct(mxcfb_update_data_koa2)
69+
cdecl_struct(mxcfb_update_data_zelda)
7070

71-
cdecl_struct(mxcfb_update_data_pw4)
71+
cdecl_struct(mxcfb_update_data_rex)
7272

7373
cdecl_const(MXCFB_SEND_UPDATE)
7474

75-
cdecl_const(MXCFB_SEND_UPDATE_KOA2)
75+
cdecl_const(MXCFB_SEND_UPDATE_ZELDA)
7676

77-
cdecl_const(MXCFB_SEND_UPDATE_PW4)
77+
cdecl_const(MXCFB_SEND_UPDATE_REX)
7878

7979
cdecl_struct(mxcfb_update_marker_data)
8080
cdecl_const(MXCFB_WAIT_FOR_UPDATE_COMPLETE)
@@ -84,6 +84,6 @@ cdecl_const(MXCFB_WAIT_FOR_UPDATE_COMPLETE_PEARL)
8484
cdecl_const(MXCFB_WAIT_FOR_UPDATE_SUBMISSION)
8585

8686
cdecl_const(NIGHTMODE_STRIDE_DEFAULT)
87-
cdecl_const(NIGHTMODE_STRIDE_DEFAULT_PW4)
87+
cdecl_const(NIGHTMODE_STRIDE_DEFAULT_REX)
8888
cdecl_struct(mxcfb_nightmode_ctrl)
8989
cdecl_const(MXCFB_SET_NIGHTMODE)

ffi-cdecl/posix_decl.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
#include "ffi-cdecl.h"
1818

19-
cdecl_type(size_t)
20-
cdecl_type(ssize_t)
2119
cdecl_type(off_t)
2220

2321
cdecl_struct(timeval)
@@ -59,7 +57,7 @@ cdecl_const(MAP_SHARED)
5957
cdecl_const(MAP_FAILED)
6058
cdecl_const(PATH_MAX)
6159
cdecl_func(memcmp)
62-
cdecl_func(mmap)
60+
cdecl_func(mmap) // NOTE: off_t gets squished by ffi-cdecl...
6361
cdecl_func(munmap)
6462

6563
cdecl_func(ioctl)

ffi-cdecl/zeromq_cdecl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// CPPFLAGS="-I../koreader-base/thirdparty/zyre/zyre/include -I../koreader-base/thirdparty/libzmq/libzmq/include -I../koreader-base/thirdparty/czmq/czmq/include -I../koreader-base/thirdparty/filemq/filemq/include" ./ffi-cdecl ...
1+
// CPPFLAGS="-I/var/tmp/niluje/zyre/include -I/var/tmp/niluje/libzmq/include -I/var/tmp/niluje/czmq/include -I/var/tmp/niluje/filemq/include"
22
#include <zyre.h>
33
#include <zre_msg.h>
44
#include <zmq.h>

ffi/framebuffer_mxcfb.lua

+19-19
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ local function refresh_k51(fb, refreshtype, waveform_mode, x, y, w, h)
332332
return mxc_update(fb, C.MXCFB_SEND_UPDATE, refarea, refreshtype, waveform_mode, x, y, w, h)
333333
end
334334

335-
local function refresh_koa2(fb, refreshtype, waveform_mode, x, y, w, h)
336-
local refarea = ffi.new("struct mxcfb_update_data_koa2[1]")
335+
local function refresh_zelda(fb, refreshtype, waveform_mode, x, y, w, h)
336+
local refarea = ffi.new("struct mxcfb_update_data_zelda[1]")
337337
-- only for Amazon's driver, try to mostly follow what the stock reader does...
338-
if waveform_mode == C.WAVEFORM_MODE_KOA2_GLR16 then
339-
-- If we're requesting WAVEFORM_MODE_KOA2_GLR16, it's REAGL all around!
338+
if waveform_mode == C.WAVEFORM_MODE_ZELDA_GLR16 then
339+
-- If we're requesting WAVEFORM_MODE_ZELDA_GLR16, it's REAGL all around!
340340
refarea[0].hist_bw_waveform_mode = waveform_mode
341341
refarea[0].hist_gray_waveform_mode = waveform_mode
342342
else
@@ -356,14 +356,14 @@ local function refresh_koa2(fb, refreshtype, waveform_mode, x, y, w, h)
356356
end
357357
-- TODO: There's also the HW-backed NightMode which should be somewhat accessible...
358358

359-
return mxc_update(fb, C.MXCFB_SEND_UPDATE_KOA2, refarea, refreshtype, waveform_mode, x, y, w, h)
359+
return mxc_update(fb, C.MXCFB_SEND_UPDATE_ZELDA, refarea, refreshtype, waveform_mode, x, y, w, h)
360360
end
361361

362362
local function refresh_rex(fb, refreshtype, waveform_mode, x, y, w, h)
363363
local refarea = ffi.new("struct mxcfb_update_data_rex[1]")
364364
-- only for Amazon's driver, try to mostly follow what the stock reader does...
365-
if waveform_mode == C.WAVEFORM_MODE_KOA2_GLR16 then
366-
-- If we're requesting WAVEFORM_MODE_KOA2_GLR16, it's REAGL all around!
365+
if waveform_mode == C.WAVEFORM_MODE_ZELDA_GLR16 then
366+
-- If we're requesting WAVEFORM_MODE_ZELDA_GLR16, it's REAGL all around!
367367
refarea[0].hist_bw_waveform_mode = waveform_mode
368368
refarea[0].hist_gray_waveform_mode = waveform_mode
369369
else
@@ -518,8 +518,8 @@ function framebuffer:init()
518518
-- New devices are REAGL-aware, default to REAGL
519519
local isREAGL = true
520520

521-
-- The KOA2 uses a new eink driver, one that massively breaks backward compatibility.
522-
local isKOA2 = false
521+
-- Zelda uses a new eink driver, one that massively breaks backward compatibility.
522+
local isZelda = false
523523
-- And because that worked well enough the first time, lab126 did the same with Rex!
524524
local isRex = false
525525
-- But of course, some devices don't actually support all the features the kernel exposes...
@@ -540,7 +540,7 @@ function framebuffer:init()
540540
end
541541

542542
if self.device.model == "KindleOasis2" then
543-
isKOA2 = true
543+
isZelda = true
544544
end
545545

546546
if self.device.model == "KindlePaperWhite4" then
@@ -565,33 +565,33 @@ function framebuffer:init()
565565
self.waveform_partial = C.WAVEFORM_MODE_GL16_FAST -- NOTE: Depending on FW, might instead be AUTO w/ hist_gray_waveform_mode set to GL16_FAST
566566
end
567567

568-
-- NOTE: Devices on the Rex platform essentially use the same driver as the KOA2, they're just passing a slightly smaller mxcfb_update_data struct
569-
if isKOA2 or isRex then
568+
-- NOTE: Devices on the Rex platform essentially use the same driver as the Zelda platform, they're just passing a slightly smaller mxcfb_update_data struct
569+
if isZelda or isRex then
570570
-- FIXME: Someone with the device will have to check if/how HW dithering is supposed to be requested,
571571
-- as the Kobo Mk.7 way doesn't appear to work, at the very least on the PW4 (c.f., #4602)
572572
--self.device.canHWDither = yes
573-
if isKOA2 then
574-
self.mech_refresh = refresh_koa2
573+
if isZelda then
574+
self.mech_refresh = refresh_zelda
575575
else
576576
self.mech_refresh = refresh_rex
577577
end
578578

579579
self.waveform_fast = C.WAVEFORM_MODE_DU
580580
self.waveform_ui = C.WAVEFORM_MODE_AUTO
581581
-- NOTE: Possibly to bypass the possibility that AUTO, even when FULL, might not flash (something which holds true for a number of devices, especially on small regions),
582-
-- The KOA2 explicitly requests GC16 when flashing an UI element that doesn't cover the full screen...
582+
-- Zelda explicitly requests GC16 when flashing an UI element that doesn't cover the full screen...
583583
-- And it resorts to AUTO when PARTIAL, because GC16_FAST is no more (it points to GC16).
584584
self.waveform_flashui = C.WAVEFORM_MODE_GC16
585-
self.waveform_reagl = C.WAVEFORM_MODE_KOA2_GLR16
585+
self.waveform_reagl = C.WAVEFORM_MODE_ZELDA_GLR16
586586
self.waveform_partial = self.waveform_reagl
587587
-- NOTE: Because we can't have nice things, we have to account for devices that do not actuallly support the fancy inverted waveforms...
588588
if isNightModeChallenged then
589-
self.waveform_night = C.WAVEFORM_MODE_KOA2_GL16_INV -- NOTE: Currently points to the bog-standard GL16, but one can hope...
589+
self.waveform_night = C.WAVEFORM_MODE_ZELDA_GL16_INV -- NOTE: Currently points to the bog-standard GL16, but one can hope...
590590
self.waveform_flashnight = C.WAVEFORM_MODE_GC16
591591
else
592-
self.waveform_night = C.WAVEFORM_MODE_KOA2_GLKW16
592+
self.waveform_night = C.WAVEFORM_MODE_ZELDA_GLKW16
593593
self.night_is_reagl = true
594-
self.waveform_flashnight = C.WAVEFORM_MODE_KOA2_GCK16
594+
self.waveform_flashnight = C.WAVEFORM_MODE_ZELDA_GCK16
595595
end
596596
end
597597
elseif self.device:isKobo() then

ffi/freetype_h.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct FT_GlyphSlotRec_ {
114114
FT_Library library;
115115
FT_Face face;
116116
FT_GlyphSlot next;
117-
unsigned int reserved;
117+
unsigned int glyph_index;
118118
FT_Generic generic;
119119
FT_Glyph_Metrics metrics;
120120
long int linearHoriAdvance;

ffi/giflib_h.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ typedef struct ColorMapObject ColorMapObject;
1515
struct ColorMapObject {
1616
int ColorCount;
1717
int BitsPerPixel;
18-
_Bool SortFlag;
18+
bool SortFlag;
1919
GifColorType *Colors;
2020
};
2121
typedef struct GifImageDesc GifImageDesc;
@@ -24,7 +24,7 @@ struct GifImageDesc {
2424
GifWord Top;
2525
GifWord Width;
2626
GifWord Height;
27-
_Bool Interlace;
27+
bool Interlace;
2828
ColorMapObject *ColorMap;
2929
};
3030
typedef struct ExtensionBlock ExtensionBlock;
@@ -36,7 +36,7 @@ struct ExtensionBlock {
3636
typedef struct GraphicsControlBlock GraphicsControlBlock;
3737
struct GraphicsControlBlock {
3838
int DisposalMode;
39-
_Bool UserInputFlag;
39+
bool UserInputFlag;
4040
int DelayTime;
4141
int TransparentColor;
4242
};

0 commit comments

Comments
 (0)