diff --git a/alliance/src/aut/man1/Makefile.am b/alliance/src/aut/man1/Makefile.am new file mode 100644 index 00000000..fe33c499 --- /dev/null +++ b/alliance/src/aut/man1/Makefile.am @@ -0,0 +1 @@ +man_MANS = aut.1 diff --git a/alliance/src/aut/man1/aut.1 b/alliance/src/aut/man1/aut.1 new file mode 100644 index 00000000..23b4c43d --- /dev/null +++ b/alliance/src/aut/man1/aut.1 @@ -0,0 +1,143 @@ +.\" $Id: aut.1,v 1.1 2002/03/21 13:17:23 ludo Exp $ +.\" @(#)aut.1 1.01 96/02/07 UPMC; Author : Jacomme Ludovic +.TH AUT101 1 "October 1, 1997" "ASIM/LIP6" "ALLIANCE AUT LIBRARY" +.SH NAME +aut \- Memory allocation, and hash tables management +.so man1/alc_origin.1 +.SH DESCRIPTION +\fBaut\fP is a set of utilities functions and types that may be useful. +.TP +Types : +.TP 20 +.br +\fBauthelem\fP +\- Hash table element type. +.TP +\fBauthtable\fP +\- Hash table type. +.TP +\fBauth2elem\fP +\- Hash table element type. +.TP +\fBauth2table\fP +\- Hash table type. + +.TP +Functions : +.TP 20 +.br +\fBautallocblock\fP +\- memory allocator +.TP +\fBautallocheap\fP +\- heap memory allocator +.TP +\fBautresizeblock\fP +\- resizes a memory block +.TP +\fBautfreeblock\fP +\- releases a memory block +.TP +\fBautfreeheap\fP +\- releases an heap memory block. +.TP +\fBautexit\fP +\- encapsulates exit function. +.TP +\fBcreateauthtable\fP +\- creates a simple hash table. +.TP +\fBdestroyauthtable\fP +\- destroys a simple hash table. +.TP +\fBresetauthtable\fP +\- resets a simple hash table. +.TP +\fBaddauthelem\fP +\- adds an element in the hash table. +.TP +\fBdelauthelem\fP +\- deletes an element in the hash table. +.TP +\fBsearchauthelem\fP +\- searches an element in the hash table. +.TP +\fBviewauthelem\fP +\- displays an hash table element. +.TP +\fBviewauthtable\fP +\- displays an hash table. +.TP +\fBcreateauth2table\fP +\- creates an hash table with two keys. +.TP +\fBdestroyauth2table\fP +\- destroys an hash table with two keys. +.TP +\fBresetauth2table\fP +\- resets an hash table with two keys. +.TP +\fBaddauth2elem\fP +\- adds an element in the hash table. +.TP +\fBdelauth2elem\fP +\- deletes an element in the hash table. +.TP +\fBsearchauth2elem\fP +\- searches an element in the hash table. +.TP +\fBviewauth2elem\fP +\- displays an hash table element. +.TP +\fBviewauth2table\fP +\- displays an hash table with two keys. +.TP +\fBsortautcompare\fP +\- default heap sort comparison function. +.TP +\fBsortautarray\fP +\- heap sort. + +.TP 0 +libAut101.a : + +\fBautallocblock\fP, +\fBautallocblock\fP, +\fBautresizeblock\fP, +\fBautfreeblock\fP, +\fBautfreeheap\fP, +\fBautexit\fP, +\fBsetauthfunc\fP, +\fBgetauthsize\fP, +\fBgetauthkey\fP, +\fBgetauthindex\fP, +\fBcheckauthkey\fP, +\fBcreateauthtable\fP, +\fBdestroyauthtable\fP, +\fBresetauthtable\fP, +\fBstretchauthtable\fP, +\fBaddauthelem\fP, +\fBdelauthelem\fP, +\fBsearchauthelem\fP, +\fBviewauthelem\fP, +\fBviewauthtable\fP, +\fBsetauth2func\fP, +\fBgetauth2size\fP, +\fBgetauth2key\fP, +\fBgetauth2index\fP, +\fBcheckauth2key\fP, +\fBcreateauth2table\fP, +\fBdestroyauth2table\fP, +\fBresetauth2table\fP, +\fBstretchauth2table\fP, +\fBaddauth2elem\fP, +\fBdelauth2elem\fP, +\fBsearchauth2elem\fP, +\fBviewauth2elem\fP, +\fBviewauth2table\fP, +\fBsortautcompare\fP, +\fBsortautarray\fP, + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/Makefile.am b/alliance/src/aut/man3/Makefile.am new file mode 100644 index 00000000..d3e6ef06 --- /dev/null +++ b/alliance/src/aut/man3/Makefile.am @@ -0,0 +1,3 @@ +man_MANS = autallocblock.3 autfreeheap.3 authelem.3 \ +autallocheap.3 auth2elem.3 authtable.3 \ +autfreeblock.3 auth2table.3 autresizeblock.3 diff --git a/alliance/src/aut/man3/autallocblock.3 b/alliance/src/aut/man3/autallocblock.3 new file mode 100644 index 00000000..4cf8454b --- /dev/null +++ b/alliance/src/aut/man3/autallocblock.3 @@ -0,0 +1,63 @@ +.\" $Id: autallocblock.3,v 1.1 2002/03/21 13:17:23 ludo Exp $ +.\" @(#)autallocblock.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic +.TH AUTALLOCBLOCK 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS" +.SH NAME +autallocblock \- memory allocator +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +char *autallocblock( Size ) + unsigned int Size; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fISize\fP +Number of memory bytes to be contiguously allocated +.TP +.SH DESCRIPTION +\fBautallocblock\fP returns a block of \fISize\fP bytes length. +The memory block is set to zero. +.br +.SH RETURN VALUE +\fBautallocblock\fP returns a pointer to a \fISize\fP bytes long block. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"autalloc: alloc error, can't continue !" +.ft R +.RS +System break can't be moved anymore, no more memory can be retrieved from the system. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +char \(**dup_str(s) + char \(** s; +{ + char \(**t = (char \(**)autalocblock(strlen(s) + (unsigned int)1); + strcpy(t, s); return t; +} +.ft R +.fi +.SH SEE ALSO +.BR aut (1), +.BR autresizeblock(3), +.BR autallocheap(3), +.BR autfreeblock(3), +.BR autfreeheap(3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/autallocheap.3 b/alliance/src/aut/man3/autallocheap.3 new file mode 100644 index 00000000..c82bdcd2 --- /dev/null +++ b/alliance/src/aut/man3/autallocheap.3 @@ -0,0 +1,68 @@ +.\" $Id: autallocheap.3,v 1.1 2002/03/21 13:17:23 ludo Exp $ +.\" @(#)autallocheap.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic +.TH AUTALLOCHEAP 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS" +.SH NAME +autallocheap \- heap memory allocator +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +char *autallocheap( Size ) + unsigned int Size; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fISize\fP +Number of memory bytes to be contiguously allocated +.SH DESCRIPTION +\fBautallocheap\fP returns a block of \fISize\fP bytes length, +allocated on the heap. The memory block is set to zero. +Its use is strongly encouraged when the \fISize\fP is very small. +.br +.SH RETURN VALUE +\fBautallocheap\fP returns a pointer to a \fISize\fP bytes long block. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"autalloc: alloc error, can't continue !" +.ft R +.RS +System break can't be moved anymore, no more memory can be retrieved from the system. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +typedef struct bipointer +{ + struct bipointer \(**NEXT; + void \(**DATA; +} bipointer; +bipointer \(**addbipointer( Data ); + void \(**Data; +{ + bipointer \(**Bp = (bipointer \(**)autallocheap( sizeof( bipointer ) ); + Bp->DATA = Data; return Bp; +} +.ft R +.fi +.SH SEE ALSO +.BR aut(1), +.BR autresizeblock(3), +.BR autallocblock(3), +.BR autfreeblock(3), +.BR autfreeheap(3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/autfreeblock.3 b/alliance/src/aut/man3/autfreeblock.3 new file mode 100644 index 00000000..225619ca --- /dev/null +++ b/alliance/src/aut/man3/autfreeblock.3 @@ -0,0 +1,52 @@ +.\" $Id: autfreeblock.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)autfreeblock.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic +.TH AUTFREEBLOCK 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS" +.SH NAME +autfreeblock \- releases a memory block +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +void autfreeblock( Pointer ) + char \(** Pointer; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fIPointer\fP +Pointer to be given back to the system +.SH DESCRIPTION +\fBautfreeblock\fP frees a pointer. It is now a day just +an encapsulation of the system free function, but may evolve to a +special allocator in the future. Its use is strongly encouraged. +.br +.SH RETURN VALUE +\fBautfreeblock\fP returns nothing. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" + char \(**Pointer; + Pointer = autallocblock( 1024 ); + ... + autfreeblock( Pointer ); +.ft R +.fi +.SH SEE ALSO +.BR aut (1), +.BR autresizeblock(3), +.BR autallocheap(3), +.BR autallocblock(3), +.BR autfreeheap(3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/autfreeheap.3 b/alliance/src/aut/man3/autfreeheap.3 new file mode 100644 index 00000000..1d78528d --- /dev/null +++ b/alliance/src/aut/man3/autfreeheap.3 @@ -0,0 +1,69 @@ +.\" $Id: autfreeheap.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)autfreeheap.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic +.TH AUTFREEHEAP 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS" +.SH NAME +autfreeheap \- releases a memory block, and put it on the heap. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +void autfreeheap( Pointer, Size ) + char \(**Pointer; + unsigned int Size; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fIPointer\fP +Pointer to be given back to the heap. +.TP +\fISize\fP +Size of the block previously allocated by \fIautallocheap\fP. +.SH DESCRIPTION +\fBautfreeheap\fP frees a pointer and puts the block back to the heap. +Its use is necessary to free memory blocks, previously allocated +by \fIautallocheap\fP. +.br +.SH RETURN VALUE +\fBautfreeheap\fP returns nothing. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" +typedef struct bipointer +{ + struct bipointer \(**NEXT; + void \(**DATA; +} bipointer; +bipointer \(**addbipointer( Data ); + void \(**Data; +{ + bipointer \(**Bp = (bipointer \(**)autallocheap( sizeof( bipointer ) ); + Bp->DATA = Data; + return Bp; +} +void delbipointer( Bp ); + bipointer \(**Bp; +{ + autfreeheap( Pointer, sizeof( bipointer ) ); +} +.ft R +.fi +.SH SEE ALSO +.BR aut (1), +.BR autresizeblock(3), +.BR autallocheap(3), +.BR autallocblock(3), +.BR autfreeblock(3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/auth2elem.3 b/alliance/src/aut/man3/auth2elem.3 new file mode 100644 index 00000000..1cf440ae --- /dev/null +++ b/alliance/src/aut/man3/auth2elem.3 @@ -0,0 +1,44 @@ +.\" $Id: auth2elem.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)auth2elem.2 1.01 96/02/07 UPMC; Author: Jacomme Ludovic +.TH AUTH2ELEM 3 "October 1, 1997" "ASIM/LIP6" "AUT STRUCTURE DEFINITIONS" +.SH NAME +auth2elem \- element in an hash table with two keys. +.SH DESCRIPTION +The \fBauth2elem\fP structure is used to describe an hash element. +.LP +The declarations needed to work on \fBauth2elem\fP are available in the header file +\fI"/labo/include/aut101.h"\fP, where '\fI101\fP' is the actual aut version. +.LP +The following C structure supports the description of an hash element : +.RS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.ta 3n 20n 30n + typedef struct auth2elem + { + char \(**KEY1; + char \(**KEY2; + long VALUE; + } auth2elem; +.ft R +.fi +.RE +.TP 20 +\fIKEY1\fP + KEY1 is the first hash element key, for example a name created with \fInamealloc\fP. +.TP +\fIKEY2\fP + KEY2 is the second hash element key, for example a name created with \fInamealloc\fP. +.TP +\fIVALUE\fP + VALUE is the value associated to the two keys \fIKEY1\fP and \fIKEY2\fP. +.SH SEE ALSO +.BR aut (1), +.BR auth2table(3), + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/auth2table.3 b/alliance/src/aut/man3/auth2table.3 new file mode 100644 index 00000000..2bb26b50 --- /dev/null +++ b/alliance/src/aut/man3/auth2table.3 @@ -0,0 +1,60 @@ +.\" $Id: auth2table.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)auth2table.2 1.01 96/02/07 UPMC; Author: Jacomme Ludovic +.TH AUTH2TABLE 3 "October 1, 1997" "ASIM/LIP6" "AUT STRUCTURE DEFINITIONS" +.SH NAME +auth2table \- hash table structure +.SH DESCRIPTION +The \fBauth2table\fP structure is used to describe an hash table with two keys. +.LP +The declarations needed to work on \fBauth2table\fP are available in the header file +\fI"/labo/include/aut101.h"\fP, where '\fI101\fP' is the actual aut version. +.LP +The following C structure supports the description of an hash element : +.RS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.ta 3n 20n 30n + typedef struct auth2table + { + auth2elem \(**TABLE; + long TABLE_SIZE; + long NUMBER_ELEM; + long NUMBER_ADD; + long NUMBER_SCAN; + long NUMBER_DEL; + long NUMBER_STRETCH; + } auth2table; +.ft R +.fi +.RE +.TP 20 +\fITABLE\fP + TABLE is the hash element array. +.TP +\fITABLE_SIZE\fP + TABLE_SIZE is the size of the hash table. +.TP +\fINUMBER_ELEM\fP + NUMBER_ELEM is the number of element in the hash table. +.TP +\fINUMBER_ADD\fP + NUMBER_ADD is the number of added elements. +.TP +\fINUMBER_SCAN\fP + NUMBER_SCAN is the number of scans to find an element. +.TP +\fINUMBER_DEL\fP + NUMBER_DEL is the number of deleted elements. +.TP +\fINUMBER_STRETCH\fP + NUMBER_STRETCH is the number of hash table stretch. +.SH SEE ALSO +.BR aut (1), +.BR auth2table(3), + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/authelem.3 b/alliance/src/aut/man3/authelem.3 new file mode 100644 index 00000000..deea5869 --- /dev/null +++ b/alliance/src/aut/man3/authelem.3 @@ -0,0 +1,40 @@ +.\" $Id: authelem.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)authelem.2 1.01 96/02/07 UPMC; Author: Jacomme Ludovic +.TH AUTHELEM 3 "October 1, 1997" "ASIM/LIP6" "AUT STRUCTURE DEFINITIONS" +.SH NAME +authelem \- element in an hash table +.SH DESCRIPTION +The \fBauthelem\fP structure is used to describe an hash element. +.LP +The declarations needed to work on \fBauthelem\fP are available in the header file +\fI"/labo/include/aut101.h"\fP, where '\fI101\fP' is the actual aut version. +.LP +The following C structure supports the description of an hash element : +.RS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.ta 3n 20n 30n + typedef struct authelem + { + char \(**KEY; + long VALUE; + } authelem; +.ft R +.fi +.RE +.TP 20 +\fIKEY\fP + KEY is the hash element key, for example a name created with \fInamealloc\fP. +.TP +\fIVALUE\fP + VALUE is the value associated to the key \fIKEY\fP. +.SH SEE ALSO +.BR aut (1), +.BR authtable(3), + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/authtable.3 b/alliance/src/aut/man3/authtable.3 new file mode 100644 index 00000000..5c6e1481 --- /dev/null +++ b/alliance/src/aut/man3/authtable.3 @@ -0,0 +1,60 @@ +.\" $Id: authtable.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)authtable.2 1.01 96/02/07 UPMC; Author: Jacomme Ludovic +.TH AUTHTABLE 3 "October 1, 1997" "ASIM/LIP6" "AUT STRUCTURE DEFINITIONS" +.SH NAME +authtable \- hash table structure +.SH DESCRIPTION +The \fBauthtable\fP structure is used to describe an hash table. +.LP +The declarations needed to work on \fBauthtable\fP are available in the header file +\fI"/labo/include/aut101.h"\fP, where '\fI101\fP' is the actual aut version. +.LP +The following C structure supports the description of an hash element : +.RS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +.ta 3n 20n 30n + typedef struct authtable + { + authelem \(**TABLE; + long TABLE_SIZE; + long NUMBER_ELEM; + long NUMBER_ADD; + long NUMBER_SCAN; + long NUMBER_DEL; + long NUMBER_STRETCH; + } authtable; +.ft R +.fi +.RE +.TP 20 +\fITABLE\fP + TABLE is the hash element array. +.TP +\fITABLE_SIZE\fP + TABLE_SIZE is the size of the hash table. +.TP +\fINUMBER_ELEM\fP + NUMBER_ELEM is the number of element in the hash table. +.TP +\fINUMBER_ADD\fP + NUMBER_ADD is the number of added elements. +.TP +\fINUMBER_SCAN\fP + NUMBER_SCAN is the number of scans to find an element. +.TP +\fINUMBER_DEL\fP + NUMBER_DEL is the number of deleted elements. +.TP +\fINUMBER_STRETCH\fP + NUMBER_STRETCH is the number of hash table stretch. +.SH SEE ALSO +.BR aut (1), +.BR authtable(3), + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/aut/man3/autresizeblock.3 b/alliance/src/aut/man3/autresizeblock.3 new file mode 100644 index 00000000..226b6e71 --- /dev/null +++ b/alliance/src/aut/man3/autresizeblock.3 @@ -0,0 +1,73 @@ +.\" $Id: autresizeblock.3,v 1.1 2002/03/21 13:17:24 ludo Exp $ +.\" @(#)autresizeblock.2 2.7 96/07/02 ; Labo masi cao-vlsi; Author : Jacomme Ludovic +.TH AUTRESIZEBLOCK 3 "October 1, 1997" "ASIM/LIP6" "AUT FUNCTIONS" +.SH NAME +autresizeblock \- resizes a memory block +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" + char \(**autresize( Source, OldSize, NewSize ) + char \(**Source; + unsigned int OldSize; + unsigned int NewSize; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fISource\fP +Pointer to the memory block to be resized. +.TP +\fIOldSize\fP +Old size of the memory block. +.TP +\fINewSize\fP +New size of the memory block. +.SH DESCRIPTION +\fBautresizeblock\fP resizes a memory block from \fIOldSize\fP to +\fINewSize\fP. if \fINewSize\fP is greater than \fIOldSize\fP then +the new bytes are set to zero. +.br +.SH RETURN VALUE +\fBautresizeblock\fP returns the pointer to the resized block. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"autresize: resize error, can't continue !" +.ft R +.RS +System break can't be moved anymore, no more memory can be retrieved from the system. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "aut101.h" + char \(**concatstring( t, s ) + char \(** t; + char \(** s; + { + t = (char \(**)autresizeblock( t, strlen(t)+1, strlen(t)+strlen(s)+1); + strcat(t, s); + return t; + } +.ft R +.fi +.SH SEE ALSO +.BR aut (1), +.BR autallocheap(3), +.BR autallocblock(3), +.BR autfreeblock(3), +.BR autfreeheap(3). + + +.so man1/alc_bug_report.1 +