NAME qprepTranslationTableApply: apply table-based translation to qprep directive USAGE $status_code = qprepTranslationTableApply(\%state_table, \%message_table, \%translation_table, $directive_key, $directive_value, $output_stream); ARGUMENTS \%state_table (in/out): reference to hash table of qprep properties \%message_table (in): nested hash table of error messages and codes. (See qprepMessageTableInitialize(3)) \%translation_table (in): table of directive translation rules $directive_key (in): string containing input directive key $directive_value (in): string containing input directive key $output_stream (in/out): file handle to output script DESCRIPTION This routine applies the appropriate translation to the given directive key and value, and writes the result to the output stream. Note that directive_key and directive_value should contain values already processed by qprepPreTranslationCallback. RETURN VALUE This routine returns zero if no errors are detected. This routine reports an error message and returns non-zero if translation_table has no entry for the given directive_key. The most likely cause of that condition is that qprepPreTranslationCallback alters directive_key to a value that does not exist in translation_table. The solution to that problem is for qprepInitCallback to add an entry in translation_table for the directive key. Another possible cause for an error condition is that the value in the translation_table entry contains an entry which has an invalid target (i.e. a target other than 'KEY', 'VALUE' or 'BOTH'). The solution is to fix the entry. SEE ALSO qprepTranslationTableInitialize(in 'qprep.pm'), qprepPreTranslationCallback(in 'localQprep.pm')