PROCEDURE (HIDDEN) cmp$convert_config_prolog (
  prolog_file, pf: file = $required
  new_prolog_library, npl: file = $required
  old_prolog_library, opl: file = $optional
  status)

"$FORMAT=OFF
VAR
ignore_status:status
new_library: file =new_prolog_library
VAREND

"$FORMAT=ON

COLLECT_TEXT $local.create_prolog_file until='end_crepf'
*copy cmp$create_prolog
end_crepf

  delete_variable cmd$crep_input status=ignore_status
  create_default_variable name=cmd$crep_input default='$command_of_caller'

  delete_variable cmd$crep_output status=ignore_status
  create_default_variable name=cmd$crep_output default=$string(new_library)

  IF $specified(old_prolog_library) THEN
    CREATE_OBJECT_LIBRARY
      add_module old_prolog_library status=ignore_status
      combine_module new_library status=ignore_status
      generate_library new_library status=ignore_status
    QUIT
  IFEND

  include_file prolog_file

  delete_variable cmd$crep_input status=ignore_status
  delete_variable cmd$crep_output status=ignore_status

PROCEND cmp$convert_config_prolog
