[librep] improved ffi-binding -- improved tar file-handler -- updated librep.sym
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Subject: [librep] improved ffi-binding -- improved tar file-handler -- updated librep.sym
- Date: Fri, 24 Jul 2009 18:08:48 +0000 (UTC)
commit 32520d3333e3725b56805a245005340b1c8b2c6a
Author: chrisb <zanghar freenet de>
Date: Fri Jul 24 20:06:54 2009 +0200
improved ffi-binding -- improved tar file-handler -- updated librep.sym
ChangeLog | 10 ++++++++++
emulate-gnu-tar | 18 ++++++++++++++++++
lisp/rep/io/file-handlers/tar.jl | 6 ++++--
man/news.texi | 19 +++++++++++++++++--
src/ffi.c | 11 +++++++----
src/librep.sym | 5 +++++
6 files changed, 61 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0775a03..5b023ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-24 Christopher Bratusek <zanghar freenet de>
+ * emulate-gnu-tar
+ * lisp/rep/io/file-handlers/tar.jl: added support for tar.xz and tar.lzma
+
+ * lisp/rep/io/file-handlers/tar.jl: improved regex for parsing tar output [Alexey I. Froloff]
+
+ * src/ffi.c: improved ffi-binding [Alexey I. Froloff]
+
+ * src/librep.sym: added some missing entries [Alexey I. Froloff]
+
2009-07-15 Christopher Bratusek <zanghar freenet de>
* configure.in
* Makedefs.in
diff --git a/emulate-gnu-tar b/emulate-gnu-tar
index 1cf84cc..85db260 100755
--- a/emulate-gnu-tar
+++ b/emulate-gnu-tar
@@ -23,6 +23,8 @@ Supported options include:
--compress
--gzip
--bzip2
+ --xz
+ --lzma
Supported commands include:
@@ -68,6 +70,14 @@ EOF
compression_mode=bzip2
;;
+ --xz)
+ compression_mode=xz
+ ;;
+
+ --lzma)
+ compression_mode=lzma
+ ;;
+
--file)
tarfile=`absolutify "$2"`
shift
@@ -120,6 +130,14 @@ case "$compression_mode" in
input="bzip2 -d -c \"$tarfile\" |"
;;
+ xz)
+ input="xz -d -c \"$tarfile\" |"
+ ;;
+
+ lzma)
+ input="lzma -d -c \"$tarfile\" |"
+ ;;
+
*)
input="cat \"$tarfile\" |"
;;
diff --git a/lisp/rep/io/file-handlers/tar.jl b/lisp/rep/io/file-handlers/tar.jl
index 261f700..c47a9cc 100644
--- a/lisp/rep/io/file-handlers/tar.jl
+++ b/lisp/rep/io/file-handlers/tar.jl
@@ -65,10 +65,12 @@
;; alist mapping file suffixes to GNU tar compression options
(defvar tarfh-compression-modes '(("\\.t?gz$" . "--gzip")
("\\.(taz|Z)$" . "--compress")
- ("\\.bz2" . "--bzip2")))
+ ("\\.bz2" . "--bzip2")
+ ("\\.xz" . "--xz")
+ ("\\.(lz|lzma)$" . "--lzma")))
;; Hairy regexp matching tar `--list --verbose' output
-(defvar tarfh-list-regexp (concat "([a-zA-Z-]+)\\s+(\\w+)/(\\w+)\\s+(\\d+)\\s+"
+(defvar tarfh-list-regexp (concat "([a-zA-Z-]+)\\s+(\\w+)/([a-zA-Z0-9_,]+)\\s+(\\d+)\\s+"
;; GNU tar output
"([0-9-]+\\s+[0-9:]+"
;; solaris tar output
diff --git a/man/news.texi b/man/news.texi
index 0a74b2e..f3bbbe5 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -3,6 +3,23 @@
@appendix News
@cindex News
+ heading 0.90.1
+
+ itemize @bullet
+
+ item Tar file-handler does now support XZ compressed tarballs
+
+ item Tar file-handler does now support LZMA compressed tarballs
+
+ item Improved regex for parsing tar output in the file-handler [Alexey I. Froloff]
+
+ item We do now correctly check for libffi
+
+ item Improved libffi-binding [Alexey I. Froloff]
+
+ item Updated librep.sym for missing entries [Alexey I. Froloff]
+ end itemize
+
@heading 0.90.0
@itemize @bullet
@@ -12,8 +29,6 @@
@item Remove scheme and unscheme modules
@item Going on with code-cleanup
-
- item We do now correctly check for libffi
@end itemize
@heading 0.17.4
diff --git a/src/ffi.c b/src/ffi.c
index 954df58..555327e 100644
--- a/src/ffi.c
+++ b/src/ffi.c
@@ -72,6 +72,9 @@
#ifdef HAVE_FFI_H
#include <ffi.h>
+#ifndef ALIGN /* was in older ffi.h */
+#define ALIGN(v, a) (((((unsigned) (v))-1) | ((a)-1))+1)
+#endif
#endif
#if SIZEOF_VOID_P == SIZEOF_LONG
@@ -150,10 +153,10 @@ static rep_ffi_interface **ffi_interfaces;
static rep_bool
ffi_types_equal_p (const rep_ffi_type *a, const rep_ffi_type *b)
{
- if (a->type != NULL && a->type == b->type)
- return rep_TRUE;
if (a->subtype != b->subtype)
return rep_FALSE;
+ if (a->type != NULL && a->type == b->type)
+ return rep_TRUE;
switch (a->subtype)
{
@@ -346,7 +349,7 @@ rep_ffi_marshal (unsigned int type_id, repv value, char *ptr)
return ptr + sizeof (int64_t);
case FFI_TYPE_POINTER:
- *(void **)ptr = rep_get_pointer (value);
+ *(void **)ptr = (rep_STRINGP(value)) ? rep_STR (value) : rep_get_pointer (value);
return ptr + sizeof (void *);
case FFI_TYPE_STRUCT: /* FIXME: */
@@ -592,7 +595,7 @@ DEFUN ("ffi-type", Fffi_type, Sffi_type,
{
rep_ffi_alias *s;
- rep_DECLARE (1, base, rep_VALID_INTERFACE_P (base));
+ rep_DECLARE (1, base, rep_VALID_TYPE_P (base));
s = rep_alloc (sizeof (rep_ffi_alias));
diff --git a/src/librep.sym b/src/librep.sym
index 1b68f55..6c91690 100644
--- a/src/librep.sym
+++ b/src/librep.sym
@@ -608,6 +608,7 @@ rep_input_timeout_secs
rep_int_cell
rep_integer_foldl
rep_integer_gcd
+rep_intern_dl_library
rep_intern_static
rep_keyword_obarray
rep_kill
@@ -621,6 +622,7 @@ rep_list_length
rep_load_autoload
rep_load_environment
rep_localise_and_get_handler
+rep_lookup_dl_symbol
rep_lookup_errno
rep_make_float
rep_make_long_int
@@ -658,6 +660,7 @@ rep_on_termination_fun
rep_op_insert_file_contents
rep_op_read_file_contents
rep_op_write_buffer_contents
+rep_parse_number
rep_pending_thread_yield
rep_poll_input
rep_pop_regexp_data
@@ -687,6 +690,7 @@ rep_regsub_fun
rep_regsublen_fun
rep_scm_f
rep_scm_t
+rep_search_imports
rep_set_local_symbol_fun
rep_set_string_len
rep_set_string_match
@@ -710,6 +714,7 @@ rep_string_modified
rep_structure
rep_structure_exports_all
rep_structure_set_binds
+rep_structure_type
rep_term_cell
rep_test_int_counter
rep_test_int_fun
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]