"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cint_array.c" between
gawk-5.0.1.tar.xz and gawk-5.1.0.tar.xz

About: GNU awk - pattern scanning and processing language.

cint_array.c  (gawk-5.0.1.tar.xz):cint_array.c  (gawk-5.1.0.tar.xz)
/* /*
* cint_array.c - routines for arrays of (mostly) consecutive positive integer i ndices. * cint_array.c - routines for arrays of (mostly) consecutive positive integer i ndices.
*/ */
/* /*
* Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019, * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019, 2020,
* the Free Software Foundation, Inc. * the Free Software Foundation, Inc.
* *
* This file is part of GAWK, the GNU implementation of the * This file is part of GAWK, the GNU implementation of the
* AWK Programming Language. * AWK Programming Language.
* *
* GAWK is free software; you can redistribute it and/or modify * GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
skipping to change at line 175 skipping to change at line 175
cint_array_init(NODE *symbol ATTRIBUTE_UNUSED, NODE *subs ATTRIBUTE_UNUSED) cint_array_init(NODE *symbol ATTRIBUTE_UNUSED, NODE *subs ATTRIBUTE_UNUSED)
{ {
if (symbol == NULL) { if (symbol == NULL) {
long newval; long newval;
size_t nelems = (sizeof(power_two_table) / sizeof(power_two_table [0])); size_t nelems = (sizeof(power_two_table) / sizeof(power_two_table [0]));
/* check relevant environment variables */ /* check relevant environment variables */
if ((newval = getenv_long("NHAT")) > 1 && newval < INT32_BIT) if ((newval = getenv_long("NHAT")) > 1 && newval < INT32_BIT)
NHAT = newval; NHAT = newval;
/* don't allow overflow off the end of the table */ /* don't allow overflow off the end of the table */
if (NHAT >= nelems) if (NHAT > nelems - 2)
NHAT = nelems - 2; NHAT = nelems - 2;
THRESHOLD = power_two_table[NHAT + 1]; THRESHOLD = power_two_table[NHAT + 1];
} else } else
null_array(symbol); null_array(symbol);
return & success_node; return & success_node;
} }
/* is_uinteger --- test if the subscript is an integer >= 0 */ /* is_uinteger --- test if the subscript is an integer >= 0 */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)