MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pl_section_end

Function pl_section_end

internal/cbm/doclink_perl.c:855–871  ·  view source on GitHub ↗

End byte of the section that cmds[ci] (a =head or =item) opens * (extract_defs.c's pod_section_end). */

Source from the content-addressed store, hash-verified

853/* End byte of the section that cmds[ci] (a =head or =item) opens
854 * (extract_defs.c's pod_section_end). */
855static uint32_t pl_section_end(const pl_cmd_t *cmds, int n, int ci, uint32_t pe) {
856 const pl_cmd_t *c = &cmds[ci];
857 for (int j = ci + SKIP_ONE; j < n; j++) {
858 const pl_cmd_t *d = &cmds[j];
859 if (d->type == PL_CUT) {
860 return d->sb;
861 }
862 if (d->type == PL_HEAD && (c->type == PL_ITEM || d->level <= c->level)) {
863 return d->sb;
864 }
865 if (c->type == PL_ITEM && (d->type == PL_ITEM || d->type == PL_BACK) &&
866 d->level == c->level) {
867 return d->sb;
868 }
869 }
870 return pe;
871}
872
873/* A heading's text with formatting codes removed and newlines and tabs as
874 * spaces (extract_defs.c's pod_plain_heading, byte for byte: the name it

Callers 1

pl_block_sectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected