Set Leaf Indicators

Command line:
tlapi ‑cSETLIND [‑tnUpd] [‑u] ‑isInputFile sPart
Library call:
nStatus = TLsetlind (sPart, sInputFile, nUpd)

Function

Modify leaf indicator strings for one or more leaf status file records within the specified partition update. Modification of any leaf indicator string will optionally force the leaf to be included in the current update.

Arguments

sPart

The path of the partition for which leaf indicators are to be modified.

sInputFile

The full pathname of a leaf indicator update file containing one or more leaf indicator records. The format of these records is described below.

nUpd

If nUpd is zero, then wildcard leaf filename selection masks are applied to all leaves in the partition.

If nUpd equals 1, wildcard leaf filename selection masks are applied only to leaves currently changed or marked for inclusion in the current update.

If nUpd equals 2, wildcard leaf filename selection masks are used to set the partition default leaf indicator strings.

If nUpd equals 3, then wildcard leaf filename selection masks are used to set the partition indicator strings.

When using the command line, the ‑u flag has the same effect as setting nUpd to 1.

For additional command line arguments see “Common Flag Arguments”.

Leaf indicator record format

Leaf indicator records for a partition are updated by one or more leaf indicator records.

Each leaf indicator record is terminated by a CR/LF pair and consists of a number of fields delimited by the field separator character defined for the partition. The field separator character is defined by the partition indicator symbol FSEP, and defaults to a colon (:).

FIELD # TYPE MEANING
01 char string The leaf filename or leaf filename wildcard mask
02 char string the leaf folio string or folio string mask
03 integer update inclusion status (0=implied, 1=force include)
04 char command operator
05 integer leaf indicator sequence number
06 char indicator type (alpha, or - for default)
07 char string leaf indicator string

The leaf filename and leaf folio string masks are compared with each leaf filename and folio string entry in the partition or partition changed leaf list. If a leaf filename and folio string matches the current masks, then the update record is applied to the leaf.

The `*' mask will match all leaf filenames and folio names.

Filename The leaf filename is a 14 character representation of the leaf recto base page number and stroke page levels. Alternatively, it can be a simple wildcard mask. For example, the mask `*' would set a leaf indicator string for all applicable leaves, and the mask `0005*' for leaf `5' and any associated stroke pages. If you want the record to be applied to all leaf files in the selected set then set this field to the `*' character.
Folio string The folio string specifies a recto page folio string or folio string mask. For example, the mask `*' would set a leaf indicator string for all applicable leaves, and the mask `0005*' for leaf `5' and any associated stroke pages. If you want the record to be applied to all leaf files in the selected set then set this field to the `*' character.
Inclusion status The inclusion status field permits forced inclusion of a leaf from the current update. By default, a leaf will be included in the current update if it changes as a result of editing. Setting the inclusion status to `1' forces all leaves matching the specified filename and/or folio string masks to be included in the current update.
Operator   The following operations are permitted:
  I  insert indicator string at array offset n, shift higher entries up one
  d  delete indicator string at array offset n, shift higher entries down one
  r  replace the value of an indicator string at array offset n
  c  clear the value of an indicator string at array offset n
  p  pack indicators of a specified type in array offset n or greater

Table 1. 

  Insertion of an indicator string inserts a new indicator string immediately before the nth indicator of the same type, or at the end of the indicator list. Deleting an indicator removes the nth indicator of the named type from the indicator list.
Indicator sequence number The indicator sequence number identifies the nth indicator of a specified type. TopLeaf supports a maximum of 32,000 leaf indicator strings for each leaf in a partition. The sequence number is in the range 1–32,000.
Indicator string The maximum length of each leaf indicator string is 32,000 characters.

Indicator Examples

The following entries match all leaf files in the selected range (full partition or changed pages):

*:*:0:i:1:R:1st revision

*:*:0:i:1:I:23rd December, 2001

*:*:0:i:1:E:1st January, 2002

The following entries match stroke page `61' only:

*:61:0:i:1:R:2nd revision

*:61:0:i:1:I:28th December, 2001

*:61:0:i:1:E:15th January, 2002

Examples

Command line:

tlapi ‑cSETLIND ‑iC:\dates.ind manuals/topix/volume1 ‑t1 manuals/topix/volume1

Library call:

status = TLsetlind("manuals/topix/volume1", "C:\\dates.ind", 1L);