X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftinfo%2Fread_entry.c;h=5b570b0fe192ff8b050efaae1c796c8281931058;hb=9b4c4abadc0a29999c5ddad5aa8d769fee28d687;hp=d4257982f5c4f3cfd391440753346fa63aaf835c;hpb=fe8c285d2a2770ee40523303dbf27a9fd8d01188;p=ncurses.git diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index d4257982..5b570b0f 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_entry.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. * + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -41,7 +42,7 @@ #include -MODULE_ID("$Id: read_entry.c,v 1.153 2019/01/23 00:02:04 tom Exp $") +MODULE_ID("$Id: read_entry.c,v 1.157 2020/02/02 23:34:34 tom Exp $") #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts)) @@ -552,7 +553,7 @@ _nc_read_file_entry(const char *const filename, TERMTYPE2 *ptr) int code; if (_nc_access(filename, R_OK) < 0 - || (fp = fopen(filename, "rb")) == 0) { + || (fp = fopen(filename, BIN_R)) == 0) { TR(TRACE_DATABASE, ("cannot open terminfo %s (errno=%d)", filename, errno)); code = TGETENT_NO; } else { @@ -694,7 +695,7 @@ decode_quickdump(char *target, const char *source) char *base = target; int result = 0; - if (!strncmp(source, "b64:", 4)) { + if (!strncmp(source, "b64:", (size_t) 4)) { source += 4; while (*source != '\0') { int bits[4]; @@ -712,7 +713,7 @@ decode_quickdump(char *target, const char *source) } } } - } else if (!strncmp(source, "hex:", 4)) { + } else if (!strncmp(source, "hex:", (size_t) 4)) { source += 4; while (*source != '\0') { int ch = decode_hex(&source); @@ -881,7 +882,7 @@ _nc_read_entry2(const char *const name, char *const filename, TERMTYPE2 *const t #if NCURSES_EXT_NUMBERS /* - * This entrypoint is used by tack. + * This entrypoint is used by tack 1.07 */ NCURSES_EXPORT(int) _nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp)