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:
Landon Curt Noll
2023-10-05 04:59:13 -07:00
parent d14d525a6a
commit d52cbcea14

10
func.c
View File

@@ -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;
}
}