Back to index

im-sdk  12.3.91
comp-imattribute.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 
00006 #include <iiimp-data.h>
00007 
00008 #include "iiimp-dataP.h"
00009 
00010 
00011 static IIIMP_imattribute *
00012 iiimp_imattribute_new(
00013     IIIMP_data_s *   data_s,
00014     IIIMP_card16     id,
00015     IIIMP_card16     id_pre,
00016     IIIMP_card16     id_dyn,
00017     void *           value)
00018 {
00019     IIIMP_imattribute *                   attr;
00020     IIIMP_inputmethod_descriptor * imd;
00021     IIIMP_object_descriptor *             od;
00022 
00023     if (NULL == value) {
00024        data_s->status = IIIMP_DATA_INVALID;
00025        return NULL;
00026     }
00027 
00028     attr = (IIIMP_imattribute *)malloc(sizeof (IIIMP_imattribute));
00029     if (NULL == attr) {
00030        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00031        return NULL;
00032     }
00033 
00034     attr->nbyte = (2 + 2);
00035     attr->next = NULL;
00036 
00037     attr->id = id;
00038     attr->id_pre = id_pre;
00039     attr->id_dyn = id_dyn;
00040 
00041     attr->nbyte += 4;
00042 
00043     attr->value.any = value;
00044 
00045     switch(id_pre) {
00046     case IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST:
00047        attr->value_nbyte = 0;
00048        imd = (IIIMP_inputmethod_descriptor *)value;
00049        for (; NULL != imd; imd = imd->next) {
00050            attr->value_nbyte += imd->nbyte;
00051        }
00052        break;
00053     case IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST:
00054        attr->value_nbyte = 0;
00055        od = (IIIMP_object_descriptor *)value;
00056        for (; NULL != od; od = od->next) {
00057            attr->value_nbyte += od->nbyte;
00058        }
00059        break;
00060     case IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR:
00061        attr->value_nbyte = attr->value.client_descriptor->nbyte;
00062        break;
00063     case IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE:
00064        attr->value_nbyte = attr->value.ccdef->nbyte;
00065        break;
00066     case IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT:
00067     case IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT:
00068        attr->value_nbyte = attr->value.jarfile_object->nbyte;
00069        break;
00070     case IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT:
00071     case IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT:
00072     case IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT:
00073     case IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT:
00074        attr->value_nbyte = attr->value.binaryfile_object->nbyte;
00075        break;
00076     case IIIMP_IMATTRIBUTE_CAPABILITY:
00077        attr->value_nbyte = attr->value.capability->nbyte;
00078        break;
00079     }
00080 
00081     attr->nbyte += (attr->value_nbyte + PAD(attr->value_nbyte));
00082 
00083     return attr;
00084 }
00085 
00086 
00087 void
00088 iiimp_imattribute_delete(IIIMP_data_s * data_s, IIIMP_imattribute * attr)
00089 {
00090     switch(attr->id_pre) {
00091     case IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST:
00092        iiimp_inputmethod_descriptor_list_delete(
00093            data_s, attr->value.inputmethod_descriptor);
00094        break;
00095     case IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST:
00096        iiimp_object_descriptor_list_delete(
00097            data_s, attr->value.object_descriptor);
00098        break;
00099     case IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR:
00100        iiimp_client_descriptor_delete(data_s, attr->value.client_descriptor);
00101               break;
00102     case IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE:
00103        iiimp_ccdef_delete(data_s, attr->value.ccdef);
00104        break;
00105     case IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT:
00106     case IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT:
00107        iiimp_jarfile_object_delete(data_s, attr->value.jarfile_object);
00108        break;
00109     case IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT:
00110     case IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT:
00111     case IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT:
00112     case IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT:
00113        iiimp_binaryfile_object_delete(data_s, attr->value.binaryfile_object);
00114        break;
00115     case IIIMP_IMATTRIBUTE_CAPABILITY:
00116        iiimp_card32_list_delete(data_s, attr->value.capability);
00117        break;
00118     }
00119     free(attr);
00120 
00121     return;
00122 }
00123 
00124 
00125 void
00126 iiimp_imattribute_list_delete(IIIMP_data_s * data_s, IIIMP_imattribute * attr)
00127 {
00128     IIIMP_imattribute *     attr_next;
00129     for (; NULL != attr; attr = attr_next) {
00130        attr_next = attr->next;
00131        iiimp_imattribute_delete(data_s, attr);
00132     }
00133     return;
00134 }
00135 
00136 
00137 IIIMP_imattribute *
00138 iiimp_imattribute_inputmethod_descriptor_new(
00139     IIIMP_data_s *                 data_s,
00140     IIIMP_card16                   id,
00141     IIIMP_card16                   id_dyn,
00142     IIIMP_inputmethod_descriptor * value)
00143 {
00144     return iiimp_imattribute_new(data_s, id,
00145                              IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST,
00146                              id_dyn, (void *)value);
00147 }
00148 
00149 
00150 IIIMP_imattribute *
00151 iiimp_imattribute_object_descriptor_new(
00152     IIIMP_data_s *          data_s,
00153     IIIMP_card16            id,
00154     IIIMP_card16            id_dyn,
00155     IIIMP_object_descriptor *      value)
00156 {
00157     return iiimp_imattribute_new(data_s, id,
00158                              IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST,
00159                              id_dyn, (void *)value);
00160 }
00161 
00162 
00163 IIIMP_imattribute *
00164 iiimp_imattribute_client_descriptor_new(
00165     IIIMP_data_s *          data_s,
00166     IIIMP_card16            id,
00167     IIIMP_card16            id_dyn,
00168     IIIMP_client_descriptor *      value)
00169 {
00170     return iiimp_imattribute_new(data_s, id,
00171                              IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR,
00172                              id_dyn, (void *)value);
00173 }
00174 
00175 
00176 IIIMP_imattribute *
00177 iiimp_imattribute_ccdef_new(
00178     IIIMP_data_s *          data_s,
00179     IIIMP_card16            id,
00180     IIIMP_card16            id_dyn,
00181     IIIMP_ccdef *           value)
00182 {
00183     return iiimp_imattribute_new(data_s, id,
00184                              IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE,
00185                              id_dyn, (void *)value);
00186 }
00187 
00188 
00189 IIIMP_imattribute *
00190 iiimp_imattribute_jar_gui_object_new(
00191     IIIMP_data_s *          data_s,
00192     IIIMP_card16            id,
00193     IIIMP_card16            id_dyn,
00194     IIIMP_jarfile_object *  value)
00195 {
00196     return iiimp_imattribute_new(data_s, id,
00197                              IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT,
00198                              id_dyn, (void *)value);
00199 }
00200 
00201 
00202 IIIMP_imattribute *
00203 iiimp_imattribute_jar_light_weight_engine_object_new(
00204     IIIMP_data_s *          data_s,
00205     IIIMP_card16            id,
00206     IIIMP_card16            id_dyn,
00207     IIIMP_jarfile_object *  value)
00208 {
00209     return iiimp_imattribute_new(data_s, id,
00210                              IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT,
00211                              id_dyn, (void *)value);
00212 }
00213 
00214 
00215 IIIMP_imattribute *
00216 iiimp_imattribute_binary_gui_object_new(
00217     IIIMP_data_s *          data_s,
00218     IIIMP_card16            id,
00219     IIIMP_card16            id_dyn,
00220     IIIMP_binaryfile_object *      value)
00221 {
00222     return iiimp_imattribute_new(data_s, id,
00223                              IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT,
00224                              id_dyn, (void *)value);
00225 }
00226 
00227 
00228 IIIMP_imattribute *
00229 iiimp_imattribute_binary_light_weight_engine_new(
00230     IIIMP_data_s *          data_s,
00231     IIIMP_card16            id,
00232     IIIMP_card16            id_dyn,
00233     IIIMP_binaryfile_object *      value)
00234 {
00235     return iiimp_imattribute_new(data_s, id,
00236                              IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT,
00237                              id_dyn, (void *)value);
00238 }
00239 
00240 
00241 IIIMP_imattribute *
00242 iiimp_imattribute_script_gui_object_new(
00243     IIIMP_data_s *          data_s,
00244     IIIMP_card16            id,
00245     IIIMP_card16            id_dyn,
00246     IIIMP_binaryfile_object *      value)
00247 {
00248     return iiimp_imattribute_new(data_s, id,
00249                              IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT,
00250                              id_dyn, (void *)value);
00251 }
00252 
00253 
00254 IIIMP_imattribute *
00255 iiimp_imattribute_script_light_weight_engine_new(
00256     IIIMP_data_s *          data_s,
00257     IIIMP_card16            id,
00258     IIIMP_card16            id_dyn,
00259     IIIMP_binaryfile_object *      value)
00260 {
00261     return iiimp_imattribute_new(data_s, id,
00262                              IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT,
00263                              id_dyn, (void *)value);
00264 }
00265 
00266 
00267 IIIMP_imattribute *
00268 iiimp_imattribute_capability_new(
00269     IIIMP_data_s *          data_s,
00270     IIIMP_card16            id,
00271     IIIMP_card16            id_dyn,
00272     IIIMP_card32_list *            value)
00273 {
00274     return iiimp_imattribute_new(data_s, id,
00275                              IIIMP_IMATTRIBUTE_CAPABILITY,
00276                              id_dyn, (void *)value);
00277 }
00278 
00279 
00280 void
00281 iiimp_imattribute_pack(
00282     IIIMP_data_s *   data_s,
00283     IIIMP_imattribute *     m,
00284     size_t *         nbyte,
00285     uchar_t **              ptr)
00286 {
00287     size_t    rest;
00288     uchar_t * p;
00289 
00290     rest = *nbyte;
00291     p = *ptr;
00292 
00293     PUTU16(m->id, rest, p, data_s->byte_swap);
00294     PUTU16(0, rest, p, data_s->byte_swap);
00295 
00296     PUT32(m->value_nbyte, rest, p, data_s->byte_swap);
00297 
00298     switch(m->id_pre) {
00299     case IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST:
00300        iiimp_inputmethod_descriptor_list_pack(data_s,
00301                                           m->value.inputmethod_descriptor,
00302                                           &rest, &p);
00303        break;
00304     case IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST:
00305        iiimp_object_descriptor_list_pack(data_s, m->value.object_descriptor,
00306                                      &rest, &p);
00307        break;
00308     case IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR:
00309        iiimp_client_descriptor_pack(data_s,
00310                                  m->value.client_descriptor, &rest, &p);
00311        break;
00312     case IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE:
00313        iiimp_ccdef_pack(data_s, m->value.ccdef, &rest, &p);
00314        break;
00315     case IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT:
00316     case IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT:
00317        iiimp_jarfile_object_pack(data_s, m->value.jarfile_object, &rest, &p);
00318        break;
00319     case IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT:
00320     case IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT:
00321     case IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT:
00322     case IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT:
00323        iiimp_binaryfile_object_pack(data_s, m->value.binaryfile_object,
00324                                  &rest, &p);
00325        break;
00326     case IIIMP_IMATTRIBUTE_CAPABILITY:
00327        iiimp_card32_list_pack(data_s, m->value.capability, &rest, &p);
00328        break;
00329     }
00330 
00331     *nbyte = rest;
00332     *ptr = p;
00333 
00334     return;
00335 }
00336 
00337 
00338 void
00339 iiimp_imattribute_list_pack(
00340     IIIMP_data_s *   data_s,
00341     IIIMP_imattribute *     m,
00342     size_t *         nbyte,
00343     uchar_t **              ptr)
00344 {
00345     size_t    rest;
00346     uchar_t * p;
00347 
00348     rest = *nbyte;
00349     p = *ptr;
00350 
00351     for (; NULL != m; m = m->next) {
00352        iiimp_imattribute_pack(data_s, m, &rest, &p);
00353     }
00354 
00355     *nbyte = rest;
00356     *ptr = p;
00357 
00358     return;
00359 }
00360 
00361 
00362 IIIMP_imattribute *
00363 iiimp_imattribute_unpack(
00364     IIIMP_data_s *   data_s,
00365     size_t *         nbyte,
00366     const uchar_t ** ptr,
00367     size_t           nbyte_max)
00368 {
00369     IIIMP_imattribute *     attr;
00370     size_t           rest;
00371     const uchar_t *  p;
00372     size_t           len;
00373     size_t           rest2;
00374     size_t           id;
00375 
00376     rest = nbyte_max;
00377     p = *ptr;
00378 
00379     if ((*nbyte < rest) || (rest < 8)) {
00380        data_s->status = IIIMP_DATA_INVALID;
00381        return NULL;
00382     }
00383 
00384     GETU16(id, rest, p, data_s->byte_swap);
00385     SKIP16(rest, p);
00386 
00387     attr = (IIIMP_imattribute *)malloc(sizeof (IIIMP_imattribute));
00388     if (NULL == attr) {
00389        data_s->status = IIIMP_DATA_MALLOC_ERROR;
00390        return NULL;
00391     }
00392 
00393     attr->next = NULL;
00394 
00395     if (0x1000 & id) {
00396        attr->id_pre = id;
00397        attr->id_dyn = 0;
00398     } else {
00399        attr->id_dyn = id;
00400        attr->id_pre = iiimp_attribute_id_search(data_s, id);
00401        id = attr->id_pre;
00402        if (0 == attr->id_pre) {
00403            free(attr);
00404            data_s->status = IIIMP_DATA_INVALID;
00405            return NULL;
00406        }
00407     }
00408 
00409     GET32(len, rest, p, data_s->byte_swap);
00410     if ((len < 0) || (rest < len)) {
00411        free(attr);
00412        data_s->status = IIIMP_DATA_INVALID;
00413        return NULL;
00414     }
00415 
00416     attr->nbyte = (2 + 2 + 4 + len + PAD(len));
00417     attr->value_nbyte = len;
00418     rest2 = len;
00419 
00420     switch(id) {
00421     case IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST:
00422        attr->value.inputmethod_descriptor =
00423            iiimp_inputmethod_descriptor_list_unpack(data_s, &rest2, &p, rest2);
00424        break;
00425     case IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST:
00426        attr->value.object_descriptor =
00427            iiimp_object_descriptor_list_unpack(data_s, &rest2, &p, rest2);
00428        break;
00429     case IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR:
00430        attr->value.client_descriptor =
00431            iiimp_client_descriptor_unpack(data_s, &rest2, &p, rest2);
00432        break;
00433     case IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE:
00434        attr->value.ccdef = iiimp_ccdef_unpack(data_s, &rest2, &p, rest2);
00435        break;
00436     case IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT:
00437     case IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT:
00438        attr->value.jarfile_object =
00439            iiimp_jarfile_object_unpack(data_s, &rest2, &p, rest2);
00440        break;
00441     case IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT:
00442     case IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT:
00443     case IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT:
00444     case IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT:
00445        attr->value.binaryfile_object =
00446            iiimp_binaryfile_object_unpack(data_s, &rest2, &p, rest2);
00447        break;
00448     case IIIMP_IMATTRIBUTE_CAPABILITY:
00449        attr->value.capability = iiimp_card32_list_unpack(data_s, &rest2,
00450                                                    &p, rest2);
00451        if (NULL != attr->value.capability) {
00452            iiimp_card32_list_delete(data_s, data_s->capability);
00453            data_s->capability =
00454               iiimp_card32_list_new(data_s,
00455                                   attr->value.capability->count,
00456                                   attr->value.capability->ptr);
00457        }
00458        break;
00459     default:
00460        attr->value.any = NULL;
00461        data_s->status = IIIMP_DATA_INVALID;
00462        break;
00463     }
00464     if (NULL == attr->value.any) {
00465        iiimp_imattribute_delete(data_s, attr);
00466        return NULL;
00467     }
00468     attr->id = id;
00469 
00470     *nbyte = rest - len - PAD(len);
00471     *ptr = p;
00472 
00473     return attr;
00474 }
00475 
00476 
00477 IIIMP_imattribute *
00478 iiimp_imattribute_list_unpack(
00479     IIIMP_data_s *   data_s,
00480     size_t *         nbyte,
00481     const uchar_t ** ptr,
00482     size_t           nbyte_max)
00483 {
00484     IIIMP_imattribute *     attr;
00485     size_t           rest;
00486     const uchar_t *  p;
00487     IIIMP_imattribute *     attr_first;
00488     IIIMP_imattribute *     attr_last;
00489 
00490     rest = nbyte_max;
00491     p = *ptr;
00492     attr_first = NULL;
00493     attr_last = NULL;
00494 
00495     data_s->status = IIIMP_DATA_NO_ERROR;
00496 
00497     if (((*nbyte) < nbyte_max) || (0 != (rest & 0x01))) {
00498        data_s->status = IIIMP_DATA_INVALID;
00499        return NULL;
00500     }
00501 
00502     while (0 < rest) {
00503        attr = iiimp_imattribute_unpack(data_s, &rest, &p, rest);
00504        if (NULL == attr) {
00505            iiimp_imattribute_list_delete(data_s, attr_first);
00506            return NULL;
00507        } else {
00508            if (NULL == attr_first) {
00509               attr_first = attr;
00510            } else {
00511               attr_last->next = attr;
00512            }
00513            attr_last = attr;
00514        }
00515     }
00516 
00517     *nbyte -= (nbyte_max - rest);
00518     *ptr = p;
00519 
00520     return attr_first;
00521 }
00522 
00523 
00524 void
00525 iiimp_imattribute_print(
00526     IIIMP_data_s *   data_s,
00527     IIIMP_imattribute *     m)
00528 {
00529     if (NULL == m) return;
00530 
00531     switch (m->id_pre) {
00532     case IIIMP_IMATTRIBUTE_INPUT_METHOD_LIST:
00533        (void)fprintf(data_s->print_fp, "\tInput Method Descriptor List:\n");
00534        iiimp_inputmethod_descriptor_list_print(
00535            data_s, m->value.inputmethod_descriptor);
00536        break;
00537     case IIIMP_IMATTRIBUTE_OBJECT_DESCRIPTOR_LIST:
00538        (void)fprintf(data_s->print_fp, "\tObject Descriptor List:\n");
00539        iiimp_object_descriptor_list_print(data_s, m->value.object_descriptor);
00540        break;
00541     case IIIMP_IMATTRIBUTE_CLIENT_DESCRIPTOR:
00542        (void)fprintf(data_s->print_fp, "\tClient Descriptor:\n");
00543        iiimp_client_descriptor_print(data_s, m->value.client_descriptor);
00544        break;
00545     case IIIMP_IMATTRIBUTE_CHARACTER_CONVERSION_DEFINITION_RULE:
00546        (void)fprintf(data_s->print_fp,
00547                     "\tCharacter Conversion Definition Rule\n");
00548        break;
00549     case IIIMP_IMATTRIBUTE_JAR_GUI_OBJECT:
00550        (void)fprintf(data_s->print_fp, "\tJar GUI Object:\n");
00551        iiimp_jarfile_object_print(data_s, m->value.jarfile_object);
00552        break;
00553     case IIIMP_IMATTRIBUTE_JAR_LIGHT_WEIGHT_ENGINE_OBJECT:
00554        (void)fprintf(data_s->print_fp, "\tJar Light Weight Engine Object:\n");
00555        iiimp_jarfile_object_print(data_s, m->value.jarfile_object);
00556        break;
00557     case IIIMP_IMATTRIBUTE_BINARY_GUI_OBJECT:
00558        (void)fprintf(data_s->print_fp, "\tBinary GUI Object: ");
00559        iiimp_binaryfile_object_print(data_s, m->value.binaryfile_object);
00560        (void)fputc('\n', data_s->print_fp);
00561        break;
00562     case IIIMP_IMATTRIBUTE_BINARY_LIGHT_WEIGHT_ENGINE_OBJECT:
00563        (void)fprintf(data_s->print_fp,
00564                     "\tBinary Light Weight Engine Object: ");
00565        iiimp_binaryfile_object_print(data_s, m->value.binaryfile_object);
00566        (void)fputc('\n', data_s->print_fp);
00567        break;
00568     case IIIMP_IMATTRIBUTE_SCRIPT_GUI_OBJECT:
00569        (void)fprintf(data_s->print_fp, "\tSCRIPT GUI Object:\n");
00570        iiimp_binaryfile_object_print(data_s, m->value.binaryfile_object);
00571        break;
00572     case IIIMP_IMATTRIBUTE_SCRIPT_LIGHT_WEIGHT_ENGINE_OBJECT:
00573        (void)fprintf(data_s->print_fp,
00574                     "\tSCRIPT Light Weight Engine Object:\n");
00575        iiimp_binaryfile_object_print(data_s, m->value.binaryfile_object);
00576        break;
00577     case IIIMP_IMATTRIBUTE_CAPABILITY:
00578        (void)fprintf(data_s->print_fp, "\tCapability:\n");
00579        iiimp_card32_list_print(data_s, m->value.capability);
00580        break;
00581     }
00582 }
00583 
00584 
00585 void
00586 iiimp_imattribute_list_print(
00587     IIIMP_data_s *   data_s,
00588     IIIMP_imattribute *     m)
00589 {
00590     for (; NULL != m; m = m->next) {
00591        iiimp_imattribute_print(data_s, m);
00592     }
00593 }
00594 
00595 
00596 /* Local Variables: */
00597 /* c-file-style: "iiim-project" */
00598 /* End: */