RNAlib-2.4.14
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 
45 void
46 vrna_cstr_free(vrna_cstr_t buf);
47 
48 
60 void
61 vrna_cstr_close(vrna_cstr_t buf);
62 
63 
77 void
78 vrna_cstr_fflush(struct vrna_cstr_s *buf);
79 
80 
81 const char *
82 vrna_cstr_string(vrna_cstr_t buf);
83 
84 
85 int
86 vrna_cstr_vprintf(vrna_cstr_t buf,
87  const char *format,
88  va_list args);
89 
90 
91 int
92 vrna_cstr_printf(vrna_cstr_t buf,
93  const char *format,
94  ...);
95 
96 
97 void
98 vrna_cstr_message_info(vrna_cstr_t buf,
99  const char *format,
100  ...);
101 
102 
103 void
104 vrna_cstr_message_vinfo(vrna_cstr_t buf,
105  const char *format,
106  va_list args);
107 
108 
109 void
110 vrna_cstr_message_warning(struct vrna_cstr_s *buf,
111  const char *format,
112  ...);
113 
114 
115 void
116 vrna_cstr_message_vwarning(struct vrna_cstr_s *buf,
117  const char *format,
118  va_list args);
119 
120 
121 void
122 vrna_cstr_print_fasta_header(vrna_cstr_t buf,
123  const char *head);
124 
125 
126 void
127 vrna_cstr_printf_structure(struct vrna_cstr_s *buf,
128  const char *structure,
129  const char *format,
130  ...);
131 
132 
133 void
134 vrna_cstr_vprintf_structure(struct vrna_cstr_s *buf,
135  const char *structure,
136  const char *format,
137  va_list args);
138 
139 
140 void
141 vrna_cstr_printf_comment(struct vrna_cstr_s *buf,
142  const char *format,
143  ...);
144 
145 
146 void
147 vrna_cstr_vprintf_comment(struct vrna_cstr_s *buf,
148  const char *format,
149  va_list args);
150 
151 
152 void
153 vrna_cstr_printf_thead(struct vrna_cstr_s *buf,
154  const char *format,
155  ...);
156 
157 
158 void
159 vrna_cstr_vprintf_thead(struct vrna_cstr_s *buf,
160  const char *format,
161  va_list args);
162 
163 
164 void
165 vrna_cstr_printf_tbody(struct vrna_cstr_s *buf,
166  const char *format,
167  ...);
168 
169 
170 void
171 vrna_cstr_vprintf_tbody(struct vrna_cstr_s *buf,
172  const char *format,
173  va_list args);
174 
175 
176 void
177 vrna_cstr_print_eval_sd_corr(struct vrna_cstr_s *buf);
178 
179 
180 void
181 vrna_cstr_print_eval_ext_loop(struct vrna_cstr_s *buf,
182  int energy);
183 
184 
185 void
186 vrna_cstr_print_eval_hp_loop(struct vrna_cstr_s *buf,
187  int i,
188  int j,
189  char si,
190  char sj,
191  int energy);
192 
193 
194 void
195 vrna_cstr_print_eval_hp_loop_revert(struct vrna_cstr_s *buf,
196  int i,
197  int j,
198  char si,
199  char sj,
200  int energy);
201 
202 
203 void
204 vrna_cstr_print_eval_int_loop(struct vrna_cstr_s *buf,
205  int i,
206  int j,
207  char si,
208  char sj,
209  int k,
210  int l,
211  char sk,
212  char sl,
213  int energy);
214 
215 
216 void
217 vrna_cstr_print_eval_int_loop_revert(struct vrna_cstr_s *buf,
218  int i,
219  int j,
220  char si,
221  char sj,
222  int k,
223  int l,
224  char sk,
225  char sl,
226  int energy);
227 
228 
229 void
230 vrna_cstr_print_eval_mb_loop(struct vrna_cstr_s *buf,
231  int i,
232  int j,
233  char si,
234  char sj,
235  int energy);
236 
237 
238 void
239 vrna_cstr_print_eval_mb_loop_revert(struct vrna_cstr_s *buf,
240  int i,
241  int j,
242  char si,
243  char sj,
244  int energy);
245 
246 
247 void
248 vrna_cstr_print_eval_gquad(struct vrna_cstr_s *buf,
249  int i,
250  int L,
251  int l[3],
252  int energy);
253 
254 
259 #endif
vrna_cstr_t vrna_cstr(size_t size, FILE *output)
Create a dynamic char * stream data structure.
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_close(vrna_cstr_t buf)
Free the memory occupied by a dynamic char * stream and close the output stream.