X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fglob.c;h=1b5de09955e0bc4ee2611c4fda74e2d1c5cbe5f0;hb=1f8dd363d6c20d07fcca14cb948018465fa5ed8b;hp=61c70b46c2e5efbc34e7cce5e62b1a2b6472af72;hpb=def7e6026513a3ee7c2b38416b30a2e890e34311;p=pspp-builds.git diff --git a/src/glob.c b/src/glob.c index 61c70b46..1b5de099 100644 --- a/src/glob.c +++ b/src/glob.c @@ -14,25 +14,16 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include #include "glob.h" -#include +#include "error.h" +#include "progname.h" #include #include - -#if TIME_WITH_SYS_TIME -#include #include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif #if HAVE_LIBHISTORY #if HAVE_READLINE_HISTORY_H @@ -69,15 +60,15 @@ extern void stifle_history (); #endif #include "alloc.h" +#include "calendar.h" #include "command.h" +#include "dictionary.h" #include "do-ifP.h" #include "error.h" -#include "expr.h" #include "file-handle.h" #include "filename.h" -#include "getline.h" +#include "getl.h" #include "hash.h" -#include "julcal/julcal.h" #include "lexer.h" #include "magic.h" #include "main.h" @@ -87,6 +78,8 @@ extern void stifle_history (); #include "version.h" #include "vfm.h" +#include "gettext.h" + /* var.h */ struct dictionary *default_dict; struct expression *process_if_expr; @@ -96,6 +89,8 @@ int n_trns; int m_trns; int f_trns; +short test_mode=0; + int FILTER_before_TEMPORARY; struct file_handle *default_handle; @@ -115,6 +110,8 @@ static void get_date (void); void init_glob (int argc UNUSED, char **argv) { + set_program_name (argv[0]); + /* FIXME: Allow i18n of other locale items (besides LC_MESSAGES). */ #if ENABLE_NLS #if HAVE_LC_MESSAGES @@ -126,6 +123,7 @@ init_glob (int argc UNUSED, char **argv) #endif /* ENABLE_NLS */ fn_init (); + fh_init (); getl_initialize (); /* PORTME: If your system/OS has the nasty tendency to halt with a @@ -151,7 +149,7 @@ init_glob (int argc UNUSED, char **argv) last_vfm_invocation = time (NULL); /* lexer.h */ - ds_init (NULL, &tokstr, 64); + ds_init (&tokstr, 64); /* common.h */ { @@ -176,12 +174,21 @@ init_glob (int argc UNUSED, char **argv) logfn = xstrdup ("pspp.log"); logfile = NULL; - /* file-handle.h */ - fh_init_files (); - get_date (); } +void +done_glob(void) +{ + cancel_transformations (); + dict_destroy (default_dict); + free (logfn); + done_settings (); + ds_destroy (&tokstr); + + fh_done(); +} + static void get_date (void) {