hl7parse
meta.h
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include <stdio.h>
26 #include "bom.h"
27 
33 typedef struct hl7_meta_t {
43  int crlf;
44 
48  char sep_field;
50  char sep_comp;
52  char sep_rep;
54  char sep_escape;
56  char sep_subcmp;
57 
59  char *encoding;
61  char *version;
63  char *type;
65  char *subtype;
68 
69 } hl7_meta_t;
70 
74 typedef enum line_delimiter_t {
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
95 
102 char *hl7_meta_string(hl7_meta_t* meta);
103 
112 void free_hl7_meta(hl7_meta_t *hl7_meta);
113 
125 
171 int read_meta(hl7_meta_t *hl7_meta, FILE *fd);
172 
173 #ifdef __cplusplus
174 }
175 #endif
Byte Order MArk (BOM) information of a file. This struct is created by detect_bom() ...
Definition: bom.h:72
int field_length
Definition: meta.h:35
char sep_subcmp
Definition: meta.h:56
char sep_escape
Definition: meta.h:54
line_delimiter_t find_line_delimiter(FILE *fd)
find line delimiter
Definition: meta.c:102
struct hl7_meta_t hl7_meta_t
HL7 Seperator configuration.
char sep_rep
Definition: meta.h:52
int read_meta(hl7_meta_t *hl7_meta, FILE *fd)
read up until the 2nd field delimiter
Definition: meta.c:130
char sep_comp
Definition: meta.h:50
char * encoding
Definition: meta.h:59
char sep_message
Definition: meta.h:46
HL7 Seperator configuration.
Definition: meta.h:33
Definition: meta.h:78
line_delimiter_t
possible line endings
Definition: meta.h:74
void free_hl7_meta(hl7_meta_t *hl7_meta)
free the data structure
Definition: meta.c:82
find unicode bom
hl7_meta_t * init_hl7_meta_t(void)
initialize the seperator data structure
Definition: meta.c:5
char * hl7_meta_string(hl7_meta_t *meta)
generate printable string of the meta data
Definition: meta.c:33
char sep_field
Definition: meta.h:48
char * version
Definition: meta.h:61
char * type
Definition: meta.h:63
char * subtype
Definition: meta.h:65
Definition: meta.h:76
bom_t * bom
Definition: meta.h:67
Definition: meta.h:80
Definition: meta.h:82
int crlf
Definition: meta.h:43