summaryrefslogtreecommitdiffstats
path: root/kpat/freecell-solver/app_str.h
blob: c6b6732a61bbcbb8cf2bae9a9b8b5471a2c80575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

#ifndef FC_SOLVE__APP_STR_H
#define FC_SOLVE__APP_STR_H

#ifdef __cplusplus
extern "C" {
#endif

struct freecell_solver_append_string_struct
{
    char * buffer;
    char * end_of_buffer;
    int max_size;
    int size_of_margin;
};

typedef struct freecell_solver_append_string_struct freecell_solver_append_string_t;

extern freecell_solver_append_string_t * freecell_solver_append_string_alloc(int size_margin);

extern int freecell_solver_append_string_sprintf(
    freecell_solver_append_string_t * app_str,
    const char * format,
    ...
    );

extern char * freecell_solver_append_string_finalize(
    freecell_solver_append_string_t * app_str
    );

#ifdef __cplusplus
}
#endif

#endif /* #ifndef FC_SOLVE__APP_STR_H */