projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change explicit variable name checks into use of dict_class_from_id().
[pspp]
/
src
/
glob.c
diff --git
a/src/glob.c
b/src/glob.c
index daa4f97af1ce5d19fcd8452d6fc7bab03349adb4..60da1fffd3b2e54e2a6995de86fafcc833b14c01 100644
(file)
--- a/
src/glob.c
+++ b/
src/glob.c
@@
-62,7
+62,7
@@
extern void stifle_history ();
#if __DJGPP__
#include <conio.h>
#if __DJGPP__
#include <conio.h>
-#elif
__WIN32__ && __BORLANDC__
+#elif
defined (__WIN32__) && defined (__BORLANDC__)
#undef gettext
#include <conio.h>
#define gettext(STRING) \
#undef gettext
#include <conio.h>
#define gettext(STRING) \
@@
-100,8
+100,6
@@
extern void stifle_history ();
struct dictionary *default_dict;
struct expression *process_if_expr;
struct dictionary *default_dict;
struct expression *process_if_expr;
-struct ccase *temp_case;
-
struct trns_header **t_trns;
int n_trns;
int m_trns;
struct trns_header **t_trns;
int n_trns;
int m_trns;
@@
-111,9
+109,6
@@
int FILTER_before_TEMPORARY;
struct file_handle *default_handle;
struct file_handle *default_handle;
-void (*read_active_file) (void);
-void (*cancel_input_pgm) (void);
-
struct ctl_stmt *ctl_stack;
/* log.h */
struct ctl_stmt *ctl_stack;
/* log.h */
@@
-130,11
+125,11
@@
static char term_buffer[16384];
#endif
void
#endif
void
-init_glob (int argc
unused
, char **argv)
+init_glob (int argc
UNUSED
, char **argv)
{
/* FIXME: Allow i18n of other locale items (besides LC_MESSAGES). */
#if ENABLE_NLS
{
/* FIXME: Allow i18n of other locale items (besides LC_MESSAGES). */
#if ENABLE_NLS
-#if
LC_MESSAGE
+#if
HAVE_LC_MESSAGES
setlocale (LC_MESSAGES, "");
#endif
setlocale (LC_MONETARY, "");
setlocale (LC_MESSAGES, "");
#endif
setlocale (LC_MONETARY, "");
@@
-169,11
+164,6
@@
init_glob (int argc unused, char **argv)
/* var.h */
default_dict = dict_create ();
/* var.h */
default_dict = dict_create ();
- vec_init (&reinit_sysmis);
- vec_init (&reinit_blanks);
- vec_init (&init_zero);
- vec_init (&init_blanks);
-
last_vfm_invocation = time (NULL);
/* lexer.h */
last_vfm_invocation = time (NULL);
/* lexer.h */
@@
-258,7
+248,7
@@
init_glob (int argc unused, char **argv)
set_nullline = 1;
set_more = 1;
set_prompt = xstrdup ("PSPP> ");
set_nullline = 1;
set_more = 1;
set_prompt = xstrdup ("PSPP> ");
- set_seed =
2000000
;
+ set_seed =
NOT_LONG
;
#if __DJGPP__ || __BORLANDC__
{
#if __DJGPP__ || __BORLANDC__
{
@@
-312,44
+302,20
@@
init_glob (int argc unused, char **argv)
}
static void
}
static void
-get_date ()
+get_date (
void
)
{
{
- static const char *months[12] =
- {
- N_("Jan"), N_("Feb"), N_("Mar"), N_("Apr"), N_("May"), N_("Jun"),
- N_("Jul"), N_("Aug"), N_("Sep"), N_("Oct"), N_("Nov"), N_("Dec"),
- };
time_t t;
time_t t;
- int mn, dy, yr;
struct tm *tmp;
if ((time_t) -1 == time (&t))
{
struct tm *tmp;
if ((time_t) -1 == time (&t))
{
- strcpy (curdate, "
1 Jan 1970
");
+ strcpy (curdate, "
?? ??? 2???
");
return;
}
tmp = localtime (&t);
return;
}
tmp = localtime (&t);
- mn = tmp->tm_mon;
- if (mn < 0)
- mn = 0;
- if (mn > 11)
- mn = 11;
-
- dy = tmp->tm_mday;
- if (dy < 0)
- dy = 0;
- if (dy > 99)
- dy = 99;
-
- yr = tmp->tm_year + 1900;
- if (yr < 0)
- yr = 0;
- if (yr > 9999)
- yr = 9999;
-
- sprintf (curdate, "%2d %s %04d", dy, gettext (months[mn]), yr);
+ strftime (curdate, 12, "%d %b %Y",tmp);
}
#if __BORLANDC__
}
#if __BORLANDC__