10.9. How To Port Third Party Applications

Most of the steps done in developing a wrapper also need to be done when porting software. An ACD file is still required. The main differences are in writing the source code. The basic steps are the same:

  1. Implement the C source code

  2. Header documentation

  3. Empty main() function

  4. Call to embInitPV

  5. Variables to handle ACD data items

  6. Calls to ajAcdGet* to retrieve ACD values

  7. Code to clean up the ACD variables

For a port there are significantly more things to consider. The main() function will need rewriting to handle the ACD file processing as follows:

  1. Add code to pick up application options from ACD file processing rather than processing them as in the original

  2. Identify functions that read input from user and update the function calls

  3. Replace the output functions with appropriate calls to the EMBOSS libraries (possibly)

You must identify any functions that read input from the user, then add code to pick up values from the ACD file instead of processing them as in the original. The output can be left in whatever format is produced by the original application. You might add code to use the output functions provided by the EMBOSS libraries.

Clearly it's necessary to carefully familiarise yourself with the third party source code. It might be necessary to make edits across multiple files. This is the main disadvantage to porting software.

The remaining sections illustrate the approach taken for the port ohmmalign.