RNAlib-2.5.1
char_stream.h
Go to the documentation of this file.
1#ifndef VIENNA_RNA_PACKAGE_CHAR_STREAM_H
2#define VIENNA_RNA_PACKAGE_CHAR_STREAM_H
3
16#include <stdarg.h>
17#include <stdio.h>
18
19/* below is our own implementation of a dynamic char * stream */
20typedef struct vrna_cstr_s *vrna_cstr_t;
21
30vrna_cstr_t
31vrna_cstr(size_t size,
32 FILE *output);
33
34
42void
43vrna_cstr_discard(struct vrna_cstr_s *buf);
44
45
56void
57vrna_cstr_free(vrna_cstr_t buf);
58
59
71void
72vrna_cstr_close(vrna_cstr_t buf);
73
74
88void
89vrna_cstr_fflush(struct vrna_cstr_s *buf);
90
91
92const char *
93vrna_cstr_string(vrna_cstr_t buf);
94
95
96int
97vrna_cstr_vprintf(vrna_cstr_t buf,
98 const char *format,
99 va_list args);
100
101
102int
103vrna_cstr_printf(vrna_cstr_t buf,
104 const char *format,
105 ...);
106
107
108void
109vrna_cstr_message_info(vrna_cstr_t buf,
110 const char *format,
111 ...);
112
113
114void
115vrna_cstr_message_vinfo(vrna_cstr_t buf,
116 const char *format,
117 va_list args);
118
119
120void
121vrna_cstr_message_warning(struct vrna_cstr_s *buf,
122 const char *format,
123 ...);
124
125
126void
127vrna_cstr_message_vwarning(struct vrna_cstr_s *buf,
128 const char *format,
129 va_list args);
130
131
132void
133vrna_cstr_print_fasta_header(vrna_cstr_t buf,
134 const char *head);
135
136
137void
138vrna_cstr_printf_structure(struct vrna_cstr_s *buf,
139 const char *structure,
140 const char *format,
141 ...);
142
143
144void
145vrna_cstr_vprintf_structure(struct vrna_cstr_s *buf,
146 const char *structure,
147 const char *format,
148 va_list args);
149
150
151void
152vrna_cstr_printf_comment(struct vrna_cstr_s *buf,
153 const char *format,
154 ...);
155
156
157void
158vrna_cstr_vprintf_comment(struct vrna_cstr_s *buf,
159 const char *format,
160 va_list args);
161
162
163void
164vrna_cstr_printf_thead(struct vrna_cstr_s *buf,
165 const char *format,
166 ...);
167
168
169void
170vrna_cstr_vprintf_thead(struct vrna_cstr_s *buf,
171 const char *format,
172 va_list args);
173
174
175void
176vrna_cstr_printf_tbody(struct vrna_cstr_s *buf,
177 const char *format,
178 ...);
179
180
181void
182vrna_cstr_vprintf_tbody(struct vrna_cstr_s *buf,
183 const char *format,
184 va_list args);
185
186
187void
188vrna_cstr_print_eval_sd_corr(struct vrna_cstr_s *buf);
189
190
191void
192vrna_cstr_print_eval_ext_loop(struct vrna_cstr_s *buf,
193 int energy);
194
195
196void
197vrna_cstr_print_eval_hp_loop(struct vrna_cstr_s *buf,
198 int i,
199 int j,
200 char si,
201 char sj,
202 int energy);
203
204
205void
206vrna_cstr_print_eval_hp_loop_revert(struct vrna_cstr_s *buf,
207 int i,
208 int j,
209 char si,
210 char sj,
211 int energy);
212
213
214void
215vrna_cstr_print_eval_int_loop(struct vrna_cstr_s *buf,
216 int i,
217 int j,
218 char si,
219 char sj,
220 int k,
221 int l,
222 char sk,
223 char sl,
224 int energy);
225
226
227void
228vrna_cstr_print_eval_int_loop_revert(struct vrna_cstr_s *buf,
229 int i,
230 int j,
231 char si,
232 char sj,
233 int k,
234 int l,
235 char sk,
236 char sl,
237 int energy);
238
239
240void
241vrna_cstr_print_eval_mb_loop(struct vrna_cstr_s *buf,
242 int i,
243 int j,
244 char si,
245 char sj,
246 int energy);
247
248
249void
250vrna_cstr_print_eval_mb_loop_revert(struct vrna_cstr_s *buf,
251 int i,
252 int j,
253 char si,
254 char sj,
255 int energy);
256
257
258void
259vrna_cstr_print_eval_gquad(struct vrna_cstr_s *buf,
260 int i,
261 int L,
262 int l[3],
263 int energy);
264
265
270#endif
void vrna_cstr_close(vrna_cstr_t buf)
Free the memory occupied by a dynamic char * stream and close the output stream.
void vrna_cstr_free(vrna_cstr_t buf)
Free the memory occupied by a dynamic char * stream data structure.
void vrna_cstr_fflush(struct vrna_cstr_s *buf)
Flush the dynamic char * output stream.
void vrna_cstr_discard(struct vrna_cstr_s *buf)
Discard the current content of the dynamic char * stream data structure.
vrna_cstr_t vrna_cstr(size_t size, FILE *output)
Create a dynamic char * stream data structure.