summaryrefslogtreecommitdiffstats
path: root/src/curconfig.c
blob: 4a26a334fabb796c0ad9d28454c09a35c92df343 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include <stdio.h>
#include "internal.h"

const char *rccGetEngineName(rcc_context ctx, rcc_engine_id engine_id) {
    if (!ctx) return NULL;
    return rccConfigGetEngineName(ctx->current_config, engine_id);
}

const char *rccGetCharsetName(rcc_context ctx, rcc_charset_id charset_id) {
    if (!ctx) return NULL;
    return rccConfigGetCharsetName(ctx->current_config, charset_id);
}

const char *rccGetAutoCharsetName(rcc_context ctx, rcc_charset_id charset_id) {
    if (!ctx) return NULL;
    return rccConfigGetAutoCharsetName(ctx->current_config, charset_id);
}

rcc_engine_id rccGetEngineByName(rcc_context ctx, const char *name) {
    if (!ctx) return (rcc_engine_id)-1;
    return rccConfigGetEngineByName(ctx->current_config, name);
}

rcc_charset_id rccGetCharsetByName(rcc_context ctx, const char *name) {
    if (!ctx) return (rcc_charset_id)-1;
    return rccConfigGetCharsetByName(ctx->current_config, name);
}

rcc_charset_id rccGetAutoCharsetByName(rcc_context ctx, const char *name) {
    if (!ctx) return (rcc_charset_id)-1;
    return rccConfigGetAutoCharsetByName(ctx->current_config, name);
}

rcc_engine_id rccGetSelectedEngine(rcc_context ctx) {
    if (!ctx) return (rcc_engine_id)-1;
    return rccConfigGetSelectedEngine(ctx->current_config);
}

const char *rccGetSelectedEngineName(rcc_context ctx) {
    if (!ctx) return NULL;
    return rccConfigGetSelectedEngineName(ctx->current_config);
}

rcc_engine_id rccGetCurrentEngine(rcc_context ctx) {
    if (!ctx) return (rcc_engine_id)-1;
    return rccConfigGetCurrentEngine(ctx->current_config);
}

const char *rccGetCurrentEngineName(rcc_context ctx) {
    if (!ctx) return NULL;
    return rccConfigGetCurrentEngineName(ctx->current_config);
}

rcc_charset_id rccGetSelectedCharset(rcc_context ctx, rcc_class_id class_id) {
    return rccConfigGetSelectedCharset(ctx->current_config, class_id);
}

const char *rccGetSelectedCharsetName(rcc_context ctx, rcc_class_id class_id) {
    if (!ctx) return NULL;
    return rccConfigGetSelectedCharsetName(ctx->current_config, class_id);
}

rcc_charset_id rccGetCurrentCharset(rcc_context ctx, rcc_class_id class_id) {
    return rccConfigGetCurrentCharset(ctx->current_config, class_id);
}

const char *rccGetCurrentCharsetName(rcc_context ctx, rcc_class_id class_id) {
    if (!ctx) return NULL;
    return rccConfigGetCurrentCharsetName(ctx->current_config, class_id);
}

int rccSetEngine(rcc_context ctx, rcc_engine_id engine_id) {
    if (!ctx) return -1;
    return rccConfigSetEngine(ctx->current_config, engine_id);
}

int rccSetCharset(rcc_context ctx, rcc_class_id class_id, rcc_charset_id charset_id) {
    if (!ctx) return -1;
    return rccConfigSetCharset(ctx->current_config, class_id, charset_id);
}

int rccSetEngineByName(rcc_context ctx, const char *name) {
    if (!ctx) return -1;
    return rccConfigSetEngineByName(ctx->current_config, name);
}

int rccSetCharsetByName(rcc_context ctx, rcc_class_id class_id, const char *name) {
    if (!ctx) return -1;
    return rccConfigSetCharsetByName(ctx->current_config, class_id, name);
}

rcc_charset_id rccGetLocaleCharset(rcc_context ctx, const char *locale_variable) {
    if (!ctx) return (rcc_charset_id)-1;
    return rccConfigGetLocaleCharset(ctx->current_config, locale_variable);
}