gsf 3.0.9-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +55 -0
  3. data/lib/gsf/input.rb +26 -0
  4. data/lib/gsf/loader.rb +57 -0
  5. data/lib/gsf.rb +53 -0
  6. data/test/gsf-test-utils.rb +22 -0
  7. data/test/run-test.rb +46 -0
  8. data/test/test-input-stdio.rb +25 -0
  9. data/vendor/local/bin/gsf-office-thumbnailer.exe +0 -0
  10. data/vendor/local/bin/gsf-vba-dump.exe +0 -0
  11. data/vendor/local/bin/gsf.exe +0 -0
  12. data/vendor/local/bin/libgsf-1-114.dll +0 -0
  13. data/vendor/local/bin/libgsf-win32-1-114.dll +0 -0
  14. data/vendor/local/include/libgsf-1/gsf/gsf-blob.h +39 -0
  15. data/vendor/local/include/libgsf-1/gsf/gsf-clip-data.h +72 -0
  16. data/vendor/local/include/libgsf-1/gsf/gsf-doc-meta-data.h +66 -0
  17. data/vendor/local/include/libgsf-1/gsf/gsf-docprop-vector.h +47 -0
  18. data/vendor/local/include/libgsf-1/gsf/gsf-fwd.h +121 -0
  19. data/vendor/local/include/libgsf-1/gsf/gsf-impl-utils.h +156 -0
  20. data/vendor/local/include/libgsf-1/gsf/gsf-infile-impl.h +50 -0
  21. data/vendor/local/include/libgsf-1/gsf/gsf-infile-msole.h +45 -0
  22. data/vendor/local/include/libgsf-1/gsf/gsf-infile-msvba.h +49 -0
  23. data/vendor/local/include/libgsf-1/gsf/gsf-infile-stdio.h +43 -0
  24. data/vendor/local/include/libgsf-1/gsf/gsf-infile-tar.h +40 -0
  25. data/vendor/local/include/libgsf-1/gsf/gsf-infile-zip.h +43 -0
  26. data/vendor/local/include/libgsf-1/gsf/gsf-infile.h +46 -0
  27. data/vendor/local/include/libgsf-1/gsf/gsf-input-bzip.h +34 -0
  28. data/vendor/local/include/libgsf-1/gsf/gsf-input-gio.h +44 -0
  29. data/vendor/local/include/libgsf-1/gsf/gsf-input-gzip.h +43 -0
  30. data/vendor/local/include/libgsf-1/gsf/gsf-input-http.h +45 -0
  31. data/vendor/local/include/libgsf-1/gsf/gsf-input-impl.h +68 -0
  32. data/vendor/local/include/libgsf-1/gsf/gsf-input-iochannel.h +35 -0
  33. data/vendor/local/include/libgsf-1/gsf/gsf-input-memory.h +46 -0
  34. data/vendor/local/include/libgsf-1/gsf/gsf-input-proxy.h +46 -0
  35. data/vendor/local/include/libgsf-1/gsf/gsf-input-stdio.h +48 -0
  36. data/vendor/local/include/libgsf-1/gsf/gsf-input-textline.h +46 -0
  37. data/vendor/local/include/libgsf-1/gsf/gsf-input.h +69 -0
  38. data/vendor/local/include/libgsf-1/gsf/gsf-libxml.h +225 -0
  39. data/vendor/local/include/libgsf-1/gsf/gsf-meta-names.h +482 -0
  40. data/vendor/local/include/libgsf-1/gsf/gsf-msole-utils.h +70 -0
  41. data/vendor/local/include/libgsf-1/gsf/gsf-open-pkg-utils.h +95 -0
  42. data/vendor/local/include/libgsf-1/gsf/gsf-opendoc-utils.h +162 -0
  43. data/vendor/local/include/libgsf-1/gsf/gsf-outfile-impl.h +46 -0
  44. data/vendor/local/include/libgsf-1/gsf/gsf-outfile-msole.h +47 -0
  45. data/vendor/local/include/libgsf-1/gsf/gsf-outfile-stdio.h +49 -0
  46. data/vendor/local/include/libgsf-1/gsf/gsf-outfile-zip.h +61 -0
  47. data/vendor/local/include/libgsf-1/gsf/gsf-outfile.h +49 -0
  48. data/vendor/local/include/libgsf-1/gsf/gsf-output-bzip.h +43 -0
  49. data/vendor/local/include/libgsf-1/gsf/gsf-output-csv.h +84 -0
  50. data/vendor/local/include/libgsf-1/gsf/gsf-output-gio.h +44 -0
  51. data/vendor/local/include/libgsf-1/gsf/gsf-output-gzip.h +43 -0
  52. data/vendor/local/include/libgsf-1/gsf/gsf-output-iconv.h +47 -0
  53. data/vendor/local/include/libgsf-1/gsf/gsf-output-impl.h +37 -0
  54. data/vendor/local/include/libgsf-1/gsf/gsf-output-iochannel.h +43 -0
  55. data/vendor/local/include/libgsf-1/gsf/gsf-output-memory.h +44 -0
  56. data/vendor/local/include/libgsf-1/gsf/gsf-output-stdio.h +52 -0
  57. data/vendor/local/include/libgsf-1/gsf/gsf-output.h +99 -0
  58. data/vendor/local/include/libgsf-1/gsf/gsf-shared-memory.h +51 -0
  59. data/vendor/local/include/libgsf-1/gsf/gsf-structured-blob.h +45 -0
  60. data/vendor/local/include/libgsf-1/gsf/gsf-timestamp.h +70 -0
  61. data/vendor/local/include/libgsf-1/gsf/gsf-utils.h +340 -0
  62. data/vendor/local/include/libgsf-1/gsf/gsf.h +98 -0
  63. data/vendor/local/include/libgsf-1/gsf-win32/gsf-input-win32.h +41 -0
  64. data/vendor/local/include/libgsf-1/gsf-win32/gsf-output-win32.h +41 -0
  65. data/vendor/local/lib/libgsf-1.a +0 -0
  66. data/vendor/local/lib/libgsf-1.dll.a +0 -0
  67. data/vendor/local/lib/libgsf-1.la +41 -0
  68. data/vendor/local/lib/libgsf-win32-1.a +0 -0
  69. data/vendor/local/lib/libgsf-win32-1.dll.a +0 -0
  70. data/vendor/local/lib/libgsf-win32-1.la +41 -0
  71. data/vendor/local/lib/pkgconfig/libgsf-1.pc +11 -0
  72. data/vendor/local/lib/pkgconfig/libgsf-win32-1.pc +11 -0
  73. data/vendor/local/share/gtk-doc/html/gsf/annotation-glossary.html +56 -0
  74. data/vendor/local/share/gtk-doc/html/gsf/api.html +107 -0
  75. data/vendor/local/share/gtk-doc/html/gsf/dependencies.html +109 -0
  76. data/vendor/local/share/gtk-doc/html/gsf/gsf-Compression.html +369 -0
  77. data/vendor/local/share/gtk-doc/html/gsf/gsf-GIO.html +307 -0
  78. data/vendor/local/share/gtk-doc/html/gsf/gsf-GIOChannel.html +119 -0
  79. data/vendor/local/share/gtk-doc/html/gsf/gsf-Infile-reading-structed-files.html +397 -0
  80. data/vendor/local/share/gtk-doc/html/gsf/gsf-Input-from-unstructured-files.html +887 -0
  81. data/vendor/local/share/gtk-doc/html/gsf/gsf-MS-OLE2.html +894 -0
  82. data/vendor/local/share/gtk-doc/html/gsf/gsf-OASIS-Open-Document.html +398 -0
  83. data/vendor/local/share/gtk-doc/html/gsf/gsf-Outfile-writing-structed-files.html +237 -0
  84. data/vendor/local/share/gtk-doc/html/gsf/gsf-Output-to-unstructured-files.html +830 -0
  85. data/vendor/local/share/gtk-doc/html/gsf/gsf-Reading-and-Writing-from-local-files-and-directories.html +593 -0
  86. data/vendor/local/share/gtk-doc/html/gsf/gsf-Text.html +523 -0
  87. data/vendor/local/share/gtk-doc/html/gsf/gsf-XML-and-libxml.html +2032 -0
  88. data/vendor/local/share/gtk-doc/html/gsf/gsf-Zip.html +338 -0
  89. data/vendor/local/share/gtk-doc/html/gsf/gsf-blobs.html +56 -0
  90. data/vendor/local/share/gtk-doc/html/gsf/gsf-clip-data.html +444 -0
  91. data/vendor/local/share/gtk-doc/html/gsf/gsf-index.html +875 -0
  92. data/vendor/local/share/gtk-doc/html/gsf/gsf-memory.html +332 -0
  93. data/vendor/local/share/gtk-doc/html/gsf/gsf-metadata.html +1762 -0
  94. data/vendor/local/share/gtk-doc/html/gsf/gsf-users.html +73 -0
  95. data/vendor/local/share/gtk-doc/html/gsf/gsf-utils.html +2503 -0
  96. data/vendor/local/share/gtk-doc/html/gsf/gsf.devhelp2 +440 -0
  97. data/vendor/local/share/gtk-doc/html/gsf/history.html +45 -0
  98. data/vendor/local/share/gtk-doc/html/gsf/home.png +0 -0
  99. data/vendor/local/share/gtk-doc/html/gsf/index.html +98 -0
  100. data/vendor/local/share/gtk-doc/html/gsf/index.sgml +572 -0
  101. data/vendor/local/share/gtk-doc/html/gsf/intro.html +39 -0
  102. data/vendor/local/share/gtk-doc/html/gsf/io.html +38 -0
  103. data/vendor/local/share/gtk-doc/html/gsf/left-insensitive.png +0 -0
  104. data/vendor/local/share/gtk-doc/html/gsf/left.png +0 -0
  105. data/vendor/local/share/gtk-doc/html/gsf/misc.html +33 -0
  106. data/vendor/local/share/gtk-doc/html/gsf/parsers.html +59 -0
  107. data/vendor/local/share/gtk-doc/html/gsf/right-insensitive.png +0 -0
  108. data/vendor/local/share/gtk-doc/html/gsf/right.png +0 -0
  109. data/vendor/local/share/gtk-doc/html/gsf/sources.html +50 -0
  110. data/vendor/local/share/gtk-doc/html/gsf/style.css +461 -0
  111. data/vendor/local/share/gtk-doc/html/gsf/up-insensitive.png +0 -0
  112. data/vendor/local/share/gtk-doc/html/gsf/up.png +0 -0
  113. data/vendor/local/share/license/libgsf/AUTHORS +3 -0
  114. data/vendor/local/share/license/libgsf/COPYING +340 -0
  115. data/vendor/local/share/license/libgsf/COPYING.LIB +504 -0
  116. data/vendor/local/share/locale/as/LC_MESSAGES/libgsf.mo +0 -0
  117. data/vendor/local/share/locale/bs/LC_MESSAGES/libgsf.mo +0 -0
  118. data/vendor/local/share/locale/ca/LC_MESSAGES/libgsf.mo +0 -0
  119. data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/libgsf.mo +0 -0
  120. data/vendor/local/share/locale/cs/LC_MESSAGES/libgsf.mo +0 -0
  121. data/vendor/local/share/locale/da/LC_MESSAGES/libgsf.mo +0 -0
  122. data/vendor/local/share/locale/de/LC_MESSAGES/libgsf.mo +0 -0
  123. data/vendor/local/share/locale/el/LC_MESSAGES/libgsf.mo +0 -0
  124. data/vendor/local/share/locale/en_GB/LC_MESSAGES/libgsf.mo +0 -0
  125. data/vendor/local/share/locale/eo/LC_MESSAGES/libgsf.mo +0 -0
  126. data/vendor/local/share/locale/es/LC_MESSAGES/libgsf.mo +0 -0
  127. data/vendor/local/share/locale/eu/LC_MESSAGES/libgsf.mo +0 -0
  128. data/vendor/local/share/locale/fi/LC_MESSAGES/libgsf.mo +0 -0
  129. data/vendor/local/share/locale/fr/LC_MESSAGES/libgsf.mo +0 -0
  130. data/vendor/local/share/locale/gl/LC_MESSAGES/libgsf.mo +0 -0
  131. data/vendor/local/share/locale/he/LC_MESSAGES/libgsf.mo +0 -0
  132. data/vendor/local/share/locale/hu/LC_MESSAGES/libgsf.mo +0 -0
  133. data/vendor/local/share/locale/id/LC_MESSAGES/libgsf.mo +0 -0
  134. data/vendor/local/share/locale/it/LC_MESSAGES/libgsf.mo +0 -0
  135. data/vendor/local/share/locale/ja/LC_MESSAGES/libgsf.mo +0 -0
  136. data/vendor/local/share/locale/ko/LC_MESSAGES/libgsf.mo +0 -0
  137. data/vendor/local/share/locale/lt/LC_MESSAGES/libgsf.mo +0 -0
  138. data/vendor/local/share/locale/lv/LC_MESSAGES/libgsf.mo +0 -0
  139. data/vendor/local/share/locale/ml/LC_MESSAGES/libgsf.mo +0 -0
  140. data/vendor/local/share/locale/nb/LC_MESSAGES/libgsf.mo +0 -0
  141. data/vendor/local/share/locale/nn/LC_MESSAGES/libgsf.mo +0 -0
  142. data/vendor/local/share/locale/oc/LC_MESSAGES/libgsf.mo +0 -0
  143. data/vendor/local/share/locale/pa/LC_MESSAGES/libgsf.mo +0 -0
  144. data/vendor/local/share/locale/pl/LC_MESSAGES/libgsf.mo +0 -0
  145. data/vendor/local/share/locale/pt/LC_MESSAGES/libgsf.mo +0 -0
  146. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/libgsf.mo +0 -0
  147. data/vendor/local/share/locale/ro/LC_MESSAGES/libgsf.mo +0 -0
  148. data/vendor/local/share/locale/ru/LC_MESSAGES/libgsf.mo +0 -0
  149. data/vendor/local/share/locale/sk/LC_MESSAGES/libgsf.mo +0 -0
  150. data/vendor/local/share/locale/sl/LC_MESSAGES/libgsf.mo +0 -0
  151. data/vendor/local/share/locale/sr/LC_MESSAGES/libgsf.mo +0 -0
  152. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/libgsf.mo +0 -0
  153. data/vendor/local/share/locale/sv/LC_MESSAGES/libgsf.mo +0 -0
  154. data/vendor/local/share/locale/ta/LC_MESSAGES/libgsf.mo +0 -0
  155. data/vendor/local/share/locale/tg/LC_MESSAGES/libgsf.mo +0 -0
  156. data/vendor/local/share/locale/th/LC_MESSAGES/libgsf.mo +0 -0
  157. data/vendor/local/share/locale/tr/LC_MESSAGES/libgsf.mo +0 -0
  158. data/vendor/local/share/locale/uk/LC_MESSAGES/libgsf.mo +0 -0
  159. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/libgsf.mo +0 -0
  160. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/libgsf.mo +0 -0
  161. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/libgsf.mo +0 -0
  162. data/vendor/local/share/man/man1/gsf-office-thumbnailer.1 +71 -0
  163. data/vendor/local/share/man/man1/gsf-vba-dump.1 +61 -0
  164. data/vendor/local/share/man/man1/gsf.1 +91 -0
  165. data/vendor/local/share/thumbnailers/gsf-office.thumbnailer +4 -0
  166. metadata +235 -0
@@ -0,0 +1,340 @@
1
+ /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
+ /*
3
+ * gsf-utils.h:
4
+ *
5
+ * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
6
+ *
7
+ * This program is free software; you can redistribute it and/or
8
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
19
+ * USA
20
+ */
21
+
22
+ #ifndef GSF_UTILS_H
23
+ #define GSF_UTILS_H
24
+
25
+ #include <gsf/gsf-fwd.h>
26
+
27
+ G_BEGIN_DECLS
28
+
29
+ /* Do this the ugly way so that we don't have to worry about alignment */
30
+
31
+ /**
32
+ * GSF_LE_GET_GUINT8:
33
+ * @p: pointer to storage
34
+ *
35
+ * Interpret binary data as an unsigned 8-bit integer in little endian order.
36
+ *
37
+ * Returns: interpreted data
38
+ */
39
+ #define GSF_LE_GET_GUINT8(p) (*(guint8 const *)(p))
40
+
41
+ /**
42
+ * GSF_LE_GET_GUINT16:
43
+ * @p: pointer to storage
44
+ *
45
+ * Interpret binary data as an unsigned 16-bit integer in little endian order.
46
+ *
47
+ * Returns: interpreted data
48
+ */
49
+ #define GSF_LE_GET_GUINT16(p) \
50
+ (guint16)((((guint8 const *)(p))[0] << 0) | \
51
+ (((guint8 const *)(p))[1] << 8))
52
+
53
+ /**
54
+ * GSF_LE_GET_GUINT32:
55
+ * @p: pointer to storage
56
+ *
57
+ * Interpret binary data as an unsigned 32-bit integer in little endian order.
58
+ *
59
+ * Returns: interpreted data
60
+ */
61
+ #define GSF_LE_GET_GUINT32(p) \
62
+ (guint32)(((guint32)((guint8 const *)(p))[0] << 0) | \
63
+ ((guint32)((guint8 const *)(p))[1] << 8) | \
64
+ ((guint32)((guint8 const *)(p))[2] << 16) | \
65
+ ((guint32)((guint8 const *)(p))[3] << 24))
66
+
67
+ /**
68
+ * GSF_LE_GET_GUINT64:
69
+ * @p: pointer to storage
70
+ *
71
+ * Interpret binary data as an unsigned 64-bit integer in little endian order.
72
+ *
73
+ * Returns: interpreted data
74
+ */
75
+ #define GSF_LE_GET_GUINT64(p) (gsf_le_get_guint64 (p))
76
+
77
+ /**
78
+ * GSF_LE_GET_GINT8:
79
+ * @p: pointer to storage
80
+ *
81
+ * Interpret binary data as a signed 8-bit integer in little endian order.
82
+ *
83
+ * Returns: interpreted data
84
+ */
85
+ #define GSF_LE_GET_GINT8(p) ((gint8)GSF_LE_GET_GUINT8(p))
86
+
87
+ /**
88
+ * GSF_LE_GET_GINT16:
89
+ * @p: pointer to storage
90
+ *
91
+ * Interpret binary data as a signed 16-bit integer in little endian order.
92
+ *
93
+ * Returns: interpreted data
94
+ */
95
+ #define GSF_LE_GET_GINT16(p) ((gint16)GSF_LE_GET_GUINT16(p))
96
+
97
+ /**
98
+ * GSF_LE_GET_GINT32:
99
+ * @p: pointer to storage
100
+ *
101
+ * Interpret binary data as a signed 32-bit integer in little endian order.
102
+ *
103
+ * Returns: interpreted data
104
+ */
105
+ #define GSF_LE_GET_GINT32(p) ((gint32)GSF_LE_GET_GUINT32(p))
106
+
107
+ /**
108
+ * GSF_LE_GET_GINT64:
109
+ * @p: pointer to storage
110
+ *
111
+ * Interpret binary data as a signed 64-bit integer in little endian order.
112
+ *
113
+ * Returns: interpreted data
114
+ */
115
+ #define GSF_LE_GET_GINT64(p) ((gint64)GSF_LE_GET_GUINT64(p))
116
+
117
+ /**
118
+ * GSF_LE_GET_FLOAT:
119
+ * @p: pointer to storage
120
+ *
121
+ * Interpret binary data as a float in little endian order.
122
+ *
123
+ * Returns: interpreted data
124
+ */
125
+ #define GSF_LE_GET_FLOAT(p) (gsf_le_get_float (p))
126
+
127
+ /**
128
+ * GSF_LE_GET_DOUBLE:
129
+ * @p: pointer to storage
130
+ *
131
+ * Interpret binary data as a double in little endian order.
132
+ *
133
+ * Returns: interpreted data
134
+ */
135
+ #define GSF_LE_GET_DOUBLE(p) (gsf_le_get_double (p))
136
+
137
+ guint64 gsf_le_get_guint64 (void const *p);
138
+ float gsf_le_get_float (void const *p);
139
+ double gsf_le_get_double (void const *p);
140
+
141
+ /**
142
+ * GSF_LE_SET_GUINT8:
143
+ * @p: pointer to storage
144
+ * @dat: 8-bit unsigned integer
145
+ *
146
+ * Store @dat in little endian order in memory pointed to by @p.
147
+ */
148
+ #define GSF_LE_SET_GUINT8(p, dat) \
149
+ (*((guint8 *)(p)) = ((dat) & 0xff))
150
+
151
+ /**
152
+ * GSF_LE_SET_GUINT16:
153
+ * @p: pointer to storage
154
+ * @dat: 16-bit unsigned integer
155
+ *
156
+ * Store @dat in little endian order in memory pointed to by @p.
157
+ */
158
+ #define GSF_LE_SET_GUINT16(p, dat) \
159
+ ((*((guint8 *)(p) + 0) = (guint8)((guint16)(dat)) & 0xff), \
160
+ (*((guint8 *)(p) + 1) = (guint8)((guint16)(dat) >> 8) & 0xff))
161
+
162
+ /**
163
+ * GSF_LE_SET_GUINT32:
164
+ * @p: pointer to storage
165
+ * @dat: 32-bit unsigned integer
166
+ *
167
+ * Store @dat in little endian order in memory pointed to by @p.
168
+ */
169
+ #define GSF_LE_SET_GUINT32(p, dat) \
170
+ ((*((guint8 *)(p) + 0) = (guint8)((guint32)(dat)) & 0xff), \
171
+ (*((guint8 *)(p) + 1) = (guint8)((guint32)(dat) >> 8) & 0xff), \
172
+ (*((guint8 *)(p) + 2) = (guint8)((guint32)(dat) >> 16) & 0xff), \
173
+ (*((guint8 *)(p) + 3) = (guint8)((guint32)(dat) >> 24) & 0xff))
174
+
175
+ /**
176
+ * GSF_LE_SET_GUINT64:
177
+ * @p: pointer to storage
178
+ * @dat: 64-bit unsigned integer
179
+ *
180
+ * Store @dat in little endian order in memory pointed to by @p.
181
+ */
182
+ #define GSF_LE_SET_GUINT64(p, dat) \
183
+ ((*((guint8 *)(p) + 0) = (guint8)((guint64)(dat)) & 0xff), \
184
+ (*((guint8 *)(p) + 1) = (guint8)((guint64)(dat) >> 8) & 0xff), \
185
+ (*((guint8 *)(p) + 2) = (guint8)((guint64)(dat) >> 16) & 0xff), \
186
+ (*((guint8 *)(p) + 3) = (guint8)((guint64)(dat) >> 24) & 0xff), \
187
+ (*((guint8 *)(p) + 4) = (guint8)((guint64)(dat) >> 32) & 0xff), \
188
+ (*((guint8 *)(p) + 5) = (guint8)((guint64)(dat) >> 40) & 0xff), \
189
+ (*((guint8 *)(p) + 6) = (guint8)((guint64)(dat) >> 48) & 0xff), \
190
+ (*((guint8 *)(p) + 7) = (guint8)((guint64)(dat) >> 56) & 0xff))
191
+
192
+ /**
193
+ * GSF_LE_SET_GINT8:
194
+ * @p: pointer to storage
195
+ * @dat: 8-bit signed integer
196
+ *
197
+ * Store @dat in little endian order in memory pointed to by @p.
198
+ */
199
+ #define GSF_LE_SET_GINT8(p,dat) GSF_LE_SET_GUINT8((p),(dat))
200
+
201
+ /**
202
+ * GSF_LE_SET_GINT16:
203
+ * @p: pointer to storage
204
+ * @dat: 16-bit signed integer
205
+ *
206
+ * Store @dat in little endian order in memory pointed to by @p.
207
+ */
208
+ #define GSF_LE_SET_GINT16(p,dat) GSF_LE_SET_GUINT16((p),(dat))
209
+
210
+ /**
211
+ * GSF_LE_SET_GINT32:
212
+ * @p: pointer to storage
213
+ * @dat: 32-bit signed integer
214
+ *
215
+ * Store @dat in little endian order in memory pointed to by @p.
216
+ */
217
+ #define GSF_LE_SET_GINT32(p,dat) GSF_LE_SET_GUINT32((p),(dat))
218
+
219
+ /**
220
+ * GSF_LE_SET_GINT64:
221
+ * @p: pointer to storage
222
+ * @dat: 64-bit signed integer
223
+ *
224
+ * Store @dat in little endian order in memory pointed to by @p.
225
+ */
226
+ #define GSF_LE_SET_GINT64(p,dat) GSF_LE_SET_GUINT64((p),(dat))
227
+
228
+ /**
229
+ * GSF_LE_SET_FLOAT:
230
+ * @p: pointer to storage
231
+ * @dat: float to be stored
232
+ *
233
+ * Store @dat in little endian order in memory pointed to by @p.
234
+ */
235
+ #define GSF_LE_SET_FLOAT(p,dat) gsf_le_set_float((p),(dat))
236
+
237
+ /**
238
+ * GSF_LE_SET_DOUBLE:
239
+ * @p: pointer to storage
240
+ * @dat: double to be stored
241
+ *
242
+ * Store @dat in little endian order in memory pointed to by @p.
243
+ */
244
+ #define GSF_LE_SET_DOUBLE(p,dat) gsf_le_set_double((p),(dat))
245
+
246
+ void gsf_le_set_float (void *p, float f);
247
+ void gsf_le_set_double (void *p, double d);
248
+
249
+ void gsf_init (void);
250
+ void gsf_shutdown (void);
251
+ void gsf_init_dynamic (GTypeModule *module);
252
+ void gsf_shutdown_dynamic (GTypeModule *module);
253
+ gboolean gsf_debug_flag (const char *flag);
254
+
255
+ /* Debugging utilities */
256
+ void gsf_mem_dump (guint8 const *ptr, size_t len);
257
+ void gsf_input_dump (GsfInput *input, gboolean dump_as_hex);
258
+
259
+ /* base64 encoding utilities */
260
+ guint8 *gsf_base64_encode_simple (guint8 const *data, size_t len);
261
+ size_t gsf_base64_encode_close (guint8 const *in, size_t inlen,
262
+ gboolean break_lines, guint8 *out,
263
+ int *state, guint *save);
264
+ size_t gsf_base64_encode_step (guint8 const *in, size_t len,
265
+ gboolean break_lines, guint8 *out,
266
+ int *state, guint *save);
267
+
268
+ size_t gsf_base64_decode_simple (guint8 *data, size_t len);
269
+ size_t gsf_base64_decode_step (guint8 const *in, size_t len,
270
+ guint8 *out, int *state, guint *save);
271
+
272
+
273
+ /* For putting filenames into error messages. */
274
+ char *gsf_filename_to_utf8 (char const *filename, gboolean quoted);
275
+
276
+ /* Some version checking */
277
+
278
+ /**
279
+ * libgsf_major_version:
280
+ *
281
+ * Major version number of libgsf, indicating the ABI version.
282
+ */
283
+ extern int libgsf_major_version;
284
+
285
+ /**
286
+ * libgsf_minor_version:
287
+ *
288
+ * Minor (secondary) version number of libgsf, indicating the API version.
289
+ */
290
+ extern int libgsf_minor_version;
291
+
292
+ /**
293
+ * libgsf_micro_version:
294
+ *
295
+ * Micro (tertiary) version number of libgsf, indicating bug fixes.
296
+ */
297
+ extern int libgsf_micro_version;
298
+
299
+ char const *gsf_extension_pointer (char const * path);
300
+ void gsf_iconv_close (GIConv handle);
301
+
302
+ void gsf_property_settings_collect_valist (GType object_type,
303
+ GParameter **p_params,
304
+ size_t *p_n_params,
305
+ const gchar *first_property_name,
306
+ va_list var_args);
307
+ void gsf_property_settings_collect (GType object_type,
308
+ GParameter **p_params,
309
+ size_t *p_n_params,
310
+ const gchar *first_property_name,
311
+ ...);
312
+ const GParameter *gsf_property_settings_find (const char *name,
313
+ const GParameter *params,
314
+ size_t n_params);
315
+ void gsf_property_settings_free (GParameter *params,
316
+ size_t n_params);
317
+
318
+
319
+
320
+ /* Errors */
321
+
322
+ #define GSF_ERROR (gsf_error_quark ())
323
+
324
+ /**
325
+ * GsfError:
326
+ * @GSF_ERROR_OUT_OF_MEMORY: Memory allocation failed
327
+ * @GSF_ERROR_INVALID_DATA: Invalid data encountered (e.g. not enough data)
328
+ */
329
+
330
+ typedef enum {
331
+ GSF_ERROR_OUT_OF_MEMORY,
332
+ GSF_ERROR_INVALID_DATA
333
+ } GsfError;
334
+
335
+ GQuark gsf_error_quark (void);
336
+
337
+
338
+ G_END_DECLS
339
+
340
+ #endif /* GSF_UTILS_H */
@@ -0,0 +1,98 @@
1
+ /*
2
+ * gsf.h:
3
+ *
4
+ * Copyright (C) 2002-2006 Jody Goldberg (jody@gnome.org)
5
+ * Copyright (C) 2013 Morten Welinder (terra@gnome.org)
6
+ *
7
+ * This program is free software; you can redistribute it and/or
8
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
19
+ * USA
20
+ */
21
+
22
+ /*
23
+ * Rules for header inclusion:
24
+ *
25
+ * 1. Applications should include gsf/gsf.h only and require libgsf 1.14.26
26
+ * Prior to 1.14.26 the practice was to include specific headers. That
27
+ * still ought to work, but is deprecated.
28
+ *
29
+ * 2. gsf/gsf-foo.c should include <gsf-config.h>, then <gsf/gsf-foo.h>,
30
+ * then <gsf/gsf.h>. No further gsf headers should be needed.
31
+ *
32
+ * 3. gsf/gsf-foo.h should include <gsf/gsf-fwd.h>. It must not include
33
+ * <gsf/gsf.h> or <gsf-config.h> (which isn't even installed). If
34
+ * a super-class is needed, include also the header for that class.
35
+ * For convenience, classes derived from Gsf{In,Out}{put,file} should
36
+ * include the relevant header too.
37
+ *
38
+ * 4. Rules 2 and 3 do not apply to headers that are not installed.
39
+ */
40
+
41
+ #ifndef GSF_H
42
+ #define GSF_H
43
+
44
+ #include <glib.h>
45
+
46
+ #include <gsf/gsf-fwd.h>
47
+
48
+ #include <gsf/gsf-input.h>
49
+ #include <gsf/gsf-output.h>
50
+ #include <gsf/gsf-infile.h>
51
+ #include <gsf/gsf-outfile.h>
52
+
53
+ #include <gsf/gsf-impl-utils.h>
54
+ #include <gsf/gsf-input-impl.h>
55
+ #include <gsf/gsf-infile-impl.h>
56
+ #include <gsf/gsf-output-impl.h>
57
+ #include <gsf/gsf-outfile-impl.h>
58
+
59
+ #include <gsf/gsf-libxml.h>
60
+
61
+ #include <gsf/gsf-blob.h>
62
+ #include <gsf/gsf-clip-data.h>
63
+ #include <gsf/gsf-doc-meta-data.h>
64
+ #include <gsf/gsf-docprop-vector.h>
65
+ #include <gsf/gsf-infile-msole.h>
66
+ #include <gsf/gsf-infile-msvba.h>
67
+ #include <gsf/gsf-infile-stdio.h>
68
+ #include <gsf/gsf-infile-zip.h>
69
+ #include <gsf/gsf-input-bzip.h>
70
+ #include <gsf/gsf-input-gio.h>
71
+ #include <gsf/gsf-input-gzip.h>
72
+ #include <gsf/gsf-input-http.h>
73
+ #include <gsf/gsf-input-memory.h>
74
+ #include <gsf/gsf-input-proxy.h>
75
+ #include <gsf/gsf-input-stdio.h>
76
+ #include <gsf/gsf-infile-tar.h>
77
+ #include <gsf/gsf-input-textline.h>
78
+ #include <gsf/gsf-meta-names.h>
79
+ #include <gsf/gsf-msole-utils.h>
80
+ #include <gsf/gsf-opendoc-utils.h>
81
+ #include <gsf/gsf-open-pkg-utils.h>
82
+ #include <gsf/gsf-outfile-msole.h>
83
+ #include <gsf/gsf-outfile-stdio.h>
84
+ #include <gsf/gsf-outfile-zip.h>
85
+ #include <gsf/gsf-output-bzip.h>
86
+ #include <gsf/gsf-output-csv.h>
87
+ #include <gsf/gsf-output-gio.h>
88
+ #include <gsf/gsf-output-gzip.h>
89
+ #include <gsf/gsf-output-iconv.h>
90
+ #include <gsf/gsf-output-iochannel.h>
91
+ #include <gsf/gsf-output-memory.h>
92
+ #include <gsf/gsf-output-stdio.h>
93
+ #include <gsf/gsf-shared-memory.h>
94
+ #include <gsf/gsf-structured-blob.h>
95
+ #include <gsf/gsf-timestamp.h>
96
+ #include <gsf/gsf-utils.h>
97
+
98
+ #endif /* GSF_H */
@@ -0,0 +1,41 @@
1
+ /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
+ /*
3
+ * gsf-input-win32.h:
4
+ *
5
+ * Copyright (C) 2003 Dom Lachowicz <cinamod@hotmail.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or
8
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
19
+ * USA
20
+ */
21
+
22
+ #ifndef GSF_INPUT_WIN32_H
23
+ #define GSF_INPUT_WIN32_H
24
+
25
+ #include <gsf/gsf-input.h>
26
+ #include <windows.h>
27
+
28
+ G_BEGIN_DECLS
29
+
30
+ #define GSF_INPUT_ISTREAM_TYPE (gsf_input_istream_get_type ())
31
+ #define GSF_INPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_INPUT_ISTREAM_TYPE, GsfInputIStream))
32
+ #define GSF_IS_INPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_INPUT_ISTREAM_TYPE))
33
+
34
+ typedef struct _GsfInputIStream GsfInputIStream;
35
+
36
+ GType gsf_input_istream_get_type (void);
37
+ GsfInput *gsf_input_istream_new (IStream * stream, GError **err);
38
+
39
+ G_END_DECLS
40
+
41
+ #endif /* GSF_INPUT_ISTREAM_H */
@@ -0,0 +1,41 @@
1
+ /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
+ /*
3
+ * gsf-outut-win32.h:
4
+ *
5
+ * Copyright (C) 2003 Dom Lachowicz <cinamod@hotmail.com>
6
+ *
7
+ * This program is free software; you can redistribute it and/or
8
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
19
+ * USA
20
+ */
21
+
22
+ #ifndef GSF_OUTPUT_WIN32_H
23
+ #define GSF_OUTPUT_WIN32_H
24
+
25
+ #include <gsf/gsf-output.h>
26
+ #include <windows.h>
27
+
28
+ G_BEGIN_DECLS
29
+
30
+ #define GSF_OUTPUT_ISTREAM_TYPE (gsf_output_istream_get_type ())
31
+ #define GSF_OUTPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_OUTPUT_ISTREAM_TYPE, GsfOutputIStream))
32
+ #define GSF_IS_OUTPUT_ISTREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_OUTPUT_ISTREAM_TYPE))
33
+
34
+ typedef struct _GsfOutputIStream GsfOutputIStream;
35
+
36
+ GType gsf_output_istream_get_type (void);
37
+ GsfOutput *gsf_output_istream_new (IStream * stream);
38
+
39
+ G_END_DECLS
40
+
41
+ #endif /* GSF_OUTPUT_ISTREAM_H */
Binary file
Binary file
@@ -0,0 +1,41 @@
1
+ # libgsf-1.la - a libtool library file
2
+ # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname='../bin/libgsf-1-114.dll'
9
+
10
+ # Names of this library.
11
+ library_names='libgsf-1.dll.a'
12
+
13
+ # The name of the static archive.
14
+ old_library='libgsf-1.a'
15
+
16
+ # Linker flags that can not go in dependency_libs.
17
+ inherited_linker_flags=' -pthread'
18
+
19
+ # Libraries that this one depends upon.
20
+ dependency_libs=' -R/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib -L/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib -L/home/vagrant/rcairo.win64/vendor/local/lib -L/home/vagrant/ruby-gnome2.win64/gsf/vendor/local/lib /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgio-2.0.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgmodule-2.0.la -ldnsapi -liphlpapi /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgobject-2.0.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libffi.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libglib-2.0.la -lole32 -lwinmm -lshlwapi /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libpcre.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libintl.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libiconv.la /home/vagrant/rcairo.win64/vendor/local/lib/libxml2.la -lws2_32 -lz'
21
+
22
+ # Names of additional weak libraries provided by this library
23
+ weak_library_names=''
24
+
25
+ # Version information for libgsf-1.
26
+ current=114
27
+ age=0
28
+ revision=39
29
+
30
+ # Is this an already installed library?
31
+ installed=yes
32
+
33
+ # Should we warn about portability when linking against -modules?
34
+ shouldnotlink=no
35
+
36
+ # Files to dlopen/dlpreopen
37
+ dlopen=''
38
+ dlpreopen=''
39
+
40
+ # Directory that this library needs to be installed in:
41
+ libdir='/home/vagrant/ruby-gnome2.win64/gsf/vendor/local/lib'
Binary file
@@ -0,0 +1,41 @@
1
+ # libgsf-win32-1.la - a libtool library file
2
+ # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname='../bin/libgsf-win32-1-114.dll'
9
+
10
+ # Names of this library.
11
+ library_names='libgsf-win32-1.dll.a'
12
+
13
+ # The name of the static archive.
14
+ old_library='libgsf-win32-1.a'
15
+
16
+ # Linker flags that can not go in dependency_libs.
17
+ inherited_linker_flags=' -pthread'
18
+
19
+ # Libraries that this one depends upon.
20
+ dependency_libs=' -R/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib -L/home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib -L/home/vagrant/rcairo.win64/vendor/local/lib -L/home/vagrant/ruby-gnome2.win64/gsf/vendor/local/lib /home/vagrant/ruby-gnome2.win64/gsf/vendor/local/lib/libgsf-1.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgio-2.0.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgmodule-2.0.la -ldnsapi -liphlpapi /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libgobject-2.0.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libffi.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libglib-2.0.la -lole32 -lwinmm -lshlwapi /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libpcre.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libintl.la /home/vagrant/ruby-gnome2.win64/glib2/vendor/local/lib/libiconv.la /home/vagrant/rcairo.win64/vendor/local/lib/libxml2.la -lws2_32 -lz'
21
+
22
+ # Names of additional weak libraries provided by this library
23
+ weak_library_names=''
24
+
25
+ # Version information for libgsf-win32-1.
26
+ current=114
27
+ age=0
28
+ revision=39
29
+
30
+ # Is this an already installed library?
31
+ installed=yes
32
+
33
+ # Should we warn about portability when linking against -modules?
34
+ shouldnotlink=no
35
+
36
+ # Files to dlopen/dlpreopen
37
+ dlopen=''
38
+ dlpreopen=''
39
+
40
+ # Directory that this library needs to be installed in:
41
+ libdir='/home/vagrant/ruby-gnome2.win64/gsf/vendor/local/lib'
@@ -0,0 +1,11 @@
1
+ prefix=/home/vagrant/ruby-gnome2.win64/gsf/vendor/local
2
+ exec_prefix=${prefix}
3
+ libdir=${exec_prefix}/lib
4
+ includedir=${prefix}/include
5
+
6
+ Name: libgsf-1
7
+ Description: A library for reading and writing structured files (eg MS OLE and Zip)
8
+ Version: 1.14.39
9
+ Requires: glib-2.0 gobject-2.0 libxml-2.0
10
+ Libs: -L${libdir} -lgsf-1
11
+ Cflags: -I${includedir}/libgsf-1
@@ -0,0 +1,11 @@
1
+ prefix=/home/vagrant/ruby-gnome2.win64/gsf/vendor/local
2
+ exec_prefix=${prefix}
3
+ libdir=${exec_prefix}/lib
4
+ includedir=${prefix}/include
5
+
6
+ Name: libgsf-gnome-1
7
+ Description: Win32 specific extensions to libgsf
8
+ Version: 1.14.39
9
+ Requires: libgsf-1
10
+ Libs: -L${libdir} -lgsf-win32-1
11
+ Cflags: