/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 src/recode.c

  • Committer: Suren A. Chilingaryan
  • Date: 2005-12-31 00:10:22 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcc--main--0.1--patch-34
64bit fixes
    + Fixed segmentation on 64 bit systems
    + SPEC file usable in both 32 and 64 bit environments

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
        }
512
512
    }
513
513
    else icnv = ctx->iconv_from[class_id];
514
 
 
 
514
    
515
515
    if (icnv) {
516
516
        ret = rccIConvInternal(ctx, icnv, buf, len);
517
 
        if (ret == (size_t)-1) return NULL;
 
517
        if (ret == (size_t)-1) {
 
518
            rccMutexUnLock(ctx->mutex);
 
519
            return NULL;
 
520
        }
518
521
        
519
522
        if ((rccGetOption(ctx, RCC_OPTION_TRANSLATE))&&(rccGetClassType(ctx, class_id) == RCC_CLASS_TRANSLATE_FROM)) {
520
523
            config = rccGetCurrentConfig(ctx);
521
524
            translate = rccRecodeTranslate(&config , class_id, ctx->tmpbuffer);
522
525
            if (translate) language_id = rccConfigGetLanguage(config);
523
526
        }
524
 
        
 
527
 
525
528
        result = rccCreateString(language_id, translate?translate:ctx->tmpbuffer, translate?0:ret);
526
529
    } else {
527
530
        if ((rccGetOption(ctx, RCC_OPTION_TRANSLATE))&&(rccGetClassType(ctx, class_id) == RCC_CLASS_TRANSLATE_FROM)) {