projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't bother freeing import dialog memory. Thus avoid crashes.
[pspp]
/
src
/
ui
/
source-init-opts.c
diff --git
a/src/ui/source-init-opts.c
b/src/ui/source-init-opts.c
index a984b3d099546d59b09b1487e1ec0e832ed3cb67..d55a2d5d9fb246f66779ff86d178924639c3da93 100644
(file)
--- a/
src/ui/source-init-opts.c
+++ b/
src/ui/source-init-opts.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2008, 2010 Free Software Foundation
+ Copyright (C) 2008, 2010
, 2014
Free Software Foundation
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
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
@@
-23,14
+23,11
@@
#include <string.h>
#include "data/file-name.h"
#include <string.h>
#include "data/file-name.h"
-#include "data/por-file-reader.h"
#include "data/settings.h"
#include "data/settings.h"
-#include "data/sys-file-reader.h"
-#include "language/syntax-file.h"
-#include "language/syntax-string-source.h"
+#include "language/lexer/include-path.h"
+#include "language/lexer/lexer.h"
#include "libpspp/assertion.h"
#include "libpspp/argv-parser.h"
#include "libpspp/assertion.h"
#include "libpspp/argv-parser.h"
-#include "libpspp/getl.h"
#include "libpspp/llx.h"
#include "libpspp/message.h"
#include "ui/syntax-gen.h"
#include "libpspp/llx.h"
#include "libpspp/message.h"
#include "ui/syntax-gen.h"
@@
-62,10
+59,8
@@
static const struct argv_option source_init_options[N_SOURCE_INIT_OPTIONS] =
};
static void
};
static void
-source_init_option_callback (int id, void *
ss_
)
+source_init_option_callback (int id, void *
aux UNUSED
)
{
{
- struct source_stream *ss = ss_;
-
switch (id)
{
case OPT_ALGORITHM:
switch (id)
{
case OPT_ALGORITHM:
@@
-74,21
+69,19
@@
source_init_option_callback (int id, void *ss_)
else if (!strcmp (optarg, "enhanced"))
settings_set_algorithm (ENHANCED);
else
else if (!strcmp (optarg, "enhanced"))
settings_set_algorithm (ENHANCED);
else
- /* TRANSLATORS: Leave the words `compatible' and `enhanced' in their
- original English. */
error (1, 0,
error (1, 0,
- _("Algorithm must be either `
compatible' or `enhanced'.")
);
+ _("Algorithm must be either `
%s' or `%s'."), "compatible", "enhanced"
);
break;
case OPT_INCLUDE:
if (!strcmp (optarg, "-"))
break;
case OPT_INCLUDE:
if (!strcmp (optarg, "-"))
-
getl_clear_include_path (ss
);
+
include_path_clear (
);
else
else
-
getl_add_include_dir (ss,
optarg);
+
include_path_add (
optarg);
break;
case OPT_NO_INCLUDE:
break;
case OPT_NO_INCLUDE:
-
getl_clear_include_path (ss
);
+
include_path_clear (
);
break;
case OPT_SAFER:
break;
case OPT_SAFER:
@@
-101,10
+94,8
@@
source_init_option_callback (int id, void *ss_)
else if (!strcmp (optarg, "enhanced"))
settings_set_syntax (ENHANCED);
else
else if (!strcmp (optarg, "enhanced"))
settings_set_syntax (ENHANCED);
else
- /* TRANSLATORS: Leave the words `compatible' and `enhanced' in their
- original English. */
error (1, 0,
error (1, 0,
- _("Syntax must be either `
compatible' or `enhanced'.")
);
+ _("Syntax must be either `
%s' or `%s'."), "compatible", "enhanced"
);
break;
default:
break;
default:
@@
-113,9
+104,8
@@
source_init_option_callback (int id, void *ss_)
}
void
}
void
-source_init_register_argv_parser (struct argv_parser *ap,
- struct source_stream *ss)
+source_init_register_argv_parser (struct argv_parser *ap)
{
argv_parser_add_options (ap, source_init_options, N_SOURCE_INIT_OPTIONS,
{
argv_parser_add_options (ap, source_init_options, N_SOURCE_INIT_OPTIONS,
- source_init_option_callback,
ss
);
+ source_init_option_callback,
NULL
);
}
}