# The "dmp" Package

These routines are meant to provide a mechanism for writing the recursive, heirarchical data structure to a file in an ASCII (human readable) format.

Library: karma
Link With: -lkarma

#### Functions

dmp_multi_desc | Dump a multi_array descriptor to a file.
dmp_packet_desc | Dump a packet descriptor to a file.
dmp_element_desc | Dump an element descriptor to a file.
dmp_array_desc | Dump an array descriptor to a file.
dmp_dim_desc | Dump a dimension descriptor to a file.
dmp_multi_data | Dump the data in a multi_array descriptor to a file.
dmp_packet | Dump a packet to a file.
dmp_element | Dump an element to a file.
dmp_array | Dump an array to a file.
dmp_list | Dump a linked list to a file.
dmp_flag | Dump a flag value to a file.

## Functions

void dmp_multi_desc (FILE *fp, multi_array *multi_desc, flag comments)

This routine will dump a multi_array descriptor to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- multi_desc : The descriptor.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_packet_desc (FILE *fp, packet_desc *pack_desc, flag comments)

This routine will dump a packet descriptor to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- pack_desc : The descriptor.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_element_desc (FILE *fp, unsigned int type, char *desc, flag comments)

This routine will dump an element descriptor to a file, writing in ASCII.

Parameters:

- fp : The file.
- type : The type of the element.
- desc : The element descriptor. If the element is an array pointer or a linked list pointer, that descriptor will also be dumped.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_array_desc (FILE *fp, array_desc *arr_desc, flag comments)

This routine will dump an array descriptor to a file, writing in ASCII format. The packet descriptor for the array will also be dumped (this is a recursive process).

Parameters:

- fp : The file pointer.
- array_desc : The descriptor.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_dim_desc (FILE *fp, dim_desc *dimension, flag comments)

This routine will dump a dimension descriptor to a file, writing in ASCII format. The packet descriptor for the array will also be dumped (this is a recursive process).

Parameters:

- fp : The file pointer.
- dimension : The descriptor.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_multi_data (FILE *fp, multi_array *multi_desc, flag comments)

This routine will dump the data in a multi_array descriptor to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- multi_desc : The descriptor.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_packet (FILE *fp, packet_desc *pack_desc, char *packet, flag comments)

This routine will dump a packet to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- pack_desc : The descriptor.
- packet : The packet.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_element (FILE *fp, unsigned int type, char *desc, char *element, flag comments)

This routine will dump an element to a file, writing in ASCII format.

Parameters:

- fp : The file.
- type : The type of the element.
- desc : The element descriptor. If the element is an array pointer or a linked list pointer, that data will also be dumped.
- element : The element.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_array (FILE *fp, array_desc *arr_desc, char *array, flag comments)

This routine will dump an array to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- array_desc : The descriptor.
- array : The array.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_list (FILE *fp, packet_desc *pack_desc, list_header *list_head, flag comments)

This routine will dump an array descriptor to a file, writing in ASCII format.

Parameters:

- fp : The file pointer.
- pack_desc : The list descriptor.
- list_head : A pointer to the list header.
- comments : If TRUE, the routine will append comments to the lines written, else it will not.

Returns: Nothing.
Multithreading Level: Unsafe

void dmp_flag (FILE *fp, flag logical, char *comment_string, flag comments)

This routine will dump the ASCII representation of a flag value to a file.

Parameters:

- fp : The file.
- logical : The flag value.
- comment_string : The comment string.
- comments : If TRUE, the comment string is written.

Returns: Nothing.
Multithreading Level: Unsafe

Back to Karma Home Page