links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 7b9bb65b73a5ab1f56531bbf559d093d2c70d388
Parent: 3d2bd12a188a721b56b53aa034bcb47f61678265
Author: opask
Date:   Thu, 19 Jul 2018 06:49:41 -0600

remover compiler_name

Diffstat:
Mdefault.c | 311-------------------------------------------------------------------------------
Mhttp.c | 2--
Mlinks.h | 1-
Mmenu.c | 5-----
4 files changed, 0 insertions(+), 319 deletions(-)

diff --git a/default.c b/default.c @@ -32,316 +32,6 @@ static void get_system_name(void) strcpy(cast_char system_name, SYSTEM_NAME); } -unsigned char compiler_name[MAX_STR_LEN]; - -static void get_compiler_name(void) -{ -#if defined(__BORLANDC__) - - int w = __BORLANDC__+0; - int v1 = w / 0x100; - int v2 = w / 0x10 % 0x10; - int v3 = w % 0x10; - if (v1 == 4 && v2 < 5) v1 = 3; - if (v1 == 4 && v2 == 5) v2 = 0; - - if (!v3) sprintf(cast_char compiler_name, "Borland C %d.%d", v1, v2); - else sprintf(cast_char compiler_name, "Borland C %d.%d.%d", v1, v2, v3); - -#elif defined(__clang__) - -#if !defined(__clang_major__) || !defined(__clang_minor__) - sprintf(cast_char compiler_name, "LLVM/Clang"); -#else - int v1 = __clang_major__+0; - int v2 = __clang_minor__+0; -#ifdef __clang_patchlevel__ - int v3 = __clang_patchlevel__+0; -#else - int v3 = 0; -#endif - if (v3 > 0) sprintf(cast_char compiler_name, "LLVM/Clang %d.%d.%d", v1, v2, v3); - else sprintf(cast_char compiler_name, "LLVM/Clang %d.%d", v1, v2); -#endif - -#elif defined(__COMO_VERSION__) - - int w = __COMO_VERSION__+0; - int v1 = w / 100; - int v2 = w % 100; - if (!(v2 % 10)) sprintf(cast_char compiler_name, "Comeau C %d.%d", v1, v2 / 10); - else sprintf(cast_char compiler_name, "Comeau C %d.%02d", v1, v2); - -#elif defined(__convexc__) - - sprintf(cast_char compiler_name, "Convex C"); - -#elif defined(_CRAYC) - -#if !defined(_RELEASE) || !defined(_RELEASE_MINOR) - sprintf(cast_char compiler_name, "Cray C"); -#else - int v1 = _RELEASE+0; - int v2 = _RELEASE_MINOR+0; - sprintf(cast_char compiler_name, "Cray C %d.%d", v1, v2); -#endif - -#elif defined(__DCC__) - -#ifndef __VERSION_NUMBER__ - sprintf(cast_char compiler_name, "Diab C"); -#else - int w = __VERSION_NUMBER__+0; - int v1 = w / 1000; - int v2 = w / 100 % 10; - int v3 = w % 100; - sprintf(cast_char compiler_name, "Diab C %d.%d.%02d", v1, v2, v3); -#endif - -#elif defined(__DMC__) - - int w = __DMC__+0; - int v1 = w / 0x100; - int v2 = w / 0x10 % 0x10; - int v3 = w % 0x10; - if (!v3) sprintf(cast_char compiler_name, "Digital Mars C %d.%d", v1, v2); - else sprintf(cast_char compiler_name, "Digital Mars C %d.%d.%d", v1, v2, v3); - -#elif defined(__DECC_VER) - - int w = __DECC_VER+0; - int v1 = w / 10000000; - int v2 = w / 100000 % 100; - int v3 = w % 10000; - sprintf(cast_char compiler_name, "DEC C %d.%d-%03d", v1, v2, v3); - -#elif defined(__ghs__) - -#ifndef __GHS_VERSION_NUMBER__ - sprintf(cast_char compiler_name, "Green Hill C"); -#else - int w = __GHS_VERSION_NUMBER__+0; - int v1 = w / 100; - int v2 = w / 10 % 10; - int v3 = w % 10; - sprintf(cast_char compiler_name, "Green Hill C %d.%d.%d", v1, v2, v3); -#endif - -#elif defined(__HIGHC__) - - sprintf(cast_char compiler_name, "MetaWare High C"); - -#elif defined(__HP_cc) - - int w = __HP_cc+0; - int v1 = w / 10000; - int v2 = w / 100 % 100; - int v3 = w % 100; - if (w <= 1) sprintf(cast_char compiler_name, "HP CC"); - else sprintf(cast_char compiler_name, "HP CC %d.%02d.%02d", v1, v2, v3); - -#elif defined(__xlc__) - - int w = __xlc__+0; - int v1 = w / 0x100; - int v2 = w % 0x100; - sprintf(cast_char compiler_name, "IBM XL C %X.%X", v1, v2); - -#elif defined(__IBMC__) && defined(__COMPILER_VER__) - - unsigned w = __COMPILER_VER__+0; - int v0 = w / 0x10000000; - int v1 = w / 0x1000000 % 0x10; - int v2 = w / 0x10000 % 0x100; - int v3 = w % 0x10000; - unsigned char *os = !v0 ? "S/370" : v0 == 1 ? "OS/390" : v0 == 4 ? "z/OS" : ""; - sprintf(cast_char compiler_name, "IBM%s%s XL C %X.%0X.%X", *os ? " " : "", os, v1, v2, v3); - -#elif defined(__LCC__) - - sprintf(cast_char compiler_name, "LCC"); - -#elif defined(__NDPC__) - - sprintf(cast_char compiler_name, "Microway NDP C"); - -#elif defined(_MSC_VER) - - int w = _MSC_VER+0; - int v1 = w / 100; - int v2 = w % 100; - unsigned char *visual = cast_uchar ""; - if (v1 >= 8) { - v1 -= 6; - if (v1 == 2) v1 = 1; - visual = cast_uchar "Visual "; - } - if (!(v2 % 10)) sprintf(cast_char compiler_name, "Microsoft %sC %d.%d", visual, v1, v2 / 10); - else sprintf(cast_char compiler_name, "Microsoft %sC %d.%02d", visual, v1, v2); - -#elif defined(__MWERKS__) - - int w = __MWERKS__+0; - int v1 = w / 0x1000; - int v2 = w / 0x100 % 0x10; - int v3 = w % 0x100; - if (w <= 1) sprintf(cast_char compiler_name, "Metrowerks CodeWarrior"); - sprintf(cast_char compiler_name, "Metrowerks CodeWarrior %x.%x.%x", v1, v2, v3); - -#elif defined(__NWCC__) - - sprintf(cast_char compiler_name, "NWCC"); - -#elif defined(__OPEN64__) - - unsigned char *n = cast_uchar "Open64 " __OPEN64__; - if (strlen(cast_const_char n) >= sizeof(cast_char compiler_name)) n = cast_uchar "Open64"; - strcpy(cast_char compiler_name, cast_const_char n); - -#elif defined(__PATHSCALE__) - - unsigned char *n = cast_uchar "PathScale " __PATHSCALE__; - if (strlen(cast_const_char n) >= sizeof(cast_char compiler_name)) n = cast_uchar "PathScale"; - strcpy(cast_char compiler_name, cast_const_char n); - -#elif defined(__PCC__) - - int v1 = __PCC__+0; -#ifdef __PCC_MINOR__ - int v2 = __PCC_MINOR__+0; -#else - int v2 = 0; -#endif -#ifdef __PCC_MINORMINOR__ - int v3 = __PCC_MINORMINOR__+0; -#else - int v3 = 0; -#endif - sprintf(cast_char compiler_name, "PCC %d.%d.%d", v1, v2, v3); - -#elif defined(__PGI) || defined(__PGIC__) - -#if !defined(__PGIC__) || !defined(__PGIC_MINOR__) - sprintf(cast_char compiler_name, "The Portland Group C"); -#else - int v1 = __PGIC__+0; - int v2 = __PGIC_MINOR__+0; -#ifdef __PGIC_PATCHLEVEL__ - int v3 = __PGIC_PATCHLEVEL__+0; -#else - int v3 = 0; -#endif - if (v3 > 0) sprintf(cast_char compiler_name, "The Portland Group C %d.%d.%d", v1, v2, v3); - else sprintf(cast_char compiler_name, "The Portland Group C %d.%d", v1, v2); -#endif - -#elif defined(__SASC__) - - int w = __SASC__+0; - int v1 = w / 100; - int v2 = w % 100; - sprintf(cast_char compiler_name, "SAS C %d.%02d", v1, v2); - -#elif (defined(__sgi) && defined(_COMPILER_VERSION)) || defined(_SGI_COMPILER_VERSION) - -#ifdef _SGI_COMPILER_VERSION - int w = _SGI_COMPILER_VERSION; -#else - int w = _COMPILER_VERSION; -#endif - int v1 = w / 100; - int v2 = w / 10 % 10; - int v3 = w % 10; - sprintf(cast_char compiler_name, "MIPSpro %d.%d.%d", v1, v2, v3); - -#elif defined(__SUNPRO_C) - - int w = __SUNPRO_C+0; - int div = w >= 0x1000 ? 0x1000 : 0x100; - int v2_digits = w >= 0x1000 ? 2 : 1; - int v1 = w / div; - int v2 = w % div / 0x10; - int v3 = w % 0x10; - if (!v3) sprintf(cast_char compiler_name, "Sun C %X.%0*X", v1, v2_digits, v2); - else sprintf(cast_char compiler_name, "Sun C %X.%0*X.%X", v1, v2_digits, v2, v3); - -#elif defined(__SYSC__) && defined(__SYSC_VER__) - - int w = __SYSC_VER__+0; - int v1 = w / 10000; - int v2 = w / 100 % 100; - int v3 = w % 100; - sprintf(cast_char compiler_name, "Dignus Systems C %d.%02d.%02d", v1, v2, v3); - -#elif defined(__TenDRA__) - - sprintf(cast_char compiler_name, "TenDRA C"); - -#elif defined(__TINYC__) - - sprintf(cast_char compiler_name, "Tiny C"); - -#elif defined(_UCC) - -#if !defined(_MAJOR_REV) || !defined(_MINOR_REV) - sprintf(cast_char compiler_name, "Ultimate C"); -#else - int v1 = _MAJOR_REV+0; - int v2 = _MAJOR_REV+0; - sprintf(cast_char compiler_name, "Ultimate C %d.%d", v1, v2); -#endif - -#elif defined(__USLC__) - - sprintf(cast_char compiler_name, "USL C"); - -#elif defined(__VOSC__) - - sprintf(cast_char compiler_name, "Stratus VOS C"); - -#elif defined(__WATCOMC__) - - int w = __WATCOMC__+0; - int v1 = w / 100; - int v2 = w % 100; - unsigned char *op = cast_uchar ""; - if (v1 >= 12) { - v1 -= 11; - op = cast_uchar "Open"; - } - if (!(v2 % 10)) sprintf(cast_char compiler_name, "%sWatcom C %d.%d", op, v1, v2 / 10); - else sprintf(cast_char compiler_name, "%sWatcom C %d.%02d", op, v1, v2); - -#elif defined(__GNUC__) - - int v1 = __GNUC__+0; -#ifdef __GNUC_MINOR__ - int v2 = __GNUC_MINOR__+0; -#else - int v2 = -1; -#endif -#ifdef __GNUC_PATCHLEVEL__ - int v3 = __GNUC_PATCHLEVEL__+0; -#else - int v3 = 0; -#endif -#if defined(__llvm__) - unsigned char *prefix = cast_uchar "LLVM/"; -#else - unsigned char *prefix = cast_uchar ""; -#endif - if (v1 == 2 && (v2 >= 90 && v2 <= 91)) sprintf(cast_char compiler_name, "%sEGCS 1.%d", prefix, v2 - 90); - else if (v3 > 0 && v2 >= 0) sprintf(cast_char compiler_name, "%sGNU C %d.%d.%d", prefix, v1, v2, v3); - else if (v2 >= 0) sprintf(cast_char compiler_name, "%sGNU C %d.%d", prefix, v1, v2); - else sprintf(cast_char compiler_name, "%sGNU C %d", prefix, v1); - -#else - - strcpy(cast_char compiler_name, "unknown compiler"); - -#endif -} - static void do_exit(int x) { /* avoid compiler warnings about unreachable code */ @@ -710,7 +400,6 @@ static unsigned char *get_home(int *n) void init_home(void) { get_system_name(); - get_compiler_name(); links_home = get_home(&first_use); if (!links_home) { fprintf(stderr, "Unable to find or create links config directory. Please check, that you have $HOME variable set correctly and that you have write permission to your home directory.\n\007"); diff --git a/http.c b/http.c @@ -374,8 +374,6 @@ static void add_user_agent(unsigned char **hdr, int *l) add_to_str(hdr, l, cast_uchar("Links (" VERSION "; ")); add_to_str(hdr, l, system_name); add_to_str(hdr, l, cast_uchar "; "); - add_to_str(hdr, l, compiler_name); - add_to_str(hdr, l, cast_uchar "; "); if (!F && !list_empty(terminals)) { struct terminal *term; struct list_head *lterm; diff --git a/links.h b/links.h @@ -3839,7 +3839,6 @@ struct driver_param *get_driver_param(unsigned char *); extern int anonymous; extern unsigned char system_name[]; -extern unsigned char compiler_name[]; extern unsigned char *links_home; extern int first_use; diff --git a/menu.c b/menu.c @@ -10,7 +10,6 @@ static unsigned char * const version_texts[] = { TEXT_(T_LINKS_VERSION), TEXT_(T_OPERATING_SYSTEM_TYPE), TEXT_(T_OPERATING_SYSTEM_VERSION), - TEXT_(T_COMPILER), TEXT_(T_WORD_SIZE), TEXT_(T_DEBUGGING_LEVEL), TEXT_(T_EVENT_HANDLER), @@ -71,10 +70,6 @@ static void menu_version(void *term_) add_to_str(&s, &l, cast_uchar "\n"); add_and_pad(&s, &l, term, *text_ptr++, maxlen); - add_to_str(&s, &l, compiler_name); - add_to_str(&s, &l, cast_uchar "\n"); - - add_and_pad(&s, &l, term, *text_ptr++, maxlen); add_to_str(&s, &l, get_text_translation(TEXT_(T_MEMORY), term)); add_to_str(&s, &l, cast_uchar " "); add_num_to_str(&s, &l, sizeof(void *) * 8);