X-Git-Url: https://jxself.org/git/?p=zilutils.git;a=blobdiff_plain;f=zilasm%2Fstring_table.h;fp=zilasm%2Fstring_table.h;h=36fda87a716d3419c9bbd7c25c0138159aa40257;hp=0000000000000000000000000000000000000000;hb=82b0f84ab797141758929d16894d42e12ef79af7;hpb=37d32bd49e745a5c1686b6495f60172b24222361 diff --git a/zilasm/string_table.h b/zilasm/string_table.h new file mode 100644 index 0000000..36fda87 --- /dev/null +++ b/zilasm/string_table.h @@ -0,0 +1,38 @@ +/* + * string_table.h -- part of ZilUtils/ZilAsm + * + * Copyright (C) 2019 Jason Self + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see + * + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +#ifndef ZILASM_STRING_TABLE_ +#define ZILASM_STRING_TABLE_ + +class String_table +{ +public: + unsigned add_string_to_string_table (const char *str, ZMemblock * zmb); + + static ZMemblock *encrypt_string (const char *str, ZMemblock * zmb); + +private: + static void write_one_word_to_string_table (ZMemblock * zmb, Word * w, + int *numberOfSymbolsInWord, + Byte symbol); +}; + +#endif