aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore259
-rw-r--r--ABOUT-NLS1102
-rw-r--r--ChangeLog46
-rw-r--r--Makefile.am11
-rw-r--r--README13
-rw-r--r--configure.ac59
-rw-r--r--m4/Makefile.am2
-rw-r--r--m4/gettext.m472
-rw-r--r--m4/glib-2.0.m465
-rw-r--r--m4/host-cpu-c-abi.m4675
-rw-r--r--m4/iconv.m4245
-rw-r--r--m4/intlmacosx.m465
-rw-r--r--m4/lib-ld.m4163
-rw-r--r--m4/lib-link.m4169
-rw-r--r--m4/lib-prefix.m4238
-rw-r--r--m4/nls.m410
-rw-r--r--m4/po.m463
-rw-r--r--m4/progtest.m48
-rw-r--r--po/ChangeLog9
-rw-r--r--po/Makefile.in.in221
-rw-r--r--po/Makevars32
-rw-r--r--po/Makevars.template41
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/Rules-quot19
-rw-r--r--po/da.po4
-rw-r--r--po/de.po4
-rw-r--r--po/en@boldquot.header2
-rw-r--r--po/en@quot.header2
-rw-r--r--po/es.po4
-rw-r--r--po/fr.po4
-rw-r--r--po/ga.po4
-rw-r--r--po/insert-header.sin5
-rw-r--r--po/it.po4
-rw-r--r--po/libextractor.pot4
-rw-r--r--po/nl.po4
-rw-r--r--po/pl.po4
-rw-r--r--po/pt_BR.po4
-rw-r--r--po/remove-potcdate.sin8
-rw-r--r--po/ro.po1995
-rw-r--r--po/rw.po4
-rw-r--r--po/sr.po8
-rw-r--r--po/sv.po4
-rw-r--r--po/uk.po8
-rw-r--r--po/vi.po4
-rw-r--r--src/include/Makefile.am5
-rw-r--r--src/include/extractor.h10
-rw-r--r--src/include/platform.h2
-rw-r--r--src/include/plibc.h1092
-rw-r--r--src/main/extract.c70
-rw-r--r--src/main/extractor.c3
-rw-r--r--src/main/extractor_datasource.c18
-rw-r--r--src/main/extractor_ipc_gnu.c3
-rw-r--r--src/main/extractor_ipc_w32.c2
-rw-r--r--src/main/extractor_plugin_main.c1
-rw-r--r--src/main/extractor_plugins.h1
-rw-r--r--src/main/extractor_plugpath.c17
-rw-r--r--src/main/test_bzip2.c11
-rw-r--r--src/main/test_file.c14
-rw-r--r--src/main/test_gzip.c11
-rw-r--r--src/main/test_ipc.c2
-rw-r--r--src/main/test_plugin_load_multi.c2
-rw-r--r--src/main/test_plugin_loading.c2
-rw-r--r--src/main/test_trivial.c2
-rw-r--r--src/plugins/Makefile.am83
-rw-r--r--src/plugins/elf_extractor.c (renamed from src/plugins/old/elf_extractor.c)460
-rw-r--r--src/plugins/exiv2_extractor.cc117
-rwxr-xr-xsrc/plugins/fuzz_default.sh14
-rw-r--r--src/plugins/gif_extractor.c6
-rw-r--r--src/plugins/old/ebml_extractor.c6
-rw-r--r--src/plugins/old/real_extractor.c439
-rw-r--r--src/plugins/pack.c (renamed from src/plugins/old/pack.c)0
-rw-r--r--src/plugins/pack.h (renamed from src/plugins/old/pack.h)0
-rw-r--r--src/plugins/previewopus_extractor.c1221
-rw-r--r--src/plugins/real_extractor.c579
-rw-r--r--src/plugins/riff_extractor.c2
-rw-r--r--src/plugins/rpm_extractor.c14
-rw-r--r--src/plugins/test-vlc.c223
-rw-r--r--src/plugins/test_elf.c (renamed from src/plugins/test_thumbnailffmpeg.c)50
-rw-r--r--src/plugins/test_lib.c49
-rw-r--r--src/plugins/test_previewopus.c52
-rw-r--r--src/plugins/test_real.c104
-rw-r--r--src/plugins/testdata/audiosig.rmbin0 -> 9616 bytes
-rwxr-xr-xsrc/plugins/testdata/chello-elfbin0 -> 2984 bytes
-rw-r--r--src/plugins/testdata/ra3.rabin0 -> 1066 bytes
-rw-r--r--src/plugins/thumbnailffmpeg_extractor.c890
-rw-r--r--src/plugins/vlc_extractor.c352
86 files changed, 4249 insertions, 7348 deletions
diff --git a/.gitignore b/.gitignore
index e508732..d0c5a1b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,4 @@
1On branch master 1**/*~
2Your branch is up-to-date with 'origin/master'.
3Untracked files:
4 (use "git add <file>..." to include in what will be committed)
5
6INSTALL 2INSTALL
7Makefile 3Makefile
8Makefile.in 4Makefile.in
@@ -72,290 +68,61 @@ src/main/extract.o
72src/main/getopt.o 68src/main/getopt.o
73src/main/getopt1.o 69src/main/getopt1.o
74src/main/libextractor.la 70src/main/libextractor.la
75src/main/libextractor_la-extractor.lo 71src/main/*.o
76src/main/libextractor_la-extractor.o 72src/main/*.lo
77src/main/libextractor_la-extractor_common.lo 73src/main/*.la
78src/main/libextractor_la-extractor_common.o 74src/main/*.trs
79src/main/libextractor_la-extractor_datasource.lo 75src/main/*.log
80src/main/libextractor_la-extractor_datasource.o
81src/main/libextractor_la-extractor_ipc.lo
82src/main/libextractor_la-extractor_ipc.o
83src/main/libextractor_la-extractor_ipc_gnu.lo
84src/main/libextractor_la-extractor_ipc_gnu.o
85src/main/libextractor_la-extractor_logging.lo
86src/main/libextractor_la-extractor_logging.o
87src/main/libextractor_la-extractor_metatypes.lo
88src/main/libextractor_la-extractor_metatypes.o
89src/main/libextractor_la-extractor_plugin_main.lo
90src/main/libextractor_la-extractor_plugin_main.o
91src/main/libextractor_la-extractor_plugins.lo
92src/main/libextractor_la-extractor_plugins.o
93src/main/libextractor_la-extractor_plugpath.lo
94src/main/libextractor_la-extractor_plugpath.o
95src/main/libextractor_la-extractor_print.lo
96src/main/libextractor_la-extractor_print.o
97src/main/libextractor_test.la
98src/main/libextractor_test2.la
99src/main/test-suite.log
100src/main/test2_extractor.lo
101src/main/test2_extractor.o
102src/main/test_bzip2 76src/main/test_bzip2
103src/main/test_bzip2.log
104src/main/test_bzip2.o
105src/main/test_bzip2.trs
106src/main/test_extractor.lo
107src/main/test_extractor.o
108src/main/test_file 77src/main/test_file
109src/main/test_file.log
110src/main/test_file.o
111src/main/test_file.trs
112src/main/test_gzip 78src/main/test_gzip
113src/main/test_gzip.log
114src/main/test_gzip.o
115src/main/test_gzip.trs
116src/main/test_ipc 79src/main/test_ipc
117src/main/test_ipc.log
118src/main/test_ipc.o
119src/main/test_ipc.trs
120src/main/test_plugin_load_multi 80src/main/test_plugin_load_multi
121src/main/test_plugin_load_multi.log
122src/main/test_plugin_load_multi.o
123src/main/test_plugin_load_multi.trs
124src/main/test_plugin_loading 81src/main/test_plugin_loading
125src/main/test_plugin_loading.log
126src/main/test_plugin_loading.o
127src/main/test_plugin_loading.trs
128src/main/test_trivial 82src/main/test_trivial
129src/main/test_trivial.log
130src/main/test_trivial.o
131src/main/test_trivial.trs
132src/plugins/.deps/ 83src/plugins/.deps/
133src/plugins/.libs/ 84src/plugins/.libs/
134src/plugins/Makefile 85src/plugins/Makefile
135src/plugins/Makefile.in 86src/plugins/Makefile.in
136src/plugins/archive_extractor.lo 87src/plugins/*.o
137src/plugins/archive_extractor.o 88src/plugins/*.lo
138src/plugins/deb_extractor.lo 89src/plugins/*.la
139src/plugins/deb_extractor.o 90src/plugins/*.log
140src/plugins/dvi_extractor.lo 91src/plugins/*.trs
141src/plugins/dvi_extractor.o
142src/plugins/exiv2_extractor.lo
143src/plugins/exiv2_extractor.o
144src/plugins/flac_extractor.lo
145src/plugins/flac_extractor.o
146src/plugins/gif_extractor.lo
147src/plugins/gif_extractor.o
148src/plugins/html_extractor.lo
149src/plugins/html_extractor.o
150src/plugins/it_extractor.lo
151src/plugins/it_extractor.o
152src/plugins/jpeg_extractor.lo
153src/plugins/jpeg_extractor.o
154src/plugins/thumbnailffmpeg_extractor.lo
155src/plugins/thumbnailffmpeg_extractor.o
156src/plugins/libextractor_archive.la
157src/plugins/libextractor_deb.la
158src/plugins/libextractor_dvi.la
159src/plugins/libextractor_exiv2.la
160src/plugins/libextractor_flac.la
161src/plugins/libextractor_gif.la
162src/plugins/libextractor_gstreamer.la
163src/plugins/libextractor_thumbnailffmpeg.la
164src/plugins/libextractor_gstreamer_la-gstreamer_extractor.lo
165src/plugins/libextractor_gstreamer_la-gstreamer_extractor.o
166src/plugins/libextractor_html.la
167src/plugins/libextractor_it.la
168src/plugins/libextractor_jpeg.la
169src/plugins/libextractor_man.la
170src/plugins/libextractor_midi.la
171src/plugins/libextractor_midi_la-midi_extractor.lo
172src/plugins/libextractor_midi_la-midi_extractor.o
173src/plugins/libextractor_mime.la
174src/plugins/libextractor_mpeg.la
175src/plugins/libextractor_nsf.la
176src/plugins/libextractor_nsfe.la
177src/plugins/libextractor_odf.la
178src/plugins/libextractor_ogg.la
179src/plugins/libextractor_ole2.la
180src/plugins/libextractor_ole2_la-ole2_extractor.lo
181src/plugins/libextractor_ole2_la-ole2_extractor.o
182src/plugins/libextractor_pdf.la
183src/plugins/libextractor_png.la
184src/plugins/libextractor_ps.la
185src/plugins/libextractor_riff.la
186src/plugins/libextractor_rpm.la
187src/plugins/libextractor_s3m.la
188src/plugins/libextractor_sid.la
189src/plugins/libextractor_thumbnailgtk.la
190src/plugins/libextractor_thumbnailgtk_la-thumbnailgtk_extractor.lo
191src/plugins/libextractor_thumbnailgtk_la-thumbnailgtk_extractor.o
192src/plugins/libextractor_tiff.la
193src/plugins/libextractor_wav.la
194src/plugins/libextractor_xm.la
195src/plugins/libextractor_zip.la
196src/plugins/libtest.la
197src/plugins/man_extractor.lo
198src/plugins/man_extractor.o
199src/plugins/mime_extractor.lo
200src/plugins/mime_extractor.o
201src/plugins/mpeg_extractor.lo
202src/plugins/mpeg_extractor.o
203src/plugins/nsf_extractor.lo
204src/plugins/nsf_extractor.o
205src/plugins/nsfe_extractor.lo
206src/plugins/nsfe_extractor.o
207src/plugins/odf_extractor.lo
208src/plugins/odf_extractor.o
209src/plugins/ogg_extractor.lo
210src/plugins/ogg_extractor.o
211src/plugins/pdf_extractor.lo
212src/plugins/pdf_extractor.o
213src/plugins/png_extractor.lo
214src/plugins/png_extractor.o
215src/plugins/ps_extractor.lo
216src/plugins/ps_extractor.o
217src/plugins/riff_extractor.lo
218src/plugins/riff_extractor.o
219src/plugins/rpm_extractor.lo
220src/plugins/rpm_extractor.o
221src/plugins/s3m_extractor.lo
222src/plugins/s3m_extractor.o
223src/plugins/sid_extractor.lo
224src/plugins/sid_extractor.o
225src/plugins/test-suite.log 92src/plugins/test-suite.log
226src/plugins/test_archive 93src/plugins/test_archive
227src/plugins/test_archive.log
228src/plugins/test_archive.o
229src/plugins/test_archive.trs
230src/plugins/test_deb 94src/plugins/test_deb
231src/plugins/test_deb.log
232src/plugins/test_deb.o
233src/plugins/test_deb.trs
234src/plugins/test_dvi 95src/plugins/test_dvi
235src/plugins/test_dvi.log 96src/plugins/test_elf
236src/plugins/test_dvi.o
237src/plugins/test_dvi.trs
238src/plugins/test_exiv2 97src/plugins/test_exiv2
239src/plugins/test_exiv2.log
240src/plugins/test_exiv2.o
241src/plugins/test_exiv2.trs
242src/plugins/test_flac 98src/plugins/test_flac
243src/plugins/test_flac.log
244src/plugins/test_flac.o
245src/plugins/test_flac.trs
246src/plugins/test_gif 99src/plugins/test_gif
247src/plugins/test_gif.log
248src/plugins/test_gif.o
249src/plugins/test_gif.trs
250src/plugins/test_gstreamer 100src/plugins/test_gstreamer
251src/plugins/test_gstreamer-test_gstreamer.o
252src/plugins/test_gstreamer.log
253src/plugins/test_gstreamer.trs
254src/plugins/test_html 101src/plugins/test_html
255src/plugins/test_html.log
256src/plugins/test_html.o
257src/plugins/test_html.trs
258src/plugins/test_it 102src/plugins/test_it
259src/plugins/test_it.log
260src/plugins/test_it.o
261src/plugins/test_it.trs
262src/plugins/test_jpeg 103src/plugins/test_jpeg
263src/plugins/test_jpeg.log
264src/plugins/test_jpeg.o
265src/plugins/test_jpeg.trs
266src/plugins/test_lib.lo
267src/plugins/test_lib.o
268src/plugins/test_man 104src/plugins/test_man
269src/plugins/test_man.log
270src/plugins/test_man.o
271src/plugins/test_man.trs
272src/plugins/test_midi 105src/plugins/test_midi
273src/plugins/test_midi.log
274src/plugins/test_midi.o
275src/plugins/test_midi.trs
276src/plugins/test_mime 106src/plugins/test_mime
277src/plugins/test_mime.log
278src/plugins/test_mime.o
279src/plugins/test_mime.trs
280src/plugins/test_mpeg 107src/plugins/test_mpeg
281src/plugins/test_mpeg.log
282src/plugins/test_mpeg.o
283src/plugins/test_mpeg.trs
284src/plugins/test_nsf 108src/plugins/test_nsf
285src/plugins/test_nsf.log
286src/plugins/test_nsf.o
287src/plugins/test_nsf.trs
288src/plugins/test_nsfe 109src/plugins/test_nsfe
289src/plugins/test_nsfe.log
290src/plugins/test_nsfe.o
291src/plugins/test_nsfe.trs
292src/plugins/test_odf 110src/plugins/test_odf
293src/plugins/test_odf.log
294src/plugins/test_odf.o
295src/plugins/test_odf.trs
296src/plugins/test_ogg 111src/plugins/test_ogg
297src/plugins/test_ogg.log
298src/plugins/test_ogg.o
299src/plugins/test_ogg.trs
300src/plugins/test_ole2 112src/plugins/test_ole2
301src/plugins/test_ole2.log
302src/plugins/test_ole2.o
303src/plugins/test_ole2.trs
304src/plugins/test_png 113src/plugins/test_png
305src/plugins/test_png.log
306src/plugins/test_png.o
307src/plugins/test_png.trs
308src/plugins/test_ps 114src/plugins/test_ps
309src/plugins/test_ps.log 115src/plugins/test_real
310src/plugins/test_ps.o
311src/plugins/test_ps.trs
312src/plugins/test_riff 116src/plugins/test_riff
313src/plugins/test_riff.log
314src/plugins/test_riff.o
315src/plugins/test_riff.trs
316src/plugins/test_rpm 117src/plugins/test_rpm
317src/plugins/test_rpm.log
318src/plugins/test_rpm.o
319src/plugins/test_rpm.trs
320src/plugins/test_s3m 118src/plugins/test_s3m
321src/plugins/test_s3m.log
322src/plugins/test_s3m.o
323src/plugins/test_s3m.trs
324src/plugins/test_sid 119src/plugins/test_sid
325src/plugins/test_sid.log
326src/plugins/test_sid.o
327src/plugins/test_sid.trs
328src/plugins/test_thumbnailgtk 120src/plugins/test_thumbnailgtk
329src/plugins/test_thumbnailgtk.log
330src/plugins/test_thumbnailgtk.o
331src/plugins/test_thumbnailgtk.trs
332src/plugins/test_tiff 121src/plugins/test_tiff
333src/plugins/test_tiff.log
334src/plugins/test_tiff.o
335src/plugins/test_tiff.trs
336src/plugins/test_wav 122src/plugins/test_wav
337src/plugins/test_wav.log
338src/plugins/test_wav.o
339src/plugins/test_wav.trs
340src/plugins/test_xm 123src/plugins/test_xm
341src/plugins/test_xm.log
342src/plugins/test_xm.o
343src/plugins/test_xm.trs
344src/plugins/test_zip 124src/plugins/test_zip
345src/plugins/test_zip.log
346src/plugins/test_zip.o
347src/plugins/test_zip.trs
348src/plugins/tiff_extractor.lo
349src/plugins/tiff_extractor.o
350src/plugins/wav_extractor.lo
351src/plugins/wav_extractor.o
352src/plugins/xm_extractor.lo
353src/plugins/xm_extractor.o
354src/plugins/zip_extractor.lo
355src/plugins/zip_extractor.o
356stamp-h1 125stamp-h1
357test-driver 126test-driver
358
359nothing added to commit but untracked files present (use "git add" to track)
360src/plugins/test_thumbnailffmpeg 127src/plugins/test_thumbnailffmpeg
361build-aux/ 128build-aux/
diff --git a/ABOUT-NLS b/ABOUT-NLS
index ec20977..0a9d56d 100644
--- a/ABOUT-NLS
+++ b/ABOUT-NLS
@@ -1,1101 +1 @@
11 Notes on the Free Translation Project <https://www.gnu.org/software/gettext/manual/html_node/Users.html>
2***************************************
3
4Free software is going international! The Free Translation Project is
5a way to get maintainers of free software, translators, and users all
6together, so that free software will gradually become able to speak many
7languages. A few packages already provide translations for their
8messages.
9
10 If you found this `ABOUT-NLS' file inside a distribution, you may
11assume that the distributed package does use GNU `gettext' internally,
12itself available at your nearest GNU archive site. But you do _not_
13need to install GNU `gettext' prior to configuring, installing or using
14this package with messages translated.
15
16 Installers will find here some useful hints. These notes also
17explain how users should proceed for getting the programs to use the
18available translations. They tell how people wanting to contribute and
19work on translations can contact the appropriate team.
20
21 When reporting bugs in the `intl/' directory or bugs which may be
22related to internationalization, you should tell about the version of
23`gettext' which is used. The information can be found in the
24`intl/VERSION' file, in internationalized packages.
25
261.1 Quick configuration advice
27==============================
28
29If you want to exploit the full power of internationalization, you
30should configure it using
31
32 ./configure --with-included-gettext
33
34to force usage of internationalizing routines provided within this
35package, despite the existence of internationalizing capabilities in the
36operating system where this package is being installed. So far, only
37the `gettext' implementation in the GNU C library version 2 provides as
38many features (such as locale alias, message inheritance, automatic
39charset conversion or plural form handling) as the implementation here.
40It is also not possible to offer this additional functionality on top
41of a `catgets' implementation. Future versions of GNU `gettext' will
42very likely convey even more functionality. So it might be a good idea
43to change to GNU `gettext' as soon as possible.
44
45 So you need _not_ provide this option if you are using GNU libc 2 or
46you have installed a recent copy of the GNU gettext package with the
47included `libintl'.
48
491.2 INSTALL Matters
50===================
51
52Some packages are "localizable" when properly installed; the programs
53they contain can be made to speak your own native language. Most such
54packages use GNU `gettext'. Other packages have their own ways to
55internationalization, predating GNU `gettext'.
56
57 By default, this package will be installed to allow translation of
58messages. It will automatically detect whether the system already
59provides the GNU `gettext' functions. If not, the included GNU
60`gettext' library will be used. This library is wholly contained
61within this package, usually in the `intl/' subdirectory, so prior
62installation of the GNU `gettext' package is _not_ required.
63Installers may use special options at configuration time for changing
64the default behaviour. The commands:
65
66 ./configure --with-included-gettext
67 ./configure --disable-nls
68
69will, respectively, bypass any pre-existing `gettext' to use the
70internationalizing routines provided within this package, or else,
71_totally_ disable translation of messages.
72
73 When you already have GNU `gettext' installed on your system and run
74configure without an option for your new package, `configure' will
75probably detect the previously built and installed `libintl.a' file and
76will decide to use this. This might not be desirable. You should use
77the more recent version of the GNU `gettext' library. I.e. if the file
78`intl/VERSION' shows that the library which comes with this package is
79more recent, you should use
80
81 ./configure --with-included-gettext
82
83to prevent auto-detection.
84
85 The configuration process will not test for the `catgets' function
86and therefore it will not be used. The reason is that even an
87emulation of `gettext' on top of `catgets' could not provide all the
88extensions of the GNU `gettext' library.
89
90 Internationalized packages usually have many `po/LL.po' files, where
91LL gives an ISO 639 two-letter code identifying the language. Unless
92translations have been forbidden at `configure' time by using the
93`--disable-nls' switch, all available translations are installed
94together with the package. However, the environment variable `LINGUAS'
95may be set, prior to configuration, to limit the installed set.
96`LINGUAS' should then contain a space separated list of two-letter
97codes, stating which languages are allowed.
98
991.3 Using This Package
100======================
101
102As a user, if your language has been installed for this package, you
103only have to set the `LANG' environment variable to the appropriate
104`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
105and `CC' is an ISO 3166 two-letter country code. For example, let's
106suppose that you speak German and live in Germany. At the shell
107prompt, merely execute `setenv LANG de_DE' (in `csh'),
108`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
109This can be done from your `.login' or `.profile' file, once and for
110all.
111
112 You might think that the country code specification is redundant.
113But in fact, some languages have dialects in different countries. For
114example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
115country code serves to distinguish the dialects.
116
117 The locale naming convention of `LL_CC', with `LL' denoting the
118language and `CC' denoting the country, is the one use on systems based
119on GNU libc. On other systems, some variations of this scheme are
120used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
121locales supported by your system for your language by running the
122command `locale -a | grep '^LL''.
123
124 Not all programs have translations for all languages. By default, an
125English message is shown in place of a nonexistent translation. If you
126understand other languages, you can set up a priority list of languages.
127This is done through a different environment variable, called
128`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
129for the purpose of message handling, but you still need to have `LANG'
130set to the primary language; this is required by other parts of the
131system libraries. For example, some Swedish users who would rather
132read translations in German than English for when Swedish is not
133available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
134
135 Special advice for Norwegian users: The language code for Norwegian
136bokma*l changed from `no' to `nb' recently (in 2003). During the
137transition period, while some message catalogs for this language are
138installed under `nb' and some older ones under `no', it's recommended
139for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
140older translations are used.
141
142 In the `LANGUAGE' environment variable, but not in the `LANG'
143environment variable, `LL_CC' combinations can be abbreviated as `LL'
144to denote the language's main dialect. For example, `de' is equivalent
145to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
146(Portuguese as spoken in Portugal) in this context.
147
1481.4 Translating Teams
149=====================
150
151For the Free Translation Project to be a success, we need interested
152people who like their own language and write it well, and who are also
153able to synergize with other translators speaking the same language.
154Each translation team has its own mailing list. The up-to-date list of
155teams can be found at the Free Translation Project's homepage,
156`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
157area.
158
159 If you'd like to volunteer to _work_ at translating messages, you
160should become a member of the translating team for your own language.
161The subscribing address is _not_ the same as the list itself, it has
162`-request' appended. For example, speakers of Swedish can send a
163message to `sv-request@li.org', having this message body:
164
165 subscribe
166
167 Keep in mind that team members are expected to participate
168_actively_ in translations, or at solving translational difficulties,
169rather than merely lurking around. If your team does not exist yet and
170you want to start one, or if you are unsure about what to do or how to
171get started, please write to `translation@iro.umontreal.ca' to reach the
172coordinator for all translator teams.
173
174 The English team is special. It works at improving and uniformizing
175the terminology in use. Proven linguistic skills are praised more than
176programming skills, here.
177
1781.5 Available Packages
179======================
180
181Languages are not equally supported in all packages. The following
182matrix shows the current state of internationalization, as of October
1832006. The matrix shows, in regard of each package, for which languages
184PO files have been submitted to translation coordination, with a
185translation percentage of at least 50%.
186
187 Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
188 +----------------------------------------------------+
189 GNUnet | [] |
190 a2ps | [] [] [] [] [] |
191 aegis | () |
192 ant-phone | () |
193 anubis | [] |
194 ap-utils | |
195 aspell | [] [] [] [] [] |
196 bash | [] [] [] |
197 batchelor | [] |
198 bfd | |
199 bibshelf | [] |
200 binutils | [] |
201 bison | [] [] |
202 bison-runtime | |
203 bluez-pin | [] [] [] [] [] |
204 cflow | [] |
205 clisp | [] [] |
206 console-tools | [] [] |
207 coreutils | [] [] [] |
208 cpio | |
209 cpplib | [] [] [] |
210 cryptonit | [] |
211 darkstat | [] () [] |
212 dialog | [] [] [] [] [] [] |
213 diffutils | [] [] [] [] [] [] |
214 doodle | [] |
215 e2fsprogs | [] [] |
216 enscript | [] [] [] [] |
217 error | [] [] [] [] |
218 fetchmail | [] [] () [] |
219 fileutils | [] [] |
220 findutils | [] [] [] |
221 flex | [] [] [] |
222 fslint | [] |
223 gas | |
224 gawk | [] [] [] |
225 gbiff | [] |
226 gcal | [] |
227 gcc | [] |
228 gettext-examples | [] [] [] [] [] |
229 gettext-runtime | [] [] [] [] [] |
230 gettext-tools | [] [] |
231 gimp-print | [] [] [] [] |
232 gip | [] |
233 gliv | [] |
234 glunarclock | [] |
235 gmult | [] [] |
236 gnubiff | () |
237 gnucash | () () [] |
238 gnucash-glossary | [] () |
239 gnuedu | |
240 gnulib | [] [] [] [] [] [] |
241 gnunet-gtk | |
242 gnutls | |
243 gpe-aerial | [] [] |
244 gpe-beam | [] [] |
245 gpe-calendar | |
246 gpe-clock | [] [] |
247 gpe-conf | [] [] |
248 gpe-contacts | |
249 gpe-edit | [] |
250 gpe-filemanager | |
251 gpe-go | [] |
252 gpe-login | [] [] |
253 gpe-ownerinfo | [] [] |
254 gpe-package | |
255 gpe-sketchbook | [] [] |
256 gpe-su | [] [] |
257 gpe-taskmanager | [] [] |
258 gpe-timesheet | [] |
259 gpe-today | [] [] |
260 gpe-todo | |
261 gphoto2 | [] [] [] [] |
262 gprof | [] [] |
263 gpsdrive | () () |
264 gramadoir | [] [] |
265 grep | [] [] [] [] [] [] |
266 gretl | |
267 gsasl | |
268 gss | |
269 gst-plugins | [] [] [] [] |
270 gst-plugins-base | [] [] [] |
271 gst-plugins-good | [] [] [] [] [] [] [] |
272 gstreamer | [] [] [] [] [] [] [] |
273 gtick | () |
274 gtkam | [] [] [] |
275 gtkorphan | [] [] |
276 gtkspell | [] [] [] [] |
277 gutenprint | [] |
278 hello | [] [] [] [] [] |
279 id-utils | [] [] |
280 impost | |
281 indent | [] [] [] |
282 iso_3166 | [] [] |
283 iso_3166_2 | |
284 iso_4217 | [] |
285 iso_639 | [] [] |
286 jpilot | [] |
287 jtag | |
288 jwhois | |
289 kbd | [] [] [] [] |
290 keytouch | |
291 keytouch-editor | |
292 keytouch-keyboa... | |
293 latrine | () |
294 ld | [] |
295 leafpad | [] [] [] [] [] |
296 libc | [] [] [] [] [] |
297 libexif | [] |
298 libextractor | [] |
299 libgpewidget | [] [] [] |
300 libgpg-error | [] |
301 libgphoto2 | [] [] |
302 libgphoto2_port | [] [] |
303 libgsasl | |
304 libiconv | [] [] |
305 libidn | [] [] |
306 lifelines | [] () |
307 lilypond | [] |
308 lingoteach | |
309 lynx | [] [] [] [] |
310 m4 | [] [] [] [] |
311 mailutils | [] |
312 make | [] [] |
313 man-db | [] () [] [] |
314 minicom | [] [] [] |
315 mysecretdiary | [] [] |
316 nano | [] [] [] |
317 nano_1_0 | [] () [] [] |
318 opcodes | [] |
319 parted | |
320 pilot-qof | [] |
321 psmisc | [] |
322 pwdutils | |
323 python | |
324 qof | |
325 radius | [] |
326 recode | [] [] [] [] [] [] |
327 rpm | [] [] |
328 screem | |
329 scrollkeeper | [] [] [] [] [] [] [] [] |
330 sed | [] [] [] |
331 sh-utils | [] [] |
332 shared-mime-info | [] [] [] [] |
333 sharutils | [] [] [] [] [] [] |
334 shishi | |
335 silky | |
336 skencil | [] () |
337 sketch | [] () |
338 solfege | |
339 soundtracker | [] [] |
340 sp | [] |
341 stardict | [] |
342 system-tools-ba... | [] [] [] [] [] [] [] [] [] |
343 tar | [] |
344 texinfo | [] [] [] |
345 textutils | [] [] [] |
346 tin | () () |
347 tp-robot | [] |
348 tuxpaint | [] [] [] [] [] |
349 unicode-han-tra... | |
350 unicode-transla... | |
351 util-linux | [] [] [] [] |
352 vorbis-tools | [] [] [] [] |
353 wastesedge | () |
354 wdiff | [] [] [] [] |
355 wget | [] [] |
356 xchat | [] [] [] [] [] [] |
357 xkeyboard-config | |
358 xpad | [] [] |
359 +----------------------------------------------------+
360 af am ar az be bg bs ca cs cy da de el en en_GB eo
361 10 0 1 2 9 22 1 42 41 2 60 95 16 1 17 16
362
363 es et eu fa fi fr ga gl gu he hi hr hu id is it
364 +--------------------------------------------------+
365 GNUnet | |
366 a2ps | [] [] [] () |
367 aegis | |
368 ant-phone | [] |
369 anubis | [] |
370 ap-utils | [] [] |
371 aspell | [] [] [] |
372 bash | [] [] [] |
373 batchelor | [] [] |
374 bfd | [] |
375 bibshelf | [] [] [] |
376 binutils | [] [] [] |
377 bison | [] [] [] [] [] [] |
378 bison-runtime | [] [] [] [] [] |
379 bluez-pin | [] [] [] [] [] |
380 cflow | [] |
381 clisp | [] [] |
382 console-tools | |
383 coreutils | [] [] [] [] [] [] |
384 cpio | [] [] [] |
385 cpplib | [] [] |
386 cryptonit | [] |
387 darkstat | [] () [] [] [] |
388 dialog | [] [] [] [] [] [] [] [] |
389 diffutils | [] [] [] [] [] [] [] [] [] |
390 doodle | [] [] |
391 e2fsprogs | [] [] [] |
392 enscript | [] [] [] |
393 error | [] [] [] [] [] |
394 fetchmail | [] |
395 fileutils | [] [] [] [] [] [] |
396 findutils | [] [] [] [] |
397 flex | [] [] [] |
398 fslint | [] |
399 gas | [] [] |
400 gawk | [] [] [] [] |
401 gbiff | [] |
402 gcal | [] [] |
403 gcc | [] |
404 gettext-examples | [] [] [] [] [] [] |
405 gettext-runtime | [] [] [] [] [] [] |
406 gettext-tools | [] [] [] |
407 gimp-print | [] [] |
408 gip | [] [] [] |
409 gliv | () |
410 glunarclock | [] [] [] |
411 gmult | [] [] [] |
412 gnubiff | () () |
413 gnucash | () () () |
414 gnucash-glossary | [] [] |
415 gnuedu | [] |
416 gnulib | [] [] [] [] [] [] [] [] |
417 gnunet-gtk | |
418 gnutls | |
419 gpe-aerial | [] [] |
420 gpe-beam | [] [] |
421 gpe-calendar | |
422 gpe-clock | [] [] [] [] |
423 gpe-conf | [] |
424 gpe-contacts | [] [] |
425 gpe-edit | [] [] [] [] |
426 gpe-filemanager | [] |
427 gpe-go | [] [] [] |
428 gpe-login | [] [] [] |
429 gpe-ownerinfo | [] [] [] [] [] |
430 gpe-package | [] |
431 gpe-sketchbook | [] [] |
432 gpe-su | [] [] [] [] |
433 gpe-taskmanager | [] [] [] |
434 gpe-timesheet | [] [] [] [] |
435 gpe-today | [] [] [] [] |
436 gpe-todo | [] |
437 gphoto2 | [] [] [] [] [] |
438 gprof | [] [] [] [] |
439 gpsdrive | () () [] () |
440 gramadoir | [] [] |
441 grep | [] [] [] [] [] [] [] [] [] [] [] [] |
442 gretl | [] [] [] |
443 gsasl | [] [] |
444 gss | [] |
445 gst-plugins | [] [] [] |
446 gst-plugins-base | [] [] |
447 gst-plugins-good | [] [] [] |
448 gstreamer | [] [] [] |
449 gtick | [] |
450 gtkam | [] [] [] [] |
451 gtkorphan | [] [] |
452 gtkspell | [] [] [] [] [] [] |
453 gutenprint | [] |
454 hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
455 id-utils | [] [] [] [] [] |
456 impost | [] [] |
457 indent | [] [] [] [] [] [] [] [] [] [] |
458 iso_3166 | [] [] [] |
459 iso_3166_2 | [] |
460 iso_4217 | [] [] [] [] |
461 iso_639 | [] [] [] [] [] |
462 jpilot | [] [] |
463 jtag | [] |
464 jwhois | [] [] [] [] [] |
465 kbd | [] [] |
466 keytouch | [] |
467 keytouch-editor | [] |
468 keytouch-keyboa... | [] |
469 latrine | [] [] [] |
470 ld | [] [] |
471 leafpad | [] [] [] [] [] [] |
472 libc | [] [] [] [] [] |
473 libexif | [] |
474 libextractor | [] |
475 libgpewidget | [] [] [] [] [] |
476 libgpg-error | |
477 libgphoto2 | [] [] [] |
478 libgphoto2_port | [] [] |
479 libgsasl | [] [] |
480 libiconv | [] [] |
481 libidn | [] [] |
482 lifelines | () |
483 lilypond | [] |
484 lingoteach | [] [] [] |
485 lynx | [] [] [] |
486 m4 | [] [] [] [] |
487 mailutils | [] [] |
488 make | [] [] [] [] [] [] [] [] |
489 man-db | () |
490 minicom | [] [] [] [] |
491 mysecretdiary | [] [] [] |
492 nano | [] [] [] [] [] [] |
493 nano_1_0 | [] [] [] [] [] |
494 opcodes | [] [] [] [] |
495 parted | [] [] [] [] |
496 pilot-qof | |
497 psmisc | [] [] [] |
498 pwdutils | |
499 python | |
500 qof | [] |
501 radius | [] [] |
502 recode | [] [] [] [] [] [] [] [] |
503 rpm | [] [] |
504 screem | |
505 scrollkeeper | [] [] [] |
506 sed | [] [] [] [] [] |
507 sh-utils | [] [] [] [] [] [] [] |
508 shared-mime-info | [] [] [] [] [] [] |
509 sharutils | [] [] [] [] [] [] [] [] |
510 shishi | |
511 silky | [] |
512 skencil | [] [] |
513 sketch | [] [] |
514 solfege | [] |
515 soundtracker | [] [] [] |
516 sp | [] |
517 stardict | [] |
518 system-tools-ba... | [] [] [] [] [] [] [] [] |
519 tar | [] [] [] [] [] [] [] |
520 texinfo | [] [] |
521 textutils | [] [] [] [] [] |
522 tin | [] () |
523 tp-robot | [] [] [] [] |
524 tuxpaint | [] [] |
525 unicode-han-tra... | |
526 unicode-transla... | [] [] |
527 util-linux | [] [] [] [] [] [] [] |
528 vorbis-tools | [] [] |
529 wastesedge | () |
530 wdiff | [] [] [] [] [] [] [] [] |
531 wget | [] [] [] [] [] [] [] [] |
532 xchat | [] [] [] [] [] [] [] [] |
533 xkeyboard-config | [] [] [] [] |
534 xpad | [] [] [] |
535 +--------------------------------------------------+
536 es et eu fa fi fr ga gl gu he hi hr hu id is it
537 88 22 14 2 40 115 61 14 1 8 1 6 59 31 0 52
538
539 ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
540 +-------------------------------------------------+
541 GNUnet | |
542 a2ps | () [] [] () |
543 aegis | () |
544 ant-phone | [] |
545 anubis | [] [] [] |
546 ap-utils | [] |
547 aspell | [] [] |
548 bash | [] |
549 batchelor | [] [] |
550 bfd | |
551 bibshelf | [] |
552 binutils | |
553 bison | [] [] [] |
554 bison-runtime | [] [] [] |
555 bluez-pin | [] [] [] |
556 cflow | |
557 clisp | [] |
558 console-tools | |
559 coreutils | [] |
560 cpio | |
561 cpplib | [] |
562 cryptonit | [] |
563 darkstat | [] [] |
564 dialog | [] [] |
565 diffutils | [] [] [] |
566 doodle | |
567 e2fsprogs | [] |
568 enscript | [] |
569 error | [] |
570 fetchmail | [] [] |
571 fileutils | [] [] |
572 findutils | [] |
573 flex | [] [] |
574 fslint | [] [] |
575 gas | |
576 gawk | [] [] |
577 gbiff | [] |
578 gcal | |
579 gcc | |
580 gettext-examples | [] [] |
581 gettext-runtime | [] [] [] |
582 gettext-tools | [] [] |
583 gimp-print | [] [] |
584 gip | [] [] |
585 gliv | [] |
586 glunarclock | [] [] |
587 gmult | [] [] |
588 gnubiff | |
589 gnucash | () () |
590 gnucash-glossary | [] |
591 gnuedu | |
592 gnulib | [] [] [] [] |
593 gnunet-gtk | |
594 gnutls | |
595 gpe-aerial | [] |
596 gpe-beam | [] |
597 gpe-calendar | [] |
598 gpe-clock | [] [] [] |
599 gpe-conf | [] [] |
600 gpe-contacts | [] |
601 gpe-edit | [] [] [] |
602 gpe-filemanager | [] [] |
603 gpe-go | [] [] [] |
604 gpe-login | [] [] [] |
605 gpe-ownerinfo | [] [] |
606 gpe-package | [] [] |
607 gpe-sketchbook | [] [] |
608 gpe-su | [] [] [] |
609 gpe-taskmanager | [] [] [] [] |
610 gpe-timesheet | [] |
611 gpe-today | [] [] |
612 gpe-todo | [] |
613 gphoto2 | [] [] |
614 gprof | |
615 gpsdrive | () () () |
616 gramadoir | () |
617 grep | [] [] [] [] |
618 gretl | |
619 gsasl | [] |
620 gss | |
621 gst-plugins | [] |
622 gst-plugins-base | |
623 gst-plugins-good | [] |
624 gstreamer | [] |
625 gtick | |
626 gtkam | [] |
627 gtkorphan | [] |
628 gtkspell | [] [] |
629 gutenprint | |
630 hello | [] [] [] [] [] [] |
631 id-utils | [] |
632 impost | |
633 indent | [] [] |
634 iso_3166 | [] |
635 iso_3166_2 | [] |
636 iso_4217 | [] [] [] |
637 iso_639 | [] [] |
638 jpilot | () () () |
639 jtag | |
640 jwhois | [] |
641 kbd | [] |
642 keytouch | [] |
643 keytouch-editor | |
644 keytouch-keyboa... | |
645 latrine | [] |
646 ld | |
647 leafpad | [] [] |
648 libc | [] [] [] [] [] |
649 libexif | |
650 libextractor | |
651 libgpewidget | [] |
652 libgpg-error | |
653 libgphoto2 | [] |
654 libgphoto2_port | [] |
655 libgsasl | [] |
656 libiconv | |
657 libidn | [] [] |
658 lifelines | [] |
659 lilypond | |
660 lingoteach | [] |
661 lynx | [] [] |
662 m4 | [] [] |
663 mailutils | |
664 make | [] [] [] |
665 man-db | () |
666 minicom | [] |
667 mysecretdiary | [] |
668 nano | [] [] [] |
669 nano_1_0 | [] [] [] |
670 opcodes | [] |
671 parted | [] [] |
672 pilot-qof | |
673 psmisc | [] [] [] |
674 pwdutils | |
675 python | |
676 qof | |
677 radius | |
678 recode | [] |
679 rpm | [] [] |
680 screem | [] |
681 scrollkeeper | [] [] [] [] |
682 sed | [] [] |
683 sh-utils | [] [] |
684 shared-mime-info | [] [] [] [] [] |
685 sharutils | [] [] |
686 shishi | |
687 silky | [] |
688 skencil | |
689 sketch | |
690 solfege | |
691 soundtracker | |
692 sp | () |
693 stardict | [] [] |
694 system-tools-ba... | [] [] [] [] |
695 tar | [] [] [] |
696 texinfo | [] [] [] |
697 textutils | [] [] [] |
698 tin | |
699 tp-robot | [] |
700 tuxpaint | [] |
701 unicode-han-tra... | |
702 unicode-transla... | |
703 util-linux | [] [] |
704 vorbis-tools | [] |
705 wastesedge | [] |
706 wdiff | [] [] |
707 wget | [] [] |
708 xchat | [] [] [] [] |
709 xkeyboard-config | [] |
710 xpad | [] [] [] |
711 +-------------------------------------------------+
712 ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
713 52 24 2 2 1 3 0 2 3 21 0 15 1 97 5 1
714
715 nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
716 +------------------------------------------------------+
717 GNUnet | |
718 a2ps | () [] [] [] [] [] [] |
719 aegis | () () |
720 ant-phone | [] [] |
721 anubis | [] [] [] |
722 ap-utils | () |
723 aspell | [] [] |
724 bash | [] [] [] |
725 batchelor | [] [] |
726 bfd | |
727 bibshelf | [] |
728 binutils | [] [] |
729 bison | [] [] [] [] [] |
730 bison-runtime | [] [] [] [] |
731 bluez-pin | [] [] [] [] [] [] [] [] [] |
732 cflow | [] |
733 clisp | [] |
734 console-tools | [] |
735 coreutils | [] [] [] [] |
736 cpio | [] [] [] |
737 cpplib | [] |
738 cryptonit | [] [] |
739 darkstat | [] [] [] [] [] [] |
740 dialog | [] [] [] [] [] [] [] [] [] |
741 diffutils | [] [] [] [] [] [] |
742 doodle | [] [] |
743 e2fsprogs | [] [] |
744 enscript | [] [] [] [] [] |
745 error | [] [] [] [] |
746 fetchmail | [] [] [] |
747 fileutils | [] [] [] [] [] |
748 findutils | [] [] [] [] [] [] |
749 flex | [] [] [] [] [] |
750 fslint | [] [] [] [] |
751 gas | |
752 gawk | [] [] [] [] |
753 gbiff | [] |
754 gcal | [] |
755 gcc | [] |
756 gettext-examples | [] [] [] [] [] [] [] [] |
757 gettext-runtime | [] [] [] [] [] [] [] [] |
758 gettext-tools | [] [] [] [] [] [] [] |
759 gimp-print | [] [] |
760 gip | [] [] [] [] |
761 gliv | [] [] [] [] |
762 glunarclock | [] [] [] [] [] [] |
763 gmult | [] [] [] [] |
764 gnubiff | () |
765 gnucash | () [] |
766 gnucash-glossary | [] [] [] |
767 gnuedu | |
768 gnulib | [] [] [] [] [] |
769 gnunet-gtk | [] |
770 gnutls | [] [] |
771 gpe-aerial | [] [] [] [] [] [] [] |
772 gpe-beam | [] [] [] [] [] [] [] |
773 gpe-calendar | [] |
774 gpe-clock | [] [] [] [] [] [] [] [] |
775 gpe-conf | [] [] [] [] [] [] [] |
776 gpe-contacts | [] [] [] [] [] |
777 gpe-edit | [] [] [] [] [] [] [] [] |
778 gpe-filemanager | [] [] |
779 gpe-go | [] [] [] [] [] [] |
780 gpe-login | [] [] [] [] [] [] [] [] |
781 gpe-ownerinfo | [] [] [] [] [] [] [] [] |
782 gpe-package | [] [] |
783 gpe-sketchbook | [] [] [] [] [] [] [] [] |
784 gpe-su | [] [] [] [] [] [] [] [] |
785 gpe-taskmanager | [] [] [] [] [] [] [] [] |
786 gpe-timesheet | [] [] [] [] [] [] [] [] |
787 gpe-today | [] [] [] [] [] [] [] [] |
788 gpe-todo | [] [] [] [] |
789 gphoto2 | [] [] [] [] [] |
790 gprof | [] [] [] |
791 gpsdrive | [] [] [] |
792 gramadoir | [] [] |
793 grep | [] [] [] [] [] [] [] [] |
794 gretl | [] |
795 gsasl | [] [] [] |
796 gss | [] [] [] |
797 gst-plugins | [] [] [] [] |
798 gst-plugins-base | [] |
799 gst-plugins-good | [] [] [] [] |
800 gstreamer | [] [] [] |
801 gtick | [] |
802 gtkam | [] [] [] [] |
803 gtkorphan | [] |
804 gtkspell | [] [] [] [] [] [] [] [] |
805 gutenprint | [] |
806 hello | [] [] [] [] [] [] [] [] |
807 id-utils | [] [] [] [] |
808 impost | [] |
809 indent | [] [] [] [] [] [] |
810 iso_3166 | [] [] [] [] [] [] |
811 iso_3166_2 | |
812 iso_4217 | [] [] [] [] |
813 iso_639 | [] [] [] [] |
814 jpilot | |
815 jtag | [] |
816 jwhois | [] [] [] [] |
817 kbd | [] [] [] |
818 keytouch | [] |
819 keytouch-editor | [] |
820 keytouch-keyboa... | [] |
821 latrine | [] [] |
822 ld | [] |
823 leafpad | [] [] [] [] [] [] |
824 libc | [] [] [] [] [] |
825 libexif | [] |
826 libextractor | [] [] |
827 libgpewidget | [] [] [] [] [] [] [] |
828 libgpg-error | [] [] |
829 libgphoto2 | [] |
830 libgphoto2_port | [] [] [] |
831 libgsasl | [] [] [] [] |
832 libiconv | [] [] |
833 libidn | [] [] () |
834 lifelines | [] [] |
835 lilypond | |
836 lingoteach | [] |
837 lynx | [] [] [] |
838 m4 | [] [] [] [] [] |
839 mailutils | [] [] [] [] |
840 make | [] [] [] [] |
841 man-db | [] [] |
842 minicom | [] [] [] [] [] |
843 mysecretdiary | [] [] [] [] |
844 nano | [] [] [] |
845 nano_1_0 | [] [] [] [] |
846 opcodes | [] [] |
847 parted | [] |
848 pilot-qof | [] |
849 psmisc | [] [] |
850 pwdutils | [] [] |
851 python | |
852 qof | [] [] |
853 radius | [] [] |
854 recode | [] [] [] [] [] [] [] |
855 rpm | [] [] [] [] |
856 screem | |
857 scrollkeeper | [] [] [] [] [] [] [] |
858 sed | [] [] [] [] [] [] [] [] [] |
859 sh-utils | [] [] [] |
860 shared-mime-info | [] [] [] [] [] |
861 sharutils | [] [] [] [] |
862 shishi | [] |
863 silky | [] |
864 skencil | [] [] [] |
865 sketch | [] [] [] |
866 solfege | [] |
867 soundtracker | [] [] |
868 sp | |
869 stardict | [] [] [] |
870 system-tools-ba... | [] [] [] [] [] [] [] [] [] |
871 tar | [] [] [] [] [] |
872 texinfo | [] [] [] [] |
873 textutils | [] [] [] |
874 tin | () |
875 tp-robot | [] |
876 tuxpaint | [] [] [] [] [] |
877 unicode-han-tra... | |
878 unicode-transla... | |
879 util-linux | [] [] [] [] |
880 vorbis-tools | [] [] |
881 wastesedge | |
882 wdiff | [] [] [] [] [] [] |
883 wget | [] [] [] [] |
884 xchat | [] [] [] [] [] [] [] |
885 xkeyboard-config | [] [] |
886 xpad | [] [] [] |
887 +------------------------------------------------------+
888 nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
889 0 2 3 58 30 54 5 73 72 4 40 46 11 50 128 2
890
891 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
892 +---------------------------------------------------+
893 GNUnet | [] | 2
894 a2ps | [] [] [] | 19
895 aegis | | 0
896 ant-phone | [] [] | 6
897 anubis | [] [] [] | 11
898 ap-utils | () [] | 4
899 aspell | [] [] [] | 15
900 bash | [] | 11
901 batchelor | [] [] | 9
902 bfd | | 1
903 bibshelf | [] | 7
904 binutils | [] [] [] | 9
905 bison | [] [] [] | 19
906 bison-runtime | [] [] [] | 15
907 bluez-pin | [] [] [] [] [] [] | 28
908 cflow | [] [] | 5
909 clisp | | 6
910 console-tools | [] [] | 5
911 coreutils | [] [] | 16
912 cpio | [] [] [] | 9
913 cpplib | [] [] [] [] | 11
914 cryptonit | | 5
915 darkstat | [] () () | 15
916 dialog | [] [] [] [] [] | 30
917 diffutils | [] [] [] [] | 28
918 doodle | [] | 6
919 e2fsprogs | [] [] | 10
920 enscript | [] [] [] | 16
921 error | [] [] [] [] | 18
922 fetchmail | [] [] | 12
923 fileutils | [] [] [] | 18
924 findutils | [] [] [] | 17
925 flex | [] [] | 15
926 fslint | [] | 9
927 gas | [] | 3
928 gawk | [] [] | 15
929 gbiff | [] | 5
930 gcal | [] | 5
931 gcc | [] [] [] | 6
932 gettext-examples | [] [] [] [] [] [] | 27
933 gettext-runtime | [] [] [] [] [] [] | 28
934 gettext-tools | [] [] [] [] [] | 19
935 gimp-print | [] [] | 12
936 gip | [] [] | 12
937 gliv | [] [] | 8
938 glunarclock | [] [] [] | 15
939 gmult | [] [] [] [] | 15
940 gnubiff | [] | 1
941 gnucash | () | 2
942 gnucash-glossary | [] [] | 9
943 gnuedu | [] | 2
944 gnulib | [] [] [] [] [] | 28
945 gnunet-gtk | | 1
946 gnutls | | 2
947 gpe-aerial | [] [] | 14
948 gpe-beam | [] [] | 14
949 gpe-calendar | [] | 3
950 gpe-clock | [] [] [] [] | 21
951 gpe-conf | [] [] | 14
952 gpe-contacts | [] [] | 10
953 gpe-edit | [] [] [] [] | 20
954 gpe-filemanager | [] | 6
955 gpe-go | [] [] | 15
956 gpe-login | [] [] [] [] [] | 21
957 gpe-ownerinfo | [] [] [] [] | 21
958 gpe-package | [] | 6
959 gpe-sketchbook | [] [] | 16
960 gpe-su | [] [] [] | 20
961 gpe-taskmanager | [] [] [] | 20
962 gpe-timesheet | [] [] [] [] | 18
963 gpe-today | [] [] [] [] [] | 21
964 gpe-todo | [] | 7
965 gphoto2 | [] [] [] [] | 20
966 gprof | [] [] | 11
967 gpsdrive | | 4
968 gramadoir | [] | 7
969 grep | [] [] [] [] | 34
970 gretl | | 4
971 gsasl | [] [] | 8
972 gss | [] | 5
973 gst-plugins | [] [] [] | 15
974 gst-plugins-base | [] [] [] | 9
975 gst-plugins-good | [] [] [] [] [] | 20
976 gstreamer | [] [] [] | 17
977 gtick | [] | 3
978 gtkam | [] | 13
979 gtkorphan | [] | 7
980 gtkspell | [] [] [] [] [] [] | 26
981 gutenprint | | 3
982 hello | [] [] [] [] [] | 37
983 id-utils | [] [] | 14
984 impost | [] | 4
985 indent | [] [] [] [] | 25
986 iso_3166 | [] [] [] [] | 16
987 iso_3166_2 | | 2
988 iso_4217 | [] [] | 14
989 iso_639 | [] | 14
990 jpilot | [] [] [] [] | 7
991 jtag | [] | 3
992 jwhois | [] [] [] | 13
993 kbd | [] [] | 12
994 keytouch | [] | 4
995 keytouch-editor | | 2
996 keytouch-keyboa... | [] | 3
997 latrine | [] [] | 8
998 ld | [] [] [] [] | 8
999 leafpad | [] [] [] [] | 23
1000 libc | [] [] [] | 23
1001 libexif | [] | 4
1002 libextractor | [] | 5
1003 libgpewidget | [] [] [] | 19
1004 libgpg-error | [] | 4
1005 libgphoto2 | [] | 8
1006 libgphoto2_port | [] [] [] | 11
1007 libgsasl | [] | 8
1008 libiconv | [] | 7
1009 libidn | [] [] | 10
1010 lifelines | | 4
1011 lilypond | | 2
1012 lingoteach | [] | 6
1013 lynx | [] [] [] | 15
1014 m4 | [] [] [] | 18
1015 mailutils | [] | 8
1016 make | [] [] [] | 20
1017 man-db | [] | 6
1018 minicom | [] | 14
1019 mysecretdiary | [] [] | 12
1020 nano | [] [] | 17
1021 nano_1_0 | [] [] [] | 18
1022 opcodes | [] [] | 10
1023 parted | [] [] [] | 10
1024 pilot-qof | [] | 3
1025 psmisc | [] | 10
1026 pwdutils | [] | 3
1027 python | | 0
1028 qof | [] | 4
1029 radius | [] | 6
1030 recode | [] [] [] | 25
1031 rpm | [] [] [] [] | 14
1032 screem | [] | 2
1033 scrollkeeper | [] [] [] [] | 26
1034 sed | [] [] [] | 22
1035 sh-utils | [] | 15
1036 shared-mime-info | [] [] [] [] | 24
1037 sharutils | [] [] [] | 23
1038 shishi | | 1
1039 silky | [] | 4
1040 skencil | [] | 7
1041 sketch | | 6
1042 solfege | | 2
1043 soundtracker | [] [] | 9
1044 sp | [] | 3
1045 stardict | [] [] [] [] | 11
1046 system-tools-ba... | [] [] [] [] [] [] [] | 37
1047 tar | [] [] [] [] | 20
1048 texinfo | [] [] [] | 15
1049 textutils | [] [] [] | 17
1050 tin | | 1
1051 tp-robot | [] [] [] | 10
1052 tuxpaint | [] [] [] | 16
1053 unicode-han-tra... | | 0
1054 unicode-transla... | | 2
1055 util-linux | [] [] [] | 20
1056 vorbis-tools | [] [] | 11
1057 wastesedge | | 1
1058 wdiff | [] [] | 22
1059 wget | [] [] [] | 19
1060 xchat | [] [] [] [] | 29
1061 xkeyboard-config | [] [] [] [] | 11
1062 xpad | [] [] [] | 14
1063 +---------------------------------------------------+
1064 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
1065 170 domains 0 1 1 77 39 0 136 10 1 48 5 54 0 2028
1066
1067 Some counters in the preceding matrix are higher than the number of
1068visible blocks let us expect. This is because a few extra PO files are
1069used for implementing regional variants of languages, or language
1070dialects.
1071
1072 For a PO file in the matrix above to be effective, the package to
1073which it applies should also have been internationalized and
1074distributed as such by its maintainer. There might be an observable
1075lag between the mere existence a PO file and its wide availability in a
1076distribution.
1077
1078 If October 2006 seems to be old, you may fetch a more recent copy of
1079this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
1080matrix with full percentage details can be found at
1081`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
1082
10831.6 Using `gettext' in new packages
1084===================================
1085
1086If you are writing a freely available program and want to
1087internationalize it you are welcome to use GNU `gettext' in your
1088package. Of course you have to respect the GNU Library General Public
1089License which covers the use of the GNU `gettext' library. This means
1090in particular that even non-free programs can use `libintl' as a shared
1091library, whereas only free software can use `libintl' as a static
1092library or use modified versions of `libintl'.
1093
1094 Once the sources are changed appropriately and the setup can handle
1095the use of `gettext' the only thing missing are the translations. The
1096Free Translation Project is also available for packages which are not
1097developed inside the GNU project. Therefore the information given above
1098applies also for every other Free Software Project. Contact
1099`translation@iro.umontreal.ca' to make the `.pot' files available to
1100the translation teams.
1101
diff --git a/ChangeLog b/ChangeLog
index afbcecc..74f154d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,37 @@
1Tue Dec 5 05:18:44 PM JST 2023
2 Misc. fixes to build system and code to support more recent libexiv2.
3 * m4/gettext.m4: Upgrade to gettext-0.21.
4 * m4/host-cpu-c-abi.m4: New file, from gettext-0.21.
5 * m4/iconv.m4: Upgrade to gettext-0.21.
6 * m4/intlmacosx.m4: New file, from gettext-0.21.
7 * m4/lib-ld.m4: Upgrade to gettext-0.21.
8 * m4/lib-link.m4: Upgrade to gettext-0.21.
9 * m4/lib-prefix.m4: Upgrade to gettext-0.21.
10 * m4/nls.m4: Upgrade to gettext-0.21.
11 * m4/po.m4: Upgrade to gettext-0.21.
12 * m4/progtest.m4: Upgrade to gettext-0.21.
13 * m4/Makefile.am (EXTRA_DIST): Add the new files.
14 * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.21.
15 Releasing GNU libextractor 1.13. -CG
16
17Sun 02 May 2021 10:30:33 PM CEST
18 Revive REAL plugin (fixes #2518). -CG
19
20Sat 01 May 2021 10:57:55 PM CEST
21 Revive ELF plugin (fixes #2516). -CG
22
23Tue 20 Apr 2021 06:33:46 PM CEST
24 Removing plugins depending on buggy, unstable libffmpeg library. -CG
25
26Sat 30 Jan 2021 03:25:35 PM CET
27 Fix #6709: mask SIGPIPE to avoid test case failure
28 with latest librpm. Remove plibc.h logic.
29 Releasing GNU libextractor 1.11. -CG
30
1Thu Oct 29 09:20:41 PM CET 2020 31Thu Oct 29 09:20:41 PM CET 2020
2 Fix #6613: test failure with latest exiv2 library 32 Fix #6613: test failure with latest exiv2 library
3 (harmless). Add hard timeout for zzuf test suite 33 (harmless). Add hard timeout for zzuf test suite
4 on systems where timeout command exists. -CG 34 on systems where timeout command exists. -CG
5 35
6Thu Jul 2 15:58:16 CEST 2020 36Thu Jul 2 15:58:16 CEST 2020
7 Fixed some code that called deprecated libav routines. 37 Fixed some code that called deprecated libav routines.
@@ -18,7 +48,7 @@ Mon 29 Jul 2019 05:57:04 PM CEST
18 Fix build issue with exiv2-0.27 (#5820). -AS (via Gentoo) 48 Fix build issue with exiv2-0.27 (#5820). -AS (via Gentoo)
19 49
20Mon 13 May 2019 07:42:19 AM CEST 50Mon 13 May 2019 07:42:19 AM CEST
21 Consistently use AS_IF and AS_CASE in configure.ac. -CG 51 Consistently use AS_IF and AS_CASE in configure.ac. -CG
22 52
23Sun 12 May 2019 01:56:56 PM CEST 53Sun 12 May 2019 01:56:56 PM CEST
24 Updated French translation. -CG 54 Updated French translation. -CG
@@ -569,7 +599,7 @@ Thu Aug 18 21:18:28 PDT 2005
569 Made quotations match GNU standards. 599 Made quotations match GNU standards.
570 600
571Sat Aug 13 18:41:02 PDT 2005 601Sat Aug 13 18:41:02 PDT 2005
572 Fixed problems with ole2 extractor. Also removed 602 Fixed problems with ole2 extractor. Also removed
573 requirement for static version of glib (!). 603 requirement for static version of glib (!).
574 Releasing libextractor 0.5.3. 604 Releasing libextractor 0.5.3.
575 605
@@ -616,7 +646,7 @@ Fri May 6 14:54:58 EST 2005
616 (important for systems with not that much memory). 646 (important for systems with not that much memory).
617 647
618Fri May 6 06:02:02 EST 2005 648Fri May 6 06:02:02 EST 2005
619 Added Python binding. 649 Added Python binding.
620 650
621Tue Apr 5 17:22:28 EST 2005 651Tue Apr 5 17:22:28 EST 2005
622 Added translation to Kinyarwanda. 652 Added translation to Kinyarwanda.
@@ -936,8 +966,8 @@ Sun Jun 2 22:49:17 EST 2002
936 with libhtmlparse). Released v0.0.2. 966 with libhtmlparse). Released v0.0.2.
937 967
938Sat May 25 16:56:59 EST 2002 968Sat May 25 16:56:59 EST 2002
939 Added building of a description from artist, 969 Added building of a description from artist,
940 title and album, fixed bugs. 970 title and album, fixed bugs.
941 971
942Tue May 21 22:24:07 EST 2002 972Tue May 21 22:24:07 EST 2002
943 Added removing of duplicates, splitting keywords, 973 Added removing of duplicates, splitting keywords,
diff --git a/Makefile.am b/Makefile.am
index c3944a6..371d514 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,15 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2SUBDIRS = m4 po src doc . 2SUBDIRS = m4 po src doc .
3EXTRA_DIST = config.rpath \ 3EXTRA_DIST = config.rpath \
4 ABOUT-NLS install-sh 4 ABOUT-NLS
5 5
6pkgconfigdatadir = $(libdir)/pkgconfig 6pkgconfigdatadir = $(libdir)/pkgconfig
7pkgconfigdata_DATA = libextractor.pc 7pkgconfigdata_DATA = libextractor.pc
8 8
9DISTCLEANFILES = \
10 libextractor.pc \
11 libextractor.pc.in \
12 libextractor-uninstalled.sh \
13 libextractor-uninstalled.pc
9 14
10ACLOCAL_AMFLAGS = -I m4 15ACLOCAL_AMFLAGS = -I m4
diff --git a/README b/README
index f74cf7a..be90105 100644
--- a/README
+++ b/README
@@ -26,6 +26,17 @@ manual. libextractor is an official GNU package and available from
26http://www.gnu.org/s/libextractor/. 26http://www.gnu.org/s/libextractor/.
27 27
28 28
29Joining GNU
30===========
31
32This is a GNU program, developed by the GNU Project and part of the
33GNU Operating System. If you are the author of an awesome program and
34want to join us in writing Free Software, please consider making it an
35official GNU program and become a GNU maintainer. You can find
36instructions on how to do so at http://www.gnu.org/help/evaluation.
37We are looking forward to hacking with you!
38
39
29extract 40extract
30======= 41=======
31 42
@@ -44,7 +55,6 @@ The following dependencies are all optional, but should be
44available in order for maximum coverage: 55available in order for maximum coverage:
45 56
46* libarchive 57* libarchive
47* libavutil / libavformat / libavcodec / libswscale (ffmpeg)
48* libbz2 (bzip2) 58* libbz2 (bzip2)
49* libexiv2 59* libexiv2
50* libflac 60* libflac
@@ -73,4 +83,3 @@ production.
73Finally, 'zzuf' is a fuzzing tool that can optionally be detected by 83Finally, 'zzuf' is a fuzzing tool that can optionally be detected by
74the build system and be used for debugging / testing. It is not required 84the build system and be used for debugging / testing. It is not required
75at runtime or for normal builds. 85at runtime or for normal builds.
76
diff --git a/configure.ac b/configure.ac
index 3c9b972..d17ff39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
1# Process this file with autoconf to produce a configure script. 1# Process this file with autoconf to produce a configure script.
2# 2#
3# This file is part of GNU libextractor 3# This file is part of GNU libextractor
4# Copyright (C) 2003-2020 Christian Grothoff 4# Copyright (C) 2003-2023 Christian Grothoff
5# 5#
6# GNU libextractor is free software; you can redistribute it and/or modify it under the 6# GNU libextractor is free software; you can redistribute it and/or modify it under the
7# terms of the GNU General Public License as published by the Free Software 7# terms of the GNU General Public License as published by the Free Software
@@ -15,15 +15,15 @@
15# GNU libextractor; see the file COPYING. If not, If not, see <http://www.gnu.org/license> 15# GNU libextractor; see the file COPYING. If not, If not, see <http://www.gnu.org/license>
16# 16#
17# 17#
18AC_PREREQ(2.61) 18AC_PREREQ([2.71])
19AC_INIT([libextractor], [1.10], [bug-libextractor@gnu.org]) 19AC_INIT([libextractor],[1.13],[bug-libextractor@gnu.org])
20AC_CONFIG_AUX_DIR([build-aux]) 20AC_CONFIG_AUX_DIR([build-aux])
21AC_CONFIG_HEADERS([config.h]) 21AC_CONFIG_HEADERS([config.h])
22AC_CONFIG_MACRO_DIR([m4]) 22AC_CONFIG_MACRO_DIR([m4])
23AH_TOP([#define _GNU_SOURCE 1]) 23AH_TOP([#define _GNU_SOURCE 1])
24AC_CANONICAL_TARGET 24AC_CANONICAL_TARGET
25AC_CANONICAL_HOST 25AC_CANONICAL_HOST
26AC_CANONICAL_SYSTEM 26AC_CANONICAL_TARGET
27 27
28LIB_VERSION_CURRENT=4 28LIB_VERSION_CURRENT=4
29LIB_VERSION_REVISION=8 29LIB_VERSION_REVISION=8
@@ -46,7 +46,7 @@ AC_PROG_INSTALL
46AC_PROG_LN_S 46AC_PROG_LN_S
47AC_PROG_MAKE_SET 47AC_PROG_MAKE_SET
48AC_CANONICAL_HOST 48AC_CANONICAL_HOST
49AC_PROG_LIBTOOL 49LT_INIT
50# save LIBS, libtool does a AC_SEARCH_LIBS(dlopen, dl), but plugins 50# save LIBS, libtool does a AC_SEARCH_LIBS(dlopen, dl), but plugins
51# need not have -ldl added 51# need not have -ldl added
52LT_INIT([disable-static dlopen win32-dll]) 52LT_INIT([disable-static dlopen win32-dll])
@@ -189,9 +189,7 @@ AC_DEFINE_DIR([ISOLOCALEDIR], [ISOPFX/share/locale], [iso-639 catalog])
189# relative plugin directory 189# relative plugin directory
190rplugindir="libextractor" 190rplugindir="libextractor"
191AC_ARG_WITH(plugindirname, 191AC_ARG_WITH(plugindirname,
192 AC_HELP_STRING( 192 AS_HELP_STRING([--with-plugindirname],[install directory for plugins (always relative to libdir)]),
193 [--with-plugindirname],
194 [install directory for plugins (always relative to libdir)]),
195 [rplugindir=$withval]) 193 [rplugindir=$withval])
196AC_SUBST(RPLUGINDIR, $rplugindir) 194AC_SUBST(RPLUGINDIR, $rplugindir)
197 195
@@ -456,9 +454,6 @@ AC_MSG_RESULT($enable_test_run)
456AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) 454AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
457 455
458 456
459
460# Checks for header files.
461AC_HEADER_STDC
462AC_HEADER_DIRENT 457AC_HEADER_DIRENT
463AC_HEADER_STDBOOL 458AC_HEADER_STDBOOL
464AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h]) 459AC_CHECK_HEADERS([iconv.h fcntl.h netinet/in.h stdlib.h string.h unistd.h libintl.h limits.h stddef.h zlib.h])
@@ -553,7 +548,7 @@ AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS])
553LE_LIB_LIBS=$LIBS 548LE_LIB_LIBS=$LIBS
554LIBS=$LIBSOLD 549LIBS=$LIBSOLD
555 550
556AM_GNU_GETTEXT_VERSION([0.16.1]) 551AM_GNU_GETTEXT_VERSION([0.21])
557AM_GNU_GETTEXT([external]) 552AM_GNU_GETTEXT([external])
558 553
559# check for GNU LD 554# check for GNU LD
@@ -566,7 +561,7 @@ AM_PATH_GLIB_2_0(2.0.0,
566 without_glib=true) 561 without_glib=true)
567AC_MSG_CHECKING([whether glib is disabled]) 562AC_MSG_CHECKING([whether glib is disabled])
568AC_ARG_ENABLE(glib, 563AC_ARG_ENABLE(glib,
569 [AC_HELP_STRING([--disable-glib],[disable glib support])], 564 [AS_HELP_STRING([--disable-glib],[disable glib support])],
570 [case "$enableval" in 565 [case "$enableval" in
571 no) AC_MSG_RESULT(disabled) 566 no) AC_MSG_RESULT(disabled)
572 without_glib=true 567 without_glib=true
@@ -648,38 +643,6 @@ CPPFLAGS="$CPPFLAGS_OLD"
648AC_CHECK_PROG([HAVE_ZZUF],[zzuf], 1, 0) 643AC_CHECK_PROG([HAVE_ZZUF],[zzuf], 1, 0)
649AM_CONDITIONAL(HAVE_ZZUF, test 0 != $HAVE_ZZUF) 644AM_CONDITIONAL(HAVE_ZZUF, test 0 != $HAVE_ZZUF)
650 645
651AC_MSG_CHECKING([whether to enable the FFmpeg thumbnail extractor])
652new_ffmpeg=0
653AC_ARG_ENABLE(ffmpeg,
654 [AC_HELP_STRING([--enable-ffmpeg],[Enable FFmpeg support])
655 AC_HELP_STRING([--disable-ffmpeg],[Disable FFmpeg support])],
656 [AS_CASE(["$enableval"],
657 [no],[
658 AC_MSG_RESULT(no)
659 ffmpeg_enabled=0
660 ],[
661 AC_MSG_RESULT(yes)
662 ffmpeg_enabled=1
663 ])],
664 [ AC_MSG_RESULT(yes)
665 ffmpeg_enabled=1])
666AS_IF([test x$ffmpeg_enabled = x1],
667 [ffmpeg_enabled=0
668 new_ffmpeg=0
669 AC_CHECK_HEADERS([libavutil/avutil.h libavformat/avformat.h libavcodec/avcodec.h libavutil/frame.h],
670 AC_CHECK_HEADERS([libavresample/avresample.h],
671 AC_CHECK_LIB(avutil, av_audio_fifo_alloc,
672 new_ffmpeg=1)))
673
674 AC_CHECK_LIB(swscale, sws_getContext,
675 AC_CHECK_LIB(avcodec, avcodec_alloc_context3,
676 ffmpeg_enabled=1))
677 AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h ffmpeg/swscale.h])
678 ])
679AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0)
680AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0)
681
682
683LE_INTLINCL="" 646LE_INTLINCL=""
684LE_LIBINTL="$LTLIBINTL" 647LE_LIBINTL="$LTLIBINTL"
685AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval) 648AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval)
@@ -775,12 +738,6 @@ AS_IF([test "x$HAVE_GIF_TRUE" = "x#"],
775AS_IF([test "x$have_gsf" != "xtrue"], 738AS_IF([test "x$have_gsf" != "xtrue"],
776 [AC_MSG_NOTICE([NOTICE: libgsf not found, no OLE2 (MS Office) support])]) 739 [AC_MSG_NOTICE([NOTICE: libgsf not found, no OLE2 (MS Office) support])])
777 740
778AS_IF([test "x$ffmpeg_enabled" = "x0"],
779 [AC_MSG_NOTICE([NOTICE: FFmpeg thumbnailer plugin disabled])])
780
781AS_IF([test "x$new_ffmpeg" = "x0"],
782 [AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled, It needs libav >= 10, or a FFmpeg with --enable-libavresample])])
783
784AS_IF([test "x$have_gdk_pixbuf" = "x0"], 741AS_IF([test "x$have_gdk_pixbuf" = "x0"],
785 [AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])]) 742 [AC_MSG_NOTICE([NOTICE: libgdk-pixbuf not found, gtk thumbnail support disabled])])
786 743
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 11b8c27..322f4fc 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,5 +1,5 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2EXTRA_DIST = glibc2.m4 intl.m4 intldir.m4 lock.m4 visibility.m4 \ 2EXTRA_DIST = host-cpu-c-abi.m4 intlmacosx.m4 glibc2.m4 intl.m4 intldir.m4 lock.m4 visibility.m4 \
3 ac_python_devel.m4 \ 3 ac_python_devel.m4 \
4 abi-gsf.m4 \ 4 abi-gsf.m4 \
5 ax_create_pkgconfig_info.m4 \ 5 ax_create_pkgconfig_info.m4 \
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index eef5073..4f25a27 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,15 +1,15 @@
1# gettext.m4 serial 68 (gettext-0.19.8) 1# gettext.m4 serial 71 (gettext-0.20.2)
2dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6dnl 6dnl
7dnl This file can be used in projects which are not available under 7dnl This file can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Lesser General Public
9dnl License but which still want to provide support for the GNU gettext 9dnl License but which still want to provide support for the GNU gettext
10dnl functionality. 10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered 11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU 12dnl by the GNU Lesser General Public License, and the rest of the GNU
13dnl gettext package is covered by the GNU General Public License. 13dnl gettext package is covered by the GNU General Public License.
14dnl They are *not* in the public domain. 14dnl They are *not* in the public domain.
15 15
@@ -20,15 +20,13 @@ dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
20dnl Macro to add for using GNU gettext. 20dnl Macro to add for using GNU gettext.
21 21
22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
23dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 23dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
24dnl default (if it is not specified or empty) is 'no-libtool'. 24dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
25dnl INTLSYMBOL should be 'external' for packages with no intl directory, 25dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
26dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
27dnl If INTLSYMBOL is 'use-libtool', then a libtool library 26dnl If INTLSYMBOL is 'use-libtool', then a libtool library
28dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 27dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
29dnl depending on --{enable,disable}-{shared,static} and on the presence of 28dnl depending on --{enable,disable}-{shared,static} and on the presence of
30dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 29dnl AM-DISABLE-SHARED).
31dnl $(top_builddir)/intl/libintl.a will be created.
32dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 30dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
33dnl implementations (in libc or libintl) without the ngettext() function 31dnl implementations (in libc or libintl) without the ngettext() function
34dnl will be ignored. If NEEDSYMBOL is specified and is 32dnl will be ignored. If NEEDSYMBOL is specified and is
@@ -57,19 +55,17 @@ dnl
57AC_DEFUN([AM_GNU_GETTEXT], 55AC_DEFUN([AM_GNU_GETTEXT],
58[ 56[
59 dnl Argument checking. 57 dnl Argument checking.
60 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 58 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], ,
61 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 59 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
62])])])])]) 60])])])])
63 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], 61 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
64 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) 62 [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
63])])
65 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 64 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
66 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 65 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
67])])])]) 66])])])])
68 define([gt_included_intl], 67 define([gt_included_intl],
69 ifelse([$1], [external], 68 ifelse([$1], [external], [no], [yes]))
70 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
71 [yes]))
72 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
73 gt_NEEDS_INIT 69 gt_NEEDS_INIT
74 AM_GNU_GETTEXT_NEED([$2]) 70 AM_GNU_GETTEXT_NEED([$2])
75 71
@@ -91,8 +87,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
91 dnl again, outside any 'if'. There are two solutions: 87 dnl again, outside any 'if'. There are two solutions:
92 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 88 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
93 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 89 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
94 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 90 dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
95 dnl documented, we avoid it.
96 ifelse(gt_included_intl, yes, , [ 91 ifelse(gt_included_intl, yes, , [
97 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 92 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
98 ]) 93 ])
@@ -278,8 +273,8 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
278 dnl Mark actions used to generate GNU NLS library. 273 dnl Mark actions used to generate GNU NLS library.
279 BUILD_INCLUDED_LIBINTL=yes 274 BUILD_INCLUDED_LIBINTL=yes
280 USE_INCLUDED_LIBINTL=yes 275 USE_INCLUDED_LIBINTL=yes
281 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" 276 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
282 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" 277 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
283 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 278 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
284 fi 279 fi
285 280
@@ -347,43 +342,14 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
347 fi 342 fi
348 343
349 ifelse(gt_included_intl, yes, [ 344 ifelse(gt_included_intl, yes, [
350 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 345 dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
351 dnl to 'yes' because some of the testsuite requires it. 346 dnl because some of the testsuite requires it.
352 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 347 BUILD_INCLUDED_LIBINTL=yes
353 BUILD_INCLUDED_LIBINTL=yes
354 fi
355 348
356 dnl Make all variables we use known to autoconf. 349 dnl Make all variables we use known to autoconf.
357 AC_SUBST([BUILD_INCLUDED_LIBINTL]) 350 AC_SUBST([BUILD_INCLUDED_LIBINTL])
358 AC_SUBST([USE_INCLUDED_LIBINTL]) 351 AC_SUBST([USE_INCLUDED_LIBINTL])
359 AC_SUBST([CATOBJEXT]) 352 AC_SUBST([CATOBJEXT])
360
361 dnl For backward compatibility. Some configure.ins may be using this.
362 nls_cv_header_intl=
363 nls_cv_header_libgt=
364
365 dnl For backward compatibility. Some Makefiles may be using this.
366 DATADIRNAME=share
367 AC_SUBST([DATADIRNAME])
368
369 dnl For backward compatibility. Some Makefiles may be using this.
370 INSTOBJEXT=.mo
371 AC_SUBST([INSTOBJEXT])
372
373 dnl For backward compatibility. Some Makefiles may be using this.
374 GENCAT=gencat
375 AC_SUBST([GENCAT])
376
377 dnl For backward compatibility. Some Makefiles may be using this.
378 INTLOBJS=
379 if test "$USE_INCLUDED_LIBINTL" = yes; then
380 INTLOBJS="\$(GETTOBJS)"
381 fi
382 AC_SUBST([INTLOBJS])
383
384 dnl Enable libtool support if the surrounding package wishes it.
385 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
386 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
387 ]) 353 ])
388 354
389 dnl For backward compatibility. Some Makefiles may be using this. 355 dnl For backward compatibility. Some Makefiles may be using this.
diff --git a/m4/glib-2.0.m4 b/m4/glib-2.0.m4
index 4b19019..5fc357c 100644
--- a/m4/glib-2.0.m4
+++ b/m4/glib-2.0.m4
@@ -2,7 +2,7 @@
2# Owen Taylor 1997-2001 2# Owen Taylor 1997-2001
3 3
4# Increment this whenever this file is changed. 4# Increment this whenever this file is changed.
5#serial 1 5#serial 4
6 6
7dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) 7dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
8dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, 8dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
@@ -12,10 +12,16 @@ AC_DEFUN([AM_PATH_GLIB_2_0],
12[dnl 12[dnl
13dnl Get the cflags and libraries from pkg-config 13dnl Get the cflags and libraries from pkg-config
14dnl 14dnl
15
16dnl We can't use PKG_PREREQ because that needs 0.29.
17m4_ifndef([PKG_PROG_PKG_CONFIG],
18 [pkg.m4 version 0.28 or later is required])
19
15AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], 20AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
16 , enable_glibtest=yes) 21 , enable_glibtest=yes)
17 22
18 pkg_config_args=glib-2.0 23 min_glib_version=ifelse([$1], [], [2.0.0], [$1])
24 pkg_config_args="glib-2.0 >= $min_glib_version"
19 for module in . $4 25 for module in . $4
20 do 26 do
21 case "$module" in 27 case "$module" in
@@ -46,7 +52,15 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
46 PKG_CONFIG=no 52 PKG_CONFIG=no
47 fi 53 fi
48 54
49 min_glib_version=ifelse([$1], ,2.0.0,$1) 55 dnl For GLIB_CFLAGS and GLIB_LIBS
56 PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
57
58 dnl For the tools
59 PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
60 PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.0], [gobject_query])
61 PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
62 PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources])
63
50 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) 64 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
51 65
52 if test x$PKG_CONFIG != xno ; then 66 if test x$PKG_CONFIG != xno ; then
@@ -64,13 +78,6 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
64 fi 78 fi
65 79
66 if test x"$no_glib" = x ; then 80 if test x"$no_glib" = x ; then
67 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
68 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
69 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
70 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
71
72 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
73 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
74 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ 81 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
75 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 82 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
76 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ 83 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
@@ -83,11 +90,11 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
83 CFLAGS="$CFLAGS $GLIB_CFLAGS" 90 CFLAGS="$CFLAGS $GLIB_CFLAGS"
84 LIBS="$GLIB_LIBS $LIBS" 91 LIBS="$GLIB_LIBS $LIBS"
85dnl 92dnl
86dnl Now check if the installed GLIB is sufficiently new. (Also sanity 93dnl Now check if the installed GLib is sufficiently new. (Also sanity
87dnl checks the results of pkg-config to some extent) 94dnl checks the results of pkg-config to some extent)
88dnl 95dnl
89 rm -f conf.glibtest 96 rm -f conf.glibtest
90 AC_TRY_RUN([ 97 AC_RUN_IFELSE([AC_LANG_SOURCE([[
91#include <glib.h> 98#include <glib.h>
92#include <stdio.h> 99#include <stdio.h>
93#include <stdlib.h> 100#include <stdlib.h>
@@ -113,7 +120,7 @@ main (void)
113 glib_major_version, glib_minor_version, glib_micro_version); 120 glib_major_version, glib_minor_version, glib_micro_version);
114 printf ("*** was found! If pkg-config was correct, then it is best\n"); 121 printf ("*** was found! If pkg-config was correct, then it is best\n");
115 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); 122 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
116 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); 123 printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
117 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); 124 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
118 printf("*** required on your system.\n"); 125 printf("*** required on your system.\n");
119 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); 126 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
@@ -123,7 +130,7 @@ main (void)
123 (glib_minor_version != GLIB_MINOR_VERSION) || 130 (glib_minor_version != GLIB_MINOR_VERSION) ||
124 (glib_micro_version != GLIB_MICRO_VERSION)) 131 (glib_micro_version != GLIB_MICRO_VERSION))
125 { 132 {
126 printf("*** GLIB header files (version %d.%d.%d) do not match\n", 133 printf("*** GLib header files (version %d.%d.%d) do not match\n",
127 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); 134 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
128 printf("*** library (version %d.%d.%d)\n", 135 printf("*** library (version %d.%d.%d)\n",
129 glib_major_version, glib_minor_version, glib_micro_version); 136 glib_major_version, glib_minor_version, glib_micro_version);
@@ -138,24 +145,24 @@ main (void)
138 } 145 }
139 else 146 else
140 { 147 {
141 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", 148 printf("\n*** An old version of GLib (%u.%u.%u) was found.\n",
142 glib_major_version, glib_minor_version, glib_micro_version); 149 glib_major_version, glib_minor_version, glib_micro_version);
143 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", 150 printf("*** You need a version of GLib newer than %u.%u.%u. The latest version of\n",
144 major, minor, micro); 151 major, minor, micro);
145 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); 152 printf("*** GLib is always available from ftp://ftp.gtk.org.\n");
146 printf("***\n"); 153 printf("***\n");
147 printf("*** If you have already installed a sufficiently new version, this error\n"); 154 printf("*** If you have already installed a sufficiently new version, this error\n");
148 printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); 155 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
149 printf("*** being found. The easiest way to fix this is to remove the old version\n"); 156 printf("*** being found. The easiest way to fix this is to remove the old version\n");
150 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); 157 printf("*** of GLib, but you can also set the PKG_CONFIG environment to point to the\n");
151 printf("*** correct copy of pkg-config. (In this case, you will have to\n"); 158 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
152 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); 159 printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
153 printf("*** so that the correct libraries are found at run-time))\n"); 160 printf("*** so that the correct libraries are found at run-time))\n");
154 } 161 }
155 } 162 }
156 return 1; 163 return 1;
157} 164}
158],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 165]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
159 CFLAGS="$ac_save_CFLAGS" 166 CFLAGS="$ac_save_CFLAGS"
160 LIBS="$ac_save_LIBS" 167 LIBS="$ac_save_LIBS"
161 fi 168 fi
@@ -172,18 +179,18 @@ main (void)
172 if test -f conf.glibtest ; then 179 if test -f conf.glibtest ; then
173 : 180 :
174 else 181 else
175 echo "*** Could not run GLIB test program, checking why..." 182 echo "*** Could not run GLib test program, checking why..."
176 ac_save_CFLAGS="$CFLAGS" 183 ac_save_CFLAGS="$CFLAGS"
177 ac_save_LIBS="$LIBS" 184 ac_save_LIBS="$LIBS"
178 CFLAGS="$CFLAGS $GLIB_CFLAGS" 185 CFLAGS="$CFLAGS $GLIB_CFLAGS"
179 LIBS="$LIBS $GLIB_LIBS" 186 LIBS="$LIBS $GLIB_LIBS"
180 AC_TRY_LINK([ 187 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
181#include <glib.h> 188#include <glib.h>
182#include <stdio.h> 189#include <stdio.h>
183], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], 190]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])],
184 [ echo "*** The test program compiled, but did not run. This usually means" 191 [ echo "*** The test program compiled, but did not run. This usually means"
185 echo "*** that the run-time linker is not finding GLIB or finding the wrong" 192 echo "*** that the run-time linker is not finding GLib or finding the wrong"
186 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" 193 echo "*** version of GLib. If it is not finding GLib, you'll need to set your"
187 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 194 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
188 echo "*** to the installed location Also, make sure you have run ldconfig if that" 195 echo "*** to the installed location Also, make sure you have run ldconfig if that"
189 echo "*** is required on your system" 196 echo "*** is required on your system"
@@ -191,7 +198,7 @@ main (void)
191 echo "*** If you have an old version installed, it is best to remove it, although" 198 echo "*** If you have an old version installed, it is best to remove it, although"
192 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], 199 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
193 [ echo "*** The test program failed to compile or link. See the file config.log for the" 200 [ echo "*** The test program failed to compile or link. See the file config.log for the"
194 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) 201 echo "*** exact error that occurred. This usually means GLib is incorrectly installed."])
195 CFLAGS="$ac_save_CFLAGS" 202 CFLAGS="$ac_save_CFLAGS"
196 LIBS="$ac_save_LIBS" 203 LIBS="$ac_save_LIBS"
197 fi 204 fi
@@ -204,11 +211,5 @@ main (void)
204 GLIB_COMPILE_RESOURCES="" 211 GLIB_COMPILE_RESOURCES=""
205 ifelse([$3], , :, [$3]) 212 ifelse([$3], , :, [$3])
206 fi 213 fi
207 AC_SUBST(GLIB_CFLAGS)
208 AC_SUBST(GLIB_LIBS)
209 AC_SUBST(GLIB_GENMARSHAL)
210 AC_SUBST(GOBJECT_QUERY)
211 AC_SUBST(GLIB_MKENUMS)
212 AC_SUBST(GLIB_COMPILE_RESOURCES)
213 rm -f conf.glibtest 214 rm -f conf.glibtest
214]) 215])
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
new file mode 100644
index 0000000..6db2aa2
--- /dev/null
+++ b/m4/host-cpu-c-abi.m4
@@ -0,0 +1,675 @@
1# host-cpu-c-abi.m4 serial 13
2dnl Copyright (C) 2002-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible and Sam Steingold.
8
9dnl Sets the HOST_CPU variable to the canonical name of the CPU.
10dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
11dnl C language ABI (application binary interface).
12dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
13dnl config.h.
14dnl
15dnl This canonical name can be used to select a particular assembly language
16dnl source file that will interoperate with C code on the given host.
17dnl
18dnl For example:
19dnl * 'i386' and 'sparc' are different canonical names, because code for i386
20dnl will not run on SPARC CPUs and vice versa. They have different
21dnl instruction sets.
22dnl * 'sparc' and 'sparc64' are different canonical names, because code for
23dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
24dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
25dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
26dnl mode, but not both.
27dnl * 'mips' and 'mipsn32' are different canonical names, because they use
28dnl different argument passing and return conventions for C functions, and
29dnl although the instruction set of 'mips' is a large subset of the
30dnl instruction set of 'mipsn32'.
31dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
32dnl different sizes for the C types like 'int' and 'void *', and although
33dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
34dnl * The same canonical name is used for different endiannesses. You can
35dnl determine the endianness through preprocessor symbols:
36dnl - 'arm': test __ARMEL__.
37dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
38dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
39dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
40dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
41dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
42dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
43dnl assembly language source files use such instructions, you will
44dnl need to make the distinction.
45dnl - Speed of execution of the common instruction set is reasonable across
46dnl the entire family of CPUs. If you have assembly language source files
47dnl that are optimized for particular CPU types (like GNU gmp has), you
48dnl will need to make the distinction.
49dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
50AC_DEFUN([gl_HOST_CPU_C_ABI],
51[
52 AC_REQUIRE([AC_CANONICAL_HOST])
53 AC_REQUIRE([gl_C_ASM])
54 AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
55 [case "$host_cpu" in
56
57changequote(,)dnl
58 i[34567]86 )
59changequote([,])dnl
60 gl_cv_host_cpu_c_abi=i386
61 ;;
62
63 x86_64 )
64 # On x86_64 systems, the C compiler may be generating code in one of
65 # these ABIs:
66 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
67 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
68 # with native Windows (mingw, MSVC).
69 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
70 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
71 AC_COMPILE_IFELSE(
72 [AC_LANG_SOURCE(
73 [[#if (defined __x86_64__ || defined __amd64__ \
74 || defined _M_X64 || defined _M_AMD64)
75 int ok;
76 #else
77 error fail
78 #endif
79 ]])],
80 [AC_COMPILE_IFELSE(
81 [AC_LANG_SOURCE(
82 [[#if defined __ILP32__ || defined _ILP32
83 int ok;
84 #else
85 error fail
86 #endif
87 ]])],
88 [gl_cv_host_cpu_c_abi=x86_64-x32],
89 [gl_cv_host_cpu_c_abi=x86_64])],
90 [gl_cv_host_cpu_c_abi=i386])
91 ;;
92
93changequote(,)dnl
94 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
95changequote([,])dnl
96 gl_cv_host_cpu_c_abi=alpha
97 ;;
98
99 arm* | aarch64 )
100 # Assume arm with EABI.
101 # On arm64 systems, the C compiler may be generating code in one of
102 # these ABIs:
103 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
104 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
105 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
106 AC_COMPILE_IFELSE(
107 [AC_LANG_SOURCE(
108 [[#ifdef __aarch64__
109 int ok;
110 #else
111 error fail
112 #endif
113 ]])],
114 [AC_COMPILE_IFELSE(
115 [AC_LANG_SOURCE(
116 [[#if defined __ILP32__ || defined _ILP32
117 int ok;
118 #else
119 error fail
120 #endif
121 ]])],
122 [gl_cv_host_cpu_c_abi=arm64-ilp32],
123 [gl_cv_host_cpu_c_abi=arm64])],
124 [# Don't distinguish little-endian and big-endian arm, since they
125 # don't require different machine code for simple operations and
126 # since the user can distinguish them through the preprocessor
127 # defines __ARMEL__ vs. __ARMEB__.
128 # But distinguish arm which passes floating-point arguments and
129 # return values in integer registers (r0, r1, ...) - this is
130 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
131 # passes them in float registers (s0, s1, ...) and double registers
132 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
133 # sets the preprocessor defines __ARM_PCS (for the first case) and
134 # __ARM_PCS_VFP (for the second case), but older GCC does not.
135 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
136 # Look for a reference to the register d0 in the .s file.
137 AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
138 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
139 gl_cv_host_cpu_c_abi=armhf
140 else
141 gl_cv_host_cpu_c_abi=arm
142 fi
143 rm -f conftest*
144 ])
145 ;;
146
147 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
148 # On hppa, the C compiler may be generating 32-bit code or 64-bit
149 # code. In the latter case, it defines _LP64 and __LP64__.
150 AC_COMPILE_IFELSE(
151 [AC_LANG_SOURCE(
152 [[#ifdef __LP64__
153 int ok;
154 #else
155 error fail
156 #endif
157 ]])],
158 [gl_cv_host_cpu_c_abi=hppa64],
159 [gl_cv_host_cpu_c_abi=hppa])
160 ;;
161
162 ia64* )
163 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
164 # 32-bit code. In the latter case, it defines _ILP32.
165 AC_COMPILE_IFELSE(
166 [AC_LANG_SOURCE(
167 [[#ifdef _ILP32
168 int ok;
169 #else
170 error fail
171 #endif
172 ]])],
173 [gl_cv_host_cpu_c_abi=ia64-ilp32],
174 [gl_cv_host_cpu_c_abi=ia64])
175 ;;
176
177 mips* )
178 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
179 # at 32.
180 AC_COMPILE_IFELSE(
181 [AC_LANG_SOURCE(
182 [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
183 int ok;
184 #else
185 error fail
186 #endif
187 ]])],
188 [gl_cv_host_cpu_c_abi=mips64],
189 [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
190 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
191 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
192 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
193 AC_COMPILE_IFELSE(
194 [AC_LANG_SOURCE(
195 [[#if (_MIPS_SIM == _ABIN32)
196 int ok;
197 #else
198 error fail
199 #endif
200 ]])],
201 [gl_cv_host_cpu_c_abi=mipsn32],
202 [gl_cv_host_cpu_c_abi=mips])])
203 ;;
204
205 powerpc* )
206 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
207 # No need to distinguish them here; the caller may distinguish
208 # them based on the OS.
209 # On powerpc64 systems, the C compiler may still be generating
210 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
211 # be generating 64-bit code.
212 AC_COMPILE_IFELSE(
213 [AC_LANG_SOURCE(
214 [[#if defined __powerpc64__ || defined _ARCH_PPC64
215 int ok;
216 #else
217 error fail
218 #endif
219 ]])],
220 [# On powerpc64, there are two ABIs on Linux: The AIX compatible
221 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
222 AC_COMPILE_IFELSE(
223 [AC_LANG_SOURCE(
224 [[#if defined _CALL_ELF && _CALL_ELF == 2
225 int ok;
226 #else
227 error fail
228 #endif
229 ]])],
230 [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
231 [gl_cv_host_cpu_c_abi=powerpc64])
232 ],
233 [gl_cv_host_cpu_c_abi=powerpc])
234 ;;
235
236 rs6000 )
237 gl_cv_host_cpu_c_abi=powerpc
238 ;;
239
240 riscv32 | riscv64 )
241 # There are 2 architectures (with variants): rv32* and rv64*.
242 AC_COMPILE_IFELSE(
243 [AC_LANG_SOURCE(
244 [[#if __riscv_xlen == 64
245 int ok;
246 #else
247 error fail
248 #endif
249 ]])],
250 [cpu=riscv64],
251 [cpu=riscv32])
252 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
253 # Size of 'long' and 'void *':
254 AC_COMPILE_IFELSE(
255 [AC_LANG_SOURCE(
256 [[#if defined __LP64__
257 int ok;
258 #else
259 error fail
260 #endif
261 ]])],
262 [main_abi=lp64],
263 [main_abi=ilp32])
264 # Float ABIs:
265 # __riscv_float_abi_double:
266 # 'float' and 'double' are passed in floating-point registers.
267 # __riscv_float_abi_single:
268 # 'float' are passed in floating-point registers.
269 # __riscv_float_abi_soft:
270 # No values are passed in floating-point registers.
271 AC_COMPILE_IFELSE(
272 [AC_LANG_SOURCE(
273 [[#if defined __riscv_float_abi_double
274 int ok;
275 #else
276 error fail
277 #endif
278 ]])],
279 [float_abi=d],
280 [AC_COMPILE_IFELSE(
281 [AC_LANG_SOURCE(
282 [[#if defined __riscv_float_abi_single
283 int ok;
284 #else
285 error fail
286 #endif
287 ]])],
288 [float_abi=f],
289 [float_abi=''])
290 ])
291 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
292 ;;
293
294 s390* )
295 # On s390x, the C compiler may be generating 64-bit (= s390x) code
296 # or 31-bit (= s390) code.
297 AC_COMPILE_IFELSE(
298 [AC_LANG_SOURCE(
299 [[#if defined __LP64__ || defined __s390x__
300 int ok;
301 #else
302 error fail
303 #endif
304 ]])],
305 [gl_cv_host_cpu_c_abi=s390x],
306 [gl_cv_host_cpu_c_abi=s390])
307 ;;
308
309 sparc | sparc64 )
310 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
311 # C compiler still generates 32-bit code.
312 AC_COMPILE_IFELSE(
313 [AC_LANG_SOURCE(
314 [[#if defined __sparcv9 || defined __arch64__
315 int ok;
316 #else
317 error fail
318 #endif
319 ]])],
320 [gl_cv_host_cpu_c_abi=sparc64],
321 [gl_cv_host_cpu_c_abi=sparc])
322 ;;
323
324 *)
325 gl_cv_host_cpu_c_abi="$host_cpu"
326 ;;
327 esac
328 ])
329
330 dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
331 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
332 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
333 AC_SUBST([HOST_CPU])
334 AC_SUBST([HOST_CPU_C_ABI])
335
336 # This was
337 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
338 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
339 # earlier, but KAI C++ 3.2d doesn't like this.
340 sed -e 's/-/_/g' >> confdefs.h <<EOF
341#ifndef __${HOST_CPU}__
342#define __${HOST_CPU}__ 1
343#endif
344#ifndef __${HOST_CPU_C_ABI}__
345#define __${HOST_CPU_C_ABI}__ 1
346#endif
347EOF
348 AH_TOP([/* CPU and C ABI indicator */
349#ifndef __i386__
350#undef __i386__
351#endif
352#ifndef __x86_64_x32__
353#undef __x86_64_x32__
354#endif
355#ifndef __x86_64__
356#undef __x86_64__
357#endif
358#ifndef __alpha__
359#undef __alpha__
360#endif
361#ifndef __arm__
362#undef __arm__
363#endif
364#ifndef __armhf__
365#undef __armhf__
366#endif
367#ifndef __arm64_ilp32__
368#undef __arm64_ilp32__
369#endif
370#ifndef __arm64__
371#undef __arm64__
372#endif
373#ifndef __hppa__
374#undef __hppa__
375#endif
376#ifndef __hppa64__
377#undef __hppa64__
378#endif
379#ifndef __ia64_ilp32__
380#undef __ia64_ilp32__
381#endif
382#ifndef __ia64__
383#undef __ia64__
384#endif
385#ifndef __m68k__
386#undef __m68k__
387#endif
388#ifndef __mips__
389#undef __mips__
390#endif
391#ifndef __mipsn32__
392#undef __mipsn32__
393#endif
394#ifndef __mips64__
395#undef __mips64__
396#endif
397#ifndef __powerpc__
398#undef __powerpc__
399#endif
400#ifndef __powerpc64__
401#undef __powerpc64__
402#endif
403#ifndef __powerpc64_elfv2__
404#undef __powerpc64_elfv2__
405#endif
406#ifndef __riscv32__
407#undef __riscv32__
408#endif
409#ifndef __riscv64__
410#undef __riscv64__
411#endif
412#ifndef __riscv32_ilp32__
413#undef __riscv32_ilp32__
414#endif
415#ifndef __riscv32_ilp32f__
416#undef __riscv32_ilp32f__
417#endif
418#ifndef __riscv32_ilp32d__
419#undef __riscv32_ilp32d__
420#endif
421#ifndef __riscv64_ilp32__
422#undef __riscv64_ilp32__
423#endif
424#ifndef __riscv64_ilp32f__
425#undef __riscv64_ilp32f__
426#endif
427#ifndef __riscv64_ilp32d__
428#undef __riscv64_ilp32d__
429#endif
430#ifndef __riscv64_lp64__
431#undef __riscv64_lp64__
432#endif
433#ifndef __riscv64_lp64f__
434#undef __riscv64_lp64f__
435#endif
436#ifndef __riscv64_lp64d__
437#undef __riscv64_lp64d__
438#endif
439#ifndef __s390__
440#undef __s390__
441#endif
442#ifndef __s390x__
443#undef __s390x__
444#endif
445#ifndef __sh__
446#undef __sh__
447#endif
448#ifndef __sparc__
449#undef __sparc__
450#endif
451#ifndef __sparc64__
452#undef __sparc64__
453#endif
454])
455
456])
457
458
459dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
460dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
461dnl one, or to 'unknown' if unknown.
462dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
463AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
464[
465 AC_REQUIRE([AC_CANONICAL_HOST])
466 AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
467 [if test -n "$gl_cv_host_cpu_c_abi"; then
468 case "$gl_cv_host_cpu_c_abi" in
469 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
470 gl_cv_host_cpu_c_abi_32bit=yes ;;
471 x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
472 gl_cv_host_cpu_c_abi_32bit=no ;;
473 *)
474 gl_cv_host_cpu_c_abi_32bit=unknown ;;
475 esac
476 else
477 case "$host_cpu" in
478
479 # CPUs that only support a 32-bit ABI.
480 arc \
481 | bfin \
482 | cris* \
483 | csky \
484 | epiphany \
485 | ft32 \
486 | h8300 \
487 | m68k \
488 | microblaze | microblazeel \
489 | nds32 | nds32le | nds32be \
490 | nios2 | nios2eb | nios2el \
491 | or1k* \
492 | or32 \
493 | sh | sh[1234] | sh[1234]e[lb] \
494 | tic6x \
495 | xtensa* )
496 gl_cv_host_cpu_c_abi_32bit=yes
497 ;;
498
499 # CPUs that only support a 64-bit ABI.
500changequote(,)dnl
501 alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
502 | mmix )
503changequote([,])dnl
504 gl_cv_host_cpu_c_abi_32bit=no
505 ;;
506
507changequote(,)dnl
508 i[34567]86 )
509changequote([,])dnl
510 gl_cv_host_cpu_c_abi_32bit=yes
511 ;;
512
513 x86_64 )
514 # On x86_64 systems, the C compiler may be generating code in one of
515 # these ABIs:
516 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
517 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
518 # with native Windows (mingw, MSVC).
519 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
520 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
521 AC_COMPILE_IFELSE(
522 [AC_LANG_SOURCE(
523 [[#if (defined __x86_64__ || defined __amd64__ \
524 || defined _M_X64 || defined _M_AMD64) \
525 && !(defined __ILP32__ || defined _ILP32)
526 int ok;
527 #else
528 error fail
529 #endif
530 ]])],
531 [gl_cv_host_cpu_c_abi_32bit=no],
532 [gl_cv_host_cpu_c_abi_32bit=yes])
533 ;;
534
535 arm* | aarch64 )
536 # Assume arm with EABI.
537 # On arm64 systems, the C compiler may be generating code in one of
538 # these ABIs:
539 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
540 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
541 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
542 AC_COMPILE_IFELSE(
543 [AC_LANG_SOURCE(
544 [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
545 int ok;
546 #else
547 error fail
548 #endif
549 ]])],
550 [gl_cv_host_cpu_c_abi_32bit=no],
551 [gl_cv_host_cpu_c_abi_32bit=yes])
552 ;;
553
554 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
555 # On hppa, the C compiler may be generating 32-bit code or 64-bit
556 # code. In the latter case, it defines _LP64 and __LP64__.
557 AC_COMPILE_IFELSE(
558 [AC_LANG_SOURCE(
559 [[#ifdef __LP64__
560 int ok;
561 #else
562 error fail
563 #endif
564 ]])],
565 [gl_cv_host_cpu_c_abi_32bit=no],
566 [gl_cv_host_cpu_c_abi_32bit=yes])
567 ;;
568
569 ia64* )
570 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
571 # 32-bit code. In the latter case, it defines _ILP32.
572 AC_COMPILE_IFELSE(
573 [AC_LANG_SOURCE(
574 [[#ifdef _ILP32
575 int ok;
576 #else
577 error fail
578 #endif
579 ]])],
580 [gl_cv_host_cpu_c_abi_32bit=yes],
581 [gl_cv_host_cpu_c_abi_32bit=no])
582 ;;
583
584 mips* )
585 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
586 # at 32.
587 AC_COMPILE_IFELSE(
588 [AC_LANG_SOURCE(
589 [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
590 int ok;
591 #else
592 error fail
593 #endif
594 ]])],
595 [gl_cv_host_cpu_c_abi_32bit=no],
596 [gl_cv_host_cpu_c_abi_32bit=yes])
597 ;;
598
599 powerpc* )
600 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
601 # No need to distinguish them here; the caller may distinguish
602 # them based on the OS.
603 # On powerpc64 systems, the C compiler may still be generating
604 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
605 # be generating 64-bit code.
606 AC_COMPILE_IFELSE(
607 [AC_LANG_SOURCE(
608 [[#if defined __powerpc64__ || defined _ARCH_PPC64
609 int ok;
610 #else
611 error fail
612 #endif
613 ]])],
614 [gl_cv_host_cpu_c_abi_32bit=no],
615 [gl_cv_host_cpu_c_abi_32bit=yes])
616 ;;
617
618 rs6000 )
619 gl_cv_host_cpu_c_abi_32bit=yes
620 ;;
621
622 riscv32 | riscv64 )
623 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
624 # Size of 'long' and 'void *':
625 AC_COMPILE_IFELSE(
626 [AC_LANG_SOURCE(
627 [[#if defined __LP64__
628 int ok;
629 #else
630 error fail
631 #endif
632 ]])],
633 [gl_cv_host_cpu_c_abi_32bit=no],
634 [gl_cv_host_cpu_c_abi_32bit=yes])
635 ;;
636
637 s390* )
638 # On s390x, the C compiler may be generating 64-bit (= s390x) code
639 # or 31-bit (= s390) code.
640 AC_COMPILE_IFELSE(
641 [AC_LANG_SOURCE(
642 [[#if defined __LP64__ || defined __s390x__
643 int ok;
644 #else
645 error fail
646 #endif
647 ]])],
648 [gl_cv_host_cpu_c_abi_32bit=no],
649 [gl_cv_host_cpu_c_abi_32bit=yes])
650 ;;
651
652 sparc | sparc64 )
653 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
654 # C compiler still generates 32-bit code.
655 AC_COMPILE_IFELSE(
656 [AC_LANG_SOURCE(
657 [[#if defined __sparcv9 || defined __arch64__
658 int ok;
659 #else
660 error fail
661 #endif
662 ]])],
663 [gl_cv_host_cpu_c_abi_32bit=no],
664 [gl_cv_host_cpu_c_abi_32bit=yes])
665 ;;
666
667 *)
668 gl_cv_host_cpu_c_abi_32bit=unknown
669 ;;
670 esac
671 fi
672 ])
673
674 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
675])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 654c415..e593b72 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,6 @@
1# iconv.m4 serial AM4 (gettext-0.11.3) 1# iconv.m4 serial 21
2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation,
3dnl Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -21,6 +22,7 @@ AC_DEFUN([AM_ICONV_LINK],
21[ 22[
22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 23 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23 dnl those with the standalone portable GNU libiconv installed). 24 dnl those with the standalone portable GNU libiconv installed).
25 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
24 26
25 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 27 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
26 dnl accordingly. 28 dnl accordingly.
@@ -29,34 +31,185 @@ AC_DEFUN([AM_ICONV_LINK],
29 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 31 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
30 dnl because if the user has installed libiconv and not disabled its use 32 dnl because if the user has installed libiconv and not disabled its use
31 dnl via --without-libiconv-prefix, he wants to use it. The first 33 dnl via --without-libiconv-prefix, he wants to use it. The first
32 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 34 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
33 am_save_CPPFLAGS="$CPPFLAGS" 35 am_save_CPPFLAGS="$CPPFLAGS"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 36 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
35 37
36 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 38 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
37 am_cv_func_iconv="no, consider installing GNU libiconv" 39 am_cv_func_iconv="no, consider installing GNU libiconv"
38 am_cv_lib_iconv=no 40 am_cv_lib_iconv=no
39 AC_TRY_LINK([#include <stdlib.h> 41 AC_LINK_IFELSE(
40#include <iconv.h>], 42 [AC_LANG_PROGRAM(
41 [iconv_t cd = iconv_open("",""); 43 [[
42 iconv(cd,NULL,NULL,NULL,NULL); 44#include <stdlib.h>
43 iconv_close(cd);], 45#include <iconv.h>
44 am_cv_func_iconv=yes) 46 ]],
47 [[iconv_t cd = iconv_open("","");
48 iconv(cd,NULL,NULL,NULL,NULL);
49 iconv_close(cd);]])],
50 [am_cv_func_iconv=yes])
45 if test "$am_cv_func_iconv" != yes; then 51 if test "$am_cv_func_iconv" != yes; then
46 am_save_LIBS="$LIBS" 52 am_save_LIBS="$LIBS"
47 LIBS="$LIBS $LIBICONV" 53 LIBS="$LIBS $LIBICONV"
48 AC_TRY_LINK([#include <stdlib.h> 54 AC_LINK_IFELSE(
49#include <iconv.h>], 55 [AC_LANG_PROGRAM(
50 [iconv_t cd = iconv_open("",""); 56 [[
51 iconv(cd,NULL,NULL,NULL,NULL); 57#include <stdlib.h>
52 iconv_close(cd);], 58#include <iconv.h>
53 am_cv_lib_iconv=yes 59 ]],
54 am_cv_func_iconv=yes) 60 [[iconv_t cd = iconv_open("","");
61 iconv(cd,NULL,NULL,NULL,NULL);
62 iconv_close(cd);]])],
63 [am_cv_lib_iconv=yes]
64 [am_cv_func_iconv=yes])
55 LIBS="$am_save_LIBS" 65 LIBS="$am_save_LIBS"
56 fi 66 fi
57 ]) 67 ])
58 if test "$am_cv_func_iconv" = yes; then 68 if test "$am_cv_func_iconv" = yes; then
59 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 69 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
70 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
71 dnl Solaris 10.
72 am_save_LIBS="$LIBS"
73 if test $am_cv_lib_iconv = yes; then
74 LIBS="$LIBS $LIBICONV"
75 fi
76 am_cv_func_iconv_works=no
77 for ac_iconv_const in '' 'const'; do
78 AC_RUN_IFELSE(
79 [AC_LANG_PROGRAM(
80 [[
81#include <iconv.h>
82#include <string.h>
83
84#ifndef ICONV_CONST
85# define ICONV_CONST $ac_iconv_const
86#endif
87 ]],
88 [[int result = 0;
89 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
90 returns. */
91 {
92 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
93 if (cd_utf8_to_88591 != (iconv_t)(-1))
94 {
95 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
96 char buf[10];
97 ICONV_CONST char *inptr = input;
98 size_t inbytesleft = strlen (input);
99 char *outptr = buf;
100 size_t outbytesleft = sizeof (buf);
101 size_t res = iconv (cd_utf8_to_88591,
102 &inptr, &inbytesleft,
103 &outptr, &outbytesleft);
104 if (res == 0)
105 result |= 1;
106 iconv_close (cd_utf8_to_88591);
107 }
108 }
109 /* Test against Solaris 10 bug: Failures are not distinguishable from
110 successful returns. */
111 {
112 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
113 if (cd_ascii_to_88591 != (iconv_t)(-1))
114 {
115 static ICONV_CONST char input[] = "\263";
116 char buf[10];
117 ICONV_CONST char *inptr = input;
118 size_t inbytesleft = strlen (input);
119 char *outptr = buf;
120 size_t outbytesleft = sizeof (buf);
121 size_t res = iconv (cd_ascii_to_88591,
122 &inptr, &inbytesleft,
123 &outptr, &outbytesleft);
124 if (res == 0)
125 result |= 2;
126 iconv_close (cd_ascii_to_88591);
127 }
128 }
129 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
130 {
131 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
132 if (cd_88591_to_utf8 != (iconv_t)(-1))
133 {
134 static ICONV_CONST char input[] = "\304";
135 static char buf[2] = { (char)0xDE, (char)0xAD };
136 ICONV_CONST char *inptr = input;
137 size_t inbytesleft = 1;
138 char *outptr = buf;
139 size_t outbytesleft = 1;
140 size_t res = iconv (cd_88591_to_utf8,
141 &inptr, &inbytesleft,
142 &outptr, &outbytesleft);
143 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
144 result |= 4;
145 iconv_close (cd_88591_to_utf8);
146 }
147 }
148#if 0 /* This bug could be worked around by the caller. */
149 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
150 {
151 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
152 if (cd_88591_to_utf8 != (iconv_t)(-1))
153 {
154 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
155 char buf[50];
156 ICONV_CONST char *inptr = input;
157 size_t inbytesleft = strlen (input);
158 char *outptr = buf;
159 size_t outbytesleft = sizeof (buf);
160 size_t res = iconv (cd_88591_to_utf8,
161 &inptr, &inbytesleft,
162 &outptr, &outbytesleft);
163 if ((int)res > 0)
164 result |= 8;
165 iconv_close (cd_88591_to_utf8);
166 }
167 }
168#endif
169 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
170 provided. */
171 {
172 /* Try standardized names. */
173 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
174 /* Try IRIX, OSF/1 names. */
175 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
176 /* Try AIX names. */
177 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
178 /* Try HP-UX names. */
179 iconv_t cd4 = iconv_open ("utf8", "eucJP");
180 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
181 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
182 result |= 16;
183 if (cd1 != (iconv_t)(-1))
184 iconv_close (cd1);
185 if (cd2 != (iconv_t)(-1))
186 iconv_close (cd2);
187 if (cd3 != (iconv_t)(-1))
188 iconv_close (cd3);
189 if (cd4 != (iconv_t)(-1))
190 iconv_close (cd4);
191 }
192 return result;
193]])],
194 [am_cv_func_iconv_works=yes], ,
195 [case "$host_os" in
196 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
197 *) am_cv_func_iconv_works="guessing yes" ;;
198 esac])
199 test "$am_cv_func_iconv_works" = no || break
200 done
201 LIBS="$am_save_LIBS"
202 ])
203 case "$am_cv_func_iconv_works" in
204 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
205 *) am_func_iconv=yes ;;
206 esac
207 else
208 am_func_iconv=no am_cv_lib_iconv=no
209 fi
210 if test "$am_func_iconv" = yes; then
211 AC_DEFINE([HAVE_ICONV], [1],
212 [Define if you have the iconv() function and it works.])
60 fi 213 fi
61 if test "$am_cv_lib_iconv" = yes; then 214 if test "$am_cv_lib_iconv" = yes; then
62 AC_MSG_CHECKING([how to link with libiconv]) 215 AC_MSG_CHECKING([how to link with libiconv])
@@ -68,34 +221,68 @@ AC_DEFUN([AM_ICONV_LINK],
68 LIBICONV= 221 LIBICONV=
69 LTLIBICONV= 222 LTLIBICONV=
70 fi 223 fi
71 AC_SUBST(LIBICONV) 224 AC_SUBST([LIBICONV])
72 AC_SUBST(LTLIBICONV) 225 AC_SUBST([LTLIBICONV])
73]) 226])
74 227
75AC_DEFUN([AM_ICONV], 228dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
229dnl avoid warnings like
230dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
231dnl This is tricky because of the way 'aclocal' is implemented:
232dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
233dnl Otherwise aclocal's initial scan pass would miss the macro definition.
234dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
235dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
236dnl warnings.
237m4_define([gl_iconv_AC_DEFUN],
238 m4_version_prereq([2.64],
239 [[AC_DEFUN_ONCE(
240 [$1], [$2])]],
241 [m4_ifdef([gl_00GNULIB],
242 [[AC_DEFUN_ONCE(
243 [$1], [$2])]],
244 [[AC_DEFUN(
245 [$1], [$2])]])]))
246gl_iconv_AC_DEFUN([AM_ICONV],
76[ 247[
77 AM_ICONV_LINK 248 AM_ICONV_LINK
78 if test "$am_cv_func_iconv" = yes; then 249 if test "$am_cv_func_iconv" = yes; then
79 AC_MSG_CHECKING([for iconv declaration]) 250 AC_MSG_CHECKING([for iconv declaration])
80 AC_CACHE_VAL(am_cv_proto_iconv, [ 251 AC_CACHE_VAL([am_cv_proto_iconv], [
81 AC_TRY_COMPILE([ 252 AC_COMPILE_IFELSE(
253 [AC_LANG_PROGRAM(
254 [[
82#include <stdlib.h> 255#include <stdlib.h>
83#include <iconv.h> 256#include <iconv.h>
84extern 257extern
85#ifdef __cplusplus 258#ifdef __cplusplus
86"C" 259"C"
87#endif 260#endif
88#if defined(__STDC__) || defined(__cplusplus) 261#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
89size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 262size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
90#else 263#else
91size_t iconv(); 264size_t iconv();
92#endif 265#endif
93], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 266 ]],
267 [[]])],
268 [am_cv_proto_iconv_arg1=""],
269 [am_cv_proto_iconv_arg1="const"])
94 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 270 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
95 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 271 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
96 AC_MSG_RESULT([$]{ac_t:- 272 AC_MSG_RESULT([
97 }[$]am_cv_proto_iconv) 273 $am_cv_proto_iconv])
98 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 274 else
99 [Define as const if the declaration of iconv() needs const.]) 275 dnl When compiling GNU libiconv on a system that does not have iconv yet,
276 dnl pick the POSIX compliant declaration without 'const'.
277 am_cv_proto_iconv_arg1=""
100 fi 278 fi
279 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
280 [Define as const if the declaration of iconv() needs const.])
281 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
282 m4_ifdef([gl_ICONV_H_DEFAULTS],
283 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
284 if test -n "$am_cv_proto_iconv_arg1"; then
285 ICONV_CONST="const"
286 fi
287 ])
101]) 288])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
new file mode 100644
index 0000000..ebd9937
--- /dev/null
+++ b/m4/intlmacosx.m4
@@ -0,0 +1,65 @@
1# intlmacosx.m4 serial 8 (gettext-0.20.2)
2dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Lesser General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Lesser General Public License, and the rest of the GNU
13dnl gettext package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Checks for special options needed on Mac OS X.
17dnl Defines INTL_MACOSX_LIBS.
18AC_DEFUN([gt_INTL_MACOSX],
19[
20 dnl Check for API introduced in Mac OS X 10.4.
21 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
22 [gt_cv_func_CFPreferencesCopyAppValue],
23 [gt_save_LIBS="$LIBS"
24 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
25 AC_LINK_IFELSE(
26 [AC_LANG_PROGRAM(
27 [[#include <CoreFoundation/CFPreferences.h>]],
28 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
29 [gt_cv_func_CFPreferencesCopyAppValue=yes],
30 [gt_cv_func_CFPreferencesCopyAppValue=no])
31 LIBS="$gt_save_LIBS"])
32 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
33 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
34 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
35 fi
36 dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent,
37 dnl because in macOS 10.13.4 it has the following behaviour:
38 dnl When two or more languages are specified in the
39 dnl "System Preferences > Language & Region > Preferred Languages" panel,
40 dnl it returns en_CC where CC is the territory (even when English is not among
41 dnl the preferred languages!). What we want instead is what
42 dnl CFLocaleCopyCurrent returned in earlier macOS releases and what
43 dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the
44 dnl first among the preferred languages and CC is the territory.
45 AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
46 [gt_save_LIBS="$LIBS"
47 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
48 AC_LINK_IFELSE(
49 [AC_LANG_PROGRAM(
50 [[#include <CoreFoundation/CFLocale.h>]],
51 [[CFLocaleCopyPreferredLanguages();]])],
52 [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
53 [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
54 LIBS="$gt_save_LIBS"])
55 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
56 AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
57 [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
58 fi
59 INTL_MACOSX_LIBS=
60 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
61 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
62 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
63 fi
64 AC_SUBST([INTL_MACOSX_LIBS])
65])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index 6209de6..98c348f 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,5 +1,5 @@
1# lib-ld.m4 serial 6 1# lib-ld.m4 serial 9
2dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -47,73 +47,122 @@ if test "${PATH_SEPARATOR+set}" != set; then
47 } 47 }
48fi 48fi
49 49
50ac_prog=ld 50if test -n "$LD"; then
51if test "$GCC" = yes; then 51 AC_MSG_CHECKING([for ld])
52 # Check if gcc -print-prog-name=ld gives a path. 52elif test "$GCC" = yes; then
53 AC_MSG_CHECKING([for ld used by $CC]) 53 AC_MSG_CHECKING([for ld used by $CC])
54 case $host in
55 *-*-mingw*)
56 # gcc leaves a trailing carriage return which upsets mingw
57 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
58 *)
59 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
60 esac
61 case $ac_prog in
62 # Accept absolute paths.
63 [[\\/]]* | ?:[[\\/]]*)
64 re_direlt='/[[^/]][[^/]]*/\.\./'
65 # Canonicalize the pathname of ld
66 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
67 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
68 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
69 done
70 test -z "$LD" && LD="$ac_prog"
71 ;;
72 "")
73 # If it fails, then pretend we aren't using GCC.
74 ac_prog=ld
75 ;;
76 *)
77 # If it is relative, then search for the first ld in PATH.
78 with_gnu_ld=unknown
79 ;;
80 esac
81elif test "$with_gnu_ld" = yes; then 54elif test "$with_gnu_ld" = yes; then
82 AC_MSG_CHECKING([for GNU ld]) 55 AC_MSG_CHECKING([for GNU ld])
83else 56else
84 AC_MSG_CHECKING([for non-GNU ld]) 57 AC_MSG_CHECKING([for non-GNU ld])
85fi 58fi
86AC_CACHE_VAL([acl_cv_path_LD], 59if test -n "$LD"; then
87[if test -z "$LD"; then 60 # Let the user override the test with a path.
88 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 61 :
89 for ac_dir in $PATH; do 62else
90 IFS="$acl_save_ifs" 63 AC_CACHE_VAL([acl_cv_path_LD],
91 test -z "$ac_dir" && ac_dir=. 64 [
92 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 65 acl_cv_path_LD= # Final result of this test
93 acl_cv_path_LD="$ac_dir/$ac_prog" 66 ac_prog=ld # Program to search in $PATH
94 # Check to see if the program is GNU ld. I'd rather use --version, 67 if test "$GCC" = yes; then
95 # but apparently some variants of GNU ld only accept -v. 68 # Check if gcc -print-prog-name=ld gives a path.
96 # Break only if it was the GNU/non-GNU ld that we prefer. 69 case $host in
97 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in 70 *-*-mingw*)
98 *GNU* | *'with BFD'*) 71 # gcc leaves a trailing carriage return which upsets mingw
99 test "$with_gnu_ld" != no && break 72 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
100 ;; 73 *)
101 *) 74 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
102 test "$with_gnu_ld" != yes && break 75 esac
103 ;; 76 case $acl_output in
77 # Accept absolute paths.
78 [[\\/]]* | ?:[[\\/]]*)
79 re_direlt='/[[^/]][[^/]]*/\.\./'
80 # Canonicalize the pathname of ld
81 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
82 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
83 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
84 done
85 # Got the pathname. No search in PATH is needed.
86 acl_cv_path_LD="$acl_output"
87 ac_prog=
88 ;;
89 "")
90 # If it fails, then pretend we aren't using GCC.
91 ;;
92 *)
93 # If it is relative, then search for the first ld in PATH.
94 with_gnu_ld=unknown
95 ;;
104 esac 96 esac
105 fi 97 fi
106 done 98 if test -n "$ac_prog"; then
107 IFS="$acl_save_ifs" 99 # Search for $ac_prog in $PATH.
108else 100 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
109 acl_cv_path_LD="$LD" # Let the user override the test with a path. 101 for ac_dir in $PATH; do
110fi]) 102 IFS="$acl_save_ifs"
111LD="$acl_cv_path_LD" 103 test -z "$ac_dir" && ac_dir=.
104 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
105 acl_cv_path_LD="$ac_dir/$ac_prog"
106 # Check to see if the program is GNU ld. I'd rather use --version,
107 # but apparently some variants of GNU ld only accept -v.
108 # Break only if it was the GNU/non-GNU ld that we prefer.
109 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
110 *GNU* | *'with BFD'*)
111 test "$with_gnu_ld" != no && break
112 ;;
113 *)
114 test "$with_gnu_ld" != yes && break
115 ;;
116 esac
117 fi
118 done
119 IFS="$acl_save_ifs"
120 fi
121 case $host in
122 *-*-aix*)
123 AC_COMPILE_IFELSE(
124 [AC_LANG_SOURCE(
125 [[#if defined __powerpc64__ || defined _ARCH_PPC64
126 int ok;
127 #else
128 error fail
129 #endif
130 ]])],
131 [# The compiler produces 64-bit code. Add option '-b64' so that the
132 # linker groks 64-bit object files.
133 case "$acl_cv_path_LD " in
134 *" -b64 "*) ;;
135 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
136 esac
137 ], [])
138 ;;
139 sparc64-*-netbsd*)
140 AC_COMPILE_IFELSE(
141 [AC_LANG_SOURCE(
142 [[#if defined __sparcv9 || defined __arch64__
143 int ok;
144 #else
145 error fail
146 #endif
147 ]])],
148 [],
149 [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
150 # so that the linker groks 32-bit object files.
151 case "$acl_cv_path_LD " in
152 *" -m elf32_sparc "*) ;;
153 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
154 esac
155 ])
156 ;;
157 esac
158 ])
159 LD="$acl_cv_path_LD"
160fi
112if test -n "$LD"; then 161if test -n "$LD"; then
113 AC_MSG_RESULT([$LD]) 162 AC_MSG_RESULT([$LD])
114else 163else
115 AC_MSG_RESULT([no]) 164 AC_MSG_RESULT([no])
165 AC_MSG_ERROR([no acceptable ld found in \$PATH])
116fi 166fi
117test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
118AC_LIB_PROG_LD_GNU 167AC_LIB_PROG_LD_GNU
119]) 168])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 2f51855..eecf70e 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,12 +1,12 @@
1# lib-link.m4 serial 26 (gettext-0.18.2) 1# lib-link.m4 serial 31
2dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7dnl From Bruno Haible. 7dnl From Bruno Haible.
8 8
9AC_PREREQ([2.54]) 9AC_PREREQ([2.61])
10 10
11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12dnl the libraries corresponding to explicit and implicit dependencies. 12dnl the libraries corresponding to explicit and implicit dependencies.
@@ -124,8 +124,8 @@ dnl acl_hardcode_direct,
124dnl acl_hardcode_minus_L. 124dnl acl_hardcode_minus_L.
125AC_DEFUN([AC_LIB_RPATH], 125AC_DEFUN([AC_LIB_RPATH],
126[ 126[
127 dnl Tell automake >= 1.10 to complain if config.rpath is missing. 127 dnl Complain if config.rpath is missing.
128 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) 128 AC_REQUIRE_AUX_FILE([config.rpath])
129 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 129 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
130 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 130 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
131 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 131 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
@@ -187,17 +187,17 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
187 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], 187 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
188 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) 188 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
189 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) 189 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
190 dnl Autoconf >= 2.61 supports dots in --with options.
191 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
192 dnl By default, look in $includedir and $libdir. 190 dnl By default, look in $includedir and $libdir.
193 use_additional=yes 191 use_additional=yes
194 AC_LIB_WITH_FINAL_PREFIX([ 192 AC_LIB_WITH_FINAL_PREFIX([
195 eval additional_includedir=\"$includedir\" 193 eval additional_includedir=\"$includedir\"
196 eval additional_libdir=\"$libdir\" 194 eval additional_libdir=\"$libdir\"
195 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
196 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
197 ]) 197 ])
198 AC_ARG_WITH(P_A_C_K[-prefix], 198 AC_ARG_WITH(PACK[-prefix],
199[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib 199[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
200 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], 200 --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
201[ 201[
202 if test "X$withval" = "Xno"; then 202 if test "X$withval" = "Xno"; then
203 use_additional=no 203 use_additional=no
@@ -206,17 +206,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
206 AC_LIB_WITH_FINAL_PREFIX([ 206 AC_LIB_WITH_FINAL_PREFIX([
207 eval additional_includedir=\"$includedir\" 207 eval additional_includedir=\"$includedir\"
208 eval additional_libdir=\"$libdir\" 208 eval additional_libdir=\"$libdir\"
209 eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
210 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
209 ]) 211 ])
210 else 212 else
211 additional_includedir="$withval/include" 213 additional_includedir="$withval/include"
212 additional_libdir="$withval/$acl_libdirstem" 214 additional_libdir="$withval/$acl_libdirstem"
213 if test "$acl_libdirstem2" != "$acl_libdirstem" \ 215 additional_libdir2="$withval/$acl_libdirstem2"
214 && ! test -d "$withval/$acl_libdirstem"; then 216 additional_libdir3="$withval/$acl_libdirstem3"
215 additional_libdir="$withval/$acl_libdirstem2"
216 fi
217 fi 217 fi
218 fi 218 fi
219]) 219])
220 if test "X$additional_libdir2" = "X$additional_libdir"; then
221 additional_libdir2=
222 fi
223 if test "X$additional_libdir3" = "X$additional_libdir"; then
224 additional_libdir3=
225 fi
220 dnl Search the library and its dependencies in $additional_libdir and 226 dnl Search the library and its dependencies in $additional_libdir and
221 dnl $LDFLAGS. Using breadth-first-seach. 227 dnl $LDFLAGS. Using breadth-first-seach.
222 LIB[]NAME= 228 LIB[]NAME=
@@ -272,48 +278,54 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
272 shrext= 278 shrext=
273 fi 279 fi
274 if test $use_additional = yes; then 280 if test $use_additional = yes; then
275 dir="$additional_libdir" 281 for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
276 dnl The same code as in the loop below: 282 if test "X$found_dir" = "X"; then
277 dnl First look for a shared library. 283 eval dir=\$$additional_libdir_variable
278 if test -n "$acl_shlibext"; then 284 if test -n "$dir"; then
279 if test -f "$dir/$libname$shrext"; then 285 dnl The same code as in the loop below:
280 found_dir="$dir" 286 dnl First look for a shared library.
281 found_so="$dir/$libname$shrext" 287 if test -n "$acl_shlibext"; then
282 else 288 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
283 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 289 found_dir="$dir"
284 ver=`(cd "$dir" && \ 290 found_so="$dir/$libname$shrext"
285 for f in "$libname$shrext".*; do echo "$f"; done \ 291 else
286 | sed -e "s,^$libname$shrext\\\\.,," \ 292 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
287 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 293 ver=`(cd "$dir" && \
288 | sed 1q ) 2>/dev/null` 294 for f in "$libname$shrext".*; do echo "$f"; done \
289 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 295 | sed -e "s,^$libname$shrext\\\\.,," \
290 found_dir="$dir" 296 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
291 found_so="$dir/$libname$shrext.$ver" 297 | sed 1q ) 2>/dev/null`
298 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
299 found_dir="$dir"
300 found_so="$dir/$libname$shrext.$ver"
301 fi
302 else
303 eval library_names=\"$acl_library_names_spec\"
304 for f in $library_names; do
305 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
306 found_dir="$dir"
307 found_so="$dir/$f"
308 break
309 fi
310 done
311 fi
312 fi
292 fi 313 fi
293 else 314 dnl Then look for a static library.
294 eval library_names=\"$acl_library_names_spec\" 315 if test "X$found_dir" = "X"; then
295 for f in $library_names; do 316 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
296 if test -f "$dir/$f"; then
297 found_dir="$dir" 317 found_dir="$dir"
298 found_so="$dir/$f" 318 found_a="$dir/$libname.$acl_libext"
299 break
300 fi 319 fi
301 done 320 fi
321 if test "X$found_dir" != "X"; then
322 if test -f "$dir/$libname.la"; then
323 found_la="$dir/$libname.la"
324 fi
325 fi
302 fi 326 fi
303 fi 327 fi
304 fi 328 done
305 dnl Then look for a static library.
306 if test "X$found_dir" = "X"; then
307 if test -f "$dir/$libname.$acl_libext"; then
308 found_dir="$dir"
309 found_a="$dir/$libname.$acl_libext"
310 fi
311 fi
312 if test "X$found_dir" != "X"; then
313 if test -f "$dir/$libname.la"; then
314 found_la="$dir/$libname.la"
315 fi
316 fi
317 fi 329 fi
318 if test "X$found_dir" = "X"; then 330 if test "X$found_dir" = "X"; then
319 for x in $LDFLAGS $LTLIB[]NAME; do 331 for x in $LDFLAGS $LTLIB[]NAME; do
@@ -323,7 +335,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
323 dir=`echo "X$x" | sed -e 's/^X-L//'` 335 dir=`echo "X$x" | sed -e 's/^X-L//'`
324 dnl First look for a shared library. 336 dnl First look for a shared library.
325 if test -n "$acl_shlibext"; then 337 if test -n "$acl_shlibext"; then
326 if test -f "$dir/$libname$shrext"; then 338 if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
327 found_dir="$dir" 339 found_dir="$dir"
328 found_so="$dir/$libname$shrext" 340 found_so="$dir/$libname$shrext"
329 else 341 else
@@ -333,14 +345,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
333 | sed -e "s,^$libname$shrext\\\\.,," \ 345 | sed -e "s,^$libname$shrext\\\\.,," \
334 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 346 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
335 | sed 1q ) 2>/dev/null` 347 | sed 1q ) 2>/dev/null`
336 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 348 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
337 found_dir="$dir" 349 found_dir="$dir"
338 found_so="$dir/$libname$shrext.$ver" 350 found_so="$dir/$libname$shrext.$ver"
339 fi 351 fi
340 else 352 else
341 eval library_names=\"$acl_library_names_spec\" 353 eval library_names=\"$acl_library_names_spec\"
342 for f in $library_names; do 354 for f in $library_names; do
343 if test -f "$dir/$f"; then 355 if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
344 found_dir="$dir" 356 found_dir="$dir"
345 found_so="$dir/$f" 357 found_so="$dir/$f"
346 break 358 break
@@ -351,7 +363,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
351 fi 363 fi
352 dnl Then look for a static library. 364 dnl Then look for a static library.
353 if test "X$found_dir" = "X"; then 365 if test "X$found_dir" = "X"; then
354 if test -f "$dir/$libname.$acl_libext"; then 366 if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
355 found_dir="$dir" 367 found_dir="$dir"
356 found_a="$dir/$libname.$acl_libext" 368 found_a="$dir/$libname.$acl_libext"
357 fi 369 fi
@@ -377,7 +389,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
377 dnl standard /usr/lib. 389 dnl standard /usr/lib.
378 if test "$enable_rpath" = no \ 390 if test "$enable_rpath" = no \
379 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ 391 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
380 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then 392 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
393 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
381 dnl No hardcoding is needed. 394 dnl No hardcoding is needed.
382 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 395 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
383 else 396 else
@@ -477,6 +490,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
477 fi 490 fi
478 additional_includedir="$basedir/include" 491 additional_includedir="$basedir/include"
479 ;; 492 ;;
493 */$acl_libdirstem3 | */$acl_libdirstem3/)
494 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
495 if test "$name" = '$1'; then
496 LIB[]NAME[]_PREFIX="$basedir"
497 fi
498 additional_includedir="$basedir/include"
499 ;;
480 esac 500 esac
481 if test "X$additional_includedir" != "X"; then 501 if test "X$additional_includedir" != "X"; then
482 dnl Potentially add $additional_includedir to $INCNAME. 502 dnl Potentially add $additional_includedir to $INCNAME.
@@ -527,19 +547,21 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
527 for dep in $dependency_libs; do 547 for dep in $dependency_libs; do
528 case "$dep" in 548 case "$dep" in
529 -L*) 549 -L*)
530 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 550 dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
531 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 551 dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME.
532 dnl But don't add it 552 dnl But don't add it
533 dnl 1. if it's the standard /usr/lib, 553 dnl 1. if it's the standard /usr/lib,
534 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 554 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
535 dnl 3. if it's already present in $LDFLAGS or the already 555 dnl 3. if it's already present in $LDFLAGS or the already
536 dnl constructed $LIBNAME, 556 dnl constructed $LIBNAME,
537 dnl 4. if it doesn't exist as a directory. 557 dnl 4. if it doesn't exist as a directory.
538 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ 558 if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
539 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then 559 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
560 && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
540 haveit= 561 haveit=
541 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ 562 if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
542 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then 563 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
564 || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
543 if test -n "$GCC"; then 565 if test -n "$GCC"; then
544 case $host_os in 566 case $host_os in
545 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 567 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -550,29 +572,29 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
550 haveit= 572 haveit=
551 for x in $LDFLAGS $LIB[]NAME; do 573 for x in $LDFLAGS $LIB[]NAME; do
552 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 574 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
553 if test "X$x" = "X-L$additional_libdir"; then 575 if test "X$x" = "X-L$dependency_libdir"; then
554 haveit=yes 576 haveit=yes
555 break 577 break
556 fi 578 fi
557 done 579 done
558 if test -z "$haveit"; then 580 if test -z "$haveit"; then
559 if test -d "$additional_libdir"; then 581 if test -d "$dependency_libdir"; then
560 dnl Really add $additional_libdir to $LIBNAME. 582 dnl Really add $dependency_libdir to $LIBNAME.
561 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 583 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir"
562 fi 584 fi
563 fi 585 fi
564 haveit= 586 haveit=
565 for x in $LDFLAGS $LTLIB[]NAME; do 587 for x in $LDFLAGS $LTLIB[]NAME; do
566 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 588 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
567 if test "X$x" = "X-L$additional_libdir"; then 589 if test "X$x" = "X-L$dependency_libdir"; then
568 haveit=yes 590 haveit=yes
569 break 591 break
570 fi 592 fi
571 done 593 done
572 if test -z "$haveit"; then 594 if test -z "$haveit"; then
573 if test -d "$additional_libdir"; then 595 if test -d "$dependency_libdir"; then
574 dnl Really add $additional_libdir to $LTLIBNAME. 596 dnl Really add $dependency_libdir to $LTLIBNAME.
575 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 597 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
576 fi 598 fi
577 fi 599 fi
578 fi 600 fi
@@ -670,7 +692,6 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
670 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 692 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
671 done 693 done
672 fi 694 fi
673 popdef([P_A_C_K])
674 popdef([PACKLIBS]) 695 popdef([PACKLIBS])
675 popdef([PACKUP]) 696 popdef([PACKUP])
676 popdef([PACK]) 697 popdef([PACK])
@@ -721,7 +742,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
721 dir="$next" 742 dir="$next"
722 dnl No need to hardcode the standard /usr/lib. 743 dnl No need to hardcode the standard /usr/lib.
723 if test "X$dir" != "X/usr/$acl_libdirstem" \ 744 if test "X$dir" != "X/usr/$acl_libdirstem" \
724 && test "X$dir" != "X/usr/$acl_libdirstem2"; then 745 && test "X$dir" != "X/usr/$acl_libdirstem2" \
746 && test "X$dir" != "X/usr/$acl_libdirstem3"; then
725 rpathdirs="$rpathdirs $dir" 747 rpathdirs="$rpathdirs $dir"
726 fi 748 fi
727 next= 749 next=
@@ -731,7 +753,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
731 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 753 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
732 dnl No need to hardcode the standard /usr/lib. 754 dnl No need to hardcode the standard /usr/lib.
733 if test "X$dir" != "X/usr/$acl_libdirstem" \ 755 if test "X$dir" != "X/usr/$acl_libdirstem" \
734 && test "X$dir" != "X/usr/$acl_libdirstem2"; then 756 && test "X$dir" != "X/usr/$acl_libdirstem2" \
757 && test "X$dir" != "X/usr/$acl_libdirstem3"; then
735 rpathdirs="$rpathdirs $dir" 758 rpathdirs="$rpathdirs $dir"
736 fi 759 fi
737 next= ;; 760 next= ;;
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 6851031..c8a0b46 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,18 +1,11 @@
1# lib-prefix.m4 serial 7 (gettext-0.18) 1# lib-prefix.m4 serial 17
2dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7dnl From Bruno Haible. 7dnl From Bruno Haible.
8 8
9dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
10dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
11dnl require excessive bracketing.
12ifdef([AC_HELP_STRING],
13[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
14[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
15
16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 9dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
17dnl to access previously installed libraries. The basic assumption is that 10dnl to access previously installed libraries. The basic assumption is that
18dnl a user will want packages to use other packages he previously installed 11dnl a user will want packages to use other packages he previously installed
@@ -32,9 +25,9 @@ AC_DEFUN([AC_LIB_PREFIX],
32 eval additional_includedir=\"$includedir\" 25 eval additional_includedir=\"$includedir\"
33 eval additional_libdir=\"$libdir\" 26 eval additional_libdir=\"$libdir\"
34 ]) 27 ])
35 AC_LIB_ARG_WITH([lib-prefix], 28 AC_ARG_WITH([lib-prefix],
36[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 29[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
37 --without-lib-prefix don't search for libraries in includedir and libdir], 30 --without-lib-prefix don't search for libraries in includedir and libdir]],
38[ 31[
39 if test "X$withval" = "Xno"; then 32 if test "X$withval" = "Xno"; then
40 use_additional=no 33 use_additional=no
@@ -154,71 +147,174 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
154]) 147])
155 148
156dnl AC_LIB_PREPARE_MULTILIB creates 149dnl AC_LIB_PREPARE_MULTILIB creates
157dnl - a variable acl_libdirstem, containing the basename of the libdir, either 150dnl - a function acl_is_expected_elfclass, that tests whether standard input
158dnl "lib" or "lib64" or "lib/64", 151dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
159dnl - a variable acl_libdirstem2, as a secondary possible value for 152dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
160dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or 153dnl the basename of the libdir to try in turn, either "lib" or "lib64" or
161dnl "lib/amd64". 154dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
162AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 155AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
163[ 156[
164 dnl There is no formal standard regarding lib and lib64. 157 dnl There is no formal standard regarding lib, lib32, and lib64.
165 dnl On glibc systems, the current practice is that on a system supporting 158 dnl On most glibc systems, the current practice is that on a system supporting
166 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under 159 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
167 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine 160 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
168 dnl the compiler's default mode by looking at the compiler's library search 161 dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
169 dnl path. If at least one of its elements ends in /lib64 or points to a 162 dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
170 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. 163 dnl We determine the compiler's default mode by looking at the compiler's
171 dnl Otherwise we use the default, namely "lib". 164 dnl library search path. If at least one of its elements ends in /lib64 or
165 dnl points to a directory whose absolute pathname ends in /lib64, we use that
166 dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
167 dnl namely "lib".
172 dnl On Solaris systems, the current practice is that on a system supporting 168 dnl On Solaris systems, the current practice is that on a system supporting
173 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under 169 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
174 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or 170 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
175 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. 171 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
176 AC_REQUIRE([AC_CANONICAL_HOST]) 172 AC_REQUIRE([AC_CANONICAL_HOST])
177 acl_libdirstem=lib 173 AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
178 acl_libdirstem2= 174
179 case "$host_os" in 175 AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
180 solaris*) 176 [AC_EGREP_CPP([Extensible Linking Format],
181 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment 177 [#ifdef __ELF__
182 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. 178 Extensible Linking Format
183 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." 179 #endif
184 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the 180 ],
185 dnl symlink is missing, so we set acl_libdirstem2 too. 181 [gl_cv_elf=yes],
186 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], 182 [gl_cv_elf=no])
187 [AC_EGREP_CPP([sixtyfour bits], [ 183 ])
188#ifdef _LP64 184 if test $gl_cv_elf; then
189sixtyfour bits 185 # Extract the ELF class of a file (5th byte) in decimal.
190#endif 186 # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
191 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) 187 if od -A x < /dev/null >/dev/null 2>/dev/null; then
192 ]) 188 # Use POSIX od.
193 if test $gl_cv_solaris_64bit = yes; then 189 func_elfclass ()
194 acl_libdirstem=lib/64 190 {
195 case "$host_cpu" in 191 od -A n -t d1 -j 4 -N 1
196 sparc*) acl_libdirstem2=lib/sparcv9 ;; 192 }
197 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; 193 else
198 esac 194 # Use BSD hexdump.
199 fi 195 func_elfclass ()
200 ;; 196 {
201 *) 197 dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
202 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 198 echo
203 if test -n "$searchpath"; then 199 }
204 acl_save_IFS="${IFS= }"; IFS=":" 200 fi
205 for searchdir in $searchpath; do 201changequote(,)dnl
206 if test -d "$searchdir"; then 202 case $HOST_CPU_C_ABI_32BIT in
207 case "$searchdir" in 203 yes)
208 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 204 # 32-bit ABI.
209 */../ | */.. ) 205 acl_is_expected_elfclass ()
210 # Better ignore directories of this form. They are misleading. 206 {
211 ;; 207 test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
212 *) searchdir=`cd "$searchdir" && pwd` 208 }
213 case "$searchdir" in 209 ;;
214 */lib64 ) acl_libdirstem=lib64 ;; 210 no)
215 esac ;; 211 # 64-bit ABI.
216 esac 212 acl_is_expected_elfclass ()
217 fi 213 {
218 done 214 test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
219 IFS="$acl_save_IFS" 215 }
220 fi 216 ;;
221 ;; 217 *)
222 esac 218 # Unknown.
223 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" 219 acl_is_expected_elfclass ()
220 {
221 :
222 }
223 ;;
224 esac
225changequote([,])dnl
226 else
227 acl_is_expected_elfclass ()
228 {
229 :
230 }
231 fi
232
233 dnl Allow the user to override the result by setting acl_cv_libdirstems.
234 AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
235 [acl_cv_libdirstems],
236 [dnl Try 'lib' first, because that's the default for libdir in GNU, see
237 dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
238 acl_libdirstem=lib
239 acl_libdirstem2=
240 acl_libdirstem3=
241 case "$host_os" in
242 solaris*)
243 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
244 dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
245 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
246 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
247 dnl symlink is missing, so we set acl_libdirstem2 too.
248 if test $HOST_CPU_C_ABI_32BIT = no; then
249 acl_libdirstem2=lib/64
250 case "$host_cpu" in
251 sparc*) acl_libdirstem3=lib/sparcv9 ;;
252 i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
253 esac
254 fi
255 ;;
256 *)
257 dnl If $CC generates code for a 32-bit ABI, the libraries are
258 dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
259 dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
260 dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
261 dnl Find the compiler's search path. However, non-system compilers
262 dnl sometimes have odd library search paths. But we can't simply invoke
263 dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
264 dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
265 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
266 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
267 if test $HOST_CPU_C_ABI_32BIT != no; then
268 # 32-bit or unknown ABI.
269 if test -d /usr/lib32; then
270 acl_libdirstem2=lib32
271 fi
272 fi
273 if test $HOST_CPU_C_ABI_32BIT != yes; then
274 # 64-bit or unknown ABI.
275 if test -d /usr/lib64; then
276 acl_libdirstem3=lib64
277 fi
278 fi
279 if test -n "$searchpath"; then
280 acl_save_IFS="${IFS= }"; IFS=":"
281 for searchdir in $searchpath; do
282 if test -d "$searchdir"; then
283 case "$searchdir" in
284 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
285 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
286 */../ | */.. )
287 # Better ignore directories of this form. They are misleading.
288 ;;
289 *) searchdir=`cd "$searchdir" && pwd`
290 case "$searchdir" in
291 */lib32 ) acl_libdirstem2=lib32 ;;
292 */lib64 ) acl_libdirstem3=lib64 ;;
293 esac ;;
294 esac
295 fi
296 done
297 IFS="$acl_save_IFS"
298 if test $HOST_CPU_C_ABI_32BIT = yes; then
299 # 32-bit ABI.
300 acl_libdirstem3=
301 fi
302 if test $HOST_CPU_C_ABI_32BIT = no; then
303 # 64-bit ABI.
304 acl_libdirstem2=
305 fi
306 fi
307 ;;
308 esac
309 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
310 test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
311 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
312 ])
313 dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
314 dnl acl_libdirstem3.
315changequote(,)dnl
316 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
317 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
318 acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
319changequote([,])dnl
224]) 320])
diff --git a/m4/nls.m4 b/m4/nls.m4
index afdb9ca..5a506fc 100644
--- a/m4/nls.m4
+++ b/m4/nls.m4
@@ -1,16 +1,16 @@
1# nls.m4 serial 5 (gettext-0.18) 1# nls.m4 serial 6 (gettext-0.20.2)
2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software 2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free
3dnl Foundation, Inc. 3dnl Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl 7dnl
8dnl This file can be used in projects which are not available under 8dnl This file can be used in projects which are not available under
9dnl the GNU General Public License or the GNU Library General Public 9dnl the GNU General Public License or the GNU Lesser General Public
10dnl License but which still want to provide support for the GNU gettext 10dnl License but which still want to provide support for the GNU gettext
11dnl functionality. 11dnl functionality.
12dnl Please note that the actual code of the GNU gettext library is covered 12dnl Please note that the actual code of the GNU gettext library is covered
13dnl by the GNU Library General Public License, and the rest of the GNU 13dnl by the GNU Lesser General Public License, and the rest of the GNU
14dnl gettext package is covered by the GNU General Public License. 14dnl gettext package is covered by the GNU General Public License.
15dnl They are *not* in the public domain. 15dnl They are *not* in the public domain.
16 16
diff --git a/m4/po.m4 b/m4/po.m4
index c5a2f6b..3778fd7 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,15 +1,15 @@
1# po.m4 serial 24 (gettext-0.19) 1# po.m4 serial 31 (gettext-0.20.2)
2dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6dnl 6dnl
7dnl This file can be used in projects which are not available under 7dnl This file can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Lesser General Public
9dnl License but which still want to provide support for the GNU gettext 9dnl License but which still want to provide support for the GNU gettext
10dnl functionality. 10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered 11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU 12dnl by the GNU Lesser General Public License, and the rest of the GNU
13dnl gettext package is covered by the GNU General Public License. 13dnl gettext package is covered by the GNU General Public License.
14dnl They are *not* in the public domain. 14dnl They are *not* in the public domain.
15 15
@@ -30,7 +30,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
30 30
31 dnl Release version of the gettext macros. This is used to ensure that 31 dnl Release version of the gettext macros. This is used to ensure that
32 dnl the gettext macros and po/Makefile.in.in are in sync. 32 dnl the gettext macros and po/Makefile.in.in are in sync.
33 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) 33 AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
34 34
35 dnl Perform the following tests also if --disable-nls has been given, 35 dnl Perform the following tests also if --disable-nls has been given,
36 dnl because they are needed for "make dist" to work. 36 dnl because they are needed for "make dist" to work.
@@ -46,13 +46,6 @@ AC_DEFUN([AM_PO_SUBDIRS],
46 46
47 dnl Test whether it is GNU msgfmt >= 0.15. 47 dnl Test whether it is GNU msgfmt >= 0.15.
48changequote(,)dnl 48changequote(,)dnl
49 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
50 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
51 *) MSGFMT_015=$MSGFMT ;;
52 esac
53changequote([,])dnl
54 AC_SUBST([MSGFMT_015])
55changequote(,)dnl
56 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 49 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
57 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; 50 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
58 *) GMSGFMT_015=$GMSGFMT ;; 51 *) GMSGFMT_015=$GMSGFMT ;;
@@ -83,11 +76,21 @@ changequote([,])dnl
83 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 76 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
84 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) 77 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
85 78
86 dnl Installation directories. 79 dnl Test whether it is GNU msgmerge >= 0.20.
87 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we 80 if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
88 dnl have to define it here, so that it can be used in po/Makefile. 81 MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
89 test -n "$localedir" || localedir='${datadir}/locale' 82 else
90 AC_SUBST([localedir]) 83 dnl Test whether it is GNU msgmerge >= 0.12.
84 if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
85 MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
86 else
87 dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
88 dnl slow. But this is not a big problem, as such old gettext versions are
89 dnl hardly in use any more.
90 MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
91 fi
92 fi
93 AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
91 94
92 dnl Support for AM_XGETTEXT_OPTION. 95 dnl Support for AM_XGETTEXT_OPTION.
93 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= 96 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
@@ -130,14 +133,11 @@ changequote([,])dnl
130 if test -n "$OBSOLETE_ALL_LINGUAS"; then 133 if test -n "$OBSOLETE_ALL_LINGUAS"; then
131 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 134 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
132 fi 135 fi
133 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 136 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
134 # Hide the ALL_LINGUAS assignment from automake < 1.5.
135 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
136 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 137 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
137 else 138 else
138 # The set of available languages was given in configure.in. 139 # The set of available languages was given in configure.in.
139 # Hide the ALL_LINGUAS assignment from automake < 1.5. 140 ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
140 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
141 fi 141 fi
142 # Compute POFILES 142 # Compute POFILES
143 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 143 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
@@ -208,9 +208,8 @@ changequote([,])dnl
208 esac 208 esac
209 done]], 209 done]],
210 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 210 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
211 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it 211 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
212 # from automake < 1.5. 212 OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
213 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
214 # Capture the value of LINGUAS because we need it to compute CATALOGS. 213 # Capture the value of LINGUAS because we need it to compute CATALOGS.
215 LINGUAS="${LINGUAS-%UNSET%}" 214 LINGUAS="${LINGUAS-%UNSET%}"
216 ]) 215 ])
@@ -311,15 +310,13 @@ changequote([,])dnl
311 fi 310 fi
312 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 311 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
313 # The LINGUAS file contains the set of available languages. 312 # The LINGUAS file contains the set of available languages.
314 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 313 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
315 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 314 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
316 else 315 else
317 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. 316 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
318 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` 317 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
319 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` 318 ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
320 fi 319 fi
321 # Hide the ALL_LINGUAS assignment from automake < 1.5.
322 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
323 # Compute POFILES 320 # Compute POFILES
324 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 321 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
325 # Compute UPDATEPOFILES 322 # Compute UPDATEPOFILES
@@ -329,9 +326,9 @@ changequote([,])dnl
329 # Compute GMOFILES 326 # Compute GMOFILES
330 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 327 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
331 # Compute PROPERTIESFILES 328 # Compute PROPERTIESFILES
332 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) 329 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
333 # Compute CLASSFILES 330 # Compute CLASSFILES
334 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) 331 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
335 # Compute QMFILES 332 # Compute QMFILES
336 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) 333 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
337 # Compute MSGFILES 334 # Compute MSGFILES
@@ -356,8 +353,8 @@ changequote([,])dnl
356 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 353 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
357 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 354 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
358 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 355 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
359 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" 356 PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
360 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" 357 CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
361 QMFILES="$QMFILES $srcdirpre$lang.qm" 358 QMFILES="$QMFILES $srcdirpre$lang.qm"
362 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 359 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
363 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" 360 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
diff --git a/m4/progtest.m4 b/m4/progtest.m4
index 9ace7c3..f28010a 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,15 +1,15 @@
1# progtest.m4 serial 7 (gettext-0.18.2) 1# progtest.m4 serial 8 (gettext-0.20.2)
2dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2005, 2008-2020 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6dnl 6dnl
7dnl This file can be used in projects which are not available under 7dnl This file can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Lesser General Public
9dnl License but which still want to provide support for the GNU gettext 9dnl License but which still want to provide support for the GNU gettext
10dnl functionality. 10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered 11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU 12dnl by the GNU Lesser General Public License, and the rest of the GNU
13dnl gettext package is covered by the GNU General Public License. 13dnl gettext package is covered by the GNU General Public License.
14dnl They are *not* in the public domain. 14dnl They are *not* in the public domain.
15 15
diff --git a/po/ChangeLog b/po/ChangeLog
index fb44ed4..9a86e89 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,12 @@
12023-12-05 gettextize <bug-gnu-gettext@gnu.org>
2
3 * Makefile.in.in: Upgrade to gettext-0.21.
4 * Rules-quot: Upgrade to gettext-0.21.
5 * en@boldquot.header: Upgrade to gettext-0.21.
6 * en@quot.header: Upgrade to gettext-0.21.
7 * insert-header.sin: Upgrade to gettext-0.21.
8 * remove-potcdate.sin: Upgrade to gettext-0.21.
9
12008-05-21 gettextize <bug-gnu-gettext@gnu.org> 102008-05-21 gettextize <bug-gnu-gettext@gnu.org>
2 11
3 * Makefile.in.in: Upgrade to gettext-0.16.1. 12 * Makefile.in.in: Upgrade to gettext-0.16.1.
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 5022b8b..6b25f0d 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,19 +1,20 @@
1# Makefile for PO directory in any package using GNU gettext. 1# Makefile for PO directory in any package using GNU gettext.
2# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu> 2# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
3# Copyright (C) 2000-2020 Free Software Foundation, Inc.
3# 4#
4# This file can be copied and used freely without restrictions. It can 5# Copying and distribution of this file, with or without modification,
5# be used in projects which are not available under the GNU General Public 6# are permitted in any medium without royalty provided the copyright
6# License but which still want to provide support for the GNU gettext 7# notice and this notice are preserved. This file is offered as-is,
7# functionality. 8# without any warranty.
8# Please note that the actual code of GNU gettext is covered by the GNU
9# General Public License and is *not* in the public domain.
10# 9#
11# Origin: gettext-0.16 10# Origin: gettext-0.21
11GETTEXT_MACRO_VERSION = 0.20
12 12
13PACKAGE = @PACKAGE@ 13PACKAGE = @PACKAGE@
14VERSION = @VERSION@ 14VERSION = @VERSION@
15PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 15PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
16 16
17SED = @SED@
17SHELL = /bin/sh 18SHELL = /bin/sh
18@SET_MAKE@ 19@SET_MAKE@
19 20
@@ -43,20 +44,22 @@ install_sh = $(SHELL) @install_sh@
43MKDIR_P = @MKDIR_P@ 44MKDIR_P = @MKDIR_P@
44mkdir_p = @mkdir_p@ 45mkdir_p = @mkdir_p@
45 46
47# When building gettext-tools, we prefer to use the built programs
48# rather than installed programs. However, we can't do that when we
49# are cross compiling.
50CROSS_COMPILING = @CROSS_COMPILING@
51
46GMSGFMT_ = @GMSGFMT@ 52GMSGFMT_ = @GMSGFMT@
47GMSGFMT_no = @GMSGFMT@ 53GMSGFMT_no = @GMSGFMT@
48GMSGFMT_yes = @GMSGFMT_015@ 54GMSGFMT_yes = @GMSGFMT_015@
49GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) 55GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
50MSGFMT_ = @MSGFMT@
51MSGFMT_no = @MSGFMT@
52MSGFMT_yes = @MSGFMT_015@
53MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
54XGETTEXT_ = @XGETTEXT@ 56XGETTEXT_ = @XGETTEXT@
55XGETTEXT_no = @XGETTEXT@ 57XGETTEXT_no = @XGETTEXT@
56XGETTEXT_yes = @XGETTEXT_015@ 58XGETTEXT_yes = @XGETTEXT_015@
57XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) 59XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
58MSGMERGE = msgmerge 60MSGMERGE = @MSGMERGE@
59MSGMERGE_UPDATE = @MSGMERGE@ --update 61MSGMERGE_UPDATE = @MSGMERGE@ --update
62MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
60MSGINIT = msginit 63MSGINIT = msginit
61MSGCONV = msgconv 64MSGCONV = msgconv
62MSGFILTER = msgfilter 65MSGFILTER = msgfilter
@@ -75,52 +78,87 @@ POTFILES = \
75 78
76CATALOGS = @CATALOGS@ 79CATALOGS = @CATALOGS@
77 80
81POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
82POFILESDEPS_yes = $(POFILESDEPS_)
83POFILESDEPS_no =
84POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
85
86DISTFILESDEPS_ = update-po
87DISTFILESDEPS_yes = $(DISTFILESDEPS_)
88DISTFILESDEPS_no =
89DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
90
78# Makevars gets inserted here. (Don't remove this line!) 91# Makevars gets inserted here. (Don't remove this line!)
79 92
80.SUFFIXES: 93all: all-@USE_NLS@
81.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
82 94
83.po.mo:
84 @echo "$(MSGFMT) -c -o $@ $<"; \
85 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
86 95
96.SUFFIXES:
97.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
98
99# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
100# The GNU Coding Standards say in
101# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
102# "GNU distributions usually contain some files which are not source files
103# ... . Since these files normally appear in the source directory, they
104# should always appear in the source directory, not in the build directory.
105# So Makefile rules to update them should put the updated files in the
106# source directory."
107# Therefore we put these files in the source directory, not the build directory.
108
109# During .po -> .gmo conversion, take into account the most recent changes to
110# the .pot file. This eliminates the need to update the .po files when the
111# .pot file has changed, which would be troublesome if the .po files are put
112# under version control.
113$(GMOFILES): $(srcdir)/$(DOMAIN).pot
87.po.gmo: 114.po.gmo:
88 @lang=`echo $* | sed -e 's,.*/,,'`; \ 115 @lang=`echo $* | sed -e 's,.*/,,'`; \
89 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 116 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
90 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ 117 echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
91 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo 118 cd $(srcdir) && \
119 rm -f $${lang}.gmo && \
120 $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
121 $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
122 mv t-$${lang}.gmo $${lang}.gmo && \
123 rm -f $${lang}.1po
92 124
93.sin.sed: 125.sin.sed:
94 sed -e '/^#/d' $< > t-$@ 126 sed -e '/^#/d' $< > t-$@
95 mv t-$@ $@ 127 mv t-$@ $@
96 128
97 129
98all: all-@USE_NLS@ 130all-yes: $(srcdir)/stamp-po
99
100all-yes: stamp-po
101all-no: 131all-no:
102 132
133# Ensure that the gettext macros and this Makefile.in.in are in sync.
134CHECK_MACRO_VERSION = \
135 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
136 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
137 exit 1; \
138 }
139
103# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no 140# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
104# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because 141# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
105# we don't want to bother translators with empty POT files). We assume that 142# we don't want to bother translators with empty POT files). We assume that
106# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. 143# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
107# In this case, stamp-po is a nop (i.e. a phony target). 144# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
108 145
109# stamp-po is a timestamp denoting the last time at which the CATALOGS have 146# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
110# been loosely updated. Its purpose is that when a developer or translator 147# have been loosely updated. Its purpose is that when a developer or translator
111# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, 148# checks out the package from a version control system, and the $(DOMAIN).pot
112# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent 149# file is not under version control, "make" will update the $(DOMAIN).pot and
113# invocations of "make" will do nothing. This timestamp would not be necessary 150# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
114# if updating the $(CATALOGS) would always touch them; however, the rule for 151# timestamp would not be necessary if updating the $(CATALOGS) would always
115# $(POFILES) has been designed to not touch files that don't need to be 152# touch them; however, the rule for $(POFILES) has been designed to not touch
116# changed. 153# files that don't need to be changed.
117stamp-po: $(srcdir)/$(DOMAIN).pot 154$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
155 @$(CHECK_MACRO_VERSION)
118 test ! -f $(srcdir)/$(DOMAIN).pot || \ 156 test ! -f $(srcdir)/$(DOMAIN).pot || \
119 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 157 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
120 @test ! -f $(srcdir)/$(DOMAIN).pot || { \ 158 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
121 echo "touch stamp-po" && \ 159 echo "touch $(srcdir)/stamp-po" && \
122 echo timestamp > stamp-poT && \ 160 echo timestamp > $(srcdir)/stamp-poT && \
123 mv stamp-poT stamp-po; \ 161 mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
124 } 162 }
125 163
126# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 164# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
@@ -129,18 +167,60 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
129 167
130# This target rebuilds $(DOMAIN).pot; it is an expensive operation. 168# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
131# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 169# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
170# The determination of whether the package xyz is a GNU one is based on the
171# heuristic whether some file in the top level directory mentions "GNU xyz".
172# If GNU 'find' is available, we avoid grepping through monster files.
132$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 173$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
174 package_gnu="$(PACKAGE_GNU)"; \
175 test -n "$$package_gnu" || { \
176 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
177 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
178 else \
179 LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
180 fi; \
181 } | grep -v 'libtool:' >/dev/null; then \
182 package_gnu=yes; \
183 else \
184 package_gnu=no; \
185 fi; \
186 }; \
187 if test "$$package_gnu" = "yes"; then \
188 package_prefix='GNU '; \
189 else \
190 package_prefix=''; \
191 fi; \
133 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ 192 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
134 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ 193 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
135 else \ 194 else \
136 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ 195 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
137 fi; \ 196 fi; \
138 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 197 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
139 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ 198 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
140 --files-from=$(srcdir)/POTFILES.in \ 199 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
141 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 200 --add-comments=TRANSLATORS: \
142 --msgid-bugs-address="$$msgid_bugs_address" 201 --files-from=$(srcdir)/POTFILES.in \
202 --copyright-holder='$(COPYRIGHT_HOLDER)' \
203 --msgid-bugs-address="$$msgid_bugs_address" \
204 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
205 ;; \
206 *) \
207 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
208 --add-comments=TRANSLATORS: \
209 --files-from=$(srcdir)/POTFILES.in \
210 --copyright-holder='$(COPYRIGHT_HOLDER)' \
211 --package-name="$${package_prefix}@PACKAGE@" \
212 --package-version='@VERSION@' \
213 --msgid-bugs-address="$$msgid_bugs_address" \
214 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
215 ;; \
216 esac
143 test ! -f $(DOMAIN).po || { \ 217 test ! -f $(DOMAIN).po || { \
218 if test -f $(srcdir)/$(DOMAIN).pot-header; then \
219 sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
220 cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
221 rm -f $(DOMAIN).1po \
222 || exit 1; \
223 fi; \
144 if test -f $(srcdir)/$(DOMAIN).pot; then \ 224 if test -f $(srcdir)/$(DOMAIN).pot; then \
145 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 225 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
146 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ 226 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
@@ -163,12 +243,22 @@ $(srcdir)/$(DOMAIN).pot:
163 243
164# This target rebuilds a PO file if $(DOMAIN).pot has changed. 244# This target rebuilds a PO file if $(DOMAIN).pot has changed.
165# Note that a PO file is not touched if it doesn't need to be changed. 245# Note that a PO file is not touched if it doesn't need to be changed.
166$(POFILES): $(srcdir)/$(DOMAIN).pot 246$(POFILES): $(POFILESDEPS)
247 @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
167 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 248 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
168 if test -f "$(srcdir)/$${lang}.po"; then \ 249 if test -f "$(srcdir)/$${lang}.po"; then \
169 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 250 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
170 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ 251 echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
171 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ 252 cd $(srcdir) \
253 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
254 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
255 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
256 0.1[6-7] | 0.1[6-7].*) \
257 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
258 *) \
259 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
260 esac; \
261 }; \
172 else \ 262 else \
173 $(MAKE) $${lang}.po-create; \ 263 $(MAKE) $${lang}.po-create; \
174 fi 264 fi
@@ -191,7 +281,6 @@ install-data: install-data-@USE_NLS@
191 fi 281 fi
192install-data-no: all 282install-data-no: all
193install-data-yes: all 283install-data-yes: all
194 $(mkdir_p) $(DESTDIR)$(datadir)
195 @catalogs='$(CATALOGS)'; \ 284 @catalogs='$(CATALOGS)'; \
196 for cat in $$catalogs; do \ 285 for cat in $$catalogs; do \
197 cat=`basename $$cat`; \ 286 cat=`basename $$cat`; \
@@ -243,7 +332,6 @@ installdirs-data: installdirs-data-@USE_NLS@
243 fi 332 fi
244installdirs-data-no: 333installdirs-data-no:
245installdirs-data-yes: 334installdirs-data-yes:
246 $(mkdir_p) $(DESTDIR)$(datadir)
247 @catalogs='$(CATALOGS)'; \ 335 @catalogs='$(CATALOGS)'; \
248 for cat in $$catalogs; do \ 336 for cat in $$catalogs; do \
249 cat=`basename $$cat`; \ 337 cat=`basename $$cat`; \
@@ -303,34 +391,41 @@ check: all
303 391
304info dvi ps pdf html tags TAGS ctags CTAGS ID: 392info dvi ps pdf html tags TAGS ctags CTAGS ID:
305 393
394install-dvi install-ps install-pdf install-html:
395
306mostlyclean: 396mostlyclean:
307 rm -f remove-potcdate.sed 397 rm -f remove-potcdate.sed
308 rm -f stamp-poT 398 rm -f $(srcdir)/stamp-poT
309 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po 399 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
310 rm -fr *.o 400 rm -fr *.o
311 401
312clean: mostlyclean 402clean: mostlyclean
313 403
314distclean: clean 404distclean: clean
315 rm -f Makefile Makefile.in POTFILES *.mo 405 rm -f Makefile Makefile.in POTFILES
316 406
317maintainer-clean: distclean 407maintainer-clean: distclean
318 @echo "This command is intended for maintainers to use;" 408 @echo "This command is intended for maintainers to use;"
319 @echo "it deletes files that may require special tools to rebuild." 409 @echo "it deletes files that may require special tools to rebuild."
320 rm -f stamp-po $(GMOFILES) 410 rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
321 411
322distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 412distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
323dist distdir: 413dist distdir:
324 $(MAKE) update-po 414 test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
325 @$(MAKE) dist2 415 @$(MAKE) dist2
326# This is a separate target because 'update-po' must be executed before. 416# This is a separate target because 'update-po' must be executed before.
327dist2: stamp-po $(DISTFILES) 417dist2: $(srcdir)/stamp-po $(DISTFILES)
328 dists="$(DISTFILES)"; \ 418 @dists="$(DISTFILES)"; \
329 if test "$(PACKAGE)" = "gettext-tools"; then \ 419 if test "$(PACKAGE)" = "gettext-tools"; then \
330 dists="$$dists Makevars.template"; \ 420 dists="$$dists Makevars.template"; \
331 fi; \ 421 fi; \
332 if test -f $(srcdir)/$(DOMAIN).pot; then \ 422 if test -f $(srcdir)/$(DOMAIN).pot; then \
333 dists="$$dists $(DOMAIN).pot stamp-po"; \ 423 dists="$$dists $(DOMAIN).pot stamp-po"; \
424 else \
425 case $(XGETTEXT) in \
426 :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
427 *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
428 esac; \
334 fi; \ 429 fi; \
335 if test -f $(srcdir)/ChangeLog; then \ 430 if test -f $(srcdir)/ChangeLog; then \
336 dists="$$dists ChangeLog"; \ 431 dists="$$dists ChangeLog"; \
@@ -365,13 +460,21 @@ update-po: Makefile
365 460
366.nop.po-update: 461.nop.po-update:
367 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ 462 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
368 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ 463 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
369 tmpdir=`pwd`; \ 464 tmpdir=`pwd`; \
370 echo "$$lang:"; \ 465 echo "$$lang:"; \
371 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 466 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
372 echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ 467 echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
373 cd $(srcdir); \ 468 cd $(srcdir); \
374 if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ 469 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
470 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
471 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
472 0.1[6-7] | 0.1[6-7].*) \
473 $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
474 *) \
475 $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
476 esac; \
477 }; then \
375 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 478 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
376 rm -f $$tmpdir/$$lang.new.po; \ 479 rm -f $$tmpdir/$$lang.new.po; \
377 else \ 480 else \
@@ -392,9 +495,13 @@ $(DUMMYPOFILES):
392update-gmo: Makefile $(GMOFILES) 495update-gmo: Makefile $(GMOFILES)
393 @: 496 @:
394 497
498# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
499# because execution permission bits may not work on the current file system.
500# Use @SHELL@, which is the shell determined by autoconf for the use by its
501# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
395Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 502Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
396 cd $(top_builddir) \ 503 cd $(top_builddir) \
397 && $(SHELL) ./config.status $(subdir)/$@.in po-directories 504 && @SHELL@ ./config.status $(subdir)/$@.in po-directories
398 505
399force: 506force:
400 507
diff --git a/po/Makevars b/po/Makevars
index 112cc4e..da02d82 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -20,6 +20,8 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
20# their copyright. 20# their copyright.
21COPYRIGHT_HOLDER = Christian Grothoff 21COPYRIGHT_HOLDER = Christian Grothoff
22 22
23PACKAGE_GNU = yes
24
23# This is the email address or URL to which the translators shall report 25# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings: 26# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines 27# - Strings which are not entire sentences, see the maintainer guidelines
@@ -39,3 +41,33 @@ MSGID_BUGS_ADDRESS = libextractor@gnu.org
39# This is the list of locale categories, beyond LC_MESSAGES, for which the 41# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty. 42# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES = 43EXTRA_LOCALE_CATEGORIES =
44
45# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
46# context. Possible values are "yes" and "no". Set this to yes if the
47# package uses functions taking also a message context, like pgettext(), or
48# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
49USE_MSGCTXT = no
50
51# These options get passed to msgmerge.
52# Useful options are in particular:
53# --previous to keep previous msgids of translated messages,
54# --quiet to reduce the verbosity.
55MSGMERGE_OPTIONS =
56
57# These options get passed to msginit.
58# If you want to disable line wrapping when writing PO files, add
59# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
60# MSGINIT_OPTIONS.
61MSGINIT_OPTIONS =
62
63# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
64# has changed. Possible values are "yes" and "no". Set this to no if
65# the POT file is checked in the repository and the version control
66# program ignores timestamps.
67PO_DEPENDS_ON_POT = yes
68
69# This tells whether or not to forcibly update $(DOMAIN).pot and
70# regenerate PO files on "make dist". Possible values are "yes" and
71# "no". Set this to no if the POT file and PO files are maintained
72# externally.
73DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/Makevars.template b/po/Makevars.template
index 32692ab..86a11f1 100644
--- a/po/Makevars.template
+++ b/po/Makevars.template
@@ -1,4 +1,8 @@
1# Makefile variables for PO directory in any package using GNU gettext. 1# Makefile variables for PO directory in any package using GNU gettext.
2#
3# Copyright (C) 2003-2019 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation gives
5# unlimited permission to use, copy, distribute, and modify it.
2 6
3# Usually the message domain is the same as the package name. 7# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE) 8DOMAIN = $(PACKAGE)
@@ -20,6 +24,13 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
20# their copyright. 24# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc. 25COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22 26
27# This tells whether or not to prepend "GNU " prefix to the package
28# name that gets inserted into the header of the $(DOMAIN).pot file.
29# Possible values are "yes", "no", or empty. If it is empty, try to
30# detect it automatically by scanning the files in $(top_srcdir) for
31# "GNU packagename" string.
32PACKAGE_GNU =
33
23# This is the email address or URL to which the translators shall report 34# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings: 35# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines 36# - Strings which are not entire sentences, see the maintainer guidelines
@@ -39,3 +50,33 @@ MSGID_BUGS_ADDRESS =
39# This is the list of locale categories, beyond LC_MESSAGES, for which the 50# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty. 51# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES = 52EXTRA_LOCALE_CATEGORIES =
53
54# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
55# context. Possible values are "yes" and "no". Set this to yes if the
56# package uses functions taking also a message context, like pgettext(), or
57# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
58USE_MSGCTXT = no
59
60# These options get passed to msgmerge.
61# Useful options are in particular:
62# --previous to keep previous msgids of translated messages,
63# --quiet to reduce the verbosity.
64MSGMERGE_OPTIONS =
65
66# These options get passed to msginit.
67# If you want to disable line wrapping when writing PO files, add
68# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
69# MSGINIT_OPTIONS.
70MSGINIT_OPTIONS =
71
72# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
73# has changed. Possible values are "yes" and "no". Set this to no if
74# the POT file is checked in the repository and the version control
75# program ignores timestamps.
76PO_DEPENDS_ON_POT = yes
77
78# This tells whether or not to forcibly update $(DOMAIN).pot and
79# regenerate PO files on "make dist". Possible values are "yes" and
80# "no". Set this to no if the POT file and PO files are maintained
81# externally.
82DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 665e14d..bdcd2a9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -41,7 +41,6 @@ src/plugins/riff_extractor.c
41src/plugins/rpm_extractor.c 41src/plugins/rpm_extractor.c
42src/plugins/s3m_extractor.c 42src/plugins/s3m_extractor.c
43src/plugins/sid_extractor.c 43src/plugins/sid_extractor.c
44src/plugins/thumbnailffmpeg_extractor.c
45src/plugins/thumbnailgtk_extractor.c 44src/plugins/thumbnailgtk_extractor.c
46src/plugins/tiff_extractor.c 45src/plugins/tiff_extractor.c
47src/plugins/wav_extractor.c 46src/plugins/wav_extractor.c
diff --git a/po/Rules-quot b/po/Rules-quot
index 9c2a995..18c024b 100644
--- a/po/Rules-quot
+++ b/po/Rules-quot
@@ -1,4 +1,9 @@
1# Special Makefile rules for English message catalogs with quotation marks. 1# Special Makefile rules for English message catalogs with quotation marks.
2#
3# Copyright (C) 2001-2017 Free Software Foundation, Inc.
4# This file, Rules-quot, and its auxiliary files (listed under
5# DISTFILES.common.extra1) are free software; the Free Software Foundation
6# gives unlimited permission to use, copy, distribute, and modify them.
2 7
3DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 8DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
4 9
@@ -14,13 +19,23 @@ en@boldquot.po-update: en@boldquot.po-update-en
14 19
15.insert-header.po-update-en: 20.insert-header.po-update-en:
16 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 21 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
17 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 22 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
18 tmpdir=`pwd`; \ 23 tmpdir=`pwd`; \
19 echo "$$lang:"; \ 24 echo "$$lang:"; \
20 ll=`echo $$lang | sed -e 's/@.*//'`; \ 25 ll=`echo $$lang | sed -e 's/@.*//'`; \
21 LC_ALL=C; export LC_ALL; \ 26 LC_ALL=C; export LC_ALL; \
22 cd $(srcdir); \ 27 cd $(srcdir); \
23 if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ 28 if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
29 | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
30 { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
31 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
32 $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
33 ;; \
34 *) \
35 $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
36 ;; \
37 esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
38 ; then \
24 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 39 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
25 rm -f $$tmpdir/$$lang.new.po; \ 40 rm -f $$tmpdir/$$lang.new.po; \
26 else \ 41 else \
diff --git a/po/da.po b/po/da.po
index 4be0e70..e8908a5 100644
--- a/po/da.po
+++ b/po/da.po
@@ -10,7 +10,7 @@ msgid ""
10msgstr "" 10msgstr ""
11"Project-Id-Version: libextractor-1.9\n" 11"Project-Id-Version: libextractor-1.9\n"
12"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 12"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
13"POT-Creation-Date: 2020-07-02 15:57+0200\n" 13"POT-Creation-Date: 2021-01-30 15:28+0100\n"
14"PO-Revision-Date: 2019-02-14 16:38+0100\n" 14"PO-Revision-Date: 2019-02-14 16:38+0100\n"
15"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" 15"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
16"Language-Team: Danish <dansk@dansk-gruppen.dk>\n" 16"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -140,7 +140,7 @@ msgstr "% BiBTeX-fil\n"
140msgid "Keywords for file %s:\n" 140msgid "Keywords for file %s:\n"
141msgstr "Nøgleord for filen %s:\n" 141msgstr "Nøgleord for filen %s:\n"
142 142
143#: src/main/extractor.c:680 143#: src/main/extractor.c:679
144#, c-format 144#, c-format
145msgid "Initialization of plugin mechanism failed: %s!\n" 145msgid "Initialization of plugin mechanism failed: %s!\n"
146msgstr "Opstart af udvidelsesmodulmekanisme mislykkedes: %s!\n" 146msgstr "Opstart af udvidelsesmodulmekanisme mislykkedes: %s!\n"
diff --git a/po/de.po b/po/de.po
index 0d3956e..91a21d8 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
10msgstr "" 10msgstr ""
11"Project-Id-Version: libextractor 1.9\n" 11"Project-Id-Version: libextractor 1.9\n"
12"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 12"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
13"POT-Creation-Date: 2020-07-02 15:57+0200\n" 13"POT-Creation-Date: 2021-01-30 15:28+0100\n"
14"PO-Revision-Date: 2019-02-15 13:41+0100\n" 14"PO-Revision-Date: 2019-02-15 13:41+0100\n"
15"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n" 15"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
16"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" 16"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@@ -150,7 +150,7 @@ msgstr "% BibTeX-Datei\n"
150msgid "Keywords for file %s:\n" 150msgid "Keywords for file %s:\n"
151msgstr "Schlüsserwörter für die Datei %s:\n" 151msgstr "Schlüsserwörter für die Datei %s:\n"
152 152
153#: src/main/extractor.c:680 153#: src/main/extractor.c:679
154#, c-format 154#, c-format
155msgid "Initialization of plugin mechanism failed: %s!\n" 155msgid "Initialization of plugin mechanism failed: %s!\n"
156msgstr "Initialisierung des Plugin-Mechanismus ist fehlgeschlagen: %s.\n" 156msgstr "Initialisierung des Plugin-Mechanismus ist fehlgeschlagen: %s.\n"
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
index fedb6a0..506ca9e 100644
--- a/po/en@boldquot.header
+++ b/po/en@boldquot.header
@@ -2,7 +2,7 @@
2# The msgids must be ASCII and therefore cannot contain real quotation 2# The msgids must be ASCII and therefore cannot contain real quotation
3# characters, only substitutes like grave accent (0x60), apostrophe (0x27) 3# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
4# and double quote (0x22). These substitutes look strange; see 4# and double quote (0x22). These substitutes look strange; see
5# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 5# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
6# 6#
7# This catalog translates grave accent (0x60) and apostrophe (0x27) to 7# This catalog translates grave accent (0x60) and apostrophe (0x27) to
8# left single quotation mark (U+2018) and right single quotation mark (U+2019). 8# left single quotation mark (U+2018) and right single quotation mark (U+2019).
diff --git a/po/en@quot.header b/po/en@quot.header
index a9647fc..6522f0c 100644
--- a/po/en@quot.header
+++ b/po/en@quot.header
@@ -2,7 +2,7 @@
2# The msgids must be ASCII and therefore cannot contain real quotation 2# The msgids must be ASCII and therefore cannot contain real quotation
3# characters, only substitutes like grave accent (0x60), apostrophe (0x27) 3# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
4# and double quote (0x22). These substitutes look strange; see 4# and double quote (0x22). These substitutes look strange; see
5# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 5# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
6# 6#
7# This catalog translates grave accent (0x60) and apostrophe (0x27) to 7# This catalog translates grave accent (0x60) and apostrophe (0x27) to
8# left single quotation mark (U+2018) and right single quotation mark (U+2019). 8# left single quotation mark (U+2018) and right single quotation mark (U+2019).
diff --git a/po/es.po b/po/es.po
index 83dd26b..b7290e3 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: libextractor 1.0.0-pre1\n" 8"Project-Id-Version: libextractor 1.0.0-pre1\n"
9"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 9"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
10"POT-Creation-Date: 2020-07-02 15:57+0200\n" 10"POT-Creation-Date: 2021-01-30 15:28+0100\n"
11"PO-Revision-Date: 2018-04-27 22:53+0200\n" 11"PO-Revision-Date: 2018-04-27 22:53+0200\n"
12"Last-Translator: Francisco Javier Serrador <fserrador@gmail.com>\n" 12"Last-Translator: Francisco Javier Serrador <fserrador@gmail.com>\n"
13"Language-Team: Spanish <es@tp.org.es>\n" 13"Language-Team: Spanish <es@tp.org.es>\n"
@@ -142,7 +142,7 @@ msgstr "Fichero %% BiBTeX\n"
142msgid "Keywords for file %s:\n" 142msgid "Keywords for file %s:\n"
143msgstr "Palabras claves para fichero %s:\n" 143msgstr "Palabras claves para fichero %s:\n"
144 144
145#: src/main/extractor.c:680 145#: src/main/extractor.c:679
146#, c-format 146#, c-format
147msgid "Initialization of plugin mechanism failed: %s!\n" 147msgid "Initialization of plugin mechanism failed: %s!\n"
148msgstr "¡Inicialización de mecanismo complementario fallado: %s!\n" 148msgstr "¡Inicialización de mecanismo complementario fallado: %s!\n"
diff --git a/po/fr.po b/po/fr.po
index d59f170..a0fc6d7 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -9,7 +9,7 @@ msgid ""
9msgstr "" 9msgstr ""
10"Project-Id-Version: libextractor 1.9\n" 10"Project-Id-Version: libextractor 1.9\n"
11"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 11"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
12"POT-Creation-Date: 2020-07-02 15:57+0200\n" 12"POT-Creation-Date: 2021-01-30 15:28+0100\n"
13"PO-Revision-Date: 2019-05-12 04:34+0200\n" 13"PO-Revision-Date: 2019-05-12 04:34+0200\n"
14"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" 14"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
15"Language-Team: French <traduc@traduc.org>\n" 15"Language-Team: French <traduc@traduc.org>\n"
@@ -146,7 +146,7 @@ msgstr "% fichier BiBTeX\n"
146msgid "Keywords for file %s:\n" 146msgid "Keywords for file %s:\n"
147msgstr "Mots-clés pour le fichier %s:\n" 147msgstr "Mots-clés pour le fichier %s:\n"
148 148
149#: src/main/extractor.c:680 149#: src/main/extractor.c:679
150#, c-format 150#, c-format
151msgid "Initialization of plugin mechanism failed: %s!\n" 151msgid "Initialization of plugin mechanism failed: %s!\n"
152msgstr "Echec de l’initialisation du module %s !\n" 152msgstr "Echec de l’initialisation du module %s !\n"
diff --git a/po/ga.po b/po/ga.po
index b45addf..7d18901 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -6,7 +6,7 @@ msgid ""
6msgstr "" 6msgstr ""
7"Project-Id-Version: libextractor 0.5.20\n" 7"Project-Id-Version: libextractor 0.5.20\n"
8"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 8"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
9"POT-Creation-Date: 2020-07-02 15:57+0200\n" 9"POT-Creation-Date: 2021-01-30 15:28+0100\n"
10"PO-Revision-Date: 2008-03-21 20:46-0700\n" 10"PO-Revision-Date: 2008-03-21 20:46-0700\n"
11"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n" 11"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
12"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n" 12"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -139,7 +139,7 @@ msgstr "%% Comhad BiBTeX\n"
139msgid "Keywords for file %s:\n" 139msgid "Keywords for file %s:\n"
140msgstr "Lorgfhocail do chomhad %s:\n" 140msgstr "Lorgfhocail do chomhad %s:\n"
141 141
142#: src/main/extractor.c:680 142#: src/main/extractor.c:679
143#, c-format 143#, c-format
144msgid "Initialization of plugin mechanism failed: %s!\n" 144msgid "Initialization of plugin mechanism failed: %s!\n"
145msgstr "Theip ar thúsú meicníocht na mbreiseán: %s!\n" 145msgstr "Theip ar thúsú meicníocht na mbreiseán: %s!\n"
diff --git a/po/insert-header.sin b/po/insert-header.sin
index b26de01..ceeebb9 100644
--- a/po/insert-header.sin
+++ b/po/insert-header.sin
@@ -1,5 +1,10 @@
1# Sed script that inserts the file called HEADER before the header entry. 1# Sed script that inserts the file called HEADER before the header entry.
2# 2#
3# Copyright (C) 2001 Free Software Foundation, Inc.
4# Written by Bruno Haible <bruno@clisp.org>, 2001.
5# This file is free software; the Free Software Foundation gives
6# unlimited permission to use, copy, distribute, and modify it.
7#
3# At each occurrence of a line starting with "msgid ", we execute the following 8# At each occurrence of a line starting with "msgid ", we execute the following
4# commands. At the first occurrence, insert the file. At the following 9# commands. At the first occurrence, insert the file. At the following
5# occurrences, do nothing. The distinction between the first and the following 10# occurrences, do nothing. The distinction between the first and the following
diff --git a/po/it.po b/po/it.po
index ad3fe35..472cfb4 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: libextractor-0.6.0\n" 8"Project-Id-Version: libextractor-0.6.0\n"
9"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 9"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
10"POT-Creation-Date: 2020-07-02 15:57+0200\n" 10"POT-Creation-Date: 2021-01-30 15:28+0100\n"
11"PO-Revision-Date: 2010-09-30 23:41+0200\n" 11"PO-Revision-Date: 2010-09-30 23:41+0200\n"
12"Last-Translator: Sergio Zanchetta <primes2h@ubuntu.com>\n" 12"Last-Translator: Sergio Zanchetta <primes2h@ubuntu.com>\n"
13"Language-Team: Italian <tp@lists.linux.it>\n" 13"Language-Team: Italian <tp@lists.linux.it>\n"
@@ -136,7 +136,7 @@ msgstr "%% file BiBTeX\n"
136msgid "Keywords for file %s:\n" 136msgid "Keywords for file %s:\n"
137msgstr "" 137msgstr ""
138 138
139#: src/main/extractor.c:680 139#: src/main/extractor.c:679
140#, c-format 140#, c-format
141msgid "Initialization of plugin mechanism failed: %s!\n" 141msgid "Initialization of plugin mechanism failed: %s!\n"
142msgstr "" 142msgstr ""
diff --git a/po/libextractor.pot b/po/libextractor.pot
index 346bafa..bdffbe2 100644
--- a/po/libextractor.pot
+++ b/po/libextractor.pot
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n" 9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 10"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
11"POT-Creation-Date: 2020-07-02 15:57+0200\n" 11"POT-Creation-Date: 2021-01-30 15:28+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n" 14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -131,7 +131,7 @@ msgstr ""
131msgid "Keywords for file %s:\n" 131msgid "Keywords for file %s:\n"
132msgstr "" 132msgstr ""
133 133
134#: src/main/extractor.c:680 134#: src/main/extractor.c:679
135#, c-format 135#, c-format
136msgid "Initialization of plugin mechanism failed: %s!\n" 136msgid "Initialization of plugin mechanism failed: %s!\n"
137msgstr "" 137msgstr ""
diff --git a/po/nl.po b/po/nl.po
index 328fc19..9bada5e 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: libextractor-1.0.0-pre1\n" 9"Project-Id-Version: libextractor-1.0.0-pre1\n"
10"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 10"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
11"POT-Creation-Date: 2020-07-02 15:57+0200\n" 11"POT-Creation-Date: 2021-01-30 15:28+0100\n"
12"PO-Revision-Date: 2013-08-21 22:41+0200\n" 12"PO-Revision-Date: 2013-08-21 22:41+0200\n"
13"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n" 13"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
14"Language-Team: Dutch <vertaling@vrijschrift.org>\n" 14"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -143,7 +143,7 @@ msgstr "%% BiBTeX-bestand\n"
143msgid "Keywords for file %s:\n" 143msgid "Keywords for file %s:\n"
144msgstr "Trefwoorden voor bestand %s:\n" 144msgstr "Trefwoorden voor bestand %s:\n"
145 145
146#: src/main/extractor.c:680 146#: src/main/extractor.c:679
147#, c-format 147#, c-format
148msgid "Initialization of plugin mechanism failed: %s!\n" 148msgid "Initialization of plugin mechanism failed: %s!\n"
149msgstr "Initialisatie van plugin-mechanisme is mislukt: %s\n" 149msgstr "Initialisatie van plugin-mechanisme is mislukt: %s\n"
diff --git a/po/pl.po b/po/pl.po
index a532b3e..a3ecbb3 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: libextractor 1.9\n" 8"Project-Id-Version: libextractor 1.9\n"
9"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 9"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
10"POT-Creation-Date: 2020-07-02 15:57+0200\n" 10"POT-Creation-Date: 2021-01-30 15:28+0100\n"
11"PO-Revision-Date: 2019-02-12 16:02+0100\n" 11"PO-Revision-Date: 2019-02-12 16:02+0100\n"
12"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" 12"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
13"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" 13"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -138,7 +138,7 @@ msgstr "% plik BiBTeX\n"
138msgid "Keywords for file %s:\n" 138msgid "Keywords for file %s:\n"
139msgstr "SÅ‚owa kluczowe dla pliku %s:\n" 139msgstr "SÅ‚owa kluczowe dla pliku %s:\n"
140 140
141#: src/main/extractor.c:680 141#: src/main/extractor.c:679
142#, c-format 142#, c-format
143msgid "Initialization of plugin mechanism failed: %s!\n" 143msgid "Initialization of plugin mechanism failed: %s!\n"
144msgstr "Inicjalizacja mechanizmu wtyczek nie powiodła się: %s!\n" 144msgstr "Inicjalizacja mechanizmu wtyczek nie powiodła się: %s!\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index e20d192..29ca0a9 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: libextractor 1.9\n" 9"Project-Id-Version: libextractor 1.9\n"
10"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 10"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
11"POT-Creation-Date: 2020-07-02 15:57+0200\n" 11"POT-Creation-Date: 2021-01-30 15:28+0100\n"
12"PO-Revision-Date: 2019-02-21 20:46-0200\n" 12"PO-Revision-Date: 2019-02-21 20:46-0200\n"
13"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" 13"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
14"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge." 14"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
@@ -144,7 +144,7 @@ msgstr "% arquivo BiBTeX\n"
144msgid "Keywords for file %s:\n" 144msgid "Keywords for file %s:\n"
145msgstr "Palavras-chave para o arquivo %s:\n" 145msgstr "Palavras-chave para o arquivo %s:\n"
146 146
147#: src/main/extractor.c:680 147#: src/main/extractor.c:679
148#, c-format 148#, c-format
149msgid "Initialization of plugin mechanism failed: %s!\n" 149msgid "Initialization of plugin mechanism failed: %s!\n"
150msgstr "Inicialização do mecanismo do plug-in falhou: %s!\n" 150msgstr "Inicialização do mecanismo do plug-in falhou: %s!\n"
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
index 2436c49..8c70dfb 100644
--- a/po/remove-potcdate.sin
+++ b/po/remove-potcdate.sin
@@ -1,6 +1,12 @@
1# Sed script that remove the POT-Creation-Date line in the header entry 1# Sed script that removes the POT-Creation-Date line in the header entry
2# from a POT file. 2# from a POT file.
3# 3#
4# Copyright (C) 2002 Free Software Foundation, Inc.
5# Copying and distribution of this file, with or without modification,
6# are permitted in any medium without royalty provided the copyright
7# notice and this notice are preserved. This file is offered as-is,
8# without any warranty.
9#
4# The distinction between the first and the following occurrences of the 10# The distinction between the first and the following occurrences of the
5# pattern is achieved by looking at the hold space. 11# pattern is achieved by looking at the hold space.
6/^"POT-Creation-Date: .*"$/{ 12/^"POT-Creation-Date: .*"$/{
diff --git a/po/ro.po b/po/ro.po
index b61822a..381b013 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,23 +1,39 @@
1# Mesajele în limba românã pentru libextractor. 1# Mesajele în limba română pentru libextractor.
2# Copyright (C) 2003 Free Software Foundation, Inc. 2# Copyright © 2003, 2022 Free Software Foundation, Inc.
3# Acest fiºier este distribuit sub aceeaºi licenþã ca ºi pachetul libextractor. 3# Acest fiÈ™ier este distribuit sub aceeaÈ™i licență ca È™i pachetul libextractor.
4# Laurentiu Buzdugan <lbuz@rolix.org>, 2005. 4# This file is distributed under the same license as the libextractor package.
5# 5#
6# Laurentiu Buzdugan <lbuz@rolix.org>, 2005.
7# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022.
6# 8#
9# Cronologia traducerii fiÈ™ierului „libextractorâ€:
10# Traducerea inițială, făcută de LB, pentru versiunea libextractor 0.5.3.
11# Actualizare a mesajelor, de la fiÈ™ierul „libextractor-1.9.potâ€.
12# Actualizare a codării caracterelor, la codarea de caractere UTF-8.
13# Actualizare a diacriticelor de la „cu sedilă†la „cu virgulăâ€.
14# Actualizare a algoritmului formelor de plural (de la „două†la „treiâ€).
15# NU și a mesajelor traduse (acestea au rămas neschimbate).
16# Eliminare a mesajelor ce-au dispărut în ultima versiune.
17# Actualizări realizate de Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 15.01.2022.
18# Actualizare a traducerii pentru versiunea 1.9, făcută de R-GC, 2022.
19# Actualizare a traducerii pentru versiunea Y, făcută de X, Z(anul).
7# 20#
8msgid "" 21msgid ""
9msgstr "" 22msgstr ""
10"Project-Id-Version: libextractor 0.5.3\n" 23"Project-Id-Version: libextractor 1.9\n"
11"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 24"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
12"POT-Creation-Date: 2020-07-02 15:57+0200\n" 25"POT-Creation-Date: 2021-01-30 15:28+0100\n"
13"PO-Revision-Date: 2005-08-16 12:00-0500\n" 26"PO-Revision-Date: 2022-10-11 18:47+0200\n"
14"Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n" 27"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
15"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" 28"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
16"Language: ro\n" 29"Language: ro\n"
17"MIME-Version: 1.0\n" 30"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=ISO-8859-2\n" 31"Content-Type: text/plain; charset=UTF-8\n"
19"Content-Transfer-Encoding: 8bit\n" 32"Content-Transfer-Encoding: 8bit\n"
20"Plural-Forms: nplurals=2; plural=(n != 1);\n" 33"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
34"20)) ? 1 : 2);\n"
35"X-Bugs: Report translation errors to the Language-Team address.\n"
36"X-Generator: Poedit 3.1.1\n"
21 37
22#: src/main/extract.c:134 38#: src/main/extract.c:134
23#, c-format 39#, c-format
@@ -26,7 +42,7 @@ msgid ""
26"%s\n" 42"%s\n"
27"\n" 43"\n"
28msgstr "" 44msgstr ""
29"Folosire: %s\n" 45"Utilizare: %s\n"
30"%s\n" 46"%s\n"
31"\n" 47"\n"
32 48
@@ -35,71 +51,73 @@ msgstr ""
35msgid "" 51msgid ""
36"Arguments mandatory for long options are also mandatory for short options.\n" 52"Arguments mandatory for long options are also mandatory for short options.\n"
37msgstr "" 53msgstr ""
38"Argumentele obligatorii pentru opþiunile lungi sunt obligatorii ºi pentru " 54"Argumentele obligatorii pentru opÈ›iunile lungi sunt obligatorii È™i pentru "
39"opþiunile scurte.\n" 55"opÈ›iunile scurte.\n"
40 56
41#: src/main/extract.c:219 57#: src/main/extract.c:219
42msgid "print output in bibtex format" 58msgid "print output in bibtex format"
43msgstr "afiºeazã ieºirea în format bibtex" 59msgstr "afiÈ™ează ieÈ™irea în format bibtex"
44 60
45#: src/main/extract.c:222 61#: src/main/extract.c:222
46msgid "produce grep-friendly output (all results on one line per file)" 62msgid "produce grep-friendly output (all results on one line per file)"
47msgstr "" 63msgstr ""
64"produce rezultate care sunt ușor de manipulat cu grep (toate rezultatele pe "
65"o singură linie per fișier)"
48 66
49#: src/main/extract.c:224 67#: src/main/extract.c:224
50msgid "print this help" 68msgid "print this help"
51msgstr "afiºeazã acest mesaj de ajutor" 69msgstr "afiÈ™ează acest mesaj de ajutor"
52 70
53#: src/main/extract.c:226 71#: src/main/extract.c:226
54msgid "run plugins in-process (simplifies debugging)" 72msgid "run plugins in-process (simplifies debugging)"
55msgstr "" 73msgstr "rulează module în interiorul procesului (simplifică depanarea)"
56 74
57#: src/main/extract.c:229 75#: src/main/extract.c:229
58msgid "read data from file into memory and extract from memory" 76msgid "read data from file into memory and extract from memory"
59msgstr "" 77msgstr "citește datele din fișier în memorie și le extrage din memorie"
60 78
61#: src/main/extract.c:231 79#: src/main/extract.c:231
62msgid "load an extractor plugin named LIBRARY" 80msgid "load an extractor plugin named LIBRARY"
63msgstr "încarcã un plugin extractor numit LIBRÃRIE" 81msgstr "încarcă un modul extractor numit „LIBRARYâ€"
64 82
65#: src/main/extract.c:233 83#: src/main/extract.c:233
66msgid "list all keyword types" 84msgid "list all keyword types"
67msgstr "listeazã toate tipurile de cuvinte cheie" 85msgstr "listează toate tipurile de cuvinte cheie"
68 86
69#: src/main/extract.c:235 87#: src/main/extract.c:235
70msgid "do not use the default set of extractor plugins" 88msgid "do not use the default set of extractor plugins"
71msgstr "nu folosi setul implicit de plugin-uri extractor" 89msgstr "nu utilizează setul implicit de module extractoare"
72 90
73#: src/main/extract.c:238 91#: src/main/extract.c:238
74msgid "print only keywords of the given TYPE (use -L to get a list)" 92msgid "print only keywords of the given TYPE (use -L to get a list)"
75msgstr "" 93msgstr ""
76"afiºeazã numai cuvintele cheie pentru TIP-ul dat (foloseºte -L pentru a " 94"afiÈ™ează numai cuvintele cheie pentru TIP-ul dat (utilizaÈ›i opÈ›iunea „-L†"
77"obþine o listã" 95"pentru a obÈ›ine o listă)"
78 96
79#: src/main/extract.c:240 97#: src/main/extract.c:240
80msgid "print the version number" 98msgid "print the version number"
81msgstr "afiºeazã numãrul versiunii" 99msgstr "afiÈ™ează numărul versiunii"
82 100
83#: src/main/extract.c:242 101#: src/main/extract.c:242
84msgid "be verbose" 102msgid "be verbose"
85msgstr "fi vorbãreþ" 103msgstr "afiÈ™ează mesaje cu informaÈ›ii detaliate"
86 104
87#: src/main/extract.c:244 105#: src/main/extract.c:244
88msgid "do not print keywords of the given TYPE" 106msgid "do not print keywords of the given TYPE"
89msgstr "nu afiºa cuvinte cheie de TIP-ul dat" 107msgstr "nu afiÈ™ează cuvintele cheie de TIP-ul dat"
90 108
91#: src/main/extract.c:247 109#: src/main/extract.c:247
92msgid "extract [OPTIONS] [FILENAME]*" 110msgid "extract [OPTIONS] [FILENAME]*"
93msgstr "extract [OPÞIUNI] [NUME_FIªIER]*" 111msgstr "extract [OPÈšIUNI] [NUME_FIȘIER]*"
94 112
95#: src/main/extract.c:248 113#: src/main/extract.c:248
96msgid "Extract metadata from files." 114msgid "Extract metadata from files."
97msgstr "Extrage metadata din fiºiere." 115msgstr "Extrage metadatele din fiÈ™iere."
98 116
99#: src/main/extract.c:294 117#: src/main/extract.c:294
100#, c-format 118#, c-format
101msgid "Found by `%s' plugin:\n" 119msgid "Found by `%s' plugin:\n"
102msgstr "" 120msgstr "Găsit de pluginul „%sâ€:\n"
103 121
104#: src/main/extract.c:297 src/main/extract.c:386 122#: src/main/extract.c:297 src/main/extract.c:386
105#: src/main/extractor_metatypes.c:153 src/main/extractor_print.c:86 123#: src/main/extractor_metatypes.c:153 src/main/extractor_print.c:86
@@ -110,68 +128,70 @@ msgstr "necunoscut"
110#: src/main/extract.c:302 128#: src/main/extract.c:302
111#, c-format 129#, c-format
112msgid "%s - (unknown, %u bytes)\n" 130msgid "%s - (unknown, %u bytes)\n"
113msgstr "" 131msgstr "%s - (necunoscut, %u octeți)\n"
114 132
115#: src/main/extract.c:333 133#: src/main/extract.c:333
116#, fuzzy, c-format 134#, c-format
117msgid "%s - (binary, %u bytes)\n" 135msgid "%s - (binary, %u bytes)\n"
118msgstr "%s - (binar)\n" 136msgstr "%s - (binar, %u octeți)\n"
119 137
120#: src/main/extract.c:827 src/main/extract.c:840 138#: src/main/extract.c:827 src/main/extract.c:840
121msgid "" 139msgid ""
122"Illegal combination of options, cannot combine multiple styles of printing.\n" 140"Illegal combination of options, cannot combine multiple styles of printing.\n"
123msgstr "" 141msgstr ""
142"Combinație nevalidă de opțiuni, nu se pot combina mai multe stiluri de "
143"imprimare.\n"
124 144
125#: src/main/extract.c:874 145#: src/main/extract.c:874
126#, fuzzy, c-format 146#, c-format
127msgid "You must specify an argument for the `%s' option (option ignored).\n" 147msgid "You must specify an argument for the `%s' option (option ignored).\n"
128msgstr "" 148msgstr ""
129"Trebuie sã specificaþi un argument pentru opþiunea '%s' (opþiune ignoratã).\n" 149"Trebuie să specificaÈ›i un argument pentru opÈ›iunea „%s†(opÈ›iunea este "
150"ignorată).\n"
130 151
131#: src/main/extract.c:943 152#: src/main/extract.c:943
132msgid "Use --help to get a list of options.\n" 153msgid "Use --help to get a list of options.\n"
133msgstr "Folosiþi --help pentru a obþine o listã de opþiuni.\n" 154msgstr "UtilizaÈ›i „--help†pentru a obÈ›ine o listă de opÈ›iuni.\n"
134 155
135#: src/main/extract.c:984 156#: src/main/extract.c:984
136#, fuzzy
137msgid "% BiBTeX file\n" 157msgid "% BiBTeX file\n"
138msgstr "%% BiBTeX file\n" 158msgstr "%% fișier BiBTeX\n"
139 159
140#: src/main/extract.c:992 160#: src/main/extract.c:992
141#, c-format 161#, c-format
142msgid "Keywords for file %s:\n" 162msgid "Keywords for file %s:\n"
143msgstr "Cuvinte cheie pentru fiºier %s:\n" 163msgstr "Cuvinte cheie pentru fiÈ™ierul %s:\n"
144 164
145#: src/main/extractor.c:680 165#: src/main/extractor.c:679
146#, c-format 166#, c-format
147msgid "Initialization of plugin mechanism failed: %s!\n" 167msgid "Initialization of plugin mechanism failed: %s!\n"
148msgstr "iniþializare mecanismului de plugin a eºuat: %s!\n" 168msgstr "IniÈ›ializarea mecanismului pluginului a eÈ™uat: %s!n\n"
149 169
150#: src/main/extractor_metatypes.c:46 170#: src/main/extractor_metatypes.c:46
151msgid "reserved" 171msgid "reserved"
152msgstr "" 172msgstr "rezervat"
153 173
154#: src/main/extractor_metatypes.c:47 174#: src/main/extractor_metatypes.c:47
155msgid "reserved value, do not use" 175msgid "reserved value, do not use"
156msgstr "" 176msgstr "valoare rezervată, nu se utilizează"
157 177
158#: src/main/extractor_metatypes.c:48 178#: src/main/extractor_metatypes.c:48
159msgid "mimetype" 179msgid "mimetype"
160msgstr "mimetype" 180msgstr "tip MIME"
161 181
162#: src/main/extractor_metatypes.c:49 182#: src/main/extractor_metatypes.c:49
163#, fuzzy
164msgid "mime type" 183msgid "mime type"
165msgstr "mimetype" 184msgstr "tip MIME"
166 185
167#: src/main/extractor_metatypes.c:50 186#: src/main/extractor_metatypes.c:50
168#, fuzzy
169msgid "embedded filename" 187msgid "embedded filename"
170msgstr "nume_fiºier" 188msgstr "numele fiÈ™ierului încorporat"
171 189
172#: src/main/extractor_metatypes.c:52 190#: src/main/extractor_metatypes.c:52
173msgid "filename that was embedded (not necessarily the current filename)" 191msgid "filename that was embedded (not necessarily the current filename)"
174msgstr "" 192msgstr ""
193"numele fișierului care a fost încorporat (nu neapărat numele fișierului "
194"curent)"
175 195
176#: src/main/extractor_metatypes.c:53 196#: src/main/extractor_metatypes.c:53
177msgid "comment" 197msgid "comment"
@@ -179,7 +199,7 @@ msgstr "comentariu"
179 199
180#: src/main/extractor_metatypes.c:54 200#: src/main/extractor_metatypes.c:54
181msgid "comment about the content" 201msgid "comment about the content"
182msgstr "" 202msgstr "comentariu despre conținut"
183 203
184#: src/main/extractor_metatypes.c:55 204#: src/main/extractor_metatypes.c:55
185msgid "title" 205msgid "title"
@@ -187,244 +207,228 @@ msgstr "titlu"
187 207
188#: src/main/extractor_metatypes.c:56 208#: src/main/extractor_metatypes.c:56
189msgid "title of the work" 209msgid "title of the work"
190msgstr "" 210msgstr "titlul lucrării"
191 211
192#: src/main/extractor_metatypes.c:58 212#: src/main/extractor_metatypes.c:58
193msgid "book title" 213msgid "book title"
194msgstr "titlu de carte" 214msgstr "titlul cărții"
195 215
196#: src/main/extractor_metatypes.c:59 216#: src/main/extractor_metatypes.c:59
197msgid "title of the book containing the work" 217msgid "title of the book containing the work"
198msgstr "" 218msgstr "titlul cărții care conține lucrarea"
199 219
200#: src/main/extractor_metatypes.c:60 220#: src/main/extractor_metatypes.c:60
201#, fuzzy
202msgid "book edition" 221msgid "book edition"
203msgstr "titlu de carte" 222msgstr "ediția cărții"
204 223
205#: src/main/extractor_metatypes.c:61 224#: src/main/extractor_metatypes.c:61
206msgid "edition of the book (or book containing the work)" 225msgid "edition of the book (or book containing the work)"
207msgstr "" 226msgstr "ediția cărții (sau cartea care conține lucrarea)"
208 227
209#: src/main/extractor_metatypes.c:62 228#: src/main/extractor_metatypes.c:62
210#, fuzzy
211msgid "book chapter" 229msgid "book chapter"
212msgstr "titlu de carte" 230msgstr "capitolul cărții"
213 231
214#: src/main/extractor_metatypes.c:63 232#: src/main/extractor_metatypes.c:63
215#, fuzzy
216msgid "chapter number" 233msgid "chapter number"
217msgstr "Numãr de fiºier incorect" 234msgstr "numărul capitolului"
218 235
219#: src/main/extractor_metatypes.c:64 236#: src/main/extractor_metatypes.c:64
220msgid "journal name" 237msgid "journal name"
221msgstr "" 238msgstr "numele jurnalului"
222 239
223#: src/main/extractor_metatypes.c:65 240#: src/main/extractor_metatypes.c:65
224msgid "journal or magazine the work was published in" 241msgid "journal or magazine the work was published in"
225msgstr "" 242msgstr "jurnalul sau revista în care lucrarea a fost publicată"
226 243
227#: src/main/extractor_metatypes.c:66 244#: src/main/extractor_metatypes.c:66
228msgid "journal volume" 245msgid "journal volume"
229msgstr "" 246msgstr "volumul jurnalului"
230 247
231#: src/main/extractor_metatypes.c:67 248#: src/main/extractor_metatypes.c:67
232msgid "volume of a journal or multi-volume book" 249msgid "volume of a journal or multi-volume book"
233msgstr "" 250msgstr "volumul unui jurnal sau al unei cărți în mai multe volume"
234 251
235#: src/main/extractor_metatypes.c:69 252#: src/main/extractor_metatypes.c:69
236#, fuzzy
237msgid "journal number" 253msgid "journal number"
238msgstr "Numãr de fiºier incorect" 254msgstr "numărul jurnalului"
239 255
240#: src/main/extractor_metatypes.c:70 256#: src/main/extractor_metatypes.c:70
241msgid "number of a journal, magazine or tech-report" 257msgid "number of a journal, magazine or tech-report"
242msgstr "" 258msgstr "numărul unui jurnal, al unei reviste sau al unui raport tehnologic"
243 259
244#: src/main/extractor_metatypes.c:71 260#: src/main/extractor_metatypes.c:71
245msgid "page count" 261msgid "page count"
246msgstr "numãr de pagini" 262msgstr "număr de pagini"
247 263
248#: src/main/extractor_metatypes.c:72 264#: src/main/extractor_metatypes.c:72
249msgid "total number of pages of the work" 265msgid "total number of pages of the work"
250msgstr "" 266msgstr "numărul total de pagini ale lucrării"
251 267
252#: src/main/extractor_metatypes.c:73 268#: src/main/extractor_metatypes.c:73
253#, fuzzy
254msgid "page range" 269msgid "page range"
255msgstr "ordine pagini" 270msgstr "interval pagini"
256 271
257#: src/main/extractor_metatypes.c:75 272#: src/main/extractor_metatypes.c:75
258msgid "page numbers of the publication in the respective journal or book" 273msgid "page numbers of the publication in the respective journal or book"
259msgstr "" 274msgstr "numerele paginilor publicației din jurnalul sau cartea respectivă"
260 275
261#: src/main/extractor_metatypes.c:76 276#: src/main/extractor_metatypes.c:76
262#, fuzzy
263msgid "author name" 277msgid "author name"
264msgstr "autor" 278msgstr "numele autorului"
265 279
266#: src/main/extractor_metatypes.c:77 280#: src/main/extractor_metatypes.c:77
267msgid "name of the author(s)" 281msgid "name of the author(s)"
268msgstr "" 282msgstr "numele autorului/autorilor"
269 283
270#: src/main/extractor_metatypes.c:78 284#: src/main/extractor_metatypes.c:78
271#, fuzzy
272msgid "author email" 285msgid "author email"
273msgstr "autor" 286msgstr "e-mailul autorului"
274 287
275#: src/main/extractor_metatypes.c:79 288#: src/main/extractor_metatypes.c:79
276msgid "e-mail of the author(s)" 289msgid "e-mail of the author(s)"
277msgstr "" 290msgstr "e-mailul autorului/autorilor"
278 291
279#: src/main/extractor_metatypes.c:81 292#: src/main/extractor_metatypes.c:81
280#, fuzzy
281msgid "author institution" 293msgid "author institution"
282msgstr "orientare" 294msgstr "instituția autorului"
283 295
284#: src/main/extractor_metatypes.c:82 296#: src/main/extractor_metatypes.c:82
285msgid "institution the author worked for" 297msgid "institution the author worked for"
286msgstr "" 298msgstr "instituția pentru care a lucrat autorul"
287 299
288#: src/main/extractor_metatypes.c:83 300#: src/main/extractor_metatypes.c:83
289msgid "publisher" 301msgid "publisher"
290msgstr "publicist" 302msgstr "editura"
291 303
292#: src/main/extractor_metatypes.c:84 304#: src/main/extractor_metatypes.c:84
293#, fuzzy
294msgid "name of the publisher" 305msgid "name of the publisher"
295msgstr "publicist" 306msgstr "numele editurii"
296 307
297#: src/main/extractor_metatypes.c:85 308#: src/main/extractor_metatypes.c:85
298#, fuzzy
299msgid "publisher's address" 309msgid "publisher's address"
300msgstr "publicist" 310msgstr "adresa editurii"
301 311
302#: src/main/extractor_metatypes.c:86 312#: src/main/extractor_metatypes.c:86
303msgid "Address of the publisher (often only the city)" 313msgid "Address of the publisher (often only the city)"
304msgstr "" 314msgstr "Adresa editurii (de cele mai multe ori, doar orașul)"
305 315
306#: src/main/extractor_metatypes.c:87 316#: src/main/extractor_metatypes.c:87
307msgid "publishing institution" 317msgid "publishing institution"
308msgstr "" 318msgstr "instituția editorială"
309 319
310#: src/main/extractor_metatypes.c:89 320#: src/main/extractor_metatypes.c:89
311msgid "" 321msgid ""
312"institution that was involved in the publishing, but not necessarily the " 322"institution that was involved in the publishing, but not necessarily the "
313"publisher" 323"publisher"
314msgstr "" 324msgstr "instituția care a fost implicată în editare, dar nu neapărat editura"
315 325
316#: src/main/extractor_metatypes.c:90 326#: src/main/extractor_metatypes.c:90
317#, fuzzy
318msgid "publication series" 327msgid "publication series"
319msgstr "data publicãrii" 328msgstr "seria de publicaÈ›ii"
320 329
321#: src/main/extractor_metatypes.c:91 330#: src/main/extractor_metatypes.c:91
322msgid "series of books the book was published in" 331msgid "series of books the book was published in"
323msgstr "" 332msgstr "seria de cărți în care a fost publicată cartea"
324 333
325#: src/main/extractor_metatypes.c:93 334#: src/main/extractor_metatypes.c:93
326#, fuzzy
327msgid "publication type" 335msgid "publication type"
328msgstr "data publicãrii" 336msgstr "tipul publicaÈ›iei"
329 337
330#: src/main/extractor_metatypes.c:94 338#: src/main/extractor_metatypes.c:94
331msgid "type of the tech-report" 339msgid "type of the tech-report"
332msgstr "" 340msgstr "tipul raportului tehnologic"
333 341
334#: src/main/extractor_metatypes.c:95 342#: src/main/extractor_metatypes.c:95
335#, fuzzy
336msgid "publication year" 343msgid "publication year"
337msgstr "data publicãrii" 344msgstr "anul publicării"
338 345
339#: src/main/extractor_metatypes.c:97 346#: src/main/extractor_metatypes.c:97
340msgid "year of publication (or, if unpublished, the year of creation)" 347msgid "year of publication (or, if unpublished, the year of creation)"
341msgstr "" 348msgstr "anul publicării (sau, dacă nu a fost publicată, anul creării)"
342 349
343#: src/main/extractor_metatypes.c:98 350#: src/main/extractor_metatypes.c:98
344#, fuzzy
345msgid "publication month" 351msgid "publication month"
346msgstr "data publicãrii" 352msgstr "luna publicării"
347 353
348#: src/main/extractor_metatypes.c:100 354#: src/main/extractor_metatypes.c:100
349msgid "month of publication (or, if unpublished, the month of creation)" 355msgid "month of publication (or, if unpublished, the month of creation)"
350msgstr "" 356msgstr "luna publicării (sau, dacă nu este publicată, luna creării)"
351 357
352#: src/main/extractor_metatypes.c:101 358#: src/main/extractor_metatypes.c:101
353#, fuzzy
354msgid "publication day" 359msgid "publication day"
355msgstr "data publicãrii" 360msgstr "ziua publicării"
356 361
357#: src/main/extractor_metatypes.c:103 362#: src/main/extractor_metatypes.c:103
358msgid "" 363msgid ""
359"day of publication (or, if unpublished, the day of creation), relative to " 364"day of publication (or, if unpublished, the day of creation), relative to "
360"the given month" 365"the given month"
361msgstr "" 366msgstr "ziua publicării (sau, dacă nu este publicată, ziua creării)"
362 367
363#: src/main/extractor_metatypes.c:104 368#: src/main/extractor_metatypes.c:104
364msgid "publication date" 369msgid "publication date"
365msgstr "data publicãrii" 370msgstr "data publicării"
366 371
367#: src/main/extractor_metatypes.c:106 372#: src/main/extractor_metatypes.c:106
368msgid "date of publication (or, if unpublished, the date of creation)" 373msgid "date of publication (or, if unpublished, the date of creation)"
369msgstr "" 374msgstr "data publicării (sau, dacă nu este publicată, data creării)"
370 375
371#: src/main/extractor_metatypes.c:108 376#: src/main/extractor_metatypes.c:108
372msgid "bibtex eprint" 377msgid "bibtex eprint"
373msgstr "" 378msgstr "imprimare electronică bibtex"
374 379
375#: src/main/extractor_metatypes.c:109 380#: src/main/extractor_metatypes.c:109
376msgid "specification of an electronic publication" 381msgid "specification of an electronic publication"
377msgstr "" 382msgstr "specificația unei publicații electronice"
378 383
379#: src/main/extractor_metatypes.c:110 384#: src/main/extractor_metatypes.c:110
380msgid "bibtex entry type" 385msgid "bibtex entry type"
381msgstr "" 386msgstr "tipul de intrare bibtex"
382 387
383#: src/main/extractor_metatypes.c:111 388#: src/main/extractor_metatypes.c:111
384msgid "type of the publication for bibTeX bibliographies" 389msgid "type of the publication for bibTeX bibliographies"
385msgstr "" 390msgstr "tipul publicației pentru bibliografii bibTeX"
386 391
387#: src/main/extractor_metatypes.c:112 392#: src/main/extractor_metatypes.c:112
388msgid "language" 393msgid "language"
389msgstr "limbã" 394msgstr "limba"
390 395
391#: src/main/extractor_metatypes.c:113 396#: src/main/extractor_metatypes.c:113
392msgid "language the work uses" 397msgid "language the work uses"
393msgstr "" 398msgstr "limba utilizată în lucrare"
394 399
395#: src/main/extractor_metatypes.c:114 400#: src/main/extractor_metatypes.c:114
396#, fuzzy
397msgid "creation time" 401msgid "creation time"
398msgstr "data creãrii" 402msgstr "ora creării"
399 403
400#: src/main/extractor_metatypes.c:115 404#: src/main/extractor_metatypes.c:115
401msgid "time and date of creation" 405msgid "time and date of creation"
402msgstr "" 406msgstr "ora și data creării"
403 407
404#: src/main/extractor_metatypes.c:116 408#: src/main/extractor_metatypes.c:116
405msgid "URL" 409msgid "URL"
406msgstr "" 410msgstr "adresa URL"
407 411
408#: src/main/extractor_metatypes.c:118 412#: src/main/extractor_metatypes.c:118
409msgid "universal resource location (where the work is made available)" 413msgid "universal resource location (where the work is made available)"
410msgstr "" 414msgstr ""
415"locația universală a resurselor (unde lucrarea este pusă la dispoziție)"
411 416
412#: src/main/extractor_metatypes.c:120 417#: src/main/extractor_metatypes.c:120
413msgid "URI" 418msgid "URI"
414msgstr "" 419msgstr "adresa URI"
415 420
416#: src/main/extractor_metatypes.c:121 421#: src/main/extractor_metatypes.c:121
417#, fuzzy
418msgid "universal resource identifier" 422msgid "universal resource identifier"
419msgstr "identificator-resursã" 423msgstr "identificatorul universal al resursei"
420 424
421#: src/main/extractor_metatypes.c:122 425#: src/main/extractor_metatypes.c:122
422msgid "international standard recording code" 426msgid "international standard recording code"
423msgstr "" 427msgstr "codul standard internațional de înregistrare (ISRC în engleză)"
424 428
425#: src/main/extractor_metatypes.c:123 429#: src/main/extractor_metatypes.c:123
426msgid "ISRC number identifying the work" 430msgid "ISRC number identifying the work"
427msgstr "" 431msgstr "Numărul ISRC care identifică lucrarea"
428 432
429#: src/main/extractor_metatypes.c:124 433#: src/main/extractor_metatypes.c:124
430msgid "MD4" 434msgid "MD4"
@@ -432,7 +436,7 @@ msgstr "MD4"
432 436
433#: src/main/extractor_metatypes.c:125 437#: src/main/extractor_metatypes.c:125
434msgid "MD4 hash" 438msgid "MD4 hash"
435msgstr "" 439msgstr "sumă de control MD4"
436 440
437#: src/main/extractor_metatypes.c:126 441#: src/main/extractor_metatypes.c:126
438msgid "MD5" 442msgid "MD5"
@@ -440,89 +444,83 @@ msgstr "MD5"
440 444
441#: src/main/extractor_metatypes.c:127 445#: src/main/extractor_metatypes.c:127
442msgid "MD5 hash" 446msgid "MD5 hash"
443msgstr "" 447msgstr "sumă de control MD5"
444 448
445#: src/main/extractor_metatypes.c:128 449#: src/main/extractor_metatypes.c:128
446msgid "SHA-0" 450msgid "SHA-0"
447msgstr "SHA-0" 451msgstr "SHA-0"
448 452
449#: src/main/extractor_metatypes.c:129 453#: src/main/extractor_metatypes.c:129
450#, fuzzy
451msgid "SHA-0 hash" 454msgid "SHA-0 hash"
452msgstr "SHA-0" 455msgstr "sumă de control SHA-0"
453 456
454#: src/main/extractor_metatypes.c:131 457#: src/main/extractor_metatypes.c:131
455msgid "SHA-1" 458msgid "SHA-1"
456msgstr "SHA-1" 459msgstr "SHA-1"
457 460
458#: src/main/extractor_metatypes.c:132 461#: src/main/extractor_metatypes.c:132
459#, fuzzy
460msgid "SHA-1 hash" 462msgid "SHA-1 hash"
461msgstr "SHA-1" 463msgstr "sumă de control SHA-1"
462 464
463#: src/main/extractor_metatypes.c:133 465#: src/main/extractor_metatypes.c:133
464msgid "RipeMD160" 466msgid "RipeMD160"
465msgstr "RipeMD160" 467msgstr "RipeMD160"
466 468
467#: src/main/extractor_metatypes.c:134 469#: src/main/extractor_metatypes.c:134
468#, fuzzy
469msgid "RipeMD150 hash" 470msgid "RipeMD150 hash"
470msgstr "RipeMD160" 471msgstr "sumă de control RipeMD160"
471 472
472#: src/main/extractor_metatypes.c:135 src/main/extractor_metatypes.c:136 473#: src/main/extractor_metatypes.c:135 src/main/extractor_metatypes.c:136
473msgid "GPS latitude ref" 474msgid "GPS latitude ref"
474msgstr "" 475msgstr "referință de latitudine GPS"
475 476
476#: src/main/extractor_metatypes.c:137 src/main/extractor_metatypes.c:138 477#: src/main/extractor_metatypes.c:137 src/main/extractor_metatypes.c:138
477msgid "GPS latitude" 478msgid "GPS latitude"
478msgstr "" 479msgstr "latitudine GPS"
479 480
480#: src/main/extractor_metatypes.c:139 src/main/extractor_metatypes.c:140 481#: src/main/extractor_metatypes.c:139 src/main/extractor_metatypes.c:140
481msgid "GPS longitude ref" 482msgid "GPS longitude ref"
482msgstr "" 483msgstr "referință de longitudine GPS"
483 484
484#: src/main/extractor_metatypes.c:142 src/main/extractor_metatypes.c:143 485#: src/main/extractor_metatypes.c:142 src/main/extractor_metatypes.c:143
485msgid "GPS longitude" 486msgid "GPS longitude"
486msgstr "" 487msgstr "longitudine GPS"
487 488
488#: src/main/extractor_metatypes.c:144 489#: src/main/extractor_metatypes.c:144
489msgid "city" 490msgid "city"
490msgstr "" 491msgstr "orașul"
491 492
492#: src/main/extractor_metatypes.c:145 493#: src/main/extractor_metatypes.c:145
493msgid "name of the city where the document originated" 494msgid "name of the city where the document originated"
494msgstr "" 495msgstr "numele orașului din care a provenit documentul"
495 496
496#: src/main/extractor_metatypes.c:146 497#: src/main/extractor_metatypes.c:146
497#, fuzzy
498msgid "sublocation" 498msgid "sublocation"
499msgstr "locaþie" 499msgstr "sublocaÈ›ie"
500 500
501#: src/main/extractor_metatypes.c:147 501#: src/main/extractor_metatypes.c:147
502msgid "more specific location of the geographic origin" 502msgid "more specific location of the geographic origin"
503msgstr "" 503msgstr "localizarea mai specifică a originii geografice"
504 504
505#: src/main/extractor_metatypes.c:148 505#: src/main/extractor_metatypes.c:148
506#, fuzzy
507msgid "country" 506msgid "country"
508msgstr "Þarã" 507msgstr "È›ara"
509 508
510#: src/main/extractor_metatypes.c:149 509#: src/main/extractor_metatypes.c:149
511msgid "name of the country where the document originated" 510msgid "name of the country where the document originated"
512msgstr "" 511msgstr "numele țării din care a provenit documentul"
513 512
514#: src/main/extractor_metatypes.c:150 513#: src/main/extractor_metatypes.c:150
515#, fuzzy
516msgid "country code" 514msgid "country code"
517msgstr "Þarã" 515msgstr "codul țării"
518 516
519#: src/main/extractor_metatypes.c:151 517#: src/main/extractor_metatypes.c:151
520msgid "ISO 2-letter country code for the country of origin" 518msgid "ISO 2-letter country code for the country of origin"
521msgstr "" 519msgstr "codul de țară ISO din două litere pentru țara de origine"
522 520
523#: src/main/extractor_metatypes.c:154 521#: src/main/extractor_metatypes.c:154
524msgid "specifics are not known" 522msgid "specifics are not known"
525msgstr "" 523msgstr "nu se cunosc detaliile"
526 524
527#: src/main/extractor_metatypes.c:155 src/main/extractor_metatypes.c:156 525#: src/main/extractor_metatypes.c:155 src/main/extractor_metatypes.c:156
528msgid "description" 526msgid "description"
@@ -530,20 +528,19 @@ msgstr "descriere"
530 528
531#: src/main/extractor_metatypes.c:157 529#: src/main/extractor_metatypes.c:157
532msgid "copyright" 530msgid "copyright"
533msgstr "copyright" 531msgstr "drepturi de autor"
534 532
535#: src/main/extractor_metatypes.c:158 533#: src/main/extractor_metatypes.c:158
536msgid "Name of the entity holding the copyright" 534msgid "Name of the entity holding the copyright"
537msgstr "" 535msgstr "Numele entității care deține drepturile de autor"
538 536
539#: src/main/extractor_metatypes.c:159 537#: src/main/extractor_metatypes.c:159
540#, fuzzy
541msgid "rights" 538msgid "rights"
542msgstr "copyright" 539msgstr "drepturi"
543 540
544#: src/main/extractor_metatypes.c:160 541#: src/main/extractor_metatypes.c:160
545msgid "information about rights" 542msgid "information about rights"
546msgstr "" 543msgstr "informații despre drepturi"
547 544
548#: src/main/extractor_metatypes.c:161 src/main/extractor_metatypes.c:162 545#: src/main/extractor_metatypes.c:161 src/main/extractor_metatypes.c:162
549msgid "keywords" 546msgid "keywords"
@@ -551,7 +548,7 @@ msgstr "cuvinte cheie"
551 548
552#: src/main/extractor_metatypes.c:164 src/main/extractor_metatypes.c:165 549#: src/main/extractor_metatypes.c:164 src/main/extractor_metatypes.c:165
553msgid "abstract" 550msgid "abstract"
554msgstr "" 551msgstr "rezumat"
555 552
556#: src/main/extractor_metatypes.c:166 src/main/extractor_metatypes.c:167 553#: src/main/extractor_metatypes.c:166 src/main/extractor_metatypes.c:167
557msgid "summary" 554msgid "summary"
@@ -562,9 +559,8 @@ msgid "subject"
562msgstr "subiect" 559msgstr "subiect"
563 560
564#: src/main/extractor_metatypes.c:169 561#: src/main/extractor_metatypes.c:169
565#, fuzzy
566msgid "subject matter" 562msgid "subject matter"
567msgstr "subiect" 563msgstr "tematica"
568 564
569#: src/main/extractor_metatypes.c:170 src/main/extractor_metatypes.c:205 565#: src/main/extractor_metatypes.c:170 src/main/extractor_metatypes.c:205
570msgid "creator" 566msgid "creator"
@@ -572,7 +568,7 @@ msgstr "creator"
572 568
573#: src/main/extractor_metatypes.c:171 569#: src/main/extractor_metatypes.c:171
574msgid "name of the person who created the document" 570msgid "name of the person who created the document"
575msgstr "" 571msgstr "numele persoanei care a creat documentul"
576 572
577#: src/main/extractor_metatypes.c:172 573#: src/main/extractor_metatypes.c:172
578msgid "format" 574msgid "format"
@@ -580,355 +576,346 @@ msgstr "format"
580 576
581#: src/main/extractor_metatypes.c:173 577#: src/main/extractor_metatypes.c:173
582msgid "name of the document format" 578msgid "name of the document format"
583msgstr "" 579msgstr "numele formatului documentului"
584 580
585#: src/main/extractor_metatypes.c:175 581#: src/main/extractor_metatypes.c:175
586#, fuzzy
587msgid "format version" 582msgid "format version"
588msgstr "versiune" 583msgstr "versiunea formatului"
589 584
590#: src/main/extractor_metatypes.c:176 585#: src/main/extractor_metatypes.c:176
591msgid "version of the document format" 586msgid "version of the document format"
592msgstr "" 587msgstr "versiunea formatului documentului"
593 588
594#: src/main/extractor_metatypes.c:177 589#: src/main/extractor_metatypes.c:177
595#, fuzzy
596msgid "created by software" 590msgid "created by software"
597msgstr "creat pentru" 591msgstr "creat de software"
598 592
599#: src/main/extractor_metatypes.c:178 593#: src/main/extractor_metatypes.c:178
600msgid "name of the software that created the document" 594msgid "name of the software that created the document"
601msgstr "" 595msgstr "numele software-ului care a creat documentul"
602 596
603#: src/main/extractor_metatypes.c:179 597#: src/main/extractor_metatypes.c:179
604#, fuzzy
605msgid "unknown date" 598msgid "unknown date"
606msgstr "necunoscut" 599msgstr "data necunoscută"
607 600
608#: src/main/extractor_metatypes.c:181 601#: src/main/extractor_metatypes.c:181
609msgid "" 602msgid ""
610"ambiguous date (could specify creation time, modification time or access " 603"ambiguous date (could specify creation time, modification time or access "
611"time)" 604"time)"
612msgstr "" 605msgstr ""
606"data ambiguă (ar putea specifica ora creării, ora modificării sau ora de "
607"acces)"
613 608
614#: src/main/extractor_metatypes.c:182 609#: src/main/extractor_metatypes.c:182
615msgid "creation date" 610msgid "creation date"
616msgstr "data creãrii" 611msgstr "data creării"
617 612
618#: src/main/extractor_metatypes.c:183 613#: src/main/extractor_metatypes.c:183
619msgid "date the document was created" 614msgid "date the document was created"
620msgstr "" 615msgstr "data la care a fost creat documentul"
621 616
622#: src/main/extractor_metatypes.c:184 617#: src/main/extractor_metatypes.c:184
623msgid "modification date" 618msgid "modification date"
624msgstr "data modificãrii" 619msgstr "data modificării"
625 620
626#: src/main/extractor_metatypes.c:185 621#: src/main/extractor_metatypes.c:185
627msgid "date the document was modified" 622msgid "date the document was modified"
628msgstr "" 623msgstr "data la care documentul a fost modificat"
629 624
630#: src/main/extractor_metatypes.c:187 625#: src/main/extractor_metatypes.c:187
631msgid "last printed" 626msgid "last printed"
632msgstr "" 627msgstr "tipărit ultima dată"
633 628
634#: src/main/extractor_metatypes.c:188 629#: src/main/extractor_metatypes.c:188
635msgid "date the document was last printed" 630msgid "date the document was last printed"
636msgstr "" 631msgstr "data la care documentul a fost tipărit ultima dată"
637 632
638#: src/main/extractor_metatypes.c:189 633#: src/main/extractor_metatypes.c:189
639msgid "last saved by" 634msgid "last saved by"
640msgstr "" 635msgstr "salvat ultima dată de"
641 636
642#: src/main/extractor_metatypes.c:190 637#: src/main/extractor_metatypes.c:190
643msgid "name of the user who saved the document last" 638msgid "name of the user who saved the document last"
644msgstr "" 639msgstr "numele utilizatorului care a salvat documentul ultima dată"
645 640
646#: src/main/extractor_metatypes.c:191 641#: src/main/extractor_metatypes.c:191
647msgid "total editing time" 642msgid "total editing time"
648msgstr "" 643msgstr "timpul total de editare"
649 644
650#: src/main/extractor_metatypes.c:192 645#: src/main/extractor_metatypes.c:192
651msgid "time spent editing the document" 646msgid "time spent editing the document"
652msgstr "" 647msgstr "timpul petrecut cu editarea documentului"
653 648
654#: src/main/extractor_metatypes.c:193 649#: src/main/extractor_metatypes.c:193
655msgid "editing cycles" 650msgid "editing cycles"
656msgstr "" 651msgstr "cicluri de editare"
657 652
658#: src/main/extractor_metatypes.c:194 653#: src/main/extractor_metatypes.c:194
659msgid "number of editing cycles" 654msgid "number of editing cycles"
660msgstr "" 655msgstr "numărul de cicluri de editare"
661 656
662#: src/main/extractor_metatypes.c:195 657#: src/main/extractor_metatypes.c:195
663msgid "modified by software" 658msgid "modified by software"
664msgstr "" 659msgstr "modificat de software"
665 660
666#: src/main/extractor_metatypes.c:196 661#: src/main/extractor_metatypes.c:196
667msgid "name of software making modifications" 662msgid "name of software making modifications"
668msgstr "" 663msgstr "numele software-ului care efectuează modificările"
669 664
670#: src/main/extractor_metatypes.c:198 665#: src/main/extractor_metatypes.c:198
671msgid "revision history" 666msgid "revision history"
672msgstr "" 667msgstr "istoricul reviziilor"
673 668
674#: src/main/extractor_metatypes.c:199 669#: src/main/extractor_metatypes.c:199
675msgid "information about the revision history" 670msgid "information about the revision history"
676msgstr "" 671msgstr "informații despre istoricul revizuirilor"
677 672
678#: src/main/extractor_metatypes.c:200 673#: src/main/extractor_metatypes.c:200
679msgid "embedded file size" 674msgid "embedded file size"
680msgstr "" 675msgstr "dimensiunea fișierului încorporat"
681 676
682#: src/main/extractor_metatypes.c:202 677#: src/main/extractor_metatypes.c:202
683msgid "size of the contents of the container as embedded in the file" 678msgid "size of the contents of the container as embedded in the file"
684msgstr "" 679msgstr "dimensiunea datelor containerului încorporat în fișier"
685 680
686#: src/main/extractor_metatypes.c:203 681#: src/main/extractor_metatypes.c:203
687#, fuzzy
688msgid "file type" 682msgid "file type"
689msgstr "mimetype" 683msgstr "tipul fișierului"
690 684
691#: src/main/extractor_metatypes.c:204 685#: src/main/extractor_metatypes.c:204
692msgid "standard Macintosh Finder file type information" 686msgid "standard Macintosh Finder file type information"
693msgstr "" 687msgstr "informații standard despre tipul de fișier din Finder Macintosh"
694 688
695#: src/main/extractor_metatypes.c:206 689#: src/main/extractor_metatypes.c:206
696msgid "standard Macintosh Finder file creator information" 690msgid "standard Macintosh Finder file creator information"
697msgstr "" 691msgstr "informații standard pentru crearea fișierelor din Finder Macintosh"
698 692
699#: src/main/extractor_metatypes.c:207 693#: src/main/extractor_metatypes.c:207
700#, fuzzy
701msgid "package name" 694msgid "package name"
702msgstr "împachetator" 695msgstr "numele pachetului"
703 696
704#: src/main/extractor_metatypes.c:208 697#: src/main/extractor_metatypes.c:208
705msgid "unique identifier for the package" 698msgid "unique identifier for the package"
706msgstr "" 699msgstr "identificatorul unic pentru pachet"
707 700
708#: src/main/extractor_metatypes.c:210 701#: src/main/extractor_metatypes.c:210
709#, fuzzy
710msgid "package version" 702msgid "package version"
711msgstr "împachetator" 703msgstr "versiunea pachetului"
712 704
713#: src/main/extractor_metatypes.c:211 705#: src/main/extractor_metatypes.c:211
714msgid "version of the software and its package" 706msgid "version of the software and its package"
715msgstr "" 707msgstr "versiunea software-ului și pachetul acestuia"
716 708
717#: src/main/extractor_metatypes.c:212 709#: src/main/extractor_metatypes.c:212
718#, fuzzy
719msgid "section" 710msgid "section"
720msgstr "descriere" 711msgstr "secțiunea"
721 712
722#: src/main/extractor_metatypes.c:213 713#: src/main/extractor_metatypes.c:213
723msgid "category the software package belongs to" 714msgid "category the software package belongs to"
724msgstr "" 715msgstr "categoria căreia îi aparține pachetul de software"
725 716
726#: src/main/extractor_metatypes.c:214 717#: src/main/extractor_metatypes.c:214
727#, fuzzy
728msgid "upload priority" 718msgid "upload priority"
729msgstr "prioritate" 719msgstr "prioritate de încărcare"
730 720
731#: src/main/extractor_metatypes.c:215 721#: src/main/extractor_metatypes.c:215
732msgid "priority for promoting the release to production" 722msgid "priority for promoting the release to production"
733msgstr "" 723msgstr "prioritatea pentru promovarea lansării în producţie"
734 724
735#: src/main/extractor_metatypes.c:216 725#: src/main/extractor_metatypes.c:216
736#, fuzzy
737msgid "dependencies" 726msgid "dependencies"
738msgstr "dependinþe" 727msgstr "dependenÈ›e"
739 728
740#: src/main/extractor_metatypes.c:217 729#: src/main/extractor_metatypes.c:217
741msgid "packages this package depends upon" 730msgid "packages this package depends upon"
742msgstr "" 731msgstr "pachetele de care depinde acest pachet"
743 732
744#: src/main/extractor_metatypes.c:218 733#: src/main/extractor_metatypes.c:218
745#, fuzzy
746msgid "conflicting packages" 734msgid "conflicting packages"
747msgstr "conflicte" 735msgstr "pachete aflate în conflict"
748 736
749#: src/main/extractor_metatypes.c:219 737#: src/main/extractor_metatypes.c:219
750msgid "packages that cannot be installed with this package" 738msgid "packages that cannot be installed with this package"
751msgstr "" 739msgstr "pachete care nu pot fi instalate împreună cu acest pachet"
752 740
753#: src/main/extractor_metatypes.c:221 741#: src/main/extractor_metatypes.c:221
754#, fuzzy
755msgid "replaced packages" 742msgid "replaced packages"
756msgstr "înlocuite" 743msgstr "pachete înlocuite"
757 744
758#: src/main/extractor_metatypes.c:222 745#: src/main/extractor_metatypes.c:222
759msgid "packages made obsolete by this package" 746msgid "packages made obsolete by this package"
760msgstr "" 747msgstr "pachete devenite învechite prin prezența acestui pachet"
761 748
762#: src/main/extractor_metatypes.c:223 749#: src/main/extractor_metatypes.c:223
763msgid "provides" 750msgid "provides"
764msgstr "furnizeazã" 751msgstr "furnizează"
765 752
766#: src/main/extractor_metatypes.c:224 753#: src/main/extractor_metatypes.c:224
767msgid "functionality provided by this package" 754msgid "functionality provided by this package"
768msgstr "" 755msgstr "funcționalitatea furnizată de acest pachet"
769 756
770#: src/main/extractor_metatypes.c:225 757#: src/main/extractor_metatypes.c:225
771#, fuzzy
772msgid "recommendations" 758msgid "recommendations"
773msgstr "comentariu" 759msgstr "recomandări"
774 760
775#: src/main/extractor_metatypes.c:227 761#: src/main/extractor_metatypes.c:227
776msgid "packages recommended for installation in conjunction with this package" 762msgid "packages recommended for installation in conjunction with this package"
777msgstr "" 763msgstr "pachete recomandate pentru instalare împreună cu acest pachet"
778 764
779#: src/main/extractor_metatypes.c:228 765#: src/main/extractor_metatypes.c:228
780msgid "suggestions" 766msgid "suggestions"
781msgstr "" 767msgstr "sugestii"
782 768
783#: src/main/extractor_metatypes.c:230 769#: src/main/extractor_metatypes.c:230
784msgid "packages suggested for installation in conjunction with this package" 770msgid "packages suggested for installation in conjunction with this package"
785msgstr "" 771msgstr "pachete sugerate pentru instalare împreună cu acest pachet"
786 772
787#: src/main/extractor_metatypes.c:231 773#: src/main/extractor_metatypes.c:231
788msgid "maintainer" 774msgid "maintainer"
789msgstr "" 775msgstr "întreţinător"
790 776
791#: src/main/extractor_metatypes.c:232 777#: src/main/extractor_metatypes.c:232
792msgid "name of the maintainer" 778msgid "name of the maintainer"
793msgstr "" 779msgstr "numele întreținătorului"
794 780
795#: src/main/extractor_metatypes.c:234 781#: src/main/extractor_metatypes.c:234
796msgid "installed size" 782msgid "installed size"
797msgstr "" 783msgstr "dimensiunea instalată"
798 784
799#: src/main/extractor_metatypes.c:235 785#: src/main/extractor_metatypes.c:235
800msgid "space consumption after installation" 786msgid "space consumption after installation"
801msgstr "" 787msgstr "spațiul consumat după instalare"
802 788
803#: src/main/extractor_metatypes.c:236 src/main/extractor_metatypes.c:319 789#: src/main/extractor_metatypes.c:236 src/main/extractor_metatypes.c:319
804msgid "source" 790msgid "source"
805msgstr "sursã" 791msgstr "sursa"
806 792
807#: src/main/extractor_metatypes.c:237 793#: src/main/extractor_metatypes.c:237
808msgid "original source code" 794msgid "original source code"
809msgstr "" 795msgstr "codul sursă original"
810 796
811#: src/main/extractor_metatypes.c:238 797#: src/main/extractor_metatypes.c:238
812msgid "is essential" 798msgid "is essential"
813msgstr "" 799msgstr "este esențial"
814 800
815#: src/main/extractor_metatypes.c:239 801#: src/main/extractor_metatypes.c:239
816msgid "package is marked as essential" 802msgid "package is marked as essential"
817msgstr "" 803msgstr "pachetul este marcat ca fiind esențial"
818 804
819#: src/main/extractor_metatypes.c:240 805#: src/main/extractor_metatypes.c:240
820msgid "target architecture" 806msgid "target architecture"
821msgstr "" 807msgstr "arhitectura țintă"
822 808
823#: src/main/extractor_metatypes.c:241 809#: src/main/extractor_metatypes.c:241
824msgid "hardware architecture the contents can be used for" 810msgid "hardware architecture the contents can be used for"
825msgstr "" 811msgstr "arhitectura hardware pentru care poate fi folosit conținutul"
826 812
827#: src/main/extractor_metatypes.c:242 813#: src/main/extractor_metatypes.c:242
828#, fuzzy
829msgid "pre-dependency" 814msgid "pre-dependency"
830msgstr "dependinþe" 815msgstr "predependenţă"
831 816
832#: src/main/extractor_metatypes.c:243 817#: src/main/extractor_metatypes.c:243
833msgid "dependency that must be satisfied before installation" 818msgid "dependency that must be satisfied before installation"
834msgstr "" 819msgstr "dependență care trebuie satisfăcută înainte de instalare"
835 820
836#: src/main/extractor_metatypes.c:245 821#: src/main/extractor_metatypes.c:245
837msgid "license" 822msgid "license"
838msgstr "licenþã" 823msgstr "licenÈ›a"
839 824
840#: src/main/extractor_metatypes.c:246 825#: src/main/extractor_metatypes.c:246
841msgid "applicable copyright license" 826msgid "applicable copyright license"
842msgstr "" 827msgstr "licența de drepturi de autor aplicabilă"
843 828
844#: src/main/extractor_metatypes.c:247 829#: src/main/extractor_metatypes.c:247
845msgid "distribution" 830msgid "distribution"
846msgstr "distribuþie" 831msgstr "distribuÈ›ie"
847 832
848#: src/main/extractor_metatypes.c:248 833#: src/main/extractor_metatypes.c:248
849msgid "distribution the package is a part of" 834msgid "distribution the package is a part of"
850msgstr "" 835msgstr "distribuția din care face parte pachetul"
851 836
852#: src/main/extractor_metatypes.c:249 837#: src/main/extractor_metatypes.c:249
853#, fuzzy
854msgid "build host" 838msgid "build host"
855msgstr "gazdã-contruit" 839msgstr "gazda contrucÈ›iei"
856 840
857#: src/main/extractor_metatypes.c:250 841#: src/main/extractor_metatypes.c:250
858msgid "machine the package was build on" 842msgid "machine the package was build on"
859msgstr "" 843msgstr "mașina pe care a fost construit pachetul"
860 844
861#: src/main/extractor_metatypes.c:251 845#: src/main/extractor_metatypes.c:251
862msgid "vendor" 846msgid "vendor"
863msgstr "vânzãtor" 847msgstr "vânzător"
864 848
865#: src/main/extractor_metatypes.c:252 849#: src/main/extractor_metatypes.c:252
866msgid "name of the software vendor" 850msgid "name of the software vendor"
867msgstr "" 851msgstr "numele furnizorului de software"
868 852
869#: src/main/extractor_metatypes.c:253 853#: src/main/extractor_metatypes.c:253
870msgid "target operating system" 854msgid "target operating system"
871msgstr "" 855msgstr "sistemul de operare țintă"
872 856
873#: src/main/extractor_metatypes.c:254 857#: src/main/extractor_metatypes.c:254
874msgid "operating system for which this package was made" 858msgid "operating system for which this package was made"
875msgstr "" 859msgstr "sistemul de operare pentru care a fost făcut acest pachet"
876 860
877#: src/main/extractor_metatypes.c:256 861#: src/main/extractor_metatypes.c:256
878#, fuzzy
879msgid "software version" 862msgid "software version"
880msgstr "software" 863msgstr "versiunea software-ului"
881 864
882#: src/main/extractor_metatypes.c:257 865#: src/main/extractor_metatypes.c:257
883msgid "version of the software contained in the file" 866msgid "version of the software contained in the file"
884msgstr "" 867msgstr "versiunea software-ului conținut în fișier"
885 868
886#: src/main/extractor_metatypes.c:258 869#: src/main/extractor_metatypes.c:258
887msgid "target platform" 870msgid "target platform"
888msgstr "" 871msgstr "platformă țintă"
889 872
890#: src/main/extractor_metatypes.c:260 873#: src/main/extractor_metatypes.c:260
891msgid "" 874msgid ""
892"name of the architecture, operating system and distribution this package is " 875"name of the architecture, operating system and distribution this package is "
893"for" 876"for"
894msgstr "" 877msgstr ""
878"numele arhitecturii, sistemului de operare și distribuției pentru care este "
879"destinat acest pachet"
895 880
896#: src/main/extractor_metatypes.c:261 881#: src/main/extractor_metatypes.c:261
897#, fuzzy
898msgid "resource type" 882msgid "resource type"
899msgstr "tip-resursã" 883msgstr "tipul de resursă"
900 884
901#: src/main/extractor_metatypes.c:263 885#: src/main/extractor_metatypes.c:263
902msgid "" 886msgid ""
903"categorization of the nature of the resource that is more specific than the " 887"categorization of the nature of the resource that is more specific than the "
904"file format" 888"file format"
905msgstr "" 889msgstr ""
890"categorizarea naturii resursei care este mai specifică decât formatul "
891"fișierului"
906 892
907#: src/main/extractor_metatypes.c:264 893#: src/main/extractor_metatypes.c:264
908msgid "library search path" 894msgid "library search path"
909msgstr "" 895msgstr "calea de căutare a bibliotecii"
910 896
911#: src/main/extractor_metatypes.c:266 897#: src/main/extractor_metatypes.c:266
912msgid "" 898msgid ""
913"path in the file system to be considered when looking for required libraries" 899"path in the file system to be considered when looking for required libraries"
914msgstr "" 900msgstr ""
901"calea din sistemul de fișiere care trebuie luată în considerare atunci când "
902"se caută bibliotecile necesare"
915 903
916#: src/main/extractor_metatypes.c:267 904#: src/main/extractor_metatypes.c:267
917#, fuzzy
918msgid "library dependency" 905msgid "library dependency"
919msgstr "dependinþe" 906msgstr "dependență de biblioteca"
920 907
921#: src/main/extractor_metatypes.c:268 908#: src/main/extractor_metatypes.c:268
922msgid "name of a library that this file depends on" 909msgid "name of a library that this file depends on"
923msgstr "" 910msgstr "numele unei biblioteci de care depinde acest fișier"
924 911
925#: src/main/extractor_metatypes.c:270 src/main/extractor_metatypes.c:271 912#: src/main/extractor_metatypes.c:270 src/main/extractor_metatypes.c:271
926msgid "camera make" 913msgid "camera make"
927msgstr "producãtor" 914msgstr "marca camerei"
928 915
929#: src/main/extractor_metatypes.c:272 src/main/extractor_metatypes.c:273 916#: src/main/extractor_metatypes.c:272 src/main/extractor_metatypes.c:273
930msgid "camera model" 917msgid "camera model"
931msgstr "model de camerã" 918msgstr "model de cameră"
932 919
933#: src/main/extractor_metatypes.c:274 src/main/extractor_metatypes.c:275 920#: src/main/extractor_metatypes.c:274 src/main/extractor_metatypes.c:275
934msgid "exposure" 921msgid "exposure"
@@ -936,32 +923,31 @@ msgstr "expunere"
936 923
937#: src/main/extractor_metatypes.c:276 src/main/extractor_metatypes.c:277 924#: src/main/extractor_metatypes.c:276 src/main/extractor_metatypes.c:277
938msgid "aperture" 925msgid "aperture"
939msgstr "aperturã" 926msgstr "apertură"
940 927
941#: src/main/extractor_metatypes.c:278 src/main/extractor_metatypes.c:279 928#: src/main/extractor_metatypes.c:278 src/main/extractor_metatypes.c:279
942msgid "exposure bias" 929msgid "exposure bias"
943msgstr "predileie expunere" 930msgstr "deviația de expunere"
944 931
945#: src/main/extractor_metatypes.c:281 src/main/extractor_metatypes.c:282 932#: src/main/extractor_metatypes.c:281 src/main/extractor_metatypes.c:282
946msgid "flash" 933msgid "flash"
947msgstr "bliþ" 934msgstr "bliÈ›"
948 935
949#: src/main/extractor_metatypes.c:283 src/main/extractor_metatypes.c:284 936#: src/main/extractor_metatypes.c:283 src/main/extractor_metatypes.c:284
950msgid "flash bias" 937msgid "flash bias"
951msgstr "predileie bliþ" 938msgstr "deviaÈ›ie bliÈ›"
952 939
953#: src/main/extractor_metatypes.c:285 src/main/extractor_metatypes.c:286 940#: src/main/extractor_metatypes.c:285 src/main/extractor_metatypes.c:286
954msgid "focal length" 941msgid "focal length"
955msgstr "lungime focalã" 942msgstr "distanță focală"
956 943
957#: src/main/extractor_metatypes.c:287 src/main/extractor_metatypes.c:288 944#: src/main/extractor_metatypes.c:287 src/main/extractor_metatypes.c:288
958#, fuzzy
959msgid "focal length 35mm" 945msgid "focal length 35mm"
960msgstr "lungime focalã" 946msgstr "distanță focală 35mm"
961 947
962#: src/main/extractor_metatypes.c:289 src/main/extractor_metatypes.c:290 948#: src/main/extractor_metatypes.c:289 src/main/extractor_metatypes.c:290
963msgid "iso speed" 949msgid "iso speed"
964msgstr "valoare iso" 950msgstr "viteza ISO"
965 951
966#: src/main/extractor_metatypes.c:292 src/main/extractor_metatypes.c:293 952#: src/main/extractor_metatypes.c:292 src/main/extractor_metatypes.c:293
967msgid "exposure mode" 953msgid "exposure mode"
@@ -969,7 +955,7 @@ msgstr "mod expunere"
969 955
970#: src/main/extractor_metatypes.c:294 src/main/extractor_metatypes.c:295 956#: src/main/extractor_metatypes.c:294 src/main/extractor_metatypes.c:295
971msgid "metering mode" 957msgid "metering mode"
972msgstr "mod de mãsurare" 958msgstr "mod de măsurare"
973 959
974#: src/main/extractor_metatypes.c:296 src/main/extractor_metatypes.c:297 960#: src/main/extractor_metatypes.c:296 src/main/extractor_metatypes.c:297
975msgid "macro mode" 961msgid "macro mode"
@@ -981,7 +967,7 @@ msgstr "calitate imagine"
981 967
982#: src/main/extractor_metatypes.c:300 src/main/extractor_metatypes.c:301 968#: src/main/extractor_metatypes.c:300 src/main/extractor_metatypes.c:301
983msgid "white balance" 969msgid "white balance"
984msgstr "balanþã alb" 970msgstr "balanță alb"
985 971
986#: src/main/extractor_metatypes.c:303 src/main/extractor_metatypes.c:304 972#: src/main/extractor_metatypes.c:303 src/main/extractor_metatypes.c:304
987msgid "orientation" 973msgid "orientation"
@@ -989,127 +975,115 @@ msgstr "orientare"
989 975
990#: src/main/extractor_metatypes.c:305 src/main/extractor_metatypes.c:306 976#: src/main/extractor_metatypes.c:305 src/main/extractor_metatypes.c:306
991msgid "magnification" 977msgid "magnification"
992msgstr "mãrire" 978msgstr "mărire"
993 979
994#: src/main/extractor_metatypes.c:307 980#: src/main/extractor_metatypes.c:307
995#, fuzzy
996msgid "image dimensions" 981msgid "image dimensions"
997msgstr "orientare paginã" 982msgstr "dimensiunile imaginii"
998 983
999#: src/main/extractor_metatypes.c:308 984#: src/main/extractor_metatypes.c:308
1000msgid "size of the image in pixels (width times height)" 985msgid "size of the image in pixels (width times height)"
1001msgstr "" 986msgstr "dimensiunea imaginii în pixeli (lățime x înălțime)"
1002 987
1003#: src/main/extractor_metatypes.c:309 src/main/extractor_metatypes.c:310 988#: src/main/extractor_metatypes.c:309 src/main/extractor_metatypes.c:310
1004msgid "produced by software" 989msgid "produced by software"
1005msgstr "" 990msgstr "produs de software-ul"
1006 991
1007#: src/main/extractor_metatypes.c:314 992#: src/main/extractor_metatypes.c:314
1008#, fuzzy
1009msgid "thumbnail" 993msgid "thumbnail"
1010msgstr "data thumbnail binar" 994msgstr "miniatură"
1011 995
1012#: src/main/extractor_metatypes.c:315 996#: src/main/extractor_metatypes.c:315
1013msgid "smaller version of the image for previewing" 997msgid "smaller version of the image for previewing"
1014msgstr "" 998msgstr "o versiune mai mică a imaginii pentru previzualizare"
1015 999
1016#: src/main/extractor_metatypes.c:317 1000#: src/main/extractor_metatypes.c:317
1017#, fuzzy
1018msgid "image resolution" 1001msgid "image resolution"
1019msgstr "rezoluþie" 1002msgstr "rezoluÈ›ia imaginii"
1020 1003
1021#: src/main/extractor_metatypes.c:318 1004#: src/main/extractor_metatypes.c:318
1022#, fuzzy
1023msgid "resolution in dots per inch" 1005msgid "resolution in dots per inch"
1024msgstr "%ux%u puncte pe inci (dpi)" 1006msgstr "rezoluție în puncte pe inci"
1025 1007
1026#: src/main/extractor_metatypes.c:320 1008#: src/main/extractor_metatypes.c:320
1027msgid "Originating entity" 1009msgid "Originating entity"
1028msgstr "" 1010msgstr "Entitatea de origine"
1029 1011
1030#: src/main/extractor_metatypes.c:321 1012#: src/main/extractor_metatypes.c:321
1031msgid "character set" 1013msgid "character set"
1032msgstr "" 1014msgstr "set de caractere"
1033 1015
1034#: src/main/extractor_metatypes.c:322 1016#: src/main/extractor_metatypes.c:322
1035msgid "character encoding used" 1017msgid "character encoding used"
1036msgstr "" 1018msgstr "codificarea caracterelor utilizată"
1037 1019
1038#: src/main/extractor_metatypes.c:323 1020#: src/main/extractor_metatypes.c:323
1039#, fuzzy
1040msgid "line count" 1021msgid "line count"
1041msgstr "numãr de pagini" 1022msgstr "numărarea liniilor"
1042 1023
1043#: src/main/extractor_metatypes.c:324 1024#: src/main/extractor_metatypes.c:324
1044#, fuzzy
1045msgid "number of lines" 1025msgid "number of lines"
1046msgstr "Numãr legãturi în afara domeniului" 1026msgstr "numărul de linii"
1047 1027
1048#: src/main/extractor_metatypes.c:325 1028#: src/main/extractor_metatypes.c:325
1049#, fuzzy
1050msgid "paragraph count" 1029msgid "paragraph count"
1051msgstr "numãr de pagini" 1030msgstr "numărarea paragrafelor"
1052 1031
1053#: src/main/extractor_metatypes.c:326 1032#: src/main/extractor_metatypes.c:326
1054msgid "number of paragraphs" 1033msgid "number of paragraphs"
1055msgstr "" 1034msgstr "numărul de paragrafe"
1056 1035
1057#: src/main/extractor_metatypes.c:328 1036#: src/main/extractor_metatypes.c:328
1058#, fuzzy
1059msgid "word count" 1037msgid "word count"
1060msgstr "numãr de pagini" 1038msgstr "numărarea cuvintelor"
1061 1039
1062#: src/main/extractor_metatypes.c:329 1040#: src/main/extractor_metatypes.c:329
1063msgid "number of words" 1041msgid "number of words"
1064msgstr "" 1042msgstr "numărul de cuvinte"
1065 1043
1066#: src/main/extractor_metatypes.c:330 1044#: src/main/extractor_metatypes.c:330
1067#, fuzzy
1068msgid "character count" 1045msgid "character count"
1069msgstr "numãr de pagini" 1046msgstr "numărarea caracterelor"
1070 1047
1071#: src/main/extractor_metatypes.c:331 1048#: src/main/extractor_metatypes.c:331
1072msgid "number of characters" 1049msgid "number of characters"
1073msgstr "" 1050msgstr "numărul de caractere"
1074 1051
1075#: src/main/extractor_metatypes.c:332 src/main/extractor_metatypes.c:333 1052#: src/main/extractor_metatypes.c:332 src/main/extractor_metatypes.c:333
1076msgid "page orientation" 1053msgid "page orientation"
1077msgstr "orientare paginã" 1054msgstr "orientarea paginii"
1078 1055
1079#: src/main/extractor_metatypes.c:334 src/main/extractor_metatypes.c:335 1056#: src/main/extractor_metatypes.c:334 src/main/extractor_metatypes.c:335
1080msgid "paper size" 1057msgid "paper size"
1081msgstr "dimensiune pagina" 1058msgstr "dimensiunea hârtiei"
1082 1059
1083#: src/main/extractor_metatypes.c:336 1060#: src/main/extractor_metatypes.c:336
1084msgid "template" 1061msgid "template"
1085msgstr "" 1062msgstr "șablon"
1086 1063
1087#: src/main/extractor_metatypes.c:337 1064#: src/main/extractor_metatypes.c:337
1088msgid "template the document uses or is based on" 1065msgid "template the document uses or is based on"
1089msgstr "" 1066msgstr "șablonul pe care documentul îl folosește sau pe care se bazează"
1090 1067
1091#: src/main/extractor_metatypes.c:339 src/main/extractor_metatypes.c:340 1068#: src/main/extractor_metatypes.c:339 src/main/extractor_metatypes.c:340
1092msgid "company" 1069msgid "company"
1093msgstr "" 1070msgstr "compania"
1094 1071
1095#: src/main/extractor_metatypes.c:341 src/main/extractor_metatypes.c:342 1072#: src/main/extractor_metatypes.c:341 src/main/extractor_metatypes.c:342
1096#, fuzzy
1097msgid "manager" 1073msgid "manager"
1098msgstr "împachetator" 1074msgstr "administrator"
1099 1075
1100#: src/main/extractor_metatypes.c:343 src/main/extractor_metatypes.c:344 1076#: src/main/extractor_metatypes.c:343 src/main/extractor_metatypes.c:344
1101#, fuzzy
1102msgid "revision number" 1077msgid "revision number"
1103msgstr "afiºeazã numãrul versiunii" 1078msgstr "numărul reviziei"
1104 1079
1105#: src/main/extractor_metatypes.c:345 1080#: src/main/extractor_metatypes.c:345
1106#, fuzzy
1107msgid "duration" 1081msgid "duration"
1108msgstr "relaþie" 1082msgstr "durata"
1109 1083
1110#: src/main/extractor_metatypes.c:346 1084#: src/main/extractor_metatypes.c:346
1111msgid "play time for the medium" 1085msgid "play time for the medium"
1112msgstr "" 1086msgstr "timpul de redare pentru mediu"
1113 1087
1114#: src/main/extractor_metatypes.c:347 1088#: src/main/extractor_metatypes.c:347
1115msgid "album" 1089msgid "album"
@@ -1117,7 +1091,7 @@ msgstr "album"
1117 1091
1118#: src/main/extractor_metatypes.c:348 1092#: src/main/extractor_metatypes.c:348
1119msgid "name of the album" 1093msgid "name of the album"
1120msgstr "" 1094msgstr "numele albumului"
1121 1095
1122#: src/main/extractor_metatypes.c:350 1096#: src/main/extractor_metatypes.c:350
1123msgid "artist" 1097msgid "artist"
@@ -1125,7 +1099,7 @@ msgstr "artist"
1125 1099
1126#: src/main/extractor_metatypes.c:351 1100#: src/main/extractor_metatypes.c:351
1127msgid "name of the artist or band" 1101msgid "name of the artist or band"
1128msgstr "" 1102msgstr "numele artistului sau al trupei"
1129 1103
1130#: src/main/extractor_metatypes.c:352 src/main/extractor_metatypes.c:353 1104#: src/main/extractor_metatypes.c:352 src/main/extractor_metatypes.c:353
1131msgid "genre" 1105msgid "genre"
@@ -1133,30 +1107,31 @@ msgstr "gen"
1133 1107
1134#: src/main/extractor_metatypes.c:354 1108#: src/main/extractor_metatypes.c:354
1135msgid "track number" 1109msgid "track number"
1136msgstr "" 1110msgstr "numărul piesei"
1137 1111
1138#: src/main/extractor_metatypes.c:355 1112#: src/main/extractor_metatypes.c:355
1139msgid "original number of the track on the distribution medium" 1113msgid "original number of the track on the distribution medium"
1140msgstr "" 1114msgstr "numărul original al piesei pe mediul de distribuție"
1141 1115
1142#: src/main/extractor_metatypes.c:356 1116#: src/main/extractor_metatypes.c:356
1143#, fuzzy
1144msgid "disk number" 1117msgid "disk number"
1145msgstr "Numãr de fiºier incorect" 1118msgstr "numărul discului"
1146 1119
1147#: src/main/extractor_metatypes.c:358 1120#: src/main/extractor_metatypes.c:358
1148msgid "number of the disk in a multi-disk (or volume) distribution" 1121msgid "number of the disk in a multi-disk (or volume) distribution"
1149msgstr "" 1122msgstr "numărul discului într-o distribuție cu mai multe discuri (sau volumul)"
1150 1123
1151#: src/main/extractor_metatypes.c:359 1124#: src/main/extractor_metatypes.c:359
1152msgid "performer" 1125msgid "performer"
1153msgstr "" 1126msgstr "interpret"
1154 1127
1155#: src/main/extractor_metatypes.c:361 1128#: src/main/extractor_metatypes.c:361
1156msgid "" 1129msgid ""
1157"The artist(s) who performed the work (conductor, orchestra, soloists, actor, " 1130"The artist(s) who performed the work (conductor, orchestra, soloists, actor, "
1158"etc.)" 1131"etc.)"
1159msgstr "" 1132msgstr ""
1133"Artistul sau artiștii care au interpretat lucrarea (dirijor, orchestră, "
1134"soliști, actor etc.)"
1160 1135
1161#: src/main/extractor_metatypes.c:363 1136#: src/main/extractor_metatypes.c:363
1162msgid "contact" 1137msgid "contact"
@@ -1164,84 +1139,79 @@ msgstr "contact"
1164 1139
1165#: src/main/extractor_metatypes.c:364 1140#: src/main/extractor_metatypes.c:364
1166msgid "Contact information for the creator or distributor" 1141msgid "Contact information for the creator or distributor"
1167msgstr "" 1142msgstr "Informațiile de contact pentru creator sau distribuitor"
1168 1143
1169#: src/main/extractor_metatypes.c:365 1144#: src/main/extractor_metatypes.c:365
1170#, fuzzy
1171msgid "song version" 1145msgid "song version"
1172msgstr "versiune" 1146msgstr "varianta melodiei"
1173 1147
1174#: src/main/extractor_metatypes.c:366 1148#: src/main/extractor_metatypes.c:366
1175msgid "name of the version of the song (i.e. remix information)" 1149msgid "name of the version of the song (i.e. remix information)"
1176msgstr "" 1150msgstr "numele variantei melodiei (de exemplu, informații despre remix)"
1177 1151
1178#: src/main/extractor_metatypes.c:367 1152#: src/main/extractor_metatypes.c:367
1179#, fuzzy
1180msgid "picture" 1153msgid "picture"
1181msgstr "aperturã" 1154msgstr "imagine"
1182 1155
1183#: src/main/extractor_metatypes.c:368 1156#: src/main/extractor_metatypes.c:368
1184msgid "associated misc. picture" 1157msgid "associated misc. picture"
1185msgstr "" 1158msgstr "diverse imagini asociate"
1186 1159
1187#: src/main/extractor_metatypes.c:369 1160#: src/main/extractor_metatypes.c:369
1188msgid "cover picture" 1161msgid "cover picture"
1189msgstr "" 1162msgstr "imagine de copertă"
1190 1163
1191#: src/main/extractor_metatypes.c:370 1164#: src/main/extractor_metatypes.c:370
1192msgid "picture of the cover of the distribution medium" 1165msgid "picture of the cover of the distribution medium"
1193msgstr "" 1166msgstr "imaaginea coperții suportului de distribuție"
1194 1167
1195#: src/main/extractor_metatypes.c:371 1168#: src/main/extractor_metatypes.c:371
1196#, fuzzy
1197msgid "contributor picture" 1169msgid "contributor picture"
1198msgstr "contribuitor" 1170msgstr "imaginea colaboratorului"
1199 1171
1200#: src/main/extractor_metatypes.c:372 1172#: src/main/extractor_metatypes.c:372
1201msgid "picture of one of the contributors" 1173msgid "picture of one of the contributors"
1202msgstr "" 1174msgstr "imaginea unuia dintre colaboratori"
1203 1175
1204#: src/main/extractor_metatypes.c:374 1176#: src/main/extractor_metatypes.c:374
1205msgid "event picture" 1177msgid "event picture"
1206msgstr "" 1178msgstr "imaginea evenimentului"
1207 1179
1208#: src/main/extractor_metatypes.c:375 1180#: src/main/extractor_metatypes.c:375
1209msgid "picture of an associated event" 1181msgid "picture of an associated event"
1210msgstr "" 1182msgstr "imaginea unui eveniment asociat"
1211 1183
1212#: src/main/extractor_metatypes.c:376 1184#: src/main/extractor_metatypes.c:376
1213msgid "logo" 1185msgid "logo"
1214msgstr "" 1186msgstr "logo"
1215 1187
1216#: src/main/extractor_metatypes.c:377 1188#: src/main/extractor_metatypes.c:377
1217msgid "logo of an associated organization" 1189msgid "logo of an associated organization"
1218msgstr "" 1190msgstr "logo-ul unei organizații asociate"
1219 1191
1220#: src/main/extractor_metatypes.c:378 1192#: src/main/extractor_metatypes.c:378
1221msgid "broadcast television system" 1193msgid "broadcast television system"
1222msgstr "" 1194msgstr "sistem de difuzare a televiziunii"
1223 1195
1224#: src/main/extractor_metatypes.c:380 1196#: src/main/extractor_metatypes.c:380
1225msgid "name of the television system for which the data is coded" 1197msgid "name of the television system for which the data is coded"
1226msgstr "" 1198msgstr "numele sistemului de televiziune pentru care sunt codificate datele"
1227 1199
1228#: src/main/extractor_metatypes.c:381 1200#: src/main/extractor_metatypes.c:381
1229#, fuzzy
1230msgid "source device" 1201msgid "source device"
1231msgstr "Nici un asemenea dispozitiv" 1202msgstr "dispozitivul sursă"
1232 1203
1233#: src/main/extractor_metatypes.c:382 1204#: src/main/extractor_metatypes.c:382
1234msgid "device used to create the object" 1205msgid "device used to create the object"
1235msgstr "" 1206msgstr "dispozitivul utilizat pentru a crea obiectul"
1236 1207
1237#: src/main/extractor_metatypes.c:383 1208#: src/main/extractor_metatypes.c:383
1238msgid "disclaimer" 1209msgid "disclaimer"
1239msgstr "repudiere" 1210msgstr "declinare a răspunderii"
1240 1211
1241#: src/main/extractor_metatypes.c:384 1212#: src/main/extractor_metatypes.c:384
1242#, fuzzy
1243msgid "legal disclaimer" 1213msgid "legal disclaimer"
1244msgstr "repudiere" 1214msgstr "declinare a răspunderii juridice"
1245 1215
1246#: src/main/extractor_metatypes.c:386 1216#: src/main/extractor_metatypes.c:386
1247msgid "warning" 1217msgid "warning"
@@ -1249,178 +1219,169 @@ msgstr "avertisment"
1249 1219
1250#: src/main/extractor_metatypes.c:387 1220#: src/main/extractor_metatypes.c:387
1251msgid "warning about the nature of the content" 1221msgid "warning about the nature of the content"
1252msgstr "" 1222msgstr "avertisment cu privire la natura conținutului"
1253 1223
1254#: src/main/extractor_metatypes.c:388 1224#: src/main/extractor_metatypes.c:388
1255msgid "page order" 1225msgid "page order"
1256msgstr "ordine pagini" 1226msgstr "ordinea paginilor"
1257 1227
1258#: src/main/extractor_metatypes.c:389 1228#: src/main/extractor_metatypes.c:389
1259msgid "order of the pages" 1229msgid "order of the pages"
1260msgstr "" 1230msgstr "ordinea paginilor"
1261 1231
1262#: src/main/extractor_metatypes.c:390 1232#: src/main/extractor_metatypes.c:390
1263msgid "writer" 1233msgid "writer"
1264msgstr "" 1234msgstr "scriitor"
1265 1235
1266#: src/main/extractor_metatypes.c:391 1236#: src/main/extractor_metatypes.c:391
1267#, fuzzy
1268msgid "contributing writer" 1237msgid "contributing writer"
1269msgstr "contribuitor" 1238msgstr "scriitor colaborator"
1270 1239
1271#: src/main/extractor_metatypes.c:392 src/main/extractor_metatypes.c:393 1240#: src/main/extractor_metatypes.c:392 src/main/extractor_metatypes.c:393
1272#, fuzzy
1273msgid "product version" 1241msgid "product version"
1274msgstr "producãtor" 1242msgstr "versiunea produsului"
1275 1243
1276#: src/main/extractor_metatypes.c:394 1244#: src/main/extractor_metatypes.c:394
1277msgid "contributor" 1245msgid "contributor"
1278msgstr "contribuitor" 1246msgstr "colaborator"
1279 1247
1280#: src/main/extractor_metatypes.c:395 1248#: src/main/extractor_metatypes.c:395
1281#, fuzzy
1282msgid "name of a contributor" 1249msgid "name of a contributor"
1283msgstr "contribuitor" 1250msgstr "numele unui colaborator"
1284 1251
1285#: src/main/extractor_metatypes.c:397 1252#: src/main/extractor_metatypes.c:397
1286#, fuzzy
1287msgid "movie director" 1253msgid "movie director"
1288msgstr "Nu este un director" 1254msgstr "regizor de film"
1289 1255
1290#: src/main/extractor_metatypes.c:398 1256#: src/main/extractor_metatypes.c:398
1291#, fuzzy
1292msgid "name of the director" 1257msgid "name of the director"
1293msgstr "Nu este un director" 1258msgstr "numele regizorului"
1294 1259
1295#: src/main/extractor_metatypes.c:399 1260#: src/main/extractor_metatypes.c:399
1296msgid "network" 1261msgid "network"
1297msgstr "" 1262msgstr "rețeaua"
1298 1263
1299#: src/main/extractor_metatypes.c:400 1264#: src/main/extractor_metatypes.c:400
1300msgid "name of the broadcasting network or station" 1265msgid "name of the broadcasting network or station"
1301msgstr "" 1266msgstr "numele rețelei sau postului de emisie"
1302 1267
1303#: src/main/extractor_metatypes.c:401 1268#: src/main/extractor_metatypes.c:401
1304msgid "show" 1269msgid "show"
1305msgstr "" 1270msgstr "emisiunea"
1306 1271
1307#: src/main/extractor_metatypes.c:402 1272#: src/main/extractor_metatypes.c:402
1308msgid "name of the show" 1273msgid "name of the show"
1309msgstr "" 1274msgstr "numele emisiunii"
1310 1275
1311#: src/main/extractor_metatypes.c:403 1276#: src/main/extractor_metatypes.c:403
1312msgid "chapter name" 1277msgid "chapter name"
1313msgstr "" 1278msgstr "nume piesă"
1314 1279
1315#: src/main/extractor_metatypes.c:404 1280#: src/main/extractor_metatypes.c:404
1316msgid "name of the chapter" 1281msgid "name of the chapter"
1317msgstr "" 1282msgstr "numele piesei"
1318 1283
1319#: src/main/extractor_metatypes.c:405 1284#: src/main/extractor_metatypes.c:405
1320#, fuzzy
1321msgid "song count" 1285msgid "song count"
1322msgstr "numãr de pagini" 1286msgstr "număr melodie"
1323 1287
1324#: src/main/extractor_metatypes.c:406 1288#: src/main/extractor_metatypes.c:406
1325#, fuzzy
1326msgid "number of songs" 1289msgid "number of songs"
1327msgstr "Numãr legãturi în afara domeniului" 1290msgstr "numărul de melodii"
1328 1291
1329#: src/main/extractor_metatypes.c:408 1292#: src/main/extractor_metatypes.c:408
1330msgid "starting song" 1293msgid "starting song"
1331msgstr "" 1294msgstr "melodia de deschidere"
1332 1295
1333#: src/main/extractor_metatypes.c:409 1296#: src/main/extractor_metatypes.c:409
1334msgid "number of the first song to play" 1297msgid "number of the first song to play"
1335msgstr "" 1298msgstr "numărul primei melodii redate"
1336 1299
1337#: src/main/extractor_metatypes.c:410 1300#: src/main/extractor_metatypes.c:410
1338#, fuzzy
1339msgid "play counter" 1301msgid "play counter"
1340msgstr "numãr de pagini" 1302msgstr "contor redare"
1341 1303
1342#: src/main/extractor_metatypes.c:411 1304#: src/main/extractor_metatypes.c:411
1343msgid "number of times the media has been played" 1305msgid "number of times the media has been played"
1344msgstr "" 1306msgstr "de câte ori a fost redat conținutul media"
1345 1307
1346#: src/main/extractor_metatypes.c:412 1308#: src/main/extractor_metatypes.c:412
1347msgid "conductor" 1309msgid "conductor"
1348msgstr "conducãtor" 1310msgstr "dirijor"
1349 1311
1350#: src/main/extractor_metatypes.c:413 1312#: src/main/extractor_metatypes.c:413
1351#, fuzzy
1352msgid "name of the conductor" 1313msgid "name of the conductor"
1353msgstr "conducãtor" 1314msgstr "numele dirijorului"
1354 1315
1355#: src/main/extractor_metatypes.c:414 1316#: src/main/extractor_metatypes.c:414
1356#, fuzzy
1357msgid "interpretation" 1317msgid "interpretation"
1358msgstr "interpret(ã)" 1318msgstr "interpretarea"
1359 1319
1360#: src/main/extractor_metatypes.c:416 1320#: src/main/extractor_metatypes.c:416
1361msgid "" 1321msgid ""
1362"information about the people behind interpretations of an existing piece" 1322"information about the people behind interpretations of an existing piece"
1363msgstr "" 1323msgstr ""
1324"informații despre persoanele din spatele interpretării unei piese existente"
1364 1325
1365#: src/main/extractor_metatypes.c:417 1326#: src/main/extractor_metatypes.c:417
1366msgid "composer" 1327msgid "composer"
1367msgstr "" 1328msgstr "compozitor"
1368 1329
1369#: src/main/extractor_metatypes.c:418 1330#: src/main/extractor_metatypes.c:418
1370msgid "name of the composer" 1331msgid "name of the composer"
1371msgstr "" 1332msgstr "numele compozitorului"
1372 1333
1373#: src/main/extractor_metatypes.c:420 src/main/extractor_metatypes.c:421 1334#: src/main/extractor_metatypes.c:420 src/main/extractor_metatypes.c:421
1374msgid "beats per minute" 1335msgid "beats per minute"
1375msgstr "" 1336msgstr "bătăi pe minut"
1376 1337
1377#: src/main/extractor_metatypes.c:422 1338#: src/main/extractor_metatypes.c:422
1378msgid "encoded by" 1339msgid "encoded by"
1379msgstr "" 1340msgstr "codificat de"
1380 1341
1381#: src/main/extractor_metatypes.c:423 1342#: src/main/extractor_metatypes.c:423
1382msgid "name of person or organization that encoded the file" 1343msgid "name of person or organization that encoded the file"
1383msgstr "" 1344msgstr "numele persoanei sau organizației care a codificat fișierul"
1384 1345
1385#: src/main/extractor_metatypes.c:424 1346#: src/main/extractor_metatypes.c:424
1386msgid "original title" 1347msgid "original title"
1387msgstr "" 1348msgstr "titlul original"
1388 1349
1389#: src/main/extractor_metatypes.c:425 1350#: src/main/extractor_metatypes.c:425
1390msgid "title of the original work" 1351msgid "title of the original work"
1391msgstr "" 1352msgstr "titlul lucrării originale"
1392 1353
1393#: src/main/extractor_metatypes.c:426 1354#: src/main/extractor_metatypes.c:426
1394msgid "original artist" 1355msgid "original artist"
1395msgstr "" 1356msgstr "artistul original"
1396 1357
1397#: src/main/extractor_metatypes.c:427 1358#: src/main/extractor_metatypes.c:427
1398msgid "name of the original artist" 1359msgid "name of the original artist"
1399msgstr "" 1360msgstr "numele artistului original"
1400 1361
1401#: src/main/extractor_metatypes.c:428 1362#: src/main/extractor_metatypes.c:428
1402msgid "original writer" 1363msgid "original writer"
1403msgstr "" 1364msgstr "autorul original al textului"
1404 1365
1405#: src/main/extractor_metatypes.c:429 1366#: src/main/extractor_metatypes.c:429
1406msgid "name of the original lyricist or writer" 1367msgid "name of the original lyricist or writer"
1407msgstr "" 1368msgstr "numele autorului versurilor sau textului original"
1408 1369
1409#: src/main/extractor_metatypes.c:431 1370#: src/main/extractor_metatypes.c:431
1410msgid "original release year" 1371msgid "original release year"
1411msgstr "" 1372msgstr "anul de lansare original"
1412 1373
1413#: src/main/extractor_metatypes.c:432 1374#: src/main/extractor_metatypes.c:432
1414msgid "year of the original release" 1375msgid "year of the original release"
1415msgstr "" 1376msgstr "anul lansării originale"
1416 1377
1417#: src/main/extractor_metatypes.c:433 1378#: src/main/extractor_metatypes.c:433
1418msgid "original performer" 1379msgid "original performer"
1419msgstr "" 1380msgstr "interpret original"
1420 1381
1421#: src/main/extractor_metatypes.c:434 1382#: src/main/extractor_metatypes.c:434
1422msgid "name of the original performer" 1383msgid "name of the original performer"
1423msgstr "" 1384msgstr "numele interpretului original"
1424 1385
1425#: src/main/extractor_metatypes.c:435 1386#: src/main/extractor_metatypes.c:435
1426msgid "lyrics" 1387msgid "lyrics"
@@ -1428,89 +1389,94 @@ msgstr "versuri"
1428 1389
1429#: src/main/extractor_metatypes.c:437 1390#: src/main/extractor_metatypes.c:437
1430msgid "lyrics of the song or text description of vocal activities" 1391msgid "lyrics of the song or text description of vocal activities"
1431msgstr "" 1392msgstr "versurile cântecului sau textul descrierii activităților vocale"
1432 1393
1433#: src/main/extractor_metatypes.c:438 1394#: src/main/extractor_metatypes.c:438
1434#, fuzzy
1435msgid "popularity" 1395msgid "popularity"
1436msgstr "prioritate" 1396msgstr "popularitate"
1437 1397
1438#: src/main/extractor_metatypes.c:439 1398#: src/main/extractor_metatypes.c:439
1439msgid "information about the file's popularity" 1399msgid "information about the file's popularity"
1440msgstr "" 1400msgstr "informații despre popularitatea fișierului"
1441 1401
1442#: src/main/extractor_metatypes.c:440 1402#: src/main/extractor_metatypes.c:440
1443#, fuzzy
1444msgid "licensee" 1403msgid "licensee"
1445msgstr "licenþã" 1404msgstr "titular licență"
1446 1405
1447#: src/main/extractor_metatypes.c:441 1406#: src/main/extractor_metatypes.c:441
1448msgid "name of the owner or licensee of the file" 1407msgid "name of the owner or licensee of the file"
1449msgstr "" 1408msgstr "numele proprietarului sau titularului licenței fișierului"
1450 1409
1451#: src/main/extractor_metatypes.c:443 1410#: src/main/extractor_metatypes.c:443
1452msgid "musician credit list" 1411msgid "musician credit list"
1453msgstr "" 1412msgstr "lista muzicienilor participanți"
1454 1413
1455#: src/main/extractor_metatypes.c:444 1414#: src/main/extractor_metatypes.c:444
1456msgid "names of contributing musicians" 1415msgid "names of contributing musicians"
1457msgstr "" 1416msgstr "numele muzicienilor care au contribuit"
1458 1417
1459#: src/main/extractor_metatypes.c:445 1418#: src/main/extractor_metatypes.c:445
1460msgid "mood" 1419msgid "mood"
1461msgstr "" 1420msgstr "starea de spirit"
1462 1421
1422# R-GC, scrie:
1423# o altă variantă de traducere a acestui mesaj, este:
1424# .
1425# „cuvinte cheie care corespond cu starea de spirit a pieseiâ€, sau:
1426# .
1427# „cuvinte cheie care corespond stării de spirit a pieseiâ€
1428# .
1429# Ce zici DȘ, care ți se pare cea mai potrivită traducere?
1463#: src/main/extractor_metatypes.c:446 1430#: src/main/extractor_metatypes.c:446
1464msgid "keywords reflecting the mood of the piece" 1431msgid "keywords reflecting the mood of the piece"
1465msgstr "" 1432msgstr "cuvinte cheie care reflectă starea de spirit a piesei"
1466 1433
1467#: src/main/extractor_metatypes.c:447 1434#: src/main/extractor_metatypes.c:447
1468#, fuzzy
1469msgid "subtitle" 1435msgid "subtitle"
1470msgstr "titlu" 1436msgstr "subtitlul"
1471 1437
1472#: src/main/extractor_metatypes.c:448 1438#: src/main/extractor_metatypes.c:448
1473msgid "subtitle of this part" 1439msgid "subtitle of this part"
1474msgstr "" 1440msgstr "subtitlul acestei părţi"
1475 1441
1476#: src/main/extractor_metatypes.c:449 1442#: src/main/extractor_metatypes.c:449
1477#, fuzzy
1478msgid "display type" 1443msgid "display type"
1479msgstr "tipul media" 1444msgstr "metoda de afișare"
1480 1445
1481#: src/main/extractor_metatypes.c:451 1446#: src/main/extractor_metatypes.c:451
1482msgid "what rendering method should be used to display this item" 1447msgid "what rendering method should be used to display this item"
1483msgstr "" 1448msgstr "ce metodă de redare ar trebui utilizată pentru a afișa acest element"
1484 1449
1485#: src/main/extractor_metatypes.c:452 1450#: src/main/extractor_metatypes.c:452
1486msgid "full data" 1451msgid "full data"
1487msgstr "" 1452msgstr "date complete"
1488 1453
1489#: src/main/extractor_metatypes.c:454 1454#: src/main/extractor_metatypes.c:454
1490msgid "" 1455msgid ""
1491"entry that contains the full, original binary data (not really meta data)" 1456"entry that contains the full, original binary data (not really meta data)"
1492msgstr "" 1457msgstr ""
1458"intrare care conține datele binare complete, originale (nu metadatele cu "
1459"adevărat)"
1493 1460
1494#: src/main/extractor_metatypes.c:456 1461#: src/main/extractor_metatypes.c:456
1495#, fuzzy
1496msgid "rating" 1462msgid "rating"
1497msgstr "Latin" 1463msgstr "clasificare"
1498 1464
1499#: src/main/extractor_metatypes.c:457 1465#: src/main/extractor_metatypes.c:457
1500msgid "rating of the content" 1466msgid "rating of the content"
1501msgstr "" 1467msgstr "clasificarea conținutului"
1502 1468
1503#: src/main/extractor_metatypes.c:458 src/main/extractor_metatypes.c:459 1469#: src/main/extractor_metatypes.c:458 src/main/extractor_metatypes.c:459
1504msgid "organization" 1470msgid "organization"
1505msgstr "organizaþie" 1471msgstr "organizaÈ›ie"
1506 1472
1507#: src/main/extractor_metatypes.c:460 src/main/extractor_metatypes.c:461 1473#: src/main/extractor_metatypes.c:460 src/main/extractor_metatypes.c:461
1508msgid "ripper" 1474msgid "ripper"
1509msgstr "" 1475msgstr "extractor"
1510 1476
1511#: src/main/extractor_metatypes.c:462 src/main/extractor_metatypes.c:463 1477#: src/main/extractor_metatypes.c:462 src/main/extractor_metatypes.c:463
1512msgid "producer" 1478msgid "producer"
1513msgstr "producãtor" 1479msgstr "producător"
1514 1480
1515#: src/main/extractor_metatypes.c:464 1481#: src/main/extractor_metatypes.c:464
1516msgid "group" 1482msgid "group"
@@ -1518,211 +1484,209 @@ msgstr "grup"
1518 1484
1519#: src/main/extractor_metatypes.c:465 1485#: src/main/extractor_metatypes.c:465
1520msgid "name of the group or band" 1486msgid "name of the group or band"
1521msgstr "" 1487msgstr "numele grupului sau al trupei"
1522 1488
1523#: src/main/extractor_metatypes.c:467 1489#: src/main/extractor_metatypes.c:467
1524#, fuzzy
1525msgid "original filename" 1490msgid "original filename"
1526msgstr "nume_fiºier" 1491msgstr "numele fiÈ™ierului original"
1527 1492
1528#: src/main/extractor_metatypes.c:468 1493#: src/main/extractor_metatypes.c:468
1529msgid "name of the original file (reserved for GNUnet)" 1494msgid "name of the original file (reserved for GNUnet)"
1530msgstr "" 1495msgstr "numele fișierului original (rezervat pentru GNUnet)"
1531 1496
1532#: src/main/extractor_metatypes.c:469 1497#: src/main/extractor_metatypes.c:469
1533#, fuzzy
1534msgid "disc count" 1498msgid "disc count"
1535msgstr "numãr de pagini" 1499msgstr "numărul de discuri"
1536 1500
1537#: src/main/extractor_metatypes.c:470 1501#: src/main/extractor_metatypes.c:470
1538msgid "count of discs inside collection this disc belongs to" 1502msgid "count of discs inside collection this disc belongs to"
1539msgstr "" 1503msgstr "numărul de discuri din colecția căreia îi aparține acest disc"
1540 1504
1541#: src/main/extractor_metatypes.c:471 1505#: src/main/extractor_metatypes.c:471
1542msgid "codec" 1506msgid "codec"
1543msgstr "" 1507msgstr "codec"
1544 1508
1545#: src/main/extractor_metatypes.c:472 1509#: src/main/extractor_metatypes.c:472
1546msgid "codec the data is stored in" 1510msgid "codec the data is stored in"
1547msgstr "" 1511msgstr "codec în care sunt stocate datele"
1548 1512
1549#: src/main/extractor_metatypes.c:473 1513#: src/main/extractor_metatypes.c:473
1550msgid "video codec" 1514msgid "video codec"
1551msgstr "" 1515msgstr "codec video"
1552 1516
1553#: src/main/extractor_metatypes.c:474 1517#: src/main/extractor_metatypes.c:474
1554msgid "codec the video data is stored in" 1518msgid "codec the video data is stored in"
1555msgstr "" 1519msgstr "codec în care sunt stocate datele video"
1556 1520
1557#: src/main/extractor_metatypes.c:475 1521#: src/main/extractor_metatypes.c:475
1558msgid "audio codec" 1522msgid "audio codec"
1559msgstr "" 1523msgstr "codec audio"
1560 1524
1561#: src/main/extractor_metatypes.c:476 1525#: src/main/extractor_metatypes.c:476
1562msgid "codec the audio data is stored in" 1526msgid "codec the audio data is stored in"
1563msgstr "" 1527msgstr "codec în care sunt stocate datele audio"
1564 1528
1565#: src/main/extractor_metatypes.c:478 1529#: src/main/extractor_metatypes.c:478
1566msgid "subtitle codec" 1530msgid "subtitle codec"
1567msgstr "" 1531msgstr "codec pentru subtitrare"
1568 1532
1569#: src/main/extractor_metatypes.c:479 1533#: src/main/extractor_metatypes.c:479
1570msgid "codec/format the subtitle data is stored in" 1534msgid "codec/format the subtitle data is stored in"
1571msgstr "" 1535msgstr "codec/format în care sunt stocate datele de subtitrare"
1572 1536
1573#: src/main/extractor_metatypes.c:480 1537#: src/main/extractor_metatypes.c:480
1574msgid "container format" 1538msgid "container format"
1575msgstr "" 1539msgstr "format container"
1576 1540
1577#: src/main/extractor_metatypes.c:481 1541#: src/main/extractor_metatypes.c:481
1578msgid "container format the data is stored in" 1542msgid "container format the data is stored in"
1579msgstr "" 1543msgstr "formatul containerului în care sunt stocate datele"
1580 1544
1581#: src/main/extractor_metatypes.c:482 1545#: src/main/extractor_metatypes.c:482
1582msgid "bitrate" 1546msgid "bitrate"
1583msgstr "" 1547msgstr "rata de biți"
1584 1548
1585#: src/main/extractor_metatypes.c:483 1549#: src/main/extractor_metatypes.c:483
1586msgid "exact or average bitrate in bits/s" 1550msgid "exact or average bitrate in bits/s"
1587msgstr "" 1551msgstr "rata de biți exactă sau medie în biți/s"
1588 1552
1589#: src/main/extractor_metatypes.c:484 1553#: src/main/extractor_metatypes.c:484
1590msgid "nominal bitrate" 1554msgid "nominal bitrate"
1591msgstr "" 1555msgstr "rata de biți nominală"
1592 1556
1593#: src/main/extractor_metatypes.c:486 1557#: src/main/extractor_metatypes.c:486
1594msgid "" 1558msgid ""
1595"nominal bitrate in bits/s. The actual bitrate might be different from this " 1559"nominal bitrate in bits/s. The actual bitrate might be different from this "
1596"target bitrate." 1560"target bitrate."
1597msgstr "" 1561msgstr ""
1562"rata de biți nominală în biți/s. Rata de biți reală ar putea fi diferită de "
1563"această rată de biți preconizată."
1598 1564
1599#: src/main/extractor_metatypes.c:487 1565#: src/main/extractor_metatypes.c:487
1600msgid "minimum bitrate" 1566msgid "minimum bitrate"
1601msgstr "" 1567msgstr "rata de biți minimă"
1602 1568
1603#: src/main/extractor_metatypes.c:488 1569#: src/main/extractor_metatypes.c:488
1604msgid "minimum bitrate in bits/s" 1570msgid "minimum bitrate in bits/s"
1605msgstr "" 1571msgstr "rata de biți minimă în biți/s"
1606 1572
1607#: src/main/extractor_metatypes.c:490 1573#: src/main/extractor_metatypes.c:490
1608msgid "maximum bitrate" 1574msgid "maximum bitrate"
1609msgstr "" 1575msgstr "rata de biți maximă"
1610 1576
1611#: src/main/extractor_metatypes.c:491 1577#: src/main/extractor_metatypes.c:491
1612msgid "maximum bitrate in bits/s" 1578msgid "maximum bitrate in bits/s"
1613msgstr "" 1579msgstr "rata maximă de biți în biți/s"
1614 1580
1615#: src/main/extractor_metatypes.c:492 1581#: src/main/extractor_metatypes.c:492
1616#, fuzzy
1617msgid "serial" 1582msgid "serial"
1618msgstr "Industrial" 1583msgstr "numărul de serie"
1619 1584
1620#: src/main/extractor_metatypes.c:493 1585#: src/main/extractor_metatypes.c:493
1621#, fuzzy
1622msgid "serial number of track" 1586msgid "serial number of track"
1623msgstr "Numãr canal în afara domeniului" 1587msgstr "numărul de serie al pistei"
1624 1588
1625#: src/main/extractor_metatypes.c:494 1589#: src/main/extractor_metatypes.c:494
1626msgid "encoder" 1590msgid "encoder"
1627msgstr "" 1591msgstr "codificator"
1628 1592
1629#: src/main/extractor_metatypes.c:495 1593#: src/main/extractor_metatypes.c:495
1630msgid "encoder used to encode this stream" 1594msgid "encoder used to encode this stream"
1631msgstr "" 1595msgstr "codificatorul utilizat pentru a codifica acest flux"
1632 1596
1633#: src/main/extractor_metatypes.c:496 1597#: src/main/extractor_metatypes.c:496
1634#, fuzzy
1635msgid "encoder version" 1598msgid "encoder version"
1636msgstr "versiune" 1599msgstr "versiunea codificatorului"
1637 1600
1638#: src/main/extractor_metatypes.c:497 1601#: src/main/extractor_metatypes.c:497
1639msgid "version of the encoder used to encode this stream" 1602msgid "version of the encoder used to encode this stream"
1640msgstr "" 1603msgstr "versiunea codificatorului utilizată pentru a codifica acest flux"
1641 1604
1642#: src/main/extractor_metatypes.c:498 1605#: src/main/extractor_metatypes.c:498
1643msgid "track gain" 1606msgid "track gain"
1644msgstr "" 1607msgstr "câștig pistă"
1645 1608
1646#: src/main/extractor_metatypes.c:499 1609#: src/main/extractor_metatypes.c:499
1647msgid "track gain in db" 1610msgid "track gain in db"
1648msgstr "" 1611msgstr "câștigul în db al pistei"
1649 1612
1650#: src/main/extractor_metatypes.c:501 1613#: src/main/extractor_metatypes.c:501
1651msgid "track peak" 1614msgid "track peak"
1652msgstr "" 1615msgstr "vârful pistei"
1653 1616
1654#: src/main/extractor_metatypes.c:502 1617#: src/main/extractor_metatypes.c:502
1655msgid "peak of the track" 1618msgid "peak of the track"
1656msgstr "" 1619msgstr "vârful pistei"
1657 1620
1658#: src/main/extractor_metatypes.c:503 1621#: src/main/extractor_metatypes.c:503
1659#, fuzzy
1660msgid "album gain" 1622msgid "album gain"
1661msgstr "album" 1623msgstr "câștig album"
1662 1624
1663#: src/main/extractor_metatypes.c:504 1625#: src/main/extractor_metatypes.c:504
1664msgid "album gain in db" 1626msgid "album gain in db"
1665msgstr "" 1627msgstr "câștigul în db al albumului"
1666 1628
1667#: src/main/extractor_metatypes.c:505 1629#: src/main/extractor_metatypes.c:505
1668#, fuzzy
1669msgid "album peak" 1630msgid "album peak"
1670msgstr "album" 1631msgstr "vârful albumului"
1671 1632
1672#: src/main/extractor_metatypes.c:506 1633#: src/main/extractor_metatypes.c:506
1673msgid "peak of the album" 1634msgid "peak of the album"
1674msgstr "" 1635msgstr "vârful albumului"
1675 1636
1676#: src/main/extractor_metatypes.c:507 1637#: src/main/extractor_metatypes.c:507
1677msgid "reference level" 1638msgid "reference level"
1678msgstr "" 1639msgstr "nivel de referință"
1679 1640
1680#: src/main/extractor_metatypes.c:508 1641#: src/main/extractor_metatypes.c:508
1681msgid "reference level of track and album gain values" 1642msgid "reference level of track and album gain values"
1682msgstr "" 1643msgstr "nivelul de referință al valorilor câștigului pistei și albumului"
1683 1644
1684#: src/main/extractor_metatypes.c:509 1645#: src/main/extractor_metatypes.c:509
1685#, fuzzy
1686msgid "location name" 1646msgid "location name"
1687msgstr "locaþie" 1647msgstr "numele locaÈ›iei"
1688 1648
1689#: src/main/extractor_metatypes.c:511 1649#: src/main/extractor_metatypes.c:511
1690msgid "" 1650msgid ""
1691"human readable descriptive location of where the media has been recorded or " 1651"human readable descriptive location of where the media has been recorded or "
1692"produced" 1652"produced"
1693msgstr "" 1653msgstr ""
1654"locație descriptivă, care poate fi citită de om, a locului în care a fost "
1655"înregistrat sau produs conținutul media"
1694 1656
1695#: src/main/extractor_metatypes.c:513 1657#: src/main/extractor_metatypes.c:513
1696#, fuzzy
1697msgid "location elevation" 1658msgid "location elevation"
1698msgstr "locaþie" 1659msgstr "cota locaÈ›iei"
1699 1660
1700#: src/main/extractor_metatypes.c:515 1661#: src/main/extractor_metatypes.c:515
1701msgid "" 1662msgid ""
1702"geo elevation of where the media has been recorded or produced in meters " 1663"geo elevation of where the media has been recorded or produced in meters "
1703"according to WGS84 (zero is average sea level)" 1664"according to WGS84 (zero is average sea level)"
1704msgstr "" 1665msgstr ""
1666"altitudinea geografică a locului în care media a fost înregistrată sau "
1667"produsă în metri conform WGS84 (zero este nivelul mediu al mării)"
1705 1668
1706#: src/main/extractor_metatypes.c:516 1669#: src/main/extractor_metatypes.c:516
1707msgid "location horizontal error" 1670msgid "location horizontal error"
1708msgstr "" 1671msgstr "eroare orizontală de locație"
1709 1672
1710#: src/main/extractor_metatypes.c:518 1673#: src/main/extractor_metatypes.c:518
1711msgid "represents the expected error on the horizontal positioning in meters" 1674msgid "represents the expected error on the horizontal positioning in meters"
1712msgstr "" 1675msgstr "reprezintă eroarea așteptată asupra poziționării orizontale în metri"
1713 1676
1714#: src/main/extractor_metatypes.c:519 1677#: src/main/extractor_metatypes.c:519
1715msgid "location movement speed" 1678msgid "location movement speed"
1716msgstr "" 1679msgstr "viteza de deplasare a locației"
1717 1680
1718#: src/main/extractor_metatypes.c:521 1681#: src/main/extractor_metatypes.c:521
1719msgid "" 1682msgid ""
1720"speed of the capturing device when performing the capture. Represented in m/s" 1683"speed of the capturing device when performing the capture. Represented in m/s"
1721msgstr "" 1684msgstr ""
1685"viteza dispozitivului de captare la efectuarea capturii. Reprezentată în m/s"
1722 1686
1723#: src/main/extractor_metatypes.c:522 1687#: src/main/extractor_metatypes.c:522
1724msgid "location movement direction" 1688msgid "location movement direction"
1725msgstr "" 1689msgstr "direcția de deplasare a locației"
1726 1690
1727#: src/main/extractor_metatypes.c:524 1691#: src/main/extractor_metatypes.c:524
1728msgid "" 1692msgid ""
@@ -1730,10 +1694,13 @@ msgid ""
1730"media. It is represented as degrees in floating point representation, 0 " 1694"media. It is represented as degrees in floating point representation, 0 "
1731"means the geographic north, and increases clockwise" 1695"means the geographic north, and increases clockwise"
1732msgstr "" 1696msgstr ""
1697"indică direcția de deplasare a dispozitivului care efectuează capturarea "
1698"unui suport media. Este reprezentată ca grade în reprezentarea în virgulă "
1699"mobilă, 0 înseamnă nordul geografic și crește în sensul acelor de ceasornic"
1733 1700
1734#: src/main/extractor_metatypes.c:525 1701#: src/main/extractor_metatypes.c:525
1735msgid "location capture direction" 1702msgid "location capture direction"
1736msgstr "" 1703msgstr "direcția de captare a locației"
1737 1704
1738#: src/main/extractor_metatypes.c:527 1705#: src/main/extractor_metatypes.c:527
1739msgid "" 1706msgid ""
@@ -1741,277 +1708,283 @@ msgid ""
1741"is represented as degrees in floating point representation, 0 means the " 1708"is represented as degrees in floating point representation, 0 means the "
1742"geographic north, and increases clockwise" 1709"geographic north, and increases clockwise"
1743msgstr "" 1710msgstr ""
1711"indică direcția către care îndreaptă dispozitivul atunci când captează un "
1712"conținut media. Este reprezentat ca grade în reprezentarea în virgulă "
1713"mobilă, 0 înseamnă nordul geografic și crește în sensul acelor de ceasornic"
1744 1714
1745#: src/main/extractor_metatypes.c:529 1715#: src/main/extractor_metatypes.c:529
1746msgid "show episode number" 1716msgid "show episode number"
1747msgstr "" 1717msgstr "afișează numărul episodului"
1748 1718
1749#: src/main/extractor_metatypes.c:530 1719#: src/main/extractor_metatypes.c:530
1750msgid "number of the episode within a season/show" 1720msgid "number of the episode within a season/show"
1751msgstr "" 1721msgstr "numărul episodului dintr-un sezon/emisiune"
1752 1722
1753#: src/main/extractor_metatypes.c:531 1723#: src/main/extractor_metatypes.c:531
1754#, fuzzy
1755msgid "show season number" 1724msgid "show season number"
1756msgstr "afiºeazã numãrul versiunii" 1725msgstr "numărul sezonului emisiunii"
1757 1726
1758#: src/main/extractor_metatypes.c:532 1727#: src/main/extractor_metatypes.c:532
1759msgid "number of the season of a show/series" 1728msgid "number of the season of a show/series"
1760msgstr "" 1729msgstr "numărul sezonului unei emisiuni/serii"
1761 1730
1762#: src/main/extractor_metatypes.c:533 1731#: src/main/extractor_metatypes.c:533
1763#, fuzzy
1764msgid "grouping" 1732msgid "grouping"
1765msgstr "grup" 1733msgstr "grupare"
1766 1734
1767#: src/main/extractor_metatypes.c:535 1735#: src/main/extractor_metatypes.c:535
1768msgid "" 1736msgid ""
1769"groups together media that are related and spans multiple tracks. An example " 1737"groups together media that are related and spans multiple tracks. An example "
1770"are multiple pieces of a concerto" 1738"are multiple pieces of a concerto"
1771msgstr "" 1739msgstr ""
1740"grupează laolaltă mediile care sunt înrudite și se întinde pe mai multe "
1741"piste. De exemplu, piesele ale unui concert"
1772 1742
1773#: src/main/extractor_metatypes.c:536 1743#: src/main/extractor_metatypes.c:536
1774msgid "device manufacturer" 1744msgid "device manufacturer"
1775msgstr "" 1745msgstr "producătorul dispozitivului"
1776 1746
1777#: src/main/extractor_metatypes.c:537 1747#: src/main/extractor_metatypes.c:537
1778msgid "manufacturer of the device used to create the media" 1748msgid "manufacturer of the device used to create the media"
1779msgstr "" 1749msgstr "producătorul dispozitivului utilizat pentru a crea suportul media"
1780 1750
1781#: src/main/extractor_metatypes.c:538 1751#: src/main/extractor_metatypes.c:538
1782#, fuzzy
1783msgid "device model" 1752msgid "device model"
1784msgstr "model de camerã" 1753msgstr "modelul dispozitivului"
1785 1754
1786#: src/main/extractor_metatypes.c:539 1755#: src/main/extractor_metatypes.c:539
1787msgid "model of the device used to create the media" 1756msgid "model of the device used to create the media"
1788msgstr "" 1757msgstr "modelul dispozitivului utilizat pentru a crea suportul media"
1789 1758
1790#: src/main/extractor_metatypes.c:541 1759#: src/main/extractor_metatypes.c:541
1791#, fuzzy
1792msgid "audio language" 1760msgid "audio language"
1793msgstr "limbã" 1761msgstr "limba coloanei sonore"
1794 1762
1795#: src/main/extractor_metatypes.c:542 1763#: src/main/extractor_metatypes.c:542
1796msgid "language of the audio track" 1764msgid "language of the audio track"
1797msgstr "" 1765msgstr "limba pistei audio"
1798 1766
1799#: src/main/extractor_metatypes.c:543 1767#: src/main/extractor_metatypes.c:543
1800msgid "channels" 1768msgid "channels"
1801msgstr "" 1769msgstr "canale"
1802 1770
1803#: src/main/extractor_metatypes.c:544 1771#: src/main/extractor_metatypes.c:544
1804msgid "number of audio channels" 1772msgid "number of audio channels"
1805msgstr "" 1773msgstr "numărul de canale audio"
1806 1774
1807#: src/main/extractor_metatypes.c:545 1775#: src/main/extractor_metatypes.c:545
1808msgid "sample rate" 1776msgid "sample rate"
1809msgstr "" 1777msgstr "frecvența de eșantionare"
1810 1778
1811#: src/main/extractor_metatypes.c:546 1779#: src/main/extractor_metatypes.c:546
1812msgid "sample rate of the audio track" 1780msgid "sample rate of the audio track"
1813msgstr "" 1781msgstr "frecvența de eșantionare a pistei audio"
1814 1782
1815#: src/main/extractor_metatypes.c:547 1783#: src/main/extractor_metatypes.c:547
1816msgid "audio depth" 1784msgid "audio depth"
1817msgstr "" 1785msgstr "adâncimea audio"
1818 1786
1819#: src/main/extractor_metatypes.c:548 1787#: src/main/extractor_metatypes.c:548
1820msgid "number of bits per audio sample" 1788msgid "number of bits per audio sample"
1821msgstr "" 1789msgstr "numărul de biți per eșantion audio"
1822 1790
1823#: src/main/extractor_metatypes.c:549 1791#: src/main/extractor_metatypes.c:549
1824msgid "audio bitrate" 1792msgid "audio bitrate"
1825msgstr "" 1793msgstr "rata de biți audio"
1826 1794
1827#: src/main/extractor_metatypes.c:550 1795#: src/main/extractor_metatypes.c:550
1828msgid "bitrate of the audio track" 1796msgid "bitrate of the audio track"
1829msgstr "" 1797msgstr "rata de biți a pistei audio"
1830 1798
1831#: src/main/extractor_metatypes.c:552 src/main/extractor_metatypes.c:553 1799#: src/main/extractor_metatypes.c:552 src/main/extractor_metatypes.c:553
1832msgid "maximum audio bitrate" 1800msgid "maximum audio bitrate"
1833msgstr "" 1801msgstr "rata de biți audio maximă"
1834 1802
1835#: src/main/extractor_metatypes.c:554 1803#: src/main/extractor_metatypes.c:554
1836msgid "video dimensions" 1804msgid "video dimensions"
1837msgstr "" 1805msgstr "dimensiunile video"
1838 1806
1839#: src/main/extractor_metatypes.c:555 1807#: src/main/extractor_metatypes.c:555
1840msgid "width and height of the video track (WxH)" 1808msgid "width and height of the video track (WxH)"
1841msgstr "" 1809msgstr "lățimea și înălțimea pistei video (Lăț.xÎnălț.)"
1842 1810
1843#: src/main/extractor_metatypes.c:556 1811#: src/main/extractor_metatypes.c:556
1844msgid "video depth" 1812msgid "video depth"
1845msgstr "" 1813msgstr "adâncimea video"
1846 1814
1847#: src/main/extractor_metatypes.c:557 1815#: src/main/extractor_metatypes.c:557
1848msgid "numbers of bits per pixel" 1816msgid "numbers of bits per pixel"
1849msgstr "" 1817msgstr "numărul de biți pe pixel"
1850 1818
1851#: src/main/extractor_metatypes.c:558 1819#: src/main/extractor_metatypes.c:558
1852msgid "frame rate" 1820msgid "frame rate"
1853msgstr "" 1821msgstr "frecvența cadrelor"
1854 1822
1855#: src/main/extractor_metatypes.c:559 1823#: src/main/extractor_metatypes.c:559
1856msgid "number of frames per second (as D/N or floating point)" 1824msgid "number of frames per second (as D/N or floating point)"
1857msgstr "" 1825msgstr ""
1826"numărul de cadre pe secundă (ca D/N «adâncimea video / nr. de secunde» sau "
1827"virgulă mobilă)"
1858 1828
1859#: src/main/extractor_metatypes.c:560 1829#: src/main/extractor_metatypes.c:560
1860msgid "pixel aspect ratio" 1830msgid "pixel aspect ratio"
1861msgstr "" 1831msgstr "raportul de aspect al pixelilor"
1862 1832
1863#: src/main/extractor_metatypes.c:561 1833#: src/main/extractor_metatypes.c:561
1864msgid "pixel aspect ratio (as D/N)" 1834msgid "pixel aspect ratio (as D/N)"
1865msgstr "" 1835msgstr "raportul de aspect al pixelilor (ca D/N)"
1866 1836
1867#: src/main/extractor_metatypes.c:563 src/main/extractor_metatypes.c:564 1837#: src/main/extractor_metatypes.c:563 src/main/extractor_metatypes.c:564
1868msgid "video bitrate" 1838msgid "video bitrate"
1869msgstr "" 1839msgstr "rata de biți video"
1870 1840
1871#: src/main/extractor_metatypes.c:565 src/main/extractor_metatypes.c:566 1841#: src/main/extractor_metatypes.c:565 src/main/extractor_metatypes.c:566
1872msgid "maximum video bitrate" 1842msgid "maximum video bitrate"
1873msgstr "" 1843msgstr "rata de biți video maximă"
1874 1844
1875#: src/main/extractor_metatypes.c:567 1845#: src/main/extractor_metatypes.c:567
1876#, fuzzy
1877msgid "subtitle language" 1846msgid "subtitle language"
1878msgstr "limbã" 1847msgstr "limba de subtitrare"
1879 1848
1880#: src/main/extractor_metatypes.c:568 1849#: src/main/extractor_metatypes.c:568
1881msgid "language of the subtitle track" 1850msgid "language of the subtitle track"
1882msgstr "" 1851msgstr "limba pistei de subtitrare"
1883 1852
1884#: src/main/extractor_metatypes.c:569 1853#: src/main/extractor_metatypes.c:569
1885#, fuzzy
1886msgid "video language" 1854msgid "video language"
1887msgstr "limbã" 1855msgstr "limba folosită în video"
1888 1856
1889#: src/main/extractor_metatypes.c:570 1857#: src/main/extractor_metatypes.c:570
1890msgid "language of the video track" 1858msgid "language of the video track"
1891msgstr "" 1859msgstr "limba pistei video"
1892 1860
1893#: src/main/extractor_metatypes.c:571 1861#: src/main/extractor_metatypes.c:571
1894msgid "table of contents" 1862msgid "table of contents"
1895msgstr "" 1863msgstr "cuprinsul"
1896 1864
1897#: src/main/extractor_metatypes.c:572 1865#: src/main/extractor_metatypes.c:572
1898msgid "chapters, contents or bookmarks (in xml format)" 1866msgid "chapters, contents or bookmarks (in xml format)"
1899msgstr "" 1867msgstr "capitole, conținut sau marcaje (în format xml)"
1900 1868
1901#: src/main/extractor_metatypes.c:574 1869#: src/main/extractor_metatypes.c:574
1902msgid "video duration" 1870msgid "video duration"
1903msgstr "" 1871msgstr "durata video"
1904 1872
1905#: src/main/extractor_metatypes.c:575 1873#: src/main/extractor_metatypes.c:575
1906msgid "duration of a video stream" 1874msgid "duration of a video stream"
1907msgstr "" 1875msgstr "durata unui flux video"
1908 1876
1909#: src/main/extractor_metatypes.c:576 1877#: src/main/extractor_metatypes.c:576
1910msgid "audio duration" 1878msgid "audio duration"
1911msgstr "" 1879msgstr "durata audio"
1912 1880
1913#: src/main/extractor_metatypes.c:577 1881#: src/main/extractor_metatypes.c:577
1914msgid "duration of an audio stream" 1882msgid "duration of an audio stream"
1915msgstr "" 1883msgstr "durata unui flux audio"
1916 1884
1917#: src/main/extractor_metatypes.c:578 1885#: src/main/extractor_metatypes.c:578
1918msgid "subtitle duration" 1886msgid "subtitle duration"
1919msgstr "" 1887msgstr "durata de subtitrare"
1920 1888
1921#: src/main/extractor_metatypes.c:579 1889#: src/main/extractor_metatypes.c:579
1922msgid "duration of a subtitle stream" 1890msgid "duration of a subtitle stream"
1923msgstr "" 1891msgstr "durata unui flux de subtitrare"
1924 1892
1893# R-GC, scrie:
1894# cred c-ar fi mai corectă adaptarea traducerii
1895# mesajului:
1896# „preauditare audioâ€; în contrast:
1897# „previzualizare videoâ€
1925#: src/main/extractor_metatypes.c:581 1898#: src/main/extractor_metatypes.c:581
1926msgid "audio preview" 1899msgid "audio preview"
1927msgstr "" 1900msgstr "preauditare audio"
1928 1901
1929#: src/main/extractor_metatypes.c:582 1902#: src/main/extractor_metatypes.c:582
1930#, fuzzy
1931msgid "a preview of the file audio stream" 1903msgid "a preview of the file audio stream"
1932msgstr "Dispozitivul nu este un flux (stream)" 1904msgstr "o preauditare a fișierului fluxului audio"
1933 1905
1934#: src/main/extractor_metatypes.c:584 1906#: src/main/extractor_metatypes.c:584
1935msgid "narinfo" 1907msgid "narinfo"
1936msgstr "" 1908msgstr "narinfo"
1937 1909
1938#: src/main/extractor_metatypes.c:586 1910#: src/main/extractor_metatypes.c:586
1939msgid "" 1911msgid ""
1940"file containing information about contents of a normalized archive (nar)" 1912"file containing information about contents of a normalized archive (nar)"
1941msgstr "" 1913msgstr ""
1914"fișier care conține informații despre conținutul unei arhive normalizate "
1915"(nar)"
1942 1916
1943#: src/main/extractor_metatypes.c:588 1917#: src/main/extractor_metatypes.c:588
1944#, fuzzy
1945msgid "nar" 1918msgid "nar"
1946msgstr "împachetator" 1919msgstr "nar"
1947 1920
1948#: src/main/extractor_metatypes.c:589 1921#: src/main/extractor_metatypes.c:589
1949msgid "normalized archive" 1922msgid "normalized archive"
1950msgstr "" 1923msgstr "arhivă normalizată"
1951 1924
1952#: src/main/extractor_metatypes.c:591 src/main/extractor_metatypes.c:592 1925#: src/main/extractor_metatypes.c:591 src/main/extractor_metatypes.c:592
1953msgid "last" 1926msgid "last"
1954msgstr "" 1927msgstr "ultimul"
1955 1928
1956#: src/main/getopt.c:694 1929#: src/main/getopt.c:694
1957#, c-format 1930#, c-format
1958msgid "%s: option `%s' is ambiguous\n" 1931msgid "%s: option `%s' is ambiguous\n"
1959msgstr "%s: opþiunea `%s' este ambiguã\n" 1932msgstr "%s: opÈ›iunea „%s†este ambiguă\n"
1960 1933
1961#: src/main/getopt.c:719 1934#: src/main/getopt.c:719
1962#, c-format 1935#, c-format
1963msgid "%s: option `--%s' doesn't allow an argument\n" 1936msgid "%s: option `--%s' doesn't allow an argument\n"
1964msgstr "%s: opþiunea `--%s' nu permite un argument\n" 1937msgstr "%s: opÈ›iunea „--%s†nu permite un argument\n"
1965 1938
1966#: src/main/getopt.c:725 1939#: src/main/getopt.c:725
1967#, c-format 1940#, c-format
1968msgid "%s: option `%c%s' doesn't allow an argument\n" 1941msgid "%s: option `%c%s' doesn't allow an argument\n"
1969msgstr "%s: opþiunea `%c%s' nu permite un argument\n" 1942msgstr "%s: opÈ›iunea „%c%s†nu permite un argument\n"
1970 1943
1971#: src/main/getopt.c:742 src/main/getopt.c:914 1944#: src/main/getopt.c:742 src/main/getopt.c:914
1972#, c-format 1945#, c-format
1973msgid "%s: option `%s' requires an argument\n" 1946msgid "%s: option `%s' requires an argument\n"
1974msgstr "%s: opþiunea `%s' necesitã un argument\n" 1947msgstr "%s: opÈ›iunea „%s†necesită un argument\n"
1975 1948
1976#: src/main/getopt.c:771 1949#: src/main/getopt.c:771
1977#, c-format 1950#, c-format
1978msgid "%s: unrecognized option `--%s'\n" 1951msgid "%s: unrecognized option `--%s'\n"
1979msgstr "%s: opþiune nerecunoscutã `--%s'\n" 1952msgstr "%s: opÈ›iune nerecunoscută „--%sâ€\n"
1980 1953
1981#: src/main/getopt.c:775 1954#: src/main/getopt.c:775
1982#, c-format 1955#, c-format
1983msgid "%s: unrecognized option `%c%s'\n" 1956msgid "%s: unrecognized option `%c%s'\n"
1984msgstr "%s: opþiune nerecunoscutã `%c%s'\n" 1957msgstr "%s: opÈ›iune nerecunoscută „%c%sâ€\n"
1985 1958
1986#: src/main/getopt.c:801 1959#: src/main/getopt.c:801
1987#, c-format 1960#, c-format
1988msgid "%s: illegal option -- %c\n" 1961msgid "%s: illegal option -- %c\n"
1989msgstr "%s: opþiune ilegalã -- %c\n" 1962msgstr "%s: opÈ›iune ilegală -- %c\n"
1990 1963
1991#: src/main/getopt.c:803 1964#: src/main/getopt.c:803
1992#, c-format 1965#, c-format
1993msgid "%s: invalid option -- %c\n" 1966msgid "%s: invalid option -- %c\n"
1994msgstr "%s: opþiune ilegalã -- %c\n" 1967msgstr "%s: opÈ›iune nevalidă -- %c\n"
1995 1968
1996#: src/main/getopt.c:832 src/main/getopt.c:963 1969#: src/main/getopt.c:832 src/main/getopt.c:963
1997#, c-format 1970#, c-format
1998msgid "%s: option requires an argument -- %c\n" 1971msgid "%s: option requires an argument -- %c\n"
1999msgstr "%s: opþiunea necesitã un argument -- %c\n" 1972msgstr "%s: opÈ›iunea necesită un argument -- %c\n"
2000 1973
2001#: src/main/getopt.c:880 1974#: src/main/getopt.c:880
2002#, c-format 1975#, c-format
2003msgid "%s: option `-W %s' is ambiguous\n" 1976msgid "%s: option `-W %s' is ambiguous\n"
2004msgstr "%s: opþiunea `-W %s' este ambiguã\n" 1977msgstr "%s: opÈ›iunea „-W %s†este ambiguă\n"
2005 1978
2006#: src/main/getopt.c:899 1979#: src/main/getopt.c:899
2007#, c-format 1980#, c-format
2008msgid "%s: option `-W %s' doesn't allow an argument\n" 1981msgid "%s: option `-W %s' doesn't allow an argument\n"
2009msgstr "%s: opþiunea `-W %s' nu permite un argument\n" 1982msgstr "%s: opÈ›iunea „-W %s†nu permite un argument\n"
2010 1983
2011#: src/plugins/flac_extractor.c:323 1984#: src/plugins/flac_extractor.c:323
2012#, c-format 1985#, c-format
2013msgid "%u Hz, %u channels" 1986msgid "%u Hz, %u channels"
2014msgstr "" 1987msgstr "%u Hz, %u canale"
2015 1988
2016#: src/plugins/man_extractor.c:216 1989#: src/plugins/man_extractor.c:216
2017msgid "Commands" 1990msgid "Commands"
@@ -2023,15 +1996,15 @@ msgstr "Apeluri sistem"
2023 1996
2024#: src/plugins/man_extractor.c:224 1997#: src/plugins/man_extractor.c:224
2025msgid "Library calls" 1998msgid "Library calls"
2026msgstr "Apeluri de bibliotecã" 1999msgstr "Apeluri de bibliotecă"
2027 2000
2028#: src/plugins/man_extractor.c:228 2001#: src/plugins/man_extractor.c:228
2029msgid "Special files" 2002msgid "Special files"
2030msgstr "Fiºiere speciale" 2003msgstr "FiÈ™iere speciale"
2031 2004
2032#: src/plugins/man_extractor.c:232 2005#: src/plugins/man_extractor.c:232
2033msgid "File formats and conventions" 2006msgid "File formats and conventions"
2034msgstr "Formate de fiºiere ºi convenþii" 2007msgstr "Formate de fiÈ™iere È™i convenÈ›ii"
2035 2008
2036#: src/plugins/man_extractor.c:236 2009#: src/plugins/man_extractor.c:236
2037msgid "Games" 2010msgid "Games"
@@ -2039,101 +2012,101 @@ msgstr "Jocuri"
2039 2012
2040#: src/plugins/man_extractor.c:240 2013#: src/plugins/man_extractor.c:240
2041msgid "Conventions and miscellaneous" 2014msgid "Conventions and miscellaneous"
2042msgstr "Convenþii ºi diverse" 2015msgstr "ConvenÈ›ii È™i diverse alte lucruri"
2043 2016
2044#: src/plugins/man_extractor.c:244 2017#: src/plugins/man_extractor.c:244
2045msgid "System management commands" 2018msgid "System management commands"
2046msgstr "Comenzi pentru managementul sistemului" 2019msgstr "Comenzi de gestionare a sistemului"
2047 2020
2048#: src/plugins/man_extractor.c:248 2021#: src/plugins/man_extractor.c:248
2049msgid "Kernel routines" 2022msgid "Kernel routines"
2050msgstr "Proceduri kernel" 2023msgstr "Rutine nucleu"
2051 2024
2052#: src/plugins/ole2_extractor.c:414 2025#: src/plugins/ole2_extractor.c:414
2053msgid "No Proofing" 2026msgid "No Proofing"
2054msgstr "" 2027msgstr "Fără verificare"
2055 2028
2056#: src/plugins/ole2_extractor.c:422 2029#: src/plugins/ole2_extractor.c:422
2057msgid "Traditional Chinese" 2030msgid "Traditional Chinese"
2058msgstr "" 2031msgstr "Chineză tradițională"
2059 2032
2060#: src/plugins/ole2_extractor.c:424 2033#: src/plugins/ole2_extractor.c:424
2061msgid "Simplified Chinese" 2034msgid "Simplified Chinese"
2062msgstr "" 2035msgstr "Chineză simplificată"
2063 2036
2064#: src/plugins/ole2_extractor.c:432 2037#: src/plugins/ole2_extractor.c:432
2065msgid "Swiss German" 2038msgid "Swiss German"
2066msgstr "" 2039msgstr "Germană elvețiană"
2067 2040
2068#: src/plugins/ole2_extractor.c:436 2041#: src/plugins/ole2_extractor.c:436
2069msgid "U.S. English" 2042msgid "U.S. English"
2070msgstr "" 2043msgstr "Engleză americană"
2071 2044
2072#: src/plugins/ole2_extractor.c:438 2045#: src/plugins/ole2_extractor.c:438
2073msgid "U.K. English" 2046msgid "U.K. English"
2074msgstr "" 2047msgstr "Engleză britanică"
2075 2048
2076#: src/plugins/ole2_extractor.c:440 2049#: src/plugins/ole2_extractor.c:440
2077msgid "Australian English" 2050msgid "Australian English"
2078msgstr "" 2051msgstr "Engleză australiană"
2079 2052
2080#: src/plugins/ole2_extractor.c:442 2053#: src/plugins/ole2_extractor.c:442
2081msgid "Castilian Spanish" 2054msgid "Castilian Spanish"
2082msgstr "" 2055msgstr "Spaniolă castiliană"
2083 2056
2084#: src/plugins/ole2_extractor.c:444 2057#: src/plugins/ole2_extractor.c:444
2085msgid "Mexican Spanish" 2058msgid "Mexican Spanish"
2086msgstr "" 2059msgstr "Spaniolă mexicană"
2087 2060
2088#: src/plugins/ole2_extractor.c:450 2061#: src/plugins/ole2_extractor.c:450
2089msgid "Belgian French" 2062msgid "Belgian French"
2090msgstr "" 2063msgstr "Franceză belgiană"
2091 2064
2092#: src/plugins/ole2_extractor.c:452 2065#: src/plugins/ole2_extractor.c:452
2093msgid "Canadian French" 2066msgid "Canadian French"
2094msgstr "" 2067msgstr "Franceză canadiană"
2095 2068
2096#: src/plugins/ole2_extractor.c:454 2069#: src/plugins/ole2_extractor.c:454
2097msgid "Swiss French" 2070msgid "Swiss French"
2098msgstr "" 2071msgstr "Franceză elvețiană"
2099 2072
2100#: src/plugins/ole2_extractor.c:464 2073#: src/plugins/ole2_extractor.c:464
2101msgid "Swiss Italian" 2074msgid "Swiss Italian"
2102msgstr "" 2075msgstr "Italiană elvețiană"
2103 2076
2104#: src/plugins/ole2_extractor.c:472 2077#: src/plugins/ole2_extractor.c:472
2105msgid "Belgian Dutch" 2078msgid "Belgian Dutch"
2106msgstr "" 2079msgstr "Olandeză belgiană"
2107 2080
2108#: src/plugins/ole2_extractor.c:474 2081#: src/plugins/ole2_extractor.c:474
2109msgid "Norwegian Bokmal" 2082msgid "Norwegian Bokmal"
2110msgstr "" 2083msgstr "Norvegiană (bokmal)"
2111 2084
2112#: src/plugins/ole2_extractor.c:484 2085#: src/plugins/ole2_extractor.c:484
2113msgid "Rhaeto-Romanic" 2086msgid "Rhaeto-Romanic"
2114msgstr "" 2087msgstr "Reto-romanică"
2115 2088
2116#: src/plugins/ole2_extractor.c:490 2089#: src/plugins/ole2_extractor.c:490
2117msgid "Croato-Serbian (Latin)" 2090msgid "Croato-Serbian (Latin)"
2118msgstr "" 2091msgstr "Croato-sârbă (latină)"
2119 2092
2120#: src/plugins/ole2_extractor.c:492 2093#: src/plugins/ole2_extractor.c:492
2121msgid "Serbo-Croatian (Cyrillic)" 2094msgid "Serbo-Croatian (Cyrillic)"
2122msgstr "" 2095msgstr "Sârbo-croată (chirilic)"
2123 2096
2124#: src/plugins/ole2_extractor.c:520 2097#: src/plugins/ole2_extractor.c:520
2125msgid "Farsi" 2098msgid "Farsi"
2126msgstr "" 2099msgstr "Farsi(persană)"
2127 2100
2128#: src/plugins/ole2_extractor.c:610 2101#: src/plugins/ole2_extractor.c:610
2129#, c-format 2102#, c-format
2130msgid "Revision #%u: Author `%s' worked on `%s'" 2103msgid "Revision #%u: Author `%s' worked on `%s'"
2131msgstr "" 2104msgstr "Revizia #%u: Autorul „%s†a lucrat la „%sâ€"
2132 2105
2133#: src/plugins/riff_extractor.c:149 2106#: src/plugins/riff_extractor.c:149
2134#, c-format 2107#, c-format
2135msgid "codec: %s, %u fps, %u ms" 2108msgid "codec: %s, %u fps, %u ms"
2136msgstr "codec: %s, %u fps, %u ms" 2109msgstr "codec: %s, %u cadre/s, %u ms"
2137 2110
2138#: src/plugins/wav_extractor.c:125 2111#: src/plugins/wav_extractor.c:125
2139msgid "mono" 2112msgid "mono"
@@ -2142,923 +2115,3 @@ msgstr "mono"
2142#: src/plugins/wav_extractor.c:125 2115#: src/plugins/wav_extractor.c:125
2143msgid "stereo" 2116msgid "stereo"
2144msgstr "stereo" 2117msgstr "stereo"
2145
2146#~ msgid "Source RPM %d.%d"
2147#~ msgstr "Sursã RPM %d.%d"
2148
2149#~ msgid "Binary RPM %d.%d"
2150#~ msgstr "Binar RPM %d.%d"
2151
2152#~ msgid ""
2153#~ "Please provide the name of the language you are building\n"
2154#~ "a dictionary for. For example:\n"
2155#~ msgstr ""
2156#~ "Vã rugãm furnizaþi numele limbii pentru care contruiþi\n"
2157#~ "un dicþionar. De exemplu:\n"
2158
2159#~ msgid "Error opening file '%s': %s\n"
2160#~ msgstr "Eroare deschidere fiºier '%s': %s\n"
2161
2162#~ msgid ""
2163#~ "Error allocating: %s\n"
2164#~ "."
2165#~ msgstr ""
2166#~ "Eroare de alocare: %s\n"
2167#~ "."
2168
2169#~ msgid "Increase ALLOCSIZE (in %s).\n"
2170#~ msgstr "Creºteþi ALLOCSIZE (în %s).\n"
2171
2172#~ msgid "Fatal: could not allocate (%s at %s:%d).\n"
2173#~ msgstr "Fatal: nu am putut aloca (%s la %s:%d).\n"
2174
2175#~ msgid "%ux%u dots per cm"
2176#~ msgstr "%ux%u puncte pe cm"
2177
2178#~ msgid "%ux%u dots per inch?"
2179#~ msgstr "%ux%u puncte pe inci?"
2180
2181#~ msgid "Blues"
2182#~ msgstr "Blues"
2183
2184#~ msgid "Classic Rock"
2185#~ msgstr "Rock clasic"
2186
2187#~ msgid "Dance"
2188#~ msgstr "Dance"
2189
2190#~ msgid "Disco"
2191#~ msgstr "Disco"
2192
2193#~ msgid "Funk"
2194#~ msgstr "Funk"
2195
2196#~ msgid "Grunge"
2197#~ msgstr "Grunge"
2198
2199#~ msgid "Hip-Hop"
2200#~ msgstr "Hip-Hop"
2201
2202#~ msgid "Jazz"
2203#~ msgstr "Jazz"
2204
2205#~ msgid "Metal"
2206#~ msgstr "Metal"
2207
2208#~ msgid "New Age"
2209#~ msgstr "New Age"
2210
2211#~ msgid "Oldies"
2212#~ msgstr "Oldies"
2213
2214#~ msgid "Other"
2215#~ msgstr "Altele"
2216
2217#~ msgid "Pop"
2218#~ msgstr "Pop"
2219
2220#~ msgid "R&B"
2221#~ msgstr "R&B"
2222
2223#~ msgid "Rap"
2224#~ msgstr "Rap"
2225
2226#~ msgid "Reggae"
2227#~ msgstr "Reggae"
2228
2229#~ msgid "Rock"
2230#~ msgstr "Rock"
2231
2232#~ msgid "Techno"
2233#~ msgstr "Techno"
2234
2235#~ msgid "Alternative"
2236#~ msgstr "Alternative"
2237
2238#~ msgid "Ska"
2239#~ msgstr "Ska"
2240
2241#~ msgid "Death Metal"
2242#~ msgstr "Death Metal"
2243
2244#~ msgid "Pranks"
2245#~ msgstr "Pranks"
2246
2247#~ msgid "Soundtrack"
2248#~ msgstr "Soundtrack"
2249
2250#~ msgid "Euro-Techno"
2251#~ msgstr "Euro-Techno"
2252
2253#~ msgid "Ambient"
2254#~ msgstr "Ambient"
2255
2256#~ msgid "Trip-Hop"
2257#~ msgstr "Trip-Hop"
2258
2259#~ msgid "Vocal"
2260#~ msgstr "Vocal"
2261
2262#~ msgid "Jazz+Funk"
2263#~ msgstr "Jazz+Funk"
2264
2265#~ msgid "Fusion"
2266#~ msgstr "Fusion"
2267
2268#~ msgid "Trance"
2269#~ msgstr "Trance"
2270
2271#~ msgid "Classical"
2272#~ msgstr "Clasicã"
2273
2274#~ msgid "Instrumental"
2275#~ msgstr "Instrumental"
2276
2277#~ msgid "Acid"
2278#~ msgstr "Acid"
2279
2280#~ msgid "House"
2281#~ msgstr "House"
2282
2283#~ msgid "Game"
2284#~ msgstr "Joc"
2285
2286#~ msgid "Sound Clip"
2287#~ msgstr "Clip sonor"
2288
2289#~ msgid "Gospel"
2290#~ msgstr "Gospel"
2291
2292#~ msgid "Noise"
2293#~ msgstr "Zgomot"
2294
2295#~ msgid "Alt. Rock"
2296#~ msgstr "Rock Alternativ"
2297
2298#~ msgid "Bass"
2299#~ msgstr "Bass"
2300
2301#~ msgid "Soul"
2302#~ msgstr "Soul"
2303
2304#~ msgid "Punk"
2305#~ msgstr "Punk"
2306
2307#~ msgid "Space"
2308#~ msgstr "Spaþiu"
2309
2310#~ msgid "Meditative"
2311#~ msgstr "Meditativ"
2312
2313#~ msgid "Instrumental Pop"
2314#~ msgstr "Instrumental Pop"
2315
2316#~ msgid "Instrumental Rock"
2317#~ msgstr "Instrumental Rock"
2318
2319#~ msgid "Ethnic"
2320#~ msgstr "Ethnic"
2321
2322#~ msgid "Gothic"
2323#~ msgstr "Gothic"
2324
2325#~ msgid "Darkwave"
2326#~ msgstr "Darkwave"
2327
2328#~ msgid "Techno-Industrial"
2329#~ msgstr "Techno-Industrial"
2330
2331#~ msgid "Electronic"
2332#~ msgstr "Electronic"
2333
2334#~ msgid "Pop-Folk"
2335#~ msgstr "Pop-Folk"
2336
2337#~ msgid "Eurodance"
2338#~ msgstr "Eurodance"
2339
2340#~ msgid "Dream"
2341#~ msgstr "Dream"
2342
2343#~ msgid "Southern Rock"
2344#~ msgstr "Southern Rock"
2345
2346#~ msgid "Comedy"
2347#~ msgstr "Comedy"
2348
2349#~ msgid "Cult"
2350#~ msgstr "Cult"
2351
2352#~ msgid "Gangsta Rap"
2353#~ msgstr "Gangsta Rap"
2354
2355#~ msgid "Top 40"
2356#~ msgstr "Top 40"
2357
2358#~ msgid "Christian Rap"
2359#~ msgstr "Christian Rap"
2360
2361#~ msgid "Pop/Funk"
2362#~ msgstr "Pop/Funk"
2363
2364#~ msgid "Jungle"
2365#~ msgstr "Jungle"
2366
2367#~ msgid "Native American"
2368#~ msgstr "Native American"
2369
2370#~ msgid "Cabaret"
2371#~ msgstr "Cabaret"
2372
2373#~ msgid "New Wave"
2374#~ msgstr "New Wave"
2375
2376#~ msgid "Psychedelic"
2377#~ msgstr "Psychedelic"
2378
2379#~ msgid "Rave"
2380#~ msgstr "Rave"
2381
2382#~ msgid "Showtunes"
2383#~ msgstr "Showtunes"
2384
2385#~ msgid "Trailer"
2386#~ msgstr "Trailer"
2387
2388#~ msgid "Lo-Fi"
2389#~ msgstr "Lo-Fi"
2390
2391#~ msgid "Tribal"
2392#~ msgstr "Tribal"
2393
2394#~ msgid "Acid Punk"
2395#~ msgstr "Acid Punk"
2396
2397#~ msgid "Acid Jazz"
2398#~ msgstr "Acid Jazz"
2399
2400#~ msgid "Polka"
2401#~ msgstr "Polka"
2402
2403#~ msgid "Retro"
2404#~ msgstr "Retro"
2405
2406#~ msgid "Musical"
2407#~ msgstr "Musical"
2408
2409#~ msgid "Rock & Roll"
2410#~ msgstr "Rock & Roll"
2411
2412#~ msgid "Hard Rock"
2413#~ msgstr "Hard Rock"
2414
2415#~ msgid "Folk"
2416#~ msgstr "Folk"
2417
2418#~ msgid "Folk/Rock"
2419#~ msgstr "Folk/Rock"
2420
2421#~ msgid "National Folk"
2422#~ msgstr "National Folk"
2423
2424#~ msgid "Swing"
2425#~ msgstr "Swing"
2426
2427#~ msgid "Fast-Fusion"
2428#~ msgstr "Fast-Fusion"
2429
2430#~ msgid "Bebob"
2431#~ msgstr "Bebob"
2432
2433#~ msgid "Revival"
2434#~ msgstr "Revival"
2435
2436#~ msgid "Celtic"
2437#~ msgstr "Celtic"
2438
2439#~ msgid "Bluegrass"
2440#~ msgstr "Bluegrass"
2441
2442#~ msgid "Avantgarde"
2443#~ msgstr "Avantgarde"
2444
2445#~ msgid "Gothic Rock"
2446#~ msgstr "Gothic Rock"
2447
2448#~ msgid "Progressive Rock"
2449#~ msgstr "Progressive Rock"
2450
2451#~ msgid "Psychedelic Rock"
2452#~ msgstr "Psychedelic Rock"
2453
2454#~ msgid "Symphonic Rock"
2455#~ msgstr "Symphonic Rock"
2456
2457#~ msgid "Slow Rock"
2458#~ msgstr "Slow Rock"
2459
2460#~ msgid "Big Band"
2461#~ msgstr "Big Band"
2462
2463#~ msgid "Chorus"
2464#~ msgstr "Chorus"
2465
2466#~ msgid "Easy Listening"
2467#~ msgstr "Easy Listening"
2468
2469#~ msgid "Acoustic"
2470#~ msgstr "Acoustic"
2471
2472#~ msgid "Humour"
2473#~ msgstr "Umor"
2474
2475#~ msgid "Speech"
2476#~ msgstr "Discurs"
2477
2478#~ msgid "Chanson"
2479#~ msgstr "Chanson"
2480
2481#~ msgid "Opera"
2482#~ msgstr "Operã"
2483
2484#~ msgid "Chamber Music"
2485#~ msgstr "Muzicã de camerã"
2486
2487#~ msgid "Sonata"
2488#~ msgstr "Sonet"
2489
2490#~ msgid "Symphony"
2491#~ msgstr "Simfonie"
2492
2493#~ msgid "Booty Bass"
2494#~ msgstr "Booty Bass"
2495
2496#~ msgid "Primus"
2497#~ msgstr "Primus"
2498
2499#~ msgid "Porn Groove"
2500#~ msgstr "Porn Groove"
2501
2502#~ msgid "Satire"
2503#~ msgstr "Satire"
2504
2505#~ msgid "Slow Jam"
2506#~ msgstr "Slow Jam"
2507
2508#~ msgid "Club"
2509#~ msgstr "Club"
2510
2511#~ msgid "Tango"
2512#~ msgstr "Tango"
2513
2514#~ msgid "Samba"
2515#~ msgstr "Samba"
2516
2517#~ msgid "Folklore"
2518#~ msgstr "Folklore"
2519
2520#~ msgid "Ballad"
2521#~ msgstr "Ballad"
2522
2523#~ msgid "Power Ballad"
2524#~ msgstr "Power Ballad"
2525
2526#~ msgid "Rhythmic Soul"
2527#~ msgstr "Rhythmic Soul"
2528
2529#~ msgid "Freestyle"
2530#~ msgstr "Freestyle"
2531
2532#~ msgid "Duet"
2533#~ msgstr "Duet"
2534
2535#~ msgid "Punk Rock"
2536#~ msgstr "Punk Rock"
2537
2538#~ msgid "Drum Solo"
2539#~ msgstr "Drum Solo"
2540
2541#~ msgid "A Cappella"
2542#~ msgstr "A Cappella"
2543
2544#~ msgid "Euro-House"
2545#~ msgstr "Euro-House"
2546
2547#~ msgid "Dance Hall"
2548#~ msgstr "Dance Hall"
2549
2550#~ msgid "Goa"
2551#~ msgstr "Goa"
2552
2553#~ msgid "Drum & Bass"
2554#~ msgstr "Drum & Bass"
2555
2556#~ msgid "Club-House"
2557#~ msgstr "Club-House"
2558
2559#~ msgid "Hardcore"
2560#~ msgstr "Hardcore"
2561
2562#~ msgid "Terror"
2563#~ msgstr "Terror"
2564
2565#~ msgid "Indie"
2566#~ msgstr "Indie"
2567
2568#~ msgid "BritPop"
2569#~ msgstr "BritPop"
2570
2571#~ msgid "Negerpunk"
2572#~ msgstr "Negerpunk"
2573
2574#~ msgid "Polsk Punk"
2575#~ msgstr "Polsk Punk"
2576
2577#~ msgid "Beat"
2578#~ msgstr "Beat"
2579
2580#~ msgid "Christian Gangsta Rap"
2581#~ msgstr "Christian Gangsta Rap"
2582
2583#~ msgid "Heavy Metal"
2584#~ msgstr "Heavy Metal"
2585
2586#~ msgid "Black Metal"
2587#~ msgstr "Black Metal"
2588
2589#~ msgid "Crossover"
2590#~ msgstr "Crossover"
2591
2592#~ msgid "Contemporary Christian"
2593#~ msgstr "Contemporary Christian"
2594
2595#~ msgid "Christian Rock"
2596#~ msgstr "Christian Rock"
2597
2598#~ msgid "Merengue"
2599#~ msgstr "Merengue"
2600
2601#~ msgid "Salsa"
2602#~ msgstr "Salsa"
2603
2604#~ msgid "Thrash Metal"
2605#~ msgstr "Thrash Metal"
2606
2607#~ msgid "Anime"
2608#~ msgstr "Anime"
2609
2610#~ msgid "JPop"
2611#~ msgstr "JPop"
2612
2613#~ msgid "Synthpop"
2614#~ msgstr "Synthpop"
2615
2616#~ msgid "(variable bps)"
2617#~ msgstr "(bps variabil)"
2618
2619#~ msgid "do not remove any duplicates"
2620#~ msgstr "nu îndepãrta nici un duplicat"
2621
2622#~ msgid ""
2623#~ "use the generic plaintext extractor for the language with the 2-letter "
2624#~ "language code LANG"
2625#~ msgstr ""
2626#~ "foloseºte extractorul text-simplu generic pentru limba cu codul de limbã "
2627#~ "din 2 litere LANG"
2628
2629#~ msgid "remove duplicates only if types match"
2630#~ msgstr "îndepãrteazã duplicatele numai dacã tipul este acelaºi"
2631
2632#~ msgid "use the filename as a keyword (loads filename-extractor plugin)"
2633#~ msgstr ""
2634#~ "foloseºte numele de fiºier ca ºi cuvânt cheie (încarcã plugin nume_fiºier-"
2635#~ "extractor)"
2636
2637#~ msgid "compute hash using the given ALGORITHM (currently sha1 or md5)"
2638#~ msgstr ""
2639#~ "calculeazã tabela de dispersie (hash) folosind ALGORITM-ul dat (curent "
2640#~ "sha1 sau md5)"
2641
2642#~ msgid "remove duplicates even if keyword types do not match"
2643#~ msgstr ""
2644#~ "îndepãrteazã duplicatele chiar dacã tipurile cuvintelor cheie nu sunt "
2645#~ "aceleaºi"
2646
2647#~ msgid "use keyword splitting (loads split-extractor plugin)"
2648#~ msgstr ""
2649#~ "foloseºte spargere dupã cuvinte cheie (încarcã plugin-ul split-extractor)"
2650
2651#~ msgid "INVALID TYPE - %s\n"
2652#~ msgstr "TIP INVALID - %s\n"
2653
2654#~ msgid "date"
2655#~ msgstr "data"
2656
2657#~ msgid "coverage"
2658#~ msgstr "acoperire"
2659
2660#~ msgid "translated"
2661#~ msgstr "tradus"
2662
2663#~ msgid "used fonts"
2664#~ msgstr "fonturi folosite"
2665
2666#~ msgid "release"
2667#~ msgstr "release"
2668
2669#~ msgid "size"
2670#~ msgstr "mãrime"
2671
2672#~ msgid "os"
2673#~ msgstr "sistem operare"
2674
2675#~ msgid "category"
2676#~ msgstr "categorie"
2677
2678#~ msgid "owner"
2679#~ msgstr "proprietar"
2680
2681#~ msgid "focal length (35mm equivalent)"
2682#~ msgstr "lungime focalã (echivalent 35mm)"
2683
2684#~ msgid ""
2685#~ "Resolving symbol '%s' in library '%s' failed, so I tried '%s', but that "
2686#~ "failed also. Errors are: '%s' and '%s'.\n"
2687#~ msgstr ""
2688#~ "Rezolvarea simbolului '%s' în biblioteca '%s' a eºuat, aºa cã am încercat "
2689#~ "'%s', dar ºi acesta a eºuat. Erorile sunt: '%s' ºi '%s'.\n"
2690
2691#~ msgid "Loading '%s' plugin failed: %s\n"
2692#~ msgstr "Încãrcarea plugin-ului '%s' a eºuat: %s\n"
2693
2694#~ msgid "Unloading plugin '%s' failed!\n"
2695#~ msgstr "Descãrcarea plugin-ului '%s' a eºuat!\n"
2696
2697#~ msgid "No error"
2698#~ msgstr "Nici o eroare"
2699
2700#~ msgid "Unknown host"
2701#~ msgstr "Gazdã necunoscutã"
2702
2703#~ msgid "Host name lookup failure"
2704#~ msgstr "Cãutarea (lookup) numelui gazdei a eºuat"
2705
2706#~ msgid "Unknown server error"
2707#~ msgstr "Eroare server necunoscutã"
2708
2709#~ msgid "No address associated with name"
2710#~ msgstr "Nici o adresã asociatã cu numele"
2711
2712#~ msgid "Internal resolver error"
2713#~ msgstr "Eroare resolver intern"
2714
2715#~ msgid "Unknown resolver error"
2716#~ msgstr "Eroare resolver necunoscutã"
2717
2718#~ msgid "Cannot determine root directory (%s)\n"
2719#~ msgstr "Nu pot determina directorul root (%s)\n"
2720
2721#~ msgid "Cannot determine home directory (%s)\n"
2722#~ msgstr "Nu pot determina directorul acasã (%s)\n"
2723
2724#~ msgid "Not super-user"
2725#~ msgstr "Nu sunteþi super-utilizator"
2726
2727#~ msgid "No such file or directory"
2728#~ msgstr "Nici un asemenea fiºier sau director"
2729
2730#~ msgid "No such process"
2731#~ msgstr "Nici un asemenea proces"
2732
2733#~ msgid "Interrupted system call"
2734#~ msgstr "Apel sistem întrerupt"
2735
2736#~ msgid "I/O error"
2737#~ msgstr "Eroare I/O"
2738
2739#~ msgid "No such device or address"
2740#~ msgstr "Nici un asemenea dispozitiv sau adresã"
2741
2742#~ msgid "Arg list too long"
2743#~ msgstr "Listã de argumente prea lungã"
2744
2745#~ msgid "Exec format error"
2746#~ msgstr "Eroare format exec"
2747
2748#~ msgid "No children"
2749#~ msgstr "Nici un copil"
2750
2751#~ msgid "Resource unavailable or operation would block, try again"
2752#~ msgstr "Resursã indisponibilã sau operaþia s-ar bloca, încercaþi din nou"
2753
2754#~ msgid "Not enough memory"
2755#~ msgstr "Memorie insuficientã"
2756
2757#~ msgid "Permission denied"
2758#~ msgstr "Permisiune refuzatã"
2759
2760#~ msgid "Bad address"
2761#~ msgstr "Adresa incorectã"
2762
2763#~ msgid "Block device required"
2764#~ msgstr "Dispozitiv bloc necesar"
2765
2766#~ msgid "Mount device busy"
2767#~ msgstr "Dispozitiv montare ocupat"
2768
2769#~ msgid "File exists"
2770#~ msgstr "Fiºierul existã"
2771
2772#~ msgid "Cross-device link"
2773#~ msgstr "Legãturã (link) între-dispozitive"
2774
2775#~ msgid "Is a directory"
2776#~ msgstr "Este un director"
2777
2778#~ msgid "Invalid argument"
2779#~ msgstr "Argument invalide"
2780
2781#~ msgid "Too many open files in system"
2782#~ msgstr "Prea multe fiºiere deschise în sistem"
2783
2784#~ msgid "Too many open files"
2785#~ msgstr "Prea multe fiºiere deschise"
2786
2787#~ msgid "Not a typewriter"
2788#~ msgstr "Nu este o maºinã de scris (typewriter)"
2789
2790#~ msgid "Text file busy"
2791#~ msgstr "Fiºier text ocupat"
2792
2793#~ msgid "File too large"
2794#~ msgstr "Fiºier prea mare"
2795
2796#~ msgid "No space left on device"
2797#~ msgstr "Spaþiu indisponibil pe dispozitiv"
2798
2799#~ msgid "Illegal seek"
2800#~ msgstr "Cãutare ilegalã"
2801
2802#~ msgid "Read only file system"
2803#~ msgstr "Citeºte numai sistemul de fiºiere"
2804
2805#~ msgid "Too many links"
2806#~ msgstr "Prea multe legãturi (links)"
2807
2808#~ msgid "Broken pipe"
2809#~ msgstr "Pipe spart(ã)"
2810
2811#~ msgid "Math arg out of domain of func"
2812#~ msgstr "Argument matematic în afara domeniului funcþiei"
2813
2814#~ msgid "Math result not representable"
2815#~ msgstr "Rezultatul matematic nu este reprezentabil"
2816
2817#~ msgid "No message of desired type"
2818#~ msgstr "Nici un mesaj de tipul dorit"
2819
2820#~ msgid "Identifier removed"
2821#~ msgstr "Identificator îndepãrtat"
2822
2823#~ msgid "Level 2 not synchronized"
2824#~ msgstr "Nivelul 2 nesincronizat"
2825
2826#~ msgid "Level 3 halted"
2827#~ msgstr "Nivelul 3 oprit"
2828
2829#~ msgid "Level 3 reset"
2830#~ msgstr "Nivelul 3 resetat"
2831
2832#~ msgid "Protocol driver not attached"
2833#~ msgstr "Driver-ul de protocol nu este ataºat"
2834
2835#~ msgid "No CSI structure available"
2836#~ msgstr "Nici o structurã CSI disponibilã"
2837
2838#~ msgid "Level 2 halted"
2839#~ msgstr "Nivelul 2 oprit"
2840
2841#~ msgid "Deadlock condition"
2842#~ msgstr "Condiþie blocare (Deadlock)"
2843
2844#~ msgid "No record locks available"
2845#~ msgstr "Nici o încuietoare de articol (record lock) disponibilã"
2846
2847#~ msgid "Invalid exchange"
2848#~ msgstr "Schimbare invalidã"
2849
2850#~ msgid "Invalid request descriptor"
2851#~ msgstr "Descriptor de cerere invalid"
2852
2853#~ msgid "Exchange full"
2854#~ msgstr "Schimbare întreagã"
2855
2856#~ msgid "No anode"
2857#~ msgstr "Nici un anode"
2858
2859#~ msgid "Invalid request code"
2860#~ msgstr "Cod de cerere invalid"
2861
2862#~ msgid "Invalid slot"
2863#~ msgstr "Loc (slot) invalid"
2864
2865#~ msgid "File locking deadlock error"
2866#~ msgstr "Eroare la descuierea (locking deadlock) fiºierului"
2867
2868#~ msgid "Bad font file fmt"
2869#~ msgstr "Format fiºier font incorect"
2870
2871#~ msgid "No data (for no delay io)"
2872#~ msgstr "Nici o datã (pentru intrare/ieºire fãrã întârziere)"
2873
2874#~ msgid "Timer expired"
2875#~ msgstr "Cronometru expirat"
2876
2877#~ msgid "Out of streams resources"
2878#~ msgstr "Resurse în afara fluxurilor"
2879
2880#~ msgid "Machine is not on the network"
2881#~ msgstr "Maºina nu este pe reþea"
2882
2883#~ msgid "Package not installed"
2884#~ msgstr "Pachet neinstalat"
2885
2886#~ msgid "The object is remote"
2887#~ msgstr "Obiectul este îndepãrtat (remote)"
2888
2889#~ msgid "The link has been severed"
2890#~ msgstr "Legãtura a fost întreruptã"
2891
2892#~ msgid "Advertise error"
2893#~ msgstr "Eroare reclamare"
2894
2895#~ msgid "Srmount error"
2896#~ msgstr "Eroare Srmount"
2897
2898#~ msgid "Communication error on send"
2899#~ msgstr "Eroare de comunicare la trimitere"
2900
2901#~ msgid "Protocol error"
2902#~ msgstr "Eroare protocol"
2903
2904#~ msgid "Multihop attempted"
2905#~ msgstr "A fost încercat multihop"
2906
2907#~ msgid "Inode is remote (not really error)"
2908#~ msgstr "Inode este îndepãrtat (în realitate nu este o eroare)"
2909
2910#~ msgid "Cross mount point (not really error)"
2911#~ msgstr "Punct de montare încruciºat (în realitate nu este o eroare)"
2912
2913#~ msgid "Trying to read unreadable message"
2914#~ msgstr "Încercare de citire a unui mesaj de necitit"
2915
2916#~ msgid "Given log. name not unique"
2917#~ msgstr "Numele de jurnal (log) furnizat nu este unic"
2918
2919#~ msgid "f.d. invalid for this operation"
2920#~ msgstr "f.d. invalid pentru aceastã operaþie"
2921
2922#~ msgid "Remote address changed"
2923#~ msgstr "Adresa îndepãrtatã (remote) schimbatã"
2924
2925#~ msgid "Can't access a needed shared lib"
2926#~ msgstr "Nu pot accesa o bibliotecã shared necesarã"
2927
2928#~ msgid "Accessing a corrupted shared lib"
2929#~ msgstr "Accesez o bibliotecã shared coruptã"
2930
2931#~ msgid ".lib section in a.out corrupted"
2932#~ msgstr "seciunea .lib în a.out este coruptã"
2933
2934#~ msgid "Attempting to link in too many libs"
2935#~ msgstr "Încercare de legare (link) în prea multe biblioteci"
2936
2937#~ msgid "Attempting to exec a shared library"
2938#~ msgstr "Încercare de executare a unei biblioteci shared"
2939
2940#~ msgid "Function not implemented"
2941#~ msgstr "Funcþia nu este implematatã"
2942
2943#~ msgid "No more files"
2944#~ msgstr "Nici un alt fiºier"
2945
2946#~ msgid "Directory not empty"
2947#~ msgstr "Directorul nu este gol"
2948
2949#~ msgid "File or path name too long"
2950#~ msgstr "Numele fiºierului sau cãii este prea lung"
2951
2952#~ msgid "Too many symbolic links"
2953#~ msgstr "Pre multe legãturi simbolice"
2954
2955#~ msgid "Operation not supported on transport endpoint"
2956#~ msgstr "Operaþia nu este suportatã pe transport endpoint"
2957
2958#~ msgid "Protocol family not supported"
2959#~ msgstr "Familie de protocoale nesuportatã"
2960
2961#~ msgid "Connection reset by peer"
2962#~ msgstr "Conectare resetatã de pereche"
2963
2964#~ msgid "No buffer space available"
2965#~ msgstr "Nici un spaþiu de buffer disponibil"
2966
2967#~ msgid "Address family not supported by protocol family"
2968#~ msgstr "Familia de adrese nu este suportatã de familia de protocoale"
2969
2970#~ msgid "Protocol wrong type for socket"
2971#~ msgstr "Tip greºit de protocol pentru socket"
2972
2973#~ msgid "Socket operation on non-socket"
2974#~ msgstr "Operaþiune socket pe non-socket"
2975
2976#~ msgid "Protocol not available"
2977#~ msgstr "Protocol indisponibil"
2978
2979#~ msgid "Can't send after socket shutdown"
2980#~ msgstr "Nu pot trimite dupã închiderea (shutdown) socket-ului"
2981
2982#~ msgid "Connection refused"
2983#~ msgstr "Conectare refuzatã"
2984
2985#~ msgid "Address already in use"
2986#~ msgstr "Adresa este deja în uz"
2987
2988#~ msgid "Connection aborted"
2989#~ msgstr "Conectare abandonatã"
2990
2991#~ msgid "Network is unreachable"
2992#~ msgstr "Reþeaua nu poate fi atinsã"
2993
2994#~ msgid "Network interface is not configured"
2995#~ msgstr "Interfaþa de reþea nu este configuratã"
2996
2997#~ msgid "Connection timed out"
2998#~ msgstr "Conectare expiratã (timed out)"
2999
3000#~ msgid "Host is down"
3001#~ msgstr "Gazda este indisponibilã (down)"
3002
3003#~ msgid "Host is unreachable"
3004#~ msgstr "Gazda este de neatins (unreachable)"
3005
3006#~ msgid "Connection already in progress"
3007#~ msgstr "Conectare deja în progres"
3008
3009#~ msgid "Socket already connected"
3010#~ msgstr "Socket deja conectat"
3011
3012#~ msgid "Destination address required"
3013#~ msgstr "Adresa destinaþie necesarã"
3014
3015#~ msgid "Message too long"
3016#~ msgstr "Mesaj prea lung"
3017
3018#~ msgid "Unknown protocol"
3019#~ msgstr "Protocol necunoscut"
3020
3021#~ msgid "Socket type not supported"
3022#~ msgstr "Tip de socket nesuportat"
3023
3024#~ msgid "Address not available"
3025#~ msgstr "Adresa nu este disponibilã"
3026
3027#~ msgid "Connection aborted by network"
3028#~ msgstr "Conectare abandonatã de reþea"
3029
3030#~ msgid "Socket is already connected"
3031#~ msgstr "Socket-ul este deja conectat"
3032
3033#~ msgid "Socket is not connected"
3034#~ msgstr "Socket-ul nu este conectat"
3035
3036#~ msgid "Too many references: cannot splice"
3037#~ msgstr "Prea multe referinþe: nu le pot îmbina"
3038
3039#~ msgid "Too many processes"
3040#~ msgstr "Prea multe procese"
3041
3042#~ msgid "Too many users"
3043#~ msgstr "Prea mulþi utilizatori"
3044
3045#~ msgid "Disk quota exceeded"
3046#~ msgstr "Cota de disc depãºitã"
3047
3048#~ msgid "Unknown error"
3049#~ msgstr "Eroare necunoscutã"
3050
3051#~ msgid "Not supported"
3052#~ msgstr "NU este suportat(ã)"
3053
3054#~ msgid "No medium (in tape drive)"
3055#~ msgstr "Nici un mediu (în unitatea de bandã)"
3056
3057#~ msgid "No such host or network path"
3058#~ msgstr "Nici o asemenea gazdã sau cale de reþea"
3059
3060#~ msgid "Filename exists with different case"
3061#~ msgstr "Numele de fiºier existã cu cazul caracterelor diferit"
3062
3063#~ msgid "ERROR: Unknown error %i in %s\n"
3064#~ msgstr "EROARE: Eroare necunoscutã %i în %s\n"
diff --git a/po/rw.po b/po/rw.po
index 180d7ef..e9d27c3 100644
--- a/po/rw.po
+++ b/po/rw.po
@@ -16,7 +16,7 @@ msgid ""
16msgstr "" 16msgstr ""
17"Project-Id-Version: libextractor 0.4.2\n" 17"Project-Id-Version: libextractor 0.4.2\n"
18"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 18"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
19"POT-Creation-Date: 2020-07-02 15:57+0200\n" 19"POT-Creation-Date: 2021-01-30 15:28+0100\n"
20"PO-Revision-Date: 2005-04-04 10:55-0700\n" 20"PO-Revision-Date: 2005-04-04 10:55-0700\n"
21"Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n" 21"Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n"
22"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n" 22"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
@@ -149,7 +149,7 @@ msgstr ""
149msgid "Keywords for file %s:\n" 149msgid "Keywords for file %s:\n"
150msgstr "kugirango IDOSIYE" 150msgstr "kugirango IDOSIYE"
151 151
152#: src/main/extractor.c:680 152#: src/main/extractor.c:679
153#, fuzzy, c-format 153#, fuzzy, c-format
154msgid "Initialization of plugin mechanism failed: %s!\n" 154msgid "Initialization of plugin mechanism failed: %s!\n"
155msgstr "Bya Byanze" 155msgstr "Bya Byanze"
diff --git a/po/sr.po b/po/sr.po
index 71b80c1..a8288a5 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -6,7 +6,7 @@ msgid ""
6msgstr "" 6msgstr ""
7"Project-Id-Version: libextractor-1.9\n" 7"Project-Id-Version: libextractor-1.9\n"
8"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 8"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
9"POT-Creation-Date: 2020-07-02 15:57+0200\n" 9"POT-Creation-Date: 2021-01-30 15:28+0100\n"
10"PO-Revision-Date: 2020-04-02 08:30+0200\n" 10"PO-Revision-Date: 2020-04-02 08:30+0200\n"
11"Last-Translator: МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>\n" 11"Last-Translator: МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>\n"
12"Language-Team: Serbian <(nothing)>\n" 12"Language-Team: Serbian <(nothing)>\n"
@@ -14,8 +14,8 @@ msgstr ""
14"MIME-Version: 1.0\n" 14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n" 15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n" 16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 17"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 18"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
19"X-Generator: Virtaal 0.7.1\n" 19"X-Generator: Virtaal 0.7.1\n"
20"X-Bugs: Report translation errors to the Language-Team address.\n" 20"X-Bugs: Report translation errors to the Language-Team address.\n"
21 21
@@ -140,7 +140,7 @@ msgstr "% Ð‘Ð¸Ð‘Ð¢ÐµÐšÑ Ð´Ð°Ñ‚Ð¾Ñ‚ÐµÐºÐ°\n"
140msgid "Keywords for file %s:\n" 140msgid "Keywords for file %s:\n"
141msgstr "Кључне речи за датотеку „%s“:\n" 141msgstr "Кључне речи за датотеку „%s“:\n"
142 142
143#: src/main/extractor.c:680 143#: src/main/extractor.c:679
144#, c-format 144#, c-format
145msgid "Initialization of plugin mechanism failed: %s!\n" 145msgid "Initialization of plugin mechanism failed: %s!\n"
146msgstr "Покретање механизма прикључка није уÑпело: %s!\n" 146msgstr "Покретање механизма прикључка није уÑпело: %s!\n"
diff --git a/po/sv.po b/po/sv.po
index 707f649..1c14b05 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: libextractor 0.5.22\n" 8"Project-Id-Version: libextractor 0.5.22\n"
9"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 9"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
10"POT-Creation-Date: 2020-07-02 15:57+0200\n" 10"POT-Creation-Date: 2021-01-30 15:28+0100\n"
11"PO-Revision-Date: 2009-05-12 17:45+0100\n" 11"PO-Revision-Date: 2009-05-12 17:45+0100\n"
12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" 12"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" 13"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -136,7 +136,7 @@ msgstr "%% BiBTeX-fil\n"
136msgid "Keywords for file %s:\n" 136msgid "Keywords for file %s:\n"
137msgstr "Nyckelord för filen %s:\n" 137msgstr "Nyckelord för filen %s:\n"
138 138
139#: src/main/extractor.c:680 139#: src/main/extractor.c:679
140#, c-format 140#, c-format
141msgid "Initialization of plugin mechanism failed: %s!\n" 141msgid "Initialization of plugin mechanism failed: %s!\n"
142msgstr "Initiering av insticksmekanism misslyckades: %s!\n" 142msgstr "Initiering av insticksmekanism misslyckades: %s!\n"
diff --git a/po/uk.po b/po/uk.po
index 85244bb..4bf0e87 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,7 +7,7 @@ msgid ""
7msgstr "" 7msgstr ""
8"Project-Id-Version: libextractor 1.9\n" 8"Project-Id-Version: libextractor 1.9\n"
9"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 9"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
10"POT-Creation-Date: 2020-07-02 15:57+0200\n" 10"POT-Creation-Date: 2021-01-30 15:28+0100\n"
11"PO-Revision-Date: 2019-02-10 20:41+0200\n" 11"PO-Revision-Date: 2019-02-10 20:41+0200\n"
12"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" 12"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
13"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n" 13"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
@@ -17,8 +17,8 @@ msgstr ""
17"Content-Transfer-Encoding: 8bit\n" 17"Content-Transfer-Encoding: 8bit\n"
18"X-Bugs: Report translation errors to the Language-Team address.\n" 18"X-Bugs: Report translation errors to the Language-Team address.\n"
19"X-Generator: Lokalize 19.03.70\n" 19"X-Generator: Lokalize 19.03.70\n"
20"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
21"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 21"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
22 22
23#: src/main/extract.c:134 23#: src/main/extract.c:134
24#, c-format 24#, c-format
@@ -151,7 +151,7 @@ msgstr "% файл BiBTeX\n"
151msgid "Keywords for file %s:\n" 151msgid "Keywords for file %s:\n"
152msgstr "Ключові Ñлова Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° %s:\n" 152msgstr "Ключові Ñлова Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° %s:\n"
153 153
154#: src/main/extractor.c:680 154#: src/main/extractor.c:679
155#, c-format 155#, c-format
156msgid "Initialization of plugin mechanism failed: %s!\n" 156msgid "Initialization of plugin mechanism failed: %s!\n"
157msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ініціалізації механізму додатків: %s!\n" 157msgstr "Помилка під Ñ‡Ð°Ñ Ñпроби ініціалізації механізму додатків: %s!\n"
diff --git a/po/vi.po b/po/vi.po
index 47b8770..e85941c 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: libextractor 0.6.0\n" 9"Project-Id-Version: libextractor 0.6.0\n"
10"Report-Msgid-Bugs-To: libextractor@gnu.org\n" 10"Report-Msgid-Bugs-To: libextractor@gnu.org\n"
11"POT-Creation-Date: 2020-07-02 15:57+0200\n" 11"POT-Creation-Date: 2021-01-30 15:28+0100\n"
12"PO-Revision-Date: 2010-02-11 00:13+0930\n" 12"PO-Revision-Date: 2010-02-11 00:13+0930\n"
13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" 13"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" 14"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
@@ -145,7 +145,7 @@ msgstr "%% tập tin BiBTeX\n"
145msgid "Keywords for file %s:\n" 145msgid "Keywords for file %s:\n"
146msgstr "Từ khoá cho tập tin %s:\n" 146msgstr "Từ khoá cho tập tin %s:\n"
147 147
148#: src/main/extractor.c:680 148#: src/main/extractor.c:679
149#, c-format 149#, c-format
150msgid "Initialization of plugin mechanism failed: %s!\n" 150msgid "Initialization of plugin mechanism failed: %s!\n"
151msgstr "Việc khởi động cơ chế cầm phít bị lỗi: %s\n" 151msgstr "Việc khởi động cơ chế cầm phít bị lỗi: %s\n"
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index a81ffc2..db3dcf1 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1,8 +1,7 @@
1# This Makefile.am is in the public domain 1# This Makefile.am is in the public domain
2SUBDIRS = . 2SUBDIRS = .
3include_HEADERS = \ 3include_HEADERS = \
4 extractor.h 4 extractor.h
5EXTRA_DIST = \ 5EXTRA_DIST = \
6 plibc.h \
7 platform.h \ 6 platform.h \
8 gettext.h 7 gettext.h
diff --git a/src/include/extractor.h b/src/include/extractor.h
index 3e6c098..9f24735 100644
--- a/src/include/extractor.h
+++ b/src/include/extractor.h
@@ -35,7 +35,7 @@ extern "C" {
35 * 0.2.6-1 => 0x00020601 35 * 0.2.6-1 => 0x00020601
36 * 4.5.2-0 => 0x04050200 36 * 4.5.2-0 => 0x04050200
37 */ 37 */
38#define EXTRACTOR_VERSION 0x01080001 38#define EXTRACTOR_VERSION 0x010B0000
39 39
40#include <stdio.h> 40#include <stdio.h>
41 41
@@ -124,8 +124,14 @@ enum EXTRACTOR_MetaFormat
124 */ 124 */
125enum EXTRACTOR_MetaType 125enum EXTRACTOR_MetaType
126{ 126{
127 /* fundamental types */ 127 /* available to application for marking an `enum EXTRACTOR_MetaType` as not
128 carrying any meaningful value - never used by libextractor */
129 EXTRACTOR_METATYPE_NONE = -1,
130
131 /* reserved should be used as a terminator (like the '\0'-terminator for strings)
132 and is never used directly by libextractor */
128 EXTRACTOR_METATYPE_RESERVED = 0, 133 EXTRACTOR_METATYPE_RESERVED = 0,
134
129 EXTRACTOR_METATYPE_MIMETYPE = 1, 135 EXTRACTOR_METATYPE_MIMETYPE = 1,
130 EXTRACTOR_METATYPE_FILENAME = 2, 136 EXTRACTOR_METATYPE_FILENAME = 2,
131 EXTRACTOR_METATYPE_COMMENT = 3, 137 EXTRACTOR_METATYPE_COMMENT = 3,
diff --git a/src/include/platform.h b/src/include/platform.h
index 9f72f57..b457a72 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -35,8 +35,6 @@
35#define _(a) dgettext ("org.gnunet.libextractor", a) 35#define _(a) dgettext ("org.gnunet.libextractor", a)
36#endif 36#endif
37 37
38#include "plibc.h"
39
40#include <string.h> 38#include <string.h>
41#include <unistd.h> 39#include <unistd.h>
42#include <ctype.h> 40#include <ctype.h>
diff --git a/src/include/plibc.h b/src/include/plibc.h
deleted file mode 100644
index 9199072..0000000
--- a/src/include/plibc.h
+++ /dev/null
@@ -1,1092 +0,0 @@
1/*
2 This file is part of PlibC.
3 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Nils Durner (and other contributing authors)
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20/**
21 * @file include/plibc.h
22 * @brief PlibC header
23 * @attention This file is usually not installed under Unix,
24 * so ship it with your application
25 * @version $Revision: 158 $
26 */
27
28#ifndef _PLIBC_H_
29#define _PLIBC_H_
30
31#ifndef SIGALRM
32 #define SIGALRM 14
33#endif
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#include <stddef.h>
40
41#ifdef Q_OS_WIN32
42 #define WINDOWS 1
43#endif
44
45#define HAVE_PLIBC_FD 0
46
47#ifdef WINDOWS
48
49#if ENABLE_NLS
50 #include "langinfo.h"
51#endif
52
53#include <ws2tcpip.h>
54#include <windows.h>
55#include <sys/types.h>
56#include <time.h>
57#include <stdio.h>
58#include <sys/types.h>
59#include <sys/stat.h>
60#include <dirent.h>
61#include <errno.h>
62#include <stdarg.h>
63
64#define __BYTE_ORDER BYTE_ORDER
65#define __BIG_ENDIAN BIG_ENDIAN
66
67/* Conflicts with our definitions */
68#define __G_WIN32_H__
69
70/* Convert LARGE_INTEGER to double */
71#define Li2Double(x) ((double) ((x).HighPart) * 4.294967296E9 \
72 + (double) ((x).LowPart))
73#ifndef HAVE_DECL__STATI64
74struct _stati64
75{
76 _dev_t st_dev;
77 _ino_t st_ino;
78 _mode_t st_mode;
79 short st_nlink;
80 short st_uid;
81 short st_gid;
82 _dev_t st_rdev;
83 __int64 st_size;
84 time_t st_atime;
85 time_t st_mtime;
86 time_t st_ctime;
87};
88#endif
89typedef unsigned int sa_family_t;
90
91struct sockaddr_un
92{
93 short sun_family; /*AF_UNIX*/
94 char sun_path[108]; /*path name */
95};
96
97#ifndef pid_t
98 #define pid_t DWORD
99#endif
100
101#ifndef error_t
102 #define error_t int
103#endif
104
105#ifndef WEXITSTATUS
106 #define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
107#endif
108
109#ifndef MSG_DONTWAIT
110 #define MSG_DONTWAIT 0
111#endif
112
113enum
114{
115 _SC_PAGESIZE = 30,
116 _SC_PAGE_SIZE = 30
117};
118
119#if ! defined(EACCESS)
120# define EACCESS EACCES
121#endif
122
123/* Thanks to the Cygwin project */
124#if ! defined(ENOCSI)
125# define ENOCSI 43 /* No CSI structure available */
126#endif
127#if ! defined(EL2HLT)
128# define EL2HLT 44 /* Level 2 halted */
129#endif
130#if ! defined(EDEADLK)
131# define EDEADLK 45 /* Deadlock condition */
132#endif
133#if ! defined(ENOLCK)
134# define ENOLCK 46 /* No record locks available */
135#endif
136#if ! defined(EBADE)
137# define EBADE 50 /* Invalid exchange */
138#endif
139#if ! defined(EBADR)
140# define EBADR 51 /* Invalid request descriptor */
141#endif
142#if ! defined(EXFULL)
143# define EXFULL 52 /* Exchange full */
144#endif
145#if ! defined(ENOANO)
146# define ENOANO 53 /* No anode */
147#endif
148#if ! defined(EBADRQC)
149# define EBADRQC 54 /* Invalid request code */
150#endif
151#if ! defined(EBADSLT)
152# define EBADSLT 55 /* Invalid slot */
153#endif
154#if ! defined(EDEADLOCK)
155# define EDEADLOCK EDEADLK /* File locking deadlock error */
156#endif
157#if ! defined(EBFONT)
158# define EBFONT 57 /* Bad font file fmt */
159#endif
160#if ! defined(ENOSTR)
161# define ENOSTR 60 /* Device not a stream */
162#endif
163#if ! defined(ENODATA)
164# define ENODATA 61 /* No data (for no delay io) */
165#endif
166#if ! defined(ETIME)
167# define ETIME 62 /* Timer expired */
168#endif
169#if ! defined(ENOSR)
170# define ENOSR 63 /* Out of streams resources */
171#endif
172#if ! defined(ENONET)
173# define ENONET 64 /* Machine is not on the network */
174#endif
175#if ! defined(ENOPKG)
176# define ENOPKG 65 /* Package not installed */
177#endif
178#if ! defined(EREMOTE)
179# define EREMOTE 66 /* The object is remote */
180#endif
181#if ! defined(ENOLINK)
182# define ENOLINK 67 /* The link has been severed */
183#endif
184#if ! defined(EADV)
185# define EADV 68 /* Advertise error */
186#endif
187#if ! defined(ESRMNT)
188# define ESRMNT 69 /* Srmount error */
189#endif
190#if ! defined(ECOMM)
191# define ECOMM 70 /* Communication error on send */
192#endif
193#if ! defined(EMULTIHOP)
194# define EMULTIHOP 74 /* Multihop attempted */
195#endif
196#if ! defined(ELBIN)
197# define ELBIN 75 /* Inode is remote (not really error) */
198#endif
199#if ! defined(EDOTDOT)
200# define EDOTDOT 76 /* Cross mount point (not really error) */
201#endif
202#if ! defined(EBADMSG)
203# define EBADMSG 77 /* Trying to read unreadable message */
204#endif
205#if ! defined(ENOTUNIQ)
206# define ENOTUNIQ 80 /* Given log. name not unique */
207#endif
208#if ! defined(EBADFD)
209# define EBADFD 81 /* f.d. invalid for this operation */
210#endif
211#if ! defined(EREMCHG)
212# define EREMCHG 82 /* Remote address changed */
213#endif
214#if ! defined(ELIBACC)
215# define ELIBACC 83 /* Can't access a needed shared lib */
216#endif
217#if ! defined(ELIBBAD)
218# define ELIBBAD 84 /* Accessing a corrupted shared lib */
219#endif
220#if ! defined(ELIBSCN)
221# define ELIBSCN 85 /* .lib section in a.out corrupted */
222#endif
223#if ! defined(ELIBMAX)
224# define ELIBMAX 86 /* Attempting to link in too many libs */
225#endif
226#if ! defined(ELIBEXEC)
227# define ELIBEXEC 87 /* Attempting to exec a shared library */
228#endif
229#if ! defined(ENOSYS)
230# define ENOSYS 88 /* Function not implemented */
231#endif
232#if ! defined(ENMFILE)
233# define ENMFILE 89 /* No more files */
234#endif
235#if ! defined(ENOTEMPTY)
236# define ENOTEMPTY 90 /* Directory not empty */
237#endif
238#if ! defined(ENAMETOOLONG)
239# define ENAMETOOLONG 91 /* File or path name too long */
240#endif
241#if ! defined(EPFNOSUPPORT)
242# define EPFNOSUPPORT 96 /* Protocol family not supported */
243#endif
244#if ! defined(ENOSHARE)
245# define ENOSHARE 97 /* No such host or network path */
246#endif
247#if ! defined(ENOMEDIUM)
248# define ENOMEDIUM 98 /* No medium (in tape drive) */
249#endif
250#if ! defined(ESHUTDOWN)
251# define ESHUTDOWN 99 /* Can't send after socket shutdown */
252#endif
253#if ! defined(EADDRINUSE)
254# define EADDRINUSE 100 /* Address already in use */
255#endif
256#if ! defined(EADDRNOTAVAIL)
257# define EADDRNOTAVAIL 101 /* Address not available */
258#endif
259#if ! defined(EAFNOSUPPORT)
260# define EAFNOSUPPORT 102 /* Address family not supported by protocol family */
261#endif
262#if ! defined(EALREADY)
263# define EALREADY 103 /* Socket already connected */
264#endif
265#if ! defined(ECANCELED)
266# define ECANCELED 105 /* Connection cancelled */
267#endif
268#if ! defined(ECONNABORTED)
269# define ECONNABORTED 106 /* Connection aborted */
270#endif
271#if ! defined(ECONNREFUSED)
272# define ECONNREFUSED 107 /* Connection refused */
273#endif
274#if ! defined(ECONNRESET)
275# define ECONNRESET 108 /* Connection reset by peer */
276#endif
277#if ! defined(EDESTADDRREQ)
278# define EDESTADDRREQ 109 /* Destination address required */
279#endif
280#if ! defined(EHOSTUNREACH)
281# define EHOSTUNREACH 110 /* Host is unreachable */
282#endif
283#if ! defined(ECONNABORTED)
284# define ECONNABORTED 111 /* Connection aborted */
285#endif
286#if ! defined(EINPROGRESS)
287# define EINPROGRESS 112 /* Connection already in progress */
288#endif
289#if ! defined(EISCONN)
290# define EISCONN 113 /* Socket is already connected */
291#endif
292#if ! defined(ELOOP)
293# define ELOOP 114 /* Too many symbolic links */
294#endif
295#if ! defined(EMSGSIZE)
296# define EMSGSIZE 115 /* Message too long */
297#endif
298#if ! defined(ENETDOWN)
299# define ENETDOWN 116 /* Network interface is not configured */
300#endif
301#if ! defined(ENETRESET)
302# define ENETRESET 117 /* Connection aborted by network */
303#endif
304#if ! defined(ENETUNREACH)
305# define ENETUNREACH 118 /* Network is unreachable */
306#endif
307#if ! defined(ENOBUFS)
308# define ENOBUFS 119 /* No buffer space available */
309#endif
310#if ! defined(EHOSTDOWN)
311# define EHOSTDOWN 120 /* Host is down */
312#endif
313#if ! defined(EPROCLIM)
314# define EPROCLIM 121 /* Too many processes */
315#endif
316#if ! defined(EDQUOT)
317# define EDQUOT 122 /* Disk quota exceeded */
318#endif
319#if ! defined(ENOPROTOOPT)
320# define ENOPROTOOPT 123 /* Protocol not available */
321#endif
322#if ! defined(ESOCKTNOSUPPORT)
323# define ESOCKTNOSUPPORT 124 /* Socket type not supported */
324#endif
325#if ! defined(ESTALE)
326# define ESTALE 125 /* Unknown error */
327#endif
328#if ! defined(ENOTCONN)
329# define ENOTCONN 126 /* Socket is not connected */
330#endif
331#if ! defined(ETOOMANYREFS)
332# define ETOOMANYREFS 127 /* Too many references: cannot splice */
333#endif
334#if ! defined(ENOTSOCK)
335# define ENOTSOCK 128 /* Socket operation on non-socket */
336#endif
337#if ! defined(ENOTSUP)
338# define ENOTSUP 129 /* Not supported */
339#endif
340#if ! defined(EOPNOTSUPP)
341# define EOPNOTSUPP 130 /* Operation not supported on transport endpoint */
342#endif
343#if ! defined(EUSERS)
344# define EUSERS 131 /* Too many users */
345#endif
346#if ! defined(EOVERFLOW)
347# define EOVERFLOW 132 /* Value too large for defined data type */
348#endif
349#if ! defined(EOWNERDEAD)
350# define EOWNERDEAD 133 /* Unknown error */
351#endif
352#if ! defined(EPROTO)
353# define EPROTO 134 /* Protocol error */
354#endif
355#if ! defined(EPROTONOSUPPORT)
356# define EPROTONOSUPPORT 135 /* Unknown protocol */
357#endif
358#if ! defined(EPROTOTYPE)
359# define EPROTOTYPE 136 /* Protocol wrong type for socket */
360#endif
361#if ! defined(ECASECLASH)
362# define ECASECLASH 137 /* Filename exists with different case */
363#endif
364#if ! defined(ETIMEDOUT)
365/* Make sure it's the same as WSATIMEDOUT */
366# define ETIMEDOUT 138 /* Connection timed out */
367#endif
368#if ! defined(EWOULDBLOCK) || EWOULDBLOCK == 140
369# undef EWOULDBLOCK /* MinGW-w64 defines it as 140, but we want it as EAGAIN */
370# define EWOULDBLOCK EAGAIN /* Operation would block */
371#endif
372
373#undef HOST_NOT_FOUND
374#define HOST_NOT_FOUND 1
375#undef TRY_AGAIN
376#define TRY_AGAIN 2
377#undef NO_RECOVERY
378#define NO_RECOVERY 3
379#undef NO_ADDRESS
380#define NO_ADDRESS 4
381
382#define PROT_READ 0x1
383#define PROT_WRITE 0x2
384#define MAP_SHARED 0x1
385#define MAP_PRIVATE 0x2 /* unsupported */
386#define MAP_FIXED 0x10
387#define MAP_ANONYMOUS 0x20 /* unsupported */
388#define MAP_FAILED ((void *) -1)
389
390#define MS_ASYNC 1 /* sync memory asynchronously */
391#define MS_INVALIDATE 2 /* invalidate the caches */
392#define MS_SYNC 4 /* synchronous memory sync */
393
394struct statfs
395{
396 long f_type; /* type of filesystem (see below) */
397 long f_bsize; /* optimal transfer block size */
398 long f_blocks; /* total data blocks in file system */
399 long f_bfree; /* free blocks in fs */
400 long f_bavail; /* free blocks avail to non-superuser */
401 long f_files; /* total file nodes in file system */
402 long f_ffree; /* free file nodes in fs */
403 long f_fsid; /* file system id */
404 long f_namelen; /* maximum length of filenames */
405 long f_spare[6]; /* spare for later */
406};
407#define sleep(secs) (Sleep (secs * 1000))
408
409/*********************** statfs *****************************/
410/* fake block size */
411#define FAKED_BLOCK_SIZE 512
412
413/* linux-compatible values for fs type */
414#define MSDOS_SUPER_MAGIC 0x4d44
415#define NTFS_SUPER_MAGIC 0x5346544E
416
417/*********************** End of statfs ***********************/
418
419#define SHUT_RDWR SD_BOTH
420
421/* Operations for flock() */
422#define LOCK_SH 1 /* shared lock */
423#define LOCK_EX 2 /* exclusive lock */
424#define LOCK_NB 4 /* or'd with one of the above to prevent
425 blocking */
426#define LOCK_UN 8 /* remove lock */
427
428/* Not supported under MinGW */
429#ifndef S_IRGRP
430#define S_IRGRP 0
431#endif
432#ifndef S_IWGRP
433#define S_IWGRP 0
434#endif
435#ifndef S_IROTH
436#define S_IROTH 0
437#endif
438#ifndef S_IXGRP
439#define S_IXGRP 0
440#endif
441#ifndef S_IWOTH
442#define S_IWOTH 0
443#endif
444#ifndef S_IXOTH
445#define S_IXOTH 0
446#endif
447#ifndef S_ISUID
448#define S_ISUID 0
449#endif
450#ifndef S_ISGID
451#define S_ISGID 0
452#endif
453#ifndef S_ISVTX
454#define S_ISVTX 0
455#endif
456#ifndef S_IRWXG
457#define S_IRWXG 0
458#endif
459#ifndef S_IRWXO
460#define S_IRWXO 0
461#endif
462
463#define SHUT_WR SD_SEND
464#define SHUT_RD SD_RECEIVE
465#define SHUT_RDWR SD_BOTH
466
467#define SIGKILL 9
468#define SIGTERM 15
469
470#define SetErrnoFromWinError(e) _SetErrnoFromWinError (e, __FILE__, __LINE__)
471
472BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest);
473
474BOOL _plibc_CreateShortcutW (const wchar_t *pwszSrc, const wchar_t *pwszDest);
475
476BOOL _plibc_DereferenceShortcut (char *pszShortcut);
477
478BOOL _plibc_DereferenceShortcutW (wchar_t *pwszShortcut);
479
480char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags);
481
482wchar_t *plibc_ChooseDirW (wchar_t *pwszTitle, unsigned long ulFlags);
483
484char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags);
485
486wchar_t *plibc_ChooseFileW (wchar_t *pwszTitle, unsigned long ulFlags);
487
488long QueryRegistry (HKEY hMainKey, const char *pszKey, const char *pszSubKey,
489 char *pszBuffer, long *pdLength);
490
491long QueryRegistryW (HKEY hMainKey, const wchar_t *pszKey, const
492 wchar_t *pszSubKey,
493 wchar_t *pszBuffer, long *pdLength);
494
495BOOL __win_IsHandleMarkedAsBlocking (int hHandle);
496
497void __win_SetHandleBlockingMode (int s, BOOL bBlocking);
498
499void __win_DiscardHandleBlockingMode (int s);
500
501int _win_isSocketValid (int s);
502
503int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows);
504
505int plibc_conv_to_win_pathw (const wchar_t *pszUnix, wchar_t *pwszWindows);
506
507int plibc_conv_to_win_pathwconv (const char *pszUnix, wchar_t *pwszWindows);
508
509int plibc_conv_to_win_pathwconv_ex (const char *pszUnix, wchar_t *pszWindows,
510 int derefLinks);
511
512unsigned plibc_get_handle_count ();
513
514typedef void (*TPanicProc) (int, char *);
515void plibc_set_panic_proc (TPanicProc proc);
516
517void plibc_set_stat_size_size (int iLength);
518
519void plibc_set_stat_time_size (int iLength);
520
521int flock (int fd, int operation);
522
523int fsync (int fildes);
524
525int inet_pton (int af, const char *src, void *dst);
526
527int inet_pton4 (const char *src, u_char *dst, int pton);
528
529#if USE_IPV6
530int inet_pton6 (const char *src, u_char *dst);
531
532#endif
533int statfs (const char *path, struct statfs *buf);
534
535const char *hstrerror (int err);
536
537int mkstemp (char *tmplate);
538
539char *strptime (const char *buf, const char *format, struct tm *tm);
540
541const char *inet_ntop (int af, const void *src, char *dst, size_t size);
542
543#ifndef gmtime_r
544struct tm *gmtime_r (const time_t *clock, struct tm *result);
545
546#endif
547
548int plibc_init (char *pszOrg, char *pszApp);
549
550int plibc_init_utf8 (char *pszOrg, char *pszApp, int utf8_mode);
551
552void plibc_shutdown ();
553
554int plibc_initialized ();
555
556void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine);
557
558void SetErrnoFromWinsockError (long lWinError);
559
560void SetHErrnoFromWinError (long lWinError);
561
562void SetErrnoFromHRESULT (HRESULT hRes);
563
564int GetErrnoFromWinsockError (long lWinError);
565
566FILE *_win_fopen (const char *filename, const char *mode);
567
568int _win_fclose (FILE *);
569
570DIR *_win_opendir (const char *dirname);
571
572struct dirent *_win_readdir (DIR *dirp);
573
574int _win_closedir (DIR *dirp);
575
576int _win_open (const char *filename, int oflag, ...);
577
578#ifdef ENABLE_NLS
579char *_win_bindtextdomain (const char *domainname, const char *dirname);
580
581#endif
582int _win_chdir (const char *path);
583
584int _win_close (int fd);
585
586int _win_creat (const char *path, mode_t mode);
587
588char *_win_ctime (const time_t *clock);
589
590char *_win_ctime_r (const time_t *clock, char *buf);
591
592int _win_fstat (int handle, struct stat *buffer);
593
594int _win_ftruncate (int fildes, off_t length);
595
596int _win_truncate (const char *fname, int distance);
597
598int _win_kill (pid_t pid, int sig);
599
600int _win_pipe (int *phandles);
601
602int _win_mkfifo (const char *path, mode_t mode);
603
604int _win_rmdir (const char *path);
605
606int _win_access (const char *path, int mode);
607
608int _win_chmod (const char *filename, int pmode);
609
610char *realpath (const char *file_name, char *resolved_name);
611
612long _win_random (void);
613
614void _win_srandom (unsigned int seed);
615
616int _win_remove (const char *path);
617
618int _win_rename (const char *oldname, const char *newname);
619
620int _win_stat (const char *path, struct stat *buffer);
621
622int _win_stati64 (const char *path, struct _stati64 *buffer);
623
624long _win_sysconf (int name);
625
626int _win_unlink (const char *filename);
627
628int _win_write (int fildes, const void *buf, size_t nbyte);
629
630int _win_read (int fildes, void *buf, size_t nbyte);
631
632size_t _win_fwrite (const void *buffer, size_t size, size_t count,
633 FILE *stream);
634
635size_t _win_fread (void *buffer, size_t size, size_t count, FILE *stream);
636
637int _win_symlink (const char *path1, const char *path2);
638
639void *_win_mmap (void *start, size_t len, int access, int flags, int fd,
640 unsigned long long offset);
641
642int _win_msync (void *start, size_t length, int flags);
643
644int _win_munmap (void *start, size_t length);
645
646int _win_lstat (const char *path, struct stat *buf);
647
648int _win_lstati64 (const char *path, struct _stati64 *buf);
649
650int _win_readlink (const char *path, char *buf, size_t bufsize);
651
652int _win_accept (int s, struct sockaddr *addr, int *addrlen);
653
654pid_t _win_waitpid (pid_t pid, int *stat_loc, int options);
655
656int _win_bind (int s, const struct sockaddr *name, int namelen);
657
658int _win_connect (int s,const struct sockaddr *name, int namelen);
659
660int _win_getpeername (int s, struct sockaddr *name,
661 int *namelen);
662
663int _win_getsockname (int s, struct sockaddr *name,
664 int *namelen);
665
666int _win_getsockopt (int s, int level, int optname, char *optval,
667 int *optlen);
668
669int _win_listen (int s, int backlog);
670
671int _win_recv (int s, char *buf, int len, int flags);
672
673int _win_recvfrom (int s, void *buf, int len, int flags,
674 struct sockaddr *from, int *fromlen);
675
676int _win_select (int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds,
677 const struct timeval *tv);
678
679int _win_send (int s, const char *buf, int len, int flags);
680
681int _win_sendto (int s, const char *buf, int len, int flags,
682 const struct sockaddr *to, int tolen);
683
684int _win_setsockopt (int s, int level, int optname, const void *optval,
685 int optlen);
686
687int _win_shutdown (int s, int how);
688
689int _win_socket (int af, int type, int protocol);
690
691int _win_socketpair (int af, int type, int protocol, int socket_vector[2]);
692
693struct hostent *_win_gethostbyaddr (const char *addr, int len, int type);
694
695struct hostent *_win_gethostbyname (const char *name);
696
697struct hostent *gethostbyname2 (const char *name, int af);
698
699char *_win_strerror (int errnum);
700
701int IsWinNT ();
702
703char *index (const char *s, int c);
704
705char *_win_strtok_r (char *ptr, const char *sep, char **end);
706
707#if ! HAVE_STRNDUP
708char *strndup (const char *s, size_t n);
709
710#endif
711#if ! HAVE_STRNLEN && (! defined(__MINGW64_VERSION_MAJOR) || \
712 ! defined(_INC_STRING))
713size_t strnlen (const char *str, size_t maxlen);
714
715#endif
716char *stpcpy (char *dest, const char *src);
717
718char *strcasestr (const char *haystack_start, const char *needle_start);
719
720#ifndef __MINGW64_VERSION_MAJOR
721#define strcasecmp(a, b) stricmp (a, b)
722#define strncasecmp(a, b, c) strnicmp (a, b, c)
723#endif
724#ifndef wcscasecmp
725#define wcscasecmp(a, b) wcsicmp (a, b)
726#endif
727#ifndef wcsncasecmp
728#define wcsncasecmp(a, b, c) wcsnicmp (a, b, c)
729#endif
730#ifndef strtok_r /* winpthreads defines it in pthread.h */
731#define strtok_r _win_strtok_r
732#endif
733#endif /* WINDOWS */
734
735#ifndef WINDOWS
736 #define DIR_SEPARATOR '/'
737 #define DIR_SEPARATOR_STR "/"
738 #define PATH_SEPARATOR ':'
739 #define PATH_SEPARATOR_STR ":"
740 #define NEWLINE "\n"
741
742#ifdef ENABLE_NLS
743 #define BINDTEXTDOMAIN(d, n) bindtextdomain (d, n)
744#endif
745 #define CREAT(p, m) creat (p, m)
746 #define PLIBC_CTIME(c) ctime (c)
747 #define CTIME_R(c, b) ctime_r (c, b)
748 #undef FOPEN
749 #define FOPEN(f, m) fopen (f, m)
750 #define FCLOSE(f) fclose (f)
751 #define FTRUNCATE(f, l) ftruncate (f, l)
752 #define TRUNCATE(f, l) truncate (f, l)
753 #define OPENDIR(d) opendir (d)
754 #define CLOSEDIR(d) closedir (d)
755 #define READDIR(d) readdir (d)
756 #define OPEN open
757 #define CHDIR(d) chdir (d)
758 #define CLOSE(f) close (f)
759 #define LSEEK(f, o, w) lseek (f, o, w)
760 #define RMDIR(f) rmdir (f)
761 #define ACCESS(p, m) access (p, m)
762 #define CHMOD(f, p) chmod (f, p)
763 #define FSTAT(h, b) fstat (h, b)
764 #define PLIBC_KILL(p, s) kill (p, s)
765 #define PIPE(h) pipe (h)
766 #define REMOVE(p) remove (p)
767 #define RENAME(o, n) rename (o, n)
768 #define STAT(p, b) stat (p, b)
769 #define STAT64(p, b) stat64 (p, b)
770 #define SYSCONF(n) sysconf (n)
771 #define UNLINK(f) unlink (f)
772 #define WRITE(f, b, n) write (f, b, n)
773 #define READ(f, b, n) read (f, b, n)
774 #define GN_FREAD(b, s, c, f) fread (b, s, c, f)
775 #define GN_FWRITE(b, s, c, f) fwrite (b, s, c, f)
776 #define SYMLINK(a, b) symlink (a, b)
777 #define MMAP(s, l, p, f, d, o) mmap (s, l, p, f, d, o)
778 #define MKFIFO(p, m) mkfifo (p, m)
779 #define MSYNC(s, l, f) msync (s, l, f)
780 #define MUNMAP(s, l) munmap (s, l)
781 #define STRERROR(i) strerror (i)
782 #define RANDOM() random ()
783 #define SRANDOM(s) srandom (s)
784 #define READLINK(p, b, s) readlink (p, b, s)
785 #define LSTAT(p, b) lstat (p, b)
786 #define LSTAT64(p, b) lstat64 (p, b)
787 #define PRINTF printf
788 #define FPRINTF fprintf
789 #define VPRINTF(f, a) vprintf (f, a)
790 #define VFPRINTF(s, f, a) vfprintf (s, f, a)
791 #define VSPRINTF(d, f, a) vsprintf (d, f, a)
792 #define VSNPRINTF(str, size, fmt, a) vsnprintf (str, size, fmt, a)
793 #define _REAL_SNPRINTF snprintf
794 #define SPRINTF sprintf
795 #define VSSCANF(s, f, a) vsscanf (s, f, a)
796 #define SSCANF sscanf
797 #define VFSCANF(s, f, a) vfscanf (s, f, a)
798 #define VSCANF(f, a) vscanf (f, a)
799 #define SCANF scanf
800 #define FSCANF fscanf
801 #define WAITPID(p, s, o) waitpid (p, s, o)
802 #define ACCEPT(s, a, l) accept (s, a, l)
803 #define BIND(s, n, l) bind (s, n, l)
804 #define CONNECT(s, n, l) connect (s, n, l)
805 #define GETPEERNAME(s, n, l) getpeername (s, n, l)
806 #define GETSOCKNAME(s, n, l) getsockname (s, n, l)
807 #define GETSOCKOPT(s, l, o, v, p) getsockopt (s, l, o, v, p)
808 #define LISTEN(s, b) listen (s, b)
809 #define RECV(s, b, l, f) recv (s, b, l, f)
810 #define RECVFROM(s, b, l, f, r, o) recvfrom (s, b, l, f, r, o)
811 #define SELECT(n, r, w, e, t) select (n, r, w, e, t)
812 #define SEND(s, b, l, f) send (s, b, l, f)
813 #define SENDTO(s, b, l, f, o, n) sendto (s, b, l, f, o, n)
814 #define SETSOCKOPT(s, l, o, v, n) setsockopt (s, l, o, v, n)
815 #define SHUTDOWN(s, h) shutdown (s, h)
816 #define SOCKET(a, t, p) socket (a, t, p)
817 #define SOCKETPAIR(a, t, p, v) socketpair (a, t, p, v)
818 #define GETHOSTBYADDR(a, l, t) gethostbyaddr (a, l, t)
819 #define GETHOSTBYNAME(n) gethostbyname (n)
820 #define GETTIMEOFDAY(t, n) gettimeofday (t, n)
821 #define INSQUE(e, p) insque (e, p)
822 #define REMQUE(e) remque (e)
823 #define HSEARCH(i, a) hsearch (i, a)
824 #define HCREATE(n) hcreate (n)
825 #define HDESTROY() hdestroy ()
826 #define HSEARCH_R(i, a, r, h) hsearch_r (i, a, r, h)
827 #define HCREATE_R(n, h) hcreate_r (n, h)
828 #define HDESTROY_R(h) hdestroy_r (h)
829 #define TSEARCH(k, r, c) tsearch (k, r, c)
830 #define TFIND(k, r, c) tfind (k, r, c)
831 #define TDELETE(k, r, c) tdelete (k, r, c)
832 #define TWALK(r, a) twalk (r, a)
833 #define TDESTROY(r, f) tdestroy (r, f)
834 #define LFIND(k, b, n, s, c) lfind (k, b, n, s, c)
835 #define LSEARCH(k, b, n, s, c) lsearch (k, b, n, s, c)
836 #define STRUCT_STAT64 struct stat64
837#else
838 #define DIR_SEPARATOR '\\'
839 #define DIR_SEPARATOR_STR "\\"
840 #define PATH_SEPARATOR ';'
841 #define PATH_SEPARATOR_STR ";"
842 #define NEWLINE "\r\n"
843
844#ifdef ENABLE_NLS
845 #define BINDTEXTDOMAIN(d, n) _win_bindtextdomain (d, n)
846#endif
847 #define CREAT(p, m) _win_creat (p, m)
848 #define PLIBC_CTIME(c) _win_ctime (c)
849 #define CTIME_R(c, b) _win_ctime_r (c, b)
850 #define FOPEN(f, m) _win_fopen (f, m)
851 #define FCLOSE(f) _win_fclose (f)
852 #define FTRUNCATE(f, l) _win_ftruncate (f, l)
853 #define TRUNCATE(f, l) _win_truncate (f, l)
854 #define OPENDIR(d) _win_opendir (d)
855 #define CLOSEDIR(d) _win_closedir (d)
856 #define READDIR(d) _win_readdir (d)
857 #define OPEN _win_open
858 #define CHDIR(d) _win_chdir (d)
859 #define CLOSE(f) _win_close (f)
860 #define PLIBC_KILL(p, s) _win_kill (p, s)
861 #define LSEEK(f, o, w) lseek (f, o, w)
862 #define FSTAT(h, b) _win_fstat (h, b)
863 #define RMDIR(f) _win_rmdir (f)
864 #define ACCESS(p, m) _win_access (p, m)
865 #define CHMOD(f, p) _win_chmod (f, p)
866 #define PIPE(h) _win_pipe (h)
867 #define RANDOM() _win_random ()
868 #define SRANDOM(s) _win_srandom (s)
869 #define REMOVE(p) _win_remove (p)
870 #define RENAME(o, n) _win_rename (o, n)
871 #define STAT(p, b) _win_stat (p, b)
872 #define STAT64(p, b) _win_stati64 (p, b)
873 #define SYSCONF(n) _win_sysconf (n)
874 #define UNLINK(f) _win_unlink (f)
875 #define WRITE(f, b, n) _win_write (f, b, n)
876 #define READ(f, b, n) _win_read (f, b, n)
877 #define GN_FREAD(b, s, c, f) _win_fread (b, s, c, f)
878 #define GN_FWRITE(b, s, c, f) _win_fwrite (b, s, c, f)
879 #define SYMLINK(a, b) _win_symlink (a, b)
880 #define MMAP(s, l, p, f, d, o) _win_mmap (s, l, p, f, d, o)
881 #define MKFIFO(p, m) _win_mkfifo (p, m)
882 #define MSYNC(s, l, f) _win_msync (s, l, f)
883 #define MUNMAP(s, l) _win_munmap (s, l)
884 #define STRERROR(i) _win_strerror (i)
885 #define READLINK(p, b, s) _win_readlink (p, b, s)
886 #define LSTAT(p, b) _win_lstat (p, b)
887 #define LSTAT64(p, b) _win_lstati64 (p, b)
888 #define PRINTF printf
889 #define FPRINTF fprintf
890 #define VPRINTF(f, a) vprintf (f, a)
891 #define VFPRINTF(s, f, a) vfprintf (s, f, a)
892 #define VSPRINTF(d, f, a) vsprintf (d, f, a)
893 #define VSNPRINTF(str, size, fmt, a) vsnprintf (str, size, fmt, a)
894 #define _REAL_SNPRINTF snprintf
895 #define SPRINTF sprintf
896 #define VSSCANF(s, f, a) vsscanf (s, f, a)
897 #define SSCANF sscanf
898 #define VFSCANF(s, f, a) vfscanf (s, f, a)
899 #define VSCANF(f, a) vscanf (f, a)
900 #define SCANF scanf
901 #define FSCANF fscanf
902 #define WAITPID(p, s, o) _win_waitpid (p, s, o)
903 #define ACCEPT(s, a, l) _win_accept (s, a, l)
904 #define BIND(s, n, l) _win_bind (s, n, l)
905 #define CONNECT(s, n, l) _win_connect (s, n, l)
906 #define GETPEERNAME(s, n, l) _win_getpeername (s, n, l)
907 #define GETSOCKNAME(s, n, l) _win_getsockname (s, n, l)
908 #define GETSOCKOPT(s, l, o, v, p) _win_getsockopt (s, l, o, v, p)
909 #define LISTEN(s, b) _win_listen (s, b)
910 #define RECV(s, b, l, f) _win_recv (s, b, l, f)
911 #define RECVFROM(s, b, l, f, r, o) _win_recvfrom (s, b, l, f, r, o)
912 #define SELECT(n, r, w, e, t) _win_select (n, r, w, e, t)
913 #define SEND(s, b, l, f) _win_send (s, b, l, f)
914 #define SENDTO(s, b, l, f, o, n) _win_sendto (s, b, l, f, o, n)
915 #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt (s, l, o, v, n)
916 #define SHUTDOWN(s, h) _win_shutdown (s, h)
917 #define SOCKET(a, t, p) _win_socket (a, t, p)
918 #define SOCKETPAIR(a, t, p, v) _win_socketpair (a, t, p, v)
919 #define GETHOSTBYADDR(a, l, t) _win_gethostbyaddr (a, l, t)
920 #define GETHOSTBYNAME(n) _win_gethostbyname (n)
921 #define GETTIMEOFDAY(t, n) gettimeofday (t, n)
922 #define INSQUE(e, p) _win_insque (e, p)
923 #define REMQUE(e) _win_remque (e)
924 #define HSEARCH(i, a) _win_hsearch (i, a)
925 #define HCREATE(n) _win_hcreate (n)
926 #define HDESTROY() _win_hdestroy ()
927 #define HSEARCH_R(i, a, r, h) _win_hsearch_r (i, a, r, h)
928 #define HCREATE_R(n, h) _win_hcreate_r (n, h)
929 #define HDESTROY_R(h) _win_hdestroy_r (h)
930 #define TSEARCH(k, r, c) _win_tsearch (k, r, c)
931 #define TFIND(k, r, c) _win_tfind (k, r, c)
932 #define TDELETE(k, r, c) _win_tdelete (k, r, c)
933 #define TWALK(r, a) _win_twalk (r, a)
934 #define TDESTROY(r, f) _win_tdestroy (r, f)
935 #define LFIND(k, b, n, s, c) _win_lfind (k, b, n, s, c)
936 #define LSEARCH(k, b, n, s, c) _win_lsearch (k, b, n, s, c)
937 #define STRUCT_STAT64 struct _stati64
938#endif
939
940/* search.h */
941
942/* Prototype structure for a linked-list data structure.
943 This is the type used by the `insque' and `remque' functions. */
944
945struct PLIBC_SEARCH_QELEM
946{
947 struct qelem *q_forw;
948 struct qelem *q_back;
949 char q_data[1];
950};
951
952
953/* Insert ELEM into a doubly-linked list, after PREV. */
954void _win_insque (void *__elem, void *__prev);
955
956/* Unlink ELEM from the doubly-linked list that it is in. */
957void _win_remque (void *__elem);
958
959
960/* For use with hsearch(3). */
961typedef int (*PLIBC_SEARCH__compar_fn_t) (__const void *, __const void *);
962
963typedef PLIBC_SEARCH__compar_fn_t _win_comparison_fn_t;
964
965/* Action which shall be performed in the call the hsearch. */
966typedef enum
967{
968 PLIBC_SEARCH_FIND,
969 PLIBC_SEARCH_ENTER
970}
971PLIBC_SEARCH_ACTION;
972
973typedef struct PLIBC_SEARCH_entry
974{
975 char *key;
976 void *data;
977}
978PLIBC_SEARCH_ENTRY;
979
980/* The reentrant version has no static variables to maintain the state.
981 Instead the interface of all functions is extended to take an argument
982 which describes the current status. */
983typedef struct _PLIBC_SEARCH_ENTRY
984{
985 unsigned int used;
986 PLIBC_SEARCH_ENTRY entry;
987}
988_PLIBC_SEARCH_ENTRY;
989
990
991/* Family of hash table handling functions. The functions also
992 have reentrant counterparts ending with _r. The non-reentrant
993 functions all work on a signle internal hashing table. */
994
995/* Search for entry matching ITEM.key in internal hash table. If
996 ACTION is `FIND' return found entry or signal error by returning
997 NULL. If ACTION is `ENTER' replace existing data (if any) with
998 ITEM.data. */
999PLIBC_SEARCH_ENTRY *_win_hsearch (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION
1000 __action);
1001
1002/* Create a new hashing table which will at most contain NEL elements. */
1003int _win_hcreate (size_t __nel);
1004
1005/* Destroy current internal hashing table. */
1006void _win_hdestroy (void);
1007
1008/* Data type for reentrant functions. */
1009struct PLIBC_SEARCH_hsearch_data
1010{
1011 struct _PLIBC_SEARCH_ENTRY *table;
1012 unsigned int size;
1013 unsigned int filled;
1014};
1015
1016/* Reentrant versions which can handle multiple hashing tables at the
1017 same time. */
1018int _win_hsearch_r (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action,
1019 PLIBC_SEARCH_ENTRY **__retval,
1020 struct PLIBC_SEARCH_hsearch_data *__htab);
1021
1022int _win_hcreate_r (size_t __nel, struct PLIBC_SEARCH_hsearch_data *__htab);
1023
1024void _win_hdestroy_r (struct PLIBC_SEARCH_hsearch_data *__htab);
1025
1026
1027/* The tsearch routines are very interesting. They make many
1028 assumptions about the compiler. It assumes that the first field
1029 in node must be the "key" field, which points to the datum.
1030 Everything depends on that. */
1031/* For tsearch */
1032typedef enum
1033{
1034 PLIBC_SEARCH_preorder,
1035 PLIBC_SEARCH_postorder,
1036 PLIBC_SEARCH_endorder,
1037 PLIBC_SEARCH_leaf
1038}
1039PLIBC_SEARCH_VISIT;
1040
1041/* Search for an entry matching the given KEY in the tree pointed to
1042 by *ROOTP and insert a new element if not found. */
1043void *_win_tsearch (__const void *__key, void **__rootp,
1044 PLIBC_SEARCH__compar_fn_t __compar);
1045
1046/* Search for an entry matching the given KEY in the tree pointed to
1047 by *ROOTP. If no matching entry is available return NULL. */
1048void *_win_tfind (__const void *__key, void *__const *__rootp,
1049 PLIBC_SEARCH__compar_fn_t __compar);
1050
1051/* Remove the element matching KEY from the tree pointed to by *ROOTP. */
1052void *_win_tdelete (__const void *__restrict __key,
1053 void **__restrict __rootp,
1054 PLIBC_SEARCH__compar_fn_t __compar);
1055
1056typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep,
1057 PLIBC_SEARCH_VISIT __value,
1058 int __level);
1059
1060/* Walk through the whole tree and call the ACTION callback for every node
1061 or leaf. */
1062void _win_twalk (__const void *__root, PLIBC_SEARCH__action_fn_t __action);
1063
1064/* Callback type for function to free a tree node. If the keys are atomic
1065 data this function should do nothing. */
1066typedef void (*PLIBC_SEARCH__free_fn_t) (void *__nodep);
1067
1068/* Destroy the whole tree, call FREEFCT for each node or leaf. */
1069void _win_tdestroy (void *__root, PLIBC_SEARCH__free_fn_t __freefct);
1070
1071
1072/* Perform linear search for KEY by comparing by COMPAR in an array
1073 [BASE,BASE+NMEMB*SIZE). */
1074void *_win_lfind (__const void *__key, __const void *__base,
1075 size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t
1076 __compar);
1077
1078/* Perform linear search for KEY by comparing by COMPAR function in
1079 array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */
1080void *_win_lsearch (__const void *__key, void *__base,
1081 size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t
1082 __compar);
1083
1084
1085#ifdef __cplusplus
1086}
1087#endif
1088
1089
1090#endif // _PLIBC_H_
1091
1092/* end of plibc.h */
diff --git a/src/main/extract.c b/src/main/extract.c
index 144f2c3..5efc53a 100644
--- a/src/main/extract.c
+++ b/src/main/extract.c
@@ -70,7 +70,7 @@ ignore_sigpipe ()
70 sig.sa_flags = SA_RESTART; 70 sig.sa_flags = SA_RESTART;
71#endif 71#endif
72 if (0 != sigaction (SIGPIPE, &sig, &oldsig)) 72 if (0 != sigaction (SIGPIPE, &sig, &oldsig))
73 FPRINTF (stderr, 73 fprintf (stderr,
74 "Failed to install SIGPIPE handler: %s\n", strerror (errno)); 74 "Failed to install SIGPIPE handler: %s\n", strerror (errno));
75} 75}
76 76
@@ -290,7 +290,7 @@ print_selected_keywords (void *cls,
290 if (YES != print[type]) 290 if (YES != print[type])
291 return 0; 291 return 0;
292 if (verbose > 3) 292 if (verbose > 3)
293 FPRINTF (stdout, 293 fprintf (stdout,
294 _ ("Found by `%s' plugin:\n"), 294 _ ("Found by `%s' plugin:\n"),
295 plugin_name); 295 plugin_name);
296 mt = EXTRACTOR_metatype_to_string (type); 296 mt = EXTRACTOR_metatype_to_string (type);
@@ -298,7 +298,7 @@ print_selected_keywords (void *cls,
298 switch (format) 298 switch (format)
299 { 299 {
300 case EXTRACTOR_METAFORMAT_UNKNOWN: 300 case EXTRACTOR_METAFORMAT_UNKNOWN:
301 FPRINTF (stdout, 301 fprintf (stdout,
302 _ ("%s - (unknown, %u bytes)\n"), 302 _ ("%s - (unknown, %u bytes)\n"),
303 stype, 303 stype,
304 (unsigned int) data_len); 304 (unsigned int) data_len);
@@ -317,7 +317,7 @@ print_selected_keywords (void *cls,
317 keyword = strdup (data); 317 keyword = strdup (data);
318 if (NULL != keyword) 318 if (NULL != keyword)
319 { 319 {
320 FPRINTF (stdout, 320 fprintf (stdout,
321 "%s - %s\n", 321 "%s - %s\n",
322 stype, 322 stype,
323 keyword); 323 keyword);
@@ -329,13 +329,13 @@ print_selected_keywords (void *cls,
329#endif 329#endif
330 break; 330 break;
331 case EXTRACTOR_METAFORMAT_BINARY: 331 case EXTRACTOR_METAFORMAT_BINARY:
332 FPRINTF (stdout, 332 fprintf (stdout,
333 _ ("%s - (binary, %u bytes)\n"), 333 _ ("%s - (binary, %u bytes)\n"),
334 stype, 334 stype,
335 (unsigned int) data_len); 335 (unsigned int) data_len);
336 break; 336 break;
337 case EXTRACTOR_METAFORMAT_C_STRING: 337 case EXTRACTOR_METAFORMAT_C_STRING:
338 FPRINTF (stdout, 338 fprintf (stdout,
339 "%s - %.*s\n", 339 "%s - %.*s\n",
340 stype, 340 stype,
341 (int) data_len, 341 (int) data_len,
@@ -392,7 +392,7 @@ print_selected_keywords_grep_friendly (void *cls,
392 if (0 == data_len) 392 if (0 == data_len)
393 return 0; 393 return 0;
394 if (verbose > 1) 394 if (verbose > 1)
395 FPRINTF (stdout, 395 fprintf (stdout,
396 "%s: ", 396 "%s: ",
397 gettext (mt)); 397 gettext (mt));
398#if HAVE_ICONV 398#if HAVE_ICONV
@@ -406,7 +406,7 @@ print_selected_keywords_grep_friendly (void *cls,
406 keyword = strdup (data); 406 keyword = strdup (data);
407 if (NULL != keyword) 407 if (NULL != keyword)
408 { 408 {
409 FPRINTF (stdout, 409 fprintf (stdout,
410 "`%s' ", 410 "`%s' ",
411 keyword); 411 keyword);
412 free (keyword); 412 free (keyword);
@@ -420,10 +420,10 @@ print_selected_keywords_grep_friendly (void *cls,
420 break; 420 break;
421 case EXTRACTOR_METAFORMAT_C_STRING: 421 case EXTRACTOR_METAFORMAT_C_STRING:
422 if (verbose > 1) 422 if (verbose > 1)
423 FPRINTF (stdout, 423 fprintf (stdout,
424 "%s ", 424 "%s ",
425 gettext (mt)); 425 gettext (mt));
426 FPRINTF (stdout, 426 fprintf (stdout,
427 "`%s'", 427 "`%s'",
428 data); 428 data);
429 break; 429 break;
@@ -575,7 +575,7 @@ finish_bibtex (const char *fn)
575 if ( (NULL == btm[0].value) || 575 if ( (NULL == btm[0].value) ||
576 (NULL == btm[1].value) || 576 (NULL == btm[1].value) ||
577 (NULL == btm[2].value) ) 577 (NULL == btm[2].value) )
578 FPRINTF (stdout, 578 fprintf (stdout,
579 "@%s %s { ", 579 "@%s %s { ",
580 et, 580 et,
581 fn); 581 fn);
@@ -592,18 +592,18 @@ finish_bibtex (const char *fn)
592 temp[n] = '_'; 592 temp[n] = '_';
593 else 593 else
594 temp[n] = tolower ( (unsigned char) temp[n]); 594 temp[n] = tolower ( (unsigned char) temp[n]);
595 FPRINTF (stdout, 595 fprintf (stdout,
596 "@%s %s { ", 596 "@%s %s { ",
597 et, 597 et,
598 temp); 598 temp);
599 } 599 }
600 for (i = 0; NULL != btm[i].bibTexName; i++) 600 for (i = 0; NULL != btm[i].bibTexName; i++)
601 if (NULL != btm[i].value) 601 if (NULL != btm[i].value)
602 FPRINTF (stdout, 602 fprintf (stdout,
603 "\t%s = {%s},\n", 603 "\t%s = {%s},\n",
604 btm[i].bibTexName, 604 btm[i].bibTexName,
605 btm[i].value); 605 btm[i].value);
606 FPRINTF (stdout, "%s", "}\n\n"); 606 fprintf (stdout, "%s", "}\n\n");
607} 607}
608 608
609 609
@@ -775,7 +775,7 @@ main (int argc, char *argv[])
775#endif 775#endif
776 if (NULL == (print = malloc (sizeof (int) * EXTRACTOR_metatype_get_max ()))) 776 if (NULL == (print = malloc (sizeof (int) * EXTRACTOR_metatype_get_max ())))
777 { 777 {
778 FPRINTF (stderr, 778 fprintf (stderr,
779 "malloc failed: %s\n", 779 "malloc failed: %s\n",
780 strerror (errno)); 780 strerror (errno));
781 return 1; 781 return 1;
@@ -785,7 +785,7 @@ main (int argc, char *argv[])
785 785
786 if (0 != _get_utf8_args (argc, argv, &utf8_argc, &utf8_argv)) 786 if (0 != _get_utf8_args (argc, argv, &utf8_argc, &utf8_argv))
787 { 787 {
788 FPRINTF (stderr, "Failed to get arguments: %s\n", strerror (errno)); 788 fprintf (stderr, "Failed to get arguments: %s\n", strerror (errno));
789 return 1; 789 return 1;
790 } 790 }
791 791
@@ -821,7 +821,7 @@ main (int argc, char *argv[])
821 bibtex = YES; 821 bibtex = YES;
822 if (NULL != processor) 822 if (NULL != processor)
823 { 823 {
824 FPRINTF (stderr, 824 fprintf (stderr,
825 "%s", 825 "%s",
826 _ ( 826 _ (
827 "Illegal combination of options, cannot combine multiple styles of printing.\n")); 827 "Illegal combination of options, cannot combine multiple styles of printing.\n"));
@@ -834,7 +834,7 @@ main (int argc, char *argv[])
834 grepfriendly = YES; 834 grepfriendly = YES;
835 if (NULL != processor) 835 if (NULL != processor)
836 { 836 {
837 FPRINTF (stderr, 837 fprintf (stderr,
838 "%s", 838 "%s",
839 _ ( 839 _ (
840 "Illegal combination of options, cannot combine multiple styles of printing.\n")); 840 "Illegal combination of options, cannot combine multiple styles of printing.\n"));
@@ -869,7 +869,7 @@ main (int argc, char *argv[])
869 case 'p': 869 case 'p':
870 if (NULL == optarg) 870 if (NULL == optarg)
871 { 871 {
872 FPRINTF (stderr, 872 fprintf (stderr,
873 _ ( 873 _ (
874 "You must specify an argument for the `%s' option (option ignored).\n"), 874 "You must specify an argument for the `%s' option (option ignored).\n"),
875 "-p"); 875 "-p");
@@ -898,7 +898,7 @@ main (int argc, char *argv[])
898 } 898 }
899 if (NULL == EXTRACTOR_metatype_to_string (i)) 899 if (NULL == EXTRACTOR_metatype_to_string (i))
900 { 900 {
901 FPRINTF (stderr, 901 fprintf (stderr,
902 "Unknown keyword type `%s', use option `%s' to get a list.\n", 902 "Unknown keyword type `%s', use option `%s' to get a list.\n",
903 optarg, 903 optarg,
904 "-L"); 904 "-L");
@@ -929,7 +929,7 @@ main (int argc, char *argv[])
929 } 929 }
930 if (NULL == EXTRACTOR_metatype_to_string (i)) 930 if (NULL == EXTRACTOR_metatype_to_string (i))
931 { 931 {
932 FPRINTF (stderr, 932 fprintf (stderr,
933 "Unknown keyword type `%s', use option `%s' to get a list.\n", 933 "Unknown keyword type `%s', use option `%s' to get a list.\n",
934 optarg, 934 optarg,
935 "-L"); 935 "-L");
@@ -938,7 +938,7 @@ main (int argc, char *argv[])
938 } 938 }
939 break; 939 break;
940 default: 940 default:
941 FPRINTF (stderr, 941 fprintf (stderr,
942 "%s", 942 "%s",
943 _ ("Use --help to get a list of options.\n")); 943 _ ("Use --help to get a list of options.\n"));
944 free (utf8_argv); 944 free (utf8_argv);
@@ -947,7 +947,7 @@ main (int argc, char *argv[])
947 } /* while (1) */ 947 } /* while (1) */
948 if (optind < 0) 948 if (optind < 0)
949 { 949 {
950 FPRINTF (stderr, 950 fprintf (stderr,
951 "%s", "Unknown error parsing options\n"); 951 "%s", "Unknown error parsing options\n");
952 free (print); 952 free (print);
953 free (utf8_argv); 953 free (utf8_argv);
@@ -955,7 +955,7 @@ main (int argc, char *argv[])
955 } 955 }
956 if (utf8_argc - optind < 1) 956 if (utf8_argc - optind < 1)
957 { 957 {
958 FPRINTF (stderr, 958 fprintf (stderr,
959 "%s", "Invoke with list of filenames to extract keywords form!\n"); 959 "%s", "Invoke with list of filenames to extract keywords form!\n");
960 free (print); 960 free (print);
961 free (utf8_argv); 961 free (utf8_argv);
@@ -980,15 +980,15 @@ main (int argc, char *argv[])
980 980
981 /* extract keywords */ 981 /* extract keywords */
982 if (YES == bibtex) 982 if (YES == bibtex)
983 FPRINTF (stdout, 983 fprintf (stdout,
984 "%s", _ ("% BiBTeX file\n")); 984 "%s", _ ("% BiBTeX file\n"));
985 for (i = optind; i < utf8_argc; i++) 985 for (i = optind; i < utf8_argc; i++)
986 { 986 {
987 errno = 0; 987 errno = 0;
988 if (YES == grepfriendly) 988 if (YES == grepfriendly)
989 FPRINTF (stdout, "%s ", utf8_argv[i]); 989 fprintf (stdout, "%s ", utf8_argv[i]);
990 else if (NO == bibtex) 990 else if (NO == bibtex)
991 FPRINTF (stdout, 991 fprintf (stdout,
992 _ ("Keywords for file %s:\n"), 992 _ ("Keywords for file %s:\n"),
993 utf8_argv[i]); 993 utf8_argv[i]);
994 else 994 else
@@ -1003,15 +1003,15 @@ main (int argc, char *argv[])
1003 { 1003 {
1004 struct stat sb; 1004 struct stat sb;
1005 unsigned char *data = NULL; 1005 unsigned char *data = NULL;
1006 int f = OPEN (utf8_argv[i], O_RDONLY 1006 int f = open (utf8_argv[i], O_RDONLY
1007#if WINDOWS 1007#if WINDOWS
1008 | O_BINARY 1008 | O_BINARY
1009#endif 1009#endif
1010 ); 1010 );
1011 if ( (-1 != f) && 1011 if ( (-1 != f) &&
1012 (0 == FSTAT (f, &sb)) && 1012 (0 == fstat (f, &sb)) &&
1013 (NULL != (data = malloc ((size_t) sb.st_size))) && 1013 (NULL != (data = malloc ((size_t) sb.st_size))) &&
1014 (sb.st_size == READ (f, data, (size_t) sb.st_size) ) ) 1014 (sb.st_size == read (f, data, (size_t) sb.st_size) ) )
1015 { 1015 {
1016 EXTRACTOR_extract (plugins, 1016 EXTRACTOR_extract (plugins,
1017 NULL, 1017 NULL,
@@ -1022,7 +1022,7 @@ main (int argc, char *argv[])
1022 else 1022 else
1023 { 1023 {
1024 if (verbose > 0) 1024 if (verbose > 0)
1025 FPRINTF (stderr, 1025 fprintf (stderr,
1026 "%s: %s: %s\n", 1026 "%s: %s: %s\n",
1027 utf8_argv[0], utf8_argv[i], strerror (errno)); 1027 utf8_argv[0], utf8_argv[i], strerror (errno));
1028 ret = 1; 1028 ret = 1;
@@ -1030,18 +1030,18 @@ main (int argc, char *argv[])
1030 if (NULL != data) 1030 if (NULL != data)
1031 free (data); 1031 free (data);
1032 if (-1 != f) 1032 if (-1 != f)
1033 (void) CLOSE (f); 1033 (void) close (f);
1034 } 1034 }
1035 if (YES == grepfriendly) 1035 if (YES == grepfriendly)
1036 FPRINTF (stdout, "%s", "\n"); 1036 fprintf (stdout, "%s", "\n");
1037 continue; 1037 continue;
1038 } 1038 }
1039 if (YES == grepfriendly) 1039 if (YES == grepfriendly)
1040 FPRINTF (stdout, "%s", "\n"); 1040 fprintf (stdout, "%s", "\n");
1041 if (bibtex) 1041 if (bibtex)
1042 finish_bibtex (utf8_argv[i]); 1042 finish_bibtex (utf8_argv[i]);
1043 if (verbose > 0) 1043 if (verbose > 0)
1044 FPRINTF (stdout, "%s", "\n"); 1044 fprintf (stdout, "%s", "\n");
1045 free (print); 1045 free (print);
1046 free (utf8_argv); 1046 free (utf8_argv);
1047 EXTRACTOR_plugin_remove_all (plugins); 1047 EXTRACTOR_plugin_remove_all (plugins);
diff --git a/src/main/extractor.c b/src/main/extractor.c
index 89d734d..defa229 100644
--- a/src/main/extractor.c
+++ b/src/main/extractor.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include "platform.h" 21#include "platform.h"
22#include "plibc.h"
23#include "extractor.h" 22#include "extractor.h"
24#include <dirent.h> 23#include <dirent.h>
25#include <sys/types.h> 24#include <sys/types.h>
@@ -670,7 +669,7 @@ EXTRACTOR_ltdl_init ()
670 int err; 669 int err;
671 670
672#if ENABLE_NLS 671#if ENABLE_NLS
673 BINDTEXTDOMAIN (PACKAGE, LOCALEDIR); 672 bindtextdomain (PACKAGE, LOCALEDIR);
674#endif 673#endif
675 err = lt_dlinit (); 674 err = lt_dlinit ();
676 if (err > 0) 675 if (err > 0)
diff --git a/src/main/extractor_datasource.c b/src/main/extractor_datasource.c
index 0b18d7c..9f51d90 100644
--- a/src/main/extractor_datasource.c
+++ b/src/main/extractor_datasource.c
@@ -229,7 +229,7 @@ bfds_pick_next_buffer_at (struct BufferedFileDataSource *bfds,
229 bfds->buffer_pos = pos; 229 bfds->buffer_pos = pos;
230 return 0; 230 return 0;
231 } 231 }
232 position = (int64_t) LSEEK (bfds->fd, pos, SEEK_SET); 232 position = (int64_t) lseek (bfds->fd, pos, SEEK_SET);
233 if (position < 0) 233 if (position < 0)
234 { 234 {
235 LOG_STRERROR ("lseek"); 235 LOG_STRERROR ("lseek");
@@ -1214,38 +1214,38 @@ EXTRACTOR_datasource_create_from_file_ (const char *filename,
1214 winmode = O_BINARY; 1214 winmode = O_BINARY;
1215#endif 1215#endif
1216 1216
1217 if (-1 == (fd = OPEN (filename, O_RDONLY | O_LARGEFILE | winmode))) 1217 if (-1 == (fd = open (filename, O_RDONLY | O_LARGEFILE | winmode)))
1218 { 1218 {
1219 LOG_STRERROR_FILE ("open", filename); 1219 LOG_STRERROR_FILE ("open", filename);
1220 return NULL; 1220 return NULL;
1221 } 1221 }
1222 if ( (0 != FSTAT (fd, &sb)) || 1222 if ( (0 != fstat (fd, &sb)) ||
1223 (S_ISDIR (sb.st_mode)) ) 1223 (S_ISDIR (sb.st_mode)) )
1224 { 1224 {
1225 if (! S_ISDIR (sb.st_mode)) 1225 if (! S_ISDIR (sb.st_mode))
1226 LOG_STRERROR_FILE ("fstat", filename); 1226 LOG_STRERROR_FILE ("fstat", filename);
1227 else 1227 else
1228 LOG ("Skipping directory `%s'\n", filename); 1228 LOG ("Skipping directory `%s'\n", filename);
1229 (void) CLOSE (fd); 1229 (void) close (fd);
1230 return NULL; 1230 return NULL;
1231 } 1231 }
1232 fsize = (int64_t) sb.st_size; 1232 fsize = (int64_t) sb.st_size;
1233 if (0 == fsize) 1233 if (0 == fsize)
1234 { 1234 {
1235 (void) CLOSE (fd); 1235 (void) close (fd);
1236 return NULL; 1236 return NULL;
1237 } 1237 }
1238 bfds = bfds_new (NULL, fd, fsize); 1238 bfds = bfds_new (NULL, fd, fsize);
1239 if (NULL == bfds) 1239 if (NULL == bfds)
1240 { 1240 {
1241 (void) CLOSE (fd); 1241 (void) close (fd);
1242 return NULL; 1242 return NULL;
1243 } 1243 }
1244 if (NULL == (ds = malloc (sizeof (struct EXTRACTOR_Datasource)))) 1244 if (NULL == (ds = malloc (sizeof (struct EXTRACTOR_Datasource))))
1245 { 1245 {
1246 LOG_STRERROR ("malloc"); 1246 LOG_STRERROR ("malloc");
1247 bfds_delete (bfds); 1247 bfds_delete (bfds);
1248 (void) CLOSE (fd); 1248 (void) close (fd);
1249 return NULL; 1249 return NULL;
1250 } 1250 }
1251 ds->bfds = bfds; 1251 ds->bfds = bfds;
@@ -1261,7 +1261,7 @@ EXTRACTOR_datasource_create_from_file_ (const char *filename,
1261 LOG ("Failed to initialize decompressor\n"); 1261 LOG ("Failed to initialize decompressor\n");
1262 bfds_delete (bfds); 1262 bfds_delete (bfds);
1263 free (ds); 1263 free (ds);
1264 (void) CLOSE (fd); 1264 (void) close (fd);
1265 return NULL; 1265 return NULL;
1266 } 1266 }
1267 } 1267 }
@@ -1333,7 +1333,7 @@ EXTRACTOR_datasource_destroy_ (struct EXTRACTOR_Datasource *ds)
1333 cfs_destroy (ds->cfs); 1333 cfs_destroy (ds->cfs);
1334 bfds_delete (ds->bfds); 1334 bfds_delete (ds->bfds);
1335 if (-1 != ds->fd) 1335 if (-1 != ds->fd)
1336 (void) CLOSE (ds->fd); 1336 (void) close (ds->fd);
1337 free (ds); 1337 free (ds);
1338} 1338}
1339 1339
diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c
index 06e4a1b..4bb5869 100644
--- a/src/main/extractor_ipc_gnu.c
+++ b/src/main/extractor_ipc_gnu.c
@@ -23,7 +23,6 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "platform.h" 25#include "platform.h"
26#include "plibc.h"
27#include "extractor.h" 26#include "extractor.h"
28#include "extractor_datasource.h" 27#include "extractor_datasource.h"
29#include "extractor_logging.h" 28#include "extractor_logging.h"
@@ -155,7 +154,7 @@ EXTRACTOR_IPC_shared_memory_create_ (size_t size)
155 "%sLE-%u-%u", 154 "%sLE-%u-%u",
156 tpath, 155 tpath,
157 getpid (), 156 getpid (),
158 (unsigned int) RANDOM ()); 157 (unsigned int) random ());
159 if (-1 == (shm->shm_id = shm_open (shm->shm_name, 158 if (-1 == (shm->shm_id = shm_open (shm->shm_name,
160 O_RDWR | O_CREAT, 159 O_RDWR | O_CREAT,
161 S_IRUSR | S_IWUSR))) 160 S_IRUSR | S_IWUSR)))
diff --git a/src/main/extractor_ipc_w32.c b/src/main/extractor_ipc_w32.c
index b53bc3c..8749da9 100644
--- a/src/main/extractor_ipc_w32.c
+++ b/src/main/extractor_ipc_w32.c
@@ -162,7 +162,7 @@ EXTRACTOR_IPC_shared_memory_create_ (size_t size)
162 snprintf (shm->shm_name, MAX_SHM_NAME, 162 snprintf (shm->shm_name, MAX_SHM_NAME,
163 "%slibextractor-shm-%u-%u", 163 "%slibextractor-shm-%u-%u",
164 tpath, getpid (), 164 tpath, getpid (),
165 (unsigned int) RANDOM ()); 165 (unsigned int) random ());
166 shm->map = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 166 shm->map = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0,
167 size, shm->shm_name); 167 size, shm->shm_name);
168 shm->ptr = MapViewOfFile (shm->map, FILE_MAP_WRITE, 0, 0, size); 168 shm->ptr = MapViewOfFile (shm->map, FILE_MAP_WRITE, 0, 0, size);
diff --git a/src/main/extractor_plugin_main.c b/src/main/extractor_plugin_main.c
index ee51c8f..409290d 100644
--- a/src/main/extractor_plugin_main.c
+++ b/src/main/extractor_plugin_main.c
@@ -23,7 +23,6 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "platform.h" 25#include "platform.h"
26#include "plibc.h"
27#include "extractor.h" 26#include "extractor.h"
28#include "extractor_common.h" 27#include "extractor_common.h"
29#include "extractor_datasource.h" 28#include "extractor_datasource.h"
diff --git a/src/main/extractor_plugins.h b/src/main/extractor_plugins.h
index 8b0f5e6..b362d43 100644
--- a/src/main/extractor_plugins.h
+++ b/src/main/extractor_plugins.h
@@ -26,7 +26,6 @@
26#define EXTRACTOR_PLUGINS_H 26#define EXTRACTOR_PLUGINS_H
27 27
28#include "platform.h" 28#include "platform.h"
29#include "plibc.h"
30#include "extractor.h" 29#include "extractor.h"
31#include <signal.h> 30#include <signal.h>
32#include <ltdl.h> 31#include <ltdl.h>
diff --git a/src/main/extractor_plugpath.c b/src/main/extractor_plugpath.c
index 4374bc5..269061f 100644
--- a/src/main/extractor_plugpath.c
+++ b/src/main/extractor_plugpath.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26#include "platform.h" 26#include "platform.h"
27#include "plibc.h"
28#include "extractor.h" 27#include "extractor.h"
29#include <dirent.h> 28#include <dirent.h>
30#include <sys/types.h> 29#include <sys/types.h>
@@ -103,7 +102,7 @@ get_path_from_proc_exe ()
103 sizeof (fn), 102 sizeof (fn),
104 "/proc/%u/maps", 103 "/proc/%u/maps",
105 getpid ()); 104 getpid ());
106 if (NULL != (f = FOPEN (fn, "r"))) 105 if (NULL != (f = fopen (fn, "r")))
107 { 106 {
108 while (NULL != fgets (line, 1024, f)) 107 while (NULL != fgets (line, 1024, f))
109 { 108 {
@@ -419,7 +418,7 @@ append_to_dir (const char *path,
419 418
420 if (0 == (slen = strlen (path))) 419 if (0 == (slen = strlen (path)))
421 return NULL; 420 return NULL;
422 if (DIR_SEPARATOR == fname[0]) 421 if ('/' == fname[0])
423 fname++; 422 fname++;
424 ret = malloc (slen + strlen (fname) + 2); 423 ret = malloc (slen + strlen (fname) + 2);
425 if (NULL == ret) 424 if (NULL == ret)
@@ -476,9 +475,9 @@ get_installation_paths (EXTRACTOR_PathProcessor pp,
476 LOG_STRERROR ("strdup"); 475 LOG_STRERROR ("strdup");
477 return; 476 return;
478 } 477 }
479 for (prefix = strtok_r (d, PATH_SEPARATOR_STR, &saveptr); 478 for (prefix = strtok_r (d, ":", &saveptr);
480 NULL != prefix; 479 NULL != prefix;
481 prefix = strtok_r (NULL, PATH_SEPARATOR_STR, &saveptr)) 480 prefix = strtok_r (NULL, ":", &saveptr))
482 pp (pp_cls, prefix); 481 pp (pp_cls, prefix);
483 free (d); 482 free (d);
484 return; 483 return;
@@ -551,9 +550,9 @@ find_plugin_in_path (void *cls,
551 550
552 if (NULL != sc->path) 551 if (NULL != sc->path)
553 return; 552 return;
554 if (NULL == (dir = OPENDIR (path))) 553 if (NULL == (dir = opendir (path)))
555 return; 554 return;
556 while (NULL != (ent = READDIR (dir))) 555 while (NULL != (ent = readdir (dir)))
557 { 556 {
558 if ('.' == ent->d_name[0]) 557 if ('.' == ent->d_name[0])
559 continue; 558 continue;
@@ -568,7 +567,7 @@ find_plugin_in_path (void *cls,
568 if (NULL == (sym = strdup (sym_name))) 567 if (NULL == (sym = strdup (sym_name)))
569 { 568 {
570 LOG_STRERROR ("strdup"); 569 LOG_STRERROR ("strdup");
571 CLOSEDIR (dir); 570 closedir (dir);
572 return; 571 return;
573 } 572 }
574 dot = strchr (sym, '.'); 573 dot = strchr (sym, '.');
@@ -582,7 +581,7 @@ find_plugin_in_path (void *cls,
582 } 581 }
583 free (sym); 582 free (sym);
584 } 583 }
585 CLOSEDIR (dir); 584 closedir (dir);
586} 585}
587 586
588 587
diff --git a/src/main/test_bzip2.c b/src/main/test_bzip2.c
index 598e913..f180e26 100644
--- a/src/main/test_bzip2.c
+++ b/src/main/test_bzip2.c
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
135 /* change environment to find 'extractor_test' plugin which is 135 /* change environment to find 'extractor_test' plugin which is
136 not installed but should be in the current directory (or .libs) 136 not installed but should be in the current directory (or .libs)
137 on 'make check' */ 137 on 'make check' */
138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
139 fprintf (stderr, 139 fprintf (stderr,
140 "Failed to update my environment, plugin loading may fail: %s\n", 140 "Failed to update my environment, plugin loading may fail: %s\n",
141 strerror (errno)); 141 strerror (errno));
@@ -146,7 +146,14 @@ main (int argc, char *argv[])
146 fprintf (stderr, "failed to load test plugin\n"); 146 fprintf (stderr, "failed to load test plugin\n");
147 return 1; 147 return 1;
148 } 148 }
149 EXTRACTOR_extract (pl, "test_file.dat.bz2", NULL, 0, &process_replies, 149 if (0 != access ("test_file.dat.bz2",
150 R_OK))
151 return 77;
152 EXTRACTOR_extract (pl,
153 "test_file.dat.bz2",
154 NULL,
155 0,
156 &process_replies,
150 "main-cls"); 157 "main-cls");
151 EXTRACTOR_plugin_remove_all (pl); 158 EXTRACTOR_plugin_remove_all (pl);
152 return ret; 159 return ret;
diff --git a/src/main/test_file.c b/src/main/test_file.c
index a2d6a5e..f731e7d 100644
--- a/src/main/test_file.c
+++ b/src/main/test_file.c
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
135 /* change environment to find 'extractor_test' plugin which is 135 /* change environment to find 'extractor_test' plugin which is
136 not installed but should be in the current directory (or .libs) 136 not installed but should be in the current directory (or .libs)
137 on 'make check' */ 137 on 'make check' */
138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
139 fprintf (stderr, 139 fprintf (stderr,
140 "Failed to update my environment, plugin loading may fail: %s\n", 140 "Failed to update my environment, plugin loading may fail: %s\n",
141 strerror (errno)); 141 strerror (errno));
@@ -143,10 +143,18 @@ main (int argc, char *argv[])
143 EXTRACTOR_OPTION_DEFAULT_POLICY); 143 EXTRACTOR_OPTION_DEFAULT_POLICY);
144 if (NULL == pl) 144 if (NULL == pl)
145 { 145 {
146 fprintf (stderr, "failed to load test plugin\n"); 146 fprintf (stderr,
147 "failed to load test plugin\n");
147 return 1; 148 return 1;
148 } 149 }
149 EXTRACTOR_extract (pl, "test_file.dat", NULL, 0, &process_replies, 150 if (0 != access ("test_file.dat",
151 R_OK))
152 return 77;
153 EXTRACTOR_extract (pl,
154 "test_file.dat",
155 NULL,
156 0,
157 &process_replies,
150 "main-cls"); 158 "main-cls");
151 EXTRACTOR_plugin_remove_all (pl); 159 EXTRACTOR_plugin_remove_all (pl);
152 return ret; 160 return ret;
diff --git a/src/main/test_gzip.c b/src/main/test_gzip.c
index 071c74c..5805cf5 100644
--- a/src/main/test_gzip.c
+++ b/src/main/test_gzip.c
@@ -139,7 +139,7 @@ main (int argc, char *argv[])
139 /* change environment to find 'extractor_test' plugin which is 139 /* change environment to find 'extractor_test' plugin which is
140 not installed but should be in the current directory (or .libs) 140 not installed but should be in the current directory (or .libs)
141 on 'make check' */ 141 on 'make check' */
142 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 142 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
143 fprintf (stderr, 143 fprintf (stderr,
144 "Failed to update my environment, plugin loading may fail: %s\n", 144 "Failed to update my environment, plugin loading may fail: %s\n",
145 strerror (errno)); 145 strerror (errno));
@@ -150,7 +150,14 @@ main (int argc, char *argv[])
150 fprintf (stderr, "failed to load test plugin\n"); 150 fprintf (stderr, "failed to load test plugin\n");
151 return 1; 151 return 1;
152 } 152 }
153 EXTRACTOR_extract (pl, "test_file.dat.gz", NULL, 0, &process_replies, 153 if (0 != access ("test_file.dat.gz",
154 R_OK))
155 return 77;
156 EXTRACTOR_extract (pl,
157 "test_file.dat.gz",
158 NULL,
159 0,
160 &process_replies,
154 "main-cls"); 161 "main-cls");
155 EXTRACTOR_plugin_remove_all (pl); 162 EXTRACTOR_plugin_remove_all (pl);
156 return ret; 163 return ret;
diff --git a/src/main/test_ipc.c b/src/main/test_ipc.c
index 4da3ef5..1ef23f0 100644
--- a/src/main/test_ipc.c
+++ b/src/main/test_ipc.c
@@ -145,7 +145,7 @@ main (int argc, char *argv[])
145 /* change environment to find 'extractor_test' plugin which is 145 /* change environment to find 'extractor_test' plugin which is
146 not installed but should be in the current directory (or .libs) 146 not installed but should be in the current directory (or .libs)
147 on 'make check' */ 147 on 'make check' */
148 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 148 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
149 fprintf (stderr, 149 fprintf (stderr,
150 "Failed to update my environment, plugin loading may fail: %s\n", 150 "Failed to update my environment, plugin loading may fail: %s\n",
151 strerror (errno)); 151 strerror (errno));
diff --git a/src/main/test_plugin_load_multi.c b/src/main/test_plugin_load_multi.c
index 6b30390..18b3e64 100644
--- a/src/main/test_plugin_load_multi.c
+++ b/src/main/test_plugin_load_multi.c
@@ -60,7 +60,7 @@ main (int argc, char *argv[])
60 /* change environment to find 'extractor_test' plugin which is 60 /* change environment to find 'extractor_test' plugin which is
61 not installed but should be in the current directory (or .libs) 61 not installed but should be in the current directory (or .libs)
62 on 'make check' */ 62 on 'make check' */
63 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 63 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
64 fprintf (stderr, 64 fprintf (stderr,
65 "Failed to update my environment, plugin loading may fail: %s\n", 65 "Failed to update my environment, plugin loading may fail: %s\n",
66 strerror (errno)); 66 strerror (errno));
diff --git a/src/main/test_plugin_loading.c b/src/main/test_plugin_loading.c
index 537b703..708c76c 100644
--- a/src/main/test_plugin_loading.c
+++ b/src/main/test_plugin_loading.c
@@ -33,7 +33,7 @@ main (int argc, char *argv[])
33 /* change environment to find 'extractor_test' plugin which is 33 /* change environment to find 'extractor_test' plugin which is
34 not installed but should be in the current directory (or .libs) 34 not installed but should be in the current directory (or .libs)
35 on 'make check' */ 35 on 'make check' */
36 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 36 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
37 fprintf (stderr, 37 fprintf (stderr,
38 "Failed to update my environment, plugin loading may fail: %s\n", 38 "Failed to update my environment, plugin loading may fail: %s\n",
39 strerror (errno)); 39 strerror (errno));
diff --git a/src/main/test_trivial.c b/src/main/test_trivial.c
index b0860b4..ce0e7d5 100644
--- a/src/main/test_trivial.c
+++ b/src/main/test_trivial.c
@@ -51,7 +51,7 @@ main (int argc, char *argv[])
51 /* change environment to find 'extractor_test' plugin which is 51 /* change environment to find 'extractor_test' plugin which is
52 not installed but should be in the current directory (or .libs) 52 not installed but should be in the current directory (or .libs)
53 on 'make check' */ 53 on 'make check' */
54 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 54 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
55 fprintf (stderr, 55 fprintf (stderr,
56 "Failed to update my environment, plugin loading may fail: %s\n", 56 "Failed to update my environment, plugin loading may fail: %s\n",
57 strerror (errno)); 57 strerror (errno));
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 8cdd905..69cb1f7 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -23,7 +23,9 @@ SUBDIRS = .
23EXTRA_DIST = \ 23EXTRA_DIST = \
24 fuzz_default.sh \ 24 fuzz_default.sh \
25 template_extractor.c \ 25 template_extractor.c \
26 testdata/audiosig.rm \
26 testdata/archive_test.tar \ 27 testdata/archive_test.tar \
28 testdata/chello-elf \
27 testdata/deb_bzip2.deb \ 29 testdata/deb_bzip2.deb \
28 testdata/dvi_ora.dvi \ 30 testdata/dvi_ora.dvi \
29 testdata/exiv2_iptc.jpg \ 31 testdata/exiv2_iptc.jpg \
@@ -51,6 +53,7 @@ EXTRA_DIST = \
51 testdata/png_image.png \ 53 testdata/png_image.png \
52 testdata/ps_bloomfilter.ps \ 54 testdata/ps_bloomfilter.ps \
53 testdata/ps_wallace.ps \ 55 testdata/ps_wallace.ps \
56 testdata/ra3.ra \
54 testdata/riff_flame.avi \ 57 testdata/riff_flame.avi \
55 testdata/rpm_test.rpm \ 58 testdata/rpm_test.rpm \
56 testdata/s3m_2nd_pm.s3m \ 59 testdata/s3m_2nd_pm.s3m \
@@ -68,17 +71,6 @@ if HAVE_MAGIC
68PLUGIN_MIME=libextractor_mime.la 71PLUGIN_MIME=libextractor_mime.la
69TEST_MIME=test_mime 72TEST_MIME=test_mime
70 73
71if HAVE_FFMPEG
72# FFmpeg-thumbnailer requires MAGIC and FFMPEG
73PLUGIN_FFMPEG=libextractor_thumbnailffmpeg.la
74TEST_FFMPEG=test_thumbnailffmpeg
75endif
76
77if HAVE_FFMPEG_NEW
78PLUGIN_PREVIEWOPUS=libextractor_previewopus.la
79TEST_PREVIEWOPUS=test_previewopus
80endif
81
82if HAVE_GDK_PIXBUF 74if HAVE_GDK_PIXBUF
83# Gtk-thumbnailer requires MAGIC and GDK_PIXBUF 75# Gtk-thumbnailer requires MAGIC and GDK_PIXBUF
84PLUGIN_GTK=libextractor_thumbnailgtk.la 76PLUGIN_GTK=libextractor_thumbnailgtk.la
@@ -176,11 +168,13 @@ endif
176 168
177plugin_LTLIBRARIES = \ 169plugin_LTLIBRARIES = \
178 libextractor_dvi.la \ 170 libextractor_dvi.la \
171 libextractor_elf.la \
179 libextractor_it.la \ 172 libextractor_it.la \
180 libextractor_man.la \ 173 libextractor_man.la \
181 libextractor_nsf.la \ 174 libextractor_nsf.la \
182 libextractor_nsfe.la \ 175 libextractor_nsfe.la \
183 libextractor_ps.la \ 176 libextractor_ps.la \
177 libextractor_real.la \
184 libextractor_riff.la \ 178 libextractor_riff.la \
185 libextractor_s3m.la \ 179 libextractor_s3m.la \
186 libextractor_sid.la \ 180 libextractor_sid.la \
@@ -188,7 +182,6 @@ plugin_LTLIBRARIES = \
188 libextractor_xm.la \ 182 libextractor_xm.la \
189 $(PLUGIN_ARCHIVE) \ 183 $(PLUGIN_ARCHIVE) \
190 $(PLUGIN_EXIV2) \ 184 $(PLUGIN_EXIV2) \
191 $(PLUGIN_FFMPEG) \
192 $(PLUGIN_FLAC) \ 185 $(PLUGIN_FLAC) \
193 $(PLUGIN_GIF) \ 186 $(PLUGIN_GIF) \
194 $(PLUGIN_GSF) \ 187 $(PLUGIN_GSF) \
@@ -202,7 +195,6 @@ plugin_LTLIBRARIES = \
202 $(PLUGIN_MPEG) \ 195 $(PLUGIN_MPEG) \
203 $(PLUGIN_OGG) \ 196 $(PLUGIN_OGG) \
204 $(PLUGIN_PDF) \ 197 $(PLUGIN_PDF) \
205 $(PLUGIN_PREVIEWOPUS) \
206 $(PLUGIN_RPM) \ 198 $(PLUGIN_RPM) \
207 $(PLUGIN_TIFF) \ 199 $(PLUGIN_TIFF) \
208 $(PLUGIN_ZLIB) 200 $(PLUGIN_ZLIB)
@@ -213,6 +205,7 @@ endif
213 205
214check_PROGRAMS = \ 206check_PROGRAMS = \
215 test_dvi \ 207 test_dvi \
208 test_elf \
216 test_it \ 209 test_it \
217 test_man \ 210 test_man \
218 test_nsf \ 211 test_nsf \
@@ -220,6 +213,7 @@ check_PROGRAMS = \
220 test_odf \ 213 test_odf \
221 test_ps \ 214 test_ps \
222 test_png \ 215 test_png \
216 test_real \
223 test_riff \ 217 test_riff \
224 test_s3m \ 218 test_s3m \
225 test_sid \ 219 test_sid \
@@ -228,8 +222,6 @@ check_PROGRAMS = \
228 test_zip \ 222 test_zip \
229 $(TEST_ARCHIVE) \ 223 $(TEST_ARCHIVE) \
230 $(TEST_EXIV2) \ 224 $(TEST_EXIV2) \
231 $(TEST_FFMPEG) \
232 $(TEST_PREVIEWOPUS) \
233 $(TEST_FLAC) \ 225 $(TEST_FLAC) \
234 $(TEST_GIF) \ 226 $(TEST_GIF) \
235 $(TEST_GSF) \ 227 $(TEST_GSF) \
@@ -298,6 +290,19 @@ test_dvi_SOURCES = \
298test_dvi_LDADD = \ 290test_dvi_LDADD = \
299 $(top_builddir)/src/plugins/libtest.la 291 $(top_builddir)/src/plugins/libtest.la
300 292
293libextractor_elf_la_SOURCES = \
294 elf_extractor.c \
295 pack.c pack.h
296libextractor_elf_la_LDFLAGS = \
297 $(PLUGINFLAGS)
298libextractor_elf_la_LIBADD = \
299 $(XLIB) $(SOCKET_LIBS)
300
301test_elf_SOURCES = \
302 test_elf.c
303test_elf_LDADD = \
304 $(top_builddir)/src/plugins/libtest.la
305
301 306
302libextractor_exiv2_la_SOURCES = \ 307libextractor_exiv2_la_SOURCES = \
303 exiv2_extractor.cc 308 exiv2_extractor.cc
@@ -562,6 +567,20 @@ test_ps_LDADD = \
562 $(top_builddir)/src/plugins/libtest.la 567 $(top_builddir)/src/plugins/libtest.la
563 568
564 569
570libextractor_real_la_SOURCES = \
571 real_extractor.c
572libextractor_real_la_LDFLAGS = \
573 $(PLUGINFLAGS)
574libextractor_real_la_LIBADD = \
575 -lm \
576 $(XLIB) \
577 $(LE_LIBINTL)
578
579test_real_SOURCES = \
580 test_real.c
581test_real_LDADD = \
582 $(top_builddir)/src/plugins/libtest.la
583
565libextractor_riff_la_SOURCES = \ 584libextractor_riff_la_SOURCES = \
566 riff_extractor.c 585 riff_extractor.c
567libextractor_riff_la_LDFLAGS = \ 586libextractor_riff_la_LDFLAGS = \
@@ -615,19 +634,6 @@ test_sid_LDADD = \
615 $(top_builddir)/src/plugins/libtest.la 634 $(top_builddir)/src/plugins/libtest.la
616 635
617 636
618libextractor_thumbnailffmpeg_la_SOURCES = \
619 thumbnailffmpeg_extractor.c
620libextractor_thumbnailffmpeg_la_LDFLAGS = \
621 $(PLUGINFLAGS)
622libextractor_thumbnailffmpeg_la_LIBADD = \
623 -lavutil -lavformat -lavcodec -lswscale -lmagic $(XLIB)
624
625test_thumbnailffmpeg_SOURCES = \
626 test_thumbnailffmpeg.c
627test_thumbnailffmpeg_LDADD = \
628 $(top_builddir)/src/plugins/libtest.la
629
630
631libextractor_thumbnailgtk_la_SOURCES = \ 637libextractor_thumbnailgtk_la_SOURCES = \
632 thumbnailgtk_extractor.c 638 thumbnailgtk_extractor.c
633libextractor_thumbnailgtk_la_LDFLAGS = \ 639libextractor_thumbnailgtk_la_LDFLAGS = \
@@ -642,18 +648,6 @@ test_thumbnailgtk_SOURCES = \
642test_thumbnailgtk_LDADD = \ 648test_thumbnailgtk_LDADD = \
643 $(top_builddir)/src/plugins/libtest.la 649 $(top_builddir)/src/plugins/libtest.la
644 650
645libextractor_previewopus_la_SOURCES = \
646 previewopus_extractor.c
647libextractor_previewopus_la_LDFLAGS = \
648 $(PLUGINFLAGS)
649libextractor_previewopus_la_LIBADD = \
650 -lavutil -lavformat -lavcodec -lswscale -lavresample -lmagic $(XLIB)
651
652test_previewopus_SOURCES = \
653 test_previewopus.c
654test_previewopus_LDADD = \
655 $(top_builddir)/src/plugins/libtest.la
656
657 651
658libextractor_tiff_la_SOURCES = \ 652libextractor_tiff_la_SOURCES = \
659 tiff_extractor.c 653 tiff_extractor.c
@@ -668,6 +662,15 @@ test_tiff_LDADD = \
668 $(top_builddir)/src/plugins/libtest.la 662 $(top_builddir)/src/plugins/libtest.la
669 663
670 664
665#libextractor_vlc_la_SOURCES = \
666# vlc_extractor.c
667#libextractor_vlc_la_LDFLAGS = \
668# $(PLUGINFLAGS)
669#libextractor_vlc_la_LIBADD = \
670# -lvlc \
671# $(XLIB)
672
673
671libextractor_wav_la_SOURCES = \ 674libextractor_wav_la_SOURCES = \
672 wav_extractor.c 675 wav_extractor.c
673libextractor_wav_la_LDFLAGS = \ 676libextractor_wav_la_LDFLAGS = \
diff --git a/src/plugins/old/elf_extractor.c b/src/plugins/elf_extractor.c
index 9c35e7c..379f615 100644
--- a/src/plugins/old/elf_extractor.c
+++ b/src/plugins/elf_extractor.c
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of libextractor. 2 This file is part of libextractor.
3 Copyright (C) 2004, 2009 Vidyut Samanta and Christian Grothoff 3 Copyright (C) 2012 Vidyut Samanta and Christian Grothoff
4 4
5 libextractor is free software; you can redistribute it and/or modify 5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 libextractor is distributed in the hope that it will be useful, but 10 libextractor is distributed in the hope that it will be useful, but
@@ -17,12 +17,17 @@
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA. 18 Boston, MA 02110-1301, USA.
19 */ 19 */
20 20/**
21 * @file plugins/gif_extractor.c
22 * @brief plugin to support GIF files
23 * @author Christian Grothoff
24 */
21#include "platform.h" 25#include "platform.h"
22#include "extractor.h" 26#include "extractor.h"
23#include "pack.h" 27#include "pack.h"
24#include <stdint.h> 28#include <stdint.h>
25 29
30
26typedef uint32_t Elf32_Addr; 31typedef uint32_t Elf32_Addr;
27typedef uint16_t Elf32_Half; 32typedef uint16_t Elf32_Half;
28typedef uint32_t Elf32_Off; 33typedef uint32_t Elf32_Off;
@@ -334,15 +339,34 @@ getByteorder (char ei_data)
334 * @return 0 on success, -1 on error 339 * @return 0 on success, -1 on error
335 */ 340 */
336static int 341static int
337getSectionHdr (const char *data, 342getSectionHdr (struct EXTRACTOR_ExtractContext *ec,
338 size_t size, 343 unsigned int bo,
339 Elf32_Ehdr *ehdr, Elf32_Half idx, Elf32_Shdr *ret) 344 const Elf32_Ehdr *ehdr,
345 Elf32_Half idx,
346 Elf32_Shdr *ret)
340{ 347{
348 ssize_t size;
349 uint64_t max;
350 int64_t off;
351 void *data;
352
341 if (ehdr->e_shnum <= idx) 353 if (ehdr->e_shnum <= idx)
342 return -1; 354 return -1;
343 355 max = ec->get_size (ec->cls);
344 EXTRACTOR_common_cat_unpack (&data[ehdr->e_shoff + ehdr->e_shentsize * idx], 356 if (ehdr->e_shoff + ehdr->e_shentsize * idx + sizeof (*ret) > max)
345 ELF_SECTION_SPECS[getByteorder (data[EI_CLASS])], 357 return -1;
358 off = ec->seek (ec->cls,
359 ehdr->e_shoff + ehdr->e_shentsize * idx,
360 SEEK_SET);
361 if (-1 == off)
362 return -1;
363 size = ec->read (ec->cls,
364 &data,
365 sizeof (*ret));
366 if (size < sizeof (*ret))
367 return -1;
368 EXTRACTOR_common_cat_unpack (data,
369 ELF_SECTION_SPECS[bo],
346 ELF_SECTION_FIELDS (ret)); 370 ELF_SECTION_FIELDS (ret));
347 return 0; 371 return 0;
348} 372}
@@ -353,15 +377,37 @@ getSectionHdr (const char *data,
353 * @return 0 on success, -1 on error 377 * @return 0 on success, -1 on error
354 */ 378 */
355static int 379static int
356getDynTag (const char *data, 380getDynTag (struct EXTRACTOR_ExtractContext *ec,
357 size_t size, 381 unsigned int bo,
358 Elf32_Ehdr *ehdr, 382 const Elf32_Ehdr *ehdr,
359 Elf32_Off off, Elf32_Word osize, unsigned int idx, Elf32_Dyn *ret) 383 Elf32_Off off,
384 Elf32_Word osize,
385 unsigned int idx,
386 Elf32_Dyn *ret)
360{ 387{
361 if ((off + osize > size) || ((idx + 1) * ELF_DYN_SIZE > osize)) 388 ssize_t size;
389 uint64_t max;
390 int64_t soff;
391 void *data;
392
393 max = ec->get_size (ec->cls);
394 if ( (off + osize > max) ||
395 ((idx + 1) * ELF_DYN_SIZE > osize) )
362 return -1; 396 return -1;
363 EXTRACTOR_common_cat_unpack (&data[off + idx * ELF_DYN_SIZE], 397 if (off + idx * ELF_DYN_SIZE + sizeof (*ret) > max)
364 ELF_DYN_SPECS[getByteorder (data[EI_CLASS])], 398 return -1;
399 soff = ec->seek (ec->cls,
400 off + idx * ELF_DYN_SIZE,
401 SEEK_SET);
402 if (-1 == soff)
403 return -1;
404 size = ec->read (ec->cls,
405 &data,
406 sizeof (*ret));
407 if (size < sizeof (*ret))
408 return -1;
409 EXTRACTOR_common_cat_unpack (data,
410 ELF_DYN_SPECS[bo],
365 ELF_DYN_FIELDS (ret)); 411 ELF_DYN_FIELDS (ret));
366 return 0; 412 return 0;
367} 413}
@@ -372,295 +418,385 @@ getDynTag (const char *data,
372 * @return 0 on success, -1 on error 418 * @return 0 on success, -1 on error
373 */ 419 */
374static int 420static int
375getProgramHdr (const char *data, 421getProgramHdr (struct EXTRACTOR_ExtractContext *ec,
376 size_t size, 422 unsigned int bo,
377 Elf32_Ehdr *ehdr, Elf32_Half idx, Elf32_Phdr *ret) 423 const Elf32_Ehdr *ehdr,
424 Elf32_Half idx,
425 Elf32_Phdr *ret)
378{ 426{
427 void *data;
428 ssize_t size;
429 int64_t off;
430
379 if (ehdr->e_phnum <= idx) 431 if (ehdr->e_phnum <= idx)
380 return -1; 432 return -1;
381 433 off = ec->seek (ec->cls,
382 EXTRACTOR_common_cat_unpack (&data[ehdr->e_phoff + ehdr->e_phensize * idx], 434 ehdr->e_phoff + ehdr->e_phensize * idx,
383 ELF_PHDR_SPECS[getByteorder (data[EI_CLASS])], 435 SEEK_SET);
384 ELF_PHDR_FIELDS (ret)); 436 if (-1 == off)
385 return 0;
386}
387
388
389/**
390 * Parse ELF header.
391 * @return 0 on success for 32 bit, 1 on success for 64 bit, -1 on error
392 */
393static int
394getELFHdr (const char *data,
395 size_t size,
396 Elf32_Ehdr *ehdr,
397 Elf64_Ehdr *ehdr64)
398{
399 /* catlib */
400 if (size < EI_NIDENT)
401 return -1; 437 return -1;
402 if (0 != strncmp (data, elfMagic, sizeof (elfMagic))) 438 size = ec->read (ec->cls,
403 return -1; /* not an elf */ 439 &data,
404 440 sizeof (*ret));
405 switch (data[EI_CLASS]) 441 if (size < sizeof (*ret))
406 {
407 case ELFCLASS32:
408 if (size < sizeof (Elf32_Ehdr) + EI_NIDENT)
409 return -1;
410 EXTRACTOR_common_cat_unpack (&data[EI_NIDENT],
411 ELF_HEADER_SPECS[getByteorder (data[EI_DATA])],
412 ELF_HEADER_FIELDS (ehdr));
413 if (ehdr->e_shoff + ehdr->e_shentsize * ehdr->e_shnum > size)
414 return -1; /* invalid offsets... */
415 if (ehdr->e_shentsize < ELF_SECTION_SIZE)
416 return -1; /* huh? */
417 if (ehdr->e_phoff + ehdr->e_phensize * ehdr->e_phnum > size)
418 return -1;
419 return 0;
420 case ELFCLASS64:
421 if (size < sizeof (Elf64_Ehdr) + EI_NIDENT)
422 return -1;
423 EXTRACTOR_common_cat_unpack (&data[EI_NIDENT],
424 ELF64_HEADER_SPECS[getByteorder (
425 data[EI_DATA])],
426 ELF64_HEADER_FIELDS (ehdr64));
427 if (ehdr64->e_shoff + ((uint32_t) ehdr64->e_shentsize * ehdr64->e_shnum) >
428 size)
429 return -1; /* invalid offsets... */
430 if (ehdr64->e_phoff + ((uint32_t) ehdr64->e_phensize * ehdr64->e_phnum) >
431 size)
432 return -1;
433 return 1;
434 default:
435 return -1; 442 return -1;
436 } 443 EXTRACTOR_common_cat_unpack (data,
444 ELF_PHDR_SPECS[bo],
445 ELF_PHDR_FIELDS (ret));
446 return 0;
437} 447}
438 448
439 449
440/** 450/**
441 * @return the string (offset into data, do NOT free), NULL on error 451 * @return the string (offset into data, do NOT free), NULL on error
442 */ 452 */
443static const char * 453static char *
444readStringTable (const char *data, 454readStringTable (struct EXTRACTOR_ExtractContext *ec,
445 size_t size, 455 unsigned int bo,
446 Elf32_Ehdr *ehdr, 456 const Elf32_Ehdr *ehdr,
447 Elf32_Half strTableOffset, Elf32_Word sh_name) 457 Elf32_Half strTableOffset,
458 Elf32_Word sh_name)
448{ 459{
449 Elf32_Shdr shrd; 460 Elf32_Shdr shrd;
450 if (-1 == getSectionHdr (data, size, ehdr, strTableOffset, &shrd)) 461 char *data;
462 ssize_t size;
463 int64_t off;
464
465 if (-1 == getSectionHdr (ec,
466 bo,
467 ehdr,
468 strTableOffset,
469 &shrd))
451 return NULL; 470 return NULL;
452 if ((shrd.sh_type != SHT_STRTAB) || 471 if ((shrd.sh_type != SHT_STRTAB) ||
453 (shrd.sh_offset + shrd.sh_size > size) || 472 (shrd.sh_size <= sh_name) )
454 (shrd.sh_size <= sh_name) || 473 return NULL;
455 (data[shrd.sh_offset + shrd.sh_size - 1] != '\0')) 474 off = ec->seek (ec->cls,
475 shrd.sh_offset,
476 SEEK_SET);
477 if (-1 == off)
456 return NULL; 478 return NULL;
457 return &data[shrd.sh_offset + sh_name]; 479 size = ec->read (ec->cls,
480 (void **) &data,
481 shrd.sh_size);
482 if (size < shrd.sh_size)
483 return NULL;
484 if (data[shrd.sh_size - 1] != '\0')
485 return NULL;
486 return strdup (&data[sh_name]);
458} 487}
459 488
460 489
461#define ADD(s, type) do { if (0!=proc (proc_cls, "elf", type, \ 490#define ADD(s, type) do { \
462 EXTRACTOR_METAFORMAT_UTF8, "text/plain", \ 491 if (0!=ec->proc (ec->cls, "elf", type, \
463 s, strlen (s) + 1)) return 1; \ 492 EXTRACTOR_METAFORMAT_UTF8, "text/plain", \
493 s, strlen (s) + 1)) \
494 { \
495 return; \
496 } \
464} while (0) 497} while (0)
465 498
466/* application/x-executable, ELF */ 499
467int 500/**
468EXTRACTOR_elf_extract (const char *data, 501 * Main entry method for the 'application/x-executable' extraction plugin.
469 size_t size, 502 *
470 EXTRACTOR_MetaDataProcessor proc, 503 * @param ec extraction context provided to the plugin
471 void *proc_cls, 504 */
472 const char *options) 505void
506EXTRACTOR_elf_extract_method (struct EXTRACTOR_ExtractContext *ec)
473{ 507{
474 Elf32_Ehdr ehdr; 508 Elf32_Ehdr ehdr;
475 Elf32_Half idx;
476 Elf64_Ehdr ehdr64; 509 Elf64_Ehdr ehdr64;
477 int ret; 510 int ret;
511 unsigned int bo;
512 char *data;
513 ssize_t size;
514 uint64_t max;
515 size_t want;
516
517 max = ec->get_size (ec->cls);
518 want = sizeof (ehdr);
519 if (sizeof (ehdr64) > want)
520 want = sizeof (ehdr64);
521 want += EI_NIDENT;
522 if (max < want)
523 return;
524 size = ec->read (ec->cls,
525 (void**) &data,
526 max);
527 if (size < EI_NIDENT)
528 return;
529 if (0 != memcmp (data,
530 elfMagic,
531 sizeof (elfMagic)))
532 return; /* not an elf */
533 switch (data[EI_CLASS])
534 {
535 case ELFCLASS32:
536 if (size < sizeof (Elf32_Ehdr) + EI_NIDENT)
537 return;
538 bo = getByteorder (data[EI_DATA]);
539 EXTRACTOR_common_cat_unpack (&data[EI_NIDENT],
540 ELF_HEADER_SPECS[bo],
541 ELF_HEADER_FIELDS (&ehdr));
542 if (ehdr.e_shoff + ehdr.e_shentsize * ehdr.e_shnum > max)
543 return; /* invalid offsets... */
544 if (ehdr.e_shentsize < ELF_SECTION_SIZE)
545 return; /* huh? */
546 if (ehdr.e_phoff + ehdr.e_phensize * ehdr.e_phnum > max)
547 return;
548 ret = 0;
549 bo = getByteorder (data[EI_CLASS]);
550 break;
551 case ELFCLASS64:
552 if (size < sizeof (Elf64_Ehdr) + EI_NIDENT)
553 return;
554 bo = getByteorder (data[EI_DATA]);
555 EXTRACTOR_common_cat_unpack (&data[EI_NIDENT],
556 ELF64_HEADER_SPECS[bo],
557 ELF64_HEADER_FIELDS (&ehdr64));
558 if (ehdr64.e_shoff + ((uint32_t) ehdr64.e_shentsize * ehdr64.e_shnum) >
559 max)
560 return; /* invalid offsets... */
561 if (ehdr64.e_phoff + ((uint32_t) ehdr64.e_phensize * ehdr64.e_phnum) >
562 max)
563 return;
564 bo = getByteorder (data[EI_CLASS]);
565 ret = 1;
566 break;
567 default:
568 return;
569 }
478 570
479 ret = getELFHdr (data, size, &ehdr, &ehdr64); 571 ADD ("application/x-executable",
480 if (ret == -1) 572 EXTRACTOR_METATYPE_MIMETYPE);
481 return 0;
482 ADD ("application/x-executable", EXTRACTOR_METATYPE_MIMETYPE);
483 switch ( ((unsigned char*) data)[EI_OSABI]) 573 switch ( ((unsigned char*) data)[EI_OSABI])
484 { 574 {
485 case ELFOSABI_LINUX: 575 case ELFOSABI_LINUX:
486 ADD ("Linux", EXTRACTOR_METATYPE_TARGET_OS); 576 ADD ("Linux",
577 EXTRACTOR_METATYPE_TARGET_OS);
487 break; 578 break;
488 case ELFOSABI_FREEBSD: 579 case ELFOSABI_FREEBSD:
489 ADD ("FreeBSD", EXTRACTOR_METATYPE_TARGET_OS); 580 ADD ("FreeBSD",
581 EXTRACTOR_METATYPE_TARGET_OS);
490 break; 582 break;
491 case ELFOSABI_NETBSD: 583 case ELFOSABI_NETBSD:
492 ADD ("NetBSD", EXTRACTOR_METATYPE_TARGET_OS); 584 ADD ("NetBSD",
585 EXTRACTOR_METATYPE_TARGET_OS);
493 break; 586 break;
494 case ELFOSABI_OPENBSD: 587 case ELFOSABI_OPENBSD:
495 ADD ("OpenBSD", EXTRACTOR_METATYPE_TARGET_OS); 588 ADD ("OpenBSD",
589 EXTRACTOR_METATYPE_TARGET_OS);
496 break; 590 break;
497 case ELFOSABI_IRIX: 591 case ELFOSABI_IRIX:
498 ADD ("IRIX", EXTRACTOR_METATYPE_TARGET_OS); 592 ADD ("IRIX",
593 EXTRACTOR_METATYPE_TARGET_OS);
499 break; 594 break;
500 default: 595 default:
501 break; 596 break;
502 } 597 }
503 switch ( (ret == 0) ? ehdr.e_type : ehdr64.e_type) 598 switch ( (0 == ret) ? ehdr.e_type : ehdr64.e_type)
504 { 599 {
505 case ET_REL: 600 case ET_REL:
506 ADD ("Relocatable file", EXTRACTOR_METATYPE_RESOURCE_TYPE); 601 ADD ("Relocatable file",
602 EXTRACTOR_METATYPE_RESOURCE_TYPE);
507 break; 603 break;
508 case ET_EXEC: 604 case ET_EXEC:
509 ADD ("Executable file", EXTRACTOR_METATYPE_RESOURCE_TYPE); 605 ADD ("Executable file",
606 EXTRACTOR_METATYPE_RESOURCE_TYPE);
510 break; 607 break;
511 case ET_DYN: 608 case ET_DYN:
512 ADD ("Shared object file", EXTRACTOR_METATYPE_RESOURCE_TYPE); 609 ADD ("Shared object file",
610 EXTRACTOR_METATYPE_RESOURCE_TYPE);
513 break; 611 break;
514 case ET_CORE: 612 case ET_CORE:
515 ADD ("Core file", EXTRACTOR_METATYPE_RESOURCE_TYPE); 613 ADD ("Core file",
614 EXTRACTOR_METATYPE_RESOURCE_TYPE);
516 break; 615 break;
517 default: 616 default:
518 break; /* unknown */ 617 break; /* unknown */
519 } 618 }
520 switch ( (ret == 0) ? ehdr.e_machine : ehdr64.e_machine) 619 switch ( (0 == ret) ? ehdr.e_machine : ehdr64.e_machine)
521 { 620 {
522 case EM_M32: 621 case EM_M32:
523 ADD ("M32", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 622 ADD ("M32",
623 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
524 break; 624 break;
525 case EM_386: 625 case EM_386:
526 ADD ("i386", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 626 ADD ("i386",
627 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
527 break; 628 break;
528 case EM_68K: 629 case EM_68K:
529 ADD ("68K", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 630 ADD ("68K",
631 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
530 break; 632 break;
531 case EM_88K: 633 case EM_88K:
532 ADD ("88K", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 634 ADD ("88K",
635 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
533 break; 636 break;
534 case EM_SPARC: 637 case EM_SPARC:
535 ADD ("Sparc", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 638 ADD ("Sparc",
639 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
536 break; 640 break;
537 case EM_860: 641 case EM_860:
538 ADD ("960", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 642 ADD ("960",
643 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
539 break; 644 break;
540 case EM_MIPS: 645 case EM_MIPS:
541 ADD ("MIPS", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 646 ADD ("MIPS",
647 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
542 break; 648 break;
543 case EM_PPC: 649 case EM_PPC:
544 ADD ("PPC", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 650 ADD ("PPC",
651 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
545 break; 652 break;
546 case EM_PPC64: 653 case EM_PPC64:
547 ADD ("PPC64", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 654 ADD ("PPC64",
655 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
548 break; 656 break;
549 case EM_S390: 657 case EM_S390:
550 ADD ("S390", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 658 ADD ("S390",
659 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
551 break; 660 break;
552 case EM_ARM: 661 case EM_ARM:
553 ADD ("ARM", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 662 ADD ("ARM",
663 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
554 break; 664 break;
555 case EM_ALPHA: 665 case EM_ALPHA:
556 ADD ("ALPHA", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 666 ADD ("ALPHA",
667 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
557 break; 668 break;
558 case EM_IA_64: 669 case EM_IA_64:
559 ADD ("IA-64", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 670 ADD ("IA-64",
671 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
560 break; 672 break;
561 case EM_X86_64: 673 case EM_X86_64:
562 ADD ("x86_64", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 674 ADD ("x86_64",
675 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
563 break; 676 break;
564 case EM_CUDA: 677 case EM_CUDA:
565 ADD ("NVIDIA CUDA", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE); 678 ADD ("NVIDIA CUDA",
679 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
566 break; 680 break;
567 default: 681 default:
568 break; /* oops */ 682 break; /* oops */
569 } 683 }
570 684
571 if (ret != 0) 685 if (0 != ret)
572 return 0; /* FIXME: full support for 64-bit ELF... */ 686 return; /* FIXME: full support for 64-bit ELF... */
573 for (idx = 0; idx < ehdr.e_phnum; idx++) 687 for (Elf32_Half idx = 0; idx < ehdr.e_phnum; idx++)
574 { 688 {
575 Elf32_Phdr phdr; 689 Elf32_Phdr phdr;
576 690
577 if (0 != getProgramHdr (data, size, &ehdr, idx, &phdr)) 691 if (0 != getProgramHdr (ec,
578 return 0; 692 bo,
693 &ehdr,
694 idx,
695 &phdr))
696 return;
579 if (phdr.p_type == PT_DYNAMIC) 697 if (phdr.p_type == PT_DYNAMIC)
580 { 698 {
581 unsigned int dc = phdr.p_filesz / ELF_DYN_SIZE; 699 unsigned int dc = phdr.p_filesz / ELF_DYN_SIZE;
582 unsigned int id;
583 Elf32_Addr stringPtr; 700 Elf32_Addr stringPtr;
584 Elf32_Half stringIdx; 701 Elf32_Half stringIdx;
585 Elf32_Half six; 702 Elf32_Half six;
586 703
587 stringPtr = 0; 704 stringPtr = 0;
588 705 for (unsigned int id = 0; id < dc; id++)
589 for (id = 0; id < dc; id++)
590 { 706 {
591 Elf32_Dyn dyn; 707 Elf32_Dyn dyn;
592 if (0 != getDynTag (data, 708
593 size, 709 if (0 != getDynTag (ec,
710 bo,
594 &ehdr, 711 &ehdr,
595 phdr.p_offset, phdr.p_filesz, id, &dyn)) 712 phdr.p_offset,
596 return 0; 713 phdr.p_filesz,
714 id,
715 &dyn))
716 return;
597 if (DT_STRTAB == dyn.d_tag) 717 if (DT_STRTAB == dyn.d_tag)
598 { 718 {
599 stringPtr = dyn.d_un.d_ptr; 719 stringPtr = dyn.d_un.d_ptr;
600 break; 720 break;
601 } 721 }
602 } 722 }
603 if (stringPtr == 0) 723 if (0 == stringPtr)
604 return 0; 724 return;
605 for (six = 0; six < ehdr.e_shnum; six++) 725 for (six = 0; six < ehdr.e_shnum; six++)
606 { 726 {
607 Elf32_Shdr sec; 727 Elf32_Shdr sec;
608 if (-1 == getSectionHdr (data, size, &ehdr, six, &sec)) 728
609 return 0; 729 if (-1 == getSectionHdr (ec,
610 if ((sec.sh_addr == stringPtr) && (sec.sh_type == SHT_STRTAB)) 730 bo,
731 &ehdr,
732 six,
733 &sec))
734 return;
735 if ( (sec.sh_addr == stringPtr) &&
736 (sec.sh_type == SHT_STRTAB) )
611 { 737 {
612 stringIdx = six; 738 stringIdx = six;
613 break; 739 break;
614 } 740 }
615 } 741 }
616 if (six == ehdr.e_shnum) 742 if (six == ehdr.e_shnum)
617 return 0; /* stringIdx not found */ 743 return; /* stringIdx not found */
618 744
619 for (id = 0; id < dc; id++) 745 for (unsigned int id = 0; id < dc; id++)
620 { 746 {
621 Elf32_Dyn dyn; 747 Elf32_Dyn dyn;
622 if (0 != getDynTag (data, 748
623 size, 749 if (0 != getDynTag (ec,
750 bo,
624 &ehdr, 751 &ehdr,
625 phdr.p_offset, phdr.p_filesz, id, &dyn)) 752 phdr.p_offset,
626 return 0; 753 phdr.p_filesz,
754 id,
755 &dyn))
756 return;
627 switch (dyn.d_tag) 757 switch (dyn.d_tag)
628 { 758 {
629 case DT_RPATH: 759 case DT_RPATH:
630 { 760 {
631 const char *rpath; 761 char *rpath;
632 762
633 rpath = readStringTable (data, 763 rpath = readStringTable (ec,
634 size, 764 bo,
635 &ehdr, 765 &ehdr,
636 stringIdx, dyn.d_un.d_val); 766 stringIdx,
767 dyn.d_un.d_val);
637 /* "source" of the dependencies: path 768 /* "source" of the dependencies: path
638 to dynamic libraries */ 769 to dynamic libraries */
639 if (rpath != NULL) 770 if (NULL != rpath)
640 { 771 {
641 ADD (rpath, EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH); 772 ADD (rpath,
773 EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH);
774 free (rpath);
642 } 775 }
643 break; 776 break;
644 } 777 }
645 case DT_NEEDED: 778 case DT_NEEDED:
646 { 779 {
647 const char *needed; 780 char *needed;
648 781
649 needed = readStringTable (data, 782 needed = readStringTable (ec,
650 size, 783 bo,
651 &ehdr, 784 &ehdr,
652 stringIdx, dyn.d_un.d_val); 785 stringIdx,
653 if (needed != NULL) 786 dyn.d_un.d_val);
787 if (NULL != needed)
654 { 788 {
655 ADD (needed, EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY); 789 ADD (needed,
790 EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY);
791 free (needed);
656 } 792 }
657 break; 793 break;
658 } 794 }
659 } 795 }
660 } 796 }
661
662 } 797 }
663 } 798 }
664
665 return 0;
666} 799}
800
801
802/* end of gif_extractor.c */
diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
index 78f9bda..c21e1cb 100644
--- a/src/plugins/exiv2_extractor.cc
+++ b/src/plugins/exiv2_extractor.cc
@@ -90,7 +90,11 @@ virtual int close ();
90 * @param rcount number of bytes to read 90 * @param rcount number of bytes to read
91 * @return buffer with data read, empty buffer (!) on failure (!) 91 * @return buffer with data read, empty buffer (!) on failure (!)
92 */ 92 */
93#if EXIV2_TEST_VERSION (0,28,0)
94virtual Exiv2::DataBuf read (size_t rcount);
95#else
93virtual Exiv2::DataBuf read (long rcount); 96virtual Exiv2::DataBuf read (long rcount);
97#endif
94 98
95/** 99/**
96 * Read up to 'rcount' bytes into 'buf'. 100 * Read up to 'rcount' bytes into 'buf'.
@@ -99,8 +103,17 @@ virtual Exiv2::DataBuf read (long rcount);
99 * @param rcount size of 'buf' 103 * @param rcount size of 'buf'
100 * @return number of bytes read successfully, 0 on failure (!) 104 * @return number of bytes read successfully, 0 on failure (!)
101 */ 105 */
106#if EXIV2_TEST_VERSION (0,28,0)
107virtual size_t read (Exiv2::byte *buf,
108 size_t rcount);
109#else
102virtual long read (Exiv2::byte *buf, 110virtual long read (Exiv2::byte *buf,
103 long rcount); 111 long rcount);
112#endif
113
114#if EXIV2_TEST_VERSION (0,28,0)
115virtual void populateFakeData();
116#endif
104 117
105/** 118/**
106 * Read a single character. 119 * Read a single character.
@@ -117,8 +130,13 @@ virtual int getb ();
117 * @param wcount how many bytes to write 130 * @param wcount how many bytes to write
118 * @return -1 (always fails) 131 * @return -1 (always fails)
119 */ 132 */
133#if EXIV2_TEST_VERSION(0,28,0)
134virtual size_t write (const Exiv2::byte *data,
135 size_t wcount);
136#else
120virtual long write (const Exiv2::byte *data, 137virtual long write (const Exiv2::byte *data,
121 long wcount); 138 long wcount);
139#endif
122 140
123/** 141/**
124 * Write to stream. 142 * Write to stream.
@@ -126,7 +144,11 @@ virtual long write (const Exiv2::byte *data,
126 * @param src stream to copy 144 * @param src stream to copy
127 * @return -1 (always fails) 145 * @return -1 (always fails)
128 */ 146 */
147#if EXIV2_TEST_VERSION(0,28,0)
148virtual size_t write (Exiv2::BasicIo &src);
149#else
129virtual long write (Exiv2::BasicIo &src); 150virtual long write (Exiv2::BasicIo &src);
151#endif
130 152
131/** 153/**
132 * Write a single byte. 154 * Write a single byte.
@@ -143,6 +165,13 @@ virtual int putb (Exiv2::byte data);
143 */ 165 */
144virtual void transfer (Exiv2::BasicIo& src); 166virtual void transfer (Exiv2::BasicIo& src);
145 167
168
169#if EXIV2_TEST_VERSION (0,28,0)
170#define SEEK_OFFSET_TYPE int64_t
171#else
172#define SEEK_OFFSET_TYPE long
173#endif
174
146/** 175/**
147 * Seek to the given offset. 176 * Seek to the given offset.
148 * 177 *
@@ -150,7 +179,7 @@ virtual void transfer (Exiv2::BasicIo& src);
150 * @parma pos offset is relative to where? 179 * @parma pos offset is relative to where?
151 * @return -1 on failure, 0 on success 180 * @return -1 on failure, 0 on success
152 */ 181 */
153virtual int seek (long offset, 182virtual int seek (SEEK_OFFSET_TYPE offset,
154 Exiv2::BasicIo::Position pos); 183 Exiv2::BasicIo::Position pos);
155 184
156/** 185/**
@@ -172,7 +201,11 @@ virtual int munmap ();
172 * 201 *
173 * @return -1 on error 202 * @return -1 on error
174 */ 203 */
204#if EXIV2_TEST_VERSION(0,28,0)
205virtual size_t tell (void) const;
206#else
175virtual long int tell (void) const; 207virtual long int tell (void) const;
208#endif
176 209
177/** 210/**
178 * Return overall size of the file. 211 * Return overall size of the file.
@@ -213,7 +246,11 @@ virtual bool eof () const;
213 * 246 *
214 * @throws error 247 * @throws error
215 */ 248 */
249#if EXIV2_TEST_VERSION(0,28,0)
250virtual const std::string& path () const noexcept;
251#else
216virtual std::string path () const; 252virtual std::string path () const;
253#endif
217 254
218#ifdef EXV_UNICODE_PATH 255#ifdef EXV_UNICODE_PATH
219/** 256/**
@@ -230,7 +267,11 @@ virtual std::wstring wpath () const;
230 * 267 *
231 * @throws error 268 * @throws error
232 */ 269 */
270#if EXIV2_TEST_VERSION(0,28,0)
271virtual Exiv2::BasicIo::UniquePtr temporary () const;
272#else
233virtual Exiv2::BasicIo::AutoPtr temporary () const; 273virtual Exiv2::BasicIo::AutoPtr temporary () const;
274#endif
234 275
235}; 276};
236 277
@@ -266,7 +307,11 @@ ExtractorIO::close ()
266 * @return buffer with data read, empty buffer (!) on failure (!) 307 * @return buffer with data read, empty buffer (!) on failure (!)
267 */ 308 */
268Exiv2::DataBuf 309Exiv2::DataBuf
310#if EXIV2_TEST_VERSION (0,28,0)
311ExtractorIO::read (size_t rcount)
312#else
269ExtractorIO::read (long rcount) 313ExtractorIO::read (long rcount)
314#endif
270{ 315{
271 void *data; 316 void *data;
272 ssize_t ret; 317 ssize_t ret;
@@ -284,9 +329,15 @@ ExtractorIO::read (long rcount)
284 * @param rcount size of 'buf' 329 * @param rcount size of 'buf'
285 * @return number of bytes read successfully, 0 on failure (!) 330 * @return number of bytes read successfully, 0 on failure (!)
286 */ 331 */
332#if EXIV2_TEST_VERSION (0,28,0)
333size_t
334ExtractorIO::read (Exiv2::byte *buf,
335 size_t rcount)
336#else
287long 337long
288ExtractorIO::read (Exiv2::byte *buf, 338ExtractorIO::read (Exiv2::byte *buf,
289 long rcount) 339 long rcount)
340#endif
290{ 341{
291 void *data; 342 void *data;
292 ssize_t ret; 343 ssize_t ret;
@@ -305,6 +356,12 @@ ExtractorIO::read (Exiv2::byte *buf,
305 return got; 356 return got;
306} 357}
307 358
359#if EXIV2_TEST_VERSION (0,28,0)
360void ExtractorIO::populateFakeData()
361{
362 return;
363}
364#endif
308 365
309/** 366/**
310 * Read a single character. 367 * Read a single character.
@@ -319,7 +376,9 @@ ExtractorIO::getb ()
319 const unsigned char *r; 376 const unsigned char *r;
320 377
321 if (1 != ec->read (ec->cls, &data, 1)) 378 if (1 != ec->read (ec->cls, &data, 1))
322#if EXIV2_TEST_VERSION (0,27,0) 379#if EXIV2_TEST_VERSION(0,28,0)
380 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
381#elif EXIV2_TEST_VERSION (0,27,0)
323 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 382 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
324#else 383#else
325 throw Exiv2::BasicError<char> (42 /* error code */); 384 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -336,9 +395,15 @@ ExtractorIO::getb ()
336 * @param wcount how many bytes to write 395 * @param wcount how many bytes to write
337 * @return -1 (always fails) 396 * @return -1 (always fails)
338 */ 397 */
398#if EXIV2_TEST_VERSION(0,28,0)
399size_t
400ExtractorIO::write (const Exiv2::byte *data,
401 size_t wcount)
402#else
339long 403long
340ExtractorIO::write (const Exiv2::byte *data, 404ExtractorIO::write (const Exiv2::byte *data,
341 long wcount) 405 long wcount)
406#endif
342{ 407{
343 return -1; 408 return -1;
344} 409}
@@ -350,7 +415,11 @@ ExtractorIO::write (const Exiv2::byte *data,
350 * @param src stream to copy 415 * @param src stream to copy
351 * @return -1 (always fails) 416 * @return -1 (always fails)
352 */ 417 */
418#if EXIV2_TEST_VERSION(0,28,0)
419size_t
420#else
353long 421long
422#endif
354ExtractorIO::write (Exiv2::BasicIo &src) 423ExtractorIO::write (Exiv2::BasicIo &src)
355{ 424{
356 return -1; 425 return -1;
@@ -378,7 +447,9 @@ ExtractorIO::putb (Exiv2::byte data)
378void 447void
379ExtractorIO::transfer (Exiv2::BasicIo& src) 448ExtractorIO::transfer (Exiv2::BasicIo& src)
380{ 449{
381#if EXIV2_TEST_VERSION (0,27,0) 450#if EXIV2_TEST_VERSION(0,28,0)
451 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
452#elif EXIV2_TEST_VERSION (0,27,0)
382 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 453 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
383#else 454#else
384 throw Exiv2::BasicError<char> (42 /* error code */); 455 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -394,7 +465,7 @@ ExtractorIO::transfer (Exiv2::BasicIo& src)
394 * @return -1 on failure, 0 on success 465 * @return -1 on failure, 0 on success
395 */ 466 */
396int 467int
397ExtractorIO::seek (long offset, 468ExtractorIO::seek (SEEK_OFFSET_TYPE offset,
398 Exiv2::BasicIo::Position pos) 469 Exiv2::BasicIo::Position pos)
399{ 470{
400 int rel; 471 int rel;
@@ -427,7 +498,9 @@ ExtractorIO::seek (long offset,
427Exiv2::byte * 498Exiv2::byte *
428ExtractorIO::mmap (bool isWritable) 499ExtractorIO::mmap (bool isWritable)
429{ 500{
430#if EXIV2_TEST_VERSION (0,27,0) 501#if EXIV2_TEST_VERSION (0,28,0)
502 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
503#elif EXIV2_TEST_VERSION (0,27,0)
431 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 504 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
432#else 505#else
433 throw Exiv2::BasicError<char> (42 /* error code */); 506 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -452,7 +525,11 @@ ExtractorIO::munmap ()
452 * 525 *
453 * @return -1 on error 526 * @return -1 on error
454 */ 527 */
528#if EXIV2_TEST_VERSION(0,28,0)
529size_t
530#else
455long int 531long int
532#endif
456ExtractorIO::tell (void) const 533ExtractorIO::tell (void) const
457{ 534{
458 return (long) ec->seek (ec->cls, 0, SEEK_CUR); 535 return (long) ec->seek (ec->cls, 0, SEEK_CUR);
@@ -516,10 +593,17 @@ ExtractorIO::eof () const
516 * 593 *
517 * @throws error 594 * @throws error
518 */ 595 */
596#if EXIV2_TEST_VERSION (0,28,0)
597const std::string&
598ExtractorIO::path () const noexcept
599#else
519std::string 600std::string
520ExtractorIO::path () const 601ExtractorIO::path () const
602#endif
521{ 603{
522#if EXIV2_TEST_VERSION (0,27,0) 604#if EXIV2_TEST_VERSION (0,28,0)
605 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
606#elif EXIV2_TEST_VERSION (0,27,0)
523 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 607 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
524#else 608#else
525 throw Exiv2::BasicError<char> (42 /* error code */); 609 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -536,7 +620,9 @@ ExtractorIO::path () const
536std::wstring 620std::wstring
537ExtractorIO::wpath () const 621ExtractorIO::wpath () const
538{ 622{
539#if EXIV2_TEST_VERSION (0,27,0) 623#if EXIV2_TEST_VERSION (0,28,0)
624 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
625#elif EXIV2_TEST_VERSION (0,27,0)
540 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 626 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
541#else 627#else
542 throw Exiv2::BasicError<char> (42 /* error code */); 628 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -552,11 +638,17 @@ ExtractorIO::wpath () const
552 * 638 *
553 * @throws error 639 * @throws error
554 */ 640 */
641#if EXIV2_TEST_VERSION(0,28,0)
642Exiv2::BasicIo::UniquePtr
643#else
555Exiv2::BasicIo::AutoPtr 644Exiv2::BasicIo::AutoPtr
645#endif
556ExtractorIO::temporary () const 646ExtractorIO::temporary () const
557{ 647{
558 fprintf (stderr, "throwing temporary error\n"); 648 fprintf (stderr, "throwing temporary error\n");
559#if EXIV2_TEST_VERSION (0,27,0) 649#if EXIV2_TEST_VERSION(0,28,0)
650 throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed);
651#elif EXIV2_TEST_VERSION (0,27,0)
560 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); 652 throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
561#else 653#else
562 throw Exiv2::BasicError<char> (42 /* error code */); 654 throw Exiv2::BasicError<char> (42 /* error code */);
@@ -737,8 +829,13 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
737#if ! EXIV2_TEST_VERSION (0,24,0) 829#if ! EXIV2_TEST_VERSION (0,24,0)
738 Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute); 830 Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
739#endif 831#endif
832#if EXIV2_TEST_VERSION(0,28,0)
833 std::unique_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
834 Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open (std::move(eio));
835#else
740 std::auto_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec)); 836 std::auto_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
741 Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open (eio); 837 Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open (eio);
838#endif
742 if (0 == image.get ()) 839 if (0 == image.get ())
743 return; 840 return;
744 image->readMetadata (); 841 image->readMetadata ();
@@ -822,7 +919,11 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
822 ADDXMP ("Xmp.lr.hierarchicalSubject", EXTRACTOR_METATYPE_SUBJECT); 919 ADDXMP ("Xmp.lr.hierarchicalSubject", EXTRACTOR_METATYPE_SUBJECT);
823 } 920 }
824 } 921 }
922#if EXIV2_TEST_VERSION (0,28,0)
923 catch (const Exiv2::Error& e)
924#else
825 catch (const Exiv2::AnyError& e) 925 catch (const Exiv2::AnyError& e)
926#endif
826 { 927 {
827#if DEBUG 928#if DEBUG
828 std::cerr << "Caught Exiv2 exception '" << e << "'\n"; 929 std::cerr << "Caught Exiv2 exception '" << e << "'\n";
diff --git a/src/plugins/fuzz_default.sh b/src/plugins/fuzz_default.sh
index 67292cf..7418dff 100755
--- a/src/plugins/fuzz_default.sh
+++ b/src/plugins/fuzz_default.sh
@@ -1,28 +1,32 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -eu
4
3ZZSTARTSEED=0 5ZZSTARTSEED=0
4ZZSTOPSEED=100 6ZZSTOPSEED=100
5ret=0 7ret=0
6# fallbacks for direct, non-"make check" usage 8# fallbacks for direct, non-"make check" usage
7if test x"$testdatadir" = x"" 9if test x"${testdatadir:-NONE}" = xNONE""
8then 10then
9 testdatadir=../../test 11 testdatadir=../../test
10fi 12fi
11if test x"$bindir" = x"" 13if test x"${bindir:-NONE}" = xNONE""
12then 14then
13 bindir=`grep "^prefix = " ./Makefile | cut -d ' ' -f 3` 15 bindir=`grep "^prefix = " ./Makefile | cut -d ' ' -f 3`
14 bindir="$bindir/bin" 16 bindir="$bindir/bin"
15fi 17fi
16 18
17if test -x `which zzuf` 19if test ! -x `which zzuf`
18then 20then
21 echo "zzuf not available, not running the test"
19 exit 77 22 exit 77
20fi 23fi
21 24
22if test -x `which timeout` 25if test -x `which timeout`
23then 26then
24 TIMEOUT=timeout 15 27 TIMEOUT="timeout 15"
25else 28else
29 echo "timeout command not found, will not auto-timeout (may cause hang)"
26 TIMEOUT="" 30 TIMEOUT=""
27fi 31fi
28 32
@@ -37,7 +41,7 @@ do
37 do 41 do
38 echo "file $file seed $seed" 42 echo "file $file seed $seed"
39 zzuf -c -s $seed cat "$file" > "$tmpfile" 43 zzuf -c -s $seed cat "$file" > "$tmpfile"
40 if ! "$TIMEOUT $bindir/extract" -i "$tmpfile" > /dev/null 44 if ! $TIMEOUT $bindir/extract -i "$tmpfile" > /dev/null
41 then 45 then
42 echo "$tmpfile with seed $seed failed" 46 echo "$tmpfile with seed $seed failed"
43 mv $tmpfile $tmpfile.keep 47 mv $tmpfile $tmpfile.keep
diff --git a/src/plugins/gif_extractor.c b/src/plugins/gif_extractor.c
index 405eebe..3b202b5 100644
--- a/src/plugins/gif_extractor.c
+++ b/src/plugins/gif_extractor.c
@@ -36,7 +36,7 @@
36 * @return -1 on error, otherwise number of bytes read 36 * @return -1 on error, otherwise number of bytes read
37 */ 37 */
38static int 38static int
39gif_read_func (GifFileType *ft, 39gif_READ_func (GifFileType *ft,
40 GifByteType *bt, 40 GifByteType *bt,
41 int arg) 41 int arg)
42{ 42{
@@ -68,13 +68,13 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
68 int et; 68 int et;
69 char dims[128]; 69 char dims[128];
70#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4 70#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4
71 if (NULL == (gif_file = DGifOpen (ec, &gif_read_func))) 71 if (NULL == (gif_file = DGifOpen (ec, &gif_READ_func)))
72 return; /* not a GIF */ 72 return; /* not a GIF */
73#else 73#else
74 int gif_error; 74 int gif_error;
75 75
76 gif_error = 0; 76 gif_error = 0;
77 gif_file = DGifOpen (ec, &gif_read_func, &gif_error); 77 gif_file = DGifOpen (ec, &gif_READ_func, &gif_error);
78 if ((gif_file == NULL) || (gif_error != 0)) 78 if ((gif_file == NULL) || (gif_error != 0))
79 { 79 {
80 if (gif_file != NULL) 80 if (gif_file != NULL)
diff --git a/src/plugins/old/ebml_extractor.c b/src/plugins/old/ebml_extractor.c
index f7daa9a..0d4fc91 100644
--- a/src/plugins/old/ebml_extractor.c
+++ b/src/plugins/old/ebml_extractor.c
@@ -734,7 +734,7 @@ struct ebml_state
734 int reported_ebml; 734 int reported_ebml;
735 int valid_ebml; 735 int valid_ebml;
736 uint64_t ebml_version; 736 uint64_t ebml_version;
737 uint64_t ebml_read_version; 737 uint64_t ebml_READ_version;
738 uint64_t ebml_max_id_length; 738 uint64_t ebml_max_id_length;
739 uint64_t ebml_max_size_length; 739 uint64_t ebml_max_size_length;
740 char *doctype; 740 char *doctype;
@@ -796,7 +796,7 @@ clean_ebml_state_ebml (struct ebml_state *state)
796 state->reported_ebml = 0; 796 state->reported_ebml = 0;
797 state->valid_ebml = 0; 797 state->valid_ebml = 0;
798 state->ebml_version = 1; 798 state->ebml_version = 1;
799 state->ebml_read_version = 1; 799 state->ebml_READ_version = 1;
800 state->ebml_max_id_length = 4; 800 state->ebml_max_id_length = 4;
801 state->ebml_max_size_length = 8; 801 state->ebml_max_size_length = 8;
802 state->doctype = NULL; 802 state->doctype = NULL;
@@ -1699,7 +1699,7 @@ EXTRACTOR_ebml_extract_method (struct EXTRACTOR_PluginList *plugin,
1699 state->ebml_version = uint_value; 1699 state->ebml_version = uint_value;
1700 break; 1700 break;
1701 case EBMLID_READ_VERSION: 1701 case EBMLID_READ_VERSION:
1702 state->ebml_read_version = uint_value; 1702 state->ebml_READ_version = uint_value;
1703 if (uint_value > 1) 1703 if (uint_value > 1)
1704 { 1704 {
1705 /* We don't support EBML versions > 1 */ 1705 /* We don't support EBML versions > 1 */
diff --git a/src/plugins/old/real_extractor.c b/src/plugins/old/real_extractor.c
deleted file mode 100644
index cfac031..0000000
--- a/src/plugins/old/real_extractor.c
+++ /dev/null
@@ -1,439 +0,0 @@
1/*
2 This file is part of libextractor.
3 Copyright (C) 2002, 2003, 2009 Vidyut Samanta and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */
20
21#include "platform.h"
22#include "extractor.h"
23#include <stdint.h>
24
25#define UINT32 uint32_t
26#define UINT16 uint16_t
27#define UINT8 uint8_t
28
29typedef struct
30{
31 UINT32 object_id;
32 UINT32 size;
33 UINT16 object_version; /* must be 0 */
34 UINT16 stream_number;
35 UINT32 max_bit_rate;
36 UINT32 avg_bit_rate;
37 UINT32 max_packet_size;
38 UINT32 avg_packet_size;
39 UINT32 start_time;
40 UINT32 preroll;
41 UINT32 duration;
42 UINT8 stream_name_size;
43 UINT8 data[0]; /* variable length section */
44 /*
45 UINT8[stream_name_size] stream_name;
46 UINT8 mime_type_size;
47 UINT8[mime_type_size] mime_type;
48 UINT32 type_specific_len;
49 UINT8[type_specific_len] type_specific_data;
50 */
51} Media_Properties;
52
53typedef struct
54{
55 UINT32 object_id;
56 UINT32 size;
57 UINT16 object_version; /* must be 0 */
58 UINT16 title_len;
59 UINT8 data[0]; /* variable length section */
60 /*
61 UINT8[title_len] title;
62 UINT16 author_len;
63 UINT8[author_len] author;
64 UINT16 copyright_len;
65 UINT8[copyright_len] copyright;
66 UINT16 comment_len;
67 UINT8[comment_len] comment;
68 */
69} Content_Description;
70/* author, copyright and comment are supposed to be ASCII */
71
72#define REAL_HEADER 0x2E524d46
73#define MDPR_HEADER 0x4D445052
74#define CONT_HEADER 0x434F4e54
75
76#define RAFF4_HEADER 0x2E7261FD
77
78
79static int
80processMediaProperties (const Media_Properties *prop,
81 EXTRACTOR_MetaDataProcessor proc,
82 void *proc_cls)
83{
84
85 UINT8 mime_type_size;
86 UINT32 prop_size;
87
88 prop_size = ntohl (prop->size);
89 if (prop_size <= sizeof (Media_Properties))
90 return 0;
91 if (0 != prop->object_version)
92 return 0;
93 if (prop_size <= prop->stream_name_size + sizeof (UINT8)
94 + sizeof (Media_Properties))
95 return 0;
96
97 mime_type_size = prop->data[prop->stream_name_size];
98 if (prop_size > prop->stream_name_size + sizeof (UINT8)
99 + +mime_type_size + sizeof (Media_Properties))
100 {
101 char data[mime_type_size + 1];
102 memcpy (data, &prop->data[prop->stream_name_size + 1], mime_type_size);
103 data[mime_type_size] = '\0';
104
105 return proc (proc_cls,
106 "real",
107 EXTRACTOR_METATYPE_MIMETYPE,
108 EXTRACTOR_METAFORMAT_UTF8,
109 "text/plain",
110 data,
111 strlen (data));
112 }
113 return 0;
114}
115
116
117static int
118processContentDescription (const Content_Description *prop,
119 EXTRACTOR_MetaDataProcessor proc,
120 void *proc_cls)
121{
122 UINT16 author_len;
123 UINT16 copyright_len;
124 UINT16 comment_len;
125 UINT16 title_len;
126 char *title;
127 char *author;
128 char *copyright;
129 char *comment;
130 UINT32 prop_size;
131 int ret;
132
133 prop_size = ntohl (prop->size);
134 if (prop_size <= sizeof (Content_Description))
135 return 0;
136 if (0 != prop->object_version)
137 return 0;
138 title_len = ntohs (prop->title_len);
139 if (prop_size <= title_len + sizeof (UINT16) + sizeof (Content_Description))
140 return 0;
141 author_len = ntohs (*(UINT16 *) &prop->data[title_len]);
142 if (prop_size <= title_len + sizeof (UINT16)
143 + author_len + sizeof (Content_Description))
144 return 0;
145
146 copyright_len = ntohs (*(UINT16 *) &prop->data[title_len
147 + author_len
148 + sizeof (UINT16)]);
149
150 if (prop_size <= title_len + 2 * sizeof (UINT16)
151 + author_len + copyright_len + sizeof (Content_Description))
152 return 0;
153
154 comment_len = ntohs (*(UINT16 *) &prop->data[title_len
155 + author_len
156 + copyright_len
157 + 2 * sizeof (UINT16)]);
158
159 if (prop_size < title_len + 3 * sizeof (UINT16)
160 + author_len + copyright_len + comment_len
161 + sizeof (Content_Description))
162 return 0;
163
164 ret = 0;
165 title = malloc (title_len + 1);
166 if (title != NULL)
167 {
168 memcpy (title, &prop->data[0], title_len);
169 title[title_len] = '\0';
170 ret = proc (proc_cls,
171 "real",
172 EXTRACTOR_METATYPE_TITLE,
173 EXTRACTOR_METAFORMAT_UTF8,
174 "text/plain",
175 title,
176 strlen (title) + 1);
177 free (title);
178 }
179 if (ret != 0)
180 return ret;
181
182 author = malloc (author_len + 1);
183 if (author != NULL)
184 {
185 memcpy (author, &prop->data[title_len + sizeof (UINT16)], author_len);
186 author[author_len] = '\0';
187 ret = proc (proc_cls,
188 "real",
189 EXTRACTOR_METATYPE_AUTHOR_NAME,
190 EXTRACTOR_METAFORMAT_UTF8,
191 "text/plain",
192 author,
193 strlen (author) + 1);
194 free (author);
195 }
196 if (ret != 0)
197 return ret;
198
199 copyright = malloc (copyright_len + 1);
200 if (copyright != NULL)
201 {
202 memcpy (copyright,
203 &prop->data[title_len + sizeof (UINT16) * 2 + author_len],
204 copyright_len);
205 copyright[copyright_len] = '\0';
206 ret = proc (proc_cls,
207 "real",
208 EXTRACTOR_METATYPE_COPYRIGHT,
209 EXTRACTOR_METAFORMAT_UTF8,
210 "text/plain",
211 copyright,
212 strlen (copyright) + 1);
213 free (copyright);
214 }
215 if (ret != 0)
216 return ret;
217
218 comment = malloc (comment_len + 1);
219 if (comment != NULL)
220 {
221 memcpy (comment,
222 &prop->data[title_len + sizeof (UINT16) * 3 + author_len
223 + copyright_len], comment_len);
224 comment[comment_len] = '\0';
225 ret = proc (proc_cls,
226 "real",
227 EXTRACTOR_METATYPE_COMMENT,
228 EXTRACTOR_METAFORMAT_UTF8,
229 "text/plain",
230 comment,
231 strlen (comment) + 1);
232 free (comment);
233 }
234 if (ret != 0)
235 return ret;
236 return 0;
237}
238
239
240typedef struct RAFF4_header
241{
242 unsigned short version;
243 unsigned short revision;
244 unsigned short header_length;
245 unsigned short compression_type;
246 unsigned int granularity;
247 unsigned int total_bytes;
248 unsigned int bytes_per_minute;
249 unsigned int bytes_per_minute2;
250 unsigned short interleave_factor;
251 unsigned short interleave_block_size;
252 unsigned int user_data;
253 float sample_rate;
254 unsigned short sample_size;
255 unsigned short channels;
256 unsigned char interleave_code[5];
257 unsigned char compression_code[5];
258 unsigned char is_interleaved;
259 unsigned char copy_byte;
260 unsigned char stream_type;
261 /*
262 unsigned char tlen;
263 unsigned char title[tlen];
264 unsigned char alen;
265 unsigned char author[alen];
266 unsigned char clen;
267 unsigned char copyright[clen];
268 unsigned char aplen;
269 unsigned char app[aplen]; */
270} RAFF4_header;
271
272#define RAFF4_HDR_SIZE 53
273
274static char *
275stndup (const char *str, size_t n)
276{
277 char *tmp;
278 tmp = malloc (n + 1);
279 if (tmp == NULL)
280 return NULL;
281 tmp[n] = '\0';
282 memcpy (tmp, str, n);
283 return tmp;
284}
285
286
287/* audio/vnd.rn-realaudio */
288int
289EXTRACTOR_real_extract (const unsigned char *data,
290 size_t size,
291 EXTRACTOR_MetaDataProcessor proc,
292 void *proc_cls,
293 const char *options)
294{
295 const unsigned char *pos;
296 const unsigned char *end;
297 unsigned int length;
298 const RAFF4_header *hdr;
299 unsigned char tlen;
300 unsigned char alen;
301 unsigned char clen;
302 unsigned char aplen;
303 char *x;
304 int ret;
305
306 if (size <= 2 * sizeof (int))
307 return 0;
308 if (RAFF4_HEADER == ntohl (*(int *) data))
309 {
310 /* HELIX */
311 if (size <= RAFF4_HDR_SIZE + 16 + 4)
312 return 0;
313 if (0 != proc (proc_cls,
314 "real",
315 EXTRACTOR_METATYPE_MIMETYPE,
316 EXTRACTOR_METAFORMAT_UTF8,
317 "text/plain",
318 "audio/vnd.rn-realaudio",
319 strlen ("audio/vnd.rn-realaudio") + 1))
320 return 1;
321 hdr = (const RAFF4_header *) &data[16];
322 if (ntohs (hdr->header_length) + 16 > size)
323 return 0;
324 tlen = data[16 + RAFF4_HDR_SIZE];
325 if (tlen + RAFF4_HDR_SIZE + 20 > size)
326 return 0;
327 alen = data[17 + tlen + RAFF4_HDR_SIZE];
328 if (tlen + alen + RAFF4_HDR_SIZE + 20 > size)
329 return 0;
330 clen = data[18 + tlen + alen + RAFF4_HDR_SIZE];
331 if (tlen + alen + clen + RAFF4_HDR_SIZE + 20 > size)
332 return 0;
333 aplen = data[19 + tlen + clen + alen + RAFF4_HDR_SIZE];
334 if (tlen + alen + clen + aplen + RAFF4_HDR_SIZE + 20 > size)
335 return 0;
336 ret = 0;
337 if ( (tlen > 0) && (ret == 0) )
338 {
339 x = stndup ((const char *) &data[17 + RAFF4_HDR_SIZE], tlen);
340 if (x != NULL)
341 {
342 ret = proc (proc_cls,
343 "real",
344 EXTRACTOR_METATYPE_MIMETYPE,
345 EXTRACTOR_METAFORMAT_UTF8,
346 "text/plain",
347 x,
348 strlen (x) + 1);
349 free (x);
350 }
351 }
352 if ( (alen > 0) && (ret == 0) )
353 {
354 x = stndup ((const char *) &data[18 + RAFF4_HDR_SIZE + tlen], alen);
355 if (x != NULL)
356 {
357 ret = proc (proc_cls,
358 "real",
359 EXTRACTOR_METATYPE_MIMETYPE,
360 EXTRACTOR_METAFORMAT_UTF8,
361 "text/plain",
362 x,
363 strlen (x) + 1);
364 free (x);
365 }
366 }
367 if ( (clen > 0) && (ret == 0) )
368 {
369 x = stndup ((const char *) &data[19 + RAFF4_HDR_SIZE + tlen + alen],
370 clen);
371 if (x != NULL)
372 {
373 ret = proc (proc_cls,
374 "real",
375 EXTRACTOR_METATYPE_MIMETYPE,
376 EXTRACTOR_METAFORMAT_UTF8,
377 "text/plain",
378 x,
379 strlen (x) + 1);
380 free (x);
381 }
382 }
383 if ( (aplen > 0) && (ret == 0) )
384 {
385 x = stndup ((const char *) &data[20 + RAFF4_HDR_SIZE + tlen + alen
386 + clen], aplen);
387 if (x != NULL)
388 {
389 ret = proc (proc_cls,
390 "real",
391 EXTRACTOR_METATYPE_MIMETYPE,
392 EXTRACTOR_METAFORMAT_UTF8,
393 "text/plain",
394 x,
395 strlen (x) + 1);
396 free (x);
397 }
398 }
399 return ret;
400 }
401 if (REAL_HEADER == ntohl (*(int *) data))
402 {
403 /* old real */
404 end = &data[size];
405 pos = &data[0];
406 ret = 0;
407 while (0 == ret)
408 {
409 if ((pos + 8 >= end) || (pos + 8 < pos))
410 break;
411 length = ntohl (*(((unsigned int *) pos) + 1));
412 if (length <= 0)
413 break;
414 if ((pos + length >= end) || (pos + length < pos))
415 break;
416 switch (ntohl (*((unsigned int *) pos)))
417 {
418 case MDPR_HEADER:
419 ret = processMediaProperties ((Media_Properties *) pos,
420 proc,
421 proc_cls);
422 pos += length;
423 break;
424 case CONT_HEADER:
425 ret = processContentDescription ((Content_Description *) pos,
426 proc,
427 proc_cls);
428 pos += length;
429 break;
430 case REAL_HEADER: /* treat like default */
431 default:
432 pos += length;
433 break;
434 }
435 }
436 return ret;
437 }
438 return 0;
439}
diff --git a/src/plugins/old/pack.c b/src/plugins/pack.c
index 4f9e19d..4f9e19d 100644
--- a/src/plugins/old/pack.c
+++ b/src/plugins/pack.c
diff --git a/src/plugins/old/pack.h b/src/plugins/pack.h
index 74bc172..74bc172 100644
--- a/src/plugins/old/pack.h
+++ b/src/plugins/pack.h
diff --git a/src/plugins/previewopus_extractor.c b/src/plugins/previewopus_extractor.c
deleted file mode 100644
index 45ea420..0000000
--- a/src/plugins/previewopus_extractor.c
+++ /dev/null
@@ -1,1221 +0,0 @@
1/*
2 This file is part of libextractor.
3 Copyright Copyright (C) 2008, 2013 Bruno Cabral and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */
20/**
21 * @file previewopus_extractor.c
22 * @author Bruno Cabral
23 * @author Christian Grothoff
24 * @brief this extractor produces a binary encoded
25 * audio snippet of music/video files using ffmpeg libs.
26 *
27 * Based on ffmpeg samples.
28 *
29 * Note that ffmpeg has a few issues:
30 * (1) there are no recent official releases of the ffmpeg libs
31 * (2) ffmpeg has a history of having security issues (parser is not robust)
32 *
33 * So this plugin cannot be recommended for system with high security
34 *requirements.
35 */
36#include "platform.h"
37#include "extractor.h"
38#include <magic.h>
39
40#include <libavutil/avutil.h>
41#include <libavutil/audio_fifo.h>
42#include <libavutil/opt.h>
43#include <libavutil/mathematics.h>
44#include <libavformat/avformat.h>
45#include <libavcodec/avcodec.h>
46#include <libswscale/swscale.h>
47#include <libavresample/avresample.h>
48
49
50/**
51 * Set to 1 to enable debug output.
52 */
53#define DEBUG 0
54
55/**
56 * Set to 1 to enable a output file for testing.
57 */
58#define OUTPUT_FILE 0
59
60
61/**
62 * Maximum size in bytes for the preview.
63 */
64#define MAX_SIZE (28 * 1024)
65
66/**
67 * HardLimit for file
68 */
69#define HARD_LIMIT_SIZE (50 * 1024)
70
71
72/** The output bit rate in kbit/s */
73#define OUTPUT_BIT_RATE 28000
74/** The number of output channels */
75#define OUTPUT_CHANNELS 2
76/** The audio sample output format */
77#define OUTPUT_SAMPLE_FORMAT AV_SAMPLE_FMT_S16
78
79
80/** Our output buffer*/
81static unsigned char *buffer;
82
83/** Actual output buffer size */
84static int totalSize;
85
86/**
87 * Convert an error code into a text message.
88 * @param error Error code to be converted
89 * @return Corresponding error text (not thread-safe)
90 */
91static char *const
92get_error_text (const int error)
93{
94 static char error_buffer[255];
95 av_strerror (error, error_buffer, sizeof(error_buffer));
96 return error_buffer;
97}
98
99
100/**
101 * Read callback.
102 *
103 * @param opaque the 'struct EXTRACTOR_ExtractContext'
104 * @param buf where to write data
105 * @param buf_size how many bytes to read
106 * @return -1 on error (or for unknown file size)
107 */
108static int
109read_cb (void *opaque,
110 uint8_t *buf,
111 int buf_size)
112{
113 struct EXTRACTOR_ExtractContext *ec = opaque;
114 void *data;
115 ssize_t ret;
116
117 ret = ec->read (ec->cls, &data, buf_size);
118 if (ret <= 0)
119 return ret;
120 memcpy (buf, data, ret);
121 return ret;
122}
123
124
125/**
126 * Seek callback.
127 *
128 * @param opaque the 'struct EXTRACTOR_ExtractContext'
129 * @param offset where to seek
130 * @param whence how to seek; AVSEEK_SIZE to return file size without seeking
131 * @return -1 on error (or for unknown file size)
132 */
133static int64_t
134seek_cb (void *opaque,
135 int64_t offset,
136 int whence)
137{
138 struct EXTRACTOR_ExtractContext *ec = opaque;
139
140 if (AVSEEK_SIZE == whence)
141 return ec->get_size (ec->cls);
142 return ec->seek (ec->cls, offset, whence);
143}
144
145
146/**
147 * write callback.
148 *
149 * @param opaque NULL
150 * @param pBuffer to write
151 * @param pBufferSize , amount to write
152 * @return 0 on error
153 */
154static int
155writePacket (void *opaque,
156 unsigned char *pBuffer,
157 int pBufferSize)
158{
159 int sizeToCopy = pBufferSize;
160
161 if ( (totalSize + pBufferSize) > HARD_LIMIT_SIZE)
162 sizeToCopy = HARD_LIMIT_SIZE - totalSize;
163
164 memcpy (buffer + totalSize, pBuffer, sizeToCopy);
165 totalSize += sizeToCopy;
166 return sizeToCopy;
167}
168
169
170/**
171 * Open an output file and the required encoder.
172 * Also set some basic encoder parameters.
173 * Some of these parameters are based on the input file's parameters.
174 */
175static int
176open_output_file (
177 AVCodecContext *input_codec_context,
178 AVFormatContext **output_format_context,
179 AVCodecContext **output_codec_context)
180{
181 AVStream *stream = NULL;
182 AVCodec *output_codec = NULL;
183 AVIOContext *io_ctx;
184 int error;
185 unsigned char *iob;
186
187 if (NULL == (iob = av_malloc (16 * 1024)))
188 return AVERROR_EXIT;
189 if (NULL == (io_ctx = avio_alloc_context (iob, 16 * 1024,
190 AVIO_FLAG_WRITE, NULL,
191 NULL,
192 &writePacket /* no writing */,
193 NULL)))
194 {
195 av_free (iob);
196 return AVERROR_EXIT;
197 }
198 if (NULL == ((*output_format_context) = avformat_alloc_context ()))
199 {
200 av_free (io_ctx);
201 return AVERROR_EXIT;
202 }
203 (*output_format_context)->pb = io_ctx;
204
205 /** Guess the desired container format based on the file extension. */
206 if (! ((*output_format_context)->oformat = av_guess_format (NULL,
207 "file.ogg",
208 NULL)))
209 {
210#if DEBUG
211 fprintf (stderr, "Could not find output file format\n");
212#endif
213 error = AVERROR (ENOSYS);
214 goto cleanup;
215 }
216
217 /** Find the encoder to be used by its name. */
218 if (! (output_codec = avcodec_find_encoder (AV_CODEC_ID_OPUS)))
219 {
220#if DEBUG
221 fprintf (stderr, "Could not find an OPUS encoder.\n");
222#endif
223 error = AVERROR (ENOSYS);
224 goto cleanup;
225 }
226
227 /** Create a new audio stream in the output file container. */
228 if (! (stream = avformat_new_stream (*output_format_context, output_codec)))
229 {
230#if DEBUG
231 fprintf (stderr, "Could not create new stream\n");
232#endif
233 error = AVERROR (ENOMEM);
234 goto cleanup;
235 }
236
237 /** Save the encoder context for easiert access later. */
238 *output_codec_context = stream->codec;
239
240 /**
241 * Set the basic encoder parameters.
242 * The input file's sample rate is used to avoid a sample rate conversion.
243 */
244 (*output_codec_context)->channels = OUTPUT_CHANNELS;
245 (*output_codec_context)->channel_layout = av_get_default_channel_layout (
246 OUTPUT_CHANNELS);
247 (*output_codec_context)->sample_rate = 48000; // Opus need 48000
248 (*output_codec_context)->sample_fmt = AV_SAMPLE_FMT_S16;
249 (*output_codec_context)->bit_rate = OUTPUT_BIT_RATE;
250
251 /** Open the encoder for the audio stream to use it later. */
252 if ((error = avcodec_open2 (*output_codec_context, output_codec, NULL)) < 0)
253 {
254#if DEBUG
255 fprintf (stderr, "Could not open output codec (error '%s')\n",
256 get_error_text (error));
257#endif
258 goto cleanup;
259 }
260 return 0;
261
262cleanup:
263 av_free (io_ctx);
264 return error < 0 ? error : AVERROR_EXIT;
265}
266
267
268/** Initialize one data packet for reading or writing. */
269static void
270init_packet (AVPacket *packet)
271{
272 av_init_packet (packet);
273 /** Set the packet data and size so that it is recognized as being empty. */
274 packet->data = NULL;
275 packet->size = 0;
276}
277
278
279/** Initialize one audio frame for reading from the input file */
280static int
281init_input_frame (AVFrame **frame)
282{
283 *frame = av_frame_alloc ();
284 if (NULL == *frame)
285 {
286#if DEBUG
287 fprintf (stderr, "Could not allocate input frame\n");
288#endif
289 return AVERROR (ENOMEM);
290 }
291 return 0;
292}
293
294
295/**
296 * Initialize the audio resampler based on the input and output codec settings.
297 * If the input and output sample formats differ, a conversion is required
298 * libavresample takes care of this, but requires initialization.
299 */
300static int
301init_resampler (AVCodecContext *input_codec_context,
302 AVCodecContext *output_codec_context,
303 AVAudioResampleContext **resample_context)
304{
305 /**
306 * Only initialize the resampler if it is necessary, i.e.,
307 * if and only if the sample formats differ.
308 */
309 if ((input_codec_context->sample_fmt != output_codec_context->sample_fmt) ||
310 (input_codec_context->channels != output_codec_context->channels) )
311 {
312 int error;
313
314 /** Create a resampler context for the conversion. */
315 if (! (*resample_context = avresample_alloc_context ()))
316 {
317#if DEBUG
318 fprintf (stderr, "Could not allocate resample context\n");
319#endif
320 return AVERROR (ENOMEM);
321 }
322
323
324 /**
325 * Set the conversion parameters.
326 * Default channel layouts based on the number of channels
327 * are assumed for simplicity (they are sometimes not detected
328 * properly by the demuxer and/or decoder).
329 */av_opt_set_int (*resample_context, "in_channel_layout",
330 av_get_default_channel_layout (
331 input_codec_context->channels), 0);
332 av_opt_set_int (*resample_context, "out_channel_layout",
333 av_get_default_channel_layout (
334 output_codec_context->channels), 0);
335 av_opt_set_int (*resample_context, "in_sample_rate",
336 input_codec_context->sample_rate, 0);
337 av_opt_set_int (*resample_context, "out_sample_rate",
338 output_codec_context->sample_rate, 0);
339 av_opt_set_int (*resample_context, "in_sample_fmt",
340 input_codec_context->sample_fmt, 0);
341 av_opt_set_int (*resample_context, "out_sample_fmt",
342 output_codec_context->sample_fmt, 0);
343
344 /** Open the resampler with the specified parameters. */
345 if ((error = avresample_open (*resample_context)) < 0)
346 {
347#if DEBUG
348 fprintf (stderr, "Could not open resample context\n");
349#endif
350 avresample_free (resample_context);
351 return error;
352 }
353 }
354 return 0;
355}
356
357
358/** Initialize a FIFO buffer for the audio samples to be encoded. */
359static int
360init_fifo (AVAudioFifo **fifo)
361{
362 /** Create the FIFO buffer based on the specified output sample format. */
363 if (! (*fifo = av_audio_fifo_alloc (OUTPUT_SAMPLE_FORMAT, OUTPUT_CHANNELS,
364 1)))
365 {
366#if DEBUG
367 fprintf (stderr, "Could not allocate FIFO\n");
368#endif
369 return AVERROR (ENOMEM);
370 }
371 return 0;
372}
373
374
375/** Write the header of the output file container. */
376static int
377write_output_file_header (AVFormatContext *output_format_context)
378{
379 int error;
380 if ((error = avformat_write_header (output_format_context, NULL)) < 0)
381 {
382#if DEBUG
383 fprintf (stderr, "Could not write output file header (error '%s')\n",
384 get_error_text (error));
385#endif
386 return error;
387 }
388 return 0;
389}
390
391
392/** Decode one audio frame from the input file. */
393static int
394decode_audio_frame (AVFrame *frame,
395 AVFormatContext *input_format_context,
396 AVCodecContext *input_codec_context, int audio_stream_index,
397 int *data_present, int *finished)
398{
399 /** Packet used for temporary storage. */
400 AVPacket input_packet;
401 int error;
402 init_packet (&input_packet);
403
404 /** Read one audio frame from the input file into a temporary packet. */
405 while (1)
406 {
407 if ((error = av_read_frame (input_format_context, &input_packet)) < 0)
408 {
409 /** If we are the the end of the file, flush the decoder below. */
410 if (error == AVERROR_EOF)
411 {
412#if DEBUG
413 fprintf (stderr, "EOF in decode_audio\n");
414#endif
415 *finished = 1;
416 }
417 else
418 {
419#if DEBUG
420 fprintf (stderr, "Could not read frame (error '%s')\n",
421 get_error_text (error));
422#endif
423 return error;
424 }
425 }
426
427 if (input_packet.stream_index == audio_stream_index)
428 break;
429 }
430
431 /**
432 * Decode the audio frame stored in the temporary packet.
433 * The input audio stream decoder is used to do this.
434 * If we are at the end of the file, pass an empty packet to the decoder
435 * to flush it.
436 */if ((error = avcodec_decode_audio4 (input_codec_context, frame,
437 data_present, &input_packet)) < 0)
438 {
439#if DEBUG
440 fprintf (stderr, "Could not decode frame (error '%s')\n",
441 get_error_text (error));
442#endif
443 av_packet_unref (&input_packet);
444 return error;
445 }
446
447 /**
448 * If the decoder has not been flushed completely, we are not finished,
449 * so that this function has to be called again.
450 */
451 if (*finished && *data_present)
452 *finished = 0;
453 av_packet_unref (&input_packet);
454 return 0;
455}
456
457
458/**
459 * Initialize a temporary storage for the specified number of audio samples.
460 * The conversion requires temporary storage due to the different format.
461 * The number of audio samples to be allocated is specified in frame_size.
462 */
463static int
464init_converted_samples (uint8_t ***converted_input_samples, int*out_linesize,
465 AVCodecContext *output_codec_context,
466 int frame_size)
467{
468 int error;
469
470 /**
471 * Allocate as many pointers as there are audio channels.
472 * Each pointer will later point to the audio samples of the corresponding
473 * channels (although it may be NULL for interleaved formats).
474 */if (! (*converted_input_samples = calloc (output_codec_context->channels,
475 sizeof(**converted_input_samples))))
476 {
477#if DEBUG
478 fprintf (stderr, "Could not allocate converted input sample pointers\n");
479#endif
480 return AVERROR (ENOMEM);
481 }
482
483 /**
484 * Allocate memory for the samples of all channels in one consecutive
485 * block for convenience.
486 */
487 if ((error = av_samples_alloc (*converted_input_samples, out_linesize,
488 output_codec_context->channels,
489 frame_size,
490 output_codec_context->sample_fmt, 0)) < 0)
491 {
492#if DEBUG
493 fprintf (stderr,
494 "Could not allocate converted input samples (error '%s')\n",
495 get_error_text (error));
496#endif
497 av_freep (&(*converted_input_samples)[0]);
498 free (*converted_input_samples);
499 return error;
500 }
501 return 0;
502}
503
504
505/**
506 * Convert the input audio samples into the output sample format.
507 * The conversion happens on a per-frame basis, the size of which is specified
508 * by frame_size.
509 */
510static int
511convert_samples (uint8_t **input_data,
512 uint8_t **converted_data, const int in_sample, const int
513 out_sample, const int out_linesize,
514 AVAudioResampleContext *resample_context)
515{
516 int error;
517
518 /** Convert the samples using the resampler. */
519 if ((error = avresample_convert (resample_context, converted_data,
520 out_linesize,
521 out_sample, input_data, 0, in_sample)) < 0)
522 {
523#if DEBUG
524 fprintf (stderr, "Could not convert input samples (error '%s')\n",
525 get_error_text (error));
526#endif
527 return error;
528 }
529
530
531 /**
532 * Perform a sanity check so that the number of converted samples is
533 * not greater than the number of samples to be converted.
534 * If the sample rates differ, this case has to be handled differently
535 */if (avresample_available (resample_context))
536 {
537#if DEBUG
538 fprintf (stderr, "%i Converted samples left over\n",avresample_available (
539 resample_context));
540#endif
541 }
542
543
544 return 0;
545}
546
547
548/** Add converted input audio samples to the FIFO buffer for later processing. */
549static int
550add_samples_to_fifo (AVAudioFifo *fifo,
551 uint8_t **converted_input_samples,
552 const int frame_size)
553{
554 int error;
555
556 /**
557 * Make the FIFO as large as it needs to be to hold both,
558 * the old and the new samples.
559 */
560 if ((error = av_audio_fifo_realloc (fifo, av_audio_fifo_size (fifo)
561 + frame_size)) < 0)
562 {
563#if DEBUG
564 fprintf (stderr, "Could not reallocate FIFO\n");
565#endif
566 return error;
567 }
568
569 /** Store the new samples in the FIFO buffer. */
570 if (av_audio_fifo_write (fifo, (void **) converted_input_samples,
571 frame_size) < frame_size)
572 {
573#if DEBUG
574 fprintf (stderr, "Could not write data to FIFO\n");
575#endif
576 return AVERROR_EXIT;
577 }
578 return 0;
579}
580
581
582/**
583 * Read one audio frame from the input file, decodes, converts and stores
584 * it in the FIFO buffer.
585 */
586static int
587read_decode_convert_and_store (AVAudioFifo *fifo,
588 AVFormatContext *input_format_context,
589 AVCodecContext *input_codec_context,
590 AVCodecContext *output_codec_context,
591 AVAudioResampleContext *resampler_context, int
592 audio_stream_index,
593 int *finished)
594{
595 /** Temporary storage of the input samples of the frame read from the file. */
596 AVFrame *input_frame = NULL;
597 /** Temporary storage for the converted input samples. */
598 uint8_t **converted_input_samples = NULL;
599 int data_present;
600 int ret = AVERROR_EXIT;
601
602 /** Initialize temporary storage for one input frame. */
603 if (init_input_frame (&input_frame))
604 {
605#if DEBUG
606 fprintf (stderr, "Failed at init frame\n");
607#endif
608 goto cleanup;
609
610 }
611 /** Decode one frame worth of audio samples. */
612 if (decode_audio_frame (input_frame, input_format_context,
613 input_codec_context, audio_stream_index,
614 &data_present, finished))
615 {
616#if DEBUG
617 fprintf (stderr, "Failed at decode audio\n");
618#endif
619
620 goto cleanup;
621
622 }
623 /**
624 * If we are at the end of the file and there are no more samples
625 * in the decoder which are delayed, we are actually finished.
626 * This must not be treated as an error.
627 */if (*finished && ! data_present)
628 {
629 ret = 0;
630#if DEBUG
631 fprintf (stderr, "Failed at finished or no data\n");
632#endif
633 goto cleanup;
634 }
635 /** If there is decoded data, convert and store it */
636 if (data_present)
637 {
638 int out_linesize;
639 // FIX ME: I'm losing samples, but can't get it to work.
640 int out_samples = avresample_available (resampler_context)
641 + avresample_get_delay (resampler_context)
642 + input_frame->nb_samples;
643
644
645 // fprintf(stderr, "Input nbsamples %i out_samples: %i \n",input_frame->nb_samples,out_samples);
646
647 /** Initialize the temporary storage for the converted input samples. */
648 if (init_converted_samples (&converted_input_samples, &out_linesize,
649 output_codec_context,
650 out_samples))
651 {
652#if DEBUG
653 fprintf (stderr, "Failed at init_converted_samples\n");
654#endif
655 goto cleanup;
656 }
657
658 /**
659 * Convert the input samples to the desired output sample format.
660 * This requires a temporary storage provided by converted_input_samples.
661 */
662 if (convert_samples (input_frame->extended_data, converted_input_samples,
663 input_frame->nb_samples, out_samples, out_linesize,
664 resampler_context))
665 {
666
667
668#if DEBUG
669 fprintf (stderr, "Failed at convert_samples, input frame %i \n",
670 input_frame->nb_samples);
671#endif
672 goto cleanup;
673 }
674 /** Add the converted input samples to the FIFO buffer for later processing. */
675 if (add_samples_to_fifo (fifo, converted_input_samples,
676 out_samples))
677 {
678#if DEBUG
679 fprintf (stderr, "Failed at add_samples_to_fifo\n");
680#endif
681 goto cleanup;
682 }
683 ret = 0;
684 }
685 ret = 0;
686
687cleanup:
688 if (converted_input_samples)
689 {
690 av_freep (&converted_input_samples[0]);
691 free (converted_input_samples);
692 }
693 av_frame_free (&input_frame);
694 return ret;
695}
696
697
698/**
699 * Initialize one input frame for writing to the output file.
700 * The frame will be exactly frame_size samples large.
701 */
702static int
703init_output_frame (AVFrame **frame,
704 AVCodecContext *output_codec_context,
705 int frame_size)
706{
707 int error;
708
709 /** Create a new frame to store the audio samples. */
710 *frame = av_frame_alloc ();
711 if (NULL == *frame)
712 {
713#if DEBUG
714 fprintf (stderr, "Could not allocate output frame\n");
715#endif
716 return AVERROR_EXIT;
717 }
718
719 /**
720 * Set the frame's parameters, especially its size and format.
721 * av_frame_get_buffer needs this to allocate memory for the
722 * audio samples of the frame.
723 * Default channel layouts based on the number of channels
724 * are assumed for simplicity.
725 */(*frame)->nb_samples = frame_size;
726 (*frame)->channel_layout = output_codec_context->channel_layout;
727 (*frame)->format = output_codec_context->sample_fmt;
728 (*frame)->sample_rate = output_codec_context->sample_rate;
729
730
731 // fprintf(stderr, "%i %i \n",frame_size , (*frame)->format,(*frame)->sample_rate);
732
733 /**
734 * Allocate the samples of the created frame. This call will make
735 * sure that the audio frame can hold as many samples as specified.
736 */
737 if ((error = av_frame_get_buffer (*frame, 0)) < 0)
738 {
739#if DEBUG
740 fprintf (stderr, "Could allocate output frame samples (error '%s')\n",
741 get_error_text (error));
742#endif
743 av_frame_free (frame);
744 return error;
745 }
746
747 return 0;
748}
749
750
751/** Encode one frame worth of audio to the output file. */
752static int
753encode_audio_frame (AVFrame *frame,
754 AVFormatContext *output_format_context,
755 AVCodecContext *output_codec_context,
756 int *data_present)
757{
758 /** Packet used for temporary storage. */
759 AVPacket output_packet;
760 int error;
761 init_packet (&output_packet);
762
763 /**
764 * Encode the audio frame and store it in the temporary packet.
765 * The output audio stream encoder is used to do this.
766 */
767 if ((error = avcodec_encode_audio2 (output_codec_context, &output_packet,
768 frame, data_present)) < 0)
769 {
770#if DEBUG
771 fprintf (stderr, "Could not encode frame (error '%s')\n",
772 get_error_text (error));
773#endif
774 av_packet_unref (&output_packet);
775 return error;
776 }
777
778 /** Write one audio frame from the temporary packet to the output file. */
779 if (*data_present)
780 {
781 if ((error = av_write_frame (output_format_context, &output_packet)) < 0)
782 {
783#if DEBUG
784 fprintf (stderr, "Could not write frame (error '%s')\n",
785 get_error_text (error));
786#endif
787
788 av_packet_unref (&output_packet);
789 return error;
790 }
791
792 av_packet_unref (&output_packet);
793 }
794
795 return 0;
796}
797
798
799/**
800 * Load one audio frame from the FIFO buffer, encode and write it to the
801 * output file.
802 */
803static int
804load_encode_and_write (AVAudioFifo *fifo,
805 AVFormatContext *output_format_context,
806 AVCodecContext *output_codec_context)
807{
808 /** Temporary storage of the output samples of the frame written to the file. */
809 AVFrame *output_frame;
810 /**
811 * Use the maximum number of possible samples per frame.
812 * If there is less than the maximum possible frame size in the FIFO
813 * buffer use this number. Otherwise, use the maximum possible frame size
814 */const int frame_size = FFMIN (av_audio_fifo_size (fifo),
815 output_codec_context->frame_size);
816 int data_written;
817
818 /** Initialize temporary storage for one output frame. */
819 if (init_output_frame (&output_frame, output_codec_context, frame_size))
820 return AVERROR_EXIT;
821
822 /**
823 * Read as many samples from the FIFO buffer as required to fill the frame.
824 * The samples are stored in the frame temporarily.
825 */
826 if (av_audio_fifo_read (fifo, (void **) output_frame->data, frame_size) <
827 frame_size)
828 {
829#if DEBUG
830 fprintf (stderr, "Could not read data from FIFO\n");
831#endif
832 av_frame_free (&output_frame);
833 return AVERROR_EXIT;
834 }
835
836 /** Encode one frame worth of audio samples. */
837 if (encode_audio_frame (output_frame, output_format_context,
838 output_codec_context, &data_written))
839 {
840 av_frame_free (&output_frame);
841 return AVERROR_EXIT;
842 }
843 av_frame_free (&output_frame);
844 return 0;
845}
846
847
848/** Write the trailer of the output file container. */
849static int
850write_output_file_trailer (AVFormatContext *output_format_context)
851{
852 int error;
853 if ((error = av_write_trailer (output_format_context)) < 0)
854 {
855#if DEBUG
856 fprintf (stderr, "Could not write output file trailer (error '%s')\n",
857 get_error_text (error));
858#endif
859 return error;
860 }
861 return 0;
862}
863
864
865#define ENUM_CODEC_ID enum AVCodecID
866
867
868/**
869 * Perform the audio snippet extraction
870 *
871 * @param ec extraction context to use
872 */
873static void
874extract_audio (struct EXTRACTOR_ExtractContext *ec)
875{
876 AVIOContext *io_ctx;
877 struct AVFormatContext *format_ctx;
878 AVCodecContext *codec_ctx;
879 AVFormatContext *output_format_context = NULL;
880 AVCodec *codec;
881 AVDictionary *options;
882 AVFrame *frame;
883 AVCodecContext*output_codec_context = NULL;
884 AVAudioResampleContext *resample_context = NULL;
885 AVAudioFifo *fifo = NULL;
886
887 int audio_stream_index;
888 int i;
889 int err;
890 int duration;
891 unsigned char *iob;
892
893
894 totalSize = 0;
895 if (NULL == (iob = av_malloc (16 * 1024)))
896 return;
897 if (NULL == (io_ctx = avio_alloc_context (iob,
898 16 * 1024,
899 0, ec,
900 &read_cb,
901 NULL /* no writing */,
902 &seek_cb)))
903 {
904 av_free (iob);
905 return;
906 }
907 if (NULL == (format_ctx = avformat_alloc_context ()))
908 {
909 av_free (io_ctx);
910 return;
911 }
912 format_ctx->pb = io_ctx;
913 options = NULL;
914 if (0 != avformat_open_input (&format_ctx, "<no file>", NULL, &options))
915 {
916 av_free (io_ctx);
917 return;
918 }
919 av_dict_free (&options);
920 if (0 > avformat_find_stream_info (format_ctx, NULL))
921 {
922#if DEBUG
923 fprintf (stderr,
924 "Failed to read stream info\n");
925#endif
926 avformat_close_input (&format_ctx);
927 av_free (io_ctx);
928 return;
929 }
930 codec = NULL;
931 codec_ctx = NULL;
932 audio_stream_index = -1;
933 for (i = 0; i<format_ctx->nb_streams; i++)
934 {
935 codec_ctx = format_ctx->streams[i]->codec;
936 if (AVMEDIA_TYPE_AUDIO != codec_ctx->codec_type)
937 continue;
938 if (NULL == (codec = avcodec_find_decoder (codec_ctx->codec_id)))
939 continue;
940 options = NULL;
941 if (0 != (err = avcodec_open2 (codec_ctx, codec, &options)))
942 {
943 codec = NULL;
944 continue;
945 }
946 av_dict_free (&options);
947 audio_stream_index = i;
948 break;
949 }
950 if ( (-1 == audio_stream_index) ||
951 (0 == codec_ctx->channels) )
952 {
953#if DEBUG
954 fprintf (stderr,
955 "No audio streams or no suitable codec found\n");
956#endif
957 if (NULL != codec)
958 avcodec_close (codec_ctx);
959 avformat_close_input (&format_ctx);
960 av_free (io_ctx);
961 return;
962 }
963
964 frame = av_frame_alloc ();
965 if (NULL == frame)
966 {
967#if DEBUG
968 fprintf (stderr,
969 "Failed to allocate frame\n");
970#endif
971 avcodec_close (codec_ctx);
972 avformat_close_input (&format_ctx);
973 av_free (io_ctx);
974 return;
975 }
976
977
978 if (! (buffer = malloc (HARD_LIMIT_SIZE)))
979 goto cleanup;
980
981
982 /** Open the output file for writing. */
983 if (open_output_file (codec_ctx,
984 &output_format_context,
985 &output_codec_context))
986 goto cleanup;
987 /** Initialize the resampler to be able to convert audio sample formats. */
988 if (init_resampler (codec_ctx,
989 output_codec_context,
990 &resample_context))
991 goto cleanup;
992 /** Initialize the FIFO buffer to store audio samples to be encoded. */
993 if (init_fifo (&fifo))
994 goto cleanup;
995
996 /** Write the header of the output file container. */
997 if (write_output_file_header (output_format_context))
998 goto cleanup;
999
1000
1001 if (format_ctx->duration == AV_NOPTS_VALUE)
1002 {
1003 duration = -1;
1004#if DEBUG
1005 fprintf (stderr,
1006 "Duration unknown\n");
1007#endif
1008 }
1009 else
1010 {
1011 duration = format_ctx->duration;
1012#if DEBUG
1013 fprintf (stderr,
1014 "Duration: %lld\n",
1015 format_ctx->duration);
1016#endif
1017 }
1018
1019 /* if duration is known, seek to first tried,
1020 * else use 10 sec into stream */
1021
1022 if (-1 != duration)
1023 err = av_seek_frame (format_ctx, -1, (duration / 3), 0);
1024 else
1025 err = av_seek_frame (format_ctx, -1, 10 * AV_TIME_BASE, 0);
1026
1027
1028 if (err >= 0)
1029 avcodec_flush_buffers (codec_ctx);
1030
1031
1032 /**
1033 * Loop as long as we have input samples to read or output samples
1034 * to write; abort as soon as we have neither.
1035 */
1036 while (1)
1037 {
1038 /** Use the encoder's desired frame size for processing. */
1039 const int output_frame_size = output_codec_context->frame_size;
1040 int finished = 0;
1041
1042 /**
1043 * Make sure that there is one frame worth of samples in the FIFO
1044 * buffer so that the encoder can do its work.
1045 * Since the decoder's and the encoder's frame size may differ, we
1046 * need to FIFO buffer to store as many frames worth of input samples
1047 * that they make up at least one frame worth of output samples.
1048 */while ((av_audio_fifo_size (fifo) < output_frame_size))
1049 {
1050 /**
1051 * Decode one frame worth of audio samples, convert it to the
1052 * output sample format and put it into the FIFO buffer.
1053 */
1054 if (read_decode_convert_and_store (fifo,
1055 format_ctx,
1056 codec_ctx,
1057 output_codec_context,
1058 resample_context,
1059 audio_stream_index,
1060 &finished))
1061 {
1062 goto cleanup;
1063 }
1064
1065 /**
1066 * If we are at the end of the input file, we continue
1067 * encoding the remaining audio samples to the output file.
1068 */
1069 if (finished)
1070 break;
1071 }
1072
1073 /* Already over our limit*/
1074 if (totalSize >= MAX_SIZE)
1075 finished = 1;
1076
1077 /**
1078 * If we have enough samples for the encoder, we encode them.
1079 * At the end of the file, we pass the remaining samples to
1080 * the encoder.
1081 *///
1082 while (av_audio_fifo_size (fifo) >= output_frame_size ||
1083 (finished && av_audio_fifo_size (fifo) > 0))
1084 {
1085 /**
1086 * Take one frame worth of audio samples from the FIFO buffer,
1087 * encode it and write it to the output file.
1088 */
1089 if (load_encode_and_write (fifo,
1090 output_format_context,
1091 output_codec_context))
1092 goto cleanup;
1093 }
1094 /**
1095 * If we are at the end of the input file and have encoded
1096 * all remaining samples, we can exit this loop and finish.
1097 */
1098 if (finished)
1099 {
1100 int data_written;
1101 /** Flush the encoder as it may have delayed frames. */
1102 do {
1103 encode_audio_frame (NULL,
1104 output_format_context,
1105 output_codec_context,
1106 &data_written);
1107 } while (data_written);
1108 break;
1109 }
1110 }
1111
1112 /** Write the trailer of the output file container. */
1113 if (write_output_file_trailer (output_format_context))
1114 goto cleanup;
1115 ec->proc (ec->cls,
1116 "previewopus",
1117 EXTRACTOR_METATYPE_AUDIO_PREVIEW,
1118 EXTRACTOR_METAFORMAT_BINARY,
1119 "audio/opus",
1120 buffer,
1121 totalSize);
1122
1123#if OUTPUT_FILE
1124 {
1125 FILE *f;
1126
1127 f = fopen ("example.opus", "wb");
1128 if (! f)
1129 {
1130 fprintf (stderr, "Could not open %s\n", "file");
1131 exit (1);
1132 }
1133 fwrite (buffer, 1, totalSize, f);
1134 fclose (f);
1135 }
1136#endif
1137
1138cleanup:
1139 av_free (frame);
1140 free (buffer);
1141
1142 if (fifo)
1143 av_audio_fifo_free (fifo);
1144 if (resample_context)
1145 {
1146 avresample_close (resample_context);
1147 avresample_free (&resample_context);
1148 }
1149 if (output_codec_context)
1150 avcodec_close (output_codec_context);
1151
1152 avcodec_close (codec_ctx);
1153 avformat_close_input (&format_ctx);
1154 av_free (io_ctx);
1155}
1156
1157
1158/**
1159 * Main method for the opus-preview plugin.
1160 *
1161 * @param ec extraction context
1162 */
1163void
1164EXTRACTOR_previewopus_extract_method (struct EXTRACTOR_ExtractContext *ec)
1165{
1166 ssize_t iret;
1167 void *data;
1168
1169 if (-1 == (iret = ec->read (ec->cls,
1170 &data,
1171 16 * 1024)))
1172 return;
1173
1174 if (0 != ec->seek (ec->cls, 0, SEEK_SET))
1175 return;
1176
1177 extract_audio (ec);
1178}
1179
1180
1181/**
1182 * Log callback. Does nothing.
1183 *
1184 * @param ptr NULL
1185 * @param level log level
1186 * @param format format string
1187 * @param ap arguments for format
1188 */
1189static void
1190previewopus_av_log_callback (void*ptr,
1191 int level,
1192 const char *format,
1193 va_list ap)
1194{
1195#if DEBUG
1196 vfprintf (stderr, format, ap);
1197#endif
1198}
1199
1200
1201/**
1202 * Initialize av-libs
1203 */
1204void __attribute__ ((constructor))
1205previewopus_lib_init (void)
1206{
1207 av_log_set_callback (&previewopus_av_log_callback);
1208}
1209
1210
1211/**
1212 * Destructor for the library, cleans up.
1213 */
1214void __attribute__ ((destructor))
1215previewopus_ltdl_fini ()
1216{
1217
1218}
1219
1220
1221/* end of previewopus_extractor.c */
diff --git a/src/plugins/real_extractor.c b/src/plugins/real_extractor.c
new file mode 100644
index 0000000..9d77b28
--- /dev/null
+++ b/src/plugins/real_extractor.c
@@ -0,0 +1,579 @@
1/*
2 * This file is part of libextractor.
3 * Copyright (C) 2021 Christian Grothoff
4 *
5 * libextractor is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * libextractor is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with libextractor; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21/**
22 * @file plugins/real_extractor.c
23 * @brief plugin to support REAL files
24 * @author Christian Grothoff
25 */
26#include "platform.h"
27#include "extractor.h"
28
29struct MediaProperties
30{
31 uint32_t object_id;
32 uint32_t size;
33 uint16_t object_version; /* must be 0 */
34 uint16_t stream_number;
35 uint32_t max_bit_rate;
36 uint32_t avg_bit_rate;
37 uint32_t max_packet_size;
38 uint32_t avg_packet_size;
39 uint32_t start_time;
40 uint32_t preroll;
41 uint32_t duration;
42 uint8_t stream_name_size;
43 uint8_t data[0]; /* variable length section */
44 /*
45 uint8_t[stream_name_size] stream_name;
46 uint8_t mime_type_size;
47 uint8_t[mime_type_size] mime_type;
48 uint32_t type_specific_len;
49 uint8_t[type_specific_len] type_specific_data;
50 */
51};
52
53struct ContentDescription
54{
55 uint32_t object_id;
56 uint32_t size;
57 uint16_t object_version; /* must be 0 */
58 uint16_t title_len;
59 uint8_t data[0]; /* variable length section */
60 /*
61 uint8_t[title_len] title;
62 uint16_t author_len;
63 uint8_t[author_len] author;
64 uint16_t copyright_len;
65 uint8_t[copyright_len] copyright;
66 uint16_t comment_len;
67 uint8_t[comment_len] comment;
68 */
69};
70/* author, copyright and comment are supposed to be ASCII */
71
72
73#define REAL_HEADER 0x2E524d46
74#define MDPR_HEADER 0x4D445052
75#define CONT_HEADER 0x434F4e54
76#define RAFF4_HEADER 0x2E7261FD
77
78
79/**
80 * Give meta data to LE.
81 *
82 * @param s utf-8 string meta data value
83 * @param t type of the meta data
84 */
85#define ADD(s,t) do { \
86 if (0 != ec->proc (ec->cls, "real", t, \
87 EXTRACTOR_METAFORMAT_C_STRING, \
88 "text/plain", s, strlen (s) + 1)) \
89 { return; } \
90} while (0)
91
92
93static void
94processMediaProperties (const struct MediaProperties *prop,
95 struct EXTRACTOR_ExtractContext *ec)
96{
97 uint8_t mime_type_size;
98 uint32_t prop_size;
99
100 prop_size = ntohl (prop->size);
101 if (prop_size <= sizeof (struct MediaProperties))
102 return;
103 if (0 != prop->object_version)
104 return;
105 if (prop_size <= prop->stream_name_size + sizeof (uint8_t)
106 + sizeof (struct MediaProperties))
107 return;
108 mime_type_size = prop->data[prop->stream_name_size];
109 if (prop_size > prop->stream_name_size + sizeof (uint8_t)
110 + mime_type_size + sizeof (struct MediaProperties))
111 {
112 char data[mime_type_size + 1];
113
114 memcpy (data,
115 &prop->data[prop->stream_name_size + 1],
116 mime_type_size);
117 data[mime_type_size] = '\0';
118 ADD (data,
119 EXTRACTOR_METATYPE_MIMETYPE);
120 }
121}
122
123
124static void
125processContentDescription (const struct ContentDescription *prop,
126 struct EXTRACTOR_ExtractContext *ec)
127{
128 uint16_t author_len;
129 uint16_t copyright_len;
130 uint16_t comment_len;
131 uint16_t title_len;
132 uint32_t prop_size;
133
134 prop_size = ntohl (prop->size);
135 if (prop_size <= sizeof (struct ContentDescription))
136 return;
137 if (0 != prop->object_version)
138 return;
139 title_len = ntohs (prop->title_len);
140 if (prop_size <=
141 title_len
142 + sizeof (struct ContentDescription))
143 return;
144 if (title_len > 0)
145 {
146 char title[title_len + 1];
147
148 memcpy (title,
149 &prop->data[0],
150 title_len);
151 title[title_len] = '\0';
152 ADD (title,
153 EXTRACTOR_METATYPE_TITLE);
154 }
155 if (prop_size <=
156 title_len
157 + sizeof (uint16_t)
158 + sizeof (struct ContentDescription))
159 return;
160 author_len = ntohs (*(uint16_t *) &prop->data[title_len]);
161 if (prop_size <=
162 title_len
163 + sizeof (uint16_t)
164 + author_len
165 + sizeof (struct ContentDescription))
166 return;
167 if (author_len > 0)
168 {
169 char author[author_len + 1];
170
171 memcpy (author,
172 &prop->data[title_len
173 + sizeof (uint16_t)],
174 author_len);
175 author[author_len] = '\0';
176 ADD (author,
177 EXTRACTOR_METATYPE_AUTHOR_NAME);
178 }
179 if (prop_size <=
180 title_len
181 + sizeof (uint16_t)
182 + author_len
183 + sizeof (uint16_t)
184 + sizeof (struct ContentDescription))
185 return;
186 copyright_len = ntohs (*(uint16_t *) &prop->data[title_len
187 + author_len
188 + sizeof (uint16_t)]);
189 if (prop_size <=
190 title_len
191 + sizeof (uint16_t)
192 + author_len
193 + sizeof (uint16_t)
194 + copyright_len
195 + sizeof (struct ContentDescription))
196 return;
197 if (copyright_len > 0)
198 {
199 char copyright[copyright_len + 1];
200
201 memcpy (copyright,
202 &prop->data[title_len
203 + sizeof (uint16_t) * 2
204 + author_len],
205 copyright_len);
206 copyright[copyright_len] = '\0';
207 ADD (copyright,
208 EXTRACTOR_METATYPE_COPYRIGHT);
209 }
210
211 if (prop_size <=
212 title_len
213 + sizeof (uint16_t)
214 + author_len
215 + sizeof (uint16_t)
216 + copyright_len
217 + sizeof (uint16_t)
218 + sizeof (struct ContentDescription))
219 return;
220 comment_len = ntohs (*(uint16_t *) &prop->data[title_len
221 + author_len
222 + copyright_len
223 + 2 * sizeof (uint16_t)]);
224 if (prop_size <
225 title_len
226 + sizeof (uint16_t)
227 + author_len
228 + sizeof (uint16_t)
229 + copyright_len
230 + sizeof (uint16_t)
231 + comment_len
232 + sizeof (struct ContentDescription))
233 return;
234
235 if (comment_len > 0)
236 {
237 char comment[comment_len + 1];
238
239 memcpy (comment,
240 &prop->data[title_len
241 + sizeof (uint16_t) * 3
242 + author_len
243 + copyright_len],
244 comment_len);
245 comment[comment_len] = '\0';
246 ADD (comment,
247 EXTRACTOR_METATYPE_COMMENT);
248 }
249}
250
251
252struct RAFF_Header
253{
254 uint16_t version;
255};
256
257struct RAFF3_Header
258{
259 uint8_t unknown[10];
260 uint32_t data_size;
261 /*
262 uint8_t tlen;
263 uint8_t title[tlen];
264 uint8_t alen;
265 uint8_t author[alen];
266 uint8_t clen;
267 uint8_t copyright[clen];
268 uint8_t aplen;
269 uint8_t app[aplen]; */
270};
271
272
273#define RAFF3_HDR_SIZE 14
274
275
276struct RAFF4_Header
277{
278 uint16_t version;
279 uint16_t revision;
280 uint16_t header_length;
281 uint16_t compression_type;
282 uint32_t granularity;
283 uint32_t total_bytes;
284 uint32_t bytes_per_minute;
285 uint32_t bytes_per_minute2;
286 uint16_t interleave_factor;
287 uint16_t interleave_block_size;
288 uint32_t user_data;
289 float sample_rate;
290 uint16_t sample_size;
291 uint16_t channels;
292 uint8_t interleave_code[5];
293 uint8_t compression_code[5];
294 uint8_t is_interleaved;
295 uint8_t copy_byte;
296 uint8_t stream_type;
297 /*
298 uint8_t tlen;
299 uint8_t title[tlen];
300 uint8_t alen;
301 uint8_t author[alen];
302 uint8_t clen;
303 uint8_t copyright[clen];
304 uint8_t aplen;
305 uint8_t app[aplen]; */
306};
307
308#define RAFF4_HDR_SIZE 53
309
310
311static void
312extract_raff3 (struct EXTRACTOR_ExtractContext *ec,
313 const void *ptr,
314 size_t size)
315{
316 const uint8_t *data = ptr;
317 uint8_t tlen;
318 uint8_t alen;
319 uint8_t clen;
320 uint8_t aplen;
321
322 if (size <= RAFF3_HDR_SIZE + 8)
323 return;
324 tlen = data[8 + RAFF3_HDR_SIZE];
325 if (tlen + RAFF3_HDR_SIZE + 12 > size)
326 return;
327 if (tlen > 0)
328 {
329 char x[tlen + 1];
330
331 memcpy (x,
332 &data[9 + RAFF3_HDR_SIZE],
333 tlen);
334 x[tlen] = '\0';
335 ADD (x,
336 EXTRACTOR_METATYPE_TITLE);
337 }
338 alen = data[9 + tlen + RAFF3_HDR_SIZE];
339 if (tlen + alen + RAFF3_HDR_SIZE + 12 > size)
340 return;
341 if (alen > 0)
342 {
343 char x[alen + 1];
344
345 memcpy (x,
346 &data[10 + RAFF3_HDR_SIZE + tlen],
347 alen);
348 x[alen] = '\0';
349 ADD (x,
350 EXTRACTOR_METATYPE_AUTHOR_NAME);
351 }
352 clen = data[10 + tlen + alen + RAFF3_HDR_SIZE];
353 if (tlen + alen + clen + RAFF3_HDR_SIZE + 12 > size)
354 return;
355 if (clen > 0)
356 {
357 char x[clen + 1];
358
359 memcpy (x,
360 &data[11 + RAFF4_HDR_SIZE + tlen + alen],
361 clen);
362 x[clen] = '\0';
363 ADD (x,
364 EXTRACTOR_METATYPE_COPYRIGHT);
365 }
366 aplen = data[11 + tlen + clen + alen + RAFF3_HDR_SIZE];
367 if (tlen + alen + clen + aplen + RAFF3_HDR_SIZE + 12 > size)
368 return;
369 if (aplen > 0)
370 {
371 char x[aplen + 1];
372
373 memcpy (x,
374 &data[12 + RAFF4_HDR_SIZE + tlen + alen + clen],
375 aplen);
376 x[aplen] = '\0';
377 ADD (x,
378 EXTRACTOR_METATYPE_UNKNOWN);
379 }
380}
381
382
383static void
384extract_raff4 (struct EXTRACTOR_ExtractContext *ec,
385 const void *ptr,
386 size_t size)
387{
388 const uint8_t *data = ptr;
389 uint8_t tlen;
390 uint8_t alen;
391 uint8_t clen;
392 uint8_t aplen;
393
394 if (size <= RAFF4_HDR_SIZE + 16 + 4)
395 return;
396 tlen = data[16 + RAFF4_HDR_SIZE];
397 if (tlen + RAFF4_HDR_SIZE + 20 > size)
398 return;
399 alen = data[17 + tlen + RAFF4_HDR_SIZE];
400 if (tlen + alen + RAFF4_HDR_SIZE + 20 > size)
401 return;
402 clen = data[18 + tlen + alen + RAFF4_HDR_SIZE];
403 if (tlen + alen + clen + RAFF4_HDR_SIZE + 20 > size)
404 return;
405 aplen = data[19 + tlen + clen + alen + RAFF4_HDR_SIZE];
406 if (tlen + alen + clen + aplen + RAFF4_HDR_SIZE + 20 > size)
407 return;
408 if (tlen > 0)
409 {
410 char x[tlen + 1];
411
412 memcpy (x,
413 &data[17 + RAFF4_HDR_SIZE],
414 tlen);
415 x[tlen] = '\0';
416 ADD (x,
417 EXTRACTOR_METATYPE_TITLE);
418 }
419 if (alen > 0)
420 {
421 char x[alen + 1];
422
423 memcpy (x,
424 &data[18 + RAFF4_HDR_SIZE + tlen],
425 alen);
426 x[alen] = '\0';
427 ADD (x,
428 EXTRACTOR_METATYPE_AUTHOR_NAME);
429 }
430 if (clen > 0)
431 {
432 char x[clen + 1];
433
434 memcpy (x,
435 &data[19 + RAFF4_HDR_SIZE + tlen + alen],
436 clen);
437 x[clen] = '\0';
438 ADD (x,
439 EXTRACTOR_METATYPE_COPYRIGHT);
440 }
441 if (aplen > 0)
442 {
443 char x[aplen + 1];
444
445 memcpy (x,
446 &data[20 + RAFF4_HDR_SIZE + tlen + alen + clen],
447 aplen);
448 x[aplen] = '\0';
449 ADD (x,
450 EXTRACTOR_METATYPE_UNKNOWN);
451 }
452}
453
454
455static void
456extract_raff (struct EXTRACTOR_ExtractContext *ec,
457 const void *ptr,
458 size_t size)
459{
460 const uint8_t *data = ptr;
461 const struct RAFF_Header *hdr;
462
463 /* HELIX */
464 if (size <= sizeof (*hdr) + 4)
465 return;
466 ADD ("audio/vnd.rn-realaudio",
467 EXTRACTOR_METATYPE_MIMETYPE);
468 hdr = (const struct RAFF_Header *) &data[4];
469 switch (ntohs (hdr->version))
470 {
471 case 3:
472 extract_raff3 (ec,
473 ptr,
474 size);
475 break;
476 case 4:
477 extract_raff4 (ec,
478 ptr,
479 size);
480 break;
481 }
482}
483
484
485/* old real format */
486static void
487extract_real (struct EXTRACTOR_ExtractContext *ec,
488 const void *data,
489 size_t size)
490{
491 uint64_t off = 0;
492 size_t pos = 0;
493
494 while (1)
495 {
496 uint32_t length;
497
498 if ( (pos + 8 > size) ||
499 (pos + 8 < pos) ||
500 (pos + (length = ntohl (((uint32_t *) (data + pos))[1])) > size) )
501 {
502 uint64_t noff;
503 void *in;
504 ssize_t isize;
505
506 noff = ec->seek (ec->cls,
507 off + pos,
508 SEEK_SET);
509 if (-1 == noff)
510 return;
511 isize = ec->read (ec->cls,
512 &in,
513 32 * 1024);
514 if (isize < 8)
515 return;
516 data = in;
517 size = isize;
518 off = noff;
519 pos = 0;
520 }
521 if (length <= 8)
522 return;
523 if ( (pos + length > size) ||
524 (pos + length < pos) )
525 return;
526 switch (ntohl (((uint32_t *) (data + pos))[0]))
527 {
528 case MDPR_HEADER:
529 processMediaProperties (data + pos,
530 ec);
531 pos += length;
532 break;
533 case CONT_HEADER:
534 processContentDescription (data + pos,
535 ec);
536 pos += length;
537 break;
538 case REAL_HEADER: /* treat like default */
539 default:
540 pos += length;
541 break;
542 }
543 }
544}
545
546
547/**
548 * "extract" metadata from a REAL file
549 *
550 * @param ec extraction context
551 */
552void
553EXTRACTOR_real_extract_method (struct EXTRACTOR_ExtractContext *ec)
554{
555 void *data;
556 size_t n;
557
558 n = ec->read (ec->cls,
559 &data,
560 sizeof (struct RAFF4_Header) + 4 * 256);
561 if (n < sizeof (uint32_t))
562 return;
563 switch (ntohl (*(uint32_t *) data))
564 {
565 case RAFF4_HEADER:
566 extract_raff (ec,
567 data,
568 n);
569 break;
570 case REAL_HEADER:
571 extract_real (ec,
572 data,
573 n);
574 break;
575 }
576}
577
578
579/* end of real_extractor.c */
diff --git a/src/plugins/riff_extractor.c b/src/plugins/riff_extractor.c
index c030617..3235a61 100644
--- a/src/plugins/riff_extractor.c
+++ b/src/plugins/riff_extractor.c
@@ -37,7 +37,7 @@
37 37
38/** 38/**
39 * Read an uint32_t as a little-endian (least 39 * Read an uint32_t as a little-endian (least
40 * significant byte first) integer from 'data' 40 * significant byte first) integer from @a data.
41 * 41 *
42 * @param data input data 42 * @param data input data
43 * @return integer read 43 * @return integer read
diff --git a/src/plugins/rpm_extractor.c b/src/plugins/rpm_extractor.c
index 90c5892..248217a 100644
--- a/src/plugins/rpm_extractor.c
+++ b/src/plugins/rpm_extractor.c
@@ -106,7 +106,7 @@ pipe_feeder (void *args)
106 while ( (0 == p->shutdown) && 106 while ( (0 == p->shutdown) &&
107 (done < rret) ) 107 (done < rret) )
108 { 108 {
109 if (-1 == (wret = WRITE (p->pi[1], 109 if (-1 == (wret = write (p->pi[1],
110 &buf[done], 110 &buf[done],
111 rret - done))) 111 rret - done)))
112 { 112 {
@@ -119,7 +119,7 @@ pipe_feeder (void *args)
119 if (done != rret) 119 if (done != rret)
120 break; 120 break;
121 } 121 }
122 CLOSE (p->pi[1]); 122 close (p->pi[1]);
123 return NULL; 123 return NULL;
124} 124}
125 125
@@ -272,8 +272,8 @@ EXTRACTOR_rpm_extract_method (struct EXTRACTOR_ExtractContext *ec)
272 return; 272 return;
273 if (0 != pthread_mutex_init (&parg.lock, NULL)) 273 if (0 != pthread_mutex_init (&parg.lock, NULL))
274 { 274 {
275 CLOSE (parg.pi[0]); 275 close (parg.pi[0]);
276 CLOSE (parg.pi[1]); 276 close (parg.pi[1]);
277 return; 277 return;
278 } 278 }
279 if (0 != pthread_create (&pthr, 279 if (0 != pthread_create (&pthr,
@@ -282,8 +282,8 @@ EXTRACTOR_rpm_extract_method (struct EXTRACTOR_ExtractContext *ec)
282 &parg)) 282 &parg))
283 { 283 {
284 pthread_mutex_destroy (&parg.lock); 284 pthread_mutex_destroy (&parg.lock);
285 CLOSE (parg.pi[0]); 285 close (parg.pi[0]);
286 CLOSE (parg.pi[1]); 286 close (parg.pi[1]);
287 return; 287 return;
288 } 288 }
289 rpmlogSetCallback (&discard_log_callback, NULL); 289 rpmlogSetCallback (&discard_log_callback, NULL);
@@ -416,7 +416,7 @@ END:
416 sig.sa_handler = SIG_IGN; 416 sig.sa_handler = SIG_IGN;
417 sigaction (SIGALRM, &sig, &old); 417 sigaction (SIGALRM, &sig, &old);
418 parg.shutdown = 1; 418 parg.shutdown = 1;
419 CLOSE (parg.pi[0]); 419 close (parg.pi[0]);
420 Fclose (fdi); 420 Fclose (fdi);
421 pthread_kill (pthr, SIGALRM); 421 pthread_kill (pthr, SIGALRM);
422 pthread_join (pthr, &unused); 422 pthread_join (pthr, &unused);
diff --git a/src/plugins/test-vlc.c b/src/plugins/test-vlc.c
new file mode 100644
index 0000000..3dbe6a4
--- /dev/null
+++ b/src/plugins/test-vlc.c
@@ -0,0 +1,223 @@
1/*
2 This file is part of libextractor.
3 Copyright (C) 2021 Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19
20NOTE: This plugin is not yet working. Somehow libvlc never calls any of the IO callbacks.
21
22*/
23/**
24 * @file plugins/vlc_extractor.c
25 * @brief plugin to extract metadata using libvlc
26 * @author Christian Grothoff
27 */
28#include <vlc/vlc.h>
29#include <signal.h>
30#include <stdlib.h>
31#include <stdio.h>
32#include <errno.h>
33#include <sys/types.h>
34#include <sys/stat.h>
35#include <fcntl.h>
36#include <string.h>
37#include <unistd.h>
38
39
40static void
41extract (void *ptr,
42 libvlc_media_t *media)
43{
44 struct
45 {
46 enum libvlc_meta_t vt;
47 } map[] = {
48 { libvlc_meta_Title, },
49 { libvlc_meta_Artist, },
50 { libvlc_meta_Genre, },
51 { libvlc_meta_Copyright, },
52 { libvlc_meta_Album, },
53 { libvlc_meta_TrackNumber, },
54 { libvlc_meta_Description, },
55 { libvlc_meta_Rating, },
56 { libvlc_meta_Date, },
57 { libvlc_meta_Setting, },
58 { libvlc_meta_URL, },
59 { libvlc_meta_Language, },
60 { libvlc_meta_NowPlaying, },
61 { libvlc_meta_Publisher, },
62 { libvlc_meta_EncodedBy, },
63 { libvlc_meta_ArtworkURL, },
64 { libvlc_meta_TrackID, },
65 { libvlc_meta_TrackTotal, },
66 { libvlc_meta_Director, },
67 { libvlc_meta_Season, },
68 { libvlc_meta_Episode, },
69 { libvlc_meta_ShowName, },
70 { libvlc_meta_Actors, },
71 { libvlc_meta_AlbumArtist, },
72 { libvlc_meta_DiscNumber, },
73 { libvlc_meta_DiscTotal, },
74 { -1 }
75 };
76
77 for (unsigned int i = 0;
78 -1 != map[i].vt;
79 i++)
80 {
81 char *meta;
82
83 fprintf (stderr,
84 ".");
85 meta = libvlc_media_get_meta (media,
86 map[i].vt);
87 if (NULL == meta)
88 continue;
89 fprintf (stderr,
90 "Found %d: %s\n",
91 map[i].vt,
92 meta);
93 free (meta);
94 }
95}
96
97
98static void
99media_ready (const struct libvlc_event_t *p_event,
100 void *p_data)
101{
102 fprintf (stderr,
103 "media status: %d, %d\n",
104 p_event->type == libvlc_MediaParsedChanged,
105 p_event->u.media_parsed_changed.new_status);
106 if (p_event->u.media_parsed_changed.new_status ==
107 libvlc_media_parsed_status_done)
108 {
109 fprintf (stderr,
110 "media ready\n");
111 }
112}
113
114
115static void
116my_logger (void *data,
117 int level,
118 const libvlc_log_t *ctx,
119 const char *fmt,
120 va_list args)
121{
122 vfprintf (stderr,
123 fmt,
124 args);
125 fprintf (stderr, "\n");
126}
127
128
129/**
130 * Extract information using libvlc
131 *
132 * @param ec extraction context
133 */
134void
135main (int argc,
136 char **argv)
137{
138 libvlc_instance_t *vlc;
139 libvlc_media_t *media;
140 libvlc_event_manager_t *em;
141
142 {
143 sigset_t set;
144
145 signal (SIGCHLD, SIG_DFL);
146 sigemptyset (&set);
147 sigaddset (&set, SIGPIPE);
148 pthread_sigmask (SIG_BLOCK, &set, NULL);
149 }
150
151 {
152 const char *argv[] = {
153 "-v",
154 "3",
155 NULL
156 };
157 vlc = libvlc_new (2, argv);
158 }
159 if (NULL == vlc)
160 return;
161 libvlc_log_set (vlc,
162 &my_logger,
163 NULL);
164 if (0)
165 {
166 media = libvlc_media_new_path (vlc,
167 argv[1]);
168 }
169 else
170 {
171 int fd = open (argv[1],
172 O_RDONLY);
173 if (-1 == fd)
174 {
175 fprintf (stderr,
176 "Open %s failed: %s\n",
177 argv[1],
178 strerror (errno));
179 libvlc_release (vlc);
180 return;
181 }
182 media = libvlc_media_new_fd (vlc,
183 fd);
184 }
185 if (NULL == media)
186 {
187 fprintf (stderr,
188 "Opening path `%s' failed!\n",
189 argv[1]);
190 libvlc_release (vlc);
191 return;
192 }
193
194 em = libvlc_media_event_manager (media);
195 libvlc_event_attach (em,
196 libvlc_MediaParsedChanged,
197 &media_ready,
198 NULL);
199 fprintf (stderr,
200 "Triggering parser\n");
201 {
202 int status;
203
204 status = libvlc_media_parse_with_options (media,
205 libvlc_media_fetch_local
206 | libvlc_media_parse_network
207 | libvlc_media_fetch_network,
208 30000); /* 30s timeout */
209 fprintf (stderr,
210 "Status: %d\n",
211 status);
212 }
213 fprintf (stderr,
214 "Sleeping\n");
215 sleep (2);
216 extract (NULL,
217 media);
218 libvlc_media_release (media);
219 libvlc_release (vlc);
220}
221
222
223/* end of vlc_extractor.c */
diff --git a/src/plugins/test_thumbnailffmpeg.c b/src/plugins/test_elf.c
index 3efd69b..0400304 100644
--- a/src/plugins/test_thumbnailffmpeg.c
+++ b/src/plugins/test_elf.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libextractor. 2 This file is part of libextractor.
3 Copyright (C) 2012 Vidyut Samanta and Christian Grothoff 3 Copyright (C) 2021 Christian Grothoff
4 4
5 libextractor is free software; you can redistribute it and/or modify 5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -18,8 +18,8 @@
18 Boston, MA 02110-1301, USA. 18 Boston, MA 02110-1301, USA.
19*/ 19*/
20/** 20/**
21 * @file plugins/test_thumbnailffmpeg.c 21 * @file plugins/test_elf.c
22 * @brief testcase for thumbnailffmpeg plugin 22 * @brief testcase for elf plugin
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "platform.h" 25#include "platform.h"
@@ -27,7 +27,7 @@
27 27
28 28
29/** 29/**
30 * Main function for the THUMBNAILFFMPEG testcase. 30 * Main function for the ELF testcase.
31 * 31 *
32 * @param argc number of arguments (ignored) 32 * @param argc number of arguments (ignored)
33 * @param argv arguments (ignored) 33 * @param argv arguments (ignored)
@@ -36,16 +36,48 @@
36int 36int
37main (int argc, char *argv[]) 37main (int argc, char *argv[])
38{ 38{
39 struct SolutionData thumbnailffmpeg_video_sol[] = { 39 struct SolutionData elf_sol[] = {
40 {
41 EXTRACTOR_METATYPE_MIMETYPE,
42 EXTRACTOR_METAFORMAT_UTF8,
43 "text/plain",
44 "application/x-executable",
45 strlen ("application/x-executable") + 1,
46 0
47 },
48 {
49 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE,
50 EXTRACTOR_METAFORMAT_UTF8,
51 "text/plain",
52 "i386",
53 strlen ("i386") + 1,
54 0
55 },
56 {
57 EXTRACTOR_METATYPE_RESOURCE_TYPE,
58 EXTRACTOR_METAFORMAT_UTF8,
59 "text/plain",
60 "Executable file",
61 strlen ("Executable file") + 1,
62 0
63 },
64 {
65 EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY,
66 EXTRACTOR_METAFORMAT_UTF8,
67 "text/plain",
68 "libc.so.6",
69 strlen ("libc.so.6") + 1,
70 0
71 },
40 { 0, 0, NULL, NULL, 0, -1 } 72 { 0, 0, NULL, NULL, 0, -1 }
41 }; 73 };
42 struct ProblemSet ps[] = { 74 struct ProblemSet ps[] = {
43 { "testdata/thumbnailffmpeg_video.mov", 75 { "testdata/chello-elf",
44 thumbnailffmpeg_video_sol }, 76 elf_sol },
45 { NULL, NULL } 77 { NULL, NULL }
46 }; 78 };
47 return ET_main ("thumbnailffmpeg", ps); 79 return ET_main ("elf", ps);
48} 80}
49 81
50 82
51/* end of test_thumbnailffmpeg.c */ 83/* end of test_elf.c */
diff --git a/src/plugins/test_lib.c b/src/plugins/test_lib.c
index 97d4dc5..6cd880d 100644
--- a/src/plugins/test_lib.c
+++ b/src/plugins/test_lib.c
@@ -26,6 +26,9 @@
26#include "test_lib.h" 26#include "test_lib.h"
27#include <sys/types.h> 27#include <sys/types.h>
28#include <regex.h> 28#include <regex.h>
29#include <signal.h>
30#include <stdbool.h>
31#include <unistd.h>
29 32
30/** 33/**
31 * Function that libextractor calls for each 34 * Function that libextractor calls for each
@@ -142,17 +145,31 @@ run (const char *plugin_name,
142 unsigned int i; 145 unsigned int i;
143 unsigned int j; 146 unsigned int j;
144 int ret; 147 int ret;
148 bool skipped = false;
145 149
146 pl = EXTRACTOR_plugin_add_config (NULL, 150 pl = EXTRACTOR_plugin_add_config (NULL,
147 plugin_name, 151 plugin_name,
148 opt); 152 opt);
149 for (i = 0; NULL != ps[i].filename; i++) 153 for (i = 0; NULL != ps[i].filename; i++)
154 {
155 if (0 != access (ps[i].filename,
156 R_OK))
157 {
158 fprintf (stderr,
159 "Failed to access %s, skipping test\n",
160 ps[i].filename);
161 skipped = true;
162 continue;
163 }
150 EXTRACTOR_extract (pl, 164 EXTRACTOR_extract (pl,
151 ps[i].filename, 165 ps[i].filename,
152 NULL, 0, 166 NULL, 0,
153 &process_replies, 167 &process_replies,
154 ps[i].solution); 168 ps[i].solution);
169 }
155 EXTRACTOR_plugin_remove_all (pl); 170 EXTRACTOR_plugin_remove_all (pl);
171 if (skipped)
172 return 0;
156 ret = 0; 173 ret = 0;
157 for (i = 0; NULL != ps[i].filename; i++) 174 for (i = 0; NULL != ps[i].filename; i++)
158 for (j = 0; -1 != ps[i].solution[j].solved; j++) 175 for (j = 0; -1 != ps[i].solution[j].solved; j++)
@@ -174,6 +191,33 @@ run (const char *plugin_name,
174} 191}
175 192
176 193
194#ifndef WINDOWS
195/**
196 * Install a signal handler to ignore SIGPIPE.
197 */
198static void
199ignore_sigpipe ()
200{
201 struct sigaction oldsig;
202 struct sigaction sig;
203
204 memset (&sig, 0, sizeof (struct sigaction));
205 sig.sa_handler = SIG_IGN;
206 sigemptyset (&sig.sa_mask);
207#ifdef SA_INTERRUPT
208 sig.sa_flags = SA_INTERRUPT; /* SunOS */
209#else
210 sig.sa_flags = SA_RESTART;
211#endif
212 if (0 != sigaction (SIGPIPE, &sig, &oldsig))
213 fprintf (stderr,
214 "Failed to install SIGPIPE handler: %s\n", strerror (errno));
215}
216
217
218#endif
219
220
177/** 221/**
178 * Main function to be called to test a plugin. 222 * Main function to be called to test a plugin.
179 * 223 *
@@ -191,7 +235,10 @@ ET_main (const char *plugin_name,
191 /* change environment to find plugins which may not yet be 235 /* change environment to find plugins which may not yet be
192 not installed but should be in the current directory (or .libs) 236 not installed but should be in the current directory (or .libs)
193 on 'make check' */ 237 on 'make check' */
194 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 238#ifndef WINDOWS
239 ignore_sigpipe ();
240#endif
241 if (0 != putenv ("LIBEXTRACTOR_PREFIX=./.libs/"))
195 fprintf (stderr, 242 fprintf (stderr,
196 "Failed to update my environment, plugin loading may fail: %s\n", 243 "Failed to update my environment, plugin loading may fail: %s\n",
197 strerror (errno)); 244 strerror (errno));
diff --git a/src/plugins/test_previewopus.c b/src/plugins/test_previewopus.c
deleted file mode 100644
index 6b0b1b8..0000000
--- a/src/plugins/test_previewopus.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 This file is part of libextractor.
3 Copyright (C) 2013 Vidyut Samanta and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20/**
21 * @file plugins/test_previewopus.c
22 * @brief stub testcase for previewopus plugin
23 * @author Bruno Cabral
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29/**
30 * Main function for the previewopus testcase.
31 *
32 * @param argc number of arguments (ignored)
33 * @param argv arguments (ignored)
34 * @return 0 on success
35 */
36int
37main (int argc, char *argv[])
38{
39 struct SolutionData previewopus_audio_sol[] = {
40 // TODO. Can't test as it depends on the encoder.
41 { 0, 0, NULL, NULL, 0, -1 }
42 };
43 struct ProblemSet ps[] = {
44 { "testdata/mpeg_alien.mpg",
45 previewopus_audio_sol },
46 { NULL, NULL }
47 };
48 return ET_main ("previewopus", ps);
49}
50
51
52/* end of test_thumbnailffmpeg.c */
diff --git a/src/plugins/test_real.c b/src/plugins/test_real.c
new file mode 100644
index 0000000..98e2af4
--- /dev/null
+++ b/src/plugins/test_real.c
@@ -0,0 +1,104 @@
1/*
2 This file is part of libextractor.
3 Copyright (C) 2012 Vidyut Samanta and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20/**
21 * @file plugins/test_real.c
22 * @brief testcase for real plugin
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29/**
30 * Main function for the REAL testcase.
31 *
32 * @param argc number of arguments (ignored)
33 * @param argv arguments (ignored)
34 * @return 0 on success
35 */
36int
37main (int argc, char *argv[])
38{
39 struct SolutionData real_audiosig_sol[] = {
40 {
41 EXTRACTOR_METATYPE_MIMETYPE,
42 EXTRACTOR_METAFORMAT_C_STRING,
43 "text/plain",
44 "audio/x-pn-realaudio",
45 strlen ("audio/x-pn-realaudio") + 1,
46 0
47 },
48 {
49 EXTRACTOR_METATYPE_TITLE,
50 EXTRACTOR_METAFORMAT_C_STRING,
51 "text/plain",
52 "Welcome!",
53 strlen ("Welcome!") + 1,
54 0
55 },
56 {
57 EXTRACTOR_METATYPE_COPYRIGHT,
58 EXTRACTOR_METAFORMAT_C_STRING,
59 "text/plain",
60 "1998, RealNetworks, Inc.",
61 strlen ("1998, RealNetworks, Inc.") + 1,
62 0
63 },
64 { 0, 0, NULL, NULL, 0, -1 }
65 };
66 struct SolutionData real_ra3_sol[] = {
67 {
68 EXTRACTOR_METATYPE_MIMETYPE,
69 EXTRACTOR_METAFORMAT_C_STRING,
70 "text/plain",
71 "audio/vnd.rn-realaudio",
72 strlen ("audio/vnd.rn-realaudio") + 1,
73 0
74 },
75 {
76 EXTRACTOR_METATYPE_TITLE,
77 EXTRACTOR_METAFORMAT_C_STRING,
78 "text/plain",
79 "Song of Welcome",
80 strlen ("Song of Welcome") + 1,
81 0
82 },
83 {
84 EXTRACTOR_METATYPE_AUTHOR_NAME,
85 EXTRACTOR_METAFORMAT_C_STRING,
86 "text/plain",
87 "Investiture Service",
88 strlen ("Investiture Service") + 1,
89 0
90 },
91 { 0, 0, NULL, NULL, 0, -1 }
92 };
93 struct ProblemSet ps[] = {
94 { "testdata/audiosig.rm",
95 real_audiosig_sol },
96 { "testdata/ra3.ra",
97 real_ra3_sol },
98 { NULL, NULL }
99 };
100 return ET_main ("real", ps);
101}
102
103
104/* end of test_real.c */
diff --git a/src/plugins/testdata/audiosig.rm b/src/plugins/testdata/audiosig.rm
new file mode 100644
index 0000000..6307d30
--- /dev/null
+++ b/src/plugins/testdata/audiosig.rm
Binary files differ
diff --git a/src/plugins/testdata/chello-elf b/src/plugins/testdata/chello-elf
new file mode 100755
index 0000000..3422476
--- /dev/null
+++ b/src/plugins/testdata/chello-elf
Binary files differ
diff --git a/src/plugins/testdata/ra3.ra b/src/plugins/testdata/ra3.ra
new file mode 100644
index 0000000..d36569f
--- /dev/null
+++ b/src/plugins/testdata/ra3.ra
Binary files differ
diff --git a/src/plugins/thumbnailffmpeg_extractor.c b/src/plugins/thumbnailffmpeg_extractor.c
deleted file mode 100644
index ef7a05f..0000000
--- a/src/plugins/thumbnailffmpeg_extractor.c
+++ /dev/null
@@ -1,890 +0,0 @@
1/*
2 This file is part of libextractor.
3 Copyright Copyright (C) 2008, 2012 Heikki Lindholm and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */
20/**
21 * @file thumbnailffmpeg_extractor.c
22 * @author Heikki Lindholm
23 * @author Christian Grothoff
24 * @brief this extractor produces a binary encoded
25 * thumbnail of images and videos using the ffmpeg libs.
26 *
27 * This is a thumbnail extractor using the ffmpeg libraries that will eventually
28 * support extracting thumbnails from both image and video files.
29 *
30 * Note that ffmpeg has a few issues:
31 * (1) there are no recent official releases of the ffmpeg libs
32 * (2) ffmpeg has a history of having security issues (parser is not robust)
33 *
34 * So this plugin cannot be recommended for system with high security
35 *requirements.
36 */
37#include "platform.h"
38#include "extractor.h"
39#include <magic.h>
40
41#include <libavutil/avutil.h>
42#include <libavutil/imgutils.h>
43#include <libavformat/avformat.h>
44#include <libavcodec/avcodec.h>
45#include <libswscale/swscale.h>
46
47#if USE_JPEG
48#ifdef PIX_FMT_YUVJ420P
49#define PIX_OUTPUT_FORMAT PIX_FMT_YUVJ420P
50#else
51#define PIX_OUTPUT_FORMAT AV_PIX_FMT_YUVJ420P
52#endif
53#else
54#ifdef PIX_FMT_RGB24
55#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24
56#else
57#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24
58#endif
59#endif
60
61/**
62 * Set to 1 to use JPEG, PNG otherwise
63 */
64#define USE_JPEG 1
65
66/**
67 * Set to 1 to enable a output file for testing.
68 */
69#define OUTPUT_FILE 0
70
71
72/**
73 * Set to 1 to use jpeg.
74 */
75#define DEBUG 0
76
77/**
78 * max dimension in pixels for the thumbnail.
79 */
80#define MAX_THUMB_DIMENSION 128
81
82/**
83 * Maximum size in bytes for the thumbnail.
84 */
85#define MAX_THUMB_BYTES (100 * 1024)
86
87/**
88 * Number of bytes to feed to libav in one go.
89 */
90#define BUFFER_SIZE (32 * 1024)
91
92/**
93 * Number of bytes to feed to libav in one go, with padding (padding is zeroed).
94 */
95#ifdef AV_INPUT_BUFFER_PADDING_SIZE
96#define PADDED_BUFFER_SIZE (BUFFER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)
97#else
98/* legacy */
99#define PADDED_BUFFER_SIZE (BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE)
100#endif
101
102#ifndef AV_CODEC_FLAG_QSCALE
103#define AV_CODEC_FLAG_QSCALE CODEC_FLAG_QSCALE
104#endif
105
106
107/**
108 * Global handle to MAGIC data.
109 */
110static magic_t magic;
111
112
113/**
114 * Read callback.
115 *
116 * @param opaque the 'struct EXTRACTOR_ExtractContext'
117 * @param buf where to write data
118 * @param buf_size how many bytes to read
119 * @return -1 on error (or for unknown file size)
120 */
121static int
122read_cb (void *opaque,
123 uint8_t *buf,
124 int buf_size)
125{
126 struct EXTRACTOR_ExtractContext *ec = opaque;
127 void *data;
128 ssize_t ret;
129
130 ret = ec->read (ec->cls, &data, buf_size);
131 if (ret <= 0)
132 return ret;
133 memcpy (buf, data, ret);
134 return ret;
135}
136
137
138/**
139 * Seek callback.
140 *
141 * @param opaque the 'struct EXTRACTOR_ExtractContext'
142 * @param offset where to seek
143 * @param whence how to seek; AVSEEK_SIZE to return file size without seeking
144 * @return -1 on error (or for unknown file size)
145 */
146static int64_t
147seek_cb (void *opaque,
148 int64_t offset,
149 int whence)
150{
151 struct EXTRACTOR_ExtractContext *ec = opaque;
152
153 if (AVSEEK_SIZE == whence)
154 return ec->get_size (ec->cls);
155 return ec->seek (ec->cls, offset, whence);
156}
157
158
159/**
160 * Rescale and encode a PNG thumbnail.
161 *
162 * @param src_width source image width
163 * @param src_height source image height
164 * @param src_stride
165 * @param src_pixfmt
166 * @param src_data source data
167 * @param dst_width desired thumbnail width
168 * @param dst_height desired thumbnail height
169 * @param output_data where to store the resulting PNG data
170 * @param output_max_size maximum size of result that is allowed
171 * @return the number of bytes used, 0 on error
172 */
173static size_t
174create_thumbnail (AVCodecContext *pCodecCtx, int src_width, int src_height,
175 int src_stride[],
176 enum AVPixelFormat src_pixfmt,
177 const uint8_t *const src_data[],
178 int dst_width, int dst_height,
179 uint8_t **output_data,
180 size_t output_max_size)
181{
182 AVCodecContext *encoder_codec_ctx;
183 AVDictionary *opts;
184 AVCodec *encoder_codec;
185 struct SwsContext *scaler_ctx;
186 AVFrame *dst_frame;
187 uint8_t *dst_buffer;
188 uint8_t *encoder_output_buffer;
189 size_t encoder_output_buffer_size;
190 int err;
191
192 AVPacket pkt;
193 av_init_packet (&pkt);
194 pkt.data = NULL;
195 pkt.size = 0;
196 int gotPacket;
197#if USE_JPEG
198 if (NULL == (encoder_codec = avcodec_find_encoder (AV_CODEC_ID_MJPEG)))
199#else
200 if (NULL == (encoder_codec = avcodec_find_encoder_by_name ("png")))
201#endif
202 {
203#if DEBUG
204 fprintf (stderr,
205 "Couldn't find a encoder\n");
206#endif
207 return 0;
208 }
209
210 /* NOTE: the scaler will be used even if the src and dst image dimensions
211 * match, because the scaler will also perform colour space conversion */
212 if (NULL ==
213 (scaler_ctx =
214 sws_getContext (src_width, src_height, src_pixfmt,
215 dst_width, dst_height,
216 PIX_OUTPUT_FORMAT,
217 SWS_BILINEAR, NULL, NULL, NULL)))
218 {
219#if DEBUG
220 fprintf (stderr,
221 "Failed to get a scaler context\n");
222#endif
223 return 0;
224 }
225
226 dst_frame = av_frame_alloc ();
227 if (NULL == dst_frame)
228 {
229#if DEBUG
230 fprintf (stderr,
231 "Failed to allocate the destination image frame\n");
232#endif
233 sws_freeContext (scaler_ctx);
234 return 0;
235 }
236 if (NULL == (dst_buffer =
237 av_malloc (av_image_get_buffer_size (PIX_OUTPUT_FORMAT,
238 dst_width,
239 dst_height,
240 1))))
241 {
242#if DEBUG
243 fprintf (stderr,
244 "Failed to allocate the destination image buffer\n");
245#endif
246 av_frame_free (&dst_frame);
247 sws_freeContext (scaler_ctx);
248 return 0;
249 }
250 av_image_fill_arrays (dst_frame->data,
251 dst_frame->linesize,
252 dst_buffer,
253 PIX_OUTPUT_FORMAT,
254 dst_width,
255 dst_height,
256 1);
257 sws_scale (scaler_ctx,
258 src_data,
259 src_stride,
260 0, src_height,
261 dst_frame->data,
262 dst_frame->linesize);
263
264 encoder_output_buffer_size = output_max_size;
265 if (NULL == (encoder_output_buffer = av_malloc (encoder_output_buffer_size)))
266 {
267#if DEBUG
268 fprintf (stderr,
269 "Failed to allocate the encoder output buffer\n");
270#endif
271 av_free (dst_buffer);
272 av_frame_free (&dst_frame);
273 sws_freeContext (scaler_ctx);
274 return 0;
275 }
276
277 if (NULL == (encoder_codec_ctx = avcodec_alloc_context3 (encoder_codec)))
278 {
279#if DEBUG
280 fprintf (stderr,
281 "Failed to allocate the encoder codec context\n");
282#endif
283 av_free (encoder_output_buffer);
284 av_free (dst_buffer);
285 av_frame_free (&dst_frame);
286 sws_freeContext (scaler_ctx);
287 return 0;
288 }
289 encoder_codec_ctx->width = dst_width;
290 encoder_codec_ctx->height = dst_height;
291#if USE_JPEG
292 encoder_codec_ctx->bit_rate = pCodecCtx->bit_rate;
293 encoder_codec_ctx->codec_id = AV_CODEC_ID_MJPEG;
294 encoder_codec_ctx->codec_type = AVMEDIA_TYPE_VIDEO;
295 encoder_codec_ctx->time_base.num = pCodecCtx->time_base.num;
296 encoder_codec_ctx->time_base.den = pCodecCtx->time_base.den;
297 encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT;
298#else
299 encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT;
300#endif
301
302 opts = NULL;
303 if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0)
304 {
305#if DEBUG
306 fprintf (stderr,
307 "Failed to open the encoder\n");
308#endif
309 avcodec_free_context (&encoder_codec_ctx);
310 av_free (encoder_output_buffer);
311 av_free (dst_buffer);
312 av_frame_free (&dst_frame);
313 sws_freeContext (scaler_ctx);
314 return 0;
315 }
316
317
318#ifdef USE_JPEG
319#if FF_API_MPV_OPT
320 encoder_codec_ctx->mb_lmin = encoder_codec_ctx->lmin =
321 encoder_codec_ctx->qmin * FF_QP2LAMBDA;
322 encoder_codec_ctx->mb_lmax = encoder_codec_ctx->lmax =
323 encoder_codec_ctx->qmax * FF_QP2LAMBDA;
324#else
325 encoder_codec_ctx->mb_lmin = encoder_codec_ctx->qmin * FF_QP2LAMBDA;
326 encoder_codec_ctx->mb_lmax = encoder_codec_ctx->qmax * FF_QP2LAMBDA;
327#endif
328 encoder_codec_ctx->flags = AV_CODEC_FLAG_QSCALE;
329 encoder_codec_ctx->global_quality = encoder_codec_ctx->qmin * FF_QP2LAMBDA;
330
331 dst_frame->pts = 1;
332 dst_frame->quality = encoder_codec_ctx->global_quality;
333#endif
334
335 err = avcodec_encode_video2 (encoder_codec_ctx,
336 &pkt,
337 dst_frame, &gotPacket);
338
339 if (err < 0)
340 goto cleanup;
341 err = pkt.size;
342 memcpy (encoder_output_buffer,pkt.data, pkt.size);
343
344 av_packet_unref (&pkt);
345cleanup:
346 av_dict_free (&opts);
347 avcodec_close (encoder_codec_ctx);
348 avcodec_free_context (&encoder_codec_ctx);
349 av_free (dst_buffer);
350 av_frame_free (&dst_frame);
351 sws_freeContext (scaler_ctx);
352 *output_data = encoder_output_buffer;
353
354 return err < 0 ? 0 : err;
355}
356
357
358/**
359 * calculate the thumbnail dimensions, taking pixel aspect into account
360 *
361 * @param src_width source image width
362 * @param src_height source image height
363 * @param src_sar_num
364 * @param src_sar_den
365 * @param dst_width desired thumbnail width (set)
366 * @param dst_height desired thumbnail height (set)
367 */
368static void
369calculate_thumbnail_dimensions (int src_width,
370 int src_height,
371 int src_sar_num,
372 int src_sar_den,
373 int *dst_width,
374 int *dst_height)
375{
376 if ( (src_sar_num <= 0) || (src_sar_den <= 0) )
377 {
378 src_sar_num = 1;
379 src_sar_den = 1;
380 }
381 if ((src_width * src_sar_num) / src_sar_den > src_height)
382 {
383 *dst_width = MAX_THUMB_DIMENSION;
384 *dst_height = (*dst_width * src_height)
385 / ((src_width * src_sar_num) / src_sar_den);
386 }
387 else
388 {
389 *dst_height = MAX_THUMB_DIMENSION;
390 *dst_width = (*dst_height
391 * ((src_width * src_sar_num) / src_sar_den))
392 / src_height;
393 }
394 if (*dst_width < 8)
395 *dst_width = 8;
396 if (*dst_height < 1)
397 *dst_height = 1;
398#if DEBUG
399 fprintf (stderr,
400 "Thumbnail dimensions: %d %d\n",
401 *dst_width, *dst_height);
402#endif
403}
404
405
406#define ENUM_CODEC_ID enum AVCodecID
407
408/**
409 * Perform thumbnailing when the input is an image.
410 *
411 * @param image_codec_id ffmpeg codec for the image format
412 * @param ec extraction context to use
413 */
414static void
415extract_image (ENUM_CODEC_ID image_codec_id,
416 struct EXTRACTOR_ExtractContext *ec)
417{
418 AVDictionary *opts;
419 AVCodecContext *codec_ctx;
420 AVCodec *codec;
421 AVPacket avpkt;
422 AVFrame *frame;
423 uint8_t *encoded_thumbnail;
424 int thumb_width;
425 int thumb_height;
426 int err;
427 int frame_finished;
428 ssize_t iret;
429 void *data;
430 unsigned char padded_data[PADDED_BUFFER_SIZE];
431
432 if (NULL == (codec = avcodec_find_decoder (image_codec_id)))
433 {
434#if DEBUG
435 fprintf (stderr,
436 "No suitable codec found\n");
437#endif
438 return;
439 }
440 if (NULL == (codec_ctx = avcodec_alloc_context3 (codec)))
441 {
442#if DEBUG
443 fprintf (stderr,
444 "Failed to allocate codec context\n");
445#endif
446 return;
447 }
448 opts = NULL;
449 if (0 != avcodec_open2 (codec_ctx, codec, &opts))
450 {
451#if DEBUG
452 fprintf (stderr,
453 "Failed to open image codec\n");
454#endif
455 avcodec_free_context (&codec_ctx);
456 return;
457 }
458 av_dict_free (&opts);
459 frame = av_frame_alloc ();
460 if (NULL == frame)
461 {
462#if DEBUG
463 fprintf (stderr,
464 "Failed to allocate frame\n");
465#endif
466 avcodec_close (codec_ctx);
467 avcodec_free_context (&codec_ctx);
468 return;
469 }
470
471 frame_finished = 0;
472 while (! frame_finished)
473 {
474 if (0 >= (iret = ec->read (ec->cls,
475 &data,
476 BUFFER_SIZE)))
477 break;
478 memcpy (padded_data, data, iret);
479 memset (&padded_data[iret], 0, PADDED_BUFFER_SIZE - iret);
480 av_init_packet (&avpkt);
481 avpkt.data = padded_data;
482 avpkt.size = iret;
483 avcodec_decode_video2 (codec_ctx, frame, &frame_finished, &avpkt);
484 }
485 if (! frame_finished)
486 {
487#if DEBUG
488 fprintf (stderr,
489 "Failed to decode a complete frame\n");
490#endif
491 av_frame_free (&frame);
492 avcodec_close (codec_ctx);
493 avcodec_free_context (&codec_ctx);
494 return;
495 }
496 calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height,
497 codec_ctx->sample_aspect_ratio.num,
498 codec_ctx->sample_aspect_ratio.den,
499 &thumb_width, &thumb_height);
500
501 err = create_thumbnail (codec_ctx, codec_ctx->width, codec_ctx->height,
502 frame->linesize, codec_ctx->pix_fmt,
503 (const uint8_t *const*) frame->data,
504 thumb_width, thumb_height,
505 &encoded_thumbnail, MAX_THUMB_BYTES);
506 if (err > 0)
507 {
508 ec->proc (ec->cls,
509 "thumbnailffmpeg",
510 EXTRACTOR_METATYPE_THUMBNAIL,
511 EXTRACTOR_METAFORMAT_BINARY,
512 "image/png",
513 (const char*) encoded_thumbnail,
514 err);
515
516 #if OUTPUT_FILE
517 FILE *f;
518 #ifdef USE_JPEG
519 f = fopen ("thumb.jpg", "wb");
520 #else
521 f = fopen ("thumb.png", "wb");
522 #endif
523 if (! f)
524 {
525 fprintf (stderr, "Could not open %s\n", "file");
526 exit (1);
527 }
528
529 fwrite (encoded_thumbnail, 1, err, f);
530 fclose (f);
531
532 #endif
533
534
535 av_free (encoded_thumbnail);
536 }
537 av_frame_free (&frame);
538 avcodec_close (codec_ctx);
539 avcodec_free_context (&codec_ctx);
540}
541
542
543/**
544 * Perform thumbnailing when the input is a video
545 *
546 * @param ec extraction context to use
547 */
548static void
549extract_video (struct EXTRACTOR_ExtractContext *ec)
550{
551 AVPacket packet;
552 AVIOContext *io_ctx;
553 struct AVFormatContext *format_ctx;
554 AVCodecContext *codec_ctx;
555 AVCodecParameters *codecpar;
556 AVCodec *codec;
557 AVDictionary *options;
558 AVFrame *frame;
559 uint8_t *encoded_thumbnail;
560 int video_stream_index;
561 int thumb_width;
562 int thumb_height;
563 int i;
564 int err;
565 int frame_finished;
566 unsigned char *iob;
567 int duration;
568
569 if (NULL == (iob = av_malloc (16 * 1024)))
570 return;
571 if (NULL == (io_ctx = avio_alloc_context (iob,
572 16 * 1024,
573 0, ec,
574 &read_cb,
575 NULL /* no writing */,
576 &seek_cb)))
577 {
578 av_free (iob);
579 return;
580 }
581 if (NULL == (format_ctx = avformat_alloc_context ()))
582 {
583 av_free (io_ctx);
584 return;
585 }
586 format_ctx->pb = io_ctx;
587 options = NULL;
588 if (0 != avformat_open_input (&format_ctx, "<no file>", NULL, &options))
589 {
590 av_free (io_ctx);
591 return;
592 }
593 av_dict_free (&options);
594 if (0 > avformat_find_stream_info (format_ctx, NULL))
595 {
596#if DEBUG
597 fprintf (stderr,
598 "Failed to read stream info\n");
599#endif
600 avformat_close_input (&format_ctx);
601 av_free (io_ctx);
602 return;
603 }
604 codec = NULL;
605 codec_ctx = NULL;
606 video_stream_index = -1;
607 for (i = 0; i<format_ctx->nb_streams; i++)
608 {
609 codecpar = format_ctx->streams[i]->codecpar;
610 codec_ctx = format_ctx->streams[i]->codec;
611 if (AVMEDIA_TYPE_VIDEO != codec_ctx->codec_type)
612 continue;
613 if (NULL == (codec = avcodec_find_decoder (codecpar->codec_id)))
614 continue;
615 options = NULL;
616 if (0 != (err = avcodec_open2 (codec_ctx, codec, &options)))
617 {
618 codec = NULL;
619 continue;
620 }
621 av_dict_free (&options);
622 video_stream_index = i;
623 break;
624 }
625 if ( (-1 == video_stream_index) ||
626 (0 == codec_ctx->width) ||
627 (0 == codec_ctx->height) )
628 {
629#if DEBUG
630 fprintf (stderr,
631 "No video streams or no suitable codec found\n");
632#endif
633 if (NULL != codec)
634 avcodec_close (codec_ctx);
635 avformat_close_input (&format_ctx);
636 av_free (io_ctx);
637 return;
638 }
639
640 frame = av_frame_alloc ();
641 if (NULL == frame)
642 {
643#if DEBUG
644 fprintf (stderr,
645 "Failed to allocate frame\n");
646#endif
647 avcodec_close (codec_ctx);
648 avformat_close_input (&format_ctx);
649 av_free (io_ctx);
650 return;
651 }
652
653 if (format_ctx->duration == AV_NOPTS_VALUE)
654 {
655 duration = -1;
656#if DEBUG
657 fprintf (stderr,
658 "Duration unknown\n");
659#endif
660 }
661 else
662 {
663 duration = format_ctx->duration;
664 }
665
666 /* if duration is known, seek to first tried,
667 * else use 10 sec into stream */
668
669 if (-1 != duration)
670 err = av_seek_frame (format_ctx, -1, (duration / 3), 0);
671 else
672 err = av_seek_frame (format_ctx, -1, 10 * AV_TIME_BASE, 0);
673
674 if (err >= 0)
675 avcodec_flush_buffers (codec_ctx);
676 frame_finished = 0;
677
678 while (1)
679 {
680 err = av_read_frame (format_ctx, &packet);
681 if (err < 0)
682 break;
683 if (packet.stream_index == video_stream_index)
684 {
685 avcodec_decode_video2 (codec_ctx,
686 frame,
687 &frame_finished,
688 &packet);
689 if (frame_finished && frame->key_frame)
690 {
691 av_packet_unref (&packet);
692 break;
693 }
694 }
695 av_packet_unref (&packet);
696 }
697
698 if (! frame_finished)
699 {
700#if DEBUG
701 fprintf (stderr,
702 "Failed to decode a complete frame\n");
703#endif
704 av_frame_free (&frame);
705 avcodec_close (codec_ctx);
706 avformat_close_input (&format_ctx);
707 av_free (io_ctx);
708 return;
709 }
710 calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height,
711 codec_ctx->sample_aspect_ratio.num,
712 codec_ctx->sample_aspect_ratio.den,
713 &thumb_width, &thumb_height);
714
715 err = create_thumbnail (codec_ctx, codec_ctx->width, codec_ctx->height,
716 frame->linesize, codec_ctx->pix_fmt,
717 (const uint8_t*const *) frame->data,
718 thumb_width, thumb_height,
719 &encoded_thumbnail, MAX_THUMB_BYTES);
720 if (err > 0)
721 {
722 ec->proc (ec->cls,
723 "thumbnailffmpeg",
724 EXTRACTOR_METATYPE_THUMBNAIL,
725 EXTRACTOR_METAFORMAT_BINARY,
726 "image/png",
727 (const char*) encoded_thumbnail,
728 err);
729#if OUTPUT_FILE
730 FILE *f;
731#ifdef USE_JPEG
732 f = fopen ("thumb.jpg", "wb");
733#else
734 f = fopen ("thumb.png", "wb");
735#endif
736 if (! f)
737 {
738 fprintf (stderr, "Could not open %s\n", "file");
739 exit (1);
740 }
741
742 fwrite (encoded_thumbnail, 1, err, f);
743 fclose (f);
744#endif
745 av_free (encoded_thumbnail);
746 }
747 av_frame_free (&frame);
748 avcodec_close (codec_ctx);
749 avformat_close_input (&format_ctx);
750 av_free (io_ctx);
751}
752
753
754/**
755 * Pair of mime type and ffmpeg decoder ID.
756 */
757struct MIMEToDecoderMapping
758{
759 /**
760 * String for a mime type.
761 */
762 const char *mime_type;
763
764 /**
765 * Corresponding ffmpeg decoder ID.
766 */
767 ENUM_CODEC_ID codec_id;
768};
769
770
771/**
772 * map MIME image types to an ffmpeg decoder
773 */
774static const struct MIMEToDecoderMapping m2d_map[] = {
775
776#if LIBAVCODEC_BUILD >= AV_VERSION_INT (54,25,0)
777 { "image/x-bmp", AV_CODEC_ID_BMP },
778 { "image/gif", AV_CODEC_ID_GIF },
779 { "image/jpeg", AV_CODEC_ID_MJPEG },
780 { "image/png", AV_CODEC_ID_PNG },
781 { "image/x-png", AV_CODEC_ID_PNG },
782 { "image/x-portable-pixmap", AV_CODEC_ID_PPM },
783 { NULL, AV_CODEC_ID_NONE }
784#else
785 { "image/x-bmp", CODEC_ID_BMP },
786 { "image/gif", CODEC_ID_GIF },
787 { "image/jpeg", CODEC_ID_MJPEG },
788 { "image/png", CODEC_ID_PNG },
789 { "image/x-png", CODEC_ID_PNG },
790 { "image/x-portable-pixmap", CODEC_ID_PPM },
791 { NULL, CODEC_ID_NONE }
792#endif
793
794};
795
796
797/**
798 * Main method for the ffmpeg-thumbnailer plugin.
799 *
800 * @param ec extraction context
801 */
802void
803EXTRACTOR_thumbnailffmpeg_extract_method (struct EXTRACTOR_ExtractContext *ec)
804{
805 unsigned int i;
806 ssize_t iret;
807 void *data;
808 const char *mime;
809
810 if (-1 == (iret = ec->read (ec->cls,
811 &data,
812 16 * 1024)))
813 return;
814 if (NULL == (mime = magic_buffer (magic, data, iret)))
815 return;
816 if (0 != ec->seek (ec->cls, 0, SEEK_SET))
817 return;
818 for (i = 0; NULL != m2d_map[i].mime_type; i++)
819 if (0 == strcmp (m2d_map[i].mime_type, mime))
820 {
821 extract_image (m2d_map[i].codec_id, ec);
822 return;
823 }
824 extract_video (ec);
825}
826
827
828/**
829 * This plugin sometimes is installed under the alias 'thumbnail'.
830 * So we need to provide a second entry method.
831 *
832 * @param ec extraction context
833 */
834void
835EXTRACTOR_thumbnail_extract_method (struct EXTRACTOR_ExtractContext *ec)
836{
837 EXTRACTOR_thumbnailffmpeg_extract_method (ec);
838}
839
840
841/**
842 * Log callback. Does nothing.
843 *
844 * @param ptr NULL
845 * @param level log level
846 * @param format format string
847 * @param ap arguments for format
848 */
849static void
850thumbnailffmpeg_av_log_callback (void*ptr,
851 int level,
852 const char *format,
853 va_list ap)
854{
855#if DEBUG
856 vfprintf (stderr, format, ap);
857#endif
858}
859
860
861/**
862 * Initialize av-libs and load magic file.
863 */
864void __attribute__ ((constructor))
865thumbnailffmpeg_lib_init (void)
866{
867 av_log_set_callback (&thumbnailffmpeg_av_log_callback);
868 magic = magic_open (MAGIC_MIME_TYPE);
869 if (0 != magic_load (magic, NULL))
870 {
871 /* FIXME: how to deal with errors? */
872 }
873}
874
875
876/**
877 * Destructor for the library, cleans up.
878 */
879void __attribute__ ((destructor))
880thumbnailffmpeg_ltdl_fini ()
881{
882 if (NULL != magic)
883 {
884 magic_close (magic);
885 magic = NULL;
886 }
887}
888
889
890/* end of thumbnailffmpeg_extractor.c */
diff --git a/src/plugins/vlc_extractor.c b/src/plugins/vlc_extractor.c
new file mode 100644
index 0000000..922da0f
--- /dev/null
+++ b/src/plugins/vlc_extractor.c
@@ -0,0 +1,352 @@
1/*
2 This file is part of libextractor.
3 Copyright (C) 2021 Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19
20THIS PLUGIN IS NOT WORKING, see #2075!
21
22*/
23/**
24 * @file plugins/vlc_extractor.c
25 * @brief plugin to extract metadata using libvlc
26 * @author Christian Grothoff
27 */
28#include "platform.h"
29#include "extractor.h"
30#include <vlc/vlc.h>
31#include <signal.h>
32
33/**
34 * Function to help VLC open a custom bitstream input media.
35 *
36 * The same media item can be opened multiple times. Each time, this callback
37 * is invoked. It should allocate and initialize any instance-specific
38 * resources, then store them in *datap. The instance resources can be freed
39 * in the @ref libvlc_media_close_cb callback.
40 *
41 * @param opaque our `struct EXTRACTOR_ExtractContext`
42 * @param[out] datap storage space for a private data pointer
43 * @param[out] sizep byte length of the bitstream or UINT64_MAX if unknown
44 *
45 * @note For convenience, *datap is initially NULL and *sizep is initially 0.
46 *
47 * @return 0 on success, non-zero on error. In case of failure, the other
48 * callbacks will not be invoked and any value stored in *datap and *sizep is
49 * discarded.
50 */
51static int
52open_cb (void *opaque,
53 void **datap,
54 uint64_t *sizep)
55{
56 struct EXTRACTOR_ExtractContext *ec = opaque;
57
58 *datap = ec;
59 *sizep = ec->get_size (ec->cls);
60 if (UINT64_MAX == *sizep)
61 {
62 fprintf (stderr,
63 "Open failed!\n");
64 return 1;
65 }
66 fprintf (stderr,
67 "Open returns %llu file size!\n",
68 (unsigned long long) *sizep);
69 return 0;
70}
71
72
73/**
74 * Function to help VLC read data from a custom bitstream input media.
75 *
76 * @param opaque our `struct EXTRACTOR_ExtractContext`
77 * @param buf start address of the buffer to read data into
78 * @param len bytes length of the buffer
79 * @return strictly positive number of bytes read, 0 on end-of-stream,
80 * or -1 on non-recoverable error
81 *
82 * @note If no data is immediately available, then the callback should sleep.
83 * @warning The application is responsible for avoiding deadlock situations.
84 * In particular, the callback should return an error if playback is stopped;
85 * if it does not return, then libvlc_media_player_stop() will never return.
86 */
87static ssize_t
88read_cb (void *opaque,
89 unsigned char *buf,
90 size_t len)
91{
92 struct EXTRACTOR_ExtractContext *ec = opaque;
93 void *data;
94 ssize_t ret;
95
96 ret = ec->read (ec->cls,
97 &data,
98 len);
99 if (-1 == ret)
100 {
101 fprintf (stderr,
102 "Read failed!\n");
103 return -1;
104 }
105 memcpy (buf,
106 data,
107 ret);
108 fprintf (stderr,
109 "Read %u bytes!\n",
110 (unsigned int) ret);
111 return ret;
112}
113
114
115/**
116 * Allow VLC to seek a custom bitstream input media.
117 *
118 * @param opaque our `struct EXTRACTOR_ExtractContext`
119 * @param offset absolute byte offset to seek to
120 * @return 0 on success, -1 on error.
121 */
122static int
123seek_cb (void *opaque,
124 uint64_t offset)
125{
126 struct EXTRACTOR_ExtractContext *ec = opaque;
127
128 fprintf (stderr,
129 "Seek to %llu!\n",
130 (unsigned long long) offset);
131 if (offset > INT64_MAX)
132 {
133 fprintf (stderr,
134 "Excessive seek, impossible with LE!\n");
135 return -1;
136 }
137 if (-1 ==
138 ec->seek (ec->cls,
139 offset,
140 SEEK_SET))
141 {
142 fprintf (stderr,
143 "Seek failed!\n");
144 return -1;
145 }
146 return 0;
147}
148
149
150/**
151 * Callback prototype to close a custom bitstream input media.
152 *
153 * @param opaque our `struct EXTRACTOR_ExtractContext`
154 */
155static void
156close_cb (void *opaque)
157{
158 /* intentionally empty */
159 fprintf (stderr,
160 "Close called\n");
161}
162
163
164static void
165extract (struct EXTRACTOR_ExtractContext *ec,
166 libvlc_media_t *media)
167{
168 struct
169 {
170 enum libvlc_meta_t vt;
171 enum EXTRACTOR_MetaType mt;
172 } map[] = {
173 { libvlc_meta_Title,
174 EXTRACTOR_METATYPE_TITLE },
175 { libvlc_meta_Artist,
176 EXTRACTOR_METATYPE_ARTIST },
177 { libvlc_meta_Genre,
178 EXTRACTOR_METATYPE_GENRE },
179 { libvlc_meta_Copyright,
180 EXTRACTOR_METATYPE_COPYRIGHT },
181 { libvlc_meta_Album,
182 EXTRACTOR_METATYPE_ALBUM },
183 { libvlc_meta_TrackNumber,
184 EXTRACTOR_METATYPE_TRACK_NUMBER },
185 { libvlc_meta_Description,
186 EXTRACTOR_METATYPE_DESCRIPTION },
187 { libvlc_meta_Rating,
188 EXTRACTOR_METATYPE_RATING },
189 { libvlc_meta_Date,
190 EXTRACTOR_METATYPE_CREATION_TIME },
191 { libvlc_meta_Setting,
192 EXTRACTOR_METATYPE_UNKNOWN },
193 { libvlc_meta_URL,
194 EXTRACTOR_METATYPE_URL },
195 { libvlc_meta_Language,
196 EXTRACTOR_METATYPE_LANGUAGE },
197 { libvlc_meta_NowPlaying,
198 EXTRACTOR_METATYPE_UNKNOWN },
199 { libvlc_meta_Publisher,
200 EXTRACTOR_METATYPE_PUBLISHER },
201 { libvlc_meta_EncodedBy,
202 EXTRACTOR_METATYPE_ENCODED_BY },
203 { libvlc_meta_ArtworkURL,
204 EXTRACTOR_METATYPE_URL },
205 { libvlc_meta_TrackID,
206 EXTRACTOR_METATYPE_TRACK_NUMBER },
207 { libvlc_meta_TrackTotal,
208 EXTRACTOR_METATYPE_UNKNOWN },
209 { libvlc_meta_Director,
210 EXTRACTOR_METATYPE_MOVIE_DIRECTOR },
211 { libvlc_meta_Season,
212 EXTRACTOR_METATYPE_SHOW_SEASON_NUMBER },
213 { libvlc_meta_Episode,
214 EXTRACTOR_METATYPE_SHOW_EPISODE_NUMBER },
215 { libvlc_meta_ShowName,
216 EXTRACTOR_METATYPE_SHOW_NAME },
217 { libvlc_meta_Actors,
218 EXTRACTOR_METATYPE_PERFORMER },
219 { libvlc_meta_AlbumArtist,
220 EXTRACTOR_METATYPE_ARTIST },
221 { libvlc_meta_DiscNumber,
222 EXTRACTOR_METATYPE_DISC_NUMBER },
223 { libvlc_meta_DiscTotal,
224 EXTRACTOR_METATYPE_UNKNOWN },
225 { 0, 0 }
226 };
227
228 for (unsigned int i = 0;
229 EXTRACTOR_METATYPE_RESERVED != map[i].mt;
230 i++)
231 {
232 char *meta;
233
234 fprintf (stderr,
235 ".");
236 meta = libvlc_media_get_meta (media,
237 map[i].vt);
238 if (NULL == meta)
239 continue;
240 ec->proc (ec->cls,
241 "vlc",
242 map[i].mt,
243 EXTRACTOR_METAFORMAT_UTF8, /* ??? */
244 "text/plain",
245 meta,
246 strlen (meta) + 1);
247 free (meta);
248 }
249}
250
251
252static void
253media_ready (const struct libvlc_event_t *p_event,
254 void *p_data)
255{
256 fprintf (stderr,
257 "media status: %d, %d\n",
258 p_event->type == libvlc_MediaParsedChanged,
259 p_event->u.media_parsed_changed.new_status);
260 if (p_event->u.media_parsed_changed.new_status ==
261 libvlc_media_parsed_status_done)
262 {
263 fprintf (stderr,
264 "media ready\n");
265 }
266}
267
268
269static void
270my_logger (void *data,
271 int level,
272 const libvlc_log_t *ctx,
273 const char *fmt,
274 va_list args)
275{
276#if 0
277 vfprintf (stderr,
278 fmt,
279 args);
280 fprintf (stderr, "\n");
281#endif
282}
283
284
285/**
286 * Extract information using libvlc
287 *
288 * @param ec extraction context
289 */
290void
291EXTRACTOR_vlc_extract_method (struct EXTRACTOR_ExtractContext *ec)
292{
293 libvlc_instance_t *vlc;
294 libvlc_media_t *media;
295 libvlc_event_manager_t *em;
296
297 {
298 sigset_t set;
299
300 signal (SIGCHLD, SIG_DFL);
301 sigemptyset (&set);
302 sigaddset (&set, SIGPIPE);
303 pthread_sigmask (SIG_BLOCK, &set, NULL);
304 }
305
306 {
307 const char *argv[] = {
308 "-v",
309 "3",
310 NULL
311 };
312 vlc = libvlc_new (2, argv);
313 }
314 if (NULL == vlc)
315 return;
316 libvlc_log_set (vlc,
317 &my_logger,
318 NULL);
319 media = libvlc_media_new_callbacks (vlc,
320 &open_cb,
321 &read_cb,
322 &seek_cb,
323 &close_cb,
324 ec);
325 if (NULL == media)
326 {
327 libvlc_release (vlc);
328 return;
329 }
330
331 em = libvlc_media_event_manager (media);
332 libvlc_event_attach (em,
333 libvlc_MediaParsedChanged,
334 &media_ready,
335 ec);
336 {
337 int status;
338
339 status = libvlc_media_parse_with_options (media,
340 libvlc_media_fetch_local
341 | libvlc_media_parse_network
342 | libvlc_media_fetch_network,
343 30000); /* 30s timeout */
344 }
345 extract (ec,
346 media);
347 libvlc_media_release (media);
348 libvlc_release (vlc);
349}
350
351
352/* end of vlc_extractor.c */