embgroup.c


Function embGrpGetProgGroups

Optionally constructs a path to the directory of normal EMBOSS or embassy ACD files. Calls grpGetAcdFiles to construct lists of the group, doc and program name information.

Synopsis

Prototype
void embGrpGetProgGroups (
      AjPList glist,
      AjPList alpha,
      char* const[] env,
      AjBool emboss,
      AjBool embassy,
      const AjPStr embassyname,
      AjBool explode,
      AjBool colon,
      AjBool gui
);

TypeNameRead/WriteDescription
AjPListglistOutputList of groups of programs
AjPListalphaOutputAlphabetic list of programs
char* const[]envInputEnvironment passed in from C main() parameters
AjBoolembossInputRead in EMBOSS ACD data
AjBoolembassyInputRead in EMBASSY ACD data
const AjPStrembassynameInputName of embassy package. default is to search for all
AjBoolexplodeInputExpand group names around ':'
AjBoolcolonInputRetain ':' in group names
AjBoolguiInputOnly report programs that are OK in GUIs
void RETURN

Input
env:(Input)Environment passed in from C main() parameters
emboss:(Input)Read in EMBOSS ACD data
embassy:(Input)Read in EMBASSY ACD data
embassyname:(Input)Name of embassy package. default is to search for all
explode:(Input)Expand group names around ':'
colon:(Input)Retain ':' in group names
gui:(Input)Only report programs that are OK in GUIs
Output
glist:(Output)List of groups of programs
alpha:(Output)Alphabetic list of programs
Returns
void:No return value

Description

Optionally constructs a path to the directory of normal EMBOSS or embassy ACD files. Calls grpGetAcdFiles to construct lists of the group, doc and program name information.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpGetEmbassy

Optionally constructs a path to the directory of normal EMBOSS or embassy ACD files. Calls grpGetAcdFiles to construct lists of the group, doc and program name information.

Synopsis

Prototype
AjBool embGrpGetEmbassy (
      const AjPStr appname,
      AjPStr* embassyname
);

TypeNameRead/WriteDescription
const AjPStrappnameInputApplication name
AjPStr*embassynameOutputEmbassy package attribute value, or an empty string if in the main package
AjBool RETURNajTrue if an ACD file was found

Input
appname:(Input)Application name
Output
embassyname:(Output)Embassy package attribute value, or an empty string if in the main package
Returns
AjBool:ajTrue if an ACD file was found

Description

Optionally constructs a path to the directory of normal EMBOSS or embassy ACD files. Calls grpGetAcdFiles to construct lists of the group, doc and program name information.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpMakeNewGnode

Creates a new pointer to a Gnode struct for holding a group's name and pointer to a list of programs (also held in Gnodes).

Synopsis

Prototype
EmbPGroupTop embGrpMakeNewGnode (
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPStrnameInputName of the group
EmbPGroupTop RETURNpointer to a new GPnode struct

Input
name:(Input)Name of the group
Returns
EmbPGroupTop:pointer to a new GPnode struct

Description

Creates a new pointer to a Gnode struct for holding a group's name and pointer to a list of programs (also held in Gnodes).

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpMakeNewPnode

Creates a new pointer to a Gnode struct for holding a program's name and documentation.

Synopsis

Prototype
EmbPGroupProg embGrpMakeNewPnode (
      const AjPStr name,
      const AjPStr doc,
      const AjPStr keywords,
      const AjPStr package
);

TypeNameRead/WriteDescription
const AjPStrnameInputName of the program
const AjPStrdocInputDescription of the program
const AjPStrkeywordsInputKeywords for this program with underscores for spaces and with spaces as separators
const AjPStrpackageInputName of the package
EmbPGroupProg RETURNpointer to a new gnode struct

Input
name:(Input)Name of the program
doc:(Input)Description of the program
keywords:(Input)Keywords for this program with underscores for spaces and with spaces as separators
package:(Input)Name of the package
Returns
EmbPGroupProg:pointer to a new gnode struct

Description

Creates a new pointer to a Gnode struct for holding a program's name and documentation.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpSortGroupsList

Sort a list of GPnodes by their name.

Synopsis

Prototype
void embGrpSortGroupsList (
      AjPList groupslist
);

TypeNameRead/WriteDescription
AjPListgroupslistModifyList to sort
void RETURN

Input & Output
groupslist:(Modify)List to sort
Returns
void:No return value

Description

Sort a list of GPnodes by their name.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpSortProgsList

Sort a list of Pnodes by their name.

Synopsis

Prototype
void embGrpSortProgsList (
      AjPList progslist
);

TypeNameRead/WriteDescription
AjPListprogslistModifyList to sort
void RETURN

Input & Output
progslist:(Modify)List to sort
Returns
void:No return value

Description

Sort a list of Pnodes by their name.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpCompareTwoGnodes

Compare two Gnodes as case-insensitive strings.

Synopsis

Prototype
ajint embGrpCompareTwoGnodes (
      const void* a,
      const void* b
);

TypeNameRead/WriteDescription
const void*aInputFirst node
const void*bInputSecond node
ajint RETURNCompare value (-1, 0, +1)

Input
a:(Input)First node
b:(Input)Second node
Returns
ajint:Compare value (-1, 0, +1)

Description

Compare two Gnodes as case-insensitive strings.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpCompareTwoPnodes

Compare two Pnodes as case-insensitive strings.

Synopsis

Prototype
ajint embGrpCompareTwoPnodes (
      const void* a,
      const void* b
);

TypeNameRead/WriteDescription
const void*aInputFirst node
const void*bInputSecond node
ajint RETURNCompare value (-1, 0, +1)

Input
a:(Input)First node
b:(Input)Second node
Returns
ajint:Compare value (-1, 0, +1)

Description

Compare two Pnodes as case-insensitive strings.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpOutputGroupsList

Displays a list of groups to an output file handle.

Synopsis

Prototype
void embGrpOutputGroupsList (
      AjPFile outfile,
      const AjPList groupslist,
      AjBool showprogs,
      AjBool html,
      AjBool showkey,
      const AjPStr package
);

TypeNameRead/WriteDescription
AjPFileoutfileModifyOutput file handle
const AjPListgroupslistInputList of groups to be displayed
AjBoolshowprogsInputIf True, display the programs in each group
AjBoolhtmlInputIf True, format for HTML, else make a simple list
AjBoolshowkeyInputIf True, show keywords
const AjPStrpackageInputName of current package
void RETURN

Input
groupslist:(Input)List of groups to be displayed
showprogs:(Input)If True, display the programs in each group
html:(Input)If True, format for HTML, else make a simple list
showkey:(Input)If True, show keywords
package:(Input)Name of current package
Input & Output
outfile:(Modify)Output file handle
Returns
void:No return value

Description

Displays a list of groups to an output file handle.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpOutputProgsList

Displays a list of programs and their descriptions to an output file handle.

Synopsis

Prototype
void embGrpOutputProgsList (
      AjPFile outfile,
      const AjPList progslist,
      AjBool html,
      AjBool showkey,
      const AjPStr package
);

TypeNameRead/WriteDescription
AjPFileoutfileModifyOutput file handle
const AjPListprogslistInputList of programs to be displayed
AjBoolhtmlInputIf True, format for HTML, else make a simple list
AjBoolshowkeyInputShow keywords in output
const AjPStrpackageInputName of current package
void RETURN

Input
progslist:(Input)List of programs to be displayed
html:(Input)If True, format for HTML, else make a simple list
showkey:(Input)Show keywords in output
package:(Input)Name of current package
Input & Output
outfile:(Modify)Output file handle
Returns
void:No return value

Description

Displays a list of programs and their descriptions to an output file handle.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpGroupsListDel

Destructor for a groups list

Synopsis

Prototype
void embGrpGroupsListDel (
      AjPList* groupslist
);

TypeNameRead/WriteDescription
AjPList*groupslistDeleteList of groups to be destroyed
void RETURN

Output
groupslist:(Delete)List of groups to be destroyed
Returns
void:No return value

Description

Destructor for a groups list

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpProgsListDel

Destructor for a groups list

Synopsis

Prototype
void embGrpProgsListDel (
      AjPList* progslist
);

TypeNameRead/WriteDescription
AjPList*progslistDeleteList of programs to be destroyed
void RETURN

Output
progslist:(Delete)List of programs to be destroyed
Returns
void:No return value

Description

Destructor for a groups list

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpProgDel

Destructor for a program node

Synopsis

Prototype
void embGrpProgDel (
      EmbPGroupProg* Pgl
);

TypeNameRead/WriteDescription
EmbPGroupProg*PglDeleteProgram node
void RETURN

Output
Pgl:(Delete)Program node
Returns
void:No return value

Description

Destructor for a program node

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpRelationsListDel

Destructor for a relations list

Synopsis

Prototype
void embGrpRelationsListDel (
      AjPList* relslist
);

TypeNameRead/WriteDescription
AjPList*relslistDeleteList of relations to be destroyed
void RETURN

Output
relslist:(Delete)List of relations to be destroyed
Returns
void:No return value

Description

Destructor for a relations list

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpKeySearchProgs

Searches a list of groups and programs for (partial) matches to a keyword

Synopsis

Prototype
void embGrpKeySearchProgs (
      AjPList newlist,
      const AjPList glist,
      const AjPStr key,
      AjBool all
);

TypeNameRead/WriteDescription
AjPListnewlistOutputList of matching EmbPGroupProg struct returned
const AjPListglistInputList of EmbPGroupProg struct to search through
const AjPStrkeyInputString to search for
AjBoolallInputMatch all words in key search string
void RETURN

Input
glist:(Input)List of EmbPGroupProg struct to search through
key:(Input)String to search for
all:(Input)Match all words in key search string
Output
newlist:(Output)List of matching EmbPGroupProg struct returned
Returns
void:No return value

Description

Searches a list of groups and programs for (partial) matches to a keyword

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpSearchProgsEdam

Searches a list of groups and programs for (partial) matches to EDAM topic terms

Synopsis

Prototype
void embGrpSearchProgsEdam (
      AjPList newlist,
      const AjPList glist,
      const AjPStr query,
      const char* namespace,
      AjBool sensitive,
      AjBool subclasses,
      AjBool obsolete
);

TypeNameRead/WriteDescription
AjPListnewlistOutputList of matching EmbPGroupProg struct returned
const AjPListglistInputList of EmbPGroupProg struct to search through
const AjPStrqueryInputString(s) to search for
const char*namespaceInputEDAM namespace to search
AjBoolsensitiveInputMatch EDAM definitions
AjBoolsubclassesInputMatch EDAM subclasses
AjBoolobsoleteInputMatch EDAM obsolete terms
void RETURN

Input
glist:(Input)List of EmbPGroupProg struct to search through
query:(Input)String(s) to search for
namespace:(Input)EDAM namespace to search
sensitive:(Input)Match EDAM definitions
subclasses:(Input)Match EDAM subclasses
obsolete:(Input)Match EDAM obsolete terms
Output
newlist:(Output)List of matching EmbPGroupProg struct returned
Returns
void:No return value

Description

Searches a list of groups and programs for (partial) matches to EDAM topic terms

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpKeySearchSeeAlso

Takes an application name and returns a list of the groups that the application belongs to and a list of the applications that are in those groups.

If the program we are searching for is not found, it returns *appgroups as NULL.

Synopsis

Prototype
void embGrpKeySearchSeeAlso (
      AjPList newlist,
      AjPList* appgroups,
      AjPStr* package,
      const AjPList alpha,
      const AjPList glist,
      const AjPStr key
);

TypeNameRead/WriteDescription
AjPListnewlistModifyList of application groups EmbPGroupTop returned
AjPList*appgroupsOutputList of EmbPGroupTop groups of programs returned
AjPStr*packageOutputList of EmbPGroupTop groups of programs
const AjPListalphaInputList of EmbPGroupProg struct to search through
const AjPListglistInputList of EmbPGroupTop struct to search through
const AjPStrkeyInputprogram name to search for
void RETURN

Input
alpha:(Input)List of EmbPGroupProg struct to search through
glist:(Input)List of EmbPGroupTop struct to search through
key:(Input)program name to search for
Output
appgroups:(Output)List of EmbPGroupTop groups of programs returned
package:(Output)List of EmbPGroupTop groups of programs
Input & Output
newlist:(Modify)List of application groups EmbPGroupTop returned
Returns
void:No return value

Description

Takes an application name and returns a list of the groups that the application belongs to and a list of the applications that are in those groups.

If the program we are searching for is not found, it returns *appgroups as NULL.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpProgsMakeUnique

Takes a sorted EmbPGroupProg list and ensures that there are no duplicate group or application names in that list.

Synopsis

Prototype
void embGrpProgsMakeUnique (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList of application GPnode returned
void RETURN

Input & Output
list:(Modify)List of application GPnode returned
Returns
void:No return value

Description

Takes a sorted EmbPGroupProg list and ensures that there are no duplicate group or application names in that list.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpGroupMakeUnique

Takes a sorted EmbPGroupTop list and ensures that there are no duplicate group or application names in that list.

Synopsis

Prototype
void embGrpGroupMakeUnique (
      AjPList list
);

TypeNameRead/WriteDescription
AjPListlistModifyList of application GPnode returned
void RETURN

Input & Output
list:(Modify)List of application GPnode returned
Returns
void:No return value

Description

Takes a sorted EmbPGroupTop list and ensures that there are no duplicate group or application names in that list.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0

Function embGrpExit

Cleanup program group internals on exit

Synopsis

Prototype
void embGrpExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleanup program group internals on exit

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 6.4.0