#include <stdio.h>
#include <stdint.h>
|
int | eviofmtdump (int32_t *arr, int nwrd, unsigned short *ifmt, int nfmt, int nextrabytes, char *xml) |
| This function dumps data into an XML array. More...
|
|
◆ MIN
#define MIN |
( |
|
a, |
|
|
|
b |
|
) |
| ( (a) < (b) ? (a) : (b) ) |
◆ NWORDS
◆ PRINT
◆ SWAP16
◆ SWAP32
◆ SWAP64
◆ eviofmtdump()
int eviofmtdump |
( |
int32_t * |
arr, |
|
|
int |
nwrd, |
|
|
unsigned short * |
ifmt, |
|
|
int |
nfmt, |
|
|
int |
nextrabytes, |
|
|
char * |
xml |
|
) |
| |
This function dumps data into an XML array.
Converts the data of array (iarr[i], i=0...nwrd-1) using the format code ifmt[j], j=0...nfmt-1).
Algorithm description: data processed inside while(ib < nwrd) loop, where 'ib' is iarr[] index; loop breaks when 'ib' reaches the number of elements in iarr[].
- Parameters
-
arr | data array (words). |
nwrd | length of data array in words. |
ifmt | format (as produced by eviofmt.c) |
nfmt | the number of elements in ifmt[] |
nextrabytes | number of extra bytes at the end of the data. |
xml | filled with number of chars printed. |
- Returns
- the number of bytes in 'xml' if everything fine, negative if error.
References NWORDS.