CCR code: Splitting a C code file

Dirk Hohndel dirk at hohndel.org
Sat Aug 23 13:15:49 PDT 2014


On August 23, 2014 12:39:23 PM Willem Ferguson 
<willemferguson at zoology.up.ac.za> wrote:

> On 23/08/2014 16:44, Dirk Hohndel wrote:
> >
> > On August 23, 2014 7:29:47 AM Willem Ferguson
> > <willemferguson at zoology.up.ac.za> wrote:
> >
> >>
> >> The function name is not resolved. I suspect I do not understand the
> >> interaction between qmake and make. Is this correct?
> >
> > Is the function marked as "static" by any chance?
> >
> > /D
> >
> You are clairvoyant. Yes, you are absolutely correct and I should have
> seen the problem.
>
> static inline int pressure_time(struct dive*, struct divecomputer*,
> struct plot_data*, struct plot_data*);
>
> Two issues:
>
> 1) What would be the consequences if one changed the definition to int
> pressure_time?
>
> The function is only called once by profile.c.
>
> 2) If I had a free choice, to avoid confusion, I would rename it to
> calc_pressure_time because, within profile.c,  there are variables with
> the name pressure_time.

Feel free to rename.
And you'll have to drop the "static" for it to be accessible across files

/D




More information about the subsurface mailing list