RNAlib-2.5.0
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 */
20 typedef struct vrna_cstr_s *vrna_cstr_t;
21 
30 vrna_cstr_t
31 vrna_cstr(size_t size,
32  FILE *output);
33 
34 
42 void
43 vrna_cstr_discard(struct vrna_cstr_s *buf);
44 
45 
56 void
57 vrna_cstr_free(vrna_cstr_t buf);
58 
59 
71 void
72 vrna_cstr_close(vrna_cstr_t buf);
73 
74 
88 void
89 vrna_cstr_fflush(struct vrna_cstr_s *buf);
90 
91 
92 const char *
93 vrna_cstr_string(vrna_cstr_t buf);
94 
95 
96 int
97 vrna_cstr_vprintf(vrna_cstr_t buf,
98  const char *format,
99  va_list args);
100 
101 
102 int
103 vrna_cstr_printf(vrna_cstr_t buf,
104  const char *format,
105  ...);
106 
107 
108 void
109 vrna_cstr_message_info(vrna_cstr_t buf,
110  const char *format,
111  ...);
112 
113 
114 void
115 vrna_cstr_message_vinfo(vrna_cstr_t buf,
116  const char *format,
117  va_list args);
118 
119 
120 void
121 vrna_cstr_message_warning(struct vrna_cstr_s *buf,
122  const char *format,
123  ...);
124 
125 
126 void
127 vrna_cstr_message_vwarning(struct vrna_cstr_s *buf,
128  const char *format,
129  va_list args);
130 
131 
132 void
133 vrna_cstr_print_fasta_header(vrna_cstr_t buf,
134  const char *head);
135 
136 
137 void
138 vrna_cstr_printf_structure(struct vrna_cstr_s *buf,
139  const char *structure,
140  const char *format,
141  ...);
142 
143 
144 void
145 vrna_cstr_vprintf_structure(struct vrna_cstr_s *buf,
146  const char *structure,
147  const char *format,
148  va_list args);
149 
150 
151 void
152 vrna_cstr_printf_comment(struct vrna_cstr_s *buf,
153  const char *format,
154  ...);
155 
156 
157 void
158 vrna_cstr_vprintf_comment(struct vrna_cstr_s *buf,
159  const char *format,
160  va_list args);
161 
162 
163 void
164 vrna_cstr_printf_thead(struct vrna_cstr_s *buf,
165  const char *format,
166  ...);
167 
168 
169 void
170 vrna_cstr_vprintf_thead(struct vrna_cstr_s *buf,
171  const char *format,
172  va_list args);
173 
174 
175 void
176 vrna_cstr_printf_tbody(struct vrna_cstr_s *buf,
177  const char *format,
178  ...);
179 
180 
181 void
182 vrna_cstr_vprintf_tbody(struct vrna_cstr_s *buf,
183  const char *format,
184  va_list args);
185 
186 
187 void
188 vrna_cstr_print_eval_sd_corr(struct vrna_cstr_s *buf);
189 
190 
191 void
192 vrna_cstr_print_eval_ext_loop(struct vrna_cstr_s *buf,
193  int energy);
194 
195 
196 void
197 vrna_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 
205 void
206 vrna_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 
214 void
215 vrna_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 
227 void
228 vrna_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 
240 void
241 vrna_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 
249 void
250 vrna_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 
258 void
259 vrna_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.