Split up is*rune() and to*rune() functions into individual source files
This optimizes the binary size for each tool that uses these functions. Previously, if a program just used one single function, maybe even a one-liner, it would statically compile in all lookup-tables, bloating the binary by up to 20K. All these changes are derived from a local libutf where I do the primary changes. So I hope that I can merge these things into libutf sooner or later, as discussed on the ml.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/* MIT/X Consortium Copyright (c) 2012 Connor Lane Smith <cls@lubutu.com>
|
||||
* (c) 2015 Laslo Hunhold <dev@frign.de>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -18,16 +19,8 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "../utf.h"
|
||||
|
||||
#define nelem(x) (sizeof (x) / sizeof *(x))
|
||||
|
||||
static int rune1cmp(const void *, const void *);
|
||||
static int rune2cmp(const void *, const void *);
|
||||
|
||||
#include "../runetypebody.h"
|
||||
|
||||
int
|
||||
rune1cmp(const void *v1, const void *v2)
|
||||
{
|
||||
|
Reference in New Issue
Block a user