This is my understanding from reading the code a few days ago:

On Fri, Aug 20, 2021 at 6:32 AM Aitor Santamaría <aitor...@gmail.com> wrote:
>
> Hello,
>
> Sorry about the SPAM. I found the older thread too long, so I'm starting a 
> new one with the same content (please comment here if you want to ).
>
> I was trying to figure out how KITTEN/KITTENC works. Seems to attach each NLS 
> file with the "KITTENC" signal by the end of the executable. I've read about 
> making UPX support easier, I guess you UPX before you ATTACH.

It is written to support either, appending before or after UPX, it
stores the original file size and then when ran uses the compressed
file size computing the difference and adjusting the stored offsets
with this difference.
So if you don't compress or append the languages files after
compressing the difference is 0, but if you do it before compressing
then the difference is your compression savings more or less and
offsets adjusted accordingly.

>
> Why did you need to write an own function to convert string to UL?

It was from the original kitten - not needed in kittenc since that
part occurs during build, but also no need to change working code;  I
like the update from switch statement to strchr for the xlat portion
of the escape conversion

>
> By the way, apparently I've found a typo:
>
> if (language &&
> _toupper(language[0]) == 'E' &&
> _toupper(language[0]) == 'N')
> {
> // set LANG=EN switches to internal strings
>

An interesting space savings, assuming hard coded strings are English
and that the English catalog has the same text - which is probably
true 100% of the time.

>
> Best wishes,
> Aitor

Jeremy


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to