Skip to content

Commit

Permalink
Added const qualifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Sep 27, 2024
1 parent 0cd3cd2 commit 07a6720
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 63 deletions.
62 changes: 31 additions & 31 deletions src/jurassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3683,9 +3683,9 @@ void init_srcfunc(
/*****************************************************************************/

void intpol_atm(
ctl_t * ctl,
atm_t * atm,
double z,
const ctl_t * ctl,
const atm_t * atm,
const double z,
double *p,
double *t,
double *q,
Expand Down Expand Up @@ -3892,12 +3892,12 @@ void intpol_tbl_ega(
/*****************************************************************************/

double intpol_tbl_eps(
tbl_t * tbl,
int ig,
int id,
int ip,
int it,
double u) {
const tbl_t * tbl,
const int ig,
const int id,
const int ip,
const int it,
const double u) {

/* Lower boundary... */
if (u < tbl->u[id][ig][ip][it][0])
Expand Down Expand Up @@ -3931,12 +3931,12 @@ double intpol_tbl_eps(
/*****************************************************************************/

double intpol_tbl_u(
tbl_t * tbl,
int ig,
int id,
int ip,
int it,
double eps) {
const tbl_t * tbl,
const int ig,
const int id,
const int ip,
const int it,
const double eps) {

/* Lower boundary... */
if (eps < tbl->eps[id][ig][ip][it][0])
Expand Down Expand Up @@ -4105,9 +4105,9 @@ void kernel(
/*****************************************************************************/

int locate_irr(
double *xx,
int n,
double x) {
const double *xx,
const int n,
const double x) {

int ilo = 0;
int ihi = n - 1;
Expand Down Expand Up @@ -4135,9 +4135,9 @@ int locate_irr(
/*****************************************************************************/

int locate_reg(
double *xx,
int n,
double x) {
const double *xx,
const int n,
const double x) {

/* Calculate index... */
const int i = (int) ((x - xx[0]) / (xx[1] - xx[0]));
Expand All @@ -4154,9 +4154,9 @@ int locate_reg(
/*****************************************************************************/

int locate_tbl(
float *xx,
int n,
double x) {
const float *xx,
const int n,
const double x) {

int ilo = 0;
int ihi = n - 1;
Expand Down Expand Up @@ -5268,13 +5268,13 @@ void tangent_point(
/*****************************************************************************/

void time2jsec(
int year,
int mon,
int day,
int hour,
int min,
int sec,
double remain,
const int year,
const int mon,
const int day,
const int hour,
const int min,
const int sec,
const double remain,
double *jsec) {

struct tm t0, t1;
Expand Down
64 changes: 32 additions & 32 deletions src/jurassic.h
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,9 @@ void init_srcfunc(

/*! Interpolate atmospheric data. */
void intpol_atm(
ctl_t * ctl,
atm_t * atm,
double z,
const ctl_t * ctl,
const atm_t * atm,
const double z,
double *p,
double *t,
double *q,
Expand All @@ -977,25 +977,25 @@ void intpol_tbl_ega(

/*! Interpolate emissivity from look-up tables. */
double intpol_tbl_eps(
tbl_t * tbl,
int ig,
int id,
int ip,
int it,
double u);
const tbl_t * tbl,
const int ig,
const int id,
const int ip,
const int it,
const double u);

/*! Interpolate column density from look-up tables. */
double intpol_tbl_u(
tbl_t * tbl,
int ig,
int id,
int ip,
int it,
double eps);
const tbl_t * tbl,
const int ig,
const int id,
const int ip,
const int it,
const double eps);

/*! Convert seconds to date. */
void jsec2time(
double jsec,
const double jsec,
int *year,
int *mon,
int *day,
Expand All @@ -1013,21 +1013,21 @@ void kernel(

/*! Find array index for irregular grid. */
int locate_irr(
double *xx,
int n,
double x);
const double *xx,
const int n,
const double x);

/*! Find array index for regular grid. */
int locate_reg(
double *xx,
int n,
double x);
const double *xx,
const int n,
const double x);

/*! Find array index in float array. */
int locate_tbl(
float *xx,
int n,
double x);
const float *xx,
const int n,
const double x);

/*! Compose measurement vector. */
size_t obs2y(
Expand Down Expand Up @@ -1122,13 +1122,13 @@ void tangent_point(

/*! Convert date to seconds. */
void time2jsec(
int year,
int mon,
int day,
int hour,
int min,
int sec,
double remain,
const int year,
const int mon,
const int day,
const int hour,
const int min,
const int sec,
const double remain,
double *jsec);

/*! Measure wall-clock time. */
Expand Down

0 comments on commit 07a6720

Please sign in to comment.