📄 d1_expout.c
字号:
i = 0; for (c = n->child; c; c = c->next) { if (!is_numeric_tag (eh, c) != 102) continue; res->databases[i++] = f_string (eh, c); } return res;}static Z_NetworkAddressIA *f_networkAddressIA(ExpHandle *eh, data1_node *n){ Z_NetworkAddressIA *res = (Z_NetworkAddressIA *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->hostAddress = 0; res->port = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 121: res->hostAddress = f_string (eh, c); break; case 122: res->port = f_integer (eh, c); break; } } return res;}static Z_NetworkAddressOther *f_networkAddressOther(ExpHandle *eh, data1_node *n){ Z_NetworkAddressOther *res = (Z_NetworkAddressOther *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->type = 0; res->address = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 124: res->type = f_string (eh, c); break; case 121: res->address = f_string (eh, c); break; } } return res;}static Z_NetworkAddress **f_networkAddresses(ExpHandle *eh, data1_node *n, int *num){ Z_NetworkAddress **res = NULL; data1_node *c; int i = 0; *num = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 120: case 123: (*num)++; break; } } if (*num) res = (Z_NetworkAddress **) odr_malloc (eh->o, sizeof(*res) * (*num)); for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 120: res[i] = (Z_NetworkAddress *) odr_malloc (eh->o, sizeof(**res)); res[i]->which = Z_NetworkAddress_iA; res[i]->u.internetAddress = f_networkAddressIA(eh, c); i++; break; case 123: res[i] = (Z_NetworkAddress *) odr_malloc (eh->o, sizeof(**res)); res[i]->which = Z_NetworkAddress_other; res[i]->u.other = f_networkAddressOther(eh, c); i++; break; } } return res;}static Z_CategoryInfo *f_categoryInfo(ExpHandle *eh, data1_node *n){ Z_CategoryInfo *res = (Z_CategoryInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->category = 0; res->originalCategory = 0; res->description = 0; res->asn1Module = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 102: res->category = f_string(eh, c); break; case 302: res->originalCategory = f_string(eh, c); break; case 113: res->description = f_humstring(eh, c); break; case 303: res->asn1Module = f_string (eh, c); break; } } return res;}static Z_CategoryList *f_categoryList(ExpHandle *eh, data1_node *n){ Z_CategoryList *res = (Z_CategoryList *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->num_categories = 0; res->categories = NULL; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 300: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 301) continue; (res->num_categories)++; } if (res->num_categories) res->categories = (Z_CategoryInfo **)odr_malloc (eh->o, res->num_categories * sizeof(*res->categories)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 301) continue; res->categories[i++] = f_categoryInfo (eh, n); } break; } } assert (res->num_categories && res->categories); return res;}static Z_TargetInfo *f_targetInfo(ExpHandle *eh, data1_node *n){ Z_TargetInfo *res = (Z_TargetInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->name = 0; res->recentNews = 0; res->icon = 0; res->namedResultSets = 0; res->multipleDBsearch = 0; res->maxResultSets = 0; res->maxResultSize = 0; res->maxTerms = 0; res->timeoutInterval = 0; res->welcomeMessage = 0; res->contactInfo = 0; res->description = 0; res->num_nicknames = 0; res->nicknames = 0; res->usageRest = 0; res->paymentAddr = 0; res->hours = 0; res->num_dbCombinations = 0; res->dbCombinations = 0; res->num_addresses = 0; res->addresses = 0; res->num_languages = 0; res->languages = NULL; res->commonAccessInfo = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 102: res->name = f_string(eh, c); break; case 103: res->recentNews = f_humstring(eh, c); break; case 104: res->icon = NULL; break; /* fix */ case 105: res->namedResultSets = f_bool(eh, c); break; case 106: res->multipleDBsearch = f_bool(eh, c); break; case 107: res->maxResultSets = f_integer(eh, c); break; case 108: res->maxResultSize = f_integer(eh, c); break; case 109: res->maxTerms = f_integer(eh, c); break; case 110: res->timeoutInterval = f_intunit(eh, c); break; case 111: res->welcomeMessage = f_humstring(eh, c); break; case 112: res->contactInfo = f_contactInfo(eh, c); break; case 113: res->description = f_humstring(eh, c); break; case 114: res->num_nicknames = 0; for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 102) continue; (res->num_nicknames)++; } if (res->num_nicknames) res->nicknames = (char **)odr_malloc (eh->o, res->num_nicknames * sizeof(*res->nicknames)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 102) continue; res->nicknames[i++] = f_string (eh, n); } break; case 115: res->usageRest = f_humstring(eh, c); break; case 116: res->paymentAddr = f_humstring(eh, c); break; case 117: res->hours = f_humstring(eh, c); break; case 118: res->num_dbCombinations = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 605) continue; (res->num_dbCombinations)++; } if (res->num_dbCombinations) res->dbCombinations = (Z_DatabaseList **)odr_malloc (eh->o, res->num_dbCombinations * sizeof(*res->dbCombinations)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 605) continue; res->dbCombinations[i++] = f_databaseList (eh, n); } break; case 119: res->addresses = f_networkAddresses (eh, c, &res->num_addresses); break; case 125: res->num_languages = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 126) continue; (res->num_languages)++; } if (res->num_languages) res->languages = (char **) odr_malloc (eh->o, res->num_languages * sizeof(*res->languages)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 126) continue; res->languages[i++] = f_string (eh, n); } break; case 500: res->commonAccessInfo = f_accessInfo(eh, c); break; } } if (!res->namedResultSets) res->namedResultSets = eh->false_value; if (!res->multipleDBsearch) res->multipleDBsearch = eh->false_value; return res;}static Z_DatabaseInfo *f_databaseInfo(ExpHandle *eh, data1_node *n){ Z_DatabaseInfo *res = (Z_DatabaseInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->name = 0; res->explainDatabase = 0; res->num_nicknames = 0; res->nicknames = 0; res->icon = 0; res->userFee = 0; res->available = 0; res->titleString = 0; res->num_keywords = 0; res->keywords = 0; res->description = 0; res->associatedDbs = 0; res->subDbs = 0; res->disclaimers = 0; res->news = 0; res->u.actualNumber = 0; res->defaultOrder = 0; res->avRecordSize = 0; res->maxRecordSize = 0; res->hours = 0; res->bestTime = 0; res->lastUpdate = 0; res->updateInterval = 0; res->coverage = 0; res->proprietary = 0; res->copyrightText = 0; res->copyrightNotice = 0; res->producerContactInfo = 0; res->supplierContactInfo = 0; res->submissionContactInfo = 0; res->accessInfo = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 102: res->name = f_string(eh, c); break; case 226: res->explainDatabase = odr_nullval(); break; case 114: res->num_nicknames = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) || n->u.tag.element->tag->value.numeric != 102) continue; (res->num_nicknames)++; } if (res->num_nicknames) res->nicknames = (char **)odr_malloc (eh->o, res->num_nicknames * sizeof(*res->nicknames)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) || n->u.tag.element->tag->value.numeric != 102) continue; res->nicknames[i++] = f_string (eh, n); } break; case 104: res->icon = 0; break; /* fix */ case 201: res->userFee = f_bool(eh, c); break; case 202: res->available = f_bool(eh, c); break; case 203: res->titleString = f_humstring(eh, c); break; case 227: res->num_keywords = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 1000) continue; (res->num_keywords)++; } if (res->num_keywords) res->keywords = (Z_HumanString **)odr_malloc (eh->o, res->num_keywords * sizeof(*res->keywords)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 1000) continue; res->keywords[i++] = f_humstring (eh, n); } break; case 113: res->description = f_humstring(eh, c); break; case 205: res->associatedDbs = f_databaseList (eh, c); break; case 206: res->subDbs = f_databaseList (eh, c); break; case 207: res->disclaimers = f_humstring(eh, c); break; case 103: res->news = f_humstring(eh, c); break; case 209: res->u.actualNumber = f_recordCount(eh, c, &res->which); break; case 212: res->defaultOrder = f_humstring(eh, c); break; case 213: res->avRecordSize = f_integer(eh, c); break; case 214: res->maxRecordSize = f_integer(eh, c); break; case 215: res->hours = f_humstring(eh, c); break; case 216: res->bestTime = f_humstring(eh, c); break; case 217: res->lastUpdate = f_string(eh, c); break; case 218: res->updateInterval = f_intunit(eh, c); break; case 219: res->coverage = f_humstring(eh, c); break; case 220: res->proprietary = f_bool(eh, c); break; case 221: res->copyrightText = f_humstring(eh, c); break; case 222: res->copyrightNotice = f_humstring(eh, c); break; case 223: res->producerContactInfo = f_contactInfo(eh, c); break; case 224: res->supplierContactInfo = f_contactInfo(eh, c); break; case 225: res->submissionContactInfo = f_contactInfo(eh, c); break; case 500: res->accessInfo = f_accessInfo(eh, c); break; } } if (!res->userFee) res->userFee = eh->false_value; if (!res->available) res->available = eh->true_value; return res;}Z_StringOrNumeric *f_stringOrNumeric (ExpHandle *eh, data1_node *n){ Z_StringOrNumeric *res = (Z_StringOrNumeric *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 1001: res->which = Z_StringOrNumeric_string; res->u.string = f_string (eh, c); break; case 1002: res->which = Z_StringOrNumeric_numeric; res->u.numeric = f_integer (eh, c); break; } } return res;}Z_AttributeDescription *f_attributeDescription ( ExpHandle *eh, data1_node *n){ Z_AttributeDescription *res = (Z_AttributeDescription *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; int i = 0; res->name = 0; res->description = 0; res->attributeValue = 0; res->num_equivalentAttributes = 0; res->equivalentAttributes = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 102: res->name = f_string (eh, c); break; case 113: res->description = f_humstring (eh, c); break; case 710: res->attributeValue = f_stringOrNumeric (eh, c); break; case 752: (res->num_equivalentAttributes++); break; } } if (res->num_equivalentAttributes) res->equivalentAttributes = (Z_StringOrNumeric **) odr_malloc (eh->o, sizeof(*res->equivalentAttributes) * res->num_equivalentAttributes); for (c = n->child; c; c = c->next) if (is_numeric_tag (eh, c) == 752) res->equivalentAttributes[i++] = f_stringOrNumeric (eh, c); return res;}Z_AttributeType *f_attributeType (ExpHandle *eh, data1_node *n){ Z_AttributeType *res = (Z_AttributeType *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->name = 0; res->description = 0; res->attributeType = 0; res->num_attributeValues = 0; res->attributeValues = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -