Back to index

im-sdk  12.3.91
comp-misc.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <sys/types.h>
00005 #if defined(lint) && defined(HAVE_NOTE_H)
00006 #include <note.h>
00007 #endif /* lint && HAVE_NOTE_H */
00008 
00009 #include <iiimp-data.h>
00010 
00011 #include "iiimp-dataP.h"
00012 #include "print-misc.h"
00013 
00014 
00015 IIIMP_card16_list *
00016 iiimp_card16_list_new(
00017     IIIMP_data_s *          data_s,
00018     int                            count,
00019     const IIIMP_card16 *    ptr)
00020 {
00021     IIIMP_card16_list *     data;
00022     size_t           nbyte;
00023 
00024     if (0 == count) {
00025        data_s->status = IIIMP_DATA_NO_ERROR;
00026        return NULL;
00027     }
00028 
00029     data = (IIIMP_card16_list *)malloc(sizeof (IIIMP_card16_list));
00030     if (NULL == data) {
00031        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00032        return NULL;
00033     }
00034 
00035     nbyte = (2 * count);
00036 
00037     data->nbyte = nbyte;
00038     data->count = count;
00039 
00040     nbyte = ((sizeof (IIIMP_card16)) * count);
00041 
00042     if (0 == count) {
00043        data->ptr = NULL;
00044     } else {
00045        data->ptr = (IIIMP_card16 *)malloc(nbyte);
00046        if (NULL == data->ptr) {
00047            free(data);
00048            data_s->status = IIIMP_DATA_MALLOC_ERROR;
00049            return NULL;
00050        }
00051     }
00052 
00053     if (NULL != ptr) {
00054        (void)memcpy(data->ptr, ptr, nbyte);
00055     }
00056 
00057     return data;
00058 }
00059 
00060 
00061 void
00062 iiimp_card16_list_delete(IIIMP_data_s * data_s, IIIMP_card16_list * data)
00063 {
00064 #if defined(lint) && defined(HAVE_NOTE_H)
00065     NOTE(ARGUNUSED(data_s))
00066 #endif /* lint && HAVE_NOTE_H */
00067     if (NULL == data) return;
00068     free(data->ptr);
00069     free(data);
00070     return;
00071 }
00072 
00073 
00074 void
00075 iiimp_card16_list_pack(
00076     IIIMP_data_s *   data_s,
00077     IIIMP_card16_list *     m,
00078     size_t *         nbyte,
00079     uchar_t **              ptr)
00080 {
00081     uchar_t * p;
00082     size_t    rest;
00083     int              i;
00084 
00085     if (NULL == m) return;
00086 
00087     rest = *nbyte;
00088     p = *ptr;
00089 
00090     for (i = 0; i < m->count; i++) {
00091        PUTU16(*(m->ptr + i), rest, p, data_s->byte_swap);
00092     }
00093 
00094     *nbyte = rest;
00095     *ptr = p;
00096 
00097     return;
00098 }
00099 
00100 
00101 IIIMP_card16_list *
00102 iiimp_card16_list_unpack(
00103     IIIMP_data_s *   data_s,
00104     size_t *         nbyte,
00105     const uchar_t ** ptr,
00106     size_t           nbyte_max)
00107 {
00108     IIIMP_card16_list *     data;
00109     const uchar_t *  p;
00110     size_t           rest;
00111     int                     data_count;
00112     int                     i;
00113 
00114     if (0 == nbyte_max) {
00115        data_s->status = IIIMP_DATA_INVALID;
00116        return NULL;
00117     }
00118 
00119     rest = nbyte_max;
00120     p = *ptr;
00121 
00122     if ((*nbyte < rest) || (0 != (nbyte_max & 0x01))) {
00123        data_s->status = IIIMP_DATA_INVALID;
00124        return NULL;
00125     }
00126 
00127     data_count = (nbyte_max / 2);
00128 
00129     data = (IIIMP_card16_list *)malloc(sizeof (IIIMP_card16_list));
00130     if (NULL == data) {
00131        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00132        return NULL;
00133     }
00134 
00135     data->nbyte = (2 * data_count);
00136     data->count = data_count;
00137 
00138     data->ptr = (IIIMP_card16 *)malloc(nbyte_max);
00139     if (NULL == data->ptr) {
00140        iiimp_card16_list_delete(data_s, data);
00141        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00142        return NULL;
00143     }
00144 
00145     for (i = 0; i < data_count; i++) {
00146        GETU16(*(data->ptr + i), rest, p, data_s->byte_swap);
00147     }
00148 
00149     *nbyte -= (nbyte_max - rest);
00150     *ptr += nbyte_max;
00151 
00152     return data;
00153 }
00154 
00155 
00156 void
00157 iiimp_card16_list_print(
00158     IIIMP_data_s *   data_s,
00159     IIIMP_card16_list *     m)
00160 {
00161     int       i;
00162     int       n;
00163 
00164     if (NULL == m) return;
00165 
00166     for (i = 0; i < m->count;) {
00167        (void)fprintf(data_s->print_fp, "%8d", i);
00168        for (n = 0; (n < 8) && (i < m->count); i++, n++) {
00169            (void)fprintf(data_s->print_fp, " %04x", *(m->ptr + i));
00170        }
00171        (void)fputc('\n', data_s->print_fp);
00172     }
00173 }
00174 
00175 
00176 IIIMP_card32_list *
00177 iiimp_card32_list_new(
00178     IIIMP_data_s *          data_s,
00179     int                            count,
00180     const IIIMP_card32 *    ptr)
00181 {
00182     IIIMP_card32_list *     data;
00183     size_t           nbyte;
00184 
00185     if (0 == count) {
00186        data_s->status = IIIMP_DATA_NO_ERROR;
00187        return NULL;
00188     }
00189 
00190     data = (IIIMP_card32_list *)malloc(sizeof (IIIMP_card32_list));
00191     if (NULL == data) {
00192        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00193        return NULL;
00194     }
00195 
00196     nbyte = (4 * count);
00197 
00198     data->nbyte = (nbyte + PAD(nbyte));
00199     data->count = count;
00200 
00201     nbyte = ((sizeof (IIIMP_card32)) * count);
00202 
00203     if (0 == count) {
00204        data->ptr = NULL;
00205     } else {
00206        data->ptr = (IIIMP_card32 *)malloc(nbyte);
00207        if (NULL == data->ptr) {
00208            free(data);
00209            data_s->status = IIIMP_DATA_MALLOC_ERROR;
00210            return NULL;
00211        }
00212     }
00213 
00214     if (NULL != ptr) {
00215        (void)memcpy(data->ptr, ptr, nbyte);
00216     }
00217 
00218     return data;
00219 }
00220 
00221 
00222 void
00223 iiimp_card32_list_delete(IIIMP_data_s * data_s, IIIMP_card32_list * data)
00224 {
00225 #if defined(lint) && defined(HAVE_NOTE_H)
00226     NOTE(ARGUNUSED(data_s))
00227 #endif /* lint && HAVE_NOTE_H */
00228     if (NULL == data) return;
00229     free(data->ptr);
00230     free(data);
00231     return;
00232 }
00233 
00234 
00235 void
00236 iiimp_card32_list_pack(
00237     IIIMP_data_s *   data_s,
00238     IIIMP_card32_list *     m,
00239     size_t *         nbyte,
00240     uchar_t **              ptr)
00241 {
00242     uchar_t * p;
00243     size_t    rest;
00244     int              i;
00245 
00246     if (NULL == m) return;
00247 
00248     rest = *nbyte;
00249     p = *ptr;
00250 
00251     for (i = 0; i < m->count; i++) {
00252        PUTU32(*(m->ptr + i), rest, p, data_s->byte_swap);
00253     }
00254 
00255     *nbyte = rest;
00256     *ptr = p;
00257 
00258     return;
00259 }
00260 
00261 
00262 IIIMP_card32_list *
00263 iiimp_card32_list_unpack(
00264     IIIMP_data_s *   data_s,
00265     size_t *         nbyte,
00266     const uchar_t ** ptr,
00267     size_t           nbyte_max)
00268 {
00269     IIIMP_card32_list *     data;
00270     const uchar_t *  p;
00271     size_t           rest;
00272     int                     data_count;
00273     int                     i;
00274 
00275     if (0 == nbyte_max) {
00276        data_s->status = IIIMP_DATA_INVALID;
00277        return NULL;
00278     }
00279 
00280     rest = nbyte_max;
00281     p = *ptr;
00282 
00283     if ((*nbyte < rest) || (0 != (nbyte_max & 0x03))) {
00284        data_s->status = IIIMP_DATA_INVALID;
00285        return NULL;
00286     }
00287 
00288     data_count = (nbyte_max / 4);
00289 
00290     data = (IIIMP_card32_list *)malloc(sizeof (IIIMP_card32_list));
00291     if (NULL == data) {
00292        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00293        return NULL;
00294     }
00295 
00296     data->count = data_count;
00297 
00298     data->ptr = (IIIMP_card32 *)malloc(nbyte_max);
00299     if (NULL == data->ptr) {
00300        iiimp_card32_list_delete(data_s, data);
00301        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00302        return NULL;
00303     }
00304 
00305     for (i = 0; i < data_count; i++) {
00306        GETU32(*(data->ptr + i), rest, p, data_s->byte_swap);
00307     }
00308 
00309     *nbyte -= (nbyte_max - rest);
00310     *ptr += nbyte_max;
00311 
00312     return data;
00313 }
00314 
00315 
00316 void
00317 iiimp_card32_list_print(
00318     IIIMP_data_s *   data_s,
00319     IIIMP_card32_list *     m)
00320 {
00321     int       i;
00322     int       n;
00323 
00324     if (NULL == m) return;
00325 
00326     for (i = 0; i < m->count;) {
00327        (void)fprintf(data_s->print_fp, "%8d", i);
00328        for (n = 0; (n < 8) && (i < m->count); i++, n++) {
00329            (void)fprintf(data_s->print_fp, " %08x", *(m->ptr + i));
00330        }
00331        (void)fputc('\n', data_s->print_fp);
00332     }
00333 }
00334 
00335 
00336 IIIMP_card32_list *
00337 iiimp_card32_list_bit_set(
00338     IIIMP_data_s *   data_s,
00339     IIIMP_card32_list *     m,
00340     int                     bit)
00341 {
00342     int                     list_index;
00343     int                     bit_index;
00344     IIIMP_card32 *   ptr;
00345     IIIMP_card32_list *     data;
00346 
00347     list_index = (bit / 32);
00348     bit_index = (bit % 32);
00349 
00350     if ((NULL != m) && (list_index < m->count)) {
00351        *(m->ptr + list_index) |= (1 << bit_index);
00352        return m;
00353     } else {
00354        ptr = calloc((list_index + 1), (sizeof (IIIMP_card32)));
00355        if (NULL == ptr) return NULL;
00356        if (NULL != m) {
00357            memcpy(ptr, m->ptr, m->nbyte);
00358            iiimp_card32_list_delete(data_s, m);
00359        }
00360        *(ptr + list_index) |= (1 << bit_index);
00361        data = iiimp_card32_list_new(data_s, (list_index + 1), ptr);
00362        free(ptr);
00363        return data;
00364     }
00365 }
00366 
00367 
00368 void
00369 iiimp_card32_list_bit_clear(
00370     IIIMP_data_s *   data_s,
00371     IIIMP_card32_list *     m,
00372     int                     bit)
00373 {
00374 #if defined(lint) && defined(HAVE_NOTE_H)
00375     NOTE(ARGUNUSED(data_s))
00376 #endif /* lint && HAVE_NOTE_H */
00377     int                     list_index;
00378     int                     bit_index;
00379 
00380     if ((NULL == m) || (NULL == m->ptr)) return;
00381 
00382     list_index = (bit / 32);
00383     if (m->count < (list_index + 1)) return;
00384 
00385     bit_index = (bit % 32);
00386     *(m->ptr + list_index) &= (~(1 << bit_index));
00387 
00388     return;
00389 }
00390 
00391 
00392 void
00393 iiimp_card32_list_bit_clear_all(
00394     IIIMP_data_s *   data_s,
00395     IIIMP_card32_list *     m)
00396 {
00397 #if defined(lint) && defined(HAVE_NOTE_H)
00398     NOTE(ARGUNUSED(data_s))
00399 #endif /* lint && HAVE_NOTE_H */
00400     if ((NULL == m) || (NULL == m->ptr)) return;
00401     memset(m->ptr, 0, m->nbyte);
00402     return;
00403 }
00404 
00405 
00406 int
00407 iiimp_card32_list_bit_p(
00408     IIIMP_data_s *   data_s,
00409     IIIMP_card32_list *     m,
00410     int                     bit)
00411 {
00412 #if defined(lint) && defined(HAVE_NOTE_H)
00413     NOTE(ARGUNUSED(data_s))
00414 #endif /* lint && HAVE_NOTE_H */
00415     int       list_index;
00416     int       bit_index;
00417 
00418     list_index = (bit / 32);
00419     if ((list_index + 1) < m->count) return 0;
00420 
00421     bit_index = (bit % 32);
00422     return (*(m->ptr + list_index) & (1 << bit_index));
00423 }
00424 
00425 
00426 void
00427 iiimp_byte_stream_print(
00428     IIIMP_data_s *   data_s,
00429     IIIMP_byte_stream *     m)
00430 {
00431     int       i;
00432     int       n;
00433 
00434     if (NULL == m) return;
00435 
00436     for (i = 0; i < m->nbyte;) {
00437        (void)fprintf(data_s->print_fp, "%8d", i);
00438        for (n = 0; (n < 16) && (i < m->nbyte); i++, n++) {
00439            (void)fprintf(data_s->print_fp, " %02x", *(m->ptr + i));
00440        }
00441        (void)fputc('\n', data_s->print_fp);
00442     }
00443 }
00444 
00445 
00446 void
00447 iiimp_character_subsets_print(
00448     IIIMP_data_s *   data_s,
00449     IIIMP_card32 *   m)
00450 {
00451     if (NULL == m) return;
00452 
00453     (void)fprintf(data_s->print_fp, "%s", character_subsets_string_get(*m));
00454 }
00455 
00456 
00457 void
00458 iiimp_character_subsets_list_print(
00459     IIIMP_data_s *   data_s,
00460     IIIMP_card32_list *     m)
00461 {
00462     int       i;
00463 
00464     if ((NULL == m) || (m->count <= 0)) return;
00465 
00466     iiimp_character_subsets_print(data_s, m->ptr);
00467 
00468     for (i = 1; i < m->count; i++) {
00469        (void)fputc(' ', data_s->print_fp);
00470        iiimp_character_subsets_print(data_s, m->ptr + i);
00471     }
00472 }
00473 
00474 
00475 IIIMP_status
00476 iiimp_card16_list_create(
00477     IIIMP_data_s *          data_s,
00478     IIIMP_card16_list **    ptr_ret,
00479     int                            count,
00480     const IIIMP_card16 *    ptr)
00481 {
00482     *ptr_ret = iiimp_card16_list_new(data_s, count, ptr);
00483     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00484 }
00485 
00486 
00487 IIIMP_status
00488 iiimp_card32_list_create(
00489     IIIMP_data_s *          data_s,
00490     IIIMP_card32_list **    ptr_ret,
00491     int                            count,
00492     const IIIMP_card32 *    ptr)
00493 {
00494     *ptr_ret = iiimp_card32_list_new(data_s, count, ptr);
00495     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00496 }
00497 
00498 
00499 IIIMP_status
00500 iiimp_string_create(
00501     IIIMP_data_s *          data_s,
00502     IIIMP_string **         ptr_ret,
00503     size_t                  len,
00504     const IIIMP_card16 *    ptr)
00505 {
00506     *ptr_ret = iiimp_string_new(data_s, len, ptr);
00507     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00508 }
00509 
00510 
00511 IIIMP_status
00512 iiimp_feedback_attr_list_create(
00513     IIIMP_data_s *          data_s,
00514     IIIMP_feedback_attr_list **    ptr_ret,
00515     int                            count,
00516     const IIIMP_feedback_attr *    ptr)
00517 {
00518     *ptr_ret = iiimp_feedback_attr_list_new(data_s, count, ptr);
00519     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00520 }
00521 
00522 
00523 IIIMP_status
00524 iiimp_char_with_feedback_create(
00525     IIIMP_data_s *          data_s,
00526     IIIMP_char_with_feedback **    ptr_ret,
00527     IIIMP_card16            code,
00528     IIIMP_feedback_attr_list *     feedback_attr)
00529 {
00530     *ptr_ret = iiimp_char_with_feedback_new(data_s, code, feedback_attr);
00531     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00532 }
00533 
00534 
00535 IIIMP_status
00536 iiimp_operation_create(
00537     IIIMP_data_s *   data_s,
00538     IIIMP_operation **      ptr_ret,
00539     IIIMP_string *   id,
00540     size_t           value_nbyte,
00541     uchar_t *        value)
00542 {
00543     *ptr_ret = iiimp_operation_new(data_s, id, value_nbyte, value);
00544     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00545 }
00546 
00547 
00548 IIIMP_status
00549 iiimp_annotation_value_text_create(
00550     IIIMP_data_s *          data_s,
00551     IIIMP_annotation_value **      ptr_ret,
00552     IIIMP_int32                    start_index,
00553     IIIMP_int32                    end_index,
00554     IIIMP_text *            value)
00555 {
00556     *ptr_ret = iiimp_annotation_value_text_new(data_s, start_index, end_index,
00557                                           value);
00558     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00559 }
00560 
00561 
00562 IIIMP_status
00563 iiimp_annotation_value_string_create(
00564     IIIMP_data_s *          data_s,
00565     IIIMP_annotation_value **      ptr_ret,
00566     IIIMP_int32                    start_index,
00567     IIIMP_int32                    end_index,
00568     IIIMP_string *          value)
00569 {
00570     *ptr_ret = iiimp_annotation_value_string_new(data_s, start_index, end_index,
00571                                            value);
00572     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00573 }
00574 
00575 
00576 IIIMP_status
00577 iiimp_annotation_create(
00578     IIIMP_data_s *          data_s,
00579     IIIMP_annotation **            ptr_ret,
00580     IIIMP_card32            id,
00581     IIIMP_annotation_value *       value)
00582 {
00583     *ptr_ret = iiimp_annotation_new(data_s, id, value);
00584     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00585 }
00586 
00587 
00588 IIIMP_status
00589 iiimp_text_create(
00590     IIIMP_data_s *          data_s,
00591     IIIMP_text **           ptr_ret,
00592     IIIMP_char_with_feedback *     cwf,
00593     IIIMP_annotation *             anno)
00594 {
00595     *ptr_ret = iiimp_text_new(data_s, cwf, anno);
00596     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00597 }
00598 
00599 
00600 IIIMP_status
00601 iiimp_client_descriptor_create(
00602     IIIMP_data_s *          data_s,
00603     IIIMP_client_descriptor **     ptr_ret,
00604     IIIMP_string *          type,
00605     IIIMP_string *          os_name,
00606     IIIMP_string *          arch,
00607     IIIMP_string *          version,
00608     IIIMP_string *          X_display_name,
00609     IIIMP_string *          X_server_vendor)
00610 {
00611     *ptr_ret = iiimp_client_descriptor_new(data_s,
00612                                       type, os_name, arch, version,
00613                                       X_display_name, X_server_vendor);
00614     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00615 }
00616 
00617 
00618 IIIMP_status
00619 iiimp_object_descriptor_create(
00620     IIIMP_data_s *          data_s,
00621     IIIMP_object_descriptor **     ptr_ret,
00622     IIIMP_card16            category,
00623     IIIMP_card32            object_size,
00624     IIIMP_card16            id_pre,
00625     IIIMP_card16            id_dyn,
00626     IIIMP_string *          rdun,
00627     IIIMP_string *          hrn,
00628     IIIMP_string *          signature,
00629     IIIMP_string *          user)
00630 {
00631     *ptr_ret = iiimp_object_descriptor_new(data_s, category, object_size,
00632                                       id_pre, id_dyn, rdun, hrn,
00633                                       signature, user);
00634     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00635 }
00636 
00637 
00638 IIIMP_status
00639 iiimp_ccdef_create(
00640     IIIMP_data_s *   data_s,
00641     IIIMP_ccdef **   ptr_ret,
00642     IIIMP_string *   contents)
00643 {
00644     *ptr_ret = iiimp_ccdef_new(data_s, contents);
00645     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00646 }
00647 
00648 
00649 IIIMP_status
00650 iiimp_language_create(
00651     IIIMP_data_s *   data_s,
00652     IIIMP_language **       ptr_ret,
00653     IIIMP_string *   hrn,
00654     IIIMP_string *   id)
00655 {
00656     *ptr_ret = iiimp_language_new(data_s, hrn, id);
00657     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00658 }
00659 
00660 
00661 IIIMP_status
00662 iiimp_jarfile_object_create(
00663     IIIMP_data_s *          data_s,
00664     IIIMP_jarfile_object ** ptr_ret,
00665     IIIMP_string *          class_names,
00666     size_t                  value_nbyte,
00667     uchar_t *               value)
00668 {
00669     *ptr_ret = iiimp_jarfile_object_new(data_s, class_names, value_nbyte,
00670                                    value);
00671     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00672 }
00673 
00674 
00675 IIIMP_status
00676 iiimp_inputmethod_descriptor_create(
00677     IIIMP_data_s *                 data_s,
00678     IIIMP_inputmethod_descriptor **       ptr_ret,
00679     IIIMP_card16                   id,
00680     IIIMP_string *                 idname,
00681     IIIMP_string *                 hrn,
00682     IIIMP_language *               language,
00683     IIIMP_string *                 rdun)
00684 {
00685     *ptr_ret = iiimp_inputmethod_descriptor_new(data_s, id, idname, hrn,
00686                                           language, rdun);
00687     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00688 }
00689 
00690 
00691 IIIMP_status
00692 iiimp_inputmethod_descriptor2_create(
00693     IIIMP_data_s *                 data_s,
00694     IIIMP_inputmethod_descriptor **       ptr_ret,
00695     IIIMP_card16                   id,
00696     IIIMP_string *                 idname,
00697     IIIMP_string *                 hrn,
00698     IIIMP_language *               language,
00699     IIIMP_string *                 rdun,
00700     IIIMP_imeinfo *                imeinfo)
00701 {
00702     *ptr_ret = iiimp_inputmethod_descriptor2_new(data_s, id, idname, hrn,
00703                                            language, rdun, imeinfo);
00704     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00705 }
00706 
00707 
00708 IIIMP_status
00709 iiimp_binaryfile_object_create(
00710     IIIMP_data_s *          data_s,
00711     IIIMP_binaryfile_object **     ptr_ret,
00712     IIIMP_string *          object)
00713 {
00714     *ptr_ret = iiimp_binaryfile_object_new(data_s, object);
00715     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00716 }
00717 
00718 
00719 IIIMP_status
00720 iiimp_imattribute_inputmethod_descriptor_create(
00721     IIIMP_data_s *                 data_s,
00722     IIIMP_imattribute **           ptr_ret,
00723     IIIMP_card16                   id,
00724     IIIMP_card16                   id_dyn,
00725     IIIMP_inputmethod_descriptor * value)
00726 {
00727     *ptr_ret = iiimp_imattribute_inputmethod_descriptor_new(data_s, id, id_dyn,
00728                                                      value);
00729     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00730 }
00731 
00732 
00733 IIIMP_status
00734 iiimp_imattribute_object_descriptor_create(
00735     IIIMP_data_s *          data_s,
00736     IIIMP_imattribute **    ptr_ret,
00737     IIIMP_card16            id,
00738     IIIMP_card16            id_dyn,
00739     IIIMP_object_descriptor *      value)
00740 {
00741     *ptr_ret = iiimp_imattribute_object_descriptor_new(data_s, id, id_dyn,
00742                                                  value);
00743     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00744 }
00745 
00746 
00747 IIIMP_status
00748 iiimp_imattribute_client_descriptor_create(
00749     IIIMP_data_s *          data_s,
00750     IIIMP_imattribute **    ptr_ret,
00751     IIIMP_card16            id,
00752     IIIMP_card16            id_dyn,
00753     IIIMP_client_descriptor *      value)
00754 {
00755     *ptr_ret = iiimp_imattribute_client_descriptor_new(data_s, id, id_dyn,
00756                                                  value);
00757     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00758 }
00759 
00760 
00761 IIIMP_status
00762 iiimp_imattribute_ccdef_create(
00763     IIIMP_data_s *          data_s,
00764     IIIMP_imattribute **    ptr_ret,
00765     IIIMP_card16            id,
00766     IIIMP_card16            id_dyn,
00767     IIIMP_ccdef *           value)
00768 {
00769     *ptr_ret = iiimp_imattribute_ccdef_new(data_s, id, id_dyn, value);
00770     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00771 }
00772 
00773 
00774 IIIMP_status
00775 iiimp_imattribute_jar_gui_object_create(
00776     IIIMP_data_s *          data_s,
00777     IIIMP_imattribute **    ptr_ret,
00778     IIIMP_card16            id,
00779     IIIMP_card16            id_dyn,
00780     IIIMP_jarfile_object *  value)
00781 {
00782     *ptr_ret = iiimp_imattribute_jar_gui_object_new(data_s, id, id_dyn, value);
00783     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00784 }
00785 
00786 
00787 IIIMP_status
00788 iiimp_imattribute_jar_light_weight_engine_object_create(
00789     IIIMP_data_s *          data_s,
00790     IIIMP_imattribute **    ptr_ret,
00791     IIIMP_card16            id,
00792     IIIMP_card16            id_dyn,
00793     IIIMP_jarfile_object *  value)
00794 {
00795     *ptr_ret = iiimp_imattribute_jar_light_weight_engine_object_new(data_s, id,
00796                                                             id_dyn,
00797                                                             value);
00798     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00799 }
00800 
00801 
00802 IIIMP_status
00803 iiimp_imattribute_binary_gui_object_create(
00804     IIIMP_data_s *          data_s,
00805     IIIMP_imattribute **    ptr_ret,
00806     IIIMP_card16            id,
00807     IIIMP_card16            id_dyn,
00808     IIIMP_binaryfile_object *      value)
00809 {
00810     *ptr_ret = iiimp_imattribute_binary_gui_object_new(data_s, id, id_dyn,
00811                                                  value);
00812     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00813 }
00814 
00815 
00816 IIIMP_status
00817 iiimp_imattribute_binary_light_weight_engine_create(
00818     IIIMP_data_s *          data_s,
00819     IIIMP_imattribute **    ptr_ret,
00820     IIIMP_card16            id,
00821     IIIMP_card16            id_dyn,
00822     IIIMP_binaryfile_object *      value)
00823 {
00824     *ptr_ret = iiimp_imattribute_binary_light_weight_engine_new(data_s, id,
00825                                                         id_dyn, value);
00826     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00827 }
00828 
00829 
00830 IIIMP_status
00831 iiimp_imattribute_script_gui_object_create(
00832     IIIMP_data_s *          data_s,
00833     IIIMP_imattribute **    ptr_ret,
00834     IIIMP_card16            id,
00835     IIIMP_card16            id_dyn,
00836     IIIMP_binaryfile_object *      value)
00837 {
00838     *ptr_ret = iiimp_imattribute_script_gui_object_new(data_s, id, id_dyn,
00839                                                  value);
00840     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00841 }
00842 
00843 
00844 IIIMP_status
00845 iiimp_imattribute_script_light_weight_engine_create(
00846     IIIMP_data_s *          data_s,
00847     IIIMP_imattribute **    ptr_ret,
00848     IIIMP_card16            id,
00849     IIIMP_card16            id_dyn,
00850     IIIMP_binaryfile_object *      value)
00851 {
00852     *ptr_ret = iiimp_imattribute_script_light_weight_engine_new(data_s, id,
00853                                                         id_dyn, value);
00854     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00855 }
00856 
00857 
00858 IIIMP_status
00859 iiimp_icattribute_input_language_create(
00860     IIIMP_data_s *          data_s,
00861     IIIMP_icattribute **    ptr_ret,
00862     IIIMP_string *          value)
00863 {
00864     *ptr_ret = iiimp_icattribute_input_language_new(data_s, value);
00865     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00866 }
00867 
00868 
00869 IIIMP_status
00870 iiimp_icattribute_character_subsets_create(
00871     IIIMP_data_s *          data_s,
00872     IIIMP_icattribute **    ptr_ret,
00873     IIIMP_card32_list *            value)
00874 {
00875     *ptr_ret = iiimp_icattribute_character_subsets_new(data_s, value);
00876     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00877 }
00878 
00879 
00880 IIIMP_status
00881 iiimp_icattribute_input_method_name_create(
00882     IIIMP_data_s *          data_s,
00883     IIIMP_icattribute **    ptr_ret,
00884     IIIMP_string *          value)
00885 {
00886     *ptr_ret = iiimp_icattribute_input_method_name_new(data_s, value);
00887     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00888 }
00889 
00890 
00891 IIIMP_status
00892 iiimp_icattribute_input_method_create(
00893     IIIMP_data_s *          data_s,
00894     IIIMP_icattribute **    ptr_ret,
00895     IIIMP_card16            value)
00896 {
00897     *ptr_ret = iiimp_icattribute_input_method_new(data_s, value);
00898     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00899 }
00900 
00901 
00902 IIIMP_status
00903 iiimp_keyevent_list_create(
00904     IIIMP_data_s *          data_s,
00905     IIIMP_keyevent_list **  ptr_ret,
00906     int                            count,
00907     IIIMP_keyevent *        k)
00908 {
00909     *ptr_ret = iiimp_keyevent_list_new(data_s, count, k);
00910     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00911 }
00912 
00913 
00914 IIIMP_status
00915 iiimp_contents_string_create(
00916     IIIMP_data_s *   data_s,
00917     IIIMP_contents **       ptr_ret,
00918     IIIMP_string *   value)
00919 {
00920     *ptr_ret = iiimp_contents_string_new(data_s, value);
00921     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00922 }
00923 
00924 
00925 IIIMP_status
00926 iiimp_contents_text_create(
00927     IIIMP_data_s *   data_s,
00928     IIIMP_contents **       ptr_ret,
00929     IIIMP_text *     value)
00930 {
00931     *ptr_ret = iiimp_contents_text_new(data_s, value);
00932     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00933 }
00934 
00935 
00936 IIIMP_status
00937 iiimp_contents_keyevent_list_create(
00938     IIIMP_data_s *          data_s,
00939     IIIMP_contents **              ptr_ret,
00940     IIIMP_keyevent_list *   value)
00941 {
00942     *ptr_ret = iiimp_contents_keyevent_list_new(data_s, value);
00943     return ((NULL == *ptr_ret) ? data_s->status : IIIMP_DATA_NO_ERROR);
00944 }
00945 
00946 
00947 /* Local Variables: */
00948 /* c-file-style: "iiim-project" */
00949 /* End: */