Updating to reflect the latest work
[zilutils.git] / zilasm / string_table.h
diff --git a/zilasm/string_table.h b/zilasm/string_table.h
new file mode 100644 (file)
index 0000000..36fda87
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * string_table.h -- part of ZilUtils/ZilAsm
+ *
+ * Copyright (C) 2019 Jason Self <j@jxself.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>
+ *
+ * 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