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
);

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 3.0.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
);

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 3.0.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
);

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 3.0.0

Function embGrpSortGroupsList

Sort a list of GPnodes by their name.

Synopsis

Prototype

void embGrpSortGroupsList (
      AjPList groupslist
);

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 3.0.0

Function embGrpSortProgsList

Sort a list of Pnodes by their name.

Synopsis

Prototype

void embGrpSortProgsList (
      AjPList progslist
);

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 3.0.0

Function embGrpCompareTwoGnodes

Compare two Gnodes as case-insensitive strings.

Synopsis

Prototype

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

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 3.0.0

Function embGrpCompareTwoPnodes

Compare two Pnodes as case-insensitive strings.

Synopsis

Prototype

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

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 3.0.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
);

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 3.0.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
);

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 3.0.0

Function embGrpGroupsListDel

Destructor for a groups list

Synopsis

Prototype

void embGrpGroupsListDel (
      AjPList* groupslist
);

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 3.0.0

Function embGrpProgsListDel

Destructor for a groups list

Synopsis

Prototype

void embGrpProgsListDel (
      AjPList* progslist
);

Output

progslist:(Delete)List of programss 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 3.0.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
);

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 3.0.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
);

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 3.0.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
);

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 3.0.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
);

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 3.0.0

Function embGrpExit

Cleanup program group internals on exit

Synopsis

Prototype

void embGrpExit (
      void
);

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 3.0.0