godot/thirdparty
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
..
certs Reorder the folders in tools to prepare moving tools/editor 2017-02-09 00:08:27 +01:00
enet Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
fonts Reorder the folders in tools to prepare moving tools/editor 2017-02-09 00:08:27 +01:00
freetype freetype: Make it a module and split thirdparty library 2016-10-15 18:10:17 +02:00
glad glad: Update to upstream 0.1.13a0 2017-01-06 22:51:15 +01:00
jpeg-compressor jpg: Make it a module and split jpgd thirdparty files 2016-10-15 11:50:39 +02:00
libogg ogg/vorbis/opus: Make them modules and unbundle thirdparty libs 2016-10-15 11:50:40 +02:00
libpng libpng: Update to upstream version 1.6.29 2017-04-09 15:47:25 +02:00
libsimplewebm WebM: Fix crash when there is no audio stream 2016-12-01 12:00:17 +01:00
libtheora theora: Move to a module and split thirdparty lib 2016-10-15 11:50:41 +02:00
libvorbis ogg/vorbis/opus: Make them modules and unbundle thirdparty libs 2016-10-15 11:50:40 +02:00
libvpx Fix compilation with MSVC 2013 2016-11-15 12:10:05 +01:00
libwebp Update libwebp to 0.6.0 2017-02-17 23:49:40 +09:00
minizip Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
misc Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00
openssl Rename remaining WinRT references to UWP 2016-11-03 14:51:08 -02:00
opus opus: Update to upstream version 1.1.4 2017-04-09 15:17:58 +02:00
pvrtccompressor dds/etc1/pbm/pvr: Make those modules and split thirdparty files 2016-10-15 11:50:39 +02:00
rg-etc1 dds/etc1/pbm/pvr: Make those modules and split thirdparty files 2016-10-15 11:50:39 +02:00
rtaudio Rename WINRT_ENABLED to UWP_ENABLED 2016-11-03 14:51:08 -02:00
squish squish: Update to upstream version 1.15 2017-04-09 15:03:39 +02:00
stb_vorbis WIP new AudioServer, with buses, effects, etc. 2017-01-21 19:01:00 -03:00
zlib zlib: Update to upstream version 1.2.11 2017-01-16 17:58:34 +01:00
README.md Split thirdparty smaz.c out of compressed_translation.cpp 2017-04-28 21:19:24 +02:00

README.md

Third party libraries

certs

  • Upstream: ?

TODO.

enet

Files extracted from upstream source:

  • all .c files in the main directory (except unix.c win32.c)
  • the include/enet/ folder as enet/ (except unix.h win32.h)
  • LICENSE file

Important: enet.h, host.c, protocol.c have been slightly modified to be usable by godot socket implementation and allow IPv6. Two files (godot.cpp and enet/godot.h) have been added to provide enet socket implementation using Godot classes. It is still possible to build against a system wide ENet but doing so will limit it's functionality to IPv4 only. Check the diff of enet.h, protocol.c, and host.c with the 1.3.13 tarball before the next update.

fonts

  • Upstream: ?

TODO.

freetype

Files extracted from upstream source:

  • the src/ folder, stripped of the Jamfile files
  • the include/ folder
  • docs/{FTL.TXT,LICENSE.TXT}

glad

The files we package are automatically generated. See the header of glad.c for instructions on how to generate them for the GLES version Godot targets.

jpeg-compressor

Files extracted from upstream source:

  • jpgd.{c,h}

libogg

Files extracted from upstream source:

  • src/*.c
  • include/ogg/*.h in ogg/
  • COPYING

libpng

Files extracted from upstream source:

  • all .c and .h files of the main directory, except from example.c and pngtest.c
  • the arm/ folder
  • scripts/pnglibconf.h.prebuilt as pnglibconf.h

libsimplewebm

libvorbis

Files extracted from upstream source:

  • src/* except from: lookups.pl, Makefile.*
  • include/vorbis/*.h as vorbis/
  • COPYING

libvpx

libwebp

Files extracted from upstream source:

  • src/* except from: .am, .rc and .in files
  • AUTHORS, COPYING, PATENTS

Important: The files utils/bit_reader_utils.{c,h} have Godot-made changes to ensure they build for Javascript/HTML5. Those changes are marked with // -- GODOT -- comments.

minizip

Files extracted from the upstream source:

  • contrib/minizip/{crypt.h,ioapi.{c,h},zip.{c,h},unzip.{c,h}}

Important: Some files have Godot-made changes for use in core/io. TODO: Properly sync with version 1.2.4 and document changes.

misc

Collection of single-file libraries used in Godot.

openssl

Files extracted from the upstream source:

TODO.

opus

Files extracted from upstream source:

  • all .c and .h files in src/ (both opus and opusfile), except opus_demo.c
  • all .h files in include/ (both opus and opusfile) as opus/
  • celt/ and silk/ subfolders
  • COPYING

pvrtccompressor

Files extracted from upstream source:

  • all .cpp and .h files apart from main.cpp
  • LICENSE.TXT

rg-etc1

Files extracted from upstream source:

  • rg_etc1.{cpp,h}

rtaudio

Files extracted from upstream source:

  • RtAudio.{cpp,h}

squish

Files extracted from upstream source:

  • all .cpp, .h and .inl files

theora

Files extracted from upstream source:

  • all .c, .h in lib/
  • all .h files in include/theora/ as theora/
  • COPYING and LICENSE

zlib

Files extracted from upstream source:

  • all .c and .h files