1 2007-08-28 Bastien Nocera <hadess@hadess.net>
5 * src/test-mime-data.c: Add test-mime-data test program from
6 Matthias Clasen <mclasen@redhat.com> (Closes: #5210)
8 2007-06-04 Christian Neumair <cneumair@gnome.org>
10 * src/xdgmime*.[ch]: Rename _caches to _xdg_mime_caches. Also
11 namespace all reserved symbols that are declared in headers using
12 XDG_RESERVED_ENTRY(), #7074 and #11124. Thanks to Yevgen Muntyan
13 <muntyan@tamu.edu> and Joe Marcus Clarke <marcus@freebsd.org>.
15 2007-06-02 Christian Neumair <cneumair@gnome.org>
17 * src/xdgmime.[ch]: Move xdg_mime_type_unknown to .rodata.
18 * src/xdgmime.h: Add XDG_ENTRY() entry for xdg_mime_dump.
21 * src/xdgmime.c: (_xdg_mime_alias_list_lookup): Initialize mime_type
22 to NULL instead of 0, GNOME #341812. Thanks to Kjartan Maraas
25 * src/xdgmime.[ch]: (xdg_mime_media_type_equal),
26 (_xdg_mime_media_type_equal): Add private version of
27 xdg_mime_media_type_equal that doesn't call xdg_mime_init(), use it in
28 _xdg_mime_mime_type_subclass.
30 2007-06-02 Christian Neumair <cneumair@gnome.org>
32 * src/xdgmimemagic.c: Fallback to getc() if getc_unlocked() is not
33 available, GNOME #381499. Thanks to Paul <ephraim_owns@hotmail.com>.
35 2007-06-01 Christian Neumair <cneumair@gnome.org>
37 * src/xdgmime.c: (xdg_mime_get_mime_type_for_file): Only request two
38 MIME types from cache.
40 * src/xdgmime.c: (xdg_mime_dump): Dump cache.
42 * src/xdgmimecache.c: Warn if building without MMAP support.
44 2007-06-01 Christian Neumair <cneumair@gnome.org>
46 * src/xdgmime.c: (xdg_lookup_cache_for_file), (xdg_check_dir):
47 Fix constant re-creation of memory MIME cache, #7495.
49 2007-06-01 Christian Neumair <cneumair@gnome.org>
51 * src/xdgmimeglob.c: (_xdg_glob_hash_node_lookup_file_name): Don't
52 return NULL MIME types, #5241.
54 2007-06-01 Christian Neumair <cneumair@gnome.org>
56 * src/xdgmime.c: (xdg_mime_shutdown): Fix cache variable name from last
59 * src/xdgmime.c: (xdg_mime_unalias_mime_type), (xdg_mime_mime_type_equal):
61 * src/xdgmimemagic.c: (_xdg_mime_magic_lookup_data):
62 Define and use private versions of functions that may lead to an
63 xdg_mime_init() call and thus to an invalid cache, and a crash - #6824.
64 Thanks to Joe Shaw <joeshaw@novell.com>.
66 2007-06-01 Christian Neumair <cneumair@gnome.org>
68 * src/xdgmime.c: (xdg_mime_shutdown): Free caches, #7496.
69 Thanks to Yevgen Muntyan <muntyan@tamu.edu>.
71 2007-06-01 Christian Neumair <cneumair@gnome.org>
73 * src/xdgmimecache.c: (cache_glob_node_lookup_suffix): Don't return
74 MIME types if cache suffix lookup returns empty string, #9544.
75 Thanks to Yevgen Muntyan <muntyan@tamu.edu>.
77 2007-06-01 Christian Neumair <cneumair@gnome.org>
79 * src/xdgmimemagic.c: (_xdg_mime_magic_lookup_data): Fix issue where
80 MIME type was not detected when two MIME types with parent
81 relationship match and have equal priority, and child
82 was found before parent in cache, #9242.
83 Thanks to Tom Parker <freedesktop@tevp.net>.
85 2007-06-01 Christian Neumair <cneumair@gnome.org>
87 * src/xdgmimecache.c: (_xdg_mime_cache_list_mime_parents): Fix
88 several problems with this function, #9560. Thanks to Yevgen Muntyan.
90 2007-06-01 Christian Neumair <cneumair@gnome.org>
92 * src/xdgmimemagic.c: Don't declare errno, fixes build on Dragonfly
95 2006-07-13 Christian Neumair <chris@gnome-de.org>
97 * src/xdgmimemagic.c: (_xdg_mime_magic_parse_magic_line):
98 Only declare 'i' #if LITTLE_ENDIAN. Partially fixes GNOME #340277.
99 Thanks to James Andrewartha.
101 2006-03-02 Christian Neumair <chris@gnome-de.org>
103 * src/xdgmimeglob.c: (_xdg_glob_hash_insert_text),
104 (_xdg_glob_hash_append_glob): Don't strdup the MIME type when passing
105 it to _xdg_glob_hash_insert_text, but let the function itself figure
106 out whether string duplication is needed. Fixes #5993.
107 Thanks to Martin Wehner.
109 2006-02-25 Christian Neumair <chris@gnome-de.org>
111 * src/xdgmimemagic.c: (_xdg_mime_magic_lookup_data): Make
112 priority equality check more robust so that it works for three or more
113 matches. Also allow matchlets with 0 priority.
115 2006-02-19 Christian Neumair <chris@gnome-de.org>
117 * src/xdgmimemagic.c: (_xdg_mime_magic_lookup_data): When two
118 unrelated MIME types with equal priorities match, don't assume one of
120 http://bugzilla.gnome.org/show_bug.cgi?id=331719
122 2006-01-03 Christian Neumair <chris@gnome-de.org>
124 * src/xdgmimemagic.c: (_xdg_mime_magic_lookup_data): Also consider
125 match priority for the returned MIME type.
127 2005-12-01 Christian Neumair <chris@gnome-de.org>
129 * src/xdgmime.c: (xdg_mime_get_mime_type_from_file_name):
130 * src/xdgmimecache.c: (_xdg_mime_cache_get_mime_type_from_file_name):
131 Return XDG_MIME_TYPE_UNKNOWN if multiple MIME types match a simple
134 2005-12-01 Matthias Clasen <mclasen@redhat.com>
136 * src/xdgmimecache.h:
137 * src/xdgmimecache.c (_xdg_mime_cache_get_mime_type_for_file):
138 Allow passing in a struct stat * to avoid re-stat()ing.
139 Forgotten commit from an earlier entry.
141 * src/xdgmimecache.c (cache_glob_lookup_literal):
142 (cache_glob_lookup_fnmatch):
143 (cache_glob_node_lookup_suffix): Change these functions to
144 allow returning more than one mime type if identical globs
147 * src/xdgmimemagic.h:
149 * src/xdgmimemagic.c (_xdg_mime_magic_lookup_data):
150 * src/xdgmimeglob.c (_xdg_glob_hash_lookup_file_name):
151 Change these functions to allow returning more than one
152 mime type if identical globs match.
154 * src/xdgmimecache.c (_xdg_mime_cache_get_mime_type_for_file):
155 * src/xdgmime.c (xdg_mime_get_mime_type_for_file):
156 If multiple identical globs match, use magic to disambiguate.
158 2005-11-04 Matthias Clasen <mclasen@redhat.com>
160 * xdgmime.c (xdg_mime_list_mime_parents): Prevent
163 2005-10-18 Matthias Clasen <mclasen@redhat.com>
166 * src/xdgmimecache.h:
167 * src/xdgmimecache.c: Make the array of caches NULL-terminated
168 and rename it to _caches. (#4011)
171 * src/xdgmime.c: Add a struct statbuf * argument to
172 xdg_mime_get_mime_type_for_file(). (#3529)
174 * src/test-mime.c: Adjust callers. Add License.
176 * src/xdgmimecache.c: Make magic comparisons work correctly.
178 Thu Jun 9 23:55:25 2005 Jonathan Blandford <jrb@redhat.com>
180 * src/xdgmime.c (xdg_mime_init_from_directory): patch from
181 federico to realloc the right size, #3506
183 2005-04-17 Christophe Fergeau <teuf@gnome.org>
185 * src/xdgmimeint.c: fix gcc4 signedness warning
187 2005-04-17 Christophe Fergeau <teuf@gnome.org>
189 * src/xdgmimemagic.c: (_xdg_mime_magic_matchlet_compare_to_data),
190 (_xdg_mime_magic_matchlet_compare_level),
191 (_xdg_mime_magic_lookup_data): when magic patterns matches, check if
192 there aren't subtypes with matching patterns too, and if so, favour
193 the subtype over the parent type, should fix #2686
195 2005-04-16 Christophe Fergeau <teuf@gnome.org>
197 * src/xdgmime.c: (xdg_mime_init_from_directory): fix leak when
198 mime.cache doesn't exist
200 2005-04-16 Christophe Fergeau <teuf@gnome.org>
202 * src/test-mime.c: (main): disabled call to xdg_mime_dump for now
203 * src/xdgmimemagic.c: (_xdg_mime_magic_matchlet_compare_to_data):
204 fixed off by 1 error when handling offsets, fixes bug #2050 and
207 Fri Apr 8 23:37:33 2005 Jonathan Blandford <jrb@redhat.com>
209 * src/xdgmimecache.c: Actually add the file. Also, patch from
210 Matthias Clasen <mclasen@redhat.com> to fix small bugs, #2939
212 Fri Apr 1 14:59:43 2005 Jonathan Blandford <jrb@redhat.com>
214 * src/xdgmimecache.c: Patch from Matthias Clasen to mmap the
217 Mon Mar 28 13:58:32 2005 Jonathan Blandford <jrb@redhat.com>
219 * src/xdgmimeglob.c (_xdg_glob_hash_insert_text): patch from
220 Matthias Clasen to handle globs that don't have '.' chars in
221 them. As an example 'foo~' should match '*~'
223 Mon Mar 21 13:16:12 2005 Jonathan Blandford <jrb@redhat.com>
225 * src/xdgmime.c (xdg_mime_shutdown): fix from Axel Liljencrantz
226 <f97-ali@nada.kth.se> to free parent_list in shutdown.
228 2005-01-10 Christophe Fergeau <teuf@gnome.org>
230 * src/xdgmimeglob.c: (_xdg_glob_hash_lookup_file_name): make previous
231 commit actually work...
233 2005-01-10 Christophe Fergeau <teuf@gnome.org>
235 * src/xdgmimeglob.c: (_xdg_glob_hash_lookup_file_name): don't get
236 confused by multiple dots in filenames when doing extension matching
238 2004-12-13 Marco Pesenti Gritti <marco@gnome.org>
242 wrap new API in XDG_ENTRY()
244 2004-12-13 Marco Pesenti Gritti <marco@gnome.org>
246 * src/xdgmimeglob.c: (_xdg_glob_hash_lookup_file_name):
248 Do not assume the filename is UTF8. We just need to look
249 for the dot which is ASCII.
251 2004-12-09 Marco Pesenti Gritti <marco@gnome.org>
255 Remove spacings I introduced by mistake
257 2004-12-09 Marco Pesenti Gritti <marco@gnome.org>
259 * src/xdgmimealias.c: (_xdg_mime_alias_read_from_file):
260 * src/xdgmimeint.c: (_xdg_ucs4_to_lower):
262 * src/xdgmimeparent.c: (_xdg_mime_parent_read_from_file):
264 Check in Mariano Suárez-Alvarez <msuarezalvarez@arnet.com.ar> patch
265 for GNOME bug #160838.
267 2004-12-09 Marco Pesenti Gritti <marco@gnome.org>
269 * src/xdgmimeglob.c: (_xdg_glob_hash_node_lookup_file_name):
270 * src/xdgmimeint.c: (_xdg_ucs4_to_lower):
273 Follow the freedesktop spec about case sensitiveness. Fix #732
275 2004-12-08 Christophe Fergeau <teuf@gnome.org>
277 * src/xdgmimeglob.c: (_xdg_mime_glob_read_from_file): backing out
278 "fix" for bug #1048 since it frees memory that shouldn't be freed.
280 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
282 * src/xdgmimemagic.c: (_xdg_mime_magic_read_from_file):
284 Check that fread succeeded reading all chars. Fix #1049
286 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
289 * src/xdgmimealias.c:
292 * src/xdgmimemagic.c:
293 * src/xdgmimeparent.c:
295 Include config.h. Fix #913
297 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
299 * src/xdgmimealias.c: (_xdg_mime_alias_list_lookup):
303 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
305 * src/xdgmime.c: (xdg_mime_unalias_mime_type),
306 (xdg_mime_mime_type_equal), (xdg_mime_mime_type_subclass),
307 (xdg_mime_get_mime_parents):
310 Add apis to get parents and to unalias mime type
312 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
314 * src/xdgmimealias.c: (_xdg_mime_alias_list_lookup):
315 * src/xdgmimeparent.c: (_xdg_mime_parent_list_lookup):
317 Protect against stupid bsearch() implementations. (#1961,
320 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
322 * src/xdgmimeparent.c: (_xdg_mime_parent_read_from_file):
324 Initialize the parent field of the newly allocate list
325 entry. (#1916, Alex Larsson)
327 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
329 * src/xdgmimeglob.c: (_xdg_mime_glob_read_from_file):
331 Patch from Matthias Clasen <mclasen@redhat.com> to fix
332 a mem leak. Bug #1048
334 2004-12-08 Marco Pesenti Gritti <marco@gnome.org>
338 Patch from Michael.Wilson@bull.net to fix compile error on AIX
340 Sun Nov 7 02:25:21 2004 Jonathan Blandford <jrb@redhat.com>
342 * src/xdgmime.h: Patch from Matthias Clasen <mclasen@redhat.com>
343 to add alias and inheritence support.
345 2004-09-16 Christophe Fergeau <teuf@gnome.org>
347 * src/xdgmimeglob.c: (_xdg_glob_hash_free_nodes):
348 * src/xdgmimemagic.c: (_xdg_mime_magic_free): fix memory leaks,
349 fixes http://bugzilla.gnome.org/show_bug.cgi?id=152771 and
350 http://bugzilla.gnome.org/show_bug.cgi?id=152768
352 Mon Jul 19 00:23:00 2004 Jonathan Blandford <jrb@gnome.org>
354 * src/xdgmime.c (xdg_mime_register_reload_callback): register a
355 callback when we reload MIME data.
357 * src/xdgmime.c (xdg_mime_remove_callback): Add capability to
360 Sun Jul 18 20:56:22 2004 Jonathan Blandford <jrb@gnome.org>
362 * src/xdgmime.c (xdg_mime_shutdown):
363 (xdg_mime_init): reread data when it changes on disk.
365 Thu May 27 16:18:14 2004 Jonathan Blandford <jrb@gnome.org>
367 * src/xdgmime.h: move xdg_mime_shutdown into the XDG_ENTRY guard.
369 Thu May 27 15:02:13 2004 Jonathan Blandford <jrb@gnome.org>
371 * src/xdgmimemagic.c (_xdg_mime_magic_read_magic_file): patch from
372 Hongli Lai <h.lai@chello.nl> to catch magic files that don't end
375 Fri Apr 30 11:56:01 2004 Jonathan Blandford <jrb@gnome.org>
377 * src/xdgmimemagic.c (_xdg_mime_magic_read_a_number): make the
378 buffer the right size. Reported by Morten Welinder, #136323
380 Sun Mar 21 23:56:46 2004 Jonathan Blandford <jrb@gnome.org>
382 * src/xdgmimemagic.c: Patch from Arjan van de Ven
383 <arjanv@redhat.com> to do s/fgetc/getc_unlocked/g.
385 Wed Mar 10 22:28:41 2004 Jonathan Blandford <jrb@gnome.org>
387 * src/xdgmimemagic.c (_xdg_mime_magic_read_a_number): fix usage of
388 isdigit. Reported by Morten Welinder, #136323
390 * src/xdgmimemagic.c (_xdg_mime_magic_read_magic_file): patch from
391 Christophe Fergeau to reverse the order of the matchlet before
392 adding it to the list.
394 * src/xdgmimeint.h (_xdg_utf8_skip): patch from Alexander Larsson
397 Wed Jan 21 09:29:41 2004 Jonathan Blandford <jrb@gnome.org>
399 * src/xdgmimemagic.c (_xdg_mime_magic_insert_match): dropped
402 * src/xdgmimeglob.c (_xdg_glob_hash_free_nodes): dropped patches.
405 Tue Jan 20 14:55:39 2004 Jonathan Blandford <jrb@gnome.org>
407 * src/xdgmime.h (XDG_MIME_TYPE_UNKNOWN): move the definition so
408 that it catches the XDG_ENTRY mangling.
410 * src/xdgmimemagic.c: make some functions static
412 Tue Jan 20 14:34:26 2004 Jonathan Blandford <jrb@gnome.org>
414 * src/xdgmime.c (xdg_mime_get_max_buffer_extents): add function so
415 that it's easy to get the max buffer extents.
417 Tue Jan 20 12:55:55 2004 Jonathan Blandford <jrb@gnome.org>
419 * src/Makefile: Test prefix code
421 * src/xdgmime*.h: Fully use the prefix code
423 * src/xdgmime.c: finish the syncing from both GTK+ and gnome-vfs.
425 Tue Jan 13 16:21:04 2004 Jonathan Blandford <jrb@gnome.org>
427 * src/xdgmime.[ch] (XDG_MIME_TYPE_UNKNOWN): make an extern const
428 char * so that comparisons can work.
430 * src/xdgmimeint.c (_xdg_utf8_to_ucs4): patch from Dave Jones
431 <davej@redhat.com> to make operations more explicit.
433 Tue Oct 28 15:09:06 2003 Jonathan Blandford <jrb@redhat.com>
435 * README: Add a readme, and clarify the licensing terms of the
438 Tue Oct 28 14:47:37 2003 Jonathan Blandford <jrb@redhat.com>
440 * src/xdgmime.c (xdg_mime_shutdown): implement shutdown. This
441 frees all memory and resets to an uninitialized state as best as
444 Mon Oct 27 11:45:58 2003 Jonathan Blandford <jrb@redhat.com>
446 * src/xdgmimemagic.c (_xdg_mime_magic_read_a_number): strtol
447 returns a long, not an int. Thanks to Manish Singh for pointing
450 * src/xdgmimemagic.c (_xdg_mime_magic_parse_magic_line): change
451 assertion to avoid a warning.
453 Tue Oct 21 15:56:55 2003 Jonathan Blandford <jrb@gnome.org>
455 * Makefile: add a simple makefile
456 * src/Makefile: ditto
458 Tue Jul 22 15:37:45 2003 Jonathan Blandford <jrb@gnome.org>
460 * xdgmime/xdgmime.c (xdg_mime_init): use XDG_DATA_HOME instead of