/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/librccui.c

  • Committer: Suren A. Chilingaryan
  • Date: 2005-07-29 03:26:28 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--patch-23
Translation
    - Language Translation using libtranslate is implemented
    - Autoengine sets current charset (option)

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
            fullname = rccUiXmlGetText(node); \
113
113
            if (fullname) { \
114
114
                if (icnv) { \
115
 
                    newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0); \
116
 
                    if (newsize != (size_t)-1) { \
 
115
                    tmpbuf = rccIConv(icnv, fullname, 0, NULL); \
 
116
                    if (tmpbuf) { \
117
117
                        cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf); \
118
118
                        fullname = rccUiXmlGetText(cnode); \
119
119
                        if (!fullname) fullname = rccUiXmlGetText(node); \
 
120
                        free(tmpbuf); \
120
121
                    } \
121
122
                } \
122
123
                var = fullname; \
154
155
                fullname = rccUiXmlGetText(node); \
155
156
                if (fullname) { \
156
157
                    if (icnv) { \
157
 
                        newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0); \
158
 
                        if (newsize != (size_t)-1) { \
 
158
                        tmpbuf = rccIConv(icnv, fullname, 0, NULL); \
 
159
                        if (tmpbuf) { \
159
160
                            cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf); \
160
161
                            fullname = rccUiXmlGetText(cnode); \
161
162
                            if (!fullname) fullname = rccUiXmlGetText(node); \
 
163
                            free(tmpbuf); \
162
164
                        } \
163
165
                    } \
164
166
                    \
197
199
    
198
200
    unsigned int npos;
199
201
 
200
 
    size_t newsize;    
201
 
    char tmpbuf[RCC_UI_MAX_STRING_CHARS+1];
 
202
    char *tmpbuf;
202
203
    char ctype_charset[32];
203
204
    char locale[32];
204
205
    rcc_iconv icnv;
271
272
            if (!fullname) continue;
272
273
 
273
274
            if (icnv) {
274
 
                newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
275
 
                if (newsize != (size_t)-1) {
 
275
                tmpbuf = rccIConv(icnv, fullname, 0, NULL);
 
276
                if (tmpbuf) {
276
277
                    cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
277
278
                    fullname = rccUiXmlGetText(cnode);
278
279
                    if (!fullname) fullname = rccUiXmlGetText(node);
 
280
                    free(tmpbuf);
279
281
                }
280
282
            }
281
283
            
319
321
                fullname = rccUiXmlGetText(node);
320
322
                if (fullname) {
321
323
                    if (icnv) {
322
 
                        newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
323
 
                        if (newsize != (size_t)-1) {
 
324
                        tmpbuf = rccIConv(icnv, fullname, 0, NULL);
 
325
                        if (tmpbuf) {
324
326
                            cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
325
327
                            fullname = rccUiXmlGetText(cnode);
326
328
                            if (!fullname) fullname = rccUiXmlGetText(node);
 
329
                            free(tmpbuf);
327
330
                        }
328
331
                    }
329
332
                    option_name->name = fullname;
346
349
                    fullname = rccUiXmlGetText(node);
347
350
                    if (fullname) {
348
351
                        if (icnv) {
349
 
                            newsize = rccIConvRecode(icnv, tmpbuf, RCC_UI_MAX_STRING_CHARS, fullname, 0);
350
 
                            if (newsize != (size_t)-1) {
 
352
                            tmpbuf = rccIConv(icnv, fullname, 0, NULL);
 
353
                            if (tmpbuf) {
351
354
                                cnode = xmlNewChild(node->parent, NULL, "Recoded", tmpbuf);
352
355
                                fullname = rccUiXmlGetText(cnode);
353
356
                                if (!fullname) fullname = rccUiXmlGetText(node);
 
357
                                free(tmpbuf);
354
358
                            }
355
359
                        }
356
360
                        option_name->value_names[k] = fullname;