/rusxmms/librcc

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcc

« back to all changes in this revision

Viewing changes to ui/rccnames.c

  • Committer: Suren A. Chilingaryan
  • Date: 2005-07-02 05:08:36 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--patch-3
02.07.2005

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
 
 
3
#include "internal.h"
 
4
 
 
5
const char *rccUiGetLanguageName(rcc_ui_context ctx, const char *lang) {
 
6
    unsigned int i;
 
7
    rcc_language_name *names;
 
8
    
 
9
    if ((!ctx)||(!lang)) return NULL;
 
10
 
 
11
    names = ctx->language_names;
 
12
 
 
13
    for (i=0;names[i].sn;i++)
 
14
        if (!strcmp(lang, names[i].sn)) return names[i].name;
 
15
    
 
16
    return lang;
 
17
}
 
18
 
 
19
const char *rccUiGetOptionName(rcc_ui_context ctx, rcc_option option) {
 
20
    unsigned int i;
 
21
    rcc_option_name *names;
 
22
    
 
23
    if (!ctx) return NULL;
 
24
 
 
25
    names = ctx->option_names;
 
26
 
 
27
    for (i=0;i<RCC_MAX_OPTIONS;i++)
 
28
        if (names[i].option == option) return names[i].name;
 
29
    
 
30
    return NULL;
 
31
}