From 1b9e3118374a13dc12652d87b1dd3d1ccfecbbf3 Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 3 Sep 2026 23:49:29 +0200 Subject: embed language & unicode tables into main executables use KITTENC to embed all NLS files into executable KITTENC does not allow loading external files anymore... embed the cp???uni.tbl (codepage -> unicode conversion tables) into the main executable too. however, we will still try to find them in PATH if user cp is missing from the internal ones. this means the distribution zip/flp now contain much fewer files. con: some utilities now need to built in the host (kittenc & unitbl2c) this may make the build less portable; so far unix and dos/386 still work. --- kittenc.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 kittenc.h (limited to 'kittenc.h') diff --git a/kittenc.h b/kittenc.h new file mode 100644 index 0000000..d42ec27 --- /dev/null +++ b/kittenc.h @@ -0,0 +1,44 @@ +/* + KITTENC - compile kitten files and attach this to + executables in a way that the kitten library retrieves + the language resources, in the same way that + catgets/kittengets ever did + +*/ +/* + This software is free software; free to use, + modify, pass to others, whatever + + use it at your own risk +*/ + +#ifndef KITTENC_H +#define KITTENC_H + +//internal stuff shared between kitten.c and kittenc.c +struct message_header +{ + short len; + short id; + // char message[]; +}; + +struct content +{ + char language[4]; + long filepos_start; // for this language + long filepos_end; + long reserved; // align on 16 byte to look better in hex editor +}; + +struct message_end +{ + long filepos; // points to content + long resource_count;// number of entries + long fileend_orig; // file end NOW because UPX + char ID[8]; // "KITTENC" +}; + +#define KITTEN_MAX_RESOURCES 16 + +#endif /* KITTENC_H */ -- cgit v1.2.3