~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/xlibi18n/lcGeneric.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
716
716
    /***** wc_encoding_mask *****/
717
717
    _XlcGetResource(lcd, "XLC_XLOCALE", "wc_encoding_mask", &value, &num);
718
718
    if (num > 0) {
719
 
        if (string_to_ulong(value[0], &l) == False) 
 
719
        if (string_to_ulong(value[0], &l) == False)
720
720
            goto err;
721
721
        gen->wc_encode_mask = l;
722
722
    }
738
738
        gen->force_convert_to_mb = True;
739
739
    else
740
740
        gen->force_convert_to_mb = False;
741
 
    
 
741
 
742
742
    for (i = 0; ; i++) {
743
743
        CodeSetRec *codeset = NULL;
744
744
        char cs[16];
788
788
        sprintf(name, "%s.%s", cs, "mb_encoding");
789
789
        _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
790
790
        if (num > 0) {
791
 
            static struct { 
 
791
            static struct {
792
792
                const char *str;
793
793
                EncodingType type;
794
794
            } shifts[] = {
813
813
                        break;
814
814
                    }
815
815
                }
816
 
                if (strlen (tmp) > sizeof encoding || 
 
816
                if (strlen (tmp) > sizeof encoding ||
817
817
                    string_to_encoding(tmp, encoding) == False)
818
818
                        goto err;
819
819
                add_parse_list(gen, type, encoding, codeset);
826
826
        if (num > 0) {
827
827
            if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
828
828
                goto err;
829
 
            if (string_to_ulong(value[0], &l) == False) 
 
829
            if (string_to_ulong(value[0], &l) == False)
830
830
                goto err;
831
831
            codeset->wc_encoding = l;
832
832
        }
833
 
  
 
833
 
834
834
        /***** codeset.ct_encoding *****/
835
835
        sprintf(name, "%s.%s", cs, "ct_encoding");
836
836
        _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
950
950
        /* For VW/UDC end */
951
951
 
952
952
    }
953
 
         
 
953
 
954
954
    read_charset_define(lcd,gen);       /* For VW/UDC */
955
955
    read_segmentconversion(lcd,gen);    /* For VW/UDC */
956
956
 
1031
1031
}
1032
1032
 
1033
1033
/* VW/UDC start 95.01.08 */
1034
 
static void 
 
1034
static void
1035
1035
freeByteM(
1036
1036
    CodeSet codeset)
1037
1037
{
1047
1047
            blst[i].byteinfo = NULL;
1048
1048
        }
1049
1049
    }
1050
 
    Xfree(codeset->byteM); 
 
1050
    Xfree(codeset->byteM);
1051
1051
    codeset->byteM = NULL;
1052
1052
}
1053
1053
 
1054
 
static void 
 
1054
static void
1055
1055
freeConversion(
1056
1056
    CodeSet codeset)
1057
1057
{
1078
1078
    }
1079
1079
}
1080
1080
 
1081
 
static void 
 
1081
static void
1082
1082
freeExtdSegment(
1083
1083
    CodeSet codeset)
1084
1084
{
1095
1095
        Xfree(ctextseg->area);
1096
1096
        ctextseg->area = NULL;
1097
1097
    }
1098
 
    Xfree(codeset->ctextseg); 
 
1098
    Xfree(codeset->ctextseg);
1099
1099
    codeset->ctextseg = NULL;
1100
1100
}
1101
1101
 
1102
 
static void 
 
1102
static void
1103
1103
freeParseInfo(
1104
1104
    CodeSet codeset)
1105
1105
{
1112
1112
        Xfree(parse_info->encoding);
1113
1113
        parse_info->encoding = NULL;
1114
1114
    }
1115
 
    Xfree(codeset->parse_info); 
 
1115
    Xfree(codeset->parse_info);
1116
1116
    codeset->parse_info = NULL;
1117
1117
}
1118
1118
 
1154
1154
            seg[i].source_encoding = NULL;
1155
1155
        }
1156
1156
        if (seg[i].destination_encoding) {
1157
 
            Xfree(seg[i].destination_encoding); 
 
1157
            Xfree(seg[i].destination_encoding);
1158
1158
            seg[i].destination_encoding = NULL;
1159
1159
        }
1160
1160
        if (seg[i].conv) {