mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e555a718c0 | ||
|
b29fcf2dd5 |
17
CHANGES
17
CHANGES
@@ -8,6 +8,23 @@ The following are the changes from calc version 2.12.6.6 to date:
|
||||
Added work around for a gcc warning bug, thanks to a report by Mike
|
||||
<michael dot d dot ince at gmail dot com>.
|
||||
|
||||
Fixed errors in various help files such as:
|
||||
|
||||
mat randbit seed srandom types
|
||||
|
||||
Removed the MAXSTRING symbol because it was no longer used by calc.
|
||||
|
||||
Increased HIST_SIZE (depth of the history stack) from 10k to 32k.
|
||||
|
||||
Increased TTYSIZE (reallocation size for terminal buffers) from 100 to 8191.
|
||||
|
||||
Increased MAXDEPTH (maximum depth of input stack) from 10 to 255.
|
||||
|
||||
Increased interactive input buffer size from 1024 to 256k. This has the
|
||||
effect of increasing the maximum length of an input line from a tty.
|
||||
This helps with an interactive bug that was reported by Ruslan Kabatsayev
|
||||
(b7 dot 10110111 at gmail dot com).
|
||||
|
||||
|
||||
The following are the changes from calc version 2.12.6.4 to 2.12.6.5:
|
||||
|
||||
|
@@ -1054,7 +1054,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.6.6
|
||||
VERSION= 2.12.6.7
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
1
calc.h
1
calc.h
@@ -65,7 +65,6 @@
|
||||
|
||||
#define SYMBOLSIZE 256 /* maximum symbol name size */
|
||||
#define MAXLABELS 100 /* maximum number of user labels in function */
|
||||
#define MAXSTRING 1024 /* maximum size of string constant */
|
||||
#define MAXSTACK 2048 /* maximum depth of evaluation stack */
|
||||
#define MAXFILES 20 /* maximum number of opened files */
|
||||
#define PROMPT1 "> " /* default normal prompt*/
|
||||
|
@@ -348,7 +348,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.6.6
|
||||
VERSION= 2.12.6.7
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
@@ -348,7 +348,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.6.6
|
||||
VERSION= 2.12.6.7
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
@@ -173,8 +173,6 @@ STATIC struct infoname sys_info[] = {
|
||||
(FULL)MAXSCANCOUNT},
|
||||
{"MAXSTACK", "max depth of evaluation stack", NULL,
|
||||
(FULL)MAXSTACK},
|
||||
{"MAXSTRING", "max size of string constant", NULL,
|
||||
(FULL)MAXSTRING},
|
||||
{"MAXUFULL", "largest FULL value", NULL,
|
||||
(FULL)MAXUFULL},
|
||||
{"MAXULONG", "largest unsigned long val", NULL,
|
||||
|
8
help/mat
8
help/mat
@@ -54,13 +54,13 @@ DESCRIPTION
|
||||
The elements of the matrix are stored internally as a linear array
|
||||
in which locations are arranged in order of increasing indices.
|
||||
For example, in order of location, the six element of A = mat [2,3]
|
||||
are
|
||||
are:
|
||||
|
||||
A[0,0], A[0,1], A[0,2], A[1,0], A[1,,1], A[1,2].
|
||||
A[0,0], A[0,1], A[0,2], A[1,0], A[1,1], and A[1,2].
|
||||
|
||||
These elements may also be specified using the double-bracket operator
|
||||
with a single integer index as in A[[0]], A[[1]], ..., A[[5]].
|
||||
If p is assigned the value &A[0.0], the address of A[[i]] for 0 <= i < 6
|
||||
If p is assigned the value &A[0,0], the address of A[[i]] for 0 <= i < 6
|
||||
is p + i as long as A exists and a new value is not assigned to A.
|
||||
|
||||
When a matrix is created, each element is initially assigned the
|
||||
@@ -414,7 +414,7 @@ SEE ALSO
|
||||
det, inverse, isident, test, config, search, rsearch, reverse, copy,
|
||||
blkcpy, dp, cp, randperm, sort
|
||||
|
||||
## Copyright (C) 1999-2006 Landon Curt Noll
|
||||
## Copyright (C) 1999-2006,2018 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
@@ -1,5 +1,5 @@
|
||||
NAME
|
||||
randbit - additive 55 shuffle pseudo-random number generator
|
||||
randbit - subtractive 100 shuffle pseudo-random number generator
|
||||
|
||||
SYNOPSIS
|
||||
randbit([x])
|
||||
@@ -42,7 +42,7 @@ LINK LIBRARY
|
||||
SEE ALSO
|
||||
seed, srand, randbit, isrand, random, srandom, israndom
|
||||
|
||||
## Copyright (C) 1999 Landon Curt Noll
|
||||
## Copyright (C) 1999,2018 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
11
help/seed
11
help/seed
@@ -18,14 +18,7 @@ DESCRIPTION
|
||||
It should be pointed out that the information collected by seed
|
||||
is almost certainly non-chaotic. This function is likely not
|
||||
suitable for applications (such as cryptographic applications)
|
||||
where the unpredictability of seeds is critical. For such critical
|
||||
applications, LavaRnd should be used. See the URL:
|
||||
|
||||
http://www.LavaRnd.org/
|
||||
|
||||
for information about seeding a pseudo-random number generator
|
||||
(such as rand() or random()) with the cryptographic hash of the
|
||||
digitization of chaotic system.
|
||||
where the unpredictability of seeds is critical.
|
||||
|
||||
Given the above warning, this builtin function produces a seed that is
|
||||
suitable for most applications that desire a different pseudo-random
|
||||
@@ -51,7 +44,7 @@ LINK LIBRARY
|
||||
SEE ALSO
|
||||
seed, srand, randbit, isrand, rand, random, srandom, israndom
|
||||
|
||||
## Copyright (C) 1999 Landon Curt Noll
|
||||
## Copyright (C) 1999,2018 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
@@ -332,13 +332,13 @@ LIMITS
|
||||
iq >= 2^16
|
||||
|
||||
LINK LIBRARY
|
||||
RAND *zsrandom(ZVALUE *pseed, MATRIX *pmat55)
|
||||
RAND *zsetrandom(RAND *state)
|
||||
RANDOM *zsrandom(ZVALUE *pseed, MATRIX *pmat55)
|
||||
RANDOM *zsetrandom(RAND *state)
|
||||
|
||||
SEE ALSO
|
||||
seed, srand, randbit, isrand, random, srandom, israndom
|
||||
|
||||
## Copyright (C) 1999 Landon Curt Noll
|
||||
## Copyright (C) 1999,2018 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
17
help/types
17
help/types
@@ -1,6 +1,6 @@
|
||||
Builtin types
|
||||
|
||||
The calculator has the following built-in types.
|
||||
The calculator has the following built-in types:
|
||||
|
||||
null value
|
||||
This is the undefined value type. The function 'null'
|
||||
@@ -101,7 +101,20 @@ Builtin types
|
||||
using the result of the 'files' function. Such copies are
|
||||
indistinguishable from each other.
|
||||
|
||||
## Copyright (C) 1999 Landon Curt Noll
|
||||
The calculator also has a number of special types that as used
|
||||
by some special builtin functions:
|
||||
|
||||
rand
|
||||
A subtractive 100 shuffle pseudo-random number generator
|
||||
state. This state is used by functions such as isrand()
|
||||
and srand().
|
||||
|
||||
random
|
||||
A Blum-Blum-Shub pseudo-random number generator state.
|
||||
This state is used by functions such as israndom() and
|
||||
srandom().
|
||||
|
||||
## Copyright (C) 1999,2018 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
2
hist.h
2
hist.h
@@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef HIST_SIZE
|
||||
#define HIST_SIZE (1024*10)
|
||||
#define HIST_SIZE (1024*32)
|
||||
#endif
|
||||
|
||||
|
||||
|
6
input.c
6
input.c
@@ -59,8 +59,8 @@ E_FUNC FILE *f_open(char *name, char *mode);
|
||||
E_FUNC FILE *curstream(void);
|
||||
|
||||
|
||||
#define TTYSIZE 100 /* reallocation size for terminal buffers */
|
||||
#define MAXDEPTH 10 /* maximum depth of input */
|
||||
#define TTYSIZE 8191 /* reallocation size for terminal buffers */
|
||||
#define MAXDEPTH 255 /* maximum depth of input */
|
||||
#define IS_READ 1 /* reading normally */
|
||||
#define IS_REREAD 2 /* reread current character */
|
||||
#define chartoint(ch) ((ch) & 0xff) /* make sure char is not negative */
|
||||
@@ -789,7 +789,7 @@ ttychar(void)
|
||||
{
|
||||
int ch; /* current char */
|
||||
int len; /* length of current command */
|
||||
STATIC char charbuf[1024];
|
||||
STATIC char charbuf[256*1024];
|
||||
|
||||
/*
|
||||
* If we have more to read from the saved command line, then do that.
|
||||
|
@@ -45,7 +45,7 @@ static char *program;
|
||||
#define MAJOR_VER 2 /* major library version */
|
||||
#define MINOR_VER 12 /* minor library version */
|
||||
#define MAJOR_PATCH 6 /* major software level under library version */
|
||||
#define MINOR_PATCH 6 /* minor software level or 0 if not patched */
|
||||
#define MINOR_PATCH 7 /* minor software level or 0 if not patched */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user