summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-21 07:31:05 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-21 07:31:05 (GMT)
commitbeaa92cb293a4147aef8ed03027500804535ed96 (patch)
treec8427746983418476a99b5c61847e0b4eeca5f1d /include
parent885f2782f9f48b69bc229612b0734b4de48b890b (diff)
Fixed compiler warnings and linking errors in MSVC.
Changed tabs to spaces in tng_compression functions.
Diffstat (limited to 'include')
-rw-r--r--include/compression/coder.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/include/compression/coder.h b/include/compression/coder.h
index 5cef38a..570bc6d 100644
--- a/include/compression/coder.h
+++ b/include/compression/coder.h
@@ -13,6 +13,14 @@
#ifndef CODER_H
#define CODER_H
+#ifndef DECLSPECDLLEXPORT
+#ifdef USE_WINDOWS
+#define DECLSPECDLLEXPORT __declspec(dllexport)
+#else /* USE_WINDOWS */
+#define DECLSPECDLLEXPORT
+#endif /* USE_WINDOWS */
+#endif /* DECLSPECDLLEXPORT */
+
struct coder
{
unsigned int pack_temporary;
@@ -21,22 +29,22 @@ struct coder
int stat_numval;
};
-struct coder *Ptngc_coder_init(void);
-void Ptngc_coder_deinit(struct coder *coder);
-unsigned char *Ptngc_pack_array(struct coder *coder,int *input, int *length, int coding, int coding_parameter, int natoms, int speed);
-int Ptngc_unpack_array(struct coder *coder,unsigned char *packed,int *output, int length, int coding, int coding_parameter, int natoms);
-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);
-unsigned char *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int speed);
-int Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, int length, int natoms);
-
-void Ptngc_out8bits(struct coder *coder, unsigned char **output);
-void Ptngc_pack_flush(struct coder *coder,unsigned char **output);
-void Ptngc_write_pattern(struct coder *coder,unsigned int pattern, int nbits, unsigned char **output);
-
-void Ptngc_writebits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
-void Ptngc_write32bits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
-void Ptngc_writemanybits(struct coder *coder,unsigned char *value,int nbits, unsigned char **output_ptr);
+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_xtc2(struct coder *coder,int *input, int *length);
+int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc2(struct coder *coder,unsigned char *packed,int *output, 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);
+
+void DECLSPECDLLEXPORT Ptngc_out8bits(struct coder *coder, unsigned char **output);
+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_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);
#endif
contact: Jan Huwald // Impressum