Opened 5 years ago

Closed 5 years ago

#258 closed enhancement (fixed)

Change history_comment (hcom) to add 1st history comment to a .info segment

Reported by: Gary Dixon Owned by: Gary Dixon
Priority: major Milestone: MR12.8
Component: General Version:
Keywords: Cc:

Description

Info segment structure requirements divide an info segment into blocks, each containing a particular type of information. The designated block for the history comment begins with an :hcom: block divider; and that :hcom: block must be the final block in the info segment. Furthermore, many info segments contain just one block, and therefore are not ready to have an :hcom: block added to the end of the segment.

So the MR12.7 version of history_comment (hcom) does not properly add the first history comment to an info segment. It always places the new comment at the very top of the info segment, and does not include an :hcom: block divider.

This was a known flaw when hcom was changed to provide history comments in an .info segment. Special instructions were written telling the user to manually edit the .info segment to add block structure, and to move the mis-positioned history comment to a new :hcom: block at the end of the info segment. However, such manual editing has proven cumbersome and error prone.

hcom already provides special treatment for the different segment types it knows how to handle. It currently treats .info segments like PL/I source. That's why it adds the first history comment at the beginning of the .info segment.

This ticket suggests further enhancing the hcom command to apply special handling for .info segments.
hcom would add support for a new seg_type, for which:

  • hcom would call a new info_seg_ entry point to locate the :hcom: block in an existing info segment. This would help hcom locate a history comment at end of the segment without having to search the entire segment.
  • hcom would call another new info_seg_ entry point if it needed to add an :hcom: block to an info segment not already containing history comments. This info_seg_ entry point would carry out the steps needed to add a new :hcom: block at the end of the segment, and return location of that block to the hcom caller. hcom would then add the new history comment at that point in the info segment.

This proposed enhancement fits the existing code organization used by hcom code. It already provides a seg_type for handling the &version requirement in exec_coms. It can handle calls to new info_seg_ subroutines in a similar fashion.

It also keeps knowledge of info segment structure within info_seg_ subsystem, with only minimal adjustments to existing hcom code.

Change History (5)

comment:1 by Gary Dixon, 5 years ago

Component: Answering ServiceGeneral
Milestone: MR12.8
Type: defectenhancement

comment:2 by Gary Dixon, 5 years ago

Owner: changed from Eric Swenson to Gary Dixon
Status: newaccepted

comment:3 by Gary Dixon, 5 years ago

MCR10105 will by submitted proposing this enhancement.

Last edited 5 years ago by Gary Dixon (previous) (diff)

comment:5 by Eric Swenson, 5 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.