X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fglob.c;h=c3a478abe9e57d875f60f6a00f136eacefd69a47;hb=c9b1c72477efa03e0a90f8afd9dafebc8f4b04ef;hp=b2abbcf2b578bd2beaeafc4070f6c21f99b55138;hpb=a091b0dbb28a3f5f2d944b75bc9d1abba82c548f;p=pspp diff --git a/src/glob.c b/src/glob.c index b2abbcf2b5..c3a478abe9 100644 --- a/src/glob.c +++ b/src/glob.c @@ -87,6 +87,7 @@ extern void stifle_history (); #include "getline.h" #include "julcal/julcal.h" #include "lexer.h" +#include "magic.h" #include "main.h" #include "settings.h" #include "str.h" @@ -123,8 +124,8 @@ int logging; static void get_date (void); -#if HAVE_LIBTERMCAP && !__CHECKER__ -static char *term_buffer; +#if HAVE_LIBTERMCAP +static char term_buffer[16384]; #endif void @@ -164,54 +165,6 @@ init_glob (int argc unused, char **argv) _control87 (0xffff, 0x137f); #endif -#if ENDIAN==UNKNOWN - { - /* Test for endianness borrowed from acspecific.m4, which was in - turn borrowed from Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } - u; - - u.l = 1; - if (u.c[sizeof u.l - 1] == 1) - endian = BIG; - else if (u.c[0] == 1) - endian = LITTLE; - else - msg (FE, _("Your machine does not appear to be either big- or little-" - "endian. At the moment, PSPP only supports machines of " - "these standard endiannesses. If you want to hack in " - "others, contact the author.")); - } -#endif - - /* PORTME: Set the value for second_lowest_value, which is the - "second lowest" possible value for a double. This is the value - for LOWEST on MISSING VALUES, etc. */ -#ifndef SECOND_LOWEST_VALUE -#if FPREP == FPREP_IEEE754 - { - union - { - unsigned char c[8]; - double d; - } - second_lowest_little = {{0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff}}, - second_lowest_big = {{0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe}}; - - if (endian == LITTLE) - second_lowest_value = second_lowest_little.d; - else if (endian == BIG) - second_lowest_value = second_lowest_big.d; - } -#else /* FPREP != FPREP_IEEE754 */ -#error Unknown floating-point representation. -#endif /* FPREP != FPREP_IEEE754 */ -#endif /* !SECOND_LOWEST_VALUE */ - /* var.h */ default_dict.var_by_name = avl_create (NULL, cmp_variable, NULL); @@ -320,20 +273,11 @@ init_glob (int argc unused, char **argv) int success; /* This code stolen from termcap.info, though modified. */ -#if !__CHECKER__ - term_buffer = xmalloc (2048); -#endif - termtype = getenv ("TERM"); if (!termtype) msg (FE, _("Specify a terminal type with `setenv TERM '.")); -#if __CHECKER__ - success = tgetent (NULL, termtype); -#else success = tgetent (term_buffer, termtype); -#endif - if (success <= 0) { if (success < 0)