Make fn_open and fn_close take a struct file_handle instead of char *
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 18 Nov 2015 17:52:24 +0000 (18:52 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 21 Nov 2015 15:17:18 +0000 (16:17 +0100)
commitd6cbbc8d634fa91f050661355139a4e4697e99ab
treeb0c3e383985ba334527a8fe5fb75ade22858a7b1
parent49921e999c501ce871973692aa9b9960fa4c5cc7
Make fn_open and fn_close take a struct file_handle instead of char *

This change alters the signature of the fn_open and fn_close functions,
and changes all callers appropriately.  The purpose of such a change is
so that the encoding of the filename is passed to fn_open from wherever
it was created.

It also changes the implementation of fn_open on windows systems to call
_wfopen instead of fopen.  This should fix the problem of windows builds
not being able to open files whose pathnames included non-ascii characters.

As a bonus, we no longer require the rather contrived function
local_to_filename_encoding.

Some related issues (what about the pspprc file?) remain.
26 files changed:
src/data/any-reader.c
src/data/any-reader.h
src/data/any-writer.c
src/data/encrypted-file.c
src/data/encrypted-file.h
src/data/file-handle-def.c
src/data/file-name.c
src/data/file-name.h
src/data/make-file.c
src/data/pc+-file-reader.c
src/data/por-file-reader.c
src/data/sys-file-reader.c
src/language/data-io/data-reader.c
src/language/data-io/data-writer.c
src/language/data-io/save-translate.c
src/output/ascii.c
src/output/cairo.c
src/output/csv.c
src/output/driver-provider.h
src/output/driver.c
src/output/html.c
src/output/msglog.c
src/output/odt.c
src/ui/gui/psppire-window.c
src/ui/gui/psppire.c
utilities/pspp-convert.c