Value Extraction Functions

VOID extractdate(NODE, INT_V, INT_V, INT_V);

extract a date

VOID extractnames(NODE, LIST_V, INT_V, INT_V);

extract a name

VOID extractplaces(NODE, LIST_V, INT_V);

extract a place

VOID extracttokens(STRING, LIST_V, INT_V, STRING);

extract tokens

Value extraction functions read the values of certain lines and return those values in extracted form.

Extractdate extracts date values from either an event node or DATE node. The first parameter must be a node; if its tag is DATE, the date is extracted from the value of that node; if its tag is not DATE, the date is extracted from the first DATE line one level below the argument node. The remaining three arguments are variables. The first is assigned the integer value of the extracted day; the second is assigned the integer value of the extracted month; and the third is assigned the integer value of the extracted year.

Extractnames extracts name components from a NAME line. Its first argument is either an INDI or a NAME node. If it is a NAME line, the components are extracted from the value of that node; if it is an INDI line, the components are extracted from the value of the first NAME line in the person record. The second argument is a list that will hold the extracted components. The third argument is an integer variable that is set to the number of extracted components. The fourth argument is a variable that is set to the index (starting at one) of the surname component; the / characters are removed from around the surname component. If there is no surname this argument variable is set to zero.

Extractplaces extracts place components from a PLAC node. The first argument is a node; if its tag is PLAC, the places are extracted from the value of the node; if its tag is not PLAC, places are extracted from the first PLAC line one level below the argument node. The second parameter is a list that will hold the extracted components. The third argument is an integer variable that is set to the number of extracted components. Place components are defined by the comma-separated portions of the PLAC value; leading and trailing white space is removed from the components, while all internal white space is retained.

Extracttokens extracts tokens from a string and places them in a list. The first argument is the string to extract tokens from. The second argument is the list to hold the tokens. The third argument is an integer variable that is set to the number of tokens extracted. The fourth parameter is the string of deliminater characters that extracttokens uses to break the input string into tokens.