Lines Matching refs:tokarray
1348 tok_syntax(ocs_hw_t *hw, tokarray_t *tokarray) in tok_syntax() argument
1355 for (i = 0, tok = tokarray->tokens; (i <= tokarray->inuse_count); i++, tok++) { in tok_syntax()
1356 ocs_log_test(hw->os, "%s [%2d] %-16s %-16s %s\n", (i == tokarray->iter_idx) ? ">>>" : " ", i, in tok_syntax()
1425 parse_topology(ocs_hw_t *hw, tokarray_t *tokarray, ocs_hw_qtop_t *qtop) in parse_topology() argument
1430 for (; (tokarray->iter_idx < tokarray->inuse_count) && in parse_topology()
1431 ((tok = &tokarray->tokens[tokarray->iter_idx]) != NULL); ) { in parse_topology()
1447 tokarray->iter_idx++; /* Advance current token index */ in parse_topology()
1450 while ((tokarray->iter_idx + 4) <= tokarray->inuse_count) { in parse_topology()
1451 tok = &tokarray->tokens[tokarray->iter_idx]; in parse_topology()
1498 tokarray->iter_idx += 4; in parse_topology()
1507 if ( ((tokarray->iter_idx + 5) <= tokarray->inuse_count) && in parse_topology()
1528 tokarray->iter_idx += 5; in parse_topology()
1530 tok_syntax(hw, tokarray); in parse_topology()
1545 tokarray->iter_idx += 2; in parse_topology()
1548 iter_idx_save = tokarray->iter_idx; in parse_topology()
1558 tokarray->iter_idx = iter_idx_save; in parse_topology()
1561 parse_topology(hw, tokarray, qtop); in parse_topology()
1570 tokarray->iter_idx++; in parse_topology()
1574 tok_syntax(hw, tokarray); in parse_topology()
1596 tokarray_t tokarray; in ocs_hw_qtop_parse() local
1606 …tokarray.tokens = ocs_malloc(hw->os, MAX_TOKENS * sizeof(*tokarray.tokens), OCS_M_ZERO | OCS_M_NOW… in ocs_hw_qtop_parse()
1607 if (tokarray.tokens == NULL) { in ocs_hw_qtop_parse()
1610 tokarray.alloc_count = MAX_TOKENS; in ocs_hw_qtop_parse()
1611 tokarray.inuse_count = 0; in ocs_hw_qtop_parse()
1612 tokarray.iter_idx = 0; in ocs_hw_qtop_parse()
1615 for (s = qtop_string; (tokarray.inuse_count < tokarray.alloc_count) && in ocs_hw_qtop_parse()
1616 ((s = tokenize(s, &tokarray.tokens[tokarray.inuse_count]))) != NULL; ) { in ocs_hw_qtop_parse()
1617 tokarray.inuse_count++; in ocs_hw_qtop_parse()
1623 ocs_free(hw->os, tokarray.tokens, MAX_TOKENS * sizeof(*tokarray.tokens)); in ocs_hw_qtop_parse()
1634 ocs_free(hw->os, tokarray.tokens, MAX_TOKENS * sizeof(*tokarray.tokens)); in ocs_hw_qtop_parse()
1641 parse_topology(hw, &tokarray, qtop); in ocs_hw_qtop_parse()
1650 ocs_free(hw->os, tokarray.tokens, MAX_TOKENS * sizeof(*tokarray.tokens)); in ocs_hw_qtop_parse()