fast_excel 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -2
  3. data/Makefile +14 -0
  4. data/README.md +7 -2
  5. data/Rakefile +10 -0
  6. data/extconf.rb +0 -0
  7. data/fast_excel.gemspec +3 -1
  8. data/lib/fast_excel/binding.rb +3 -7
  9. data/lib/rubygems_plugin.rb +3 -0
  10. data/libxlsxwriter/.gitignore +49 -0
  11. data/libxlsxwriter/.indent.pro +125 -0
  12. data/libxlsxwriter/.travis.yml +25 -0
  13. data/libxlsxwriter/CONTRIBUTING.md +226 -0
  14. data/libxlsxwriter/Changes.txt +557 -0
  15. data/libxlsxwriter/LICENSE.txt +89 -0
  16. data/libxlsxwriter/Makefile +156 -0
  17. data/libxlsxwriter/Readme.md +78 -0
  18. data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +30 -0
  19. data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +7 -0
  20. data/libxlsxwriter/include/xlsxwriter/app.h +79 -0
  21. data/libxlsxwriter/include/xlsxwriter/chart.h +3476 -0
  22. data/libxlsxwriter/include/xlsxwriter/common.h +372 -0
  23. data/libxlsxwriter/include/xlsxwriter/content_types.h +74 -0
  24. data/libxlsxwriter/include/xlsxwriter/core.h +51 -0
  25. data/libxlsxwriter/include/xlsxwriter/custom.h +52 -0
  26. data/libxlsxwriter/include/xlsxwriter/drawing.h +111 -0
  27. data/libxlsxwriter/include/xlsxwriter/format.h +1214 -0
  28. data/libxlsxwriter/include/xlsxwriter/hash_table.h +76 -0
  29. data/libxlsxwriter/include/xlsxwriter/packager.h +80 -0
  30. data/libxlsxwriter/include/xlsxwriter/relationships.h +77 -0
  31. data/libxlsxwriter/include/xlsxwriter/shared_strings.h +83 -0
  32. data/libxlsxwriter/include/xlsxwriter/styles.h +77 -0
  33. data/libxlsxwriter/include/xlsxwriter/theme.h +47 -0
  34. data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +214 -0
  35. data/libxlsxwriter/include/xlsxwriter/third_party/queue.h +694 -0
  36. data/libxlsxwriter/include/xlsxwriter/third_party/tmpfileplus.h +53 -0
  37. data/libxlsxwriter/include/xlsxwriter/third_party/tree.h +801 -0
  38. data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +375 -0
  39. data/libxlsxwriter/include/xlsxwriter/utility.h +166 -0
  40. data/libxlsxwriter/include/xlsxwriter/workbook.h +757 -0
  41. data/libxlsxwriter/include/xlsxwriter/worksheet.h +2641 -0
  42. data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +178 -0
  43. data/libxlsxwriter/include/xlsxwriter.h +23 -0
  44. data/libxlsxwriter/lib/.gitignore +0 -0
  45. data/libxlsxwriter/libxlsxwriter.podspec +47 -0
  46. data/libxlsxwriter/src/Makefile +130 -0
  47. data/libxlsxwriter/src/app.c +443 -0
  48. data/libxlsxwriter/src/chart.c +6346 -0
  49. data/libxlsxwriter/src/content_types.c +345 -0
  50. data/libxlsxwriter/src/core.c +293 -0
  51. data/libxlsxwriter/src/custom.c +224 -0
  52. data/libxlsxwriter/src/drawing.c +746 -0
  53. data/libxlsxwriter/src/format.c +729 -0
  54. data/libxlsxwriter/src/hash_table.c +223 -0
  55. data/libxlsxwriter/src/packager.c +948 -0
  56. data/libxlsxwriter/src/relationships.c +245 -0
  57. data/libxlsxwriter/src/shared_strings.c +266 -0
  58. data/libxlsxwriter/src/styles.c +1088 -0
  59. data/libxlsxwriter/src/theme.c +348 -0
  60. data/libxlsxwriter/src/utility.c +515 -0
  61. data/libxlsxwriter/src/workbook.c +1930 -0
  62. data/libxlsxwriter/src/worksheet.c +5022 -0
  63. data/libxlsxwriter/src/xmlwriter.c +355 -0
  64. data/libxlsxwriter/third_party/minizip/Makefile +44 -0
  65. data/libxlsxwriter/third_party/minizip/Makefile.am +45 -0
  66. data/libxlsxwriter/third_party/minizip/Makefile.orig +25 -0
  67. data/libxlsxwriter/third_party/minizip/MiniZip64_Changes.txt +6 -0
  68. data/libxlsxwriter/third_party/minizip/MiniZip64_info.txt +74 -0
  69. data/libxlsxwriter/third_party/minizip/README.txt +5 -0
  70. data/libxlsxwriter/third_party/minizip/configure.ac +32 -0
  71. data/libxlsxwriter/third_party/minizip/crypt.h +131 -0
  72. data/libxlsxwriter/third_party/minizip/ioapi.c +247 -0
  73. data/libxlsxwriter/third_party/minizip/ioapi.h +208 -0
  74. data/libxlsxwriter/third_party/minizip/iowin32.c +456 -0
  75. data/libxlsxwriter/third_party/minizip/iowin32.h +28 -0
  76. data/libxlsxwriter/third_party/minizip/make_vms.com +25 -0
  77. data/libxlsxwriter/third_party/minizip/miniunz.c +660 -0
  78. data/libxlsxwriter/third_party/minizip/miniunzip.1 +63 -0
  79. data/libxlsxwriter/third_party/minizip/minizip.1 +46 -0
  80. data/libxlsxwriter/third_party/minizip/minizip.c +520 -0
  81. data/libxlsxwriter/third_party/minizip/minizip.pc.in +12 -0
  82. data/libxlsxwriter/third_party/minizip/mztools.c +291 -0
  83. data/libxlsxwriter/third_party/minizip/mztools.h +37 -0
  84. data/libxlsxwriter/third_party/minizip/unzip.c +2125 -0
  85. data/libxlsxwriter/third_party/minizip/unzip.h +437 -0
  86. data/libxlsxwriter/third_party/minizip/zip.c +2007 -0
  87. data/libxlsxwriter/third_party/minizip/zip.h +367 -0
  88. data/libxlsxwriter/third_party/tmpfileplus/Makefile +42 -0
  89. data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +342 -0
  90. data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.h +53 -0
  91. data/libxlsxwriter/version.txt +1 -0
  92. metadata +89 -6
  93. data/binaries/libxlsxwriter-alpine.so +0 -0
  94. data/binaries/libxlsxwriter-darwin.dylib +0 -0
  95. data/binaries/libxlsxwriter-glibc.so +0 -0
@@ -0,0 +1,367 @@
1
+ /* zip.h -- IO on .zip files using zlib
2
+ Version 1.1, February 14h, 2010
3
+ part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
4
+
5
+ Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
6
+
7
+ Modifications for Zip64 support
8
+ Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
9
+
10
+ For more info read MiniZip_info.txt
11
+
12
+ ---------------------------------------------------------------------------
13
+
14
+ Condition of use and distribution are the same than zlib :
15
+
16
+ This software is provided 'as-is', without any express or implied
17
+ warranty. In no event will the authors be held liable for any damages
18
+ arising from the use of this software.
19
+
20
+ Permission is granted to anyone to use this software for any purpose,
21
+ including commercial applications, and to alter it and redistribute it
22
+ freely, subject to the following restrictions:
23
+
24
+ 1. The origin of this software must not be misrepresented; you must not
25
+ claim that you wrote the original software. If you use this software
26
+ in a product, an acknowledgment in the product documentation would be
27
+ appreciated but is not required.
28
+ 2. Altered source versions must be plainly marked as such, and must not be
29
+ misrepresented as being the original software.
30
+ 3. This notice may not be removed or altered from any source distribution.
31
+
32
+ ---------------------------------------------------------------------------
33
+
34
+ Changes
35
+
36
+ See header of zip.h
37
+
38
+ */
39
+
40
+ /* Pragma added by libxlsxwriter project to avoid warnings with -pedantic -ansi. */
41
+ #ifndef _WIN32
42
+ #pragma GCC system_header
43
+ #endif
44
+
45
+ #ifndef _zip12_H
46
+ #define _zip12_H
47
+
48
+ #ifdef __cplusplus
49
+ extern "C" {
50
+ #endif
51
+
52
+ /* #define HAVE_BZIP2 */
53
+
54
+ #ifndef _ZLIB_H
55
+ #include "zlib.h"
56
+ #endif
57
+
58
+ #ifndef _ZLIBIOAPI_H
59
+ #include "ioapi.h"
60
+ #endif
61
+
62
+ #ifdef HAVE_BZIP2
63
+ #include "bzlib.h"
64
+ #endif
65
+
66
+ #define Z_BZIP2ED 12
67
+
68
+ #if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
69
+ /* like the STRICT of WIN32, we define a pointer that cannot be converted
70
+ from (void*) without cast */
71
+ typedef struct TagzipFile__ { int unused; } zipFile__;
72
+ typedef zipFile__ *zipFile;
73
+ #else
74
+ typedef voidp zipFile;
75
+ #endif
76
+
77
+ #define ZIP_OK (0)
78
+ #define ZIP_EOF (0)
79
+ #define ZIP_ERRNO (Z_ERRNO)
80
+ #define ZIP_PARAMERROR (-102)
81
+ #define ZIP_BADZIPFILE (-103)
82
+ #define ZIP_INTERNALERROR (-104)
83
+
84
+ #ifndef DEF_MEM_LEVEL
85
+ # if MAX_MEM_LEVEL >= 8
86
+ # define DEF_MEM_LEVEL 8
87
+ # else
88
+ # define DEF_MEM_LEVEL MAX_MEM_LEVEL
89
+ # endif
90
+ #endif
91
+ /* default memLevel */
92
+
93
+ /* tm_zip contain date/time info */
94
+ typedef struct tm_zip_s
95
+ {
96
+ uInt tm_sec; /* seconds after the minute - [0,59] */
97
+ uInt tm_min; /* minutes after the hour - [0,59] */
98
+ uInt tm_hour; /* hours since midnight - [0,23] */
99
+ uInt tm_mday; /* day of the month - [1,31] */
100
+ uInt tm_mon; /* months since January - [0,11] */
101
+ uInt tm_year; /* years - [1980..2044] */
102
+ } tm_zip;
103
+
104
+ typedef struct
105
+ {
106
+ tm_zip tmz_date; /* date in understandable format */
107
+ uLong dosDate; /* if dos_date == 0, tmu_date is used */
108
+ /* uLong flag; */ /* general purpose bit flag 2 bytes */
109
+
110
+ uLong internal_fa; /* internal file attributes 2 bytes */
111
+ uLong external_fa; /* external file attributes 4 bytes */
112
+ } zip_fileinfo;
113
+
114
+ typedef const char* zipcharpc;
115
+
116
+
117
+ #define APPEND_STATUS_CREATE (0)
118
+ #define APPEND_STATUS_CREATEAFTER (1)
119
+ #define APPEND_STATUS_ADDINZIP (2)
120
+
121
+ extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
122
+ extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
123
+ /*
124
+ Create a zipfile.
125
+ pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
126
+ an Unix computer "zlib/zlib113.zip".
127
+ if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
128
+ will be created at the end of the file.
129
+ (useful if the file contain a self extractor code)
130
+ if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
131
+ add files in existing zip (be sure you don't add file that doesn't exist)
132
+ If the zipfile cannot be opened, the return value is NULL.
133
+ Else, the return value is a zipFile Handle, usable with other function
134
+ of this zip package.
135
+ */
136
+
137
+ /* Note : there is no delete function into a zipfile.
138
+ If you want delete file into a zipfile, you must open a zipfile, and create another
139
+ Of couse, you can use RAW reading and writing to copy the file you did not want delte
140
+ */
141
+
142
+ extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
143
+ int append,
144
+ zipcharpc* globalcomment,
145
+ zlib_filefunc_def* pzlib_filefunc_def));
146
+
147
+ extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
148
+ int append,
149
+ zipcharpc* globalcomment,
150
+ zlib_filefunc64_def* pzlib_filefunc_def));
151
+
152
+ extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
153
+ const char* filename,
154
+ const zip_fileinfo* zipfi,
155
+ const void* extrafield_local,
156
+ uInt size_extrafield_local,
157
+ const void* extrafield_global,
158
+ uInt size_extrafield_global,
159
+ const char* comment,
160
+ int method,
161
+ int level));
162
+
163
+ extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
164
+ const char* filename,
165
+ const zip_fileinfo* zipfi,
166
+ const void* extrafield_local,
167
+ uInt size_extrafield_local,
168
+ const void* extrafield_global,
169
+ uInt size_extrafield_global,
170
+ const char* comment,
171
+ int method,
172
+ int level,
173
+ int zip64));
174
+
175
+ /*
176
+ Open a file in the ZIP for writing.
177
+ filename : the filename in zip (if NULL, '-' without quote will be used
178
+ *zipfi contain supplemental information
179
+ if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
180
+ contains the extrafield data the the local header
181
+ if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
182
+ contains the extrafield data the the local header
183
+ if comment != NULL, comment contain the comment string
184
+ method contain the compression method (0 for store, Z_DEFLATED for deflate)
185
+ level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
186
+ zip64 is set to 1 if a zip64 extended information block should be added to the local file header.
187
+ this MUST be '1' if the uncompressed size is >= 0xffffffff.
188
+
189
+ */
190
+
191
+
192
+ extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
193
+ const char* filename,
194
+ const zip_fileinfo* zipfi,
195
+ const void* extrafield_local,
196
+ uInt size_extrafield_local,
197
+ const void* extrafield_global,
198
+ uInt size_extrafield_global,
199
+ const char* comment,
200
+ int method,
201
+ int level,
202
+ int raw));
203
+
204
+
205
+ extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,
206
+ const char* filename,
207
+ const zip_fileinfo* zipfi,
208
+ const void* extrafield_local,
209
+ uInt size_extrafield_local,
210
+ const void* extrafield_global,
211
+ uInt size_extrafield_global,
212
+ const char* comment,
213
+ int method,
214
+ int level,
215
+ int raw,
216
+ int zip64));
217
+ /*
218
+ Same than zipOpenNewFileInZip, except if raw=1, we write raw file
219
+ */
220
+
221
+ extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
222
+ const char* filename,
223
+ const zip_fileinfo* zipfi,
224
+ const void* extrafield_local,
225
+ uInt size_extrafield_local,
226
+ const void* extrafield_global,
227
+ uInt size_extrafield_global,
228
+ const char* comment,
229
+ int method,
230
+ int level,
231
+ int raw,
232
+ int windowBits,
233
+ int memLevel,
234
+ int strategy,
235
+ const char* password,
236
+ uLong crcForCrypting));
237
+
238
+ extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
239
+ const char* filename,
240
+ const zip_fileinfo* zipfi,
241
+ const void* extrafield_local,
242
+ uInt size_extrafield_local,
243
+ const void* extrafield_global,
244
+ uInt size_extrafield_global,
245
+ const char* comment,
246
+ int method,
247
+ int level,
248
+ int raw,
249
+ int windowBits,
250
+ int memLevel,
251
+ int strategy,
252
+ const char* password,
253
+ uLong crcForCrypting,
254
+ int zip64
255
+ ));
256
+
257
+ /*
258
+ Same than zipOpenNewFileInZip2, except
259
+ windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
260
+ password : crypting password (NULL for no crypting)
261
+ crcForCrypting : crc of file to compress (needed for crypting)
262
+ */
263
+
264
+ extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,
265
+ const char* filename,
266
+ const zip_fileinfo* zipfi,
267
+ const void* extrafield_local,
268
+ uInt size_extrafield_local,
269
+ const void* extrafield_global,
270
+ uInt size_extrafield_global,
271
+ const char* comment,
272
+ int method,
273
+ int level,
274
+ int raw,
275
+ int windowBits,
276
+ int memLevel,
277
+ int strategy,
278
+ const char* password,
279
+ uLong crcForCrypting,
280
+ uLong versionMadeBy,
281
+ uLong flagBase
282
+ ));
283
+
284
+
285
+ extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
286
+ const char* filename,
287
+ const zip_fileinfo* zipfi,
288
+ const void* extrafield_local,
289
+ uInt size_extrafield_local,
290
+ const void* extrafield_global,
291
+ uInt size_extrafield_global,
292
+ const char* comment,
293
+ int method,
294
+ int level,
295
+ int raw,
296
+ int windowBits,
297
+ int memLevel,
298
+ int strategy,
299
+ const char* password,
300
+ uLong crcForCrypting,
301
+ uLong versionMadeBy,
302
+ uLong flagBase,
303
+ int zip64
304
+ ));
305
+ /*
306
+ Same than zipOpenNewFileInZip4, except
307
+ versionMadeBy : value for Version made by field
308
+ flag : value for flag field (compression level info will be added)
309
+ */
310
+
311
+
312
+ extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
313
+ const void* buf,
314
+ unsigned len));
315
+ /*
316
+ Write data in the zipfile
317
+ */
318
+
319
+ extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
320
+ /*
321
+ Close the current file in the zipfile
322
+ */
323
+
324
+ extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
325
+ uLong uncompressed_size,
326
+ uLong crc32));
327
+
328
+ extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
329
+ ZPOS64_T uncompressed_size,
330
+ uLong crc32));
331
+
332
+ /*
333
+ Close the current file in the zipfile, for file opened with
334
+ parameter raw=1 in zipOpenNewFileInZip2
335
+ uncompressed_size and crc32 are value for the uncompressed size
336
+ */
337
+
338
+ extern int ZEXPORT zipClose OF((zipFile file,
339
+ const char* global_comment));
340
+ /*
341
+ Close the zipfile
342
+ */
343
+
344
+
345
+ extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
346
+ /*
347
+ zipRemoveExtraInfoBlock - Added by Mathias Svensson
348
+
349
+ Remove extra information block from a extra information data for the local file header or central directory header
350
+
351
+ It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.
352
+
353
+ 0x0001 is the signature header for the ZIP64 extra information blocks
354
+
355
+ usage.
356
+ Remove ZIP64 Extra information from a central director extra field data
357
+ zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001);
358
+
359
+ Remove ZIP64 Extra information from a Local File Header extra field data
360
+ zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001);
361
+ */
362
+
363
+ #ifdef __cplusplus
364
+ }
365
+ #endif
366
+
367
+ #endif /* _zip64_H */
@@ -0,0 +1,42 @@
1
+ ###############################################################################
2
+ #
3
+ # Simplied Makefile to build tmpfileplus for the libxlsxwriter library.
4
+ #
5
+
6
+ # Keep the output quiet by default.
7
+ Q=@
8
+ ifdef V
9
+ Q=
10
+ endif
11
+
12
+ UNAME := $(shell uname)
13
+
14
+ # Check for MinGW/MinGW64/Cygwin environments.
15
+ ifneq (,$(findstring MINGW, $(UNAME)))
16
+ MING_LIKE = y
17
+ endif
18
+ ifneq (,$(findstring MSYS, $(UNAME)))
19
+ MING_LIKE = y
20
+ endif
21
+ ifneq (,$(findstring CYGWIN, $(UNAME)))
22
+ MING_LIKE = y
23
+ endif
24
+
25
+ FPIC = -fPIC
26
+
27
+ # Change make options on MinGW/MinGW64/Cygwin.
28
+ ifdef MING_LIKE
29
+ FPIC =
30
+ CC = gcc
31
+ endif
32
+
33
+ all: tmpfileplus.o tmpfileplus.so
34
+
35
+ %.o : %.c
36
+ $(Q)$(CC) -c $(CFLAGS) $<
37
+
38
+ %.so : %.c
39
+ $(Q)$(CC) $(FPIC) -c $(CFLAGS) $< -o $@
40
+
41
+ clean:
42
+ $(Q)/bin/rm -f *.o *.so