Files
edccchk/banner.h

77 lines
2.4 KiB
C
Raw Normal View History

2022-02-12 21:35:35 -08:00
#include "common.h"
2014-02-23 18:10:34 +00:00
////////////////////////////////////////////////////////////////////////////////
2020-05-03 16:04:20 +01:00
void banner_ok(void)
{
2014-02-23 18:10:34 +00:00
printf(TITLE "\n"
#include "version.h"
2020-05-03 16:04:20 +01:00
" (%d-bit "
2014-02-23 18:10:34 +00:00
#if defined(__CYGWIN__)
2020-05-03 16:04:20 +01:00
"Windows, Cygwin"
2014-02-23 18:10:34 +00:00
#elif defined(__MINGW32__)
2020-05-03 16:04:20 +01:00
"Windows, MinGW"
2014-02-23 18:10:34 +00:00
#elif defined(_WIN32) && defined(_MSC_VER) && (defined(__alpha) || defined(__ALPHA) || defined(__Alpha_AXP))
2020-05-03 16:04:20 +01:00
"Windows, Digital AXP C"
2014-02-23 18:10:34 +00:00
#elif defined(_WIN32) && defined(_MSC_VER) && defined(_M_ALPHA)
2020-05-03 16:04:20 +01:00
"Windows, Microsoft C, Alpha"
2014-02-23 18:10:34 +00:00
#elif defined(_WIN32) && defined(_MSC_VER) && defined(_M_MRX000)
2020-05-03 16:04:20 +01:00
"Windows, Microsoft C, MIPS"
2014-02-23 18:10:34 +00:00
#elif defined(_WIN32) && defined(_MSC_VER)
2020-05-03 16:04:20 +01:00
"Windows, Microsoft C"
2014-02-23 18:10:34 +00:00
#elif defined(__WIN32__) || defined(_WIN32)
2020-05-03 16:04:20 +01:00
"Windows"
2014-02-23 18:10:34 +00:00
#elif defined(__DJGPP__)
2020-05-03 16:04:20 +01:00
"DOS, DJGPP"
2014-02-23 18:10:34 +00:00
#elif defined(__MSDOS__) && defined(__TURBOC__)
2020-05-03 16:04:20 +01:00
"DOS, Turbo C"
2014-02-23 18:10:34 +00:00
#elif defined(_DOS) && defined(__WATCOMC__)
2020-05-03 16:04:20 +01:00
"DOS, Watcom"
2014-02-23 18:10:34 +00:00
#elif defined(__MSDOS__) || defined(MSDOS) || defined(_DOS)
2020-05-03 16:04:20 +01:00
"DOS"
2014-02-23 18:10:34 +00:00
#elif defined(__APPLE__)
2020-05-03 16:04:20 +01:00
"Mac OS"
2014-02-23 18:10:34 +00:00
#elif defined(__linux) || defined(__linux__) || defined(__gnu_linux__) || defined(linux)
2020-05-03 16:04:20 +01:00
"Linux"
2014-02-23 18:10:34 +00:00
#elif defined(__OpenBSD__)
2020-05-03 16:04:20 +01:00
"OpenBSD"
2014-02-23 18:10:34 +00:00
#elif defined(BSD)
2020-05-03 16:04:20 +01:00
"BSD"
#elif defined(human68k) || defined(HUMAN68K) || defined(__human68k) || defined(__HUMAN68K) || defined(__human68k__) || \
defined(__HUMAN68K__)
"Human68k"
2014-02-23 18:10:34 +00:00
#elif defined(__unix__) || defined(__unix) || defined(unix)
2020-05-03 16:04:20 +01:00
"unknown Unix"
2014-02-23 18:10:34 +00:00
#else
2020-05-03 16:04:20 +01:00
"unknown platform"
2014-02-23 18:10:34 +00:00
#endif
2020-05-03 16:04:20 +01:00
"%s)\n"
" " COPYR "\n"
" http://www.claunia.com/\n"
" based on ecm v1.03\n"
" Copyright (C) 2002-2011 Neill Corlett"
"\n",
(int)(sizeof(size_t) * 8),
(sizeof(off_t) > 4 && sizeof(off_t) > sizeof(size_t)) ? ", large file support" : "");
2014-02-23 18:10:34 +00:00
}
2020-05-03 16:04:20 +01:00
void banner_error(void)
{
2014-02-23 18:10:34 +00:00
printf("Configuration error\n");
exit(1);
}
2020-05-03 16:04:20 +01:00
static void banner(void)
{
2014-02-23 18:10:34 +00:00
((sizeof(off_t) >= sizeof(size_t)) ? banner_ok : banner_error)();
//
// If we've displayed the banner, we'll also want to warn that this is a
// command-line app when we exit
//
atexit(commandlinewarning);
}
////////////////////////////////////////////////////////////////////////////////