[go: up one dir, main page]

Menu

[515d8e]: / dutils.h  Maximize  Restore  History

Download this file

2406 lines (2037 with data), 83.6 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
// dutils.h
// 04/10/2014 Marco Chiarelli aka DekraN
/*
WARNING!!! This program is intended to be included
exclusively by main.c, geometry.c, programs.c, algebra.c and settings.c project files of my suite program!
I do not assume any responsibilities about the use with any other code-scripts.
*/
// HEADER Guard
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>
#include <complex.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <float.h>
#include <errno.h>
#include <setjmp.h>
#include <sys/time.h>
#include <signal.h>
#include <omp.h>
#define false 0
#define true 1
// PROJECT HEADERS
// #include "ext_math.h"
#include "defaults.h"
#include "ExprEval/exprincl.h"
#define XMLCALL
#ifdef XMLCALL
#include "libxml/encoding.h"
#include "libxml/xmlwriter.h"
#include "libxml/xpath.h"
#define XML_ENCODING "UTF-8"
#define SETTINGS_FILENAME "./settings.xml"
#define XML_FILENAMES_LENGTH MINMIN_STRING
#define MAX_XML_FIELDSTRINGS SIGN_STRING
#endif
// #include "ExprEval/expreval.h"
// #include "ExprEval/expreval.h"
#ifdef __cplusplus
extern "C" {
#endif
#define __MSSHELL_WRAPPER_
#define __MSNATIVE_
#define __MSUTIL_
#define __WINCALL32
#define __WINCALL __WINCALL32
#define __export // introduced with the passing to Orwell Dev-C++ IDE
#define __apnt
#define __lmp_prog
#define __system
#define _MS__private
#define PROG__NAME "mathSuite"
#define PROG__VERSION "7.10"
#define PROG__AUTHOR "Marco Chiarelli"
#define PROG__LASTUPDATEDATE "16/11/2014"
// INITIALIZING EXPREVAL DEFAULT CONSTANTS
#define INIT_OBJLIST NULL
#define INIT_FUNCLIST NULL
#define INIT_CONSTLIST NULL
#define INIT_VARLIST NULL
#define INIT_ANS NULL
#define VSPACE
#define NOERROR_EXIT 0
#define HEAPALLOC_ERROR -1
/// MINMAX powerful macros
/// designed to enhance
/// statistic media functions,
/// especially the mediana one.
#define MIN_MODE false
#define MAX_MODE true
#define MIN(a,b) MINMAX(a,b,MIN_MODE,NULL)
#define MAX(a,b) MINMAX(a,b,MAX_MODE,NULL)
/// #define INI_NAME "./settings.xml"
/// #define WINOS true /// ((defined(WIN32)) || (defined(WINDOWS)))
#define XML_NAME "./settings.xml"
#ifdef WINOS
#include <windows.h>
#include <errors.h>
#include <conio.h>
#define MAX_PATH_LENGTH MAX_PATH
#define pulisciSchermo (void)system("cls")
#else
#include <termios.h>
#include <unistd.h>
#define MAX_PATH_LENGTH 260
#define DEFAULT_LINUX_SPOOLFOLDER "/var/spool"
#define pulisciSchermo (void)system("clear")
#endif
#define getItemsListNo(mode) access(lists)[mode].itemsno
#define initList(mode) access(lists)[mode].items_list[PREV_LISTNODE] = access(lists)[mode].items_list[NEXT_LISTNODE] = (nodelist *)NULL;
#define DESCRIPTIONS_FOLDER DEFAULT_DESCRIPTIONS_FOLDER
#define INVALID_ITEM NULL
#define STARTING_ITEMSNO 0
#define ITEMS_LASTONESTANDING STARTING_ITEMSNO+1
#define NULL_ITEM(mode) getItemsListNo(mode)
#define NULL_ENV NULL_ITEM(ENVS)
#define NULL_MAT NULL_ITEM(MATRICES)
#define NULL_LOG NULL_ITEM(LOGS)
#define STARTING_ENVSNO STARTING_ITEMSNO
#define STARTING_MATNO STARTING_ITEMSNO
#define STARTING_LOGSNO STARTING_ITEMSNO
#define STARTING_LAYOUTNO STARTING_ITEMSNO
#define MAIN_ITEM DEFAULT_MAIN_ITEM
#define MAIN_ENV MAIN_ITEM
#define MAIN_MAT MAIN_ITEM
#define MAIN_LOG MAIN_ITEM
#define MAIN_LAYOUT MAIN_ITEM
// #define MAIN_ENV DEFAULT_MAIN_ENV
// #define MAIN_MAT DEFAULT_MAIN_MAT
// #define MAIN_LOG DEFAULT_MAIN_LOG
#define INIT_MATLIST NULL
#define INIT_LOGSLIST NULL
#define INIT_CURRENTMATRIX NULL
#define INIT_LASTMATRIXPRINTED NULL
#define INIT_LAYOUTLIST NULL
#define INIT_DIM 0
//
#define INIT_CM_ROWS INIT_DIM
#define INIT_CM_COLUMNS INIT_DIM
#define INIT_LMP_ROWS INIT_DIM
#define INIT_LMP_COLUMNS INIT_DIM
//
#define STARTING_DIM INIT_DIM+1
#define STARTING_CM_ROWS STARTING_DIM
#define STARTING_CM_COLUMNS STARTING_DIM
#define STARTING_LMP_ROWS STARTING_DIM
#define STARTING_LMP_COLUMNS STARTING_DIM
// #define MAT_LASTONESTANDING STARTING_MATNO+1
// #define LOGS_LASTONESTANDING STARTING_LOGNO+1
#define INIT_EXPRTYPE (exprType *)NULL
#define INIT_MATRIXOBJ (matrixObj *)NULL
#define INIT_LOGOBJ (logObj *)NULL
#define INIT_LAYOUTOBJ (layoutObj *)NULL
enum
{
ERROR_FORBIDDENOPERATION = 1,
ERROR_NOSUCHFILEORDIR,
ERROR_NOSUCHPROCESS,
ERROR_INTERRUPTEDFUNCCALL,
ERROR_INPUTOUTPUT,
ERROR_NOSUCHDEVICEADDRESS,
ERROR_TOOLONGARGLIST,
ERROR_EXECFORMAT,
ERROR_BADFILEDESCRIPTOR,
ERROR_NOCHILDPROCESS,
ERROR_RESOURCETEMPORARYUNAVAILABLE,
ERROR_NOTENOUGHSPACE,
ERROR_PERMISSIONDENIED,
ERROR_BADADDRESS,
UNKNOWN_ERROR,
ERROR_RESOURCEDEVICE,
ERROR_FILEEXISTS,
ERROR_IMPROPERLINK,
ERROR_NOSUCHDEVICE,
ERROR_NOTADIRECTORY,
ERROR_ISASHIFT2,
ERROR_INVALIDARGUMENT,
ERROR_TOOMANYOPENFILESINSYSTEM,
ERROR_TOOMANYOPENFILES,
ERROR_INAPPROPRIATEIOCONTROLOPERATIONS,
ERROR_FILETOOLARGE = ERROR_INAPPROPRIATEIOCONTROLOPERATIONS+2,
ERROR_NOSPACELEFTONDEVICE,
ERROR_INVALIDSEEK,
ERROR_READONLYFILESYSTEM,
ERROR_TOOMANYLINKS,
ERROR_BROKENPIPE,
ERROR_DOMAIN,
ERROR_TOOLARGERESULT,
ERROR_RESORUCEDEADLOCKAVOIDED = ERROR_TOOLARGERESULT+2,
ERROR_TOOLONGFILENAME,
ERROR_NOLOCKSAVAILABLE,
ERROR_NOTIMPLEMENTEDFUNCTION,
ERROR_DIRECTORYNOTEMPTY,
ERROR_ILLEGALBYTESEQUENCE
};
#define MAX_BUFSIZ 2048
#define BUFLEN_FACTOR 4 // 5 // in order to increase Maximum Buffer Capacity (Length)
#define MIN_BUFLEN 1
#define MAX_BUFLEN (MAX_BUFSIZ * BUFLEN_FACTOR)
#define DEFAULT_BUFSIZE MAX_BUFSIZ
#define MINMINMIN_STRING 10
#define MINMIN_STRING 20
#define MIN_STRING 100
#define MAX_STRING 256
#define MAXX_STRING (MAX_STRING<<1)
#define MAXMAX_STRING (MAX_STRING<<MAX_DIMENSIONS)
#define MMAX_STRING (5*MAX_STRING)
#define KSTRING 1000
#define SIGN_STRING MINMINMIN_STRING
//
#define INFO_STRING MIN_STRING
#define DINFO_STRING INFO_STRING<<1
#define MAX_DESCRIPTION_STRING 3000
#define PATHCONTAINS_STRING (MAX_PATH_LENGTH+(MIN_STRING<<1))
#define ERR_STRING PATHCONTAINS_STRING
#define MAX_FILE_LINES MAXX_STRING /// 255 /// INFO_STRING /// 100
#define MAX_IDENTIFIER_LENGTH MIN_STRING
#define MAX_EXTENSION_LENGTH SIGN_STRING
#define NULL_CHAR ""
#define BLANK_STRING " "
#define BLANK_CHAR ' '
#define UNKNOWN_STRING "(unknown)"
#define UNDERSCORE_SEPERATOR_STRING "_"
#define FILENAMES_SEPERATOR UNDERSCORE_SEPERATOR_STRING
// #define RAD_RATIO (M_PI/180)
// #define RAD_RATIO_FACTOR 0.333333333
#define INT64_TMAX ULLONG_MAX
#define NULL_VAL MAX_VAL // INT64_TMAX // starting_random_seed
// #define NULL_VAL2 MAX_VAL-(RAD_RATIO)
// #define NULL_VAL3 MAX_VAL-(RAD_RATIO_FACTOR*RAD_RATIO)
// #define isNullVal(x) (x == NULL_VAL || x == NULL_VAL2 || x == NULL_VAL3)
// #define isNullVal3(x) (x == NULL_VAL || x == NULL_VAL3)
#define isNullVal(x) (x == NULL_VAL)
#define exitHandleCheck (access(exitHandle) == EXITHANDLE_SETCMD || access(exitHandle) == EXITHANDLE_BACKCMD || !access(exitHandle))
#define MATRIXGET_COMMAND DEFAULT_MATRIXGET_COMMAND
#define MATRIXSET_COMMAND DEFAULT_MATRIXSET_COMMAND
#define MATRIXBACK_COMMAND DEFAULT_MATRIXBACK_COMMAND
#define SYSTEM_LOG DEFAULT_SYSTEM_LOG
// #define SECURITY_CHECK ENABLED
#define TERMINATING_CHAR ';'
#define TERMINATING_STRING ";"
#define SCANFEXIT_CHAR '.'
#define SCANFEXIT_STRING "."
#define EXTENSION_DOT "."
#define MATRIXES_SEPERATOR_STRING BLANK_STRING
#define MATRIXES_SEPERATOR_CHAR BLANK_CHAR
#define MIN_EXTENSIVE_MULTITHREADING_CORESNO DEFAULT_MIN_EXTENSIVE_MULTITHREADING_CORESNO
// Routh Criterion METHOD MACROS
#define ROUTHTABLE_EPSILON 0.0000000001
#define ROUTHTABLE_ALLOC_ERROR -1
// Jury Criterion METHOD MACROS
enum
{
JURYTABLE_ALLOC_ERROR = 0,
JURYTABLE_NOTSATISFIED,
JURYTABLE_SATISFIED
};
/// #define JURYTABLE_ALLOC_ERROR false
// Simplex METHOD MACROS
enum
{
SIMPLEXMETHOD_FOUNDBFS = 0,
SIMPLEXMETHOD_ALLOC_ERROR,
SIMPLEXMETHOD_INFBFS_ERROR,
SIMPLEXMETHOD_FARBFS_ERROR
};
#define MIN_PROBLEM false
#define MAX_PROBLEM true
#define MAX_SIMPLEXMETHOD_ITERATIONS DEFAULT_MAX_SIMPLEXMETHOD_ITERATIONS
//
// EigenValues and EigenVectors MACROS
enum
{
EIGVALUES_FOUNDEVS = 0,
EIGVALUES_ALLOC_ERROR,
EIGVALUES_INFEVS_ERROR
};
#define EIGENVALUES_PREC 0.00000000001
#define MAX_EIGVALUES_ITERATIONS DEFAULT_MAX_EIGVALUES_ITERATIONS
// DSVD Max Iterations MACRO
#define MAX_DSVD_ITERATIONS DEFAULT_MAX_DSVD_ITERATIONS
#define OUTLIER_CONSTANT DEFAULT_OUTLIER_CONSTANT
#define MIN_OUTLIER_CONSTANT DEFAULT_MIN_OUTLIER_CONSTANT
#define MAX_OUTLIER_CONSTANT DEFAULT_MAX_OUTLIER_CONSTANT
#define MIDDLE_ELEMENT false
#define INITIAL_ELEMENT true
#define BY_START false
#define BY_GLOBALVAL true
#define SetDefaultColor() SetColor(COLOR_DEFAULT)
#define ROMAN_NUMBER_STRING MIN_STRING<<1
#define ROMAN_NUMBER_MAPSTRING 5
#define MIN_PROCESSABLE_ROMAN_NUMBER 1
#define MAX_PROCESSABLE_ROMAN_NUMBER 3000
#define MIN_PASCALTRIANGLE_ROWS 1
#define MAX_PASCALTRIANGLE_ROWS 50
#define EXIT_MESSAGE DEFAULT_EXIT_MESSAGE
#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
// DEFAULT-CUSTOM TYPES TYPEDEFS
typedef long long int64_t;
typedef unsigned long long uint64_t;
//
typedef unsigned char sel_typ; // DEFINING SELECTION TYPE
typedef unsigned short fsel_typ; // DEFINING FORMATTABLE SELECTION TYPE
typedef sel_typ bool;
#define COMPARE_STRING_FACTOR MAX_STRING
//
#if (MAX_RIGHE > 0 && MAX_COLONNE > 0)
#if (MAX_RIGHE < COMPARE_STRING_FACTOR && MAX_COLONNE < COMPARE_STRING_FACTOR)
typedef fsel_typ dim_typ;
#else
typedef unsigned dim_typ;
#endif
#else
#error Invalid definition of MAX_RIGHE or MAX_COLONNE.
#endif
//
typedef tipo_predefinito ityp;
// #include "ExprEval/expreval.h"
#define EXPREVAL_TMPL "./ExprEval/exprtmpl.html" /// "http://expreval.sourceforge.net/exprtmpl.html"
// INCLUDING EXPREVAL STUFFS BY DIRECTLY
/* Define type of data to use */
// typedef double EXPRTYPE;
typedef ityp EXPRTYPE;
/* Defines for various things */
/* Max id size */
#define EXPR_MAXIDENTSIZE 255
/* Error values */
enum
{
EXPR_ERROR_UNKNOWN = -1, /* Unknown error */
EXPR_ERROR_NOERROR = 0, /* No Error */
EXPR_ERROR_MEMORY, /* Memory allocation failed */
EXPR_ERROR_NULLPOINTER, /* Null pointer passed to function */
EXPR_ERROR_NOTFOUND, /* Item not found in a list */
EXPR_ERROR_UNMATCHEDCOMMENT, /* Unmatched comment tags */
EXPR_ERROR_INVALIDCHAR, /* Invalid characters in expression */
EXPR_ERROR_ALREADYEXISTS, /* An item already called create */
EXPR_ERROR_ALREADYPARSEDBAD, /* Expression parsed already, but unsuccessfully. call free or clear */
EXPR_ERROR_ALREADYPARSEDGOOD, /* Expression parsed already, successfully, call free or clear */
EXPR_ERROR_EMPTYEXPR, /* Empty expression string passed to parse */
EXPR_ERROR_UNMATCHEDPAREN, /* Unmatched parenthesis */
EXPR_ERROR_SYNTAX, /* Syntax error in expression */
EXPR_ERROR_MISSINGSEMICOLON, /* Missing semicolon at end of expression */
EXPR_ERROR_BADIDENTIFIER, /* Identifier was to big or not formed right */
EXPR_ERROR_NOSUCHFUNCTION, /* Function does not exist in function list */
EXPR_ERROR_BADNUMBERARGUMENTS, /* Bad number of arguments in a function call */
EXPR_ERROR_BADEXPR, /* This is a bad expression to evaluate. It has not been parsed or has unsuccessfully */
EXPR_ERROR_UNABLETOASSIGN, /* Unable to do an assignment, maybe no variable list */
EXPR_ERROR_DIVBYZERO, /* Attempted a division by zero */
EXPR_ERROR_NOVARLIST, /* No variable list found but one is needed */
EXPR_ERROR_BREAK, /* Expression was broken by break function */
EXPR_ERROR_CONSTANTASSIGN, /* Assignment to a constant */
EXPR_ERROR_REFCONSTANT, /* Constant used as a reference parameter */
EXPR_ERROR_OUTOFRANGE, /* A bad value was passed to a function */
EXPR_ERROR_USER /* Custom errors should be larger than this */
};
/* Macros */
/* Forward declarations */
typedef struct _exprNode exprNode;
typedef struct _exprFuncList exprFuncList;
typedef struct _exprValList exprValList;
typedef struct _exprObj exprObj;
/* Function types */
typedef int (*exprFuncType)(exprObj *obj, exprNode *nodes, int nodecount, EXPRTYPE **refs, int refcount, EXPRTYPE *val);
typedef int (*exprBreakFuncType)(exprObj *obj);
/* Functions */
/* Version information function */
void exprGetVersion(int *major, int *minor);
/* Functions for function lists */
int exprFuncListCreate(exprFuncList **flist);
int exprFuncListAdd(exprFuncList *flist, char *name, exprFuncType ptr, int min, int max, int refmin, int refmax);
int exprFuncListFree(exprFuncList *flist);
int exprFuncListClear(exprFuncList *flist);
int exprFuncListInit(exprFuncList *flist);
/* Functions for value lists */
int exprValListCreate(exprValList **vlist);
int exprValListAdd(exprValList *vlist, char *name, EXPRTYPE val);
int exprValListSet(exprValList *vlist, char *name, EXPRTYPE val);
int exprValListGet(exprValList *vlist, char *name, EXPRTYPE *val);
int exprValListAddAddress(exprValList *vlist, char *name, EXPRTYPE *addr);
int exprValListGetAddress(exprValList *vlist, char *name, EXPRTYPE **addr);
void *exprValListGetNext(exprValList *vlist, char **name, EXPRTYPE *value, EXPRTYPE** addr, void *cookie);
int exprValListFree(exprValList *vlist);
int exprValListClear(exprValList *vlist);
int exprValListInit(exprValList *vlist);
/* Functions for expression objects */
int exprCreate(exprObj **obj, exprFuncList *flist, exprValList *vlist, exprValList *clist,
exprBreakFuncType breaker, void *userdata);
int exprFree(exprObj *obj);
int exprClear(exprObj *obj);
int exprParse(exprObj *obj, char *expr);
int exprEval(exprObj *obj, EXPRTYPE *val);
int exprEvalNode(exprObj *obj, exprNode *nodes, int curnode, EXPRTYPE *val);
exprFuncList *exprGetFuncList(exprObj *obj);
exprValList *exprGetVarList(exprObj *obj);
exprValList *exprGetConstList(exprObj *obj);
exprBreakFuncType exprGetBreakFunc(exprObj *obj);
int exprGetBreakResult(exprObj *obj);
void* exprGetUserData(exprObj *obj);
void exprSetUserData(exprObj *obj, void *userdata);
void exprSetBreakCount(exprObj *obj, int count);
void exprGetErrorPosition(exprObj *obj, int *start, int *end);
/* Other useful routines */
int exprValidIdent(char *name);
//
// Removed because It caused overhead in Stirling's function
// (There is another sqrt function which is assumed to be multiplied in the Formula
// #define STIRLING_CONSTANT sqrt(2*M_PI)
#define MAX_MEMOIZABLE_INDEX 100
#define MAX_FIBONACCI_MEMOIZABLE_INDEX DEFAULT_MAX_FIBONACCI_MEMOIZABLE_INDEX
#define MAX_FATTORIALE_MEMOIZABLE_INDEX DEFAULT_MAX_FATTORIALE_MEMOIZABLE_INDEX
#define MAX_EVEN_SFATTORIALE_MEMOIZABLE_INDEX DEFAULT_MAX_EVEN_SFATTORIALE_MEMOIZABLE_INDEX
#define MAX_ODD_SFATTORIALE_MEMOIZABLE_INDEX DEFAULT_MAX_ODD_SFATTORIALE_MEMOIZABLE_INDEX
#if (MAX_FIBONACCI_MEMOIZABLE_INDEX > MAX_MEMOIZABLE_INDEX || MAX_FATTORIALE_MEMOIZABLE_INDEX > MAX_MEMOIZABLE_INDEX || MAX_FPNUM_MEMOIZABLE_INDEX > MAX_MEMOIZABLE_INDEX)
#error Invalid definition of one of MAX FUNCTIONS MEMOIZABLE INDICES.
#endif // MAX_FIBONACCI_MEMOIZABLE_INDEX
#define MIN_STIRLING_NUMBER DEFAULT_MIN_STIRLING_NUMBER
#define INPUT false
#define OUTPUT true
#define OVERFLOW_ERROR "\nINFO: An OVERFLOW ERROR might have occurred during (%hu,%hu) Elaborating Matrix Element...\n"
#define CALLOC_MODE false
#define MALLOC_MODE true
enum
{
FIRST_MATRIX = 0,
SECOND_MATRIX,
THIRD_MATRIX
};
#define MATRIX_PRODUCT THIRD_MATRIX
#define LAST_MATRIX_ENUM THIRD_MATRIX
#define MAX_MATRICES LAST_MATRIX_ENUM+1
/// #define BLOCK_SIZE 41
#define MIN_BLOCKSIZE 1
#define _BLOCK_SIZE DEFAULT_BLOCKSIZE
#define MIN_OSMM_DIM DEFAULT_MINOSMMDIM
#define MIN_STRASSEN_DIM DEFAULT_MINSTRASSENDIM
#define STARTING_MINOSMMDIM MIN_OSMM_DIM + MAX_DIMENSIONS
#define STARTING_MINSTRASSENDIM MIN_STRASSEN_DIM
#define NORMAL_MODE false
#define NOP_MODE true
#ifndef WINOS
#define min(a,b) (((a)<(b))?(a):(b))
#endif
//
#define insertMatrix(x,y,z,k) enterMatrix(&x,&y,&z,k,true)
#define matrixFree(x) _matrixFree(x,NORMAL_MODE)
/// #define matrixAlloc(x,y) _matrixAlloc(x,(dim_typ2)y,MALLOC_MODE)
//
// FORMAT MACROS
//
// COLOR Enumerations
enum
{
COLOR_BLACK = 0,
COLOR_BLUE,
COLOR_GREEN,
COLOR_AZURE,
COLOR_DARKRED,
COLOR_PURPLE,
COLOR_YELLOW,
COLOR_WHITE,
COLOR_GREY,
COLOR_SMARTBLUE,
COLOR_LUMGREEN,
COLOR_CRYSTAL,
COLOR_SMARTRED,
COLOR_SMARTPURPLE,
COLOR_SMARTYELLOW,
COLOR_WHITEPLUS
};
#define COLOR_SMARTWHITE 39
#define COLOR_LIGHTBLUE 43
#ifdef WINOS
#define _COLOR_ERROR 60 // COLOR_SMARTRED
#define _COLOR_CREDITS 57 // COLOR_LIGHTBLUE // COLOR_CRYSTAL // COLOR_SMARTBLUE
#define _COLOR_USER 58 // COLOR_LUMGREEN
#define _COLOR_SYSTEM 60 // COLOR_SMARTYELLOW
#define _COLOR_AUTHOR 54 // COLOR_SMARTPURPLE
#define MAX_COLORS 64
#else
#define _COLOR_ERROR 60 // COLOR_SMARTRED
#define _COLOR_CREDITS 57 // COLOR_LIGHTBLUE // COLOR_CRYSTAL // COLOR_SMARTBLUE
#define _COLOR_USER 58 // COLOR_LUMGREEN
#define _COLOR_SYSTEM 59 // COLOR_SMARTYELLOW
#define _COLOR_AUTHOR 60 // COLOR_SMARTPURPLE
#define LAST_COLOR COLOR_WHITEPLUS
#define MAX_COLORS LAST_COLOR+1
#endif
enum
{
MEMBER_DEFAULTCOLOR = 0,
MEMBER_COLORERROR,
MEMBER_COLORCREDITS,
MEMBER_COLORUSER,
MEMBER_COLORSYSTEM,
MEMBER_COLORAUTHOR
};
#define INIT_COLOR COLOR_WHITE
#define LAST_MEMBER_COLOR MEMBER_COLORAUTHOR
#define MAX_COLOR_TYPES LAST_MEMBER_COLOR+1
#define COLORS_PATH DEFAULT_COLORS_PATH
#define COLOR_DEFAULT access(colors)[MEMBER_DEFAULTCOLOR]
#define COLOR_ERROR access(colors)[MEMBER_COLORERROR]
#define COLOR_CREDITS access(colors)[MEMBER_COLORCREDITS]
#define COLOR_USER access(colors)[MEMBER_COLORUSER]
#define COLOR_SYSTEM access(colors)[MEMBER_COLORSYSTEM]
#define COLOR_AUTHOR access(colors)[MEMBER_COLORAUTHOR]
#define _sprint(x,y) \
{ \
va_list ap; \
va_start(ap,x); \
char str[MAX_BUFSIZ+INFO_STRING]; \
const bool cond = access(sysLog) != INIT_LOGOBJ; \
SetColor(y); \
vsprintf(str, x, ap); \
prependTimeToString(str, cond); \
printf(str); \
SetDefaultColor(); \
if(cond) \
logCheck(access(sysLog), str, access(sysLogPath)); \
va_end(ap); \
} \
#define PRINTSPACE() printf(" ");
#define PRINTT() printf("\t");
#define PRINTL() printf("\n________________________________________________________________________________\n\n") // enhanced formatting
#define PRINTN() printf("\n");
#define PRINT2N() printf("\n\n");
#define PRINT5N() printf("\n\n\n\n\n");
#define PRINT10N() printf("\n\n\n\n\n\n\n\n\n\n");
#define SHOWPAUSEMESSAGE() PRINTL(), printf2(COLOR_SYSTEM, "Press CTRL + C to stop Program Action.\n\n");
#define PRINTHOWTOBACKMESSAGE() printf2(COLOR_SYSTEM, "Press ENTER to exit SubProgram.\n\n");
#define __pmode__ access(mode) // MACRO PROGRAM MODE
#define DISABLED false
#define ENABLED true
#define BY_NUMBERS false
#define BY_CHARS true
#define EXIT_CMD "exit"
#define _MSS_CMD DEFAULT_SCRIPTFILES_EXTENSION"_init"
#define MSS_CMD DEFAULT_SCRIPTFILES_EXTENSION"_exit"
#define INITIALIZING_RANDOM_SEED 0 // Invalid value for Random Seed.
// Used just to initializate the program random seed value.
#define DEFAULT_RANDOM_SEED (unsigned)time(NULL)
tipo_random_seed starting_random_seed;
#define MIN_RANDOMSEED 1
#define MAX_RANDOMSEED RAND_MAX
#define MIN_STABFACT 1
#define MAX_STABFACT DEFAULT_MAX_STABFACT // 20
enum
{
ALGEBRA_REALNUMBERS,
ALGEBRA_COMPLEXNUMBERS,
ALGEBRA_QUATERNIONS,
ALGEBRA_OCTONIONS,
ALGEBRA_SEDENIONS
};
#define LAST_ALGEBRA ALGEBRA_SEDENIONS
#define MIN_ALGEBRA ALGEBRA_REALNUMBERS
#define MAX_ALGEBRA LAST_ALGEBRA
#define _MAX_ALGEBRA MAX_ALGEBRA+1
#define REAL_UNIT_NAME NULL_CHAR // "real"
#define _cabs(a) ___cabs(a, ALGEBRA_COMPLEXNUMBERS)
#define _qabs(a) ___cabs(a, ALGEBRA_QUATERNIONS)
#define _oabs(a) ___cabs(a, ALGEBRA_OCTONIONS)
#define _sabs(a) ___cabs(a, ALGEBRA_SEDENIONS)
#define MIN_MEMOIZABLE_INDEX 5
#define STABILIZER_FACTOR access(curLayout)->stabilizer_factor
// DEFINIZIONE MACRO SOTTO-PROGRAMMI
//
// Valore di inizializzazione del metadato modalità
// della variabile strutturata suite, definita più sotto
#define PROGRAM_BUSY -1
// o più semplicemente indica che l'utente è in fase di scelta del subprogram.
// Enumerazione ID Sotto-Programmi
// per ogni Famiglia
//
// MAIN PROGRAMS ENUMERATIONS
enum
{
MAIN_BCALCULATOR = 0,
MAIN_ADVANCEDCALCULATOR,
MAIN_ALGEBRAOPERATIONS,
#ifdef ALLOW_MSSMANAGER
MAIN_MSSMANAGER,
#endif // ALLOW_MSSMANAGER
MAIN_CHANGESETTINGS
};
// MACRO PROGRAMMI
// Immettere la macro dell'ultimo programma definito
#define LAST_PROGRAM MAIN_CHANGESETTINGS // Cambiare ogni qualvola si aggiunge
// un sottoprogramma alla relativa enumerazione
//
#define MAX_PROGRAMMI LAST_PROGRAM+1
// ADVANCED CALCULATOR MACRO AND ENUMERATIONS
//
enum
{
MSSMANAGER_COMMANDLINE = 0,
MSSMANAGER_EXECSCRIPTFILES,
MSSMANAGER_SHOWUSAGES,
};
#define MAX_ARGS 5
#define LAST_MSSMANAGER_PROG MSSMANAGER_SHOWUSAGES
#define MAX_MSSMANAGER_PROGS LAST_MSSMANAGER_PROG+1
enum
{
ADVCALC_SECONDGRADEEQUATIONSOLVER = 0,
ADVCALC_COMPLEXNUMBERSSUM,
ADVCALC_COMPLEXNUMBERSPROD,
ADVCALC_POLYNOMEVALUATOR,
ADVCALC_POLYNOMDEVALUATOR,
ADVCALC_SIMPLEXMETHOD,
ADVCALC_ROUTHTABLE,
ADVCALC_JURYTABLE,
ADVCALC_NEWTONDIFFTABLES,
ADVCALC_LAGRANGEINTERPOLATION,
ADVCALC_FUNCTIONINTEGRATION,
ADVCALC_STRAIGHTLINEFITTING,
ADVCALC_PARABOLICCURVEFITTING,
ADVCALC_LINEARSYSTEMSSOLVER
};
#define LAST_ADVCALC_PROG ADVCALC_LINEARSYSTEMSSOLVER
#define MAX_ADVCALC_PROGS LAST_ADVCALC_PROG+1
// LINEAR ALGEBRA MACRO AND ENUMERATIONS
//
enum
{
#ifdef ALLOW_MATMANAGER
ALGOPS_MATRICESMANAGER = 0,
#endif
ALGOPS_MATRIXSORT,
ALGOPS_MATRIXEIGVALUES,
ALGOPS_NORMCALCULATOR,
ALGOPS_DETERMINANTCALCULATOR,
ALGOPS_TRACECALCULATOR,
ALGOPS_RANKCALCULATOR,
ALGOPS_MATRIXSVD,
ALGOPS_INVERSEMATRIX,
ALGOPS_MATRIXCOFACTOR,
ALGOPS_MATRIXADJOINT,
ALGOPS_MATRIXTRANSPOSE,
ALGOPS_MATRIXADD,
ALGOPS_TENSORSSUM,
ALGOPS_MATRIXMULTIPLICATION,
ALGOPS_KRONPRODUCT,
ALGOPS_MATRIXPOWER,
ALGOPS_MATRIXKPOWER,
ALGOPS_MATRIXPERVECTOR,
ALGOPS_DOTPRODUCT,
ALGOPS_PERSCALARMULTIPLICATION,
ALGOPS_SCALARDIVISIONMATRIX,
ALGOPS_ILLCONDITIONCHECKING,
ALGOPS_MATRIXLUFACTORIZATION
};
#define LAST_ALGEBRA_PROGRAM ALGOPS_MATRIXLUFACTORIZATION
#define MAX_ALGEBRA_OPERATIONS LAST_ALGEBRA_PROGRAM+1
//DEFINING ENUMERATIONS OF MAIN_CHANGESETTINGS SUBPROGRAM
/*
IMPORTANTE!!! Lasciare sempre per ultimo l'enumerazione
SETTINGS_SETDEFAULTS, violando tale regola si potrebbe interferire
con il sistema pre-compiling di freezing di alcune impostazioni
dal settings.xml
*/
//
enum
{
#ifdef ALLOW_VARLISTMANAGER
SETTINGS_ENVSMANAGER,
#endif
#ifdef ALLOW_LOGSMANAGER
SETTINGS_LOGSMANAGER,
#endif
#ifdef ALLOW_SYSLOGMANAGER
SETTINGS_SYSLOGMANAGER,
#endif
#ifdef ALLOW_LAYOUTSMANAGER
SETTINGS_LAYOUTSMANAGER,
#endif
#ifdef ALLOW_COLSMANAGER
SETTINGS_COLORSMANAGER,
#endif
#ifdef ALLOW_LFSMANAGER
SETTINGS_LFSMANAGER,
#endif // ALLOW_LFSMANAGER
#ifdef ALLOW_PRECEDIT
SETTINGS_CHANGEPRECISION,
#endif
#ifdef ALLOW_STABFACTEDIT
SETTINGS_CHANGESTABILIZERFACTOR,
#endif
#ifdef ALLOW_BLOCKSIZEEDIT
SETTINGS_CHANGEBLOCKSIZE,
#endif
#ifdef ALLOW_MINOSMMDIMEDIT
SETTINGS_CHANGEMINOSMMDIM,
#endif
#ifdef ALLOW_MINSTRASSENDIMEDIT
SETTINGS_CHANGEMINSTRASSENDIM,
#endif
#ifdef ALLOW_MINSRNUMBEREDIT
SETTINGS_CHANGEMINSRNUMBER,
#endif
#ifdef ALLOW_ALGEBRAEDIT
SETTINGS_CHANGEALGEBRA,
#endif
#ifdef ALLOW_OUTLIERCONSTEDIT
SETTINGS_CHANGEOUTLIERCONST,
#endif
#ifdef ALLOW_EXITCHAREDIT
SETTINGS_CHANGEEXITCHAR,
#endif
#ifdef ALLOW_RANDOMSEEDEDIT
SETTINGS_CHANGERANDOMSEED,
#endif
#ifdef ALLOW_BOOLVARSEDIT
SETTINGS_CHANGEBOOLVALUES,
#endif
#ifdef ALLOW_MMIEDIT
SETTINGS_CHANGEMAXMEMOIZABLEINDICES,
SETTINGS_EMPTYMEMOIZERSBUFFERS,
#endif
#ifdef ALLOW_BUFFERSEDIT
SETTINGS_EMPTYBUFFERS,
#endif
#ifdef ALLOW_SETDEFAULTS
SETTINGS_SETDEFAULTS
#endif
};
#define LAST_SETTINGS_PROGRAM SETTINGS_SETDEFAULTS
#define MAX_SETTINGS LAST_SETTINGS_PROGRAM+1
enum
{
BOOLS_SHOWDESCRIPTION = 0,
BOOLS_AUTOSETCURITEM,
BOOLS_ITEMSSELECTBYPATH,
BOOLS_ITEMSAUTOSAVING,
#ifdef WINOS
BOOLS_SYSLOGSECURITYCHECK,
#endif
BOOLS_SYSTEMPARSING,
BOOLS_ADVCALCPARSING,
BOOLS_MATRIXPARSING,
BOOLS_RESETLISTS,
BOOLS_SAVERESULTS,
BOOLS_SHOWVARLIST,
BOOLS_SHOWDIFFTIME,
BOOLS_SHOWDIFFTIMEADVCALC,
BOOLS_SHOWDIFFTIMEALGOPS,
BOOLS_SHOWEXECTIME,
BOOLS_PRINTTIME,
BOOLS_PRINTROWSLABELS,
BOOLS_DOMAINCHECK,
BOOLS_CHARINSERT,
BOOLS_INSERTMODE,
BOOLS_LAZYEXECUTION,
BOOLS_INVERSEOPERATIONS,
BOOLS_AUTOTURNBACK,
BOOLS_DEGREESENTERING,
BOOLS_PROGREPEATCHECK,
BOOLS_STRASSENOPTIMIZATION
};
#define BITMASK_SHOWDESCRIPTION 1
#define BITMASK_AUTOSETCURITEM 2
#define BITMASK_ITEMSSELECTBYPATH 4
#define BITMASK_ITEMSAUTOSAVING 8
#ifdef WINOS
#define BITMASK_SYSLOGSECURITYCHECK 16
#define BITMASK_SYSTEMPARSING 32
#define BITMASK_ADVCALCPARSING 64
#define BITMASK_MATRIXPARSING 128
#define BITMASK_RESETLISTS 256
#define BITMASK_SAVERESULTS 512
#define BITMASK_SHOWVARLIST 1024
#define BITMASK_SHOWDIFFTIME 2048
#define BITMASK_SHOWDIFFTIMEADVCALC 4096
#define BITMASK_SHOWDIFFTIMEALGOPS 8192
#define BITMASK_SHOWEXECTIME 16384
#define BITMASK_PRINTTIME 32768
#define BITMASK_PRINTROWSLABELS 65536
#define BITMASK_DOMAINCHECK 131072
#define BITMASK_CHARINSERT 262144
#define BITMASK_INSERTMODE 524288
#define BITMASK_LAZYEXECUTION 1048576
#define BITMASK_INVERSEOPERATIONS 2097152
#define BITMASK_AUTOTURNBACK 4194304
#define BITMASK_DEGREESENTERING 8388608
#define BITMASK_PROGREPEATCHECK 16777216
#define BITMASK_STRASSENOPTIMIZATION 33554432
#else
#define BITMASK_SYSTEMPARSING 16
#define BITMASK_ADVCALCPARSING 32
#define BITMASK_MATRIXPARSING 64
#define BITMASK_RESETLISTS 128
#define BITMASK_SAVERESULTS 256
#define BITMASK_SHOWVARLIST 512
#define BITMASK_SHOWDIFFTIME 1024
#define BITMASK_SHOWDIFFTIMEADVCALC 2048
#define BITMASK_SHOWDIFFTIMEALGOPS 4096
#define BITMASK_SHOWEXECTIME 8192
#define BITMASK_PRINTTIME 16384
#define BITMASK_PRINTROWSLABELS 32768
#define BITMASK_DOMAINCHECK 65536
#define BITMASK_CHARINSERT 131072
#define BITMASK_INSERTMODE 262144
#define BITMASK_LAZYEXECUTION 524288
#define BITMASK_INVERSEOPERATIONS 1048576
#define BITMASK_AUTOTURNBACK 2097152
#define BITMASK_DEGREESENTERING 4194304
#define BITMASK_PROGREPEATCHECK 8388608
#define BITMASK_STRASSENOPTIMIZATION 16777216
#endif
#define LAST_BOOL_SETTING BOOLS_STRASSENOPTIMIZATION
#define MAX_BOOL_SETTINGS LAST_BOOL_SETTING+1
#define BITMASK_BITFIELD LAST_BOOL_SETTING // MAX_BOOL_SETTINGS
#define isSett(x) ((access(curLayout)->bools & suite_c.bools[x].bmask) == suite_c.bools[x].bmask)
#define isnSett(x) (!(access(curLayout)->bools & suite_c.bools[x].bmask))
// ENVS MANAGER ENUMERATIONS
enum
{
ENVS_SETCURRENT = 0,
ENVS_OPEN,
ENVS_CREATE, //!C
ENVS_READ, //!R
ENVS_PRINT, //!R
ENVS_UPDATE, //!U
ENVS_UPDATEALL, //!U
ENVS_SAVE, //!U
ENVS_DELETE, //!D
ENVS_DELETEPHYSICAL, //!D
ENVS_DELETEALL, //!D
ENVS_DELETEALLPHYSICALS, //!D
ENVS_RELOAD, //!D
ENVS_SYNC,
ENVS_RENAME
};
#define LAST_ENVSMANAGER_PROG ENVS_RENAME
#define MAX_ENVSMANAGER_PROGS LAST_ENVSMANAGER_PROG+1
enum
{
MATRICES_SETCURRENT = 0,
MATRICES_OPEN,
MATRICES_CREATE, //!C
MATRICES_READ, //!R
MATRICES_PRINT, //!R
MATRICES_UPDATE, //!U
MATRICES_UPDATEALL, //!U
MATRICES_SAVE, //!U
MATRICES_DELETE, //!D
MATRICES_DELETEPHYSICAL, //!D
MATRICES_DELETEALL, //!D
MATRICES_DELETEALLPHYSICALS, //!D
MATRICES_EDIT, //!U
MATRICES_RENAME, //!U
};
#define LAST_MATMANAGER_PROG MATRICES_RENAME
#define MAX_MATMANAGER_PROGS LAST_MATMANAGER_PROG+1
enum
{
LOGS_SETCURRENT = 0,
LOGS_OPEN, //!C
LOGS_CREATE, //!C
LOGS_READ, //!R
LOGS_PRINT, //!R
LOGS_UPDATE, //!U
LOGS_UPDATEALL, //!U
LOGS_SAVE, //!U
LOGS_DELETE, //!D
LOGS_DELETEPHYSICAL, //!D
LOGS_DELETEALL, //!D
LOGS_DELETEALLPHYSICALS, //!D
LOGS_RELOAD, //!D
LOGS_EDIT, //!U
LOGS_SETBUFLEN, //!U
LOGS_EMPTYBUFFER, //!U
LOGS_RENAME //!U
};
#define LAST_LOGSMANAGER_PROG LOGS_RENAME
#define MAX_LOGSMANAGER_PROGS LAST_LOGSMANAGER_PROG+1
enum
{
SYSLOG_OPEN = 0, //!C
SYSLOG_CREATE, //!C
SYSLOG_READ, //!R
SYSLOG_PRINT, //!R
SYSLOG_EDIT, //!U
SYSLOG_UPDATE, //!U
SYSLOG_SAVE, //!U
SYSLOG_RELOAD, //!D
SYSLOG_SETBUFLEN, //!U
SYSLOG_EMPTYBUFFER, //!U
SYSLOG_RENAME //!U
};
#define LAST_SYSLOGMANAGER_PROG SYSLOG_RENAME
#define MAX_SYSLOGMANAGER_PROGS LAST_SYSLOGMANAGER_PROG+1
enum
{
LAYOUTS_SETCURRENT = 0,
LAYOUTS_OPEN,
LAYOUTS_CREATE, //!C
LAYOUTS_READ, //!R
LAYOUTS_PRINT, //!R
LAYOUTS_UPDATE, //!U
LAYOUTS_UPDATEALL, //!U
LAYOUTS_SAVE, //!U
LAYOUTS_DELETE, //!D
LAYOUTS_DELETEPHYSICAL, //!D
LAYOUTS_DELETEALL, //!D
LAYOUTS_DELETEALLPHYSICALS, //!D
LAYOUTS_RELOAD, //!D
LAYOUTS_RENAME
};
#define LAST_LAYOUTSMANAGER_PROG LAYOUTS_RENAME
#define MAX_LAYOUTSMANAGER_PROGS LAST_LAYOUTSMANAGER_PROG+1
enum
{
COLORS_CHANGE = 0,
COLORS_FILESLOADER,
COLORS_BACKUPFILES
};
#define LAST_COLSMANAGER_PROG COLORS_BACKUPFILES
#define MAX_COLSMANAGER_PROGS LAST_COLSMANAGER_PROG+1
enum
{
LFS_LOADER = 0,
LFS_CREATE
};
#define LAST_LFSMANAGER_PROG LFS_CREATE
#define MAX_LFSMANAGER_PROGS LAST_LFSMANAGER_PROG+1
#define MAX_CASEINSENSITIVE_CHARS_ALPHABET 26
#define _MAX_OMNIPRESENT_ELEMENTS 3
#define MAX_OMNIPRESENT_ELEMENTS _MAX_OMNIPRESENT_ELEMENTS-1
// Macro per alcune variabili booleane del programma
#define dcheck isSett(BOOLS_DOMAINCHECK)
#define char_insert isSett(BOOLS_CHARINSERT)
#define lazy_exec isSett(BOOLS_LAZYEXECUTION)
#define PARSING_SYSTEM_ALLOWED isSett(BOOLS_SYSTEMPARSING)
#define PROGRAM_INFORMATIONS MAX_PROGRAMMI
#define EXIT_FROM_PROGRAM MAX_PROGRAMMI+1
// VALORE DI INIZIALIZZAZIONE CARATTERE DI USCITA DAL PROGRAMMA
#define INITIALIZING_EXIT_CHAR '£'
#define INITIALIZING_DEFAULT_COLOR COLOR_WHITE
#define MAIN_COLOR DEFAULT_COLOR
#define COMPAREDOUBLE_PRECISION 0.001
enum
{
FID_SIN = 0,
FID_COS,
FID_SINH,
FID_COSH,
FID_SEC,
FID_SECH,
FID_CSC,
FID_CSCH,
FID_ASIN,
FID_ASINH,
FID_ACOS,
FID_ACOSH,
FID_ASEC,
FID_ASECH,
FID_ACSC,
FID_ACSCH,
FID_TAN,
FID_TANH,
FID_ATAN,
FID_ATANH,
FID_COT,
FID_COTH,
FID_ACOT,
FID_ACOTH,
FID_HSIN,
FID_HSINH,
FID_QSIN,
FID_QSINH,
FID_HCOS,
FID_HCOSH,
FID_QCOS,
FID_QCOSH,
FID_HSEC,
FID_HSECH,
FID_QSEC,
FID_QSECH,
FID_HCSC,
FID_HCSCH,
FID_QCSC,
FID_QCSCH,
FID_HTAN,
FID_HTANH,
FID_QTAN,
FID_QTANH,
FID_HCOT,
FID_HCOTH,
FID_QCOT,
FID_QCOTH,
FID_VSIN,
FID_VSINH,
FID_CVSIN,
FID_CVSINH,
FID_VCOS,
FID_VCOSH,
FID_CVCOS,
FID_CVCOSH,
FID_HVSIN,
FID_HVSINH,
FID_HCVSIN,
FID_HCVSINH,
FID_QVSIN,
FID_QVSINH,
FID_QCVSIN,
FID_QCVSINH,
FID_HVCOS,
FID_HVCOSH,
FID_HCVCOS,
FID_HCVCOSH,
FID_QVCOS,
FID_QVCOSH,
FID_QCVCOS,
FID_QCVCOSH,
FID_ESEC,
FID_ESECH,
FID_ECSC,
FID_ECSCH,
FID_HESEC,
FID_HESECH,
FID_HECSC,
FID_HECSCH,
FID_QESEC,
FID_QESECH,
FID_QECSC,
FID_QECSCH,
FID_SINC,
FID_SINCH,
FID_HSINC,
FID_HSINCH,
FID_QSINC,
FID_QSINCH,
FID_COSC,
FID_COSCH,
FID_HCOSC,
FID_HCOSCH,
FID_QCOSC,
FID_QCOSCH,
FID_SECC,
FID_SECCH,
FID_HSECC,
FID_HSECCH,
FID_QSECC,
FID_QSECCH,
FID_CSCC,
FID_CSCCH,
FID_HCSCC,
FID_HCSCCH,
FID_QCSCC,
FID_QCSCCH,
FID_TANC,
FID_TANCH,
FID_HTANC,
FID_HTANCH,
FID_QTANC,
FID_QTANCH,
FID_COTC,
FID_COTCH,
FID_HCOTC,
FID_HCOTCH,
FID_QCOTC,
FID_QCOTCH,
FID_LOG,
FID_LOG10,
FID_LOG2,
FID_LOGC,
FID_LOG10C,
FID_LOG2C,
FID_LOG1P,
FID_LOG1PC,
FID_EXP,
FID_EXPC,
FID_EXP10,
FID_EXP10C,
FID_EXP2,
FID_EXP2C,
FID_ASUM,
FID_FIBO,
FID_FACT,
FID_SFACT,
FID_NPNUM,
FID_PRIMR,
FID_FPNSUM,
FID_FIBNC,
FID_FSUM,
FID_FASUM,
FID_SFASUM,
FID_FNNSUM,
FID_FLOOR,
FID_CEIL,
FID_DEG,
FID_RAD
};
#define LAST_FID FID_RAD
#define MAX_FIDS LAST_FID+1
// MACRO PER FAR VEDERE O MENO LA DESCRIZIONE
// NELLE VARIE FUNZIONI DI FORMATTAZIONE INFORMAZIONI
// RELATIVE AL PROGRAMMA.
#define WITH_DESCRIPTION true
#define WITHOUT_DESCRIPTION false
// DEFINING MAX_TYPES
// and DOMAIN_NULL MACROS
// in order to identify
// the operations relative domains.
// #define MAX_TYPES 15
// #define DOMAIN_NULL MAX_TYPES+1
// DEFINING binary_function
// or unary_function operations INVERSE_OPSs
#define unary_function false
#define binary_function true
// basicCalculator() GENERIC STUFFS...
#define BCALC_CAMBIAMENTODIBASE_MINBASE 2
#define BCALC_CAMBIAMENTODIBASE_MAXBASE 10
#define MAX_MINBASE_CONVERTIBLE_NUM 262000
// #define MAX_TYPES 14
// #define DOMAIN_NULL MAX_TYPES+1
#define LOWER_TRIANGULAR 0
#define UPPER_TRIANGULAR 1
enum
{
SIMPSON1DIV8_RULE = 0,
SIMPSON3DIV8_RULE,
TRAPEZOIDAL_RULE
};
// DEFINING FAMILIES STRUCTURES MACROS
//
#define BY_USER false
#define AUTOMATIC true
//
// Macro to assert whether a subprogram is Child or Father
#define CHILD false
#define FATHER true
//
// BASIC CHECK FOR DMA (Dynamic Memory Allocation)
#define errMem(pntr, rval) if(checkErrMem(pntr)) return rval;
#define Elements_in(arrayname) (sizeof(arrayname)/sizeof(arrayname *))
// The macro upwriten is useless because when using dynamic mallocation,
// size_t sizes indexing of matrix are lost.
/*
Dedicati alla modalità di funzionamento
della funzione matrixToVector, per decidere
in che senso deve essere svolta
0 -> Normale, 1 -> Viceversa
*/
#define MATRIX_TO_VECTOR false
#define VECTOR_TO_MATRIX true
/*
Dedicati alla modalità di stampa della matrice
dell'omonima funzione. Come suggeriscono le
stesse macro, passando 0 si stampa una matrice
di valori in virgola mobile, altrimenti di interi.
*/
enum
{
ROWS = 0,
COLUMNS,
COLUMNS2
};
/*
Dedicati alla modalita' booleana di funzionamento
del sottoprogramma procedurale binaryAlgSum.
BAS_SUM indica una somma, BAS_SUB indica una differenza,
sempre da operare ovviamente tramite operazioni strettamente
associate al tipo int, ovvero normale Somma Algerica
*/
#define BAS_SUM true
#define BAS_SUB false
// #define DIM_BITFIELD (sizeof(dim_typ)-1)*<<3
#define DIM_BITFIELD 8
#define DATE_BITFIELD 5
#define DOMAIN_BITFIELD 4
#define BOOL_BITFIELD 1
#define MIN_NEWTON_DIFFTABLES_DIM 1
#define MAX_NEWTON_DIFFTABLES_DIM 15
// USED TO SHOW BACKWARD && FORWARD
// NEWTON's DIFFERENCE TABLES
#define BACKWARD_DIFFTAB false
#define FORWARD_DIFFTAB true
enum
{
EXITHANDLE_EXIT = 0,
EXITHANDLE_GETCMD,
EXITHANDLE_SETCMD,
EXITHANDLE_BACKCMD,
INVALID_EXITHANDLE
};
// #define INVALID_EXITHANDLE 3
#define PARSER_NOSETTINGS 0
#define PARSER_SHOWRESULT 1
#define PARSER_SHOWVARLIST 2
#define PARSER_SHOWDIFFTIME 4
#define PARSER_SAVERESULT 8
#define LEFT_OPR 0
#define RIGHT_OPR 1
#define MAX_RIGHE_PER_COLONNE (int)(floor(sqrt(access(curLayout)->matrix_max_rows*access(curLayout)->matrix_max_columns))) // DIMENSIONE MASSIMA MATRICI QUADRATE nXn
#define MAX_DIMENSIONS 2
#define MAX_ABSTRACT_DIMENSIONS 3
#define SUMMATION_SUM false
#define SUMMATION_SUB true
#define PRODUCTORY_MUL false
#define PRODUCTORY_DIV true
// used for CURVEs FITTING or INTERPOLATIONS SubPrograms...
//
#define XROW 0
#define YROW 1
//
#define FIRST_NUMBER XROW
#define SECOND_NUMBER YROW
#define FIRST_VECTOR XROW
#define SECOND_VECTOR YROW
#define FIRST_QUARTILE XROW
#define THIRD_QUARTILE YROW
#define FIRST_QUARTILE_CONSTANT 0.25
#define SECOND_QUARTILE_CONSTANT 0.50
#define THIRD_QUARTILE_CONSTANT 0.75
// COMPLEX Numbers MACROS...
//
#define REAL_PART XROW
#define IMAG_PART YROW
//
#define MAX_COMPLEX_UNITS MAX_DIMENSIONS
// IperCOMPLEX Numbers MACROS
//
enum
{
QUATERNIONS_REALPART = 0,
QUATERNIONS_IPART,
QUATERNIONS_JPART,
QUATERNIONS_KPART
};
#define LAST_QUATERNIONS_UNIT QUATERNIONS_KPART
#define MAX_QUATERNIONS_UNITS LAST_QUATERNIONS_UNIT+1
enum
{
OCTONIONS_REALPART = 0,
OCTONIONS_E1PART,
OCTONIONS_E2PART,
OCTONIONS_E3PART,
OCTONIONS_E4PART,
OCTONIONS_E5PART,
OCTONIONS_E6PART,
OCTONIONS_E7PART
};
#define LAST_OCTONIONS_UNIT OCTONIONS_E7PART
#define MAX_OCTONIONS_UNITS LAST_OCTONIONS_UNIT+1
enum
{
SEDENIONS_REALPART = 0,
SEDENIONS_E1PART,
SEDENIONS_E2PART,
SEDENIONS_E3PART,
SEDENIONS_E4PART,
SEDENIONS_E5PART,
SEDENIONS_E6PART,
SEDENIONS_E7PART,
SEDENIONS_E8PART,
SEDENIONS_E9PART,
SEDENIONS_E10PART,
SEDENIONS_E11PART,
SEDENIONS_E12PART,
SEDENIONS_E13PART,
SEDENIONS_E14PART,
SEDENIONS_E15PART
};
#define LAST_SEDENIONS_UNIT SEDENIONS_E15PART
#define MAX_SEDENIONS_UNITS LAST_SEDENIONS_UNIT+1
// SecondGradeEquationSolver() STUFFS...
//
#define ROOT_X1 0
#define ROOT_X2 1
enum
{
COEFF_A = 0,
COEFF_B,
COEFF_C
};
//
// Memoizer System STUFFS...
enum
{
FUNCTION_FIBONACCI = 0,
FUNCTION_FATTORIALE,
FUNCTION_EVEN_SFATTORIALE,
FUNCTION_ODD_SFATTORIALE
};
#define LAST_MEMOIZABLE_FUNCTION FUNCTION_ODD_SFATTORIALE
#define MAX_MEMOIZABLE_FUNCTIONS LAST_MEMOIZABLE_FUNCTION+1
#define _MAX_MEMOIZABLE_FUNCTIONS MAX_MEMOIZABLE_FUNCTIONS+1
#define MAX_STD_BUFFERS MAX_ABSTRACT_DIMENSIONS
#define _MAX_STD_BUFFERS MAX_STD_BUFFERS+1
#define INVALIDRETURNVALUE_NPRIMENUMBER 0.00
#define INVALIDRETURNVALUE_MEMOIZABLEFUNCTIONS -1.00
#define INVALIDRETURNVALUE_FIBONACCI INVALIDRETURNVALUE_MEMOIZABLEFUNCTIONS
#define INVALIDRETURNVALUE_FATTORIALE INVALIDRETURNVALUE_MEMOIZABLEFUNCTIONS
#define INVALIDRETURNVALUE_SFATTORIALE INVALIDRETURNVALUE_MEMOIZABLEFUNCTIONS
#define INVALIDRETURNVALUE_EVEN_SFATTORIALE INVALIDRETURNVALUE_SFATTORIALE
#define INVALIDRETURNVALUE_ODD_SFATTORIALE INVALIDRETURNVALUE_SFATTORIALE
#define INVALIDRETURNVALUE_MEMFUNCS INVALIDRETURNVALUE_MEMOIZABLEFUNCTIONS
// PULIZIA DEL BUFFER
#define CLEARBUFFER() fflush(stdin) // cleanBuffer()
#define TRIGONOMETRIC_DOMAIN(x) (x>=-1&&x<=1)
#define random(x) ((rand()%x)+1)
#define randomize srand(starting_random_seed=DEFAULT_RANDOM_SEED)
#define random2(x,y) randomize,random(y)
#define enhanced_random(x,y) srand((unsigned)x),random(y)
// PROJECT TYPEDEFS
#define MAX_ALIAS DEFAULT_MAX_ALIAS
typedef const dim_typ dim_typ2[MAX_DIMENSIONS];
typedef const dim_typ dim_typ3[MAX_ABSTRACT_DIMENSIONS];
typedef struct
{
const char name[DINFO_STRING];
const char cmdname[SIGN_STRING];
const char usage[INFO_STRING];
void (*program_function)(const sel_typ, char **);
const bool automatic: BOOL_BITFIELD;
const bool isFather: BOOL_BITFIELD;
} sprog;
struct operations
{
char name[DINFO_STRING];
char description[DINFO_STRING];
char identifiers[MAX_ALIAS][MAX_IDENTIFIER_LENGTH];
sel_typ domA: DOMAIN_BITFIELD;
sel_typ domB: DOMAIN_BITFIELD;
bool bin_or_unary: BOOL_BITFIELD;
};
//
#define NEXT_LISTNODE false
#define PREV_LISTNODE true
typedef struct _nodelist
{
char path[MAX_PATH_LENGTH];
void *data; // generic pointer to "data" data.
struct _nodelist * (ref[MAX_DIMENSIONS]);
} nodelist;
typedef struct
{
ityp *matrix;
dim_typ dim[MAX_DIMENSIONS];
} matrixObj;
typedef struct
{
char *buffer;
size_t buflen;
} logObj;
typedef struct
{
dim_typ * memoizer;
dim_typ current_max_index: DIM_BITFIELD;
} memObj;
typedef struct
{
char exit_char;
fsel_typ precision: DIM_BITFIELD;
fsel_typ stabilizer_factor: DIM_BITFIELD;
fsel_typ algebra: DIM_BITFIELD;
float outlier_constant;
dim_typ matrix_max_rows;
dim_typ matrix_max_columns;
dim_typ block_size;
dim_typ min_osmm_dim;
dim_typ min_strassen_dim;
dim_typ max_eigvalues_iterations;
dim_typ max_dsvd_iterations;
dim_typ max_simplex_iterations;
dim_typ max_memoizable_indices[MAX_MEMOIZABLE_FUNCTIONS];
dim_typ min_stirling_number: DIM_BITFIELD;
dim_typ basecalc_minbase: DIM_BITFIELD;
dim_typ basecalc_maxbase: DIM_BITFIELD;
int max_changebase_binary_convnum;
dim_typ min_newton_difftables_dim: DIM_BITFIELD;
dim_typ max_newton_difftables_dim: DIM_BITFIELD;
dim_typ min_roman_number: DIM_BITFIELD;
dim_typ max_roman_number;
dim_typ pascal_triangle_min_rows: DIM_BITFIELD;
dim_typ pascal_triangle_max_rows: DIM_BITFIELD;
unsigned bools: BITMASK_BITFIELD;
} layoutObj;
typedef struct
{
exprValList *var_list;
EXPRTYPE *e_ANS;
EXPRTYPE global_var;
} exprType;
enum
{
ENVS = 0,
MATRICES,
LOGS,
LAYOUTS
};
#define LAST_PROGRAM_ITEMTYPE LAYOUTS
#define MAX_LISTS LAST_PROGRAM_ITEMTYPE+1
// ext_math.C STRUCTS DEFINITIONS
/*
DEFINING MAX_TYPES
and DOMAIN_NULL MACROS
in order to identify
the operations relative domains.
*/
//
enum
{
DOMAIN_BOOL = 0,
DOMAIN_UCHAR,
DOMAIN_SCHAR,
DOMAIN_INT,
DOMAIN_SHRT,
DOMAIN_LONG,
DOMAIN_LLONG,
DOMAIN_UINT,
DOMAIN_USHRT,
DOMAIN_ULONG,
DOMAIN_ULLONG,
DOMAIN_FLT,
DOMAIN_DBL,
DOMAIN_LDBL
};
#define LAST_TYPEDOMAIN DOMAIN_LDBL
#define MAX_TYPES LAST_TYPEDOMAIN+1
#define DOMAIN_NULL MAX_TYPES
//
typedef struct
{
const long double min;
const long double max;
} TypeRange;
struct ext_math_type
{
const char funcnames[MAX_FIDS][MIN_STRING];
ityp (* const functions[MAX_FIDS])(ityp);
const char romn_thousand_map[MAX_ABSTRACT_DIMENSIONS][ROMAN_NUMBER_MAPSTRING];
const char romn_map[MAX_ABSTRACT_DIMENSIONS][9][ROMAN_NUMBER_MAPSTRING];
};
//
struct prog_constants
{
char listsnames[MAX_LISTS][SIGN_STRING];
const char bools_names[MAX_BOOL_SETTINGS][MIN_STRING];
struct
{
const unsigned bmask;
const bool default_val;
} const bools[MAX_BOOL_SETTINGS];
const dim_typ max_memoizable_indices[MAX_MEMOIZABLE_FUNCTIONS];
const char memoizers_names[_MAX_MEMOIZABLE_FUNCTIONS][INFO_STRING];
const char algebra_elements_names[_MAX_ALGEBRA][INFO_STRING];
const char algebra_imaginary_units_names[_MAX_ALGEBRA][MAX_SEDENIONS_UNITS][SIGN_STRING];
const char colors_types_names[MAX_COLOR_TYPES][INFO_STRING];
const char colors_names[MAX_COLORS][INFO_STRING];
};
struct program
{
char sysLogPath[MAX_PATH_LENGTH];
exprType *exprVars;
matrixObj *curMatrix;
matrixObj *lmpMatrix;
logObj *curLog;
logObj *sysLog;
layoutObj *curLayout;
memObj sysMem[MAX_MEMOIZABLE_FUNCTIONS];
struct
{
nodelist * (items_list[MAX_DIMENSIONS]);
dim_typ cur_item: DIM_BITFIELD;
dim_typ itemsno: DIM_BITFIELD;
} lists[MAX_LISTS];
exprFuncList *func_list;
exprValList *const_list;
char colors_path[MAX_PATH_LENGTH];
fsel_typ random_seed;
sel_typ colors[MAX_COLOR_TYPES];
sel_typ mode;
volatile sel_typ exitHandle;
volatile bool mss: BOOL_BITFIELD;
volatile bool sigresult: BOOL_BITFIELD;
};
#ifdef STACKALLOC
#define access(x) suite.x
extern struct program suite;
#else
#define access(x) suite->x
extern struct program * suite;
#endif
#define INVERSE_OPS isSett(BOOLS_INVERSEOPERATIONS)
#define getVarList(fp) getVarListEx(fp, access(lists)[ENVS].cur_item)
#ifdef WINOS
_CRTIMP extern int errno;
#else
extern int errno;
#endif
/// extern struct program suite;
extern sprog main_menu[MAX_PROGRAMMI],
adv_calc[MAX_ADVCALC_PROGS],
alg_operations[MAX_ALGEBRA_OPERATIONS];
#ifdef ALLOW_MSSMANAGER
extern sprog mss_manager[MAX_MSSMANAGER_PROGS];
#endif // ALLOW_MSSMANAGER
#ifndef FREEZE_SETTINGSMANAGER
extern sprog change_settings[MAX_SETTINGS];
#endif
#ifdef ALLOW_VARLISTMANAGER
extern sprog envs_manager[MAX_ENVSMANAGER_PROGS];
#endif
#ifdef ALLOW_MATMANAGER
extern sprog mat_manager[MAX_MATMANAGER_PROGS];
#endif
#ifdef ALLOW_LOGSMANAGER
extern sprog logs_manager[MAX_LOGSMANAGER_PROGS];
#endif
#ifdef ALLOW_SYSLOGMANAGER
extern sprog syslog_manager[MAX_SYSLOGMANAGER_PROGS];
#endif
#ifdef ALLOW_LAYOUTSMANAGER
extern sprog layouts_manager[MAX_LAYOUTSMANAGER_PROGS];
#endif
#ifdef ALLOW_COLSMANAGER
extern sprog cols_manager[MAX_COLSMANAGER_PROGS];
#endif
#ifdef ALLOW_LFSMANAGER
extern sprog lfs_manager[MAX_LFSMANAGER_PROGS];
#endif
extern const struct ext_math_type ext_math;
extern const struct prog_constants suite_c;
/// FUNCTIONS DECLARATIONS
/// geometry.c
__MSUTIL_ void toupper_s(char *);
__MSUTIL_ void tolower_s(char *);
__MSNATIVE_ void strundsc(const char *, char []);
__MSNATIVE_ void strboolize(const char *, char []);
__MSNATIVE_ void strfnm(const char *, char [static MAX_PATH_LENGTH]);
__MSUTIL_ int __export countbits(long);
__MSUTIL_ int __export ucountbits(unsigned long);
__MSUTIL_ char __export *strrev(char *);
__MSUTIL_ char __export *replace(char const * const, char const * const, char const * const);
__MSUTIL_ bool __export __system file_exists(const char *);
__MSNATIVE_ bool __system readFile(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ bool __system printFile(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ bool __system writeFile(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ FILE * __system checkForFHErrors(const char [static MAX_PATH_LENGTH], char [static 1]);
__MSNATIVE_ bool __system frename(const char [static MAX_PATH_LENGTH], const char [static MAX_PATH_LENGTH]);
__MSUTIL_ bool matrixUTConv(ityp *restrict, dim_typ);
__MSNATIVE_ const ityp sarrus(ityp *restrict);
__MSNATIVE_ ityp carlucci(ityp *restrict);
__MSNATIVE_ ityp checkStdMat(ityp *restrict, dim_typ);
__MSNATIVE_ __MSUTIL_ ityp det(ityp *restrict, dim_typ, bool *);
__MSNATIVE_ ityp _matrixTrace(ityp *restrict, dim_typ);
__MSSHELL_WRAPPER_ __MSNATIVE_ bool randomMatrix(ityp *restrict, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void transpose(ityp *restrict, ityp *restrict, const register dim_typ [static MAX_DIMENSIONS]);
__MSUTIL_ bool __export FattLU(dim_typ, ityp *restrict, ityp *restrict, ityp *);
__MSUTIL_ bool __export invertMatrix(ityp *restrict, dim_typ);
__MSUTIL_ bool __export CoFactor(ityp *restrict, ityp *restrict, dim_typ);
__MSUTIL_ bool _MS__private __export adjoint(ityp *restrict, ityp *restrict, dim_typ);
__MSUTIL_ bool __export dsvd(ityp *restrict, const register dim_typ [static MAX_DIMENSIONS], ityp *restrict, ityp *restrict);
__MSNATIVE_ dim_typ __export rank(ityp *restrict, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void __system _flushLogBuf(logObj * const);
__MSNATIVE_ __WINCALL void __system _editLog(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ void __system logCheck(logObj * const , const char *, const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ void __system prependTimeToString(char *, const bool);
__MSNATIVE_ void __system printErr(const int, const char *, ...);
__MSNATIVE_ void __system sprint(const char *, ...);
__MSNATIVE_ void __system fprintf2(FILE *, const char *, ...);
__MSNATIVE_ void __system printf2(const sel_typ, const char *, ...);
__MSNATIVE_ bool __system scanf2(sel_typ, const char *, ...);
__MSNATIVE_ bool __system __export parse(char [], ityp *);
__MSNATIVE_ _MS__private void __system printMatrix(FILE *, ityp *, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ bool __system __export extractMat(dim_typ);
__MSNATIVE_ bool __system __export matrixToken(const char [], ityp **, dim_typ *, dim_typ *);
__MSSHELL_WRAPPER_ __MSNATIVE_ const sprog * const __system searchProgram(const char [static SIGN_STRING]);
__MSUTIL_ int __export cmpfunc(const void *, const void *);
__MSUTIL_ bool __export min_cmpfunc(const register ityp, const register ityp);
__MSUTIL_ bool __export max_cmpfunc(const register ityp, const register ityp);
__MSNATIVE_ void __system _showUsage(const sprog * const);
__MSNATIVE_ void __system printUsage(const sprog * const);
__MSNATIVE_ void __system prepareToExit(void);
__MSNATIVE_ void __system safeExit(const int);
__MSNATIVE_ void __system _handleCmdLine(const register sel_typ, char **);
__MSNATIVE_ bool __system _execScriptFiles(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ bool __system _lfLoader(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ bool __system _lfCreate(const char [static MAX_PATH_LENGTH]);
#ifdef XMLCALL
__MSUTIL_ XMLCALL xmlDoc * __system __export xmlInit(const char [static XML_FILENAMES_LENGTH], xmlXPathContext **);
__MSUTIL_ XMLCALL void __system __export xmlExit(const char [static XML_FILENAMES_LENGTH], xmlDoc **, xmlXPathObject **, xmlXPathContext **);
__MSUTIL_ XMLCALL bool __system __export xmlWriteInt(xmlXPathObject **, xmlXPathContext *, const char *, const int);
__MSUTIL_ XMLCALL bool __system __export xmlWriteBool(xmlXPathObject **, xmlXPathContext *, const char *, const bool);
__MSUTIL_ XMLCALL bool __system __export xmlWriteFloat(xmlXPathObject **, xmlXPathContext *, const char *, const float);
__MSUTIL_ XMLCALL bool __system __export xmlWriteString(xmlXPathObject **, xmlXPathContext *, const char *, const char [static MAX_XML_FIELDSTRINGS]);
__MSUTIL_ XMLCALL bool __system __export xmlGetInt(xmlXPathObject **, xmlXPathContext *, const char *, int *);
__MSUTIL_ XMLCALL bool __system __export xmlGetBool(xmlXPathObject **, xmlXPathContext *, const char *, bool *);
__MSUTIL_ XMLCALL bool __system __export xmlGetFloat(xmlXPathObject **, xmlXPathContext *, const char *, float *);
__MSUTIL_ XMLCALL bool __system __export xmlGetString(xmlXPathObject **, xmlXPathContext *, const char *, char [static MAX_XML_FIELDSTRINGS]);
__MSNATIVE_ XMLCALL void __system _backupColFile(void);
__MSNATIVE_ XMLCALL void __system _colFileLoader(const char [static MAX_PATH_LENGTH]);
__MSNATIVE_ XMLCALL void __system getProgramSettings(dim_typ);
__MSNATIVE_ XMLCALL void __system resetProgramSettings(layoutObj * const, const char [static MAX_PATH_LENGTH]);
#endif
#ifdef WINOS
__MSUTIL_ __WINCALL BOOL WINAPI __system __export SetExitButtonState(const bool);
__MSUTIL_ __WINCALL HWND WINAPI __system __export GetConsoleWindowNT();
__MSUTIL_ __WINCALL bool __system __export windowsFileHandler(char *, const char *, const char [static MAX_EXTENSION_LENGTH], bool);
#else
__MSUTIL_ __MSNATIVE_ __system __export int getch( );
#endif
__MSUTIL_ const char * const __system __export getFilename(const char path[static MAX_PATH_LENGTH]);
__MSUTIL_ void __system updInfo(void);
__MSUTIL_ void __system __export SetColor(const sel_typ);
__MSNATIVE_ ityp __export MINMAX(const register dim_typ dim, const ityp [static dim], const bool, dim_typ *);
__MSNATIVE_ __MSUTIL_ ityp __system __export getDiffTime(struct timeval * tvBegin);
__MSNATIVE_ bool __system __export isDomainForbidden(ityp, bool);
__MSUTIL_ void _MS__private __system __export free_foreach(ityp **, const dim_typ, bool mode);
__MSUTIL_ void _MS__private __system __export free_foreach2(ityp **, const dim_typ);
__MSUTIL_ bool __system __export checkErrMem(const void *);
__MSNATIVE_ bool __system __export matrixAlloc(ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void __system __export _matrixFree(ityp **, bool mode);
__MSNATIVE_ bool __system __export equalMatrix(ityp **, ityp *, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ _MS__private void __system resetLmpMatrix(void);
__MSNATIVE_ void __system __export _flushMemoizersBuffers(sel_typ);
__MSNATIVE_ void __system __export flushAllMemoizersBuffers(void);
__MSNATIVE_ dim_typ __system __export selectListItem(dim_typ dim, bool, const char *, const char [static dim][MIN_STRING]);
__MSNATIVE_ void __system viewProgramSettings(dim_typ);
__MSNATIVE_ void __system setProgramSettings(dim_typ);
__MSNATIVE_ bool __system __export catchPause();
__MSNATIVE_ void __system logPrint(logObj * const);
__MSNATIVE_ void __system logWrite(FILE *, logObj * const);
__MSNATIVE_ void __system getVarListEx(FILE *, dim_typ);
__MSNATIVE_ ityp __system __export requires(const char *, const char *, const char *, const unsigned);
__MSNATIVE_ bool __system insertDims(dim_typ *, dim_typ *);
__MSNATIVE_ bool __system insertDim(dim_typ *, bool);
__MSNATIVE_ void __system sigproc(void);
__MSNATIVE_ void __system sigexit(void);
__MSSHELL_WRAPPER_ __MSNATIVE_ void showNewtonDifferenceTable(dim_typ n, ityp [static n], ityp [access(curLayout)->max_newton_difftables_dim][access(curLayout)->max_newton_difftables_dim], bool);
__MSNATIVE_ bool __system insertNMMatrix(ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ volatile char __system insertElement(ityp *restrict, const register dim_typ [static MAX_DIMENSIONS], const register dim_typ, bool);
__MSNATIVE_ volatile bool __system checkBackTracking(volatile char, dim_typ *);
__MSNATIVE_ volatile __system sel_typ checkBackTracking2(volatile char, dim_typ *, dim_typ *, dim_typ *, dim_typ);
__MSNATIVE_ bool __system __export enterMatrix(ityp **, dim_typ *, dim_typ *, bool, bool);
/// programs.c
__MSSHELL_WRAPPER_ void __apnt changeProgramSettings(const sel_typ argc, char ** argv);
__MSSHELL_WRAPPER_ void basicCalculator(const sel_typ argc, char ** argv);
__MSSHELL_WRAPPER_ void __apnt calcolatoreAvanzato(const sel_typ argc, char ** argv);
__MSSHELL_WRAPPER_ void __apnt algebraOperations(const sel_typ argc, char ** argv);
__MSSHELL_WRAPPER_ void __apnt mssManager(const sel_typ argc, char ** argv);
__MSSHELL_WRAPPER_ __MSNATIVE_ void _MS__private __system __export operationsGroupMenu(dim_typ dim, sprog [static dim], const char [static INFO_STRING], bool);
__MSSHELL_WRAPPER_ __MSNATIVE_ void __system progInfo(sel_typ);
__MSUTIL_ void __system __export freeExprEvalLists();
__MSUTIL_ void __system __export refreshExprEvalVarList(dim_typ);
__MSUTIL_ void __system __export refreshExprEvalLists();
__MSNATIVE_ void __system __export setCurrentMatrix(dim_typ);
__MSNATIVE_ void __system __export setCurrentLog(dim_typ);
__MSSHELL_WRAPPER_ __MSNATIVE_ void __system setDefaults();
/// ext_math.c
__MSNATIVE_ char * const __system __export binaryAlgSum(ityp, ityp, bool);
__MSNATIVE_ char * const __system __export binNumComp(ityp);
__MSNATIVE_ ityp __system __export math_mul(register ityp, register ityp);
__MSNATIVE_ ityp __system __export math_div(register ityp, register ityp);
__MSNATIVE_ ityp __export ___cabs(ityp *restrict, const register sel_typ);
__MSNATIVE_ void __export _complexAdd(ityp *restrict, ityp [static MAX_DIMENSIONS]);
__MSNATIVE_ void __export _complexSub(ityp *restrict, ityp [static MAX_DIMENSIONS]);
__MSNATIVE_ void __export _complexMul(ityp *restrict, ityp [static MAX_DIMENSIONS]);
__MSNATIVE_ void __export _complexDiv(ityp *restrict, ityp [static MAX_DIMENSIONS]);
__MSNATIVE_ void __export _quaternionsAdd(ityp *restrict, ityp [static MAX_QUATERNIONS_UNITS]);
__MSNATIVE_ void __export _quaternionsSub(ityp *restrict, ityp [static MAX_QUATERNIONS_UNITS]);
__MSNATIVE_ void __export _quaternionsMul(ityp *restrict, ityp [static MAX_QUATERNIONS_UNITS]);
__MSNATIVE_ void __export _quaternionsDiv(ityp *restrict, ityp [static MAX_QUATERNIONS_UNITS]);
__MSNATIVE_ void __export _octonionsAdd(ityp *restrict, ityp [static MAX_OCTONIONS_UNITS]);
__MSNATIVE_ void __export _octonionsSub(ityp *restrict, ityp [static MAX_OCTONIONS_UNITS]);
__MSNATIVE_ void __export _octonionsMul(ityp *restrict, ityp [static MAX_OCTONIONS_UNITS]);
__MSNATIVE_ void __export _octonionsDiv(ityp *restrict, ityp [static MAX_OCTONIONS_UNITS]);
__MSNATIVE_ void __export _sedenionsAdd(ityp *restrict, ityp [static MAX_SEDENIONS_UNITS]);
__MSNATIVE_ void __export _sedenionsSub(ityp *restrict, ityp [static MAX_SEDENIONS_UNITS]);
__MSNATIVE_ void __export _sedenionsMul(ityp *restrict, ityp [static MAX_SEDENIONS_UNITS]);
__MSNATIVE_ void __export _sedenionsDiv(ityp *restrict, ityp [static MAX_SEDENIONS_UNITS]);
__MSNATIVE_ bool __export _secondGradeEquationSolver(ityp *restrict, ityp [static MAX_DIMENSIONS]);
__MSUTIL_ void __export getRomanNumber(dim_typ, char [static ROMAN_NUMBER_STRING]);
__MSUTIL_ int64_t _MS__private __export powi(register int64_t, register int64_t);
__MSUTIL_ ityp __export mpow(ityp, int64_t);
__MSUTIL_ ityp __export mpow2(ityp, int64_t);
__MSNATIVE_ __MSUTIL_ void __export getPascalTriangle(uint64_t);
__MSUTIL_ bool __system __export isPrimeHISP(register uint64_t);
__MSUTIL_ bool __system __export isPrimeLIFP(register uint64_t);
__MSNATIVE_ void __system __export prime_N_Number(register uint64_t, register uint64_t);
__MSNATIVE_ ityp __system __export N_prime_Number(register ityp);
__MSNATIVE_ ityp __export fibnc(register ityp);
__MSNATIVE_ ityp __export primr(register ityp);
__MSNATIVE_ ityp __export fpnsum(register ityp);
__MSNATIVE_ bool __system __export trigonometric_domain(register ityp, register ityp, register ityp);
__MSNATIVE_ ityp __export stirling(register ityp);
__MSNATIVE_ ityp __export fibo(register ityp);
__MSNATIVE_ ityp __export fact(register ityp);
__MSUTIL_ ityp __export sfact(register ityp);
__MSNATIVE_ ityp __export sfact_even(register ityp);
__MSNATIVE_ ityp __export sfact_odd(register ityp);
__MSUTIL_ ityp __export afact(register ityp n);
__MSUTIL_ ityp __export perm(register ityp);
__MSUTIL_ ityp __export perm_rep(register ityp, register uint64_t dim, ityp [static dim]);
__MSUTIL_ ityp __export kperm(register ityp, register ityp);
__MSUTIL_ ityp __export kperm_rep(register ityp, register ityp);
__MSUTIL_ ityp __export comb(register ityp, register ityp);
__MSUTIL_ ityp __export comb_rep(register ityp, register ityp);
__MSNATIVE_ ityp __export gsum(register ityp, register int64_t);
__MSNATIVE_ ityp __export gasum(register uint64_t, register uint64_t);
__MSNATIVE_ ityp __export asum(register ityp);
__MSNATIVE_ ityp __export fsum(register ityp);
__MSNATIVE_ ityp __export fasum(register ityp);
__MSNATIVE_ ityp __export sfasum(register ityp);
__MSNATIVE_ ityp __export fnnsum(register ityp);
__MSNATIVE_ ityp __export summation(uint64_t dim, bool, ityp [static dim]);
__MSNATIVE_ ityp __export productory(uint64_t dim, bool, ityp [static dim]);
__MSNATIVE_ ityp __export math_media(uint64_t dim, ityp[static dim]);
__MSNATIVE_ ityp __export math_mode(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_variance(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_covariance(uint64_t dim, ityp [static dim], ityp [static dim]);
__MSNATIVE_ ityp __export math_stddev(uint64_t dim, ityp [static dim]);
__MSNATIVE_ bool __export math_outlier(uint64_t dim, uint64_t, ityp [static dim]);
__MSNATIVE_ bool __export math_outlier2(uint64_t dim, uint64_t, float, ityp vector[static dim]);
__MSNATIVE_ ityp __export math_geomedia(uint64_t dim, ityp[static dim]);
__MSNATIVE_ ityp __export math_armedia(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_powmedia(uint64_t dim, uint64_t, ityp [static dim]);
__MSNATIVE_ ityp __export math_scale(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_first_quartile(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_mediana(uint64_t dim, ityp [static dim]);
__MSNATIVE_ ityp __export math_third_quartile(uint64_t dim, ityp [static dim]);
__MSUTIL_ int64_t __system __export changeBase(register int, sel_typ, sel_typ);
__MSUTIL_ uint64_t __export math_MCD(register uint64_t, register uint64_t);
__MSUTIL_ uint64_t __export math_mcm(register uint64_t, register uint64_t);
__MSNATIVE_ ityp __export exp10(register ityp);
__MSNATIVE_ ityp __export expc(register ityp);
__MSNATIVE_ ityp __export exp10c(register ityp);
__MSNATIVE_ ityp __export exp2c(register ityp);
__MSUTIL_ ityp __export logbN(register ityp, register ityp);
__MSNATIVE_ ityp __export logc(register ityp);
__MSNATIVE_ ityp __export log10c(register ityp);
__MSNATIVE_ ityp __export log2c(register ityp);
__MSNATIVE_ ityp __export log1pc(register ityp);
__MSNATIVE_ ityp __export log101p(register ityp);
__MSNATIVE_ ityp __export log101pc(register ityp);
__MSNATIVE_ ityp __export log21p(register ityp);
__MSNATIVE_ ityp __export log21pc(register ityp);
__MSUTIL_ ityp __export rootnX(register ityp, register ityp);
__MSNATIVE_ double complex __export cexpc(register double complex);
__MSNATIVE_ double complex __export cexp10(register double complex);
__MSNATIVE_ double complex __export cexp10c(register double complex);
__MSNATIVE_ double complex __export cexp2(register double complex);
__MSNATIVE_ double complex __export cexp2c(register double complex);
__MSUTIL_ double complex __export clogbN(register double complex, register double complex);
__MSNATIVE_ double complex __export clogc(register double complex);
__MSNATIVE_ double complex __export clog10(register double complex);
__MSNATIVE_ double complex __export clog10c(register double complex);
__MSNATIVE_ double complex __export clog2(register double complex);
__MSNATIVE_ double complex __export clog2c(register double complex);
__MSNATIVE_ double complex __export clog1p(register double complex);
__MSNATIVE_ double complex __export clog1pc(register double complex);
__MSNATIVE_ double complex __export clog101p(register double complex);
__MSNATIVE_ double complex __export clog101pc(register double complex);
__MSNATIVE_ double complex __export clog21p(register double complex);
__MSNATIVE_ double complex __export clog21pc(register double complex);
__MSUTIL_ double complex __export ccbrt(register double complex);
__MSUTIL_ double complex __export crootnX(register double complex, register double complex);
__MSNATIVE_ ityp __export deg(register ityp);
__MSNATIVE_ ityp __export rad(register ityp);
__MSNATIVE_ ityp __export csc(register ityp);
__MSNATIVE_ ityp __export sec(register ityp);
__MSNATIVE_ ityp __export cot(register ityp);
__MSNATIVE_ ityp __export csch(register ityp);
__MSNATIVE_ ityp __export sech(register ityp);
__MSNATIVE_ ityp __export coth(register ityp);
__MSNATIVE_ ityp __export acsc(register ityp);
__MSNATIVE_ ityp __export asec(register ityp);
__MSNATIVE_ ityp __export acot(register ityp);
__MSNATIVE_ ityp __export acsch(register ityp);
__MSNATIVE_ ityp __export asech(register ityp);
__MSNATIVE_ ityp __export acoth(register ityp);
__MSNATIVE_ ityp __export hsin(register ityp);
__MSNATIVE_ ityp __export hsinh(register ityp);
__MSNATIVE_ ityp __export qsin(register ityp);
__MSNATIVE_ ityp __export qsinh(register ityp);
__MSNATIVE_ ityp __export hcos(register ityp);
__MSNATIVE_ ityp __export hcosh(register ityp);
__MSNATIVE_ ityp __export qcos(register ityp);
__MSNATIVE_ ityp __export qcosh(register ityp);
__MSNATIVE_ ityp __export hcsc(register ityp);
__MSNATIVE_ ityp __export hcsch(register ityp);
__MSNATIVE_ ityp __export qcsc(register ityp);
__MSNATIVE_ ityp __export qcsch(register ityp);
__MSNATIVE_ ityp __export hsec(register ityp);
__MSNATIVE_ ityp __export hsech(register ityp);
__MSNATIVE_ ityp __export qsec(register ityp);
__MSNATIVE_ ityp __export qsech(register ityp);
__MSNATIVE_ ityp __export htan(register ityp);
__MSNATIVE_ ityp __export htanh(register ityp);
__MSNATIVE_ ityp __export qtan(register ityp);
__MSNATIVE_ ityp __export qtanh(register ityp);
__MSNATIVE_ ityp __export hcot(register ityp);
__MSNATIVE_ ityp __export hcoth(register ityp);
__MSNATIVE_ ityp __export qcot(register ityp);
__MSNATIVE_ ityp __export qcoth(register ityp);
__MSNATIVE_ ityp __export vsin(register ityp);
__MSNATIVE_ ityp __export cvsin(register ityp);
__MSNATIVE_ ityp __export vcos(register ityp);
__MSNATIVE_ ityp __export cvcos(register ityp);
__MSNATIVE_ ityp __export hvsin(register ityp);
__MSNATIVE_ ityp __export hcvsin(register ityp);
__MSNATIVE_ ityp __export hvcos(register ityp);
__MSNATIVE_ ityp __export hcvcos(register ityp);
__MSNATIVE_ ityp __export qvsin(register ityp);
__MSNATIVE_ ityp __export qcvsin(register ityp);
__MSNATIVE_ ityp __export qvcos(register ityp);
__MSNATIVE_ ityp __export qcvcos(register ityp);
__MSNATIVE_ ityp __export vsinh(register ityp);
__MSNATIVE_ ityp __export cvsinh(register ityp);
__MSNATIVE_ ityp __export vcosh(register ityp);
__MSNATIVE_ ityp __export cvcosh(register ityp);
__MSNATIVE_ ityp __export hvsinh(register ityp);
__MSNATIVE_ ityp __export hcvsinh(register ityp);
__MSNATIVE_ ityp __export hvcosh(register ityp);
__MSNATIVE_ ityp __export hcvcosh(register ityp);
__MSNATIVE_ ityp __export qvsinh(register ityp);
__MSNATIVE_ ityp __export qcvsinh(register ityp);
__MSNATIVE_ ityp __export qvcosh(register ityp);
__MSNATIVE_ ityp __export qcvcosh(register ityp);
__MSNATIVE_ ityp __export esec(register ityp);
__MSNATIVE_ ityp __export ecsc(register ityp);
__MSNATIVE_ ityp __export esech(register ityp);
__MSNATIVE_ ityp __export ecsch(register ityp);
__MSNATIVE_ ityp __export hesec(register ityp);
__MSNATIVE_ ityp __export hecsc(register ityp);
__MSNATIVE_ ityp __export hesech(register ityp);
__MSNATIVE_ ityp __export hecsch(register ityp);
__MSNATIVE_ ityp __export qesec(register ityp);
__MSNATIVE_ ityp __export qecsc(register ityp);
__MSNATIVE_ ityp __export qesech(register ityp);
__MSNATIVE_ ityp __export qecsch(register ityp);
__MSNATIVE_ ityp __export sinc(register ityp);
__MSNATIVE_ ityp __export sinch(register ityp);
__MSNATIVE_ ityp __export hsinc(register ityp);
__MSNATIVE_ ityp __export hsinch(register ityp);
__MSNATIVE_ ityp __export qsinc(register ityp);
__MSNATIVE_ ityp __export qsinch(register ityp);
__MSNATIVE_ ityp __export cosc(register ityp);
__MSNATIVE_ ityp __export cosch(register ityp);
__MSNATIVE_ ityp __export hcosc(register ityp);
__MSNATIVE_ ityp __export hcosch(register ityp);
__MSNATIVE_ ityp __export qcosc(register ityp);
__MSNATIVE_ ityp __export qcosch(register ityp);
__MSNATIVE_ ityp __export secc(register ityp);
__MSNATIVE_ ityp __export secch(register ityp);
__MSNATIVE_ ityp __export hsecc(register ityp);
__MSNATIVE_ ityp __export hsecch(register ityp);
__MSNATIVE_ ityp __export qsecc(register ityp);
__MSNATIVE_ ityp __export qsecch(register ityp);
__MSNATIVE_ ityp __export cscc(register ityp);
__MSNATIVE_ ityp __export cscch(register ityp);
__MSNATIVE_ ityp __export hcscc(register ityp);
__MSNATIVE_ ityp __export hcscch(register ityp);
__MSNATIVE_ ityp __export qcscc(register ityp);
__MSNATIVE_ ityp __export qcscch(register ityp);
__MSNATIVE_ ityp __export tanc(register ityp);
__MSNATIVE_ ityp __export tanch(register ityp);
__MSNATIVE_ ityp __export htanc(register ityp);
__MSNATIVE_ ityp __export htanch(register ityp);
__MSNATIVE_ ityp __export qtanc(register ityp);
__MSNATIVE_ ityp __export qtanch(register ityp);
__MSNATIVE_ ityp __export cotc(register ityp);
__MSNATIVE_ ityp __export cotch(register ityp);
__MSNATIVE_ ityp __export hcotc(register ityp);
__MSNATIVE_ ityp __export hcotch(register ityp);
__MSNATIVE_ ityp __export qcotc(register ityp);
__MSNATIVE_ ityp __export qcotch(register ityp);
__MSNATIVE_ double complex __export ccsc(register double complex);
__MSNATIVE_ double complex __export csec(register double complex);
__MSNATIVE_ double complex __export ccot(register double complex);
__MSNATIVE_ double complex __export ccsch(register double complex);
__MSNATIVE_ double complex __export csech(register double complex);
__MSNATIVE_ double complex __export ccoth(register double complex);
__MSNATIVE_ double complex __export cacsc(register double complex);
__MSNATIVE_ double complex __export casec(register double complex);
__MSNATIVE_ double complex __export cacot(register double complex);
__MSNATIVE_ double complex __export cacsch(register double complex);
__MSNATIVE_ double complex __export casech(register double complex);
__MSNATIVE_ double complex __export cacoth(register double complex);
__MSNATIVE_ double complex __export chsin(register double complex);
__MSNATIVE_ double complex __export chsinh(register double complex);
__MSNATIVE_ double complex __export cqsin(register double complex);
__MSNATIVE_ double complex __export cqsinh(register double complex);
__MSNATIVE_ double complex __export chcos(register double complex);
__MSNATIVE_ double complex __export chcosh(register double complex);
__MSNATIVE_ double complex __export cqcos(register double complex);
__MSNATIVE_ double complex __export cqcosh(register double complex);
__MSNATIVE_ double complex __export chcsc(register double complex);
__MSNATIVE_ double complex __export chcsch(register double complex);
__MSNATIVE_ double complex __export cqcsc(register double complex);
__MSNATIVE_ double complex __export cqcsch(register double complex);
__MSNATIVE_ double complex __export chsec(register double complex);
__MSNATIVE_ double complex __export chsech(register double complex);
__MSNATIVE_ double complex __export cqsec(register double complex);
__MSNATIVE_ double complex __export cqsech(register double complex);
__MSNATIVE_ double complex __export chtan(register double complex);
__MSNATIVE_ double complex __export chtanh(register double complex);
__MSNATIVE_ double complex __export cqtan(register double complex);
__MSNATIVE_ double complex __export cqtanh(register double complex);
__MSNATIVE_ double complex __export chcot(register double complex);
__MSNATIVE_ double complex __export chcoth(register double complex);
__MSNATIVE_ double complex __export cqcot(register double complex);
__MSNATIVE_ double complex __export cqcoth(register double complex);
__MSNATIVE_ double complex __export cpxvsin(register double complex);
__MSNATIVE_ double complex __export ccvsin(register double complex);
__MSNATIVE_ double complex __export cpxvcos(register double complex);
__MSNATIVE_ double complex __export ccvcos(register double complex);
__MSNATIVE_ double complex __export chvsin(register double complex);
__MSNATIVE_ double complex __export chcvsin(register double complex);
__MSNATIVE_ double complex __export chvcos(register double complex);
__MSNATIVE_ double complex __export chcvcos(register double complex);
__MSNATIVE_ double complex __export cqvsin(register double complex);
__MSNATIVE_ double complex __export cqcvsin(register double complex);
__MSNATIVE_ double complex __export cqvcos(register double complex);
__MSNATIVE_ double complex __export cqcvcos(register double complex);
__MSNATIVE_ double complex __export cpxvsinh(register double complex);
__MSNATIVE_ double complex __export ccvsinh(register double complex);
__MSNATIVE_ double complex __export cpxvcosh(register double complex);
__MSNATIVE_ double complex __export ccvcosh(register double complex);
__MSNATIVE_ double complex __export chvsinh(register double complex);
__MSNATIVE_ double complex __export chcvsinh(register double complex);
__MSNATIVE_ double complex __export chvcosh(register double complex);
__MSNATIVE_ double complex __export chcvcosh(register double complex);
__MSNATIVE_ double complex __export cqvsinh(register double complex);
__MSNATIVE_ double complex __export cqcvsinh(register double complex);
__MSNATIVE_ double complex __export cqvcosh(register double complex);
__MSNATIVE_ double complex __export cqcvcosh(register double complex);
__MSNATIVE_ double complex __export cesec(register double complex);
__MSNATIVE_ double complex __export cecsc(register double complex);
__MSNATIVE_ double complex __export cesech(register double complex);
__MSNATIVE_ double complex __export cecsch(register double complex);
__MSNATIVE_ double complex __export chesec(register double complex);
__MSNATIVE_ double complex __export checsc(register double complex);
__MSNATIVE_ double complex __export chesech(register double complex);
__MSNATIVE_ double complex __export checsch(register double complex);
__MSNATIVE_ double complex __export cqesec(register double complex);
__MSNATIVE_ double complex __export cqecsc(register double complex);
__MSNATIVE_ double complex __export cqesech(register double complex);
__MSNATIVE_ double complex __export cqecsch(register double complex);
__MSNATIVE_ double complex __export csinc(register double complex);
__MSNATIVE_ double complex __export csinch(register double complex);
__MSNATIVE_ double complex __export chsinc(register double complex);
__MSNATIVE_ double complex __export chsinch(register double complex);
__MSNATIVE_ double complex __export cqsinc(register double complex);
__MSNATIVE_ double complex __export cqsinch(register double complex);
__MSNATIVE_ double complex __export ccosc(register double complex);
__MSNATIVE_ double complex __export ccosch(register double complex);
__MSNATIVE_ double complex __export chcosc(register double complex);
__MSNATIVE_ double complex __export chcosch(register double complex);
__MSNATIVE_ double complex __export cqcosc(register double complex);
__MSNATIVE_ double complex __export cqcosch(register double complex);
__MSNATIVE_ double complex __export csecc(register double complex);
__MSNATIVE_ double complex __export csecch(register double complex);
__MSNATIVE_ double complex __export chsecc(register double complex);
__MSNATIVE_ double complex __export chsecch(register double complex);
__MSNATIVE_ double complex __export cqsecc(register double complex);
__MSNATIVE_ double complex __export cqsecch(register double complex);
__MSNATIVE_ double complex __export ccscc(register double complex);
__MSNATIVE_ double complex __export ccscch(register double complex);
__MSNATIVE_ double complex __export chcscc(register double complex);
__MSNATIVE_ double complex __export chcscch(register double complex);
__MSNATIVE_ double complex __export cqcscc(register double complex);
__MSNATIVE_ double complex __export cqcscch(register double complex);
__MSNATIVE_ double complex __export ctanc(register double complex);
__MSNATIVE_ double complex __export ctanch(register double complex);
__MSNATIVE_ double complex __export chtanc(register double complex);
__MSNATIVE_ double complex __export chtanch(register double complex);
__MSNATIVE_ double complex __export cqtanc(register double complex);
__MSNATIVE_ double complex __export cqtanch(register double complex);
__MSNATIVE_ double complex __export ccotc(register double complex);
__MSNATIVE_ double complex __export ccotch(register double complex);
__MSNATIVE_ double complex __export chcotc(register double complex);
__MSNATIVE_ double complex __export chcotch(register double complex);
__MSNATIVE_ double complex __export cqcotc(register double complex);
__MSNATIVE_ double complex __export cqcotch(register double complex);
__MSNATIVE_ bool __system __export isEqualMatrix(ityp *, ityp *, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ __MSUTIL_ ityp __system __export norms(ityp *, dim_typ);
__MSNATIVE_ __MSUTIL_ ityp __system __export norm(ityp *, dim_typ, bool);
__MSNATIVE_ __MSUTIL_ void __export newtonDifferenceTable(dim_typ, ityp [access(curLayout)->max_newton_difftables_dim][access(curLayout)->max_newton_difftables_dim], bool);
__MSNATIVE_ ityp __system __export eval(ityp *restrict, const register dim_typ, const ityp);
__MSNATIVE_ ityp __system __export deval(ityp *restrict, const register dim_typ, const ityp);
__MSNATIVE_ short _MS__private __system __export _routhTable(ityp **, const register dim_typ, fsel_typ *);
__MSNATIVE_ sel_typ _MS__private __system __export _juryTable(ityp **, const register dim_typ);
__MSNATIVE_ sel_typ _MS__private __system __export _simplexMethod(ityp **, ityp **, const register dim_typ dim [static MAX_DIMENSIONS], ityp *, bool);
__MSNATIVE_ __MSUTIL_ sel_typ _MS__private __system __export _matrixEigenValues(ityp *restrict, ityp *restrict, ityp *restrict, const register dim_typ);
__MSNATIVE_ void _MS__private __system __export _matrixAdd(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixCAdd(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixQAdd(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixOAdd(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixSAdd(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixSub(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixCSub(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixQSub(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixOSub(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixSSub(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]);
__MSNATIVE_ __MSUTIL_ void __system __export mmult_fast(const register dim_typ, const register sel_typ, ityp **, ityp **, ityp **,
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]));
__MSNATIVE_ void __system __call_OSMM(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES], const register sel_typ,
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]));
__MSNATIVE_ void __system __call_STRASSENMM(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES], const register sel_typ,
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]),
void (* const )(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]));
__MSNATIVE_ void __system __call_NORMALMM(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES], const register sel_typ,
void (* const prodFunc)(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]),
void (* const sumFunc)(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]),
void (* const subFunc)(ityp **, ityp **, ityp **, const register dim_typ [static MAX_DIMENSIONS]));
__MSNATIVE_ __MSUTIL_ void __system __export squareOSMM(void (*)(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]), ityp **, ityp **, ityp **, const register dim_typ);
__MSNATIVE_ void _MS__private __system __export _matrixMultiplication(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]);
__MSNATIVE_ void _MS__private __system __export _matrixCMultiplication(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]);
__MSNATIVE_ void _MS__private __system __export _matrixQMultiplication(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]);
__MSNATIVE_ void _MS__private __system __export _matrixOMultiplication(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]);
__MSNATIVE_ void _MS__private __system __export _matrixSMultiplication(ityp **, ityp **, ityp **, const register dim_typ [static MAX_MATRICES]);
__MSNATIVE_ void _MS__private __system __export _matrixKProduct(ityp **, ityp **, ityp **, register dim_typ [static MAX_DIMENSIONS][MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixKCProduct(ityp **, ityp **, ityp **, register dim_typ [static MAX_DIMENSIONS][MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixKQProduct(ityp **, ityp **, ityp **, register dim_typ [static MAX_DIMENSIONS][MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixKOProduct(ityp **, ityp **, ityp **, register dim_typ [static MAX_DIMENSIONS][MAX_DIMENSIONS]);
__MSNATIVE_ void _MS__private __system __export _matrixKSProduct(ityp **, ityp **, ityp **, register dim_typ [static MAX_DIMENSIONS][MAX_DIMENSIONS]);
/// lists_manager.c
__MSNATIVE_ sel_typ __system __export checkItemTypeByExtension(const char [static MAX_EXTENSION_LENGTH]);
__MSSHELL_WRAPPER_ __MSNATIVE_ bool _MS__private __system __export listInsertProc(const char [static MAX_PATH_LENGTH], sel_typ);
__MSNATIVE_ dim_typ __system __export searchItem(const char [static MAX_PATH_LENGTH], sel_typ);
__MSNATIVE_ nodelist * __system __export listNo(dim_typ, sel_typ);
__MSNATIVE_ bool __system __export listInsert(const char [static MAX_PATH_LENGTH], sel_typ);
__MSNATIVE_ bool __system __export listDelete(dim_typ, sel_typ);
__MSNATIVE_ dim_typ __system __export itemSelect(sel_typ);
__MSNATIVE_ void __system __export refreshItem(dim_typ, sel_typ);
__MSNATIVE_ bool __system __export saveItem(dim_typ, sel_typ);
__MSNATIVE_ void __system __export passToItem(dim_typ, sel_typ, bool);
__MSNATIVE_ void __system __export setCurItem(const dim_typ, sel_typ);
__MSNATIVE_ void __system __export createItemData(dim_typ, sel_typ);
__MSNATIVE_ __WINCALL void __system __export createItem(const char *, sel_typ);
__MSNATIVE_ void __system __export viewItem(const dim_typ, sel_typ);
__MSNATIVE_ void __system __export printListItem(const dim_typ, sel_typ);
__MSNATIVE_ void __system __export updItem(sel_typ);
__MSNATIVE_ void __system __export updAll(sel_typ);
__MSNATIVE_ void __system __export delItem(const dim_typ, sel_typ);
__MSNATIVE_ dim_typ __system __export getItemID(char *, sprog * const, sel_typ);
__MSNATIVE_ void __system __export relItem(const dim_typ, bool);
__MSNATIVE_ void __system __export renItem(const char *, const dim_typ, sel_typ);
/// logs_manager.c
__MSSHELL_WRAPPER_ void _MS__private __lmp_prog setLogBufLen(const char [static MAX_PATH_LENGTH], logObj * const, const size_t);
#ifdef __cplusplus
}
#endif // __cplusplus