Skip to content

Commit

Permalink
feat: added client data pointer for caller convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Feb 13, 2021
1 parent 4bbcbb4 commit 0c548ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common/interp2d.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: interp2d.c,v 2.14 2014/06/06 00:56:42 greg Exp $";
static const char RCSid[] = "$Id: interp2d.c,v 2.15 2021/02/13 16:49:18 greg Exp $";
#endif
/*
* General interpolation method for unstructured values on 2-D plane.
Expand Down Expand Up @@ -70,6 +70,7 @@ interp2_alloc(int nsamps)
nip->ns = nsamps;
nip->dmin = 1; /* default minimum diameter */
nip->smf = NI2DSMF; /* default smoothing factor */
nip->c_data = NULL;
nip->da = NULL;
/* caller must assign spt[] array */
return(nip);
Expand Down
3 changes: 2 additions & 1 deletion src/common/interp2d.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* RCSid $Id: interp2d.h,v 2.9 2013/02/15 19:15:16 greg Exp $ */
/* RCSid $Id: interp2d.h,v 2.10 2021/02/13 16:49:18 greg Exp $ */
/*
* Header for interpolation of anisotropic samples on 2-D plane.
*
Expand All @@ -25,6 +25,7 @@ typedef struct {
float smin[2]; /* sample minima */
float smax[2]; /* sample maxima */
float grid2; /* grid diameter squared */
void *c_data; /* client data pointer */
struct interp2_samp {
unsigned short dia[NI2DIR];
unsigned short infl[NI2DIM];
Expand Down

0 comments on commit 0c548ae

Please sign in to comment.