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