1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/math/fudgit/files/patch-ab
Jean-Marc Zucconi dcc7e4d985 Add support for the
set function none
	set method none
commands, cause the default extension of ".ft" to be tried on all
loaded fudgit files and adds support for C-style escape sequences in
fudgit commands (which was *implied* in the fudgitrc file distributed
in the sources but apparently never implemented).

Correct some minor typos in the on-line help.
Submitted by:	Don Yuniskis <dgy@rtd.com>
1996-08-05 14:06:09 +00:00

217 lines
5.6 KiB
Plaintext

*** src/command.c.orig Mon Nov 7 15:23:31 1994
--- src/command.c Mon Aug 5 06:32:38 1996
***************
*** 244,249 ****
--- 244,251 ----
"legendre series: n = 1,...N { Pn(X) }"},
{"lo!rentzian", do_stfunc, "set function lorentzian", "",
"Lorentzian series: n = 3, 6...N { A[n-1]*((X*A[n])^2/((X^2-A[n-2]^2)^2+(X*A[n])^2) }"},
+ {"n!one", do_stfunc, "set function none", "",
+ "none"},
{"p!olynomial", do_stfunc, "set function polynomial", "",
"power series: n = 1,...N { A[n]*X^(n-1) }"},
{"u!ser", do_stfunc, "set function user", "definition",
***************
*** 268,273 ****
--- 270,277 ----
"least square linear regression"},
{"m!l_fit", do_stmeth, "set method ml_fit", "",
"Marquardt-Levenberg iterative nonlinear fit"},
+ {"n!one", do_stmeth, "set method none", "",
+ "none"},
{"s!vd_fit", do_stmeth, "set method svd_fit", "",
"singular value decomposition linear fit"},
{ 0, 0, 0, 0, 0 }
*** src/fudgit.h.orig Thu Sep 8 16:02:47 1994
--- src/fudgit.h Mon Aug 5 06:32:38 1996
***************
*** 97,103 ****
* name.
* Ideally, this exception is left for .fudgitrc.
*/
! /* #define EXTENSION ".ft" */
/* The following are required when defining argument prototypes of
* loaded routines.
*/
--- 97,103 ----
* name.
* Ideally, this exception is left for .fudgitrc.
*/
! #define EXTENSION ".ft"
/* The following are required when defining argument prototypes of
* loaded routines.
*/
*** src/setshow.c.orig Mon Nov 7 07:57:49 1994
--- src/setshow.c Mon Aug 5 06:32:39 1996
***************
*** 67,73 ****
int Ft_Funci;
Meth Ft_Method[METHNUM] = {
! {"none", "none"},
{"ls_r!eg", "least square linear regression"},
{"lad!_reg", "least absolute deviation linear regression"},
{"ls_f!it", "least square linear fit"},
--- 67,73 ----
int Ft_Funci;
Meth Ft_Method[METHNUM] = {
! {"n!one", "none"},
{"ls_r!eg", "least square linear regression"},
{"lad!_reg", "least absolute deviation linear regression"},
{"ls_f!it", "least square linear fit"},
***************
*** 76,82 ****
};
Func Ft_Function[FUNCNUM] = {
! {"none", "none"},
{"str!aight", "straight line"},
{"po!lynomial", "polynomial"},
{"leg!endre", "Legendre polynomial"},
--- 76,82 ----
};
Func Ft_Function[FUNCNUM] = {
! {"n!one", "none"},
{"str!aight", "straight line"},
{"po!lynomial", "polynomial"},
{"leg!endre", "Legendre polynomial"},
*** src/vgetargp.c.orig Fri Sep 2 23:02:47 1994
--- src/vgetargp.c Mon Aug 5 06:32:39 1996
***************
*** 75,93 ****
/* go along the string */
while (*b != '\0' && argno < MAXTOKEN) {
! switch (*b) {
#ifdef BACKSLASH
! case '\\': /* only recognize \$ in non fmodes */
! if (leavequotes == ERRR) {
! leavequotes = ( Ft_almost(p[0], "pm!ode") ||
! Ft_almost(p[0], "cm!ode") ||
! Ft_almost(p[0], "le!t") );
! }
! if (expansion && b[1] != '\n' && (!leavequotes || b[1] == '$')) {
! b++;
! }
! COPY(b);
! break;
#endif
case SQUOTE: /* take following as one string, + turn off exp */
if (leavequotes == 1 || indquotes || inpar) {
--- 75,187 ----
/* go along the string */
while (*b != '\0' && argno < MAXTOKEN) {
! switch (*b)
! {
#ifdef BACKSLASH
! /* add support for C-style escape sequences */
! case '\\':
! {
! if (leavequotes == ERRR) {
! leavequotes = (
! Ft_almost(p[0], "pm!ode") ||
! Ft_almost(p[0], "cm!ode") ||
! Ft_almost(p[0], "le!t") );
! }
!
! /* only recognize escape sequences in non fmodes */
! if (expansion && b[1] != '\n' && (!leavequotes || b[1] == '$')) {
! int dummy = -1;
! int * dptr = &dummy;
! b++; /* skip over '\\' */
!
! switch (*b)
! {
! case '\0':
! break;
! case '\'':
! dummy = '\'';
! break;
! case '\"':
! dummy = '\"';
! break;
! case '$':
! dummy = '$';
! break;
! case '?':
! dummy = '\?';
! break;
! case 'a':
! dummy = '\a';
! break;
! case 'b':
! dummy = '\b';
! break;
! case 'f':
! dummy = '\f';
! break;
! case 'n':
! dummy = '\n';
! break;
! case 'r':
! dummy = '\r';
! break;
! case 't':
! dummy = '\t';
! break;
! case 'x':
! if (!isxdigit(b[1]))
! break;
! b++;
! dummy = tolower(*b) -
! (isdigit(*b) ? '0' : ('a' - 10));
! if (!isxdigit(b[1]))
! break;
! b++;
! dummy *= 16;
! dummy += tolower(*b) -
! (isdigit(*b) ? '0' : ('a' - 10));
! break;
! case 'v':
! dummy = '\v';
! break;
! case '0':
! case '1':
! case '2':
! case '3':
! case '4':
! case '5':
! case '6':
! case '7':
! dummy = *b - '0';
! if ((b[1] < '0') || (b[1] > '7'))
! break;
! b++;
! dummy *= 8;
! dummy += *b - '0';
! if ((b[1] < '0') || (b[1] > '7'))
! break;
! b++;
! dummy *= 8;
! dummy += *b - '0';
! break;
! case '\\':
! dummy = '\\';
! break;
! default:
! break;
! }
! if (dummy < 0) {
! dummy = '\\';
! } else {
! b++;
! }
! COPY(dptr);
! break;
! } else {
! COPY(b);
! break;
! }
! }
#endif
case SQUOTE: /* take following as one string, + turn off exp */
if (leavequotes == 1 || indquotes || inpar) {