projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(render_strip) Fix bug that sometimes caused joined text in joined
[pspp]
/
src
/
command.c
diff --git
a/src/command.c
b/src/command.c
index 4afe70be1130a96af955f2627cbe7724e516244e..2c62d2f26d79200b8dce23cc80b79dea24820cb1 100644
(file)
--- a/
src/command.c
+++ b/
src/command.c
@@
-17,24
+17,7
@@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* AIX requires this to be the first thing in the file. */
#include <config.h>
#include <config.h>
-#if __GNUC__
-#define alloca __builtin_alloca
-#else
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#else
-#ifdef _AIX
-#pragma alloca
-#else
-#ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#endif
-#endif
-#endif
-#endif
-
#include <assert.h>
#include "command.h"
#include <stdio.h>
#include <assert.h>
#include "command.h"
#include <stdio.h>
@@
-582,15
+565,24
@@
cmd_execute (void)
return lex_end_of_command ();
}
return lex_end_of_command ();
}
+
+#define assert_not_safer() \
+ do { \
+ if (set_safer) \
+ { \
+ msg (SE, _("This command not allowed when the SAFER option is set.")); \
+ return CMD_FAILURE; \
+ } \
+} while(0)
+
+
+
/* Parses, performs the ERASE command. */
int
cmd_erase (void)
{
/* Parses, performs the ERASE command. */
int
cmd_erase (void)
{
- if (set_safer)
- {
- msg (SE, _("This command not allowed when the SAFER option is set."));
- return CMD_FAILURE;
- }
+
+ assert_not_safer();
lex_match_id ("ERASE");
if (!lex_force_match_id ("FILE"))
lex_match_id ("ERASE");
if (!lex_force_match_id ("FILE"))
@@
-606,7
+598,7
@@
cmd_erase (void)
return CMD_FAILURE;
}
return CMD_FAILURE;
}
- return
lex_end_of_command ()
;
+ return
CMD_SUCCESS
;
}
#if unix
}
#if unix
@@
-717,11
+709,7
@@
cmd_host (void)
{
int code;
{
int code;
- if (set_safer)
- {
- msg (SE, _("This command not allowed when the SAFER option is set."));
- return CMD_FAILURE;
- }
+ assert_not_safer();
lex_match_id ("HOST");
lex_match_id ("HOST");