mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
avoid issues where funclist.sed forms help/funclist.c
The funclist.sed sed script, when transforming func.c into help/funclist.c, was creating nested comments. While those were hardless, a single change to func.c avoids the naive funclist.sed processing and avoids (harmless) warnings when compiling help/funclist.c in the course of building the function list.
This commit is contained in:
10
func.c
10
func.c
@@ -2577,7 +2577,7 @@ f_logn(int count, VALUE **vals)
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
@@ -2597,7 +2597,7 @@ f_logn(int count, VALUE **vals)
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
@@ -2623,13 +2623,13 @@ f_logn(int count, VALUE **vals)
|
||||
if (p_cval == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* check if division is COMPLEX or NUMBER */
|
||||
/* check for COMPLEX or NUMBER division */
|
||||
if (cisreal(p_cval)) {
|
||||
/* ln(x) / ln(n) was NUMBER, not COMPLEX */
|
||||
result.v_num = c_to_q(p_cval, true);
|
||||
result.v_type = V_NUM;
|
||||
} else {
|
||||
/* ln(x) / ln(n) is COMPLEX */
|
||||
/* ln(x) / ln(n) is COMPLEX result */
|
||||
result.v_type = V_COM;
|
||||
result.v_com = p_cval;
|
||||
}
|
||||
@@ -2643,7 +2643,7 @@ f_logn(int count, VALUE **vals)
|
||||
if (result.v_com == NULL) {
|
||||
return error_value(E_LOGN_3);
|
||||
}
|
||||
/* ln(x) / ln(n) is NUMBER */
|
||||
/* ln(x) / ln(n) is NUMBER result */
|
||||
result.v_type = V_NUM;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user