pax_global_header 0000666 0000000 0000000 00000000064 14107221555 0014514 g ustar 00root root 0000000 0000000 52 comment=f8731f89d581b9839cdbdd5dec256f78d3d788f1
ReadStat-1.1.7/ 0000775 0000000 0000000 00000000000 14107221555 0013231 5 ustar 00root root 0000000 0000000 ReadStat-1.1.7/.github/ 0000775 0000000 0000000 00000000000 14107221555 0014571 5 ustar 00root root 0000000 0000000 ReadStat-1.1.7/.github/workflows/ 0000775 0000000 0000000 00000000000 14107221555 0016626 5 ustar 00root root 0000000 0000000 ReadStat-1.1.7/.github/workflows/build.yml 0000664 0000000 0000000 00000003460 14107221555 0020453 0 ustar 00root root 0000000 0000000 name: build
on: [ push, pull_request ]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [ clang, gcc, gcc-8, gcc-9, gcc-10 ]
steps:
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install gettext gcc-8 gcc-9 gcc-10
- uses: actions/checkout@v2
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure
env:
CC: ${{ matrix.compiler }}
- name: Make
run: make
- name: Run tests
run: make check
- name: Generate corpus
run: make generate_corpus
macos:
runs-on: macos-latest
strategy:
matrix:
compiler: [ clang, gcc ]
steps:
- name: Install packages
run: brew install automake
- uses: actions/checkout@v2
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure
env:
CC: ${{ matrix.compiler }}
- name: Make
run: make
- name: Run tests
run: make check
- name: Generate corpus
run: make generate_corpus
windows:
runs-on: windows-latest
env:
MSYSTEM: MINGW64
steps:
- uses: actions/checkout@v2
- name: Autoconf
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && autoreconf -i -f'
- name: Configure
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./configure'
- name: Make
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && make'
- name: Test
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && make check'
- name: Log
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && cat ./test-suite.log'
ReadStat-1.1.7/.github/workflows/codecov.yml 0000664 0000000 0000000 00000001301 14107221555 0020766 0 ustar 00root root 0000000 0000000 name: Codecov
on: [ push, pull_request ]
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt install gettext
- uses: actions/checkout@v2
- name: Autoconf
run: autoreconf -i -f
- name: Configure
run: ./configure --enable-code-coverage
- name: Make
run: make
- name: Run tests
run: make check
- name: Generate corpus
run: make generate_corpus
- name: Move coverage files
run: mv src/.libs/*.gc* .
- name: Move more coverage files
run: mv src/*/.libs/*.gc* .
- name: Upload coverage files
run: bash <(curl -s https://codecov.io/bash)
ReadStat-1.1.7/.github/workflows/fuzz.yml 0000664 0000000 0000000 00000001135 14107221555 0020347 0 ustar 00root root 0000000 0000000 name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'readstat'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'readstat'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts
ReadStat-1.1.7/.gitignore 0000664 0000000 0000000 00000001062 14107221555 0015220 0 ustar 00root root 0000000 0000000 .Rproj.user
.Rhistory
.RData
*.Rproj
**/.deps
**/.libs
**/.dirstamp
**/*.lo
**/*.o
aclocal.m4
compile
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
libreadstat.la
libtool
ltmain.sh
Makefile
Makefile.in
missing
readstat
test-driver
autom4te.cache/*
output.*
test-suite.log
test_readstat
*.log
*.trs
test_csv_to_dta*
.vscode/
*.swp
dev/
tmp.*
test_dta_days
prof_output
gmon.out
gen.json
extract_metadata
test_sav_date
test_double_decimals
generate_corpus
*.csv
*.json
*.py
*.tar.gz
*.zip
.DS_Store
**/*.vcxproj.user
Debug/
Release/
ReadStat-1.1.7/LICENSE 0000664 0000000 0000000 00000002103 14107221555 0014232 0 ustar 00root root 0000000 0000000 Copyright (c) 2013-2016 Evan Miller (except where otherwise noted)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
ReadStat-1.1.7/Makefile.am 0000664 0000000 0000000 00000032772 14107221555 0015300 0 ustar 00root root 0000000 0000000 AUTOMAKE_OPTIONS = foreign dist-zip
lib_LTLIBRARIES = libreadstat.la
libreadstat_la_SOURCES = \
src/CKHashTable.c \
src/readstat_bits.c \
src/readstat_convert.c \
src/readstat_error.c \
src/readstat_io_unistd.c \
src/readstat_malloc.c \
src/readstat_metadata.c \
src/readstat_parser.c \
src/readstat_value.c \
src/readstat_variable.c \
src/readstat_writer.c \
src/sas/ieee.c \
src/sas/readstat_sas.c \
src/sas/readstat_sas7bcat_read.c \
src/sas/readstat_sas7bcat_write.c \
src/sas/readstat_sas7bdat_read.c \
src/sas/readstat_sas7bdat_write.c \
src/sas/readstat_sas_rle.c \
src/sas/readstat_xport.c \
src/sas/readstat_xport_read.c \
src/sas/readstat_xport_write.c \
src/spss/readstat_por.c \
src/spss/readstat_por_parse.c \
src/spss/readstat_por_read.c \
src/spss/readstat_por_write.c \
src/spss/readstat_sav.c \
src/spss/readstat_sav_compress.c \
src/spss/readstat_sav_parse.c \
src/spss/readstat_sav_parse_timestamp.c \
src/spss/readstat_sav_read.c \
src/spss/readstat_sav_write.c \
src/spss/readstat_spss.c \
src/spss/readstat_spss_parse.c \
src/stata/readstat_dta.c \
src/stata/readstat_dta_parse_timestamp.c \
src/stata/readstat_dta_read.c \
src/stata/readstat_dta_write.c \
src/txt/commands_util.c \
src/txt/readstat_copy.c \
src/txt/readstat_sas_commands_read.c \
src/txt/readstat_spss_commands_read.c \
src/txt/readstat_schema.c \
src/txt/readstat_stata_dictionary_read.c \
src/txt/readstat_txt_read.c
if HAVE_ZLIB
libreadstat_la_SOURCES += \
src/spss/readstat_zsav_compress.c \
src/spss/readstat_zsav_read.c \
src/spss/readstat_zsav_write.c
endif
if HAVE_RAGEL
.rl.c:
$(AM_V_GEN)$(RAGEL) $(RAGELFLAGS) $< -o $@
endif
libreadstat_la_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99
libreadstat_la_LIBADD = @EXTRA_LIBS@
libreadstat_la_LDFLAGS = @EXTRA_LDFLAGS@ -version-info @READSTAT_VERSION_INFO@
if HAVE_ZLIB
libreadstat_la_LIBADD += -lz
libreadstat_la_CFLAGS += -DHAVE_ZLIB=1
endif
if CODE_COVERAGE_ENABLED
libreadstat_la_CFLAGS += -O0 -fprofile-arcs -ftest-coverage
endif
if FUZZER_ENABLED
libreadstat_la_CFLAGS += -fsanitize=fuzzer-no-link
libreadstat_la_LDFLAGS += -fsanitize=fuzzer
endif
dist_man1_MANS = man/readstat.man man/extract_metadata.man
include_HEADERS = src/readstat.h
noinst_HEADERS = \
src/CKHashTable.h \
src/readstat_bits.h \
src/readstat_convert.h \
src/readstat_iconv.h \
src/readstat_io_unistd.h \
src/readstat_malloc.h \
src/readstat_strings.h \
src/readstat_writer.h \
src/sas/ieee.h \
src/sas/readstat_sas.h \
src/sas/readstat_sas_rle.h \
src/sas/readstat_xport.h \
src/spss/readstat_por.h \
src/spss/readstat_por_parse.h \
src/spss/readstat_sav.h \
src/spss/readstat_sav_compress.h \
src/spss/readstat_sav_parse.h \
src/spss/readstat_sav_parse_timestamp.h \
src/spss/readstat_spss.h \
src/spss/readstat_spss_parse.h \
src/spss/readstat_zsav_compress.h \
src/spss/readstat_zsav_read.h \
src/spss/readstat_zsav_write.h \
src/stata/readstat_dta.h \
src/stata/readstat_dta_parse_timestamp.h \
src/txt/commands_util.h \
src/txt/readstat_copy.h \
src/txt/readstat_schema.h \
src/bin/extract_metadata.h \
src/bin/read_csv/csv_metadata.h \
src/bin/read_csv/jsmn.h \
src/bin/read_csv/json_metadata.h \
src/bin/read_csv/mod_csv.h \
src/bin/read_csv/mod_dta.h \
src/bin/read_csv/mod_sav.h \
src/bin/read_csv/read_csv.h \
src/bin/read_csv/read_module.h \
src/bin/read_csv/value.h \
src/bin/write/double_decimals.h \
src/bin/write/json/write_missing_values.h \
src/bin/write/json/write_value_labels.h \
src/bin/write/mod_csv.h \
src/bin/write/mod_readstat.h \
src/bin/write/mod_xlsx.h \
src/bin/write/module.h \
src/bin/write/module_util.h \
src/bin/util/main.h \
src/bin/util/file_format.h \
src/bin/util/quote_and_escape.h \
src/bin/util/readstat_dta_days.h \
src/bin/util/readstat_sav_date.h \
src/fuzz/fuzz_format.h \
src/test/test_buffer.h \
src/test/test_buffer_io.h \
src/test/test_dta.h \
src/test/test_error.h \
src/test/test_list.h \
src/test/test_read.h \
src/test/test_readstat.h \
src/test/test_sas.h \
src/test/test_sav.h \
src/test/test_types.h \
src/test/test_write.h
bin_PROGRAMS = \
extract_metadata \
readstat
readstat_SOURCES = \
src/bin/readstat.c \
src/bin/read_csv/jsmn.c \
src/bin/read_csv/json_metadata.c \
src/bin/read_csv/mod_csv.c \
src/bin/read_csv/mod_dta.c \
src/bin/read_csv/mod_sav.c \
src/bin/read_csv/value.c \
src/bin/write/double_decimals.c \
src/bin/write/mod_csv.c \
src/bin/write/mod_readstat.c \
src/bin/write/module_util.c \
src/bin/util/file_format.c \
src/bin/util/quote_and_escape.c \
src/bin/util/readstat_dta_days.c \
src/bin/util/readstat_sav_date.c
readstat_LDADD = libreadstat.la
readstat_CFLAGS = -DREADSTAT_VERSION=\"@READSTAT_VERSION@\" -Wall -Werror -pedantic-errors -std=c99
if HAVE_ZLIB
readstat_CFLAGS += -DHAVE_ZLIB=1
endif
extract_metadata_SOURCES = \
src/bin/extract_metadata.c \
src/bin/write/json/write_missing_values.c \
src/bin/write/json/write_value_labels.c \
src/bin/util/file_format.c \
src/bin/util/quote_and_escape.c \
src/bin/util/readstat_dta_days.c \
src/bin/util/readstat_sav_date.c
extract_metadata_LDADD = libreadstat.la
extract_metadata_CFLAGS = -Wall -Werror -pedantic-errors -std=c99
if HAVE_XLSXWRITER
readstat_SOURCES += src/bin/write/mod_xlsx.c
readstat_LDADD += -lxlsxwriter
readstat_CFLAGS += -DHAVE_XLSXWRITER=1
endif
if HAVE_CSVREADER
readstat_SOURCES += src/bin/read_csv/read_csv.c
readstat_LDADD += -lcsv
readstat_CFLAGS += -DHAVE_CSVREADER=1
endif
check_PROGRAMS = \
test_readstat \
test_dta_days \
test_sav_date \
test_double_decimals
test_readstat_SOURCES = \
src/test/test_buffer.c \
src/test/test_buffer_io.c \
src/test/test_dta.c \
src/test/test_error.c \
src/test/test_read.c \
src/test/test_readstat.c \
src/test/test_sas.c \
src/test/test_sav.c \
src/test/test_write.c
test_readstat_LDADD = libreadstat.la
test_readstat_CFLAGS = -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 -DDEBUG=1
test_dta_days_SOURCES = \
src/bin/util/readstat_dta_days.c \
src/test/test_dta_days.c
test_dta_days_LDADD = libreadstat.la
test_dta_days_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99
test_sav_date_SOURCES = \
src/bin/util/readstat_sav_date.c \
src/test/test_sav_date.c
test_sav_date_LDADD = libreadstat.la
test_sav_date_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99
test_double_decimals_SOURCES = \
src/bin/write/double_decimals.c \
src/test/test_double_decimals.c
test_double_decimals_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99
TESTS = test_readstat test_dta_days test_sav_date test_double_decimals
EXTRA_PROGRAMS = \
generate_corpus
generate_corpus_SOURCES = \
src/fuzz/generate_corpus.c \
src/test/test_buffer.c \
src/test/test_write.c \
src/test/test_read.c \
src/test/test_buffer_io.c \
src/test/test_error.c \
src/test/test_dta.c \
src/test/test_sas.c \
src/test/test_sav.c
generate_corpus_LDADD = libreadstat.la
generate_corpus_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99
EXTRA_PROGRAMS += \
fuzz_compression_sas_rle \
fuzz_compression_sav \
fuzz_format_dta \
fuzz_format_por \
fuzz_format_sav \
fuzz_format_sas7bcat \
fuzz_format_sas7bdat \
fuzz_format_xport \
fuzz_format_sas_commands \
fuzz_format_spss_commands \
fuzz_format_stata_dictionary \
fuzz_grammar_dta_timestamp \
fuzz_grammar_por_double \
fuzz_grammar_sav_date \
fuzz_grammar_sav_time \
fuzz_grammar_spss_format
# Force C++ linking for fuzz targets
nodist_EXTRA_fuzz_compression_sas_rle_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_compression_sav_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_dta_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_por_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_sav_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_sas7bcat_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_sas7bdat_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_xport_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_sas_commands_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_spss_commands_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_format_stata_dictionary_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_grammar_dta_timestamp_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_grammar_por_double_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_grammar_sav_date_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_grammar_sav_time_SOURCES = dummy.cxx
nodist_EXTRA_fuzz_grammar_spss_format_SOURCES = dummy.cxx
fuzz_grammar_dta_timestamp_SOURCES = \
src/fuzz/fuzz_grammar_dta_timestamp.c
fuzz_grammar_dta_timestamp_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_grammar_dta_timestamp_LDFLAGS = -static
fuzz_grammar_dta_timestamp_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_grammar_por_double_SOURCES = \
src/fuzz/fuzz_grammar_por_double.c
fuzz_grammar_por_double_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_grammar_por_double_LDFLAGS = -static
fuzz_grammar_por_double_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_grammar_sav_date_SOURCES = \
src/fuzz/fuzz_grammar_sav_date.c
fuzz_grammar_sav_date_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_grammar_sav_date_LDFLAGS = -static
fuzz_grammar_sav_date_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_grammar_sav_time_SOURCES = \
src/fuzz/fuzz_grammar_sav_time.c
fuzz_grammar_sav_time_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_grammar_sav_time_LDFLAGS = -static
fuzz_grammar_sav_time_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_grammar_spss_format_SOURCES = \
src/fuzz/fuzz_grammar_spss_format.c
fuzz_grammar_spss_format_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_grammar_spss_format_LDFLAGS = -static
fuzz_grammar_spss_format_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_dta_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_dta.c \
src/test/test_buffer_io.c
fuzz_format_dta_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_dta_LDFLAGS = -static
fuzz_format_dta_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_por_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_por.c \
src/test/test_buffer_io.c
fuzz_format_por_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_por_LDFLAGS = -static
fuzz_format_por_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_sas7bcat_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_sas7bcat.c \
src/test/test_buffer_io.c
fuzz_format_sas7bcat_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_sas7bcat_LDFLAGS = -static
fuzz_format_sas7bcat_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_sas7bdat_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_sas7bdat.c \
src/test/test_buffer_io.c
fuzz_format_sas7bdat_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_sas7bdat_LDFLAGS = -static
fuzz_format_sas7bdat_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_sav_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_sav.c \
src/test/test_buffer_io.c
fuzz_format_sav_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_sav_LDFLAGS = -static
fuzz_format_sav_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_xport_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_xport.c \
src/test/test_buffer_io.c
fuzz_format_xport_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_xport_LDFLAGS = -static
fuzz_format_xport_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_sas_commands_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_sas_commands.c \
src/test/test_buffer_io.c
fuzz_format_sas_commands_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_sas_commands_LDFLAGS = -static
fuzz_format_sas_commands_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_spss_commands_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_spss_commands.c \
src/test/test_buffer_io.c
fuzz_format_spss_commands_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_spss_commands_LDFLAGS = -static
fuzz_format_spss_commands_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_format_stata_dictionary_SOURCES = \
src/fuzz/fuzz_format.c \
src/fuzz/fuzz_format_stata_dictionary.c \
src/test/test_buffer_io.c
fuzz_format_stata_dictionary_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_format_stata_dictionary_LDFLAGS = -static
fuzz_format_stata_dictionary_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_compression_sas_rle_SOURCES = \
src/fuzz/fuzz_compression_sas_rle.c
fuzz_compression_sas_rle_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_compression_sas_rle_LDFLAGS = -static
fuzz_compression_sas_rle_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
fuzz_compression_sav_SOURCES = \
src/fuzz/fuzz_compression_sav.c
fuzz_compression_sav_LDADD = libreadstat.la @LIB_FUZZING_ENGINE@
fuzz_compression_sav_LDFLAGS = -static
fuzz_compression_sav_CFLAGS = -g -Wall @EXTRA_WARNINGS@ -Werror -pedantic-errors -std=c99 @SANITIZERS@
ReadStat-1.1.7/NEWS 0000664 0000000 0000000 00000011743 14107221555 0013736 0 ustar 00root root 0000000 0000000 New in 1.1.7:
* SAV writer: Permit missing ranges for integer variables #251
* SAV writer: Fix format-truncation warning #247
* DTA reader/writer: Improved support for string refs on older platforms
* DTA reader: Fix incorrect ordering in StrL comparison functions #248
* SAS7BDAT writer: Improved support for tagged missing values on big-endian platforms
* SAS readers: Allow header sizes up to 16MiB #249
* Visual Studio: Fix paths to make them consistent between x86 and x64 archs #242
New in 1.1.6:
* Migrate to GitHub Actions
* Regenerate parsers with Ragel 7 and update build script
* SAS7BDAT reader: Improved large file support on Windows #226
* SAV reader: Skip null bytes in UTF-8 data https://github.com/tidyverse/haven/issues/560
* SAV reader: Fix hang (oss-fuzz/23485)
* DTA reader: Disallow str0 type
* DTA reader: Fix encoding error when garbage values are present beyond the end of a string
* Command file readers: Fix integer overflow (oss-fuzz/15778)
* `extract_metadata`: Implement duration support #223 (thanks to @basgys)
* Support for SAS files created with SAS Visual Forecaster #232
* Report format widths for date/time SAS formats #233
* Document the meaning of a -1 return value from `readstat_get_row_count` #234
* Fix SAS file creation / modification times on Windows #238 #240
New in 1.1.5:
* Support for building with MSVC #214 (thanks to @zebrys and @jonathon-love)
* CLI tools: Support non-ASCII file paths on Windows #200 #216 (thanks to @zebrys)
* DTA reader: Ignore bad timestamps
* DTA writer: Fix memory leak
* DTA writer: Improved support for empty value labels #219
* POR reader: Improved support for date/time formats #160
* SAS7BDAT reader: Added support for reading the dataset label #180 #213 (thanks to @reikoch)
* SAS7BDAT reader: Improved detection of compressed files
* SAS7BDAT reader: Improved bounds checking OSS-Fuzz/28312
* SAS7BDAT reader: Support for more character encodings
* SAV reader: Tolerate illegal lowercase variable names #217
* SAV reader: Better support for non-UTF-8 variable names
* SAV reader: Fix format widths for very long strings https://github.com/Roche/pyreadstat/issues/77
* SAV reader: Fix undefined behavior with negative row counts OSS-Fuzz/23423
New in 1.1.4:
* SAS7BDAT reader: Add support for binary-compressed files #21
* XPT v8 writer: Improve compatibility with SAS #207 (thanks to @reikoch)
* XPT reader: Fix reading of long variable names #208 (thanks to @reikoch)
* SAS readers: Support for more character encodings
* SAV reader: Clients sometimes received truncated UTF-8 strings
* SPSS writers: Improve compatibility with PSPP with DATETIME fields #211
* All formats: Improved support for setting / getting the `display_width` #210
New in 1.1.3:
* Fix warnings when compiling with GCC 10 #202
* SAS RLE compressor: Fixes for large files #201
* SAV reader: Improved support for UTF-8 column names #206
* SAV reader: Return a better error message if the magic number doesn't match
* SAV reader: Support for dash-separated timestamps
New in 1.1.2:
* DTA reader: support for Spanish-locale timestamps
* SAS reader: support for "any" encoding tidyverse/haven#482
* CLI tool: Allow uppercase filename extensions
* Improved support for reading SPSS and SAS command files
* Improved support for reading POR files with format widths >100
* Improved support for reading SAV files containing space-padded timestamps #197
* Improved support for writing SAV files with a large number of variables #199
* Improved support for reading SAS7BDAT files created by Stat/Transfer #198
* Fix several integer overflows and undefined values #192 #193 #194 #195 #196
New in 1.1.1:
* Support row limits in the plain-text parsers
* SAV reader: Allow spaces in timestamp strings
* README: Fix Windows / pacman instructions #189
* Fix errors opening files in Stata 15 (tidyverse/haven#461)
New in 1.1:
* New function: readstat_set_row_offset (#185). Thanks to @mikmart
* Fix segfault when localtime fails on Windows
* Fix implicit float conversion warning (oss-fuzz/16372)
* New error code: READSTAT_ERROR_BAD_TIMESTAMP_VALUE
* Renamed error code: READSTAT_ERROR_BAD_TIMESTAMP => READSTAT_ERROR_BAD_TIMESTAMP_STRING
New in 1.0.2:
* Compilation: Fix -Wstringop-truncation warnings on GCC 8.2 and later (#151)
* SPSS command parser: Fix signed integer overflow (oss-fuzz/15049)
* POR parser: Use doubles internally to prevent integer overflows with very large exponents (#182)
New in 1.0.1:
* SAV writer: Validate variable names
* Fix a buffer overflow reading SPSS commands (oss-fuzz/15050)
* New error code READSTAT_ERROR_NAME_IS_ZERO_LENGTH when a blank variable name is provided
* New fuzzing dictionary files in fuzz/dict for parsing plain-text file formats
* Move corpus files from corpus to fuzz/corpus
ReadStat-1.1.7/README.md 0000664 0000000 0000000 00000036342 14107221555 0014520 0 ustar 00root root 0000000 0000000 [](https://github.com/WizardMac/ReadStat/actions)
[](https://ci.appveyor.com/project/evanmiller/readstat/branch/master)
[](https://codecov.io/gh/WizardMac/ReadStat)
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:readstat)
ReadStat: Read (and write) data sets from SAS, Stata, and SPSS
==
Originally developed for [Wizard](https://www.wizardmac.com/), ReadStat is a
command-line tool and MIT-licensed C library for reading files from popular
stats packages. Supported data formats include:
* SAS: SAS7BDAT (binary file) and XPORT (transport file)
* Stata: DTA (binary file) versions 104-119
* SPSS: POR (portable file), SAV (binary file), and ZSAV (compressed binary)
Supported metadata formats include:
* SAS: SAS7BCAT (catalog file) and .sas (command file)
* Stata: .dct (dictionary file)
* SPSS: .sps (command file)
There is also write support for all the data formats, but not the metadata
formats. *The produced SAS7BDAT files still cannot be read by SAS*, but feel
free to contribute your binary-format expertise here.
For reading in R data files, please see the related
[librdata](https://github.com/WizardMac/librdata) project.
Installation on Unix / macOS
--
Grab the latest [release](https://github.com/WizardMac/ReadStat/releases) and
then proceed as usual:
./configure
make
sudo make install
If you're cloning the repository, first make sure you have autotools installed,
and then run `./autogen.sh` to generate the configure file.
If you're on Mac and see errors about `AM_ICONV` when you run `./autogen.sh`,
you'll need to install [gettext](https://www.gnu.org/software/gettext/).
Installation on Windows
--
ReadStat now includes a Microsoft Visual Studio project file that includes
build targets for the library and tests. See the [VS17](./VS17) folder in
the downloaded release for a "one-click" Windows build.
Alternatively, you can build ReadStat on the command line using an
[msys2](https://msys2.github.io/) environment. After installing msys2,
download some other packages:
pacman -S autoconf automake libtool make mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-libiconv
Then start a MINGW command line (not the msys2 prompt!) and follow the UNIX
install instructions above for this package.
Language Bindings
--
* Julia: [ReadStat.jl](https://github.com/queryverse/ReadStat.jl)
* Perl 6: [ReadStat.pm6](https://github.com/WizardMac/ReadStat.pm6)
* Python: [pyreadstat](https://github.com/Roche/pyreadstat)
* R: [haven](https://github.com/tidyverse/haven)
Docker
--
A dockerized version is available [here](https://github.com/jbn/readstat)
Command-line Usage
--
Standard usage:
readstat [-f]