1 /* 2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Copyright (C) 2006-2008 - INRIA - 4 * Copyright (C) 2009 - Digiteo - Vincent LIARD 5 * 6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 7 * 8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 10 * This file was originally licensed under the terms of the CeCILL v2.1, 11 * and continues to be available under such terms. 12 * For more information, see the COPYING file which you should have received 13 * along with this program. 14 * 15 */ 16 17 /* 18 * MACHINE CONSTANTS 19 * These numbers must be updated when the program is ported to a new machine. 20 * Using spConfig.h to get the largest int 21 */ 22 23 #define spINSIDE_SPARSE 24 #include "../../sparse/includes/spConfig.h" 25 #include "ipmpar1.h" 26 27 int C2F(largestint)28C2F(largestint)(void) 29 { 30 static int memoized = 0; 31 static int largest = (1uL << 31) - 1; /* default */ 32 if (!memoized) 33 { 34 if (sizeof(int) == sizeof(long)) 35 { 36 largest = LARGEST_LONG_INTEGER; 37 } 38 else if (sizeof(int) == sizeof(short)) 39 { 40 largest = LARGEST_SHORT_INTEGER; 41 } 42 memoized = 1; 43 } 44 return largest; 45 } 46