XvhGetTopicData(3X)
NAME
XvhGetTopicData − Return the information a help file.
SYNOPSIS
#include <Xvh/FormatTerm.h> int XvhGetTopicData (helpVolume, locationID, maxColumns, helpList, hyperList)
char*helpVolume;
char*locationID;
intmaxColumns;
char***helpList;
XvhHyperLines **hyperList;
DESCRIPTION
XvhGetTopicData retrieves the text from helpVolume for the topic associated with locationID. It formats the text according to the number of columns specified in maxColumns.
helpVolume
Specifies help volume. If the name given is not an absolute path, the environment variable XVHHELPUSERSEARCHPATH is used to determine the location of helpVolume. If XVHHELPUSERSEARCHPATH is not set or the volume is not found using XVHHELPUSERSEARCHPATH, the environment variable XVHHELPSYSTEMSEARCHPATH is used. If XVHHELPSYSTEMSEARCHPATH is not set, the function uses:
/usr/vhelp/%T/%L/%H
/usr/vhelp/%T/%H
/usr/vhelp/%T/%L/%H.hv
/usr/vhelp/%T/%H.hv
/usr/vhelp/%T/C/%H
/usr/vhelp/%T/C/%H.hv
where the fields descriptors are:
%TReplaced with volumes.
%HReplaced with helpVolume.
%LReplaced with the value of LANG.
locationID
Specifies a location ID in helpVolume. The topic containing the location ID is returned.
maxColums
Specifies the maximum number of columns used to display text.
helpListReturns a pointer to a null terminated list of null terminated strings. The caller is responsible for freeing the memory associated with the list of strings.
hyperListReturns a pointer to a list of XvhHyperLines. The last item in the list has the title and specification elements null’ed. The caller is responsible for freeing the memory associated with this list of structures.
STRUCTURE INFORMATION
The XvhHyperLines structure is defined as follows:
typedef struct
{
char * title;
char * specification;
int hyper_type;
} XvhHyperLines
titleSpecifies the title of the hypertext topic.
specification
Specifies a pointer to a string that is the hypertext link information. Depending on the type of the hypertext link, this could be a file name and/or an ID string or an application command line to execute.
hyper_type
Specifies the hypertext link type. The defined types are listed below.
Hypertext Types
XvhLINK_JUMP_REUSE
Indicates the hypertext specification is a jump to the new topic and to use the existing help dialog.
XvhLINK_JUMP_NEW
Indicates the hypertext specification is a jump to the new topic and to use a new help dialog.
XvhLINK_DEFINITION
Indicates the hypertext specification is a pointer to a topic that describes a phrase or graphic the hyptertext link is associated with.
XvhLINK_EXECUTE
Indicates the hypertext specification is a command.
XvhLINK_APP_DEFINE
Indicates the hypertext specification is an application defined hypertext link type.
XvhLINK_MAN_PAGE
Indicates the hypertext specification is a man page. The string is suitable for processing via the command ’man specification’.
RETURN VALUE
Returns a zero (0) if successful, a minus 1 (-1) if errors occurred. Returns a minus 2 (-2) if one or more hypertext links could not be resolved or formatted.
RELATED INFORMATION
XvhFreeTopicData(3X) and XvhProcessLinkData(3X) The HP Help System Developer’s Guide
Hewlett-Packard Company — Xvh Release 1.0: August 1992