X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fany-reader.c;h=ad3fcb5b7a91a99c6acd22798c459037bc0b22c5;hb=9b43ed0de590acc1926e4787c74c86870577c65a;hp=eaec63da943baaa1fb975749a9f37ac687ff409e;hpb=18c5f96f46fc5ea553eccb3f9cbec99af5e839e8;p=pspp diff --git a/src/data/any-reader.c b/src/data/any-reader.c index eaec63da94..ad3fcb5b7a 100644 --- a/src/data/any-reader.c +++ b/src/data/any-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006, 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2006, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -96,7 +96,15 @@ any_reader_open (struct file_handle *handle, const char *encoding, if (result == ANY_ERROR) return NULL; else if (result == ANY_YES) - return sfm_open_reader (handle, encoding, dict, NULL); + { + struct sfm_reader *r; + + r = sfm_open (handle); + if (r == NULL) + return NULL; + + return sfm_decode (r, encoding, dict, NULL); + } result = try_detect (fh_get_file_name (handle), pfm_detect); if (result == ANY_ERROR)