NAME

asn1_long_err asn1_long_init asn1_long_free asn1_long_realloc asn1_long_cpy asn_long_cmp asn1_long_hash \- long integers operations

SYNOPSIS


#include asn1.h

void asn1_long_err(li)
asn1_long *li;

void asn1_long_init(li, isize)
asn1_long *li;
int length;

void asn1_long_free(li)
asn1_long *li;

void asn1_long_realloc(li, isize)
asn1_long *li;
int length;

void asn1_long_cpy(li1, li2)
asn1_long *li1, *li2;

int asn1_long_cmp(li1, li2)
asn1_long *li1, *li2;

asn1_uint32 asn1_long_hash(ui32, li)
register asn1_uint32 ui32;
asn1_long *li;

DESCRIPTION

The ASN.1 library routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. All ASN.1 routines require the header "asn1.h" to be included.

These routines deal with the creation of long integers represented by the type asn1_long. They have to be created before any long integers can be translated into ASN.1 format.

The asn1_long struture is defined in
"asn1.h" :

struct asn1_long 
{
	int al;
	int eb;
	ASN1_LONG_ITEM *pvalue;
	char is_allocated;
};

and contains the following members :

The predefined type ASN1_LONG_ITEM is an 16-bit or 32-bit long integer machine dependent. An asn1_long should be initialized using the function asn1_long_err(\|), which sets the initial size to 0. Alternatively, asn1_long_init(\|) may be used to initialize an asn1_long with sets the initial size to isize.

asn1_long_realloc(\|) changes the size of the asn1_long referenced by li to size isise. The contents will be unchanged up to the lesser of the new and old size.

asn1_long_free(\|) releases a previously allocated long integer. Its arguments is a pointer to an asn1_long previously allocated by asn1_long_init(\|) or asn1_long_realloc(\|).

asn1_long_cpy(\|) copies this second argument li2 into this first li1.

asn1_long_cmp(\|) compares its arguments, and returns an integer less than, equal to, or greatest than 0, according as li1 is less than, equal to, or greatest than li2.

asn1_long_hash(\|) returns the hash code value to be associated with the asn1_long pointed to by li. The first argument is the previous hash code value computed.

"SEE ALSO"

mavcod (9x),
mavros (9x),
mavros-output (9x),
asn1_time (9x),
asn1_malloc (9x),
asn1_longmath (9x),
asn1_longio (9x),
asn1_longrand (9x)
asn1_longprime (9x),
C. Huitema, "General Presentation of the MAVROS Compiler",INRIA, 1990