Subversion Repositories SvarDOS

Rev

Rev 597 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 597 Rev 599
Line 23... Line 23...
23
 */
23
 */
24
 
24
 
25
#ifndef SVARLANG_H
25
#ifndef SVARLANG_H
26
#define SVARLANG_H
26
#define SVARLANG_H
27
 
27
 
-
 
28
/* loads translations for program PROGNAME, language LANG, in the path NLSPATH.
-
 
29
 * returns 0 on success. */
28
int svarlang_load(const char *progname, const char *lang, const char *nlspath);
30
int svarlang_load(const char *progname, const char *lang, const char *nlspath);
29
 
31
 
-
 
32
/* same as svarlang_load(), but relies on getenv() to pull LANG and NLSPATH. */
-
 
33
int svarlang_autoload(const char *progname);
-
 
34
 
-
 
35
/* Returns a pointer to the string "id". Does not require svalang_load() to be
-
 
36
 * executed, but then it will only return the reference language strings.
-
 
37
 * a string id is the concatenation of the CATS-style identifiers, for example
-
 
38
 * string 1,0 becomes 0x0100, string 2.10 is 0x020A, etc. */
30
const char *svarlang_strid(unsigned short id);
39
const char *svarlang_strid(unsigned short id);
31
 
40
 
-
 
41
/* a convenience definition to fetch strings by their CATS-style pairs instead
-
 
42
 * of the 16-bit id. */
32
#define svarlang_str(x, y) svarlang_strid((x << 8) | y)
43
#define svarlang_str(x, y) svarlang_strid((x << 8) | y)
33
 
44
 
34
#endif
45
#endif