2003-07-06 Jean-Sébastien Pédron * oukile/htable.c (fnv32_hash): Now, returns an uint32_t instead of an unsigned long, because unsigned long is too large (64 bits) on some OS (like Tru64). * oukile/file_readinfo.c (find_mount_point): HP-UX and Tru64 will use the same method as Linux, thus becoming the default method for any OS. * include/oukile/htable.h: Includes stdint.h, which declare uint32_t, used in struct htable, and added a fallback in case stdint.h is not present. * oukile/file/file.h: Use #pragma pack(1) instead of __attribute__((__packed__)) on Tru64, because Compaq C doesn't support this GCC extension. 2003-07-05 Jean-Sébastien Pédron * oukile/file/Makefile.am: Now uses libtool. Changed libfile.a to libfile.la. All this seems to allow a better static linking in the main library and fixed issues undef HP-UX. * oukile/md5.c oukile/md5.h: Functions to calculates the MD5 checksum of a given message. Tested on both little endian and big endian systems. * oukile/file_index.c oukile/file_index.h: Code ot index a file in a catalog. * oukile/liboukile.h: Added oukile/md5.h and oukile/file_index.h. * oukile/file_readinfo.c (guess_media_type): Commented out code to guess the device type. Scheduled for later. * oukile/htable.c: Changed u_int32_t to uint32_t, because the former doesn't not exist on all systems (eg. HP-UX). * oukile/scanner.c (scan): Fixed a memory leak : start_path was not free()'d and start_path_slash was conditionnaly malloc()'d, but always free()'d. * oukile/Makefile.am (liboukile_la_LIBADD): Changed -lfile to file/libfile.la to prevent dynamic linking. * oukile/misc/oukile.m4: Doesn't use pkg-config but our own oukile-config script. It allows installation on system where pkg-config is not installed/avialable. * oukile/misc/oukile-config.in: Does the same job as pkg-config. Now, the library doesn't require pkg-config. There's still a bug on HP-UX where this file is not installed with execution permission. * configure.ac: Checks the endianness of the target host. Pkg-config is now optional. 2003-05-25 Jean-Sébastien Pédron * include/oukile/oukile.h.in: Added mount_point to struct file_info. * oukile/file_readinfo.c (find_mount_point): Find the mount point of the partition where the current file lives. (oukile_readinfo): Add the mount point to media informations. Fixes a bug when getpwuid() or getgrgid() failed. * oukile/utils.c (oukile_dump_file_info): Print to STDERR all available informations from a given struct file_info. 2003-05-01 Jean-Sébastien Pédron * plugins/info/info_ogg/info_ogg.c (print_header_info): More informations added. User comments are splitted correctly. 2003-04-29 Jean-Sébastien Pédron * include/oukile/plugins.h: Removed "enabled" member from the info_plugin structure. * oukile/plugins_tools.c oukile/plugins_tools.h: Provides useful functions for plugins. (oukile_plugtools_info_full_desc): Take a filled hash table, and returns a formatted string. Used by info plugins to prepare the full description that will go in the index. * configure.ac: Removed "-module" from the plugin_ldflags variable, because it has moved to each plugins' Makefile.am. Added substitution for variables set by Ogg and Vorbis. * plugins/ingo/libogg plugins/info/info_ogg: Renamed libogg plugin to info_ogg. Now that the name doesn't start with "lib", automake requires that the flag "-module" is in _la_LDFLAGS, or complain that the module name is not standard. So, to please automake, the flag has been moved from configure.ac to every plugins' Makefile.am. * plugins/info/info_ogg/Makefile.am: Added OGG_CFLAGS and VORBIS_CFLAGS to INCLUDES. Added OGG_LIBS and VORBIS_LIBS to _LDFLAGS. * plugins/info/info_ogg/info_ogg.c plugins/info/info_ogg/info_ogg.h: First developments on the plugin. For now, it opens the file, read the Vorbis stream and comment, and fill a hash table with these informations. It still needs to format some strings, and record more informations. 2003-04-27 Jean-Sébastien Pédron * include/oukile/oukile.h.in : Renamed constants OUKILE_PLUGIN_GRP_INFO, OUKILE_PLUGIN_GRP_INDEX, OUKILE_PLUGIN_GRP_OUTPUT to OUKILE_PLUGINS_GRP_INFO, OUKILE_PLUGINS_GRP_INDEX, OUKILE_PLUGINS_GRP_OUTPUT, respectively. The structure plugin_info was renamed to plugin_details too. Renamed struct file_info->ouk_version to struct file_info->lib_version. * oukile/plugins_enum.c oukile/plugins_enum.h: Renamed oukile_plugins_init and oukile_plugins_cleanup to oukile_plugins_lod and oukile_plugins_unload reaspectively. (oukile_plugins_load): plugins_info->associations was not initialized, fixed. * oukile/plugins_ctrl.c oukile/plugins_ctrl.h: Global plugins structure renamed ip_data, rp_data, op_data to plugins_info, plugins_index and plugins_output respectively. (oukile_plugins_getlist): Rewritten from scratch. Now fill an array passed in parameters, and return its size. Also, can returns more than one group at a time (by specifying OR'd groups constant). * oukile/scanner.c (scan_dir): Add a trailing '/' to a path before the recursion, to avoid duplicate directories in the hash : add_file was adding path with a trailing slash, but not scan_dir. (scan): Put a trailing '/' to the directory before starting scan_dir. 2003-04-04 Jean-Sébastien Pédron * libltdl: Added libltdl (from Libtool) to handle dynamic library loading (for plugins). * oukile/plugins_ctrl.h: Changed (struct btree *) by (struct htable *) for each *_data structure; * oukile/plugins_ctrl.c: Replaced calls to oukile_btree_* by oukile_htable_*, to handle the new structures (in plugins_ctrl.h). * oukile/plugins_enum.c (oukile_plugins_init): Now call libltdl instead of dlopen() directly. 2003-03-31 Jean-Sébastien Pédron * oukile/htable.c include/oukile/htable.h: Hash table data structure, using the FVN hash function. * oukile/scanner.c (scan, scan_dir): Completly rewritten from scratch. Now stores filenames in a hash table, and symlinks are handled correctly. About 3x faster. 2003-03-18 Jean-Sébastien Pédron * oukile/btree.c (oukile_btree_insert): Balancing was not done correctly for Right-Left and Left-Right balance. This needs more tests. (oukile_btree_free): Free a whole tree. * oukile/scanner.c (scan_dir): One useless realpath() (and malloc) removed. There's one malloc left, that could be avoided methinks. * configure.ac: Check for headers time.h, sys/param.h, pwd.h, grp.h and errno.h. 2003-03-17 Jean-Sébastien Pédron * oukile/btree.c (oukile_btree_exists), include/oukile/btree.h: New function, that tells if a key exists or not. * oukile/scanner.c (scan_dir): Still bugfixes about symlinks handle. Should be good now, but needs testing. * configure.ac: Changed libtool versionning. The lib version for libtool is now different from the real lib version (it's because libtool as a special phylosophy for the lib version). 2003-03-14 Jean-Sébastien Pédron * oukile/scanner.c (scan): Many bugfixes, especially about symlinks. For example: a link "link -> .." would cause the function to enter an endless loop. One malloc removed, and a second one should follow. 2003-03-09 Jean-sébastien Pédron * oukile/scanner.c (scan): Options are OR'd #define, instead of a list of int. * oukile/file_scan.c (oukile_scan): Options are of the same format as for scan() in oukile/scanner.c. * oukile/include/oukile.h.in: Options for oukile_scan() and scan() or defined here. 2003-03-01 Jean-Sébastien Pédron * oukile.m4: Moved to misc/. * oukile-config.in: Removed, Oukilé now use pkg-config. * misc/oukile.m4: Updated to use pkg-config. * misc/oukile.pc.in: File to be used with pkg-config. TODO: add variables that oukile.m4 wants. * configure.ac: Updated, to take above files changes. OUKILE_*_VERSION renamed to OUKILE_*. * Makefile.am: oukile-config.in was removed, and a new misc/ subdirs was added. * misc/Makefile.am: New Makefile for oukile.m4 and oukile.pc.in. * include/oukile/oukile.h.in: OUKILE_VERSION contains a version number of the form "0.1.1" instead of an "encoded" form. * oukile/main.c: oukile_major_version, oukile_minor_version and oukile_micro_version added to compare with the ones in headers, at ./configure time. (oukile_version): Removed. * oukile/utils.c (oukile_version_encode): New function, returns an encoded form of a given version number. (oukile_version_decode): New function, returns a decoded form of a given version number. * oukile/file_readinfo.c (oukile_readinfo): Updated to call oukile_version_encode(). 2003-02-16 Jean-Sébastien Pédron * configure.ac: Many fixes and cleanup. Plugins can now be disabled at configure time (tested with libogg). * Makefile.am: Dist file fixes (oukile.m4, magic/magic.mime, oukile/main.h and oukile/utils.h were not put in the .tar.*). * include/oukile/oukilectrl.h: Renamed to oukile.h.in, and oukile.h is generated at configure time, with the substitution of the version number. * oukile/oukile.h: Renamed to liboukile.h to avoid conflict with include/oukile/oukile.h. 2003-02-15 Jean-Sébastien Pédron * oukile/btree.c (oukile_btree_update): New function to update an already existing node in the tree (no insertion done). * oukile/plugins_enum.c (add_plugin): Now fills the associations structure. * oukile/plugins_ctrl.c (oukile_plugins_info_find): New function that return a list of available plugin for a given filetype. * oukile/file_readinfo (oukile_readadvanced): New function that look up the right info plugin, and call it with the given file_info structure. The plugin has to fill the structure then. 2003-02-02 Jean-Sébastien Pédron * include/oukile/oukilectrl.h: Added some includes. Commented out fields "created_on" and "md5sum" in struct file_info, because they are not yet implemented. * oukile/file/file.h: Commented out #define about Large File. * oukile/oukile.h: Added #include "config.h". * oukile/file_readinfo.c (oukile_readinfo): Now, fill file stats and guessed filetypes. * oukile/info.[ch], oukile/index.[ch], oukile/output.[ch]: Deleted. Content moved to oukile/plugins_ctrl.h. * oukile/plugins_ctrl.h: Added declarations for struct *_plugin_data. * magic/magic.mime: Will contains magic numbers, and filetype strings. 2002-07-21 Jean-Sébastien Pédron Projects started.