This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository freexl.
commit 890d3e370f54441ab5e73c3e0d6cb82c1cbb810a Author: Bas Couwenberg <[email protected]> Date: Sun Jul 23 11:43:40 2017 +0200 New upstream version 1.0.3 --- Makefile.in | 8 ++++---- configure | 20 ++++++++++---------- configure.ac | 2 +- headers/freexl_internals.h | 1 + src/freexl.c | 43 +++++++++++++++++++++++++++++++------------ 5 files changed, 47 insertions(+), 27 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7314d8c..de7c69e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -624,7 +624,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -650,7 +650,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip @@ -667,7 +667,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -677,7 +677,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/configure b/configure index bcab28c..8d30fc0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeXL 1.0.2. +# Generated by GNU Autoconf 2.69 for FreeXL 1.0.3. # # Report bugs to <[email protected]>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeXL' PACKAGE_TARNAME='freexl' -PACKAGE_VERSION='1.0.2' -PACKAGE_STRING='FreeXL 1.0.2' +PACKAGE_VERSION='1.0.3' +PACKAGE_STRING='FreeXL 1.0.3' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1326,7 +1326,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FreeXL 1.0.2 to adapt to many kinds of systems. +\`configure' configures FreeXL 1.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1396,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeXL 1.0.2:";; + short | recursive ) echo "Configuration of FreeXL 1.0.3:";; esac cat <<\_ACEOF @@ -1508,7 +1508,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeXL configure 1.0.2 +FreeXL configure 1.0.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2052,7 +2052,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeXL $as_me 1.0.2, which was +It was created by FreeXL $as_me 1.0.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2923,7 +2923,7 @@ fi # Define the identity of the package. PACKAGE='freexl' - VERSION='1.0.2' + VERSION='1.0.3' cat >>confdefs.h <<_ACEOF @@ -17813,7 +17813,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeXL $as_me 1.0.2, which was +This file was extended by FreeXL $as_me 1.0.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17879,7 +17879,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeXL config.status 1.0.2 +FreeXL config.status 1.0.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 0e51d3d..36d5727 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(FreeXL, 1.0.2, [email protected]) +AC_INIT(FreeXL, 1.0.3, [email protected]) AC_LANG(C) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/headers/freexl_internals.h b/headers/freexl_internals.h index ded7e0a..5b23e44 100644 --- a/headers/freexl_internals.h +++ b/headers/freexl_internals.h @@ -171,6 +171,7 @@ typedef struct biff_string_table_struct unsigned int current_utf16_len; /* current UTF-16 length */ unsigned int current_utf16_off; /* current UTF-16 offset */ unsigned int current_utf16_skip; /* bytes to be skipped after the current string */ + unsigned int next_utf16_skip; /* remaining bytes to be skipped in the next record */ } biff_string_table; typedef struct biff_cell_value_struct diff --git a/src/freexl.c b/src/freexl.c index 231af4b..2f6cae2 100644 --- a/src/freexl.c +++ b/src/freexl.c @@ -339,15 +339,7 @@ get_unicode_params (unsigned char *addr, int swap, unsigned int *start_offset, *real_utf16 = 1; else *real_utf16 = 0; - if ((mask & 0x04) == 0x04) - { - /* optional field: 32-bits */ - memcpy (word32.bytes, p_string, 2); - if (swap) - swap32 (&word32); - skip_1 = word32.value; - p_string += 4; - } + if ((mask & 0x08) == 0x08) { /* optional field 16-bits */ @@ -357,6 +349,15 @@ get_unicode_params (unsigned char *addr, int swap, unsigned int *start_offset, skip_2 = word16.value; p_string += 2; } + if ((mask & 0x04) == 0x04) + { + /* optional field: 32-bits */ + memcpy (word32.bytes, p_string, 4); + if (swap) + swap32 (&word32); + skip_1 = word32.value; + p_string += 4; + } *start_offset = p_string - addr; *extra_skip = skip_1 + (skip_2 * 4); } @@ -1228,6 +1229,7 @@ alloc_workbook (int magic) workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.next_utf16_skip = 0; workbook->first_sheet = NULL; workbook->last_sheet = NULL; workbook->active_sheet = NULL; @@ -1758,6 +1760,7 @@ parse_SST (biff_workbook * workbook, int swap) unsigned int len; int utf16 = 0; int err; + unsigned int next_skip; unsigned int utf16_len = workbook->shared_strings.current_utf16_len; unsigned int utf16_off = workbook->shared_strings.current_utf16_off; unsigned int utf16_skip = workbook->shared_strings.current_utf16_skip; @@ -1795,6 +1798,11 @@ parse_SST (biff_workbook * workbook, int swap) /* skipping extra data (if any) */ p_string += utf16_skip; + if (p_string - workbook->record >= workbook->record_size) + next_skip = + (p_string - workbook->record) - workbook->record_size; + else + next_skip = 0; /* converting text to UTF-8 */ utf8_string = @@ -1808,7 +1816,8 @@ parse_SST (biff_workbook * workbook, int swap) workbook->shared_strings.current_utf16_buf = NULL; workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; - workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.current_utf16_skip = next_skip; + workbook->shared_strings.next_utf16_skip = 0; workbook->shared_strings.current_index += 1; } } @@ -1823,6 +1832,7 @@ parse_SST (biff_workbook * workbook, int swap) biff_word16 word16; unsigned int start_offset; unsigned int extra_skip; + unsigned int next_skip; if ((unsigned int) (p_string - workbook->record) >= workbook->record_size) @@ -1831,6 +1841,9 @@ parse_SST (biff_workbook * workbook, int swap) return FREEXL_OK; } + /* skipping extra bytes belonging to the previous record */ + p_string += workbook->shared_strings.next_utf16_skip; + memcpy (word16.bytes, p_string, 2); if (swap) swap16 (&word16); @@ -1843,6 +1856,7 @@ parse_SST (biff_workbook * workbook, int swap) /* initializing the current UTF-16 variables */ workbook->shared_strings.current_utf16_skip = extra_skip; + workbook->shared_strings.next_utf16_skip = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_len = len; workbook->shared_strings.current_utf16_buf = @@ -1890,6 +1904,10 @@ parse_SST (biff_workbook * workbook, int swap) p_string += len * 2; /* skipping extra data (if any) */ p_string += workbook->shared_strings.current_utf16_skip; + if (p_string - workbook->record >= workbook->record_size) + next_skip = (p_string - workbook->record) - workbook->record_size; + else + next_skip = 0; *(workbook->shared_strings.utf8_strings + i_string) = utf8_string; free (workbook->shared_strings.current_utf16_buf); @@ -1897,6 +1915,7 @@ parse_SST (biff_workbook * workbook, int swap) workbook->shared_strings.current_utf16_len = 0; workbook->shared_strings.current_utf16_off = 0; workbook->shared_strings.current_utf16_skip = 0; + workbook->shared_strings.next_utf16_skip = next_skip; workbook->shared_strings.current_index = i_string + 1; } @@ -2395,7 +2414,7 @@ read_legacy_biff (biff_workbook * workbook, int swap) { /* XF [Extended Format] marker found */ unsigned char format; - unsigned short s_format; + unsigned short s_format = 0; if (fread (workbook->record, 1, record_size.value, workbook->xls) != record_size.value) @@ -3209,7 +3228,7 @@ parse_biff_record (biff_workbook * workbook, int swap) || workbook->biff_version == FREEXL_BIFF_VER_8)) { /* XF [Extended Format] marker found */ - unsigned short s_format; + unsigned short s_format = 0; biff_word16 word16; if (workbook->second_pass) return FREEXL_OK; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/freexl.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

