LMMS
Loading...
Searching...
No Matches
pretty-format.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Johannes Lorenz
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
28
29#ifndef PRETTYFORMAT_H
30#define PRETTYFORMAT_H
31
32#include <rtosc/rtosc.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38typedef struct
39{
40 bool lossless;
42 const char* sep;
45
57size_t rtosc_print_arg_val(const rtosc_arg_val_t* arg, char* buffer,
58 size_t buffersize, const rtosc_print_options* opt,
59 int* cols_used);
60
68size_t rtosc_print_arg_vals(const rtosc_arg_val_t *args, size_t n,
69 char *buffer, size_t bs,
70 const rtosc_print_options* opt,
71 int cols_used);
72
87size_t rtosc_print_message(const char* address,
88 const rtosc_arg_val_t *args, size_t n,
89 char *buffer, size_t bs,
90 const rtosc_print_options* opt,
91 int cols_used);
92
99const char* rtosc_skip_next_printed_arg(const char* src);
100
112int rtosc_count_printed_arg_vals(const char* src);
113
124
139size_t rtosc_scan_arg_val(const char* src,
141 char* buffer_for_strings, size_t* bufsize);
142
152size_t rtosc_scan_arg_vals(const char* src,
153 rtosc_arg_val_t *args, size_t n,
154 char* buffer_for_strings, size_t bufsize);
155
174size_t rtosc_scan_message(const char* src,
175 char* address, size_t adrsize,
176 rtosc_arg_val_t *args, size_t n,
177 char* buffer_for_strings, size_t bufsize);
178
179#ifdef __cplusplus
180};
181#endif
182#endif // PRETTYFORMAT_H
float arg(const fft_t *freqs, off_t x)
Definition OscilGen.cpp:58
const char * msg
Definition missing_descriptor.c:20
int rtosc_count_printed_arg_vals_of_msg(const char *msg)
Definition pretty-format.c:739
size_t rtosc_print_arg_vals(const rtosc_arg_val_t *args, size_t n, char *buffer, size_t bs, const rtosc_print_options *opt, int cols_used)
Definition pretty-format.c:297
size_t rtosc_print_message(const char *address, const rtosc_arg_val_t *args, size_t n, char *buffer, size_t bs, const rtosc_print_options *opt, int cols_used)
Definition pretty-format.c:344
size_t rtosc_scan_message(const char *src, char *address, size_t adrsize, rtosc_arg_val_t *args, size_t n, char *buffer_for_strings, size_t bufsize)
Definition pretty-format.c:1086
int rtosc_count_printed_arg_vals(const char *src)
Definition pretty-format.c:715
size_t rtosc_scan_arg_vals(const char *src, rtosc_arg_val_t *args, size_t n, char *buffer_for_strings, size_t bufsize)
Definition pretty-format.c:1059
size_t rtosc_print_arg_val(const rtosc_arg_val_t *arg, char *buffer, size_t buffersize, const rtosc_print_options *opt, int *cols_used)
Definition pretty-format.c:69
size_t rtosc_scan_arg_val(const char *src, rtosc_arg_val_t *arg, char *buffer_for_strings, size_t *bufsize)
Definition pretty-format.c:779
const char * rtosc_skip_next_printed_arg(const char *src)
Definition pretty-format.c:566
Definition rtosc.h:127
Definition pretty-format.h:39
bool lossless
will add hex notation behind floats
Definition pretty-format.h:40
int floating_point_precision
Definition pretty-format.h:41
int linelength
Definition pretty-format.h:43
const char * sep
separator for multiple argument values
Definition pretty-format.h:42
int n
Definition crypt.c:458