File: template.h

package info (click to toggle)
cdebconf 0.227
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,552 kB
  • sloc: ansic: 16,568; sh: 549; makefile: 456; sql: 52; perl: 13
file content (53 lines) | stat: -rw-r--r-- 1,270 bytes parent folder | download | duplicates (6)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * @file template.c
 * @brief interface to debconf templates
 */
#ifndef _TEMPLATE_H_
#define _TEMPLATE_H_

#include <stdbool.h>

struct template_l10n_fields
{
	char *language;
	char *defaultval;
	char *choices;
	char *indices;
	char *description;
	char *extended_description;
	struct template_l10n_fields *next;
};

struct template
{
	char *tag;
	unsigned int ref;
	char *type;
	char *help;
	struct template_l10n_fields *fields;
	struct template *next;
};

extern const char *template_fields_list[];

bool load_all_translations(void);

struct template *template_new(const char *tag);
void template_delete(struct template *t);
void template_ref(struct template *t);
void template_deref(struct template *t);
struct template *template_dup(const struct template *t);
struct template *template_l10nmerge(struct template *ret, const struct template *t);
void template_l10nclear(struct template *t);
struct template *template_load(const char *filename);
const char *template_lget(const struct template *t, const char *lang, const char *field);
void template_lset(struct template *t, const char *lang, const char *field, const char *value);
const char *template_next_lang(const struct template *t, const char *l);

#endif

/*
Local variables:
c-file-style: "linux"
End:
*/