virtualx-engine/core
Rémi Verschelde c5f830d6b9 Split thirdparty smaz.c out of compressed_translation.cpp
Code comes from 150e125cba/smaz.c

With a small modification to match Godot expectations:
```
diff --git a/thirdparty/core/smaz.c b/thirdparty/core/smaz.c
index 9b1ebc2..555dfea 100644
--- a/thirdparty/core/smaz.c
+++ b/thirdparty/core/smaz.c
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 #include <string.h>

 /* Our compression codebook, used for compression */
-static char *Smaz_cb[241] = {
+static const char *Smaz_cb[241] = {
 "\002s,\266", "\003had\232\002leW", "\003on \216", "", "\001yS",
 "\002ma\255\002li\227", "\003or \260", "", "\002ll\230\003s t\277",
 "\004fromg\002mel", "", "\003its\332", "\001z\333", "\003ingF", "\001>\336",
@@ -89,7 +89,7 @@ static char *Smaz_rcb[254] = {
 "e, ", " it", "whi", " ma", "ge", "x", "e c", "men", ".com"
 };

-int smaz_compress(char *in, int inlen, char *out, int outlen) {
+int smaz_compress(const char *in, int inlen, char *out, int outlen) {
     unsigned int h1,h2,h3=0;
     int verblen = 0, _outlen = outlen;
     char verb[256], *_out = out;
@@ -167,7 +167,7 @@ out:
     return out-_out;
 }

-int smaz_decompress(char *in, int inlen, char *out, int outlen) {
+int smaz_decompress(const char *in, int inlen, char *out, int outlen) {
     unsigned char *c = (unsigned char*) in;
     char *_out = out;
     int _outlen = outlen;
@@ -192,7 +192,7 @@ int smaz_decompress(char *in, int inlen, char *out, int outlen) {
             inlen -= 2+len;
         } else {
             /* Codebook entry */
-            char *s = Smaz_rcb[*c];
+            const char *s = Smaz_rcb[*c];
             int len = strlen(s);

             if (outlen < len) return _outlen+1;
diff --git a/thirdparty/core/smaz.h b/thirdparty/core/smaz.h
index a547d89..a9d8a33 100644
--- a/thirdparty/core/smaz.h
+++ b/thirdparty/core/smaz.h
@@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 #ifndef _SMAZ_H
 #define _SMAZ_H

-int smaz_compress(char *in, int inlen, char *out, int outlen);
-int smaz_decompress(char *in, int inlen, char *out, int outlen);
+int smaz_compress(const char *in, int inlen, char *out, int outlen);
+int smaz_decompress(const char *in, int inlen, char *out, int outlen);

 #endif
```
2017-04-28 21:19:24 +02:00
..
bind Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
helper Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
io Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
math Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
os Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
allocators.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
array.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
array.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
class_db.cpp Fix recognition of resource extensions. 2017-04-26 23:07:23 +02:00
class_db.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
color.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
color.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
color_names.inc Add missing map.h include in color defs 2017-01-15 12:51:47 +01:00
command_queue_mt.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
command_queue_mt.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
compressed_translation.cpp Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00
compressed_translation.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
core_string_names.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
core_string_names.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
dictionary.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
dictionary.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
dvector.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
dvector.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
engine.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
engine.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
error_list.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
error_macros.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
error_macros.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
event_queue.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
event_queue.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
func_ref.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
func_ref.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
global_config.cpp Fixed that playing the project opens the project manager 2017-04-18 15:46:37 +02:00
global_config.h Use .godot as file extension for project files. 2017-04-16 10:19:07 +02:00
global_constants.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
global_constants.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
hash_map.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
hashfuncs.h Correct Variant::hash_compare() 2017-04-14 11:31:18 +02:00
image.cpp Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
image.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
input_map.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
input_map.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
int_types.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
list.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
make_binders.py ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant. 2017-01-02 23:03:46 -03:00
map.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
message_queue.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
message_queue.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
method_bind.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
method_bind.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
method_ptrcall.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
object.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
object.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
packed_data_container.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
packed_data_container.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
pair.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
path_db.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
path_db.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
path_remap.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
path_remap.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
pool_allocator.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
pool_allocator.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
print_string.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
print_string.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
ref_ptr.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
ref_ptr.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
reference.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
reference.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
register_core_types.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
register_core_types.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
resource.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
resource.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
rid.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
rid.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
ring_buffer.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
safe_refcount.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
safe_refcount.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_debugger_local.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_debugger_local.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_debugger_remote.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_debugger_remote.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_language.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
script_language.h Merge pull request #8420 from magyar123/pr-script-files-as-base 2017-04-24 11:28:36 +02:00
SCsub Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00
self_list.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
set.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
simple_type.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
sort.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
string_db.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
string_db.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
translation.cpp Fix wrong fallback for locale 2017-04-26 04:48:03 +09:00
translation.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
typedefs.h Move VERSION_MKSTRING logic to version.h 2017-04-20 12:14:34 +02:00
ucaps.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
undo_redo.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
undo_redo.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
ustring.cpp Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
ustring.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
variant.cpp Correct Variant::hash_compare() 2017-04-14 11:31:18 +02:00
variant.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
variant_call.cpp Merge pull request #8277 from tagcup/math_checks 2017-04-24 11:16:20 +02:00
variant_construct_string.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
variant_op.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
variant_parser.cpp Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
variant_parser.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
vector.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
version.h Move VERSION_MKSTRING logic to version.h 2017-04-20 12:14:34 +02:00
vmap.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
vset.h Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00