summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/compression/bwlzh.h26
-rw-r--r--include/compression/bwt.h12
-rw-r--r--include/compression/coder.h8
-rw-r--r--include/compression/dict.h2
-rw-r--r--include/compression/fixpoint.h8
-rw-r--r--include/compression/huffman.h12
-rw-r--r--include/compression/lz77.h10
-rw-r--r--include/compression/merge_sort.h2
-rw-r--r--include/compression/mtf.h16
-rw-r--r--include/compression/rle.h8
-rw-r--r--include/compression/tng_compress.h76
-rw-r--r--include/compression/vals16.h8
-rw-r--r--include/compression/warnmalloc.h4
-rw-r--r--include/tng/tng_io.h322
-rw-r--r--src/compression/bwlzh.c26
-rw-r--r--src/compression/bwt.c18
-rw-r--r--src/compression/coder.c28
-rw-r--r--src/compression/dict.c2
-rw-r--r--src/compression/fixpoint.c8
-rw-r--r--src/compression/huffman.c16
-rw-r--r--src/compression/huffmem.c10
-rw-r--r--src/compression/lz77.c12
-rw-r--r--src/compression/merge_sort.c6
-rw-r--r--src/compression/mtf.c20
-rw-r--r--src/compression/rle.c12
-rw-r--r--src/compression/tng_compress.c166
-rw-r--r--src/compression/vals16.c8
-rw-r--r--src/compression/warnmalloc.c4
-rw-r--r--src/compression/widemuldiv.c2
-rw-r--r--src/compression/xtc2.c8
-rw-r--r--src/compression/xtc3.c46
-rw-r--r--src/lib/tng_io.c544
32 files changed, 732 insertions, 718 deletions
diff --git a/include/compression/bwlzh.h b/include/compression/bwlzh.h
index 70d586a..ce08f69 100644
--- a/include/compression/bwlzh.h
+++ b/include/compression/bwlzh.h
@@ -17,28 +17,28 @@
allocated to be able to hold worst case. You can obtain this length
conveniently by calling comp_get_buflen()
*/
-void DECLSPECDLLEXPORT bwlzh_compress(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len);
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_no_lz77(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len);
-int DECLSPECDLLEXPORT bwlzh_get_buflen(int nvals);
+int DECLSPECDLLEXPORT bwlzh_get_buflen(const int nvals);
-void DECLSPECDLLEXPORT bwlzh_decompress(unsigned char *input, int nvals,
+void DECLSPECDLLEXPORT bwlzh_decompress(unsigned char *input, const int nvals,
unsigned int *vals);
/* The routines below are mostly useful for testing, and for internal
use by the library. */
-void DECLSPECDLLEXPORT bwlzh_compress_verbose(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_verbose(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len);
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77_verbose(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_no_lz77_verbose(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len);
-void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, int nvals,
+void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, const int nvals,
unsigned int *vals);
/* Compress the integers (positive, small integers are preferable)
@@ -47,12 +47,12 @@ void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, int nvals,
to be able to hold worst case. You can obtain this length
conveniently by calling comp_huff_buflen()
*/
-void Ptngc_comp_huff_compress(unsigned int *vals, int nvals,
+void Ptngc_comp_huff_compress(unsigned int *vals, const int nvals,
unsigned char *huffman, int *huffman_len);
-int Ptngc_comp_huff_buflen(int nvals);
+int Ptngc_comp_huff_buflen(const int nvals);
-void Ptngc_comp_huff_decompress(unsigned char *huffman, int huffman_len,
+void Ptngc_comp_huff_decompress(unsigned char *huffman, const int huffman_len,
unsigned int *vals);
@@ -62,11 +62,11 @@ void Ptngc_comp_huff_compress_verbose(unsigned int *vals, int nvals,
unsigned char *huffman, int *huffman_len,
int *huffdatalen,
int *huffman_lengths,int *chosen_algo,
- int isvals16);
+ const int isvals16);
#define N_HUFFMAN_ALGO 3
-char *Ptngc_comp_get_huff_algo_name(int algo);
-char *Ptngc_comp_get_algo_name(int algo);
+char *Ptngc_comp_get_huff_algo_name(const int algo);
+char *Ptngc_comp_get_algo_name(const int algo);
#endif
diff --git a/include/compression/bwt.h b/include/compression/bwt.h
index 9f927f8..fedfc3d 100644
--- a/include/compression/bwt.h
+++ b/include/compression/bwt.h
@@ -12,15 +12,15 @@
#ifndef BWT_H
#define BWT_H
-void Ptngc_comp_to_bwt(unsigned int *vals, int nvals,
+void Ptngc_comp_to_bwt(unsigned int *vals, const int nvals,
unsigned int *output, int *index);
-void Ptngc_comp_from_bwt(unsigned int *input, int nvals, int index,
+void Ptngc_comp_from_bwt(unsigned int *input, const int nvals, int index,
unsigned int *vals);
-void Ptngc_bwt_merge_sort_inner(int *indices, int nvals,unsigned int *vals,
- int start, int end,
- unsigned int *nrepeat,
- int *workarray);
+void Ptngc_bwt_merge_sort_inner(int *indices, const int nvals, unsigned int *vals,
+ const int start, const int end,
+ unsigned int *nrepeat,
+ int *workarray);
#endif
diff --git a/include/compression/coder.h b/include/compression/coder.h
index 34b56c1..d714c82 100644
--- a/include/compression/coder.h
+++ b/include/compression/coder.h
@@ -29,10 +29,10 @@ struct coder
struct coder DECLSPECDLLEXPORT *Ptngc_coder_init(void);
void DECLSPECDLLEXPORT Ptngc_coder_deinit(struct coder *coder);
-unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder,int *input, int *length, int coding, int coding_parameter, int natoms, int speed);
-int DECLSPECDLLEXPORT Ptngc_unpack_array(struct coder *coder,unsigned char *packed,int *output, int length, int coding, int coding_parameter, int natoms);
+unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder,int *input, int *length, const int coding, const int coding_parameter, const int natoms, const int speed);
+int DECLSPECDLLEXPORT Ptngc_unpack_array(struct coder *coder,unsigned char *packed,int *output, const int length, const int coding, const int coding_parameter, const int natoms);
unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc2(struct coder *coder,int *input, int *length);
-int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc2(struct coder *coder,unsigned char *packed,int *output, int length);
+int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc2(struct coder *coder, unsigned char *packed, int *output, const int length);
unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int speed);
int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, int length, int natoms);
@@ -40,7 +40,7 @@ void DECLSPECDLLEXPORT Ptngc_out8bits(struct coder *coder, unsigned char **outpu
void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder,unsigned char **output);
void DECLSPECDLLEXPORT Ptngc_write_pattern(struct coder *coder,unsigned int pattern, int nbits, unsigned char **output);
-void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
+void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder, unsigned int value, const int nbits, unsigned char **output_ptr);
void DECLSPECDLLEXPORT Ptngc_write32bits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
void DECLSPECDLLEXPORT Ptngc_writemanybits(struct coder *coder,unsigned char *value,int nbits, unsigned char **output_ptr);
diff --git a/include/compression/dict.h b/include/compression/dict.h
index d66dd23..26eed27 100644
--- a/include/compression/dict.h
+++ b/include/compression/dict.h
@@ -14,7 +14,7 @@
void Ptngc_comp_canonical_dict(unsigned int *dict, int *ndict);
-void Ptngc_comp_make_dict_hist(unsigned int *vals, int nvals,
+void Ptngc_comp_make_dict_hist(unsigned int *vals, const int nvals,
unsigned int *dict, int *ndict,
unsigned int *hist);
diff --git a/include/compression/fixpoint.h b/include/compression/fixpoint.h
index 6be7482..7b6a667 100644
--- a/include/compression/fixpoint.h
+++ b/include/compression/fixpoint.h
@@ -17,16 +17,16 @@
typedef unsigned long fix_t;
/* Positive double to 32 bit fixed point value */
-fix_t Ptngc_ud_to_fix_t(double d,double max);
+fix_t Ptngc_ud_to_fix_t(double d, const double max);
/* double to signed 32 bit fixed point value */
-fix_t Ptngc_d_to_fix_t(double d,double max);
+fix_t Ptngc_d_to_fix_t(double d, const double max);
/* 32 bit fixed point value to positive double */
-double Ptngc_fix_t_to_ud(fix_t f, double max);
+double Ptngc_fix_t_to_ud(fix_t f, const double max);
/* signed 32 bit fixed point value to double */
-double Ptngc_fix_t_to_d(fix_t f, double max);
+double Ptngc_fix_t_to_d(fix_t f, const double max);
/* Convert a floating point variable to two 32 bit integers with range
-2.1e9 to 2.1e9 and precision to somewhere around 1e-9. */
diff --git a/include/compression/huffman.h b/include/compression/huffman.h
index 49347de..f2ce187 100644
--- a/include/compression/huffman.h
+++ b/include/compression/huffman.h
@@ -12,8 +12,8 @@
#ifndef HUFFMAN_H
#define HUFFMAN_H
-void Ptngc_comp_conv_to_huffman(unsigned int *vals, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_to_huffman(unsigned int *vals, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *prob,
unsigned char *huffman,
int *huffman_len,
@@ -23,11 +23,11 @@ void Ptngc_comp_conv_to_huffman(unsigned int *vals, int nvals,
int *huffman_dict_unpackedlen);
void Ptngc_comp_conv_from_huffman(unsigned char *huffman,
- unsigned int *vals, int nvals,
- int ndict,
+ unsigned int *vals, const int nvals,
+ const int ndict,
unsigned char *huffman_dict,
- int huffman_dictlen,
+ const int huffman_dictlen,
unsigned int *huffman_dict_unpacked,
- int huffman_dict_unpackedlen);
+ const int huffman_dict_unpackedlen);
#endif
diff --git a/include/compression/lz77.h b/include/compression/lz77.h
index ad37e5b..d4a4beb 100644
--- a/include/compression/lz77.h
+++ b/include/compression/lz77.h
@@ -12,14 +12,14 @@
#ifndef LZ77_H
#define LZ77_H
-void Ptngc_comp_to_lz77(unsigned int *vals, int nvals,
+void Ptngc_comp_to_lz77(unsigned int *vals, const int nvals,
unsigned int *data, int *ndata,
unsigned int *len, int *nlens,
unsigned int *offsets, int *noffsets);
-void Ptngc_comp_from_lz77(unsigned int *data, int ndata,
- unsigned int *len, int nlens,
- unsigned int *offsets, int noffsets,
- unsigned int *vals, int nvals);
+void Ptngc_comp_from_lz77(unsigned int *data, const int ndata,
+ unsigned int *len, const int nlens,
+ unsigned int *offsets, const int noffsets,
+ unsigned int *vals, const int nvals);
#endif
diff --git a/include/compression/merge_sort.h b/include/compression/merge_sort.h
index 48ab410..f8aaeb7 100644
--- a/include/compression/merge_sort.h
+++ b/include/compression/merge_sort.h
@@ -12,7 +12,7 @@
#ifndef MERGE_SORT_H
#define MERGE_SORT_H
-void Ptngc_merge_sort(void *base, size_t nmemb, size_t size,
+void Ptngc_merge_sort(void *base, const size_t nmemb, const size_t size,
int (*compar)(const void *v1,const void *v2,const void *private),
void *private);
diff --git a/include/compression/mtf.h b/include/compression/mtf.h
index bc4b2c8..3dc9ace 100644
--- a/include/compression/mtf.h
+++ b/include/compression/mtf.h
@@ -12,24 +12,24 @@
#ifndef MTF_H
#define MTF_H
-void Ptngc_comp_conv_to_mtf(unsigned int *vals, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_to_mtf(unsigned int *vals, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *valsmtf);
-void Ptngc_comp_conv_from_mtf(unsigned int *valsmtf, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_from_mtf(unsigned int *valsmtf, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *vals);
-void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, int nvals,
+void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, const int nvals,
unsigned int *valsmtf);
-void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, int nvals,
+void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, const int nvals,
unsigned int *vals);
-void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, int nvals,
+void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, const int nvals,
unsigned char *valsmtf);
-void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, int nvals,
+void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, const int nvals,
unsigned int *vals);
#endif
diff --git a/include/compression/rle.h b/include/compression/rle.h
index c6d4706..3665dd0 100644
--- a/include/compression/rle.h
+++ b/include/compression/rle.h
@@ -12,11 +12,11 @@
#ifndef RLE_H
#define RLE_H
-void Ptngc_comp_conv_to_rle(unsigned int *vals, int nvals,
- unsigned int *rle, int *nrle,
- int min_rle);
+void Ptngc_comp_conv_to_rle(unsigned int *vals, const int nvals,
+ unsigned int *rle, int *nrle,
+ const int min_rle);
void Ptngc_comp_conv_from_rle(unsigned int *rle,
- unsigned int *vals, int nvals);
+ unsigned int *vals, const int nvals);
#endif
diff --git a/include/compression/tng_compress.h b/include/compression/tng_compress.h
index c8b8db1..0082ba3 100644
--- a/include/compression/tng_compress.h
+++ b/include/compression/tng_compress.h
@@ -50,18 +50,18 @@
If too large values are input (compared to the precision), NULL is returned.
*/
-char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, int natoms, int nframes,
- double desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed, int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, int natoms, int nframes,
- float desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed, int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
+char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
int speed,int *algo,
int *nitems);
@@ -90,21 +90,21 @@ char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, int natoms, int nframes,
by calling tng_compress_nalgo
*/
-char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, int natoms, int nframes,
- double desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed,
int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, int natoms, int nframes,
- float desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed,
int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
- int speed,int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
+ const int speed, int *algo,
int *nitems);
/* This returns the number of integers required for the storage of the algorithm
@@ -116,36 +116,36 @@ int DECLSPECDLLEXPORT tng_compress_nalgo(void);
selection for velocities is different, so the position and
velocities routines should not be mixed. */
-char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, int natoms, int nframes,
- double desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed, int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, int natoms, int nframes,
- float desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed, int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
+char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
int speed, int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, int natoms, int nframes,
- double desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed,
int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, int natoms, int nframes,
- float desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed,
int *algo,
int *nitems);
-char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
+ const int speed,
int *algo,
int *nitems);
@@ -170,12 +170,12 @@ int DECLSPECDLLEXPORT tng_compress_uncompress_int(char *data,int *posvel, unsign
/* This converts a block of integers, as obtained from tng_compress_uncompress_int, to floating point values
either double precision or single precision. */
-void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo,
- int natoms,int nframes,
+void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
+ const int natoms, const int nframes,
double *posvel_double);
-void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo,
- int natoms,int nframes,
+void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
+ const int natoms, const int nframes,
float *posvel_float);
diff --git a/include/compression/vals16.h b/include/compression/vals16.h
index 4585755..ba1b8fb 100644
--- a/include/compression/vals16.h
+++ b/include/compression/vals16.h
@@ -12,10 +12,10 @@
#ifndef VALS16_H
#define VALS16_H
-void Ptngc_comp_conv_to_vals16(unsigned int *vals,int nvals,
- unsigned int *vals16, int *nvals16);
+void Ptngc_comp_conv_to_vals16(unsigned int *vals, const int nvals,
+ unsigned int *vals16, int *nvals16);
-void Ptngc_comp_conv_from_vals16(unsigned int *vals16,int nvals16,
- unsigned int *vals, int *nvals);
+void Ptngc_comp_conv_from_vals16(unsigned int *vals16, const int nvals16,
+ unsigned int *vals, int *nvals);
#endif
diff --git a/include/compression/warnmalloc.h b/include/compression/warnmalloc.h
index 4444271..aa63111 100644
--- a/include/compression/warnmalloc.h
+++ b/include/compression/warnmalloc.h
@@ -14,11 +14,11 @@
#include "../compression/tng_compress.h"
-void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(size_t size, char *file, int line);
+void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(const size_t size, char *file, const int line);
#define warnmalloc(size) Ptngc_warnmalloc_x(size,__FILE__,__LINE__)
-void DECLSPECDLLEXPORT *Ptngc_warnrealloc_x(void *old, size_t size, char *file, int line);
+void DECLSPECDLLEXPORT *Ptngc_warnrealloc_x(void *old, const size_t size, char *file, const int line);
#define warnrealloc(old,size) Ptngc_warnrealloc_x(old,size,__FILE__,__LINE__)
diff --git a/include/tng/tng_io.h b/include/tng/tng_io.h
index a80af58..668acbe 100644
--- a/include/tng/tng_io.h
+++ b/include/tng/tng_io.h
@@ -640,7 +640,7 @@ tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src
- (tng_trajectory_t src, tng_trajectory_t *dest_p);
+ (const tng_trajectory_t src, tng_trajectory_t *dest_p);
/**
* @brief Get the name of the input file.
@@ -672,7 +672,7 @@ tng_function_status DECLSPECDLLEXPORT tng_input_file_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_input_file_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -705,7 +705,7 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_output_file_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -721,7 +721,7 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_set
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_output_append_file_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *file_name);
/**
@@ -752,7 +752,7 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get
* could not be set.
*/
tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const tng_file_endianness endianness);
/**
@@ -785,7 +785,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -818,7 +818,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -851,7 +851,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -884,7 +884,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -917,7 +917,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -950,7 +950,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -983,7 +983,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_signature_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_first_signature_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *signature);
/**
@@ -1016,7 +1016,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_signature_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_last_signature_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *signature);
/**
@@ -1049,7 +1049,7 @@ tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name);
/**
@@ -1075,7 +1075,7 @@ tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get
* has occurred.
*/
tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -1101,7 +1101,7 @@ tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get
* has occurred.
*/
tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t len);
/**
@@ -1128,7 +1128,7 @@ tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_get
* has occurred.
*/
tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double time);
/**
@@ -1187,7 +1187,7 @@ tng_function_status DECLSPECDLLEXPORT tng_compression_precision_get
* @return TNG_SUCCESS (0) if successful.
*/
tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double precision);
/**
@@ -1202,7 +1202,7 @@ tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set
* @return TNG_SUCCESS (0) if successful.
*/
tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t n);
/**
@@ -1378,7 +1378,7 @@ tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t nr);
/**
@@ -1394,7 +1394,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame);
/**
@@ -1480,7 +1480,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_free(const tng_trajectory_t t
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_init
(const tng_trajectory_t tng_data,
- tng_molecule_t molecule);
+ const tng_molecule_t molecule);
/**
* @brief Clean up a molecule container.
@@ -1493,7 +1493,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_init
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy
(const tng_trajectory_t tng_data,
- tng_molecule_t molecule);
+ const tng_molecule_t molecule);
/**
* @brief Add a molecule to the trajectory.
@@ -1508,7 +1508,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
tng_molecule_t *molecule);
@@ -1526,7 +1526,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_add
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
const int64_t id,
tng_molecule_t *molecule);
@@ -1542,7 +1542,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_existing_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
tng_molecule_t *molecule);
/**
@@ -1578,8 +1578,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *new_name);
/**
@@ -1610,8 +1610,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const int64_t cnt);
/**
@@ -1632,9 +1632,9 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set
* be found.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
- int64_t id,
+ const int64_t id,
tng_molecule_t *molecule);
/**
@@ -1649,8 +1649,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_find
* molecule is not found.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get
- (tng_trajectory_t tng_data,
- int64_t index,
+ (const tng_trajectory_t tng_data,
+ const int64_t index,
tng_molecule_t *molecule);
/**
@@ -1667,8 +1667,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get
* @return TNG_SUCCESS(0) if the copying is successful, TNG_FAILURE if a minor
* error has occured or TNG_CRITICAL(2) if a major error has occured.
*/
-tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(tng_trajectory_t tng_data_src,
- tng_trajectory_t tng_data_dest);
+tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(const tng_trajectory_t tng_data_src,
+ const tng_trajectory_t tng_data_dest);
/**
* @brief Get the number of chains in a molecule.
@@ -1697,9 +1697,9 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_num_chains_get
* chain is not found.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_of_index_get
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
- int64_t index,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
+ const int64_t index,
tng_chain_t *chain);
/**
@@ -1785,10 +1785,10 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_of_index_get
* be found.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
- int64_t id,
+ const int64_t id,
tng_chain_t *chain);
/**
@@ -1805,8 +1805,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
tng_chain_t *chain);
@@ -1825,8 +1825,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
const int64_t id,
tng_chain_t *chain);
@@ -1845,7 +1845,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add
(const tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ const tng_molecule_t molecule,
const int64_t from_atom_id,
const int64_t to_atom_id,
tng_bond_t *bond);
@@ -1867,10 +1867,10 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add
* be found.
*/
tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_find
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
- int64_t id,
+ const int64_t id,
tng_atom_t *atom);
/**
@@ -1904,8 +1904,8 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_chain_name_set
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *new_name);
/**
@@ -1957,10 +1957,10 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_of_index_get
* be found.
*/
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
- int64_t id,
+ const int64_t id,
tng_residue_t *residue);
/**
@@ -1977,8 +1977,8 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
tng_residue_t *residue);
@@ -1997,8 +1997,8 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_w_id_add
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
const int64_t id,
tng_residue_t *residue);
@@ -2036,8 +2036,8 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_residue_name_set
- (tng_trajectory_t tng_data,
- tng_residue_t residue,
+ (const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *new_name);
/**
@@ -2089,8 +2089,8 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_atom_of_index_get
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add
- (tng_trajectory_t tng_data,
- tng_residue_t residue,
+ (const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *atom_name,
const char *atom_type,
tng_atom_t *atom);
@@ -2113,8 +2113,8 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add
* not be set properly or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_w_id_add
- (tng_trajectory_t tng_data,
- tng_residue_t residue,
+ (const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *atom_name,
const char *atom_type,
const int64_t id,
@@ -2165,8 +2165,8 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_name_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_atom_name_set
- (tng_trajectory_t tng_data,
- tng_atom_t atom,
+ (const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char *new_name);
/**
@@ -2202,8 +2202,8 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_type_get
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_atom_type_set
- (tng_trajectory_t tng_data,
- tng_atom_t atom,
+ (const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char *new_type);
/**
@@ -2224,7 +2224,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len);
+ const int max_len);
/**
* @brief Get the molecule id of real particle number (number in mol system).
@@ -2290,7 +2290,7 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len);
+ const int max_len);
/**
* @brief Get the residue name of real particle number (number in mol system).
@@ -2310,7 +2310,7 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len);
+ const int max_len);
/**
* @brief Get the residue id (local to molecule) of real particle number
@@ -2364,7 +2364,7 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len);
+ const int max_len);
/**
* @brief Get the atom type of real particle number (number in mol system).
@@ -2384,7 +2384,7 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *type,
- int max_len);
+ const int max_len);
/**
* @brief Add a particle mapping table.
@@ -2408,7 +2408,7 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t num_first_particle,
const int64_t n_particles,
const int64_t *mapping_table);
@@ -2424,7 +2424,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
* @return TNG_SUCCESS (0) if successful.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free
- (tng_trajectory_t tng_data);
+ (const tng_trajectory_t tng_data);
/**
* @brief Read the header blocks from the input_file of tng_data.
@@ -2443,7 +2443,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_file_headers_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2462,7 +2462,7 @@ tng_function_status DECLSPECDLLEXPORT tng_file_headers_read
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_file_headers_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2486,8 +2486,8 @@ tng_function_status DECLSPECDLLEXPORT tng_file_headers_write
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_block_read_next
- (tng_trajectory_t tng_data,
- tng_gen_block_t block_data,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block_data,
const char hash_mode);
/**
@@ -2503,7 +2503,7 @@ tng_function_status DECLSPECDLLEXPORT tng_block_read_next
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2523,7 +2523,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_block_id
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode,
const int64_t block_id);
@@ -2543,7 +2543,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2563,7 +2563,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_block_id
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode,
const int64_t block_id);
@@ -2582,7 +2582,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_blo
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2603,7 +2603,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_write
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode);
/**
@@ -2622,7 +2622,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_new
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames);
@@ -2644,7 +2644,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_new
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames,
const double first_frame_time);
@@ -2661,7 +2661,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new
* @return TNG_SUCCESS (0) if successful.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double first_frame_time);
/**
@@ -2710,7 +2710,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_frame_nr_of_next_frame_set_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_data_block_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const char datatype,
@@ -2755,7 +2755,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_add
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const char datatype,
@@ -2783,10 +2783,10 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add
* TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get
- (tng_trajectory_t tng_data,
- int64_t block_id,
+ (const tng_trajectory_t tng_data,
+ const int64_t block_id,
char *name,
- int max_len);
+ const int max_len);
/** @brief Get the dependency of a data block of a specific ID.
* @param tng_data is the trajectory data container.
@@ -2805,7 +2805,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get
*/
tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get
(const tng_trajectory_t tng_data,
- int64_t block_id,
+ const int64_t block_id,
int *block_dependency);
/** @brief Get the number of values per frame of a data block of a specific ID.
@@ -2822,7 +2822,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get
*/
tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get
(const tng_trajectory_t tng_data,
- int64_t block_id,
+ const int64_t block_id,
int64_t *n_values_per_frame);
/**
@@ -2846,7 +2846,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_data_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const void *values,
@@ -2880,7 +2880,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_data_write
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const int64_t val_first_particle,
@@ -2957,7 +2957,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free
* @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
-tng_function_status DECLSPECDLLEXPORT tng_data_get(tng_trajectory_t tng_data,
+tng_function_status DECLSPECDLLEXPORT tng_data_get(const tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ***values,
int64_t *n_frames,
@@ -2995,7 +2995,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_get(tng_trajectory_t tng_data,
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
int64_t *n_frames,
@@ -3036,7 +3036,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_data_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -3081,7 +3081,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_interval_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -3128,7 +3128,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_data_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ****values,
int64_t *n_frames,
@@ -3173,7 +3173,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
int64_t *n_frames,
@@ -3224,7 +3224,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -3278,7 +3278,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -3374,7 +3374,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_close
* minor error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
double *time);
@@ -3392,7 +3392,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
* @return TNG_SUCCESS (0) if successful.
*/
/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *n_mols,
int64_t **molecule_cnt_list,
tng_molecule_t *mols);
@@ -3410,14 +3410,14 @@ tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
* has occured or TNG_CRITICAL (2) if a major error has occured.
*/
/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
const int64_t cnt,
tng_molecule_t *mol);
*/
/*
// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
-// (tng_trajectory_t tng_data,
+// (const tng_trajectory_t tng_data,
// const tng_molecule_t mol,
// int64_t *n_particles,
// char ***names,
@@ -3428,7 +3428,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
// int64_t **chain_ids);
//
// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
-// (tng_trajectory_t tng_data,
+// (const tng_trajectory_t tng_data,
// tng_molecule_t mol,
// const int64_t n_particles,
// const char **names,
@@ -3459,7 +3459,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **positions,
int64_t *stride_length);
@@ -3484,7 +3484,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **velocities,
int64_t *stride_length);
@@ -3509,7 +3509,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **forces,
int64_t *stride_length);
@@ -3537,7 +3537,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **box_shape,
int64_t *stride_length);
@@ -3572,7 +3572,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
char *data_type,
@@ -3608,7 +3608,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
char *data_type,
@@ -3640,7 +3640,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **positions,
@@ -3671,7 +3671,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **velocities,
@@ -3702,7 +3702,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **forces,
@@ -3739,7 +3739,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **box_shape,
@@ -3774,7 +3774,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -3812,7 +3812,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -3849,7 +3849,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -3873,7 +3873,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3892,7 +3892,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3913,7 +3913,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3932,7 +3932,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3951,7 +3951,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3969,7 +3969,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -3988,7 +3988,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4007,7 +4007,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4025,7 +4025,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4044,7 +4044,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4063,7 +4063,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4081,7 +4081,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_s
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i);
/**
@@ -4120,7 +4120,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *values,
const int64_t n_values_per_frame,
@@ -4166,7 +4166,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *values,
const int64_t n_values_per_frame,
@@ -4197,7 +4197,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *positions);
@@ -4224,7 +4224,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *positions);
@@ -4250,7 +4250,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *velocities);
@@ -4277,7 +4277,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *velocities);
@@ -4303,7 +4303,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *forces);
@@ -4330,7 +4330,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *forces);
@@ -4355,7 +4355,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *box_shape);
@@ -4381,7 +4381,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *box_shape);
@@ -4425,7 +4425,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *values,
@@ -4475,7 +4475,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *values,
@@ -4511,7 +4511,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *positions);
@@ -4542,7 +4542,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *positions);
@@ -4573,7 +4573,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *velocities);
@@ -4604,7 +4604,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *velocities);
@@ -4635,7 +4635,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *forces);
@@ -4666,7 +4666,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *forces);
@@ -4696,7 +4696,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *box_shape);
@@ -4726,7 +4726,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *box_shape);
@@ -4753,7 +4753,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
int64_t *codec_id,
double *factor);
@@ -4792,7 +4792,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get
* has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_data_blocks_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t current_frame,
const int64_t n_requested_data_block_ids,
const int64_t *requested_data_block_ids,
@@ -4858,7 +4858,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_dat
*/
/*
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *n_data_blocks,
int64_t **data_block_ids,
char ***data_block_names,
@@ -4881,7 +4881,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_g
* if a major error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t prev_frame);
@@ -4894,7 +4894,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame
* error has occured.
*/
tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
int64_t *n_frames);
/** @} */ /* end of group2 */
diff --git a/src/compression/bwlzh.c b/src/compression/bwlzh.c
index de009d9..f4c0c28 100644
--- a/src/compression/bwlzh.c
+++ b/src/compression/bwlzh.c
@@ -40,13 +40,13 @@
#define PARTIAL_MTF
#endif
-int bwlzh_get_buflen(int nvals)
+int bwlzh_get_buflen(const int nvals)
{
return 132000+nvals*8+12*((nvals+MAX_VALS_PER_BLOCK)/MAX_VALS_PER_BLOCK);
}
#ifdef SHOWIT
-static void printvals(char *name, unsigned int *vals, int nvals)
+static void printvals(const char *name, unsigned int *vals, const int nvals)
{
int i;
int nvalsmax=nvals;
@@ -69,10 +69,10 @@ static void printvals(char *name, unsigned int *vals, int nvals)
#endif
-static void bwlzh_compress_gen(unsigned int *vals, int nvals,
+static void bwlzh_compress_gen(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len,
- int enable_lz77,
- int verbose)
+ const int enable_lz77,
+ const int verbose)
{
unsigned int *vals16;
int nvals16;
@@ -460,35 +460,35 @@ static void bwlzh_compress_gen(unsigned int *vals, int nvals,
}
-void DECLSPECDLLEXPORT bwlzh_compress(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len)
{
bwlzh_compress_gen(vals,nvals,output,output_len,1,0);
}
-void DECLSPECDLLEXPORT bwlzh_compress_verbose(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_verbose(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len)
{
bwlzh_compress_gen(vals,nvals,output,output_len,1,1);
}
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_no_lz77(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len)
{
bwlzh_compress_gen(vals,nvals,output,output_len,0,0);
}
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77_verbose(unsigned int *vals, int nvals,
+void DECLSPECDLLEXPORT bwlzh_compress_no_lz77_verbose(unsigned int *vals, const int nvals,
unsigned char *output, int *output_len)
{
bwlzh_compress_gen(vals,nvals,output,output_len,0,1);
}
-static void bwlzh_decompress_gen(unsigned char *input, int nvals,
+static void bwlzh_decompress_gen(unsigned char *input, const int nvals,
unsigned int *vals,
- int verbose)
+ const int verbose)
{
unsigned int *vals16;
int nvals16;
@@ -785,13 +785,13 @@ static void bwlzh_decompress_gen(unsigned char *input, int nvals,
}
-void DECLSPECDLLEXPORT bwlzh_decompress(unsigned char *input, int nvals,
+void DECLSPECDLLEXPORT bwlzh_decompress(unsigned char *input, const int nvals,
unsigned int *vals)
{
bwlzh_decompress_gen(input,nvals,vals,0);
}
-void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, int nvals,
+void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, const int nvals,
unsigned int *vals)
{
bwlzh_decompress_gen(input,nvals,vals,1);
diff --git a/src/compression/bwt.c b/src/compression/bwt.c
index 681d66b..c5c46df 100644
--- a/src/compression/bwt.c
+++ b/src/compression/bwt.c
@@ -22,7 +22,7 @@
#define SHOWIT2
#endif
-static int compare_index(int i1,int i2,int nvals,unsigned int *vals,unsigned int *nrepeat)
+static int compare_index(int i1,int i2, const int nvals, unsigned int *vals, unsigned int *nrepeat)
{
int i,j;
for (i=0; i<nvals; i++)
@@ -75,10 +75,10 @@ static int compare_index(int i1,int i2,int nvals,unsigned int *vals,unsigned int
return 0;
}
-void Ptngc_bwt_merge_sort_inner(int *indices, int nvals,unsigned int *vals,
- int start, int end,
- unsigned int *nrepeat,
- int *workarray)
+void Ptngc_bwt_merge_sort_inner(int *indices, const int nvals,unsigned int *vals,
+ const int start, const int end,
+ unsigned int *nrepeat,
+ int *workarray)
{
int middle;
if ((end-start)>1)
@@ -140,8 +140,8 @@ void Ptngc_bwt_merge_sort_inner(int *indices, int nvals,unsigned int *vals,
}
/* Burrows-Wheeler transform. */
-void Ptngc_comp_to_bwt(unsigned int *vals, int nvals,
- unsigned int *output, int *index)
+void Ptngc_comp_to_bwt(unsigned int *vals, const int nvals,
+ unsigned int *output, int *index)
{
int i;
int *indices=warnmalloc(2*nvals*sizeof *indices);
@@ -305,8 +305,8 @@ void Ptngc_comp_to_bwt(unsigned int *vals, int nvals,
}
/* Burrows-Wheeler inverse transform. */
-void Ptngc_comp_from_bwt(unsigned int *input, int nvals, int index,
- unsigned int *vals)
+void Ptngc_comp_from_bwt(unsigned int *input, const int nvals, int index,
+ unsigned int *vals)
{
/* Straightforward from the Burrows-Wheeler paper (page 13). */
int i;
diff --git a/src/compression/coder.c b/src/compression/coder.c
index d51e8cd..d0a0d99 100644
--- a/src/compression/coder.c
+++ b/src/compression/coder.c
@@ -78,7 +78,7 @@ void DECLSPECDLLEXPORT Ptngc_write_pattern(struct coder *coder_inst, unsigned in
/* Write up to 24 bits */
TNG_INLINE void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder_inst,
- unsigned int value, int nbits,
+ unsigned int value, const int nbits,
unsigned char **output_ptr)
{
/* Make room for the bits. */
@@ -89,7 +89,7 @@ TNG_INLINE void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder_inst,
}
/* Write up to 32 bits */
-void DECLSPECDLLEXPORT Ptngc_write32bits(struct coder *coder_inst,unsigned int value,
+void DECLSPECDLLEXPORT Ptngc_write32bits(struct coder *coder_inst, unsigned int value,
int nbits, unsigned char **output_ptr)
{
unsigned int mask;
@@ -165,8 +165,8 @@ static int write_stop_bit_code(struct coder *coder_inst, unsigned int s,
return 0;
}
-static int pack_stopbits_item(struct coder *coder_inst,int item,
- unsigned char **output, int coding_parameter)
+static int pack_stopbits_item(struct coder *coder_inst, const int item,
+ unsigned char **output, const int coding_parameter)
{
/* Find this symbol in table. */
int s=0;
@@ -178,8 +178,8 @@ static int pack_stopbits_item(struct coder *coder_inst,int item,
}
static int pack_triplet(struct coder *coder_inst, unsigned int *s,
- unsigned char **output, int coding_parameter,
- unsigned int max_base, int maxbits)
+ unsigned char **output, const int coding_parameter,
+ const unsigned int max_base, const int maxbits)
{
/* Determine base for this triplet. */
unsigned int min_base=1U<<coding_parameter;
@@ -211,7 +211,7 @@ static int pack_triplet(struct coder *coder_inst, unsigned int *s,
return 0;
}
-void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder_inst,unsigned char **output)
+void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder_inst, unsigned char **output)
{
/* Zero-fill just enough. */
if (coder_inst->pack_temporary_bits>0)
@@ -219,8 +219,8 @@ void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder_inst,unsigned char *
}
unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder_inst,
- int *input, int *length, int coding,
- int coding_parameter, int natoms, int speed)
+ int *input, int *length, const int coding,
+ const int coding_parameter, const int natoms, const int speed)
{
if ((coding==TNG_COMPRESS_ALGO_BWLZH1) || (coding==TNG_COMPRESS_ALGO_BWLZH2))
{
@@ -337,7 +337,7 @@ unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder_inst,
static int unpack_array_stop_bits(struct coder *coder_inst,
unsigned char *packed,int *output,
- int length, int coding_parameter)
+ const int length, const int coding_parameter)
{
int i,j;
unsigned int extract_mask=0x80;
@@ -392,7 +392,7 @@ static int unpack_array_stop_bits(struct coder *coder_inst,
static int unpack_array_triplet(struct coder *coder_inst,
unsigned char *packed, int *output,
- int length, int coding_parameter)
+ int length, const int coding_parameter)
{
int i,j;
unsigned int extract_mask=0x80;
@@ -466,7 +466,7 @@ static int unpack_array_triplet(struct coder *coder_inst,
static int unpack_array_bwlzh(struct coder *coder_inst,
unsigned char *packed, int *output,
- int length, int natoms)
+ const int length, const int natoms)
{
int i,j,k,n=length;
unsigned int *pval=warnmalloc(n*sizeof *pval);
@@ -491,8 +491,8 @@ static int unpack_array_bwlzh(struct coder *coder_inst,
int DECLSPECDLLEXPORT Ptngc_unpack_array(struct coder *coder_inst,
unsigned char *packed, int *output,
- int length, int coding, int coding_parameter,
- int natoms)
+ const int length, const int coding, const int coding_parameter,
+ const int natoms)
{
if ((coding==TNG_COMPRESS_ALGO_STOPBIT) ||
(coding==TNG_COMPRESS_ALGO_VEL_STOPBIT_INTER))
diff --git a/src/compression/dict.c b/src/compression/dict.c
index fdfe7a0..7c32d74 100644
--- a/src/compression/dict.c
+++ b/src/compression/dict.c
@@ -21,7 +21,7 @@ void Ptngc_comp_canonical_dict(unsigned int *dict, int *ndict)
*ndict=0x20004;
}
-void Ptngc_comp_make_dict_hist(unsigned int *vals, int nvals,
+void Ptngc_comp_make_dict_hist(unsigned int *vals, const int nvals,
unsigned int *dict, int *ndict,
unsigned int *hist)
{
diff --git a/src/compression/fixpoint.c b/src/compression/fixpoint.c
index 17fe6e8..f769a43 100644
--- a/src/compression/fixpoint.c
+++ b/src/compression/fixpoint.c
@@ -19,7 +19,7 @@
/* Conversion routines from / to double precision */
/* Positive double to 32 bit fixed point value */
-fix_t Ptngc_ud_to_fix_t(double d,double max)
+fix_t Ptngc_ud_to_fix_t(double d, const double max)
{
fix_t val;
if (d<0.)
@@ -33,7 +33,7 @@ fix_t Ptngc_ud_to_fix_t(double d,double max)
}
/* double to signed 32 bit fixed point value */
-fix_t Ptngc_d_to_fix_t(double d,double max)
+fix_t Ptngc_d_to_fix_t(double d, const double max)
{
fix_t val;
int sign=0;
@@ -54,13 +54,13 @@ fix_t Ptngc_d_to_fix_t(double d,double max)
/* 32 bit fixed point value to positive double */
-double Ptngc_fix_t_to_ud(fix_t f, double max)
+double Ptngc_fix_t_to_ud(fix_t f, const double max)
{
return (double)f*(max/MAX32BIT);
}
/* signed 32 bit fixed point value to double */
-double Ptngc_fix_t_to_d(fix_t f, double max)
+double Ptngc_fix_t_to_d(fix_t f, const double max)
{
int sign=0;
double d;
diff --git a/src/compression/huffman.c b/src/compression/huffman.c
index 2abcbcf..f2a2933 100644
--- a/src/compression/huffman.c
+++ b/src/compression/huffman.c
@@ -70,7 +70,7 @@ static void assign_codes(union htree_nodeleaf *htree,
struct codelength *codelength,
unsigned int code,
int length,
- int top)
+ const int top)
{
#if 0
printf("Assign codes called with code %d length %d\n",code,length);
@@ -131,7 +131,7 @@ static void flush_8bits(unsigned int *combine, unsigned char **output, int *bitp
}
}
-static void writebits(unsigned int value,int length, unsigned char **output, int *bitptr)
+static void writebits(unsigned int value, int length, unsigned char **output, int *bitptr)
{
unsigned int mask;
unsigned int combine=(unsigned int)**output;
@@ -216,8 +216,8 @@ static int comp_codes_value(const void *codeptr1, const void *codeptr2, const vo
/* The huffman_dict array should be 131077 (0x20005) long. The
huffman_dict_unpacked array should be 131077 long (note five longer than
0x20000) */
-void Ptngc_comp_conv_to_huffman(unsigned int *vals, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_to_huffman(unsigned int *vals, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *prob,
unsigned char *huffman,
int *huffman_len,
@@ -463,12 +463,12 @@ void Ptngc_comp_conv_to_huffman(unsigned int *vals, int nvals,
}
void Ptngc_comp_conv_from_huffman(unsigned char *huffman,
- unsigned int *vals, int nvals,
- int ndict,
+ unsigned int *vals, const int nvals,
+ const int ndict,
unsigned char *huffman_dict,
- int huffman_dictlen,
+ const int huffman_dictlen,
unsigned int *huffman_dict_unpacked,
- int huffman_dict_unpackedlen)
+ const int huffman_dict_unpackedlen)
{
struct codelength *codelength=warnmalloc(ndict*sizeof *codelength);
int i,j;
diff --git a/src/compression/huffmem.c b/src/compression/huffmem.c
index 183eff1..3898115 100644
--- a/src/compression/huffmem.c
+++ b/src/compression/huffmem.c
@@ -19,7 +19,7 @@
#include "../../include/compression/rle.h"
#include "../../include/compression/vals16.h"
-int Ptngc_comp_huff_buflen(int nvals)
+int Ptngc_comp_huff_buflen(const int nvals)
{
return 132000+nvals*8;
}
@@ -29,7 +29,7 @@ void Ptngc_comp_huff_compress_verbose(unsigned int *vals, int nvals,
unsigned char *huffman, int *huffman_len,
int *huffdatalen,
int *huffman_lengths,int *chosen_algo,
- int isvals16)
+ const int isvals16)
{
unsigned int *dict=warnmalloc(0x20005*sizeof *dict);
unsigned int *hist=warnmalloc(0x20005*sizeof *hist);
@@ -227,7 +227,7 @@ void Ptngc_comp_huff_compress_verbose(unsigned int *vals, int nvals,
free(dict);
}
-void Ptngc_comp_huff_compress(unsigned int *vals, int nvals,
+void Ptngc_comp_huff_compress(unsigned int *vals, const int nvals,
unsigned char *huffman, int *huffman_len)
{
int huffman_lengths[N_HUFFMAN_ALGO];
@@ -237,7 +237,7 @@ void Ptngc_comp_huff_compress(unsigned int *vals, int nvals,
huffman_lengths,&algo,0);
}
-void Ptngc_comp_huff_decompress(unsigned char *huffman, int huffman_len,
+void Ptngc_comp_huff_decompress(unsigned char *huffman, const int huffman_len,
unsigned int *vals)
{
int isvals16=(int)huffman[0];
@@ -346,7 +346,7 @@ static char *huff_algo_names[N_HUFFMAN_ALGO]=
"Huffman (dict=RLE+Huffman)"
};
-char *Ptngc_comp_get_huff_algo_name(int algo)
+char *Ptngc_comp_get_huff_algo_name(const int algo)
{
if (algo<0)
return NULL;
diff --git a/src/compression/lz77.c b/src/compression/lz77.c
index 17b147c..d8bfecb 100644
--- a/src/compression/lz77.c
+++ b/src/compression/lz77.c
@@ -147,7 +147,7 @@ static void sort_strings(unsigned int *vals, int nvals,
#define MAX_OFFSET 0xFFFF
#define MAX_STRING_SEARCH 8
-static void add_circular(int *previous,int v, int i)
+static void add_circular(int *previous, const int v, const int i)
{
if (previous[(NUM_PREVIOUS+3)*v+2]!=i-1)
{
@@ -162,7 +162,7 @@ static void add_circular(int *previous,int v, int i)
previous[(NUM_PREVIOUS+3)*v+2]=i;
}
-void Ptngc_comp_to_lz77(unsigned int *vals, int nvals,
+void Ptngc_comp_to_lz77(unsigned int *vals, const int nvals,
unsigned int *data, int *ndata,
unsigned int *len, int *nlens,
unsigned int *offsets, int *noffsets)
@@ -306,10 +306,10 @@ void Ptngc_comp_to_lz77(unsigned int *vals, int nvals,
free(previous);
}
-void Ptngc_comp_from_lz77(unsigned int *data, int ndata,
- unsigned int *len, int nlens,
- unsigned int *offsets, int noffsets,
- unsigned int *vals, int nvals)
+void Ptngc_comp_from_lz77(unsigned int *data, const int ndata,
+ unsigned int *len, const int nlens,
+ unsigned int *offsets, const int noffsets,
+ unsigned int *vals, const int nvals)
{
int i=0;
int joff=0;
diff --git a/src/compression/merge_sort.c b/src/compression/merge_sort.c
index 7cb9837..63622cc 100644
--- a/src/compression/merge_sort.c
+++ b/src/compression/merge_sort.c
@@ -15,8 +15,8 @@
#include "../../include/compression/warnmalloc.h"
#include "../../include/compression/merge_sort.h"
-static void ms_inner(void *base, size_t size,
- size_t start, size_t end,
+static void ms_inner(void *base, const size_t size,
+ const size_t start, const size_t end,
int (*compar)(const void *v1,const void *v2,const void *private),
const void *private,
char *workarray)
@@ -80,7 +80,7 @@ static void ms_inner(void *base, size_t size,
}
-void Ptngc_merge_sort(void *base, size_t nmemb, size_t size,
+void Ptngc_merge_sort(void *base, const size_t nmemb, const size_t size,
int (*compar)(const void *v1,const void *v2,const void *private),
void *private)
{
diff --git a/src/compression/mtf.c b/src/compression/mtf.c
index bfb0e19..5219413 100644
--- a/src/compression/mtf.c
+++ b/src/compression/mtf.c
@@ -17,7 +17,7 @@
/* "Partial" MTF. Byte based. */
/* Move to front coding.
Acceptable inputs are max 8 bits (0-0xFF) */
-static void comp_conv_to_mtf_byte(unsigned char *vals, int nvals,
+static void comp_conv_to_mtf_byte(unsigned char *vals, const int nvals,
unsigned char *valsmtf)
{
int i;
@@ -59,7 +59,7 @@ static void comp_conv_to_mtf_byte(unsigned char *vals, int nvals,
}
}
-void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, int nvals,
+void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, const int nvals,
unsigned int *valsmtf)
{
unsigned char *tmp=warnmalloc(nvals*2);
@@ -78,7 +78,7 @@ void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, int nvals,
free(tmp);
}
-void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, int nvals,
+void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, const int nvals,
unsigned char *valsmtf)
{
unsigned char *tmp=warnmalloc(nvals);
@@ -93,7 +93,7 @@ void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, int nvals,
}
/* Move to front decoding */
-static void comp_conv_from_mtf_byte(unsigned char *valsmtf, int nvals,
+static void comp_conv_from_mtf_byte(unsigned char *valsmtf, const int nvals,
unsigned char *vals)
{
int i;
@@ -135,7 +135,7 @@ static void comp_conv_from_mtf_byte(unsigned char *valsmtf, int nvals,
}
}
-void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, int nvals,
+void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, const int nvals,
unsigned int *vals)
{
unsigned char *tmp=warnmalloc(nvals*2);
@@ -154,7 +154,7 @@ void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, int nvals,
free(tmp);
}
-void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, int nvals,
+void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, const int nvals,
unsigned int *vals)
{
unsigned char *tmp=warnmalloc(nvals);
@@ -173,8 +173,8 @@ void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, int nvals,
/* Move to front coding.
Acceptable inputs are max 24 bits (0-0xFFFFFF) */
-void Ptngc_comp_conv_to_mtf(unsigned int *vals, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_to_mtf(unsigned int *vals, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *valsmtf)
{
int i;
@@ -215,8 +215,8 @@ void Ptngc_comp_conv_to_mtf(unsigned int *vals, int nvals,
}
/* Move to front decoding */
-void Ptngc_comp_conv_from_mtf(unsigned int *valsmtf, int nvals,
- unsigned int *dict, int ndict,
+void Ptngc_comp_conv_from_mtf(unsigned int *valsmtf, const int nvals,
+ unsigned int *dict, const int ndict,
unsigned int *vals)
{
int i;
diff --git a/src/compression/rle.c b/src/compression/rle.c
index adaee65..1273dd8 100644
--- a/src/compression/rle.c
+++ b/src/compression/rle.c
@@ -12,8 +12,8 @@
#include "../../include/compression/rle.h"
static void add_rle(unsigned int *rle,
- int v,int nsim,
- int *j,int min_rle)
+ const int v, int nsim,
+ int *j, const int min_rle)
{
if (nsim>min_rle)
{
@@ -36,9 +36,9 @@ static void add_rle(unsigned int *rle,
/* Run length encoding.
Acceptable inputs are about 16 bits (0-0xFFFF)
If input is 0-N output will be be values of 0-(N+2) */
-void Ptngc_comp_conv_to_rle(unsigned int *vals, int nvals,
- unsigned int *rle, int *nrle,
- int min_rle)
+void Ptngc_comp_conv_to_rle(unsigned int *vals, const int nvals,
+ unsigned int *rle, int *nrle,
+ const int min_rle)
{
int i;
int j=0;
@@ -69,7 +69,7 @@ void Ptngc_comp_conv_to_rle(unsigned int *vals, int nvals,
}
void Ptngc_comp_conv_from_rle(unsigned int *rle,
- unsigned int *vals, int nvals)
+ unsigned int *vals, const int nvals)
{
int i=0;
int j=0;
diff --git a/src/compression/tng_compress.c b/src/compression/tng_compress.c
index b39d722..d6497d5 100644
--- a/src/compression/tng_compress.c
+++ b/src/compression/tng_compress.c
@@ -28,7 +28,7 @@
#define MAX_FVAL 2147483647.
-static int verify_input_data(double *x, int natoms, int nframes, double precision)
+static int verify_input_data(double *x, const int natoms, const int nframes, const double precision)
{
int iframe, i, j;
for (iframe=0; iframe<nframes; iframe++)
@@ -48,7 +48,7 @@ static int verify_input_data(double *x, int natoms, int nframes, double precisio
return 1;
}
-static int verify_input_data_float(float *x, int natoms, int nframes, float precision)
+static int verify_input_data_float(float *x, const int natoms, const int nframes, const float precision)
{
int iframe, i, j;
for (iframe=0; iframe<nframes; iframe++)
@@ -68,9 +68,9 @@ static int verify_input_data_float(float *x, int natoms, int nframes, float prec
return 1;
}
-static int quantize(double *x, int natoms, int nframes,
- double precision,
- int *quant)
+static int quantize(double *x, const int natoms, const int nframes,
+ const double precision,
+ int *quant)
{
int iframe, i, j;
for (iframe=0; iframe<nframes; iframe++)
@@ -80,9 +80,9 @@ static int quantize(double *x, int natoms, int nframes,
return verify_input_data(x,natoms,nframes,precision);
}
-static int quantize_float(float *x, int natoms, int nframes,
- float precision,
- int *quant)
+static int quantize_float(float *x, int natoms, const int nframes,
+ const float precision,
+ int *quant)
{
int iframe, i, j;
for (iframe=0; iframe<nframes; iframe++)
@@ -92,7 +92,7 @@ static int quantize_float(float *x, int natoms, int nframes,
return verify_input_data_float(x,natoms,nframes,precision);
}
-static void quant_inter_differences(int *quant, int natoms, int nframes,
+static void quant_inter_differences(int *quant, const int natoms, const int nframes,
int *quant_inter)
{
int iframe, i, j;
@@ -107,7 +107,7 @@ static void quant_inter_differences(int *quant, int natoms, int nframes,
quant_inter[iframe*natoms*3+i*3+j]=quant[iframe*natoms*3+i*3+j]-quant[(iframe-1)*natoms*3+i*3+j];
}
-static void quant_intra_differences(int *quant, int natoms, int nframes,
+static void quant_intra_differences(int *quant, const int natoms, const int nframes,
int *quant_intra)
{
int iframe, i, j;
@@ -123,8 +123,8 @@ static void quant_intra_differences(int *quant, int natoms, int nframes,
}
}
-static void unquantize(double *x, int natoms, int nframes,
- double precision,
+static void unquantize(double *x, int natoms, const int nframes,
+ const double precision,
int *quant)
{
int iframe, i, j;
@@ -134,8 +134,8 @@ static void unquantize(double *x, int natoms, int nframes,
x[iframe*natoms*3+i*3+j]=(double)quant[iframe*natoms*3+i*3+j]*precision;
}
-static void unquantize_float(float *x, int natoms, int nframes,
- float precision,
+static void unquantize_float(float *x, const int natoms, const int nframes,
+ const float precision,
int *quant)
{
int iframe, i, j;
@@ -145,8 +145,8 @@ static void unquantize_float(float *x, int natoms, int nframes,
x[iframe*natoms*3+i*3+j]=(float)quant[iframe*natoms*3+i*3+j]*precision;
}
-static void unquantize_inter_differences(double *x, int natoms, int nframes,
- double precision,
+static void unquantize_inter_differences(double *x, int natoms, const int nframes,
+ const double precision,
int *quant)
{
int iframe, i, j;
@@ -163,8 +163,8 @@ static void unquantize_inter_differences(double *x, int natoms, int nframes,
}
}
-static void unquantize_inter_differences_float(float *x, int natoms, int nframes,
- float precision,
+static void unquantize_inter_differences_float(float *x, const int natoms, const int nframes,
+ const float precision,
int *quant)
{
int iframe, i, j;
@@ -181,7 +181,7 @@ static void unquantize_inter_differences_float(float *x, int natoms, int nframes
}
}
-static void unquantize_inter_differences_int(int *x, int natoms, int nframes,
+static void unquantize_inter_differences_int(int *x, const int natoms, const int nframes,
int *quant)
{
int iframe, i, j;
@@ -200,7 +200,7 @@ static void unquantize_inter_differences_int(int *x, int natoms, int nframes,
/* In frame update required for the initial frame if intra-frame
compression was used. */
-static void unquant_intra_differences_first_frame(int *quant, int natoms)
+static void unquant_intra_differences_first_frame(int *quant, const int natoms)
{
int i,j;
for (j=0; j<3; j++)
@@ -221,8 +221,8 @@ static void unquant_intra_differences_first_frame(int *quant, int natoms)
#endif
}
-static void unquantize_intra_differences(double *x, int natoms, int nframes,
- double precision,
+static void unquantize_intra_differences(double *x, const int natoms, const int nframes,
+ const double precision,
int *quant)
{
int iframe, i, j;
@@ -242,8 +242,8 @@ static void unquantize_intra_differences(double *x, int natoms, int nframes,
}
}
-static void unquantize_intra_differences_float(float *x, int natoms, int nframes,
- float precision,
+static void unquantize_intra_differences_float(float *x, const int natoms, const int nframes,
+ const float precision,
int *quant)
{
int iframe, i, j;
@@ -260,7 +260,7 @@ static void unquantize_intra_differences_float(float *x, int natoms, int nframes
}
}
-static void unquantize_intra_differences_int(int *x, int natoms, int nframes,
+static void unquantize_intra_differences_int(int *x, const int natoms, const int nframes,
int *quant)
{
int iframe, i, j;
@@ -308,11 +308,11 @@ static fix_t readbufferfix(unsigned char *buf, int num)
/* Perform position compression from the quantized data. */
static void compress_quantized_pos(int *quant, int *quant_inter, int *quant_intra,
- int natoms, int nframes,
- int speed,
- int initial_coding, int initial_coding_parameter,
- int coding, int coding_parameter,
- fix_t prec_hi, fix_t prec_lo,
+ const int natoms, const int nframes,
+ const int speed,
+ const int initial_coding, const int initial_coding_parameter,
+ const int coding, const int coding_parameter,
+ const fix_t prec_hi, const fix_t prec_lo,
int *nitems,
char *data)
{
@@ -436,11 +436,11 @@ static void compress_quantized_pos(int *quant, int *quant_inter, int *quant_intr
/* Perform velocity compression from vel into the data block */
static void compress_quantized_vel(int *quant, int *quant_inter,
- int natoms, int nframes,
- int speed,
- int initial_coding, int initial_coding_parameter,
- int coding, int coding_parameter,
- fix_t prec_hi, fix_t prec_lo,
+ const int natoms, const int nframes,
+ const int speed,
+ const int initial_coding, const int initial_coding_parameter,
+ const int coding, const int coding_parameter,
+ const fix_t prec_hi, const fix_t prec_lo,
int *nitems,
char *data)
{
@@ -544,7 +544,7 @@ static void compress_quantized_vel(int *quant, int *quant_inter,
}
static int determine_best_coding_stop_bits(struct coder *coder,int *input, int *length,
- int *coding_parameter, int natoms)
+ int *coding_parameter, const int natoms)
{
int bits;
unsigned char *packed;
@@ -575,7 +575,7 @@ static int determine_best_coding_stop_bits(struct coder *coder,int *input, int *
}
static int determine_best_coding_triple(struct coder *coder,int *input, int *length,
- int *coding_parameter, int natoms)
+ int *coding_parameter, const int natoms)
{
int bits;
unsigned char *packed;
@@ -605,8 +605,8 @@ static int determine_best_coding_triple(struct coder *coder,int *input, int *len
return 0;
}
-static void determine_best_pos_initial_coding(int *quant, int *quant_intra, int natoms, int speed,
- fix_t prec_hi, fix_t prec_lo,
+static void determine_best_pos_initial_coding(int *quant, int *quant_intra, const int natoms, const int speed,
+ const fix_t prec_hi, const fix_t prec_lo,
int *initial_coding, int *initial_coding_parameter)
{
if (*initial_coding==-1)
@@ -718,8 +718,8 @@ static void determine_best_pos_initial_coding(int *quant, int *quant_intra, int
}
}
-static void determine_best_pos_coding(int *quant, int *quant_inter, int *quant_intra, int natoms, int nframes, int speed,
- fix_t prec_hi, fix_t prec_lo,
+static void determine_best_pos_coding(int *quant, int *quant_inter, int *quant_intra, const int natoms, const int nframes, const int speed,
+ const fix_t prec_hi, const fix_t prec_lo,
int *coding, int *coding_parameter)
{
if (*coding==-1)
@@ -896,8 +896,8 @@ static void determine_best_pos_coding(int *quant, int *quant_inter, int *quant_i
}
}
-static void determine_best_vel_initial_coding(int *quant, int natoms, int speed,
- fix_t prec_hi, fix_t prec_lo,
+static void determine_best_vel_initial_coding(int *quant, const int natoms, const int speed,
+ const fix_t prec_hi, const fix_t prec_lo,
int *initial_coding, int *initial_coding_parameter)
{
if (*initial_coding==-1)
@@ -979,8 +979,8 @@ static void determine_best_vel_initial_coding(int *quant, int natoms, int speed,
}
}
-static void determine_best_vel_coding(int *quant, int *quant_inter, int natoms, int nframes, int speed,
- fix_t prec_hi, fix_t prec_lo,
+static void determine_best_vel_coding(int *quant, int *quant_inter, const int natoms, const int nframes, const int speed,
+ const fix_t prec_hi, const fix_t prec_lo,
int *coding, int *coding_parameter)
{
if (*coding==-1)
@@ -1137,8 +1137,8 @@ static void determine_best_vel_coding(int *quant, int *quant_inter, int natoms,
}
}
-char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
+char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
int speed,int *algo,
int *nitems)
{
@@ -1217,9 +1217,9 @@ char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, int natoms, int nframes,
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, int natoms, int nframes,
- double desired_precision,
- int speed,int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed,int *algo,
int *nitems)
{
int *quant=malloc(natoms*nframes*3*sizeof *quant);
@@ -1235,9 +1235,9 @@ char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, int natoms, int nframes,
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, int natoms, int nframes,
- float desired_precision,
- int speed,int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed, int *algo,
int *nitems)
{
int *quant=malloc(natoms*nframes*3*sizeof *quant);
@@ -1253,9 +1253,9 @@ char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, int natoms, int nfram
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, int natoms, int nframes,
- double desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed,
int *algo,
int *nitems)
{
@@ -1266,9 +1266,9 @@ char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, int natoms, int
return tng_compress_pos(pos,natoms,nframes,desired_precision,speed,algo,nitems);
}
-char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, int natoms, int nframes,
- float desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed,
int *algo,
int *nitems)
{
@@ -1279,9 +1279,9 @@ char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, int natoms,
return tng_compress_pos_float(pos,natoms,nframes,desired_precision,speed,algo,nitems);
}
-char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
- int speed,int *algo,
+char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
+ const int speed, int *algo,
int *nitems)
{
algo[0]=-1;
@@ -1303,8 +1303,8 @@ int DECLSPECDLLEXPORT tng_compress_nalgo(void)
4) One parameter to the algorithm for the remaining frames (the coding parameter). */
}
-char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
+char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
int speed, int *algo,
int *nitems)
{
@@ -1380,9 +1380,9 @@ char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, int natoms, int nframes,
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, int natoms, int nframes,
- double desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed, int *algo,
int *nitems)
{
int *quant=malloc(natoms*nframes*3*sizeof *quant);
@@ -1397,9 +1397,9 @@ char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, int natoms, int nframes,
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, int natoms, int nframes,
- float desired_precision,
- int speed, int *algo,
+char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed, int *algo,
int *nitems)
{
int *quant=malloc(natoms*nframes*3*sizeof *quant);
@@ -1414,9 +1414,9 @@ char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, int natoms, int nfram
return data;
}
-char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, int natoms, int nframes,
- double desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, const int natoms, const int nframes,
+ const double desired_precision,
+ const int speed,
int *algo,
int *nitems)
{
@@ -1427,9 +1427,9 @@ char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, int natoms, int
return tng_compress_vel(vel,natoms,nframes,desired_precision,speed,algo,nitems);
}
-char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, int natoms, int nframes,
- float desired_precision,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, const int natoms, const int nframes,
+ const float desired_precision,
+ const int speed,
int *algo,
int *nitems)
{
@@ -1440,9 +1440,9 @@ char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, int natoms,
return tng_compress_vel_float(vel,natoms,nframes,desired_precision,speed,algo,nitems);
}
-char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, int natoms, int nframes,
- unsigned long prec_hi, unsigned long prec_lo,
- int speed,
+char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, const int natoms, const int nframes,
+ const unsigned long prec_hi, const unsigned long prec_lo,
+ const int speed,
int *algo,
int *nitems)
{
@@ -1811,15 +1811,15 @@ int DECLSPECDLLEXPORT tng_compress_uncompress_int(char *data,int *posvel, unsign
return 1;
}
-void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo,
- int natoms,int nframes,
+void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
+ const int natoms, const int nframes,
double *posvel_double)
{
unquantize(posvel_double,natoms,nframes,PRECISION(prec_hi,prec_lo),posvel_int);
}
-void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int,unsigned long prec_hi, unsigned long prec_lo,
- int natoms,int nframes,
+void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
+ const int natoms, const int nframes,
float *posvel_float)
{
unquantize_float(posvel_float,natoms,nframes,(float)PRECISION(prec_hi,prec_lo),posvel_int);
diff --git a/src/compression/vals16.c b/src/compression/vals16.c
index c4ed635..48186f6 100644
--- a/src/compression/vals16.c
+++ b/src/compression/vals16.c
@@ -13,8 +13,8 @@
/* Coding 32 bit ints in sequences of 16 bit ints. Worst case
the output is 3*nvals long. */
-void Ptngc_comp_conv_to_vals16(unsigned int *vals,int nvals,
- unsigned int *vals16, int *nvals16)
+void Ptngc_comp_conv_to_vals16(unsigned int *vals, const int nvals,
+ unsigned int *vals16, int *nvals16)
{
int i;
int j=0;
@@ -45,8 +45,8 @@ void Ptngc_comp_conv_to_vals16(unsigned int *vals,int nvals,
*nvals16=j;
}
-void Ptngc_comp_conv_from_vals16(unsigned int *vals16,int nvals16,
- unsigned int *vals, int *nvals)
+void Ptngc_comp_conv_from_vals16(unsigned int *vals16, const int nvals16,
+ unsigned int *vals, int *nvals)
{
int i=0;
int j=0;
diff --git a/src/compression/warnmalloc.c b/src/compression/warnmalloc.c
index 36f0d9f..55bdaf7 100644
--- a/src/compression/warnmalloc.c
+++ b/src/compression/warnmalloc.c
@@ -14,7 +14,7 @@
#include "../../include/compression/tng_compress.h"
#include "../../include/compression/warnmalloc.h"
-void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(size_t size, char *file, int line)
+void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(const size_t size, char *file, const int line)
{
void *mem=malloc(size);
if (!mem)
@@ -25,7 +25,7 @@ void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(size_t size, char *file, int line)
return mem;
}
-void DECLSPECDLLEXPORT *Ptngc_warnrealloc_x(void *old, size_t size, char *file, int line)
+void DECLSPECDLLEXPORT *Ptngc_warnrealloc_x(void *old, const size_t size, char *file, const int line)
{
void *mem=realloc(old,size);
if (!mem)
diff --git a/src/compression/widemuldiv.c b/src/compression/widemuldiv.c
index 46cb039..c469238 100644
--- a/src/compression/widemuldiv.c
+++ b/src/compression/widemuldiv.c
@@ -106,7 +106,7 @@ static TNG_INLINE void Ptngc_widemul(unsigned int i1, unsigned int i2, unsigned
/* Divide a 64 bit unsigned value in hi:lo with the 32 bit value i and
return the result in result and the remainder in remainder */
-static TNG_INLINE void Ptngc_widediv(unsigned int hi, unsigned int lo, unsigned int i, unsigned int *result, unsigned int *remainder)
+static TNG_INLINE void Ptngc_widediv(unsigned int hi, unsigned int lo, const unsigned int i, unsigned int *result, unsigned int *remainder)
{
#if defined(TRAJNG_X86_GCC_INLINE_MULDIV)
__asm__ __volatile__ ("divl %%ecx\n\t"
diff --git a/src/compression/xtc2.c b/src/compression/xtc2.c
index 888ff8d..7332f5f 100644
--- a/src/compression/xtc2.c
+++ b/src/compression/xtc2.c
@@ -171,7 +171,7 @@ static const double iflipgaincheck=0.89089871814033927; /* 1./(2**(1./6)) */
#define TNG_INLINE inline
#endif
-int Ptngc_magic(unsigned int i)
+int Ptngc_magic(const unsigned int i)
{
return magic[i];
}
@@ -262,7 +262,7 @@ static const int seq_instr[MAXINSTR][2]=
more efficiently coded with two large instructions. */
};
-static void write_instruction(struct coder *coder,int instr,unsigned char **output_ptr)
+static void write_instruction(struct coder *coder, const int instr, unsigned char **output_ptr)
{
Ptngc_writebits(coder,seq_instr[instr][0],seq_instr[instr][1],output_ptr);
#ifdef SHOWIT
@@ -388,7 +388,7 @@ static void swap_is_better(int *input, int *minint, int *sum_normal, int *sum_sw
*sum_swapped=swapped_max;
}
-static void swapdecide(struct coder *coder, int *input,int *swapatoms, int *large_index, int *minint, unsigned char **output_ptr)
+static void swapdecide(struct coder *coder, int *input, int *swapatoms, int *large_index, int *minint, unsigned char **output_ptr)
{
int didswap=0;
int normal,swapped;
@@ -1299,7 +1299,7 @@ unsigned char *Ptngc_pack_array_xtc2(struct coder *coder,int *input, int *length
}
-int Ptngc_unpack_array_xtc2(struct coder *coder,unsigned char *packed,int *output, int length)
+int Ptngc_unpack_array_xtc2(struct coder *coder, unsigned char *packed, int *output, const int length)
{
unsigned char *ptr=packed;
int bitptr=0;
diff --git a/src/compression/xtc3.c b/src/compression/xtc3.c
index 7b493ab..5cdebdf 100644
--- a/src/compression/xtc3.c
+++ b/src/compression/xtc3.c
@@ -70,7 +70,7 @@ static const double iflipgaincheck=0.89089871814033927; /* 1./(2**(1./6)) */
int Ptngc_magic(unsigned int i);
int Ptngc_find_magic_index(const unsigned int maxval);
-static TNG_INLINE unsigned int positive_int(int item)
+static TNG_INLINE unsigned int positive_int(const int item)
{
int s=0;
if (item>0)
@@ -80,7 +80,7 @@ static TNG_INLINE unsigned int positive_int(int item)
return s;
}
-static TNG_INLINE int unpositive_int(int val)
+static TNG_INLINE int unpositive_int(const int val)
{
int s=(val+1)/2;
if ((val%2)==0)
@@ -159,14 +159,14 @@ static void free_xtc3_context(struct xtc3_context *xtc3_context)
}
/* Modifies three integer values for better compression of water */
-static void swap_ints(int *in, int *out)
+static void swap_ints(const int *in, int *out)
{
out[0]=in[0]+in[1];
out[1]=-in[1];
out[2]=in[1]+in[2];
}
-static void swap_is_better(int *input, int *minint, int *sum_normal, int *sum_swapped)
+static void swap_is_better(const int *input, const int *minint, int *sum_normal, int *sum_swapped)
{
int normal_max=0;
int swapped_max=0;
@@ -206,7 +206,7 @@ static void allocate_enough_memory(unsigned int **ptr, int *nele, int *nele_allo
}
static void insert_value_in_array(unsigned int **ptr, int *nele, int *nele_alloc,
- unsigned int value,
+ const unsigned int value,
char *arrayname)
{
#ifndef SHOWIT
@@ -272,7 +272,7 @@ static void swapdecide(struct xtc3_context *xtc3_context, int *input,int *swapat
/* It is "large" if we have to increase the small index quite a
bit. Not so much to be rejected by the not very large check
later. */
-static int is_quite_large(int *input, int small_index, int max_large_index)
+static int is_quite_large(const int *input, const int small_index, const int max_large_index)
{
int is=0;
int i;
@@ -295,7 +295,7 @@ int nbits_sum;
int nvalues_sum;
#endif
-static void insert_batch(int *input_ptr, int ntriplets_left, int *prevcoord, int *encode_ints, int startenc, int *nenc)
+static void insert_batch(const int *input_ptr, const int ntriplets_left, const int *prevcoord, int *encode_ints, const int startenc, int *nenc)
{
int nencode=startenc*3;
int tmp_prevcoord[3];
@@ -353,7 +353,7 @@ static void insert_batch(int *input_ptr, int ntriplets_left, int *prevcoord, int
*nenc=nencode;
}
-static void large_instruction_change(struct xtc3_context *xtc3_context, int i)
+static void large_instruction_change(struct xtc3_context *xtc3_context, const int i)
{
/* If the first large is of a different kind than the currently used we must
emit an "instruction" to change the large type. */
@@ -375,7 +375,7 @@ static void large_instruction_change(struct xtc3_context *xtc3_context, int i)
}
static void write_three_large(struct xtc3_context *xtc3_context,
- int i)
+ const int i)
{
int m;
if (xtc3_context->current_large_type==0)
@@ -405,7 +405,7 @@ static void write_three_large(struct xtc3_context *xtc3_context,
}
static void flush_large(struct xtc3_context *xtc3_context,
- int n) /* How many to flush. */
+ const int n) /* How many to flush. */
{
int i;
i=0;
@@ -470,8 +470,8 @@ static double compute_intlen(unsigned int *ints)
return (double)m;
}
-static void buffer_large(struct xtc3_context *xtc3_context, int *input, int inpdata,
- int natoms, int intradelta_ok)
+static void buffer_large(struct xtc3_context *xtc3_context, int *input, const int inpdata,
+ const int natoms, const int intradelta_ok)
{
unsigned int direct[3], intradelta[3]={0,}, interdelta[3]={0,};
double minlen;
@@ -542,7 +542,7 @@ static void buffer_large(struct xtc3_context *xtc3_context, int *input, int inpd
xtc3_context->has_large++;
}
-static void output_int(unsigned char *output,int *outdata, unsigned int n)
+static void output_int(unsigned char *output,int *outdata, const unsigned int n)
{
output[(*outdata)++]=((unsigned int)n)&0xFFU;
output[(*outdata)++]=(((unsigned int)n)>>8)&0xFFU;
@@ -574,7 +574,7 @@ static void printarray(unsigned int *a, int n, char *name)
#define BASEINTERVAL 8
/* How many bytes are needed to store n values in base base */
-static int base_bytes(unsigned int base, int n)
+static int base_bytes(const unsigned int base, const int n)
{
int i,j;
unsigned int largeint[MAXMAXBASEVALS+1];
@@ -600,7 +600,7 @@ static int base_bytes(unsigned int base, int n)
return numbytes;
}
-static void base_compress(unsigned int *data, int len, unsigned char *output, int *outlen)
+static void base_compress(unsigned int *data, const int len, unsigned char *output, int *outlen)
{
unsigned int largeint[MAXBASEVALS+1];
unsigned int largeint_tmp[MAXBASEVALS+1];
@@ -707,7 +707,7 @@ static void base_compress(unsigned int *data, int len, unsigned char *output, in
*outlen=nwrittenout;
}
-static void base_decompress(unsigned char *input, int len, unsigned int *output)
+static void base_decompress(unsigned char *input, const int len, unsigned int *output)
{
unsigned int largeint[MAXMAXBASEVALS+1];
unsigned int largeint_tmp[MAXMAXBASEVALS+1];
@@ -795,7 +795,7 @@ static void base_decompress(unsigned char *input, int len, unsigned int *output)
}
/* If a large proportion of the integers are large (More than 10\% are >14 bits) we return 0, otherwise 1 */
-static int heuristic_bwlzh(unsigned int *ints, int nints)
+static int heuristic_bwlzh(unsigned int *ints, const int nints)
{
int i,num;
num=0;
@@ -814,7 +814,7 @@ static int heuristic_bwlzh(unsigned int *ints, int nints)
Speed 5 enables the LZ77 component of BWLZH.
Speed 6 always tests if BWLZH is better and if it is uses it. This can be very slow.
*/
-unsigned char *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int speed)
+unsigned char *Ptngc_pack_array_xtc3(int *input, int *length, const int natoms, int speed)
{
unsigned char *output=NULL;
int i,ienc,j;
@@ -1669,7 +1669,7 @@ unsigned char *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int sp
}
static void decompress_bwlzh_block(unsigned char **ptr,
- int nvals,
+ const int nvals,
unsigned int **vals)
{
int bwlzh_buf_len=(int)(((unsigned int)(*ptr)[0]) |
@@ -1683,7 +1683,7 @@ static void decompress_bwlzh_block(unsigned char **ptr,
}
static void decompress_base_block(unsigned char **ptr,
- int nvals,
+ const int nvals,
unsigned int **vals)
{
int base_buf_len=(int)(((unsigned int)(*ptr)[0]) |
@@ -1700,8 +1700,8 @@ static void unpack_one_large(struct xtc3_context *xtc3_context,
int *ilargedir, int *ilargeintra,
int *ilargeinter, int *prevcoord,
int *minint, int *output,
- int outdata, int didswap,
- int natoms, int current_large_type)
+ const int outdata, const int didswap,
+ const int natoms, const int current_large_type)
{
int large_ints[3]={0,0,0};
if (current_large_type==0 && xtc3_context->large_direct)
@@ -1738,7 +1738,7 @@ static void unpack_one_large(struct xtc3_context *xtc3_context,
}
-int Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, int length, int natoms)
+int Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, const int length, const int natoms)
{
int i;
int minint[3];
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index cf870fa..6b467a8 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -376,17 +376,17 @@ struct tng_trajectory {
#define TNG_SNPRINTF snprintf
#endif
-static TNG_INLINE size_t tng_min_size(size_t a, size_t b)
+static TNG_INLINE size_t tng_min_size(const size_t a, const size_t b)
{
return (a < b ? a : b);
}
-static TNG_INLINE int64_t tng_min_i64(int64_t a, int64_t b)
+static TNG_INLINE int64_t tng_min_i64(const int64_t a, const int64_t b)
{
return (a < b ? a : b);
}
-static TNG_INLINE int64_t tng_max_i64(int64_t a, int64_t b)
+static TNG_INLINE int64_t tng_max_i64(const int64_t a, const int64_t b)
{
return (a > b ? a : b);
}
@@ -593,7 +593,7 @@ static tng_function_status tng_swap_byte_order_little_endian_64
* @param line_nr is the line number where this function was called, to be
* able to give more useful error messages.
*/
-static tng_function_status tng_freadstr(tng_trajectory_t tng_data,
+static tng_function_status tng_freadstr(const tng_trajectory_t tng_data,
char **str,
const char hash_mode,
md5_state_t *md5_state,
@@ -688,7 +688,7 @@ static TNG_INLINE tng_function_status tng_fwritestr(tng_trajectory_t tng_data,
* able to give more useful error messages.
*/
static TNG_INLINE tng_function_status tng_file_input_numerical
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
void *dest,
const size_t len,
const char hash_mode,
@@ -743,8 +743,8 @@ static TNG_INLINE tng_function_status tng_file_input_numerical
* able to give more useful error messages.
*/
static TNG_INLINE tng_function_status tng_file_output_numerical
- (tng_trajectory_t tng_data,
- void *src,
+ (const tng_trajectory_t tng_data,
+ const void *src,
const size_t len,
const char hash_mode,
md5_state_t *md5_state,
@@ -813,7 +813,7 @@ static TNG_INLINE tng_function_status tng_file_output_numerical
* @param block is a general block container.
* @return TNG_SUCCESS (0) if successful.
*/
-static tng_function_status tng_block_md5_hash_generate(tng_gen_block_t block)
+static tng_function_status tng_block_md5_hash_generate(const tng_gen_block_t block)
{
md5_state_t md5_state;
@@ -835,7 +835,7 @@ static tng_function_status tng_block_md5_hash_generate(tng_gen_block_t block)
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_md5_remaining_append(tng_trajectory_t tng_data,
+static tng_function_status tng_md5_remaining_append(const tng_trajectory_t tng_data,
const tng_gen_block_t block,
const int64_t start_pos,
md5_state_t *md5_state)
@@ -874,7 +874,7 @@ static tng_function_status tng_md5_remaining_append(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_input_file_init(tng_trajectory_t tng_data)
+static tng_function_status tng_input_file_init(const tng_trajectory_t tng_data)
{
int64_t file_pos;
@@ -912,7 +912,7 @@ static tng_function_status tng_input_file_init(tng_trajectory_t tng_data)
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_output_file_init(tng_trajectory_t tng_data)
+static tng_function_status tng_output_file_init(const tng_trajectory_t tng_data)
{
if(!tng_data->output_file)
{
@@ -1017,7 +1017,7 @@ static tng_function_status tng_block_destroy(struct tng_gen_block **block_p)
* the block) or TNG_CRITICAL (2) if a major error has occured.
*/
static tng_function_status tng_block_header_read
- (tng_trajectory_t tng_data, tng_gen_block_t block)
+ (const tng_trajectory_t tng_data, const tng_gen_block_t block)
{
int64_t start_pos;
@@ -1194,8 +1194,8 @@ static tng_function_status tng_block_header_read
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_md5_hash_update(tng_trajectory_t tng_data,
- tng_gen_block_t block,
+static tng_function_status tng_md5_hash_update(const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const int64_t header_start_pos,
const int64_t contents_start_pos)
{
@@ -1239,7 +1239,7 @@ static tng_function_status tng_md5_hash_update(tng_trajectory_t tng_data,
* error has occured.
*/
static tng_function_status tng_header_pointers_update
- (tng_trajectory_t tng_data, const char hash_mode)
+ (const tng_trajectory_t tng_data, const char hash_mode)
{
tng_gen_block_t block;
FILE *temp = tng_data->input_file;
@@ -1337,7 +1337,7 @@ static tng_function_status tng_header_pointers_update
* error has occured.
*/
static tng_function_status tng_frame_set_pointers_update
- (tng_trajectory_t tng_data, const char hash_mode)
+ (const tng_trajectory_t tng_data, const char hash_mode)
{
tng_gen_block_t block;
tng_trajectory_frame_set_t frame_set;
@@ -1646,7 +1646,7 @@ static tng_function_status tng_frame_set_pointers_update
}
static tng_function_status tng_reread_frame_set_at_file_pos
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t pos)
{
tng_gen_block_t block;
@@ -1680,7 +1680,7 @@ static tng_function_status tng_reread_frame_set_at_file_pos
}
static tng_function_status tng_file_pos_of_subsequent_trajectory_block_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *pos)
{
int64_t orig_pos, curr_frame_set_pos;
@@ -1769,10 +1769,10 @@ static tng_function_status tng_file_pos_of_subsequent_trajectory_block_get
* @param hash_mode is an option to decide whether to generate/update the relevant md5 hashes.
*/
static tng_function_status tng_frame_set_complete_migrate
- (tng_trajectory_t tng_data,
- int64_t block_start_pos,
- int64_t block_len,
- int64_t new_pos,
+ (const tng_trajectory_t tng_data,
+ const int64_t block_start_pos,
+ const int64_t block_len,
+ const int64_t new_pos,
const char hash_mode)
{
tng_bool updated = TNG_FALSE;
@@ -1844,7 +1844,7 @@ static tng_function_status tng_frame_set_complete_migrate
}
static tng_function_status tng_length_of_current_frame_set_contents_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *len)
{
int64_t orig_pos, pos, curr_frame_set_pos;
@@ -1910,9 +1910,9 @@ static tng_function_status tng_length_of_current_frame_set_contents_get
* data.
*/
static tng_function_status tng_migrate_data_in_file
- (tng_trajectory_t tng_data,
- int64_t start_pos,
- int64_t offset,
+ (const tng_trajectory_t tng_data,
+ const int64_t start_pos,
+ const int64_t offset,
const char hash_mode)
{
int64_t traj_start_pos, empty_space, orig_file_pos, frame_set_length;
@@ -1991,7 +1991,7 @@ static tng_function_status tng_migrate_data_in_file
static tng_function_status tng_block_header_len_calculate
(const tng_trajectory_t tng_data,
- tng_gen_block_t block,
+ const tng_gen_block_t block,
int64_t *len)
{
int name_len;
@@ -2034,8 +2034,8 @@ static tng_function_status tng_block_header_len_calculate
* error has occured.
*/
static tng_function_status tng_block_header_write
- (tng_trajectory_t tng_data,
- tng_gen_block_t block)
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block)
{
TNG_ASSERT(block != 0, "TNG library: Trying to write uninitialized block (NULL pointer).");
@@ -2097,7 +2097,7 @@ static tng_function_status tng_block_header_write
}
static tng_function_status tng_general_info_block_len_calculate
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *len)
{
size_t first_program_name_len, first_user_name_len;
@@ -2260,7 +2260,8 @@ static tng_function_status tng_general_info_block_len_calculate
* error has occured.
*/
static tng_function_status tng_general_info_block_read
- (tng_trajectory_t tng_data, tng_gen_block_t block,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char hash_mode)
{
int64_t start_pos;
@@ -2400,7 +2401,7 @@ static tng_function_status tng_general_info_block_read
* error has occured.
*/
static tng_function_status tng_general_info_block_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int64_t header_file_pos, curr_file_pos;
@@ -2593,8 +2594,8 @@ static tng_function_status tng_general_info_block_write
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_chain_data_read(tng_trajectory_t tng_data,
- tng_chain_t chain,
+static tng_function_status tng_chain_data_read(const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2626,8 +2627,8 @@ static tng_function_status tng_chain_data_read(tng_trajectory_t tng_data,
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_chain_data_write(tng_trajectory_t tng_data,
- tng_chain_t chain,
+static tng_function_status tng_chain_data_write(const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2663,8 +2664,8 @@ static tng_function_status tng_chain_data_write(tng_trajectory_t tng_data,
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_residue_data_read(tng_trajectory_t tng_data,
- tng_residue_t residue,
+static tng_function_status tng_residue_data_read(const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2696,8 +2697,8 @@ static tng_function_status tng_residue_data_read(tng_trajectory_t tng_data,
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_residue_data_write(tng_trajectory_t tng_data,
- tng_residue_t residue,
+static tng_function_status tng_residue_data_write(const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2733,8 +2734,8 @@ static tng_function_status tng_residue_data_write(tng_trajectory_t tng_data,
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_atom_data_read(tng_trajectory_t tng_data,
- tng_atom_t atom,
+static tng_function_status tng_atom_data_read(const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2761,8 +2762,8 @@ static tng_function_status tng_atom_data_read(tng_trajectory_t tng_data,
* if hash_mode == TNG_USE_HASH.
* @return TNG_SUCCESS(0) is successful.
*/
-static tng_function_status tng_atom_data_write(tng_trajectory_t tng_data,
- tng_atom_t atom,
+static tng_function_status tng_atom_data_write(const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char hash_mode,
md5_state_t *md5_state)
{
@@ -2929,8 +2930,8 @@ static tng_function_status tng_molecules_block_len_calculate
* error has occured.
*/
static tng_function_status tng_molecules_block_read
- (tng_trajectory_t tng_data,
- tng_gen_block_t block,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char hash_mode)
{
int64_t start_pos, i, j, k, l;
@@ -3317,7 +3318,7 @@ static tng_function_status tng_molecules_block_read
* error has occured.
*/
static tng_function_status tng_molecules_block_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int name_len;
@@ -3752,8 +3753,8 @@ static tng_function_status tng_frame_set_block_read
* error has occured.
*/
static tng_function_status tng_frame_set_block_write
- (tng_trajectory_t tng_data,
- tng_gen_block_t block,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char hash_mode)
{
char *temp_name;
@@ -3930,8 +3931,8 @@ static tng_function_status tng_trajectory_mapping_block_len_calculate
* error has occured.
*/
static tng_function_status tng_trajectory_mapping_block_read
- (tng_trajectory_t tng_data,
- tng_gen_block_t block,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char hash_mode)
{
int64_t start_pos, i;
@@ -4060,9 +4061,9 @@ static tng_function_status tng_trajectory_mapping_block_read
* has occurred or TNG_CRITICAL (2) if a major error has occured.
*/
static tng_function_status tng_trajectory_mapping_block_write
- (tng_trajectory_t tng_data,
- tng_gen_block_t block,
- int mapping_block_nr,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
+ const int mapping_block_nr,
const char hash_mode)
{
int64_t header_file_pos, curr_file_pos;
@@ -4196,7 +4197,7 @@ static tng_function_status tng_trajectory_mapping_block_write
* error has occured.
*/
static tng_function_status tng_particle_data_block_create
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char block_type_flag)
{
tng_trajectory_frame_set_t frame_set =
@@ -4244,8 +4245,8 @@ static tng_function_status tng_particle_data_block_create
return(TNG_SUCCESS);
}
-static tng_function_status tng_compress(tng_trajectory_t tng_data,
- tng_gen_block_t block,
+static tng_function_status tng_compress(const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const int64_t n_frames,
const int64_t n_particles,
const char type,
@@ -4586,8 +4587,8 @@ static tng_function_status tng_compress(tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-static tng_function_status tng_uncompress(tng_trajectory_t tng_data,
- tng_gen_block_t block,
+static tng_function_status tng_uncompress(const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char type,
char **data,
const int64_t uncompressed_len)
@@ -4653,7 +4654,7 @@ static tng_function_status tng_uncompress(tng_trajectory_t tng_data,
}
#ifdef USE_ZLIB
-static tng_function_status tng_gzip_compress(tng_trajectory_t tng_data,
+static tng_function_status tng_gzip_compress(const tng_trajectory_t tng_data,
char **data, const int64_t len,
int64_t *new_len)
{
@@ -4695,7 +4696,7 @@ static tng_function_status tng_gzip_compress(tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-static tng_function_status tng_gzip_uncompress(tng_trajectory_t tng_data,
+static tng_function_status tng_gzip_uncompress(const tng_trajectory_t tng_data,
char **data,
const int64_t compressed_len,
const int64_t uncompressed_len)
@@ -4758,10 +4759,10 @@ static tng_function_status tng_gzip_uncompress(tng_trajectory_t tng_data,
* error has occured.
*/
static tng_function_status tng_allocate_particle_data_mem
- (tng_trajectory_t tng_data,
- tng_data_t data,
+ (const tng_trajectory_t tng_data,
+ const tng_data_t data,
int64_t n_frames,
- int64_t stride_length,
+ const int64_t stride_length,
const int64_t n_particles,
const int64_t n_values_per_frame)
{
@@ -4865,7 +4866,7 @@ static tng_function_status tng_allocate_particle_data_mem
}
static tng_function_status tng_particle_data_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
tng_data_t *data)
{
@@ -4917,7 +4918,7 @@ static tng_function_status tng_particle_data_find
}
static tng_function_status tng_data_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
tng_data_t *data)
{
@@ -5091,7 +5092,7 @@ static tng_function_status tng_data_block_len_calculate
* error has occured.
*/
static tng_function_status tng_data_block_create
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char block_type_flag)
{
tng_trajectory_frame_set_t frame_set =
@@ -5148,10 +5149,10 @@ static tng_function_status tng_data_block_create
* error has occured.
*/
static tng_function_status tng_allocate_data_mem
- (tng_trajectory_t tng_data,
- tng_data_t data,
+ (const tng_trajectory_t tng_data,
+ const tng_data_t data,
int64_t n_frames,
- int64_t stride_length,
+ const int64_t stride_length,
const int64_t n_values_per_frame)
{
void **values;
@@ -5247,6 +5248,7 @@ static tng_function_status tng_allocate_data_mem
* @param tng_data is a trajectory data container.
* @param block is the block to store the data (should already contain
* the block headers and the block contents).
+ * @param block_data_len is the length of the data contents of the block.
* @param datatype is the type of data of the data block (char, int, float or
* double).
* @param num_first_particle is the number of the first particle in the data
@@ -5270,9 +5272,9 @@ static tng_function_status tng_allocate_data_mem
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_data_read(tng_trajectory_t tng_data,
- tng_gen_block_t block,
- int64_t block_data_len,
+static tng_function_status tng_data_read(const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
+ const int64_t block_data_len,
const char datatype,
const int64_t num_first_particle,
const int64_t n_particles,
@@ -5677,8 +5679,8 @@ static tng_function_status tng_data_read(tng_trajectory_t tng_data,
* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
* error has occured.
*/
-static tng_function_status tng_data_block_write(tng_trajectory_t tng_data,
- tng_gen_block_t block,
+static tng_function_status tng_data_block_write(const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const int64_t block_index,
const tng_bool is_particle_data,
const tng_particle_mapping_t mapping,
@@ -6265,7 +6267,7 @@ static tng_function_status tng_data_block_write(tng_trajectory_t tng_data,
* error has occured.
*/
static tng_function_status tng_data_block_meta_information_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
char *datatype,
char *dependency,
char *sparse_data,
@@ -6405,8 +6407,8 @@ static tng_function_status tng_data_block_meta_information_read
* error has occured.
*/
static tng_function_status tng_data_block_contents_read
- (tng_trajectory_t tng_data,
- tng_gen_block_t block,
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
const char hash_mode)
{
int64_t start_pos, n_values, codec_id, n_frames, first_frame_with_data;
@@ -6578,7 +6580,8 @@ static tng_function_status tng_data_block_contents_read
* error has occured.
*/
static tng_function_status tng_frame_set_finalize
- (tng_trajectory_t tng_data, const char hash_mode)
+ (const tng_trajectory_t tng_data,
+ const char hash_mode)
{
tng_gen_block_t block;
tng_trajectory_frame_set_t frame_set;
@@ -6717,8 +6720,8 @@ tng_function_status tng_atom_name_get(const tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-tng_function_status tng_atom_name_set(tng_trajectory_t tng_data,
- tng_atom_t atom,
+tng_function_status tng_atom_name_set(const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char *new_name)
{
unsigned int len;
@@ -6771,8 +6774,8 @@ tng_function_status tng_atom_type_get(const tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
- tng_atom_t atom,
+tng_function_status tng_atom_type_set(const tng_trajectory_t tng_data,
+ const tng_atom_t atom,
const char *new_type)
{
unsigned int len;
@@ -6811,7 +6814,7 @@ tng_function_status tng_atom_type_set(tng_trajectory_t tng_data,
* @param atom is the atom to initialise.
* @return TNG_SUCCESS (0) if successful.
*/
-static tng_function_status tng_atom_init(tng_atom_t atom)
+static tng_function_status tng_atom_init(const tng_atom_t atom)
{
atom->name = 0;
atom->atom_type = 0;
@@ -6824,7 +6827,7 @@ static tng_function_status tng_atom_init(tng_atom_t atom)
* @param atom is the atom to destroy.
* @return TNG_SUCCESS (0) if successful.
*/
-static tng_function_status tng_atom_destroy(tng_atom_t atom)
+static tng_function_status tng_atom_destroy(const tng_atom_t atom)
{
if(atom->name)
{
@@ -6887,7 +6890,7 @@ tng_function_status DECLSPECDLLEXPORT tng_version
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
tng_molecule_t *molecule)
{
@@ -6910,7 +6913,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_add
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
const int64_t id,
tng_molecule_t *molecule)
@@ -6970,7 +6973,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_existing_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
tng_molecule_t *molecule_p)
{
int64_t *new_molecule_cnt_list, id;
@@ -7059,8 +7062,8 @@ tng_function_status tng_molecule_name_get(const tng_trajectory_t tng_data,
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *new_name)
{
unsigned int len;
@@ -7122,8 +7125,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const int64_t cnt)
{
int64_t i, old_cnt, index = -1;
@@ -7165,9 +7168,9 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
- int64_t nr,
+ const int64_t nr,
tng_molecule_t *molecule)
{
int64_t i, n_molecules;
@@ -7196,8 +7199,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_find
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get
- (tng_trajectory_t tng_data,
- int64_t index,
+ (const tng_trajectory_t tng_data,
+ const int64_t index,
tng_molecule_t *molecule)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -7212,8 +7215,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(tng_trajectory_t tng_data_src,
- tng_trajectory_t tng_data_dest)
+tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(const tng_trajectory_t tng_data_src,
+ const tng_trajectory_t tng_data_dest)
{
tng_molecule_t molecule, molecule_temp;
tng_chain_t chain, chain_temp;
@@ -7360,9 +7363,9 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_num_chains_get
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_of_index_get
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
- int64_t index,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
+ const int64_t index,
tng_chain_t *chain)
{
(void) tng_data;
@@ -7445,10 +7448,10 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_of_index_get
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
- int64_t nr,
+ const int64_t nr,
tng_chain_t *chain)
{
int64_t i, n_chains;
@@ -7477,8 +7480,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
tng_chain_t *chain)
{
@@ -7502,8 +7505,8 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
const int64_t id,
tng_chain_t *chain)
@@ -7547,7 +7550,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add
tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add
(const tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ const tng_molecule_t molecule,
const int64_t from_atom_id,
const int64_t to_atom_id,
tng_bond_t *bond)
@@ -7583,10 +7586,10 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_find
- (tng_trajectory_t tng_data,
- tng_molecule_t molecule,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t molecule,
const char *name,
- int64_t id,
+ const int64_t id,
tng_atom_t *atom)
{
int64_t i, n_atoms;
@@ -7633,8 +7636,8 @@ tng_function_status tng_chain_name_get(const tng_trajectory_t tng_data,
}
tng_function_status DECLSPECDLLEXPORT tng_chain_name_set
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *new_name)
{
unsigned int len;
@@ -7701,10 +7704,10 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_of_index_get
}
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
- int64_t id,
+ const int64_t id,
tng_residue_t *residue)
{
int64_t i, n_residues;
@@ -7732,8 +7735,8 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find
}
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
tng_residue_t *residue)
{
@@ -7757,8 +7760,8 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add
}
tng_function_status DECLSPECDLLEXPORT tng_chain_residue_w_id_add
- (tng_trajectory_t tng_data,
- tng_chain_t chain,
+ (const tng_trajectory_t tng_data,
+ const tng_chain_t chain,
const char *name,
const int64_t id,
tng_residue_t *residue)
@@ -7864,8 +7867,8 @@ tng_function_status tng_residue_name_get(const tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_residue_name_set(tng_trajectory_t tng_data,
- tng_residue_t residue,
+tng_function_status DECLSPECDLLEXPORT tng_residue_name_set(const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *new_name)
{
unsigned int len;
@@ -7945,8 +7948,8 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_atom_of_index_get
}
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add
- (tng_trajectory_t tng_data,
- tng_residue_t residue,
+ (const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *atom_name,
const char *atom_type,
tng_atom_t *atom)
@@ -7972,8 +7975,8 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add
}
tng_function_status DECLSPECDLLEXPORT tng_residue_atom_w_id_add
- (tng_trajectory_t tng_data,
- tng_residue_t residue,
+ (const tng_trajectory_t tng_data,
+ const tng_residue_t residue,
const char *atom_name,
const char *atom_type,
const int64_t id,
@@ -8057,7 +8060,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_free(const tng_trajectory_t t
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_init(const tng_trajectory_t tng_data,
- tng_molecule_t molecule)
+ const tng_molecule_t molecule)
{
(void)tng_data;
molecule->quaternary_str = 1;
@@ -8075,7 +8078,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_init(const tng_trajectory_t t
}
tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy(const tng_trajectory_t tng_data,
- tng_molecule_t molecule)
+ const tng_molecule_t molecule)
{
int64_t i;
(void)tng_data;
@@ -8141,7 +8144,7 @@ tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len)
+ const int max_len)
{
int64_t cnt = 0, i, *molecule_cnt_list = 0;
tng_molecule_t mol;
@@ -8302,7 +8305,7 @@ tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len)
+ const int max_len)
{
int64_t cnt = 0, i, *molecule_cnt_list = 0;
tng_molecule_t mol;
@@ -8354,7 +8357,7 @@ tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len)
+ const int max_len)
{
int64_t cnt = 0, i, *molecule_cnt_list = 0;
tng_molecule_t mol;
@@ -8501,7 +8504,7 @@ tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *name,
- int max_len)
+ const int max_len)
{
int64_t cnt = 0, i, *molecule_cnt_list = 0;
tng_molecule_t mol;
@@ -8549,7 +8552,7 @@ tng_function_status tng_atom_type_of_particle_nr_get
(const tng_trajectory_t tng_data,
const int64_t nr,
char *type,
- int max_len)
+ const int max_len)
{
int64_t cnt = 0, i, *molecule_cnt_list = 0;
tng_molecule_t mol;
@@ -8594,7 +8597,7 @@ tng_function_status tng_atom_type_of_particle_nr_get
}
tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t num_first_particle,
const int64_t n_particles,
const int64_t *mapping_table)
@@ -8679,7 +8682,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free(tng_trajectory_t tng_data)
+tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free(const tng_trajectory_t tng_data)
{
tng_trajectory_frame_set_t frame_set;
tng_particle_mapping_t mapping;
@@ -9229,8 +9232,9 @@ tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy(tng_trajectory_t *t
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajectory_t src,
- tng_trajectory_t *dest_p)
+tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src
+ (const tng_trajectory_t src,
+ tng_trajectory_t *dest_p)
{
tng_trajectory_frame_set_t frame_set;
tng_trajectory_t dest;
@@ -9365,8 +9369,10 @@ tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src(tng_trajector
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_input_file_get(const tng_trajectory_t tng_data,
- char *file_name, const int max_len)
+tng_function_status DECLSPECDLLEXPORT tng_input_file_get
+ (const tng_trajectory_t tng_data,
+ char *file_name,
+ const int max_len)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
TNG_ASSERT(file_name, "TNG library: file_name must not be a NULL pointer");
@@ -9381,8 +9387,9 @@ tng_function_status DECLSPECDLLEXPORT tng_input_file_get(const tng_trajectory_t
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_input_file_set(tng_trajectory_t tng_data,
- const char *file_name)
+tng_function_status DECLSPECDLLEXPORT tng_input_file_set
+ (const tng_trajectory_t tng_data,
+ const char *file_name)
{
unsigned int len;
char *temp;
@@ -9419,8 +9426,10 @@ tng_function_status DECLSPECDLLEXPORT tng_input_file_set(tng_trajectory_t tng_da
return(tng_input_file_init(tng_data));
}
-tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
- char *file_name, const int max_len)
+tng_function_status tng_output_file_get
+ (const tng_trajectory_t tng_data,
+ char *file_name,
+ const int max_len)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
TNG_ASSERT(file_name, "TNG library: file_name must not be a NULL pointer");
@@ -9435,8 +9444,9 @@ tng_function_status tng_output_file_get(const tng_trajectory_t tng_data,
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_output_file_set(tng_trajectory_t tng_data,
- const char *file_name)
+tng_function_status DECLSPECDLLEXPORT tng_output_file_set
+ (const tng_trajectory_t tng_data,
+ const char *file_name)
{
int len;
char *temp;
@@ -9473,7 +9483,7 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_set(tng_trajectory_t tng_d
}
tng_function_status DECLSPECDLLEXPORT tng_output_append_file_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *file_name)
{
int len;
@@ -9597,7 +9607,7 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get
}
tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const tng_file_endianness endianness)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -9661,7 +9671,8 @@ tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get
(const tng_trajectory_t tng_data,
- char *name, const int max_len)
+ char *name,
+ const int max_len)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
TNG_ASSERT(name, "TNG library: name must not be a NULL pointer");
@@ -9676,8 +9687,9 @@ tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set(tng_trajectory_t tng_data,
- const char *new_name)
+tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set
+ (const tng_trajectory_t tng_data,
+ const char *new_name)
{
unsigned int len;
@@ -9725,7 +9737,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -9774,7 +9786,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -9825,7 +9837,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -9876,7 +9888,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -9927,7 +9939,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -9979,7 +9991,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_signature_get
}
tng_function_status DECLSPECDLLEXPORT tng_first_signature_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *signature)
{
unsigned int len;
@@ -10031,7 +10043,7 @@ tng_function_status DECLSPECDLLEXPORT tng_last_signature_get
}
tng_function_status DECLSPECDLLEXPORT tng_last_signature_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *signature)
{
unsigned int len;
@@ -10083,7 +10095,7 @@ tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get
}
tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *new_name)
{
unsigned int len;
@@ -10129,7 +10141,7 @@ tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get
}
tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t len)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -10156,7 +10168,7 @@ tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get
}
tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t len)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -10183,7 +10195,7 @@ tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_get
}
tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double time)
{
tng_trajectory_frame_set_t frame_set;
@@ -10290,7 +10302,7 @@ tng_function_status DECLSPECDLLEXPORT tng_compression_precision_get
}
tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double precision)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -10301,7 +10313,7 @@ tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set
}
tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t n)
{
tng_molecule_t mol;
@@ -10711,7 +10723,7 @@ tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t nr)
{
int64_t long_stride_length, medium_stride_length;
@@ -11035,7 +11047,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame)
{
int64_t first_frame, last_frame, n_frames_per_frame_set;
@@ -11551,7 +11563,7 @@ static TNG_INLINE tng_function_status tng_particle_mapping_get_real_particle
*/
static tng_function_status tng_file_headers_len_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *len)
{
int64_t orig_pos;
@@ -11590,7 +11602,7 @@ static tng_function_status tng_file_headers_len_get
}
tng_function_status DECLSPECDLLEXPORT tng_file_headers_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int64_t prev_pos = 0;
@@ -11631,7 +11643,7 @@ tng_function_status DECLSPECDLLEXPORT tng_file_headers_read
}
tng_function_status DECLSPECDLLEXPORT tng_file_headers_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int i;
@@ -11751,9 +11763,10 @@ tng_function_status DECLSPECDLLEXPORT tng_file_headers_write
return(TNG_SUCCESS);
}
-tng_function_status DECLSPECDLLEXPORT tng_block_read_next(tng_trajectory_t tng_data,
- tng_gen_block_t block,
- const char hash_mode)
+tng_function_status DECLSPECDLLEXPORT tng_block_read_next
+ (const tng_trajectory_t tng_data,
+ const tng_gen_block_t block,
+ const char hash_mode)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
TNG_ASSERT(block, "TNG library: block must be initialised and must not be a NULL pointer.");
@@ -11783,7 +11796,7 @@ tng_function_status DECLSPECDLLEXPORT tng_block_read_next(tng_trajectory_t tng_d
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int64_t file_pos;
@@ -11858,7 +11871,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_block_id
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode,
const int64_t block_id)
{
@@ -11985,7 +11998,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
int64_t file_pos;
@@ -12019,7 +12032,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_block_id
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode,
const int64_t block_id)
{
@@ -12077,8 +12090,9 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_blo
return(stat);
}
-tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
- const char hash_mode)
+tng_function_status tng_frame_set_write
+ (const tng_trajectory_t tng_data,
+ const char hash_mode)
{
int i, j;
tng_gen_block_t block;
@@ -12172,7 +12186,7 @@ tng_function_status tng_frame_set_write(tng_trajectory_t tng_data,
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char hash_mode)
{
tng_trajectory_frame_set_t frame_set;
@@ -12191,7 +12205,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_new
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames)
{
@@ -12376,7 +12390,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_new
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t n_frames,
const double first_frame_time)
@@ -12400,7 +12414,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const double first_frame_time)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -12470,7 +12484,7 @@ tng_function_status DECLSPECDLLEXPORT tng_first_frame_nr_of_next_frame_set_get
}
static tng_function_status tng_gen_data_block_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
const tng_bool is_particle_data,
const char *block_name,
@@ -12732,7 +12746,7 @@ static tng_function_status tng_gen_data_block_add
}
tng_function_status DECLSPECDLLEXPORT tng_data_block_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const char datatype,
@@ -12753,7 +12767,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_add
}
tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t id,
const char *block_name,
const char datatype,
@@ -12779,10 +12793,10 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add
}
tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get
- (tng_trajectory_t tng_data,
- int64_t block_id,
+ (const tng_trajectory_t tng_data,
+ const int64_t block_id,
char *name,
- int max_len)
+ const int max_len)
{
int64_t i;
tng_trajectory_frame_set_t frame_set;
@@ -12882,7 +12896,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get
tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get
(const tng_trajectory_t tng_data,
- int64_t block_id,
+ const int64_t block_id,
int *block_dependency)
{
int64_t i;
@@ -12955,7 +12969,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get
tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get
(const tng_trajectory_t tng_data,
- int64_t block_id,
+ const int64_t block_id,
int64_t *n_values_per_frame)
{
int64_t i;
@@ -13027,7 +13041,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get
}
tng_function_status DECLSPECDLLEXPORT tng_frame_set_n_frames_of_data_block_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
int64_t *n_frames)
{
@@ -13108,7 +13122,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_set_n_frames_of_data_block_get
}
static tng_function_status tng_frame_gen_data_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const tng_bool is_particle_data,
@@ -13594,7 +13608,7 @@ static tng_function_status tng_frame_gen_data_write
}
tng_function_status DECLSPECDLLEXPORT tng_frame_data_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const void *values,
@@ -13612,7 +13626,7 @@ tng_function_status DECLSPECDLLEXPORT tng_frame_data_write
}
tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const int64_t block_id,
const int64_t val_first_particle,
@@ -13844,9 +13858,9 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free
}
static tng_function_status tng_gen_data_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
- tng_bool is_particle_data,
+ const tng_bool is_particle_data,
union data_values ****values,
int64_t *n_frames,
int64_t *n_particles,
@@ -14118,7 +14132,7 @@ static tng_function_status tng_gen_data_get
}
tng_function_status DECLSPECDLLEXPORT tng_data_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ***values,
int64_t *n_frames,
@@ -14135,7 +14149,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_get
}
static tng_function_status tng_gen_data_vector_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const tng_bool is_particle_data,
void **values,
@@ -14308,7 +14322,7 @@ static tng_function_status tng_gen_data_vector_get
}
tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
int64_t *n_frames,
@@ -14328,9 +14342,9 @@ tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
}
static tng_function_status tng_gen_data_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
- tng_bool is_particle_data,
+ const tng_bool is_particle_data,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
const char hash_mode,
@@ -14651,7 +14665,7 @@ static tng_function_status tng_gen_data_interval_get
}
tng_function_status DECLSPECDLLEXPORT tng_data_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -14671,9 +14685,9 @@ tng_function_status DECLSPECDLLEXPORT tng_data_interval_get
}
static tng_function_status tng_gen_data_vector_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
- tng_bool is_particle_data,
+ const tng_bool is_particle_data,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
const char hash_mode,
@@ -14937,7 +14951,7 @@ static tng_function_status tng_gen_data_vector_interval_get
tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -14960,7 +14974,7 @@ tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get
}
tng_function_status DECLSPECDLLEXPORT tng_particle_data_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
union data_values ****values,
int64_t *n_frames,
@@ -14979,7 +14993,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_get
}
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
int64_t *n_frames,
@@ -15000,7 +15014,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get
}
tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -15022,7 +15036,7 @@ tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get
}
tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_interval_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
const int64_t start_frame_nr,
const int64_t end_frame_nr,
@@ -15270,7 +15284,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_close
}
tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
double *time)
{
@@ -15304,7 +15318,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
/*
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *n_mols,
int64_t **molecule_cnt_list,
tng_molecule_t *mols)
@@ -15333,7 +15347,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
*/
/*
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const char *name,
const int64_t cnt,
tng_molecule_t *mol)
@@ -15354,7 +15368,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
}
*/
tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const tng_molecule_t mol,
int64_t *n_particles,
char ***names,
@@ -15400,8 +15414,8 @@ tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
}
tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
- (tng_trajectory_t tng_data,
- tng_molecule_t mol,
+ (const tng_trajectory_t tng_data,
+ const tng_molecule_t mol,
const int64_t n_particles,
const char **names,
const char **types,
@@ -15456,7 +15470,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **positions, int64_t *stride_length)
{
int64_t n_frames, n_particles, n_values_per_frame;
@@ -15485,7 +15499,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **velocities, int64_t *stride_length)
{
int64_t n_frames, n_particles, n_values_per_frame;
@@ -15514,7 +15528,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **forces, int64_t *stride_length)
{
int64_t n_frames, n_particles, n_values_per_frame;
@@ -15543,7 +15557,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
float **box_shape,
int64_t *stride_length)
{
@@ -15572,7 +15586,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
char *data_type,
@@ -15736,7 +15750,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
void **values,
char *data_type,
@@ -15895,7 +15909,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **positions,
@@ -15928,7 +15942,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **velocities,
@@ -15961,7 +15975,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **forces,
@@ -15994,7 +16008,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t first_frame,
const int64_t last_frame,
float **box_shape,
@@ -16026,7 +16040,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -16167,7 +16181,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -16286,7 +16300,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i,
const int64_t n_values_per_frame,
const int64_t block_id,
@@ -16302,7 +16316,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
compression));
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16316,7 +16330,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16330,7 +16344,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
fprintf(stderr, "TNG library: Using obsolete function tng_util_pos_write_frequency_set(). "
@@ -16339,7 +16353,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16353,7 +16367,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16367,7 +16381,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
fprintf(stderr, "TNG library: Using obsolete function tng_util_vel_write_frequency_set(). "
@@ -16376,7 +16390,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16390,7 +16404,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16404,7 +16418,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
fprintf(stderr, "TNG library: Using obsolete function tng_util_force_write_frequency_set(). "
@@ -16413,7 +16427,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16427,7 +16441,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
TNG_ASSERT(tng_data, "TNG library: Trajectory container not properly setup.");
@@ -16441,7 +16455,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_s
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t i)
{
fprintf(stderr, "TNG library: Using obsolete function tng_util_box_shape_write_frequency_set(). "
@@ -16450,7 +16464,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *values,
const int64_t n_values_per_frame,
@@ -16662,7 +16676,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *values,
const int64_t n_values_per_frame,
@@ -16875,7 +16889,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *positions)
{
@@ -16889,7 +16903,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *positions)
{
@@ -16903,7 +16917,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *velocities)
{
@@ -16917,7 +16931,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *velocities)
{
@@ -16931,7 +16945,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *forces)
{
@@ -16945,7 +16959,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *forces)
{
@@ -16959,7 +16973,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const float *box_shape)
{
@@ -16973,7 +16987,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double *box_shape)
{
@@ -16987,7 +17001,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *values,
@@ -17037,7 +17051,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *values,
@@ -17087,7 +17101,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *positions)
@@ -17104,7 +17118,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *positions)
@@ -17123,7 +17137,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *velocities)
@@ -17142,7 +17156,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *velocities)
@@ -17161,7 +17175,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *forces)
@@ -17178,7 +17192,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *forces)
@@ -17196,7 +17210,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const float *box_shape)
@@ -17213,7 +17227,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t frame_nr,
const double time,
const double *box_shape)
@@ -17232,7 +17246,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write
}
tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
int64_t *codec_id,
double *factor)
@@ -17342,7 +17356,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get
}
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_data_blocks_find
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t current_frame,
const int64_t n_requested_data_block_ids,
const int64_t *requested_data_block_ids,
@@ -17630,7 +17644,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_dat
/*
tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
int64_t *n_data_blocks,
int64_t **data_block_ids,
char ***data_block_names,
@@ -17680,7 +17694,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_g
}
*/
tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t prev_frame)
{
tng_function_status stat;
@@ -17706,7 +17720,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame
}
tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_get
- (tng_trajectory_t tng_data,
+ (const tng_trajectory_t tng_data,
const int64_t block_id,
int64_t *n_frames)
{
contact: Jan Huwald // Impressum