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

« back to all changes in this revision

Viewing changes to modules/im/ximcp/imRm.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:
24
24
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
25
PERFORMANCE OF THIS SOFTWARE.
26
26
 
27
 
  Author: Takashi Fujiwara     FUJITSU LIMITED 
 
27
  Author: Takashi Fujiwara     FUJITSU LIMITED
28
28
                               fujiwara@a80.tech.yk.fujitsu.co.jp
29
29
  Modifier: Makoto Wakamatsu   Sony Corporation
30
30
                               makoto@sm.sony.co.jp
98
98
    else res_class = Xmalloc (strlen (im->core.res_class) + 50);
99
99
    /* pretend malloc always works */
100
100
 
101
 
    (void) sprintf (res_name, "%s%s%s", 
 
101
    (void) sprintf (res_name, "%s%s%s",
102
102
        im->core.res_name != NULL ? im->core.res_name : "*",
103
103
        im->core.res_name != NULL ? dotximdot : ximdot,
104
104
        "useAuth");
105
 
    (void) sprintf (res_class, "%s%s%s", 
 
105
    (void) sprintf (res_class, "%s%s%s",
106
106
        im->core.res_class != NULL ? im->core.res_class : "*",
107
107
        im->core.res_class != NULL ? dotXimdot : Ximdot,
108
108
        "UseAuth");
113
113
        }
114
114
    }
115
115
 
116
 
    (void) sprintf (res_name, "%s%s%s", 
 
116
    (void) sprintf (res_name, "%s%s%s",
117
117
        im->core.res_name != NULL ? im->core.res_name : "*",
118
118
        im->core.res_name != NULL ? dotximdot : ximdot,
119
119
        "delaybinding");
120
 
    (void) sprintf (res_class, "%s%s%s", 
 
120
    (void) sprintf (res_class, "%s%s%s",
121
121
        im->core.res_class != NULL ? im->core.res_class : "*",
122
122
        im->core.res_class != NULL ? dotXimdot : Ximdot,
123
123
        "Delaybinding");
128
128
        }
129
129
    }
130
130
 
131
 
    (void) sprintf (res_name, "%s%s%s", 
 
131
    (void) sprintf (res_name, "%s%s%s",
132
132
        im->core.res_name != NULL ? im->core.res_name : "*",
133
133
        im->core.res_name != NULL ? dotximdot : ximdot,
134
134
        "reconnect");
135
 
    (void) sprintf (res_class, "%s%s%s", 
 
135
    (void) sprintf (res_class, "%s%s%s",
136
136
        im->core.res_class != NULL ? im->core.res_class : "*",
137
137
        im->core.res_class != NULL ? dotXimdot : Ximdot,
138
138
        "Reconnect");
149
149
        return;
150
150
    }
151
151
 
152
 
    (void) sprintf (res_name, "%s%s%s", 
 
152
    (void) sprintf (res_name, "%s%s%s",
153
153
        im->core.res_name != NULL ? im->core.res_name : "*",
154
154
        im->core.res_name != NULL ? dotximdot : ximdot,
155
155
        "preeditDefaultStyle");
156
 
    (void) sprintf (res_class, "%s%s%s", 
 
156
    (void) sprintf (res_class, "%s%s%s",
157
157
        im->core.res_class != NULL ? im->core.res_class : "*",
158
158
        im->core.res_class != NULL ? dotXimdot : Ximdot,
159
159
        "PreeditDefaultStyle");
172
172
    if(!preedit_style)
173
173
        preedit_style = XIMPreeditNothing;
174
174
 
175
 
    (void) sprintf (res_name, "%s%s%s", 
 
175
    (void) sprintf (res_name, "%s%s%s",
176
176
        im->core.res_name != NULL ? im->core.res_name : "*",
177
177
        im->core.res_name != NULL ? dotximdot : ximdot,
178
178
        "statusDefaultStyle");
179
 
    (void) sprintf (res_class, "%s%s%s", 
 
179
    (void) sprintf (res_class, "%s%s%s",
180
180
        im->core.res_class != NULL ? im->core.res_class : "*",
181
181
        im->core.res_class != NULL ? dotXimdot : Ximdot,
182
182
        "StatusDefaultStyle");
628
628
                                        &win_attr) == (Status)NULL) {
629
629
        return True;
630
630
    }
631
 
   
 
631
 
632
632
    out = (Colormap *)((char *)top + info->offset);
633
633
    *out = win_attr.colormap;
634
634
    return True;
1096
1096
    if(num >0) {
1097
1097
        out->count_styles = (unsigned short)num;
1098
1098
        out->supported_styles = (XIMStyle *)((char *)tmp + sizeof(XIMStyles));
1099
 
    
 
1099
 
1100
1100
        for(i = 0; i < num; i++) {
1101
1101
            out->supported_styles[i] = styles->supported_styles[i];
1102
1102
        }
1135
1135
    if(num) {
1136
1136
        out->count_values = (unsigned short)num;
1137
1137
        out->supported_values = (char **)((char *)tmp + sizeof(XIMValuesList));
1138
 
    
 
1138
 
1139
1139
        for(i = 0; i < num; i++) {
1140
1140
            out->supported_values[i] = values_list->supported_values[i];
1141
1141
        }
2267
2267
        if(!(res = _XimGetResourceListRec(res_list, list_num, p->name))) {
2268
2268
            return p->value;
2269
2269
        }
2270
 
        check = _XimCheckIMMode(res, XIM_SETIMVALUES);  
 
2270
        check = _XimCheckIMMode(res, XIM_SETIMVALUES);
2271
2271
        if(check == XIM_CHECK_INVALID) {
2272
2272
            continue;
2273
2273
        } else if (check == XIM_CHECK_ERROR) {
2274
2274
            return p->value;
2275
2275
        }
2276
 
            
 
2276
 
2277
2277
        if(!_XimEncodeLocalIMAttr(res, top, p->value)) {
2278
2278
            return p->value;
2279
2279
        }
2297
2297
        if(!(res = _XimGetResourceListRec(res_list, list_num, p->name))) {
2298
2298
            return p->value;
2299
2299
        }
2300
 
        check = _XimCheckIMMode(res, XIM_GETIMVALUES);  
 
2300
        check = _XimCheckIMMode(res, XIM_GETIMVALUES);
2301
2301
        if(check == XIM_CHECK_INVALID) {
2302
2302
            continue;
2303
2303
        } else if (check == XIM_CHECK_ERROR) {
2304
2304
            return p->value;
2305
2305
        }
2306
 
            
 
2306
 
2307
2307
        if(!_XimDecodeLocalIMAttr(res, top, p->value)) {
2308
2308
            return p->value;
2309
2309
        }
2632
2632
 
2633
2633
    for(i = 0; i < num; i++) {
2634
2634
        if((res = _XimGetResourceListRecByQuark( res_list, list_num,
2635
 
                                info[i].quark)) == (XIMResourceList)NULL) { 
 
2635
                                info[i].quark)) == (XIMResourceList)NULL) {
2636
2636
            return False;
2637
2637
        }
2638
2638
 
2977
2977
            if(!info[i].decode) {
2978
2978
                return False;
2979
2979
            }
2980
 
            return (*info[i].decode)(&info[i], top, val); 
 
2980
            return (*info[i].decode)(&info[i], top, val);
2981
2981
        }
2982
2982
    }
2983
2983
    return False;