Lines Matching defs:index

58  *   smlGetParamByTag - Get a parameter by tag and index
59 * smlGetParamByTagParam Get parameter given tag name, index,
61 * smlGetParamName - Get the name of a tag parameter given its index
64 * smlGetTagByName - Get an element given a name and an index
65 * smlGetTagByTagParam - Get element given tag name, index, parameter name,
196 /* if index is out of range or -1, append to tag object */
242 int index;
265 /* determine index into tag object of element to remove */
266 for (index = 0; index < tag->tags_num; index++) {
267 if (sub_tag == &tag->tags[index]) {
274 if (index >= tag->tags_num) {
287 if (index < (tag->tags_num - 1)) {
288 (void) memmove(&(tag->tags[index]), &(tag->tags[index + 1]),
289 sizeof (SML_TAG) *(tag->tags_num - index - 1));
495 * Description: Get the name of a tag parameter given its index
498 * index - [RO] - (int)
501 * Name of 'index'th parameter
509 smlGetParamName(SML_TAG *tag, int index)
520 tag->name, index);
528 /* if index not within range, return NULL */
530 if (index >= tag->params_num) {
534 /* index within range - return parameter name */
536 assert(tag->params[index].name != (char *)NULL);
537 assert(tag->params[index].value != (char *)NULL);
540 tag->name, index, tag->params[index].name);
542 return (strdup(tag->params[index].name));
547 * Synopsis: Get a parameter value from a tag by name and index
552 * index - [RO] - (int)
564 smlGetParamByTag(SML_TAG *tag, int index,
580 tagName, index, paramName);
582 /* find the requested tag by name and index */
584 rtag = smlGetTagByName(tag, index, tagName);
594 * Synopsis: Get element given tag name, index, parameter name, and value
599 * index - [RO] - (int)
608 * The 'index'th occurance of element 'name' with
614 smlGetTagByTagParam(SML_TAG *tag, int index,
617 int ti; /* tag structure index */
641 * -> if not the "index"th paramValue found; to next tag
646 int pi; /* parameter structure index */
675 * -> if this is not the 'index'th one, go to next tag
678 if (index-- != 0) {
699 * Synopsis: Get parameter given tag name, index, parameter name, and value
705 * index - [RO] - (int)
717 * The 'index'th occurance of element 'name' with
723 smlGetParamByTagParam(SML_TAG *tag, int index,
726 int ti; /* tag structure index */
752 * -> if not the "index"th paramValue found; to next tag
757 int pi; /* parameter structure index */
786 * -> if this is not the 'index'th one, go to next tag
789 if (index-- != 0) {
839 * index - [RO] - (int)
842 * The 'index'th element from the specified tag
847 smlGetTag(SML_TAG *tag, int index)
861 /* if index not within range, return NULL */
863 if (tag->tags_num <= index) {
867 /* index within range, return element specified */
869 assert(SML_TAG__ISVALID(&tag->tags[index]));
871 return (&tag->tags[index]);
876 * Description: Get an element given a name and an index
879 * index - [RO] - (int)
884 * The 'index'th occurance of element 'name'
889 smlGetTagByName(SML_TAG *tag, int index, char *name)
893 _smlLogMsg(LOG_MSG_DEBUG, DBG_SML_GET_TAG_BY_NAME, name, index);
903 if (streq(tag->name, name) && (index == 0)) {
913 /* if index out of range, return NULL */
915 if (tag->tags_num <= index) {
919 /* index within range - search for specified element */
923 if (index == 0) {
927 index--;
2206 char *s = NULL; /* -> index into encoded bytes string */
2207 char *d = NULL; /* -> index into decoded bytes string */
2209 char *ri = NULL; /* -> index into string holding reference */