Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1246 → Rev 1247

/svarlang.lib/trunk/tlumacz.c
1,5 → 1,5
/*
* Copyright (C) 2021-2022 Mateusz Viste
* Copyright (C) 2021-2023 Mateusz Viste
*
* usage: tlumacz en fr pl etc
*
28,6 → 28,7
#include <stdlib.h>
#include <string.h>
 
#include "version.h"
 
 
struct bitmap {
238,7 → 239,11
unsigned short biggest_langsz = 0;
 
if (argc < 2) {
puts("usage: tlumacz en fr pl etc");
puts("tlumacz ver " SVARLANGVER " - this tool is part of the SvarLANG project.");
puts("converts a set of CATS-style translations in files EN.TXT, PL.TXT, etc");
puts("into a single resource file (OUT.LNG).");
puts("");
puts("usage: tlumacz en fr pl ...");
return(1);
}
 
309,7 → 314,7
ecode = 1;
} else {
unsigned short allocsz = biggest_langsz + (biggest_langsz / 20);
printf("biggest lang block is %u bytes -> allocating a %u bytes buffer\n", biggest_langsz, allocsz);
printf("biggest lang block is %u bytes -> allocating a %u bytes buffe (5%% safety margin)r\n", biggest_langsz, allocsz);
fprintf(fd, "/* THIS FILE HAS BEEN GENERATED BY TLUMACZ (PART OF THE SVARLANG LIBRARY) */\r\n");
fprintf(fd, "const unsigned short svarlang_memsz = %uu;\r\n", allocsz);
fprintf(fd, "char svarlang_mem[%u] = {\r\n", allocsz);