/usr/include/ga/gabincvt.h is in libga-dev 2.4.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | // $Header$
/* ----------------------------------------------------------------------------
bincvt.h
mbwall 29jun95
Copyright (c) 1995 Massachusetts Institute of Technology
all rights reserved
DESCRIPTION:
Header for the binary to decimal conversion routines. The binary-to-decimal
routines include encoders and decoders. We define a standard binary encoder/
decoder set as well as one Gray encoder/decoder. You can define your own if
you want a different Gray coding.
---------------------------------------------------------------------------- */
#ifndef _ga_bincvt_h_
#define _ga_bincvt_h_
#include <ga/gatypes.h>
// The encoder converts a decimal value into a binary string. The decoder
// converts a string of bits into a decimal value. Both types of functions
// return an error code to indicate whether or not the conversion was
// successful. The caller must make sure that sufficient space is available
// for the arguments. The encoder will set the value to whatever it was able
// to encode, so be sure to check the return status and make your value such
// that you can check it if you get a non-zero return code.
typedef int (*GABinaryEncoder)(float& value, GABit* bits,
unsigned int nbits, float min, float max);
typedef int (*GABinaryDecoder)(float& value, const GABit* bits,
unsigned int nbits, float min, float max);
int GABinaryEncode(float&, GABit* bits, unsigned int, float, float);
int GABinaryDecode(float&, const GABit* bits, unsigned int, float, float);
int GAGrayEncode(float&, GABit* bits, unsigned int, float, float);
int GAGrayDecode(float&, const GABit* bits, unsigned int, float, float);
#endif
|