summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2021-03-16 21:19:25 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2021-03-16 21:19:25 +0000
commit3256351fa7d547a6394acc36a610572f137a8362 (patch)
tree16ec21bb567b378f45a441fd6b79f4703f43ef4e /Build/source/texk
parent8546aba79031b8428abbbf0148ebe6819fcb87ae (diff)
mflua: code clean up (thanks to A. Kakuto)
git-svn-id: svn://tug.org/texlive/trunk@58429 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/mfluadir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/include/caryll/element.h18
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/include/caryll/vector.h2
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/include/dep/sds.h8
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/lib/support/element-impl.h76
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/lib/support/vector-impl.h4
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/src/luafunc.c2
-rw-r--r--Build/source/texk/web2c/mfluadir/otfcc/src/otfccdll.c4
8 files changed, 67 insertions, 51 deletions
diff --git a/Build/source/texk/web2c/mfluadir/ChangeLog b/Build/source/texk/web2c/mfluadir/ChangeLog
index 6f1a9f9e498..4f6f9833246 100644
--- a/Build/source/texk/web2c/mfluadir/ChangeLog
+++ b/Build/source/texk/web2c/mfluadir/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-15 Luigi Scarso <luigi.scarso@gmail.com>
+
+ * Code clean up (thanks to A. Kakuto)
+
2021-02-07 Luigi Scarso <luigi.scarso@gmail.com>
* DEK tuneup2021
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/element.h b/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/element.h
index 82bfc73cfb6..b2f6c134e74 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/element.h
+++ b/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/element.h
@@ -15,16 +15,16 @@
void (*move)(MODIFY T *, T *); \
void (*dispose)(MOVE T *); \
void (*replace)(MODIFY T *, MOVE const T); \
- void (*copyReplace)(MODIFY T *, const T);
+ void (*copyReplace)(MODIFY T *, const T)
#define caryll_VT(T) \
caryll_T(T); \
T (*empty)(); \
- T (*dup)(const T);
+ T (*dup)(const T)
#define caryll_RT(T) \
caryll_T(T); \
T *(*create)(); \
- void (*free)(MOVE T *);
+ void (*free)(MOVE T *)
#define caryll_ElementInterfaceOf(T) const struct __caryll_elementinterface_##T
#define caryll_ElementInterface(T) \
@@ -42,26 +42,26 @@
/// Individual traits
-#define caryll_Show(T) void (*show)(const T);
-#define caryll_Eq(T) bool (*equal)(const T, const T);
+#define caryll_Show(T) void (*show)(const T)
+#define caryll_Eq(T) bool (*equal)(const T, const T)
#define caryll_Ord(T) \
caryll_Eq(T); \
int (*compare)(const T a, const T b); \
- int (*compareRef)(const T *a, const T *b);
+ int (*compareRef)(const T *a, const T *b)
#define caryll_Monoid(T) \
T (*neutral)(); \
T (*plus)(const T a, const T b); \
- void (*inplacePlus)(MODIFY T * a, const T b);
+ void (*inplacePlus)(MODIFY T * a, const T b)
#define caryll_Group(T) \
caryll_Monoid(T); \
void (*inplaceNegate)(MODIFY T * a); \
T (*negate)(const T); \
void (*inplaceMinus)(MODIFY T *, const T); \
- T (*minus)(const T, const T);
+ T (*minus)(const T, const T)
#define caryll_Module(T, TScale) \
caryll_Group(T); \
void (*inplaceScale)(MODIFY T * a, TScale b); \
void (*inplacePlusScale)(MODIFY T * a, TScale b, const T c); \
- T (*scale)(const T a, TScale b);
+ T (*scale)(const T a, TScale b)
#endif
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/vector.h b/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/vector.h
index 4f1aece956c..9e5ff356831 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/vector.h
+++ b/Build/source/texk/web2c/mfluadir/otfcc/include/caryll/vector.h
@@ -28,7 +28,7 @@
__T (*pop)(MODIFY __TV * arr); \
void (*disposeItem)(MODIFY __TV * arr, size_t n); \
void (*filterEnv)(MODIFY __TV * arr, bool (*fn)(const __T *x, void *env), void *env); \
- void (*sort)(MODIFY __TV * arr, int (*fn)(const __T *a, const __T *b));
+ void (*sort)(MODIFY __TV * arr, int (*fn)(const __T *a, const __T *b))
#define caryll_VectorInterface(__TV, __T) \
caryll_VectorInterfaceTypeName(__TV) { \
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/include/dep/sds.h b/Build/source/texk/web2c/mfluadir/otfcc/include/dep/sds.h
index 3cdc7e98548..36267c3c84d 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/include/dep/sds.h
+++ b/Build/source/texk/web2c/mfluadir/otfcc/include/dep/sds.h
@@ -42,6 +42,10 @@ typedef char *sds;
/* Note: sdshdr5 is never used, we just access the flags byte directly.
* However is here to document the layout of type 5 SDS strings. */
+#ifdef _MSC_VER
+#define __attribute__(x)
+#pragma pack(push,1)
+#endif
struct __attribute__((__packed__)) sdshdr5 {
unsigned char flags; /* 3 lsb of type, and 5 msb of string length */
char buf[];
@@ -70,7 +74,9 @@ struct __attribute__((__packed__)) sdshdr64 {
unsigned char flags; /* 3 lsb of type, 5 unused bits */
char buf[];
};
-
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
#define SDS_TYPE_5 0
#define SDS_TYPE_8 1
#define SDS_TYPE_16 2
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/lib/support/element-impl.h b/Build/source/texk/web2c/mfluadir/otfcc/lib/support/element-impl.h
index b65a403fe5d..06febf14444 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/lib/support/element-impl.h
+++ b/Build/source/texk/web2c/mfluadir/otfcc/lib/support/element-impl.h
@@ -98,35 +98,35 @@
}
#define caryll_standardTypeFn1(T) \
- caryll_trivialInit(T); \
- caryll_trivialCopy(T); \
- caryll_trivialDispose(T); \
- caryll_trivialMove(T); \
- caryll_trivialReplace(T);
+ caryll_trivialInit(T) \
+ caryll_trivialCopy(T) \
+ caryll_trivialDispose(T) \
+ caryll_trivialMove(T) \
+ caryll_trivialReplace(T)
#define caryll_standardTypeFn2(T, __fn_dispose) \
- caryll_trivialInit(T); \
- caryll_trivialCopy(T); \
- caryll_nonTrivialDispose(T, __fn_dispose); \
- caryll_trivialMove(T); \
- caryll_trivialReplace(T);
+ caryll_trivialInit(T) \
+ caryll_trivialCopy(T) \
+ caryll_nonTrivialDispose(T, __fn_dispose) \
+ caryll_trivialMove(T) \
+ caryll_trivialReplace(T)
#define caryll_standardTypeFn3(T, __fn_init, __fn_dispose) \
- caryll_nonTrivialInit(T, __fn_init); \
- caryll_trivialCopy(T); \
- caryll_nonTrivialDispose(T, __fn_dispose); \
- caryll_trivialMove(T); \
- caryll_trivialReplace(T);
+ caryll_nonTrivialInit(T, __fn_init) \
+ caryll_trivialCopy(T) \
+ caryll_nonTrivialDispose(T, __fn_dispose) \
+ caryll_trivialMove(T) \
+ caryll_trivialReplace(T)
#define caryll_standardTypeFn4(T, __fn_init, __fn_copy, __fn_dispose) \
- caryll_nonTrivialInit(T, __fn_init); \
- caryll_nonTrivialCopy(T, __fn_copy); \
- caryll_nonTrivialDispose(T, __fn_dispose); \
- caryll_trivialMove(T); \
- caryll_trivialReplace(T);
+ caryll_nonTrivialInit(T, __fn_init) \
+ caryll_nonTrivialCopy(T, __fn_copy) \
+ caryll_nonTrivialDispose(T, __fn_dispose) \
+ caryll_trivialMove(T) \
+ caryll_trivialReplace(T)
#define caryll_standardTypeFn5(T, __fn_init, __fn_copy, __fn_dispose, __fn_move) \
- caryll_nonTrivialInit(T, __fn_init); \
- caryll_nonTrivialCopy(T, __fn_copy); \
- caryll_nonTrivialDispose(T, __fn_dispose); \
- caryll_nonTrivialMove(T, __fn_move); \
- caryll_trivialReplace(T);
+ caryll_nonTrivialInit(T, __fn_init) \
+ caryll_nonTrivialCopy(T, __fn_copy) \
+ caryll_nonTrivialDispose(T, __fn_dispose) \
+ caryll_nonTrivialMove(T, __fn_move) \
+ caryll_trivialReplace(T)
#define caryll_standardTypeMethods(T) \
.init = T##_init, .copy = T##_copy, .dispose = T##_dispose, .move = T##_move, \
@@ -165,23 +165,23 @@
#else
#define caryll_standardRefTypeFn(T, ...) \
- caryll_standardTypeFn(T, __VA_ARGS__); \
- caryll_trivialCreate(T); \
- caryll_trivialFree(T);
+ caryll_standardTypeFn(T, __VA_ARGS__) \
+ caryll_trivialCreate(T) \
+ caryll_trivialFree(T)
#define caryll_standardValTypeFn(T, ...) \
- caryll_standardTypeFn(T, __VA_ARGS__); \
- caryll_trivialEmpty(T); \
- caryll_trivialDup(T);
+ caryll_standardTypeFn(T, __VA_ARGS__) \
+ caryll_trivialEmpty(T) \
+ caryll_trivialDup(T)
#define caryll_standardType(T, __name, ...) \
- caryll_standardTypeFn(T, __VA_ARGS__); \
- caryll_ElementInterfaceOf(T) __name = {caryll_standardTypeMethods(T)};
+ caryll_standardTypeFn(T, __VA_ARGS__) \
+ caryll_ElementInterfaceOf(T) __name = {caryll_standardTypeMethods(T)}
#define caryll_standardRefType(T, __name, ...) \
- caryll_standardRefTypeFn(T, __VA_ARGS__); \
- caryll_ElementInterfaceOf(T) __name = {caryll_standardRefTypeMethods(T)};
+ caryll_standardRefTypeFn(T, __VA_ARGS__) \
+ caryll_ElementInterfaceOf(T) __name = {caryll_standardRefTypeMethods(T)}
#define caryll_standardValType(T, __name, ...) \
- caryll_standardValTypeFn(T, __VA_ARGS__); \
- caryll_ElementInterfaceOf(T) __name = {caryll_standardValTypeMethods(T)};
+ caryll_standardValTypeFn(T, __VA_ARGS__) \
+ caryll_ElementInterfaceOf(T) __name = {caryll_standardValTypeMethods(T)}
#endif
@@ -203,7 +203,7 @@
return (_fnCompare)(*a, *b); \
}
#define caryll_OrdEqFns(T, _fnCompare) \
- caryll_OrdFns(T, _fnCompare); \
+ caryll_OrdFns(T, _fnCompare) \
static __CARYLL_INLINE__ bool T##_equal(const T a, const T b) { \
return !(_fnCompare)(a, b); \
}
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/lib/support/vector-impl.h b/Build/source/texk/web2c/mfluadir/otfcc/lib/support/vector-impl.h
index f38153d68ec..e41c197a104 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/lib/support/vector-impl.h
+++ b/Build/source/texk/web2c/mfluadir/otfcc/lib/support/vector-impl.h
@@ -54,8 +54,8 @@
arr->capacity = 0; \
arr->items = NULL; \
} \
- caryll_trivialCreate(__TV); \
- caryll_trivialFree(__TV); \
+ caryll_trivialCreate(__TV) \
+ caryll_trivialFree(__TV) \
static __CARYLL_INLINE__ void __TV##_growTo(MODIFY __TV *arr, size_t target) { \
if (target <= arr->capacity) return; \
if (arr->capacity < __CARYLL_VECTOR_INITIAL_SIZE) \
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/src/luafunc.c b/Build/source/texk/web2c/mfluadir/otfcc/src/luafunc.c
index bbf8e1b1b09..ec47c1b4235 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/src/luafunc.c
+++ b/Build/source/texk/web2c/mfluadir/otfcc/src/luafunc.c
@@ -6,7 +6,9 @@
#include "platform.h"
//#include "stopwatch.h"
+#ifndef _MSC_VER
#include <unistd.h>
+#endif /* _MSC_VER */
/* to reset the getopt_long */
extern int optind;
diff --git a/Build/source/texk/web2c/mfluadir/otfcc/src/otfccdll.c b/Build/source/texk/web2c/mfluadir/otfcc/src/otfccdll.c
index 98bb85f05bc..1019bc226b6 100644
--- a/Build/source/texk/web2c/mfluadir/otfcc/src/otfccdll.c
+++ b/Build/source/texk/web2c/mfluadir/otfcc/src/otfccdll.c
@@ -3,7 +3,11 @@
#include "otfcc/sfnt-builder.h"
#ifdef _WIN32
+ #ifndef _MSC_VER /* static link --ak */
#define OTFCC_DLL_EXPORT __declspec(dllexport)
+ #else
+#define OTFCC_DLL_EXPORT
+ #endif
#else
#define OTFCC_DLL_EXPORT
#endif