MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Typedefs | Functions
fpa1_BlockAlloc.c File Reference

Contains functions to create a mini memory manager for allocating syntax list items. More...

#include <stdio.h>
#include <stdlib.h>
#include "vpa1_sys.h"
#include "vpa1_tgs.h"
#include "fpa1_syn.h"
#include "pa1_mem.h"
#include "mh5debug.h"
#include "fpa1_BlockAlloc.h"

Macros

#define ASN_MEM_BLOCK   0x100
 

Typedefs

typedef struct fpa1_synBlock fpa1_syntaxBlock
 

Functions

fpa1_syntaxListfpa1_getTagItem (void)
 
int fpa1_freeUnusedData (void)
 
fpa1_syntaxListfpa1_delFirstItem (fpa1_syntaxList *firstComp)
 
int fpa1_delList (fpa1_syntaxList *firstComp)
 
int ASN1_MemInit (void)
 
void ASN1_MemExit (void)
 

Detailed Description

Contains functions to create a mini memory manager for allocating syntax list items.

Date
21/02/02
Author
S.Charman

Function Documentation

fpa1_syntaxList* fpa1_delFirstItem ( fpa1_syntaxList firstComp)

cleans up a tree of fpa1_syntaxList items. Doesn't actually delete the memory used by the structures since they are freed as a block on parser exit (using fpa1_deleteEntireList() ).

Parameters
firstComplist item to be deleted
Returns
fpa1_syntaxList*
int fpa1_delList ( fpa1_syntaxList firstComp)

Recursively clean up a tree of fpa1_syntaxItems We don't need to actually delete the structures as that is done by the final call to fpa1_deleteEntireList() on return of the parser.

Parameters
firstComplist item to be deleted
Returns
int
int fpa1_freeUnusedData ( void  )

Note: This function deletes all remaining strings within the list (as only unused strings will get this far).

Returns
int
fpa1_syntaxList* fpa1_getTagItem ( void  )

Gets the next syntaxItem from the current syntaxBlock. Creates a new syntaxblock if necessary. fpa1_syntaxBlockInit() MUST be have been called before calling this function.

Returns
*fpa1_syntaxList