Skip to content

Commit

Permalink
CLN: Remove unused internal C functions
Browse files Browse the repository at this point in the history
These functions are in the internal C library, i.e. they are not meant
to be exposed to users in Python. They are not in use and are unlikely
to see use in the future.
  • Loading branch information
mferrera committed Nov 22, 2023
1 parent 7ea1098 commit 07a96a0
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 597 deletions.
43 changes: 1 addition & 42 deletions src/clib/xtg/libxtg_.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,15 @@
#define XTGFORMAT1 1
#define XTGFORMAT2 2

void
x_fgets(char *, int, FILE *);

void
x_fread(void *, size_t, size_t, FILE *);

int
x_nint(double);

void
x_free(int num, ...);

double **
x_allocate_2d_double(int n1, int n2);

void
x_free_2d_double(double **ptr_array);

float **
x_allocate_2d_float(int n1, int n2);

void
x_free_2d_float(float **ptr_array);

int **
x_allocate_2d_int(int n1, int n2);

Expand All @@ -46,21 +31,6 @@ x_allocate_2d_mbool(int n1, int n2);
void
x_free_2d_mbool(mbool **ptr_array);

int
x_cmp_sort(const void *vp, const void *vq);

void
x_mapaxes(int mode,
double *x,
double *y,
const double x1,
const double y1,
const double x2,
const double y2,
const double x3,
const double y3,
int option);

int
x_verify_vectorlengths(long ncol,
long nrow,
Expand All @@ -71,18 +41,9 @@ x_verify_vectorlengths(long ncol,
int ntotlen,
int format);

void
x_basicstats(int n, double undef, double *v, double *min, double *max, double *avg);

void
x_basicstats2(int n, float undef, float *v, float *min, float *max, float *avg);

int
x_chk_point_in_cell(double x, double y, double z, double coor[], int imethod);

int
x_chk_point_in_hexahedron(double x, double y, double z, double *coor, int flip);

void
x_2d_rect_corners(double x,
double y,
Expand Down Expand Up @@ -140,6 +101,7 @@ x_interp_cube_nodes(double *x_v,

int
x_plane_normalvector(double *points_v, double *nvector, int option);

int
x_isect_line_plane(double *nvector, double *line_v, double *point_v, int option);

Expand Down Expand Up @@ -188,9 +150,6 @@ x_point_line_pos(double x1,
int
x_swap_check();

int
x_byteorder(int);

/******************************************************************************
FUNCTION: SwapEndian
PURPOSE: Swap the byte order of a structure
Expand Down
234 changes: 0 additions & 234 deletions src/clib/xtg/x_chk_point_in_hexahedron.c

This file was deleted.

47 changes: 0 additions & 47 deletions src/clib/xtg/x_cmp_sort.c

This file was deleted.

9 changes: 0 additions & 9 deletions src/clib/xtg/x_general.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
#include "libxtg_.h"
#include "logger.h"

void
x_fgets(char *str, int n, FILE *stream)
{

if (fgets(str, n, stream) == NULL) {
logger_error(LI, FI, FU, "Error in read (fgets)");
}
}

void
x_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
Expand Down
Loading

0 comments on commit 07a96a0

Please sign in to comment.