
  PROCEDURE [INLINE] fsp$convert_to_new_contents
    (    static_file_contents: amt$file_contents;
         static_file_structure: amt$file_structure;
     VAR new_file_contents: amt$file_contents;
     VAR file_contents_truncated: boolean);

?? PUSH (LISTEXT := ON) ??
?? RIGHT := 110 ??
*if false

    VAR
      file_contents_size: 1 .. osc$max_name_size + 1,
      file_structure_size: 1 .. osc$max_name_size + 1;

    file_contents_truncated := FALSE;

    IF (static_file_contents = 'UNKNOWN') AND (static_file_structure = 'UNKNOWN') THEN
      new_file_contents := fsc$unknown_contents;
    ELSEIF (static_file_contents = 'LIST') AND ((static_file_structure = 'DATA') OR (static_file_structure =
          'UNKNOWN')) THEN
      new_file_contents := fsc$list;
    ELSEIF (static_file_contents = 'LEGIBLE') AND ((static_file_structure = 'DATA') OR
          (static_file_structure = 'UNKNOWN')) THEN
      new_file_contents := fsc$legible_data;
    ELSEIF (static_file_contents = 'LEGIBLE') AND (static_file_structure = 'LIBRARY') THEN
      new_file_contents := fsc$legible_library;
    ELSEIF (static_file_contents = 'LEGIBLE') AND (static_file_structure = 'SCL_PROCEDURE') THEN
      new_file_contents := fsc$legible_scl_procedure;
    ELSEIF (static_file_contents = 'LEGIBLE') AND (static_file_structure = 'SCL_INCLUDE') THEN
      new_file_contents := fsc$legible_scl_include;
    ELSEIF (static_file_contents = 'LEGIBLE') AND (static_file_structure = 'SCL_JOB') THEN
      new_file_contents := fsc$legible_scl_job;
    ELSEIF (static_file_contents = 'OBJECT') AND (static_file_structure = 'LIBRARY') THEN
      new_file_contents := fsc$object_library;
    ELSEIF (static_file_contents = 'OBJECT') AND (static_file_structure = 'DATA') THEN
      new_file_contents := fsc$object_data;
    ELSEIF (static_file_contents = 'ASCII_LOG') AND (static_file_structure = 'DATA') THEN
      new_file_contents := fsc$ascii_log;
    ELSEIF (static_file_contents = 'BINARY_LOG') AND (static_file_structure = 'DATA') THEN
      new_file_contents := fsc$binary_log;
    ELSEIF (static_file_contents = 'UNKNOWN') AND (static_file_structure = 'DATA') THEN
      new_file_contents := fsc$data;
    ELSEIF (static_file_contents = 'FILE_BACKUP') AND (static_file_structure = 'DATA') THEN
      new_file_contents := fsc$file_backup;
    ELSEIF (static_file_contents = 'SCREEN') AND (static_file_structure = 'FORM') THEN
      new_file_contents := fsc$screen_form;
    ELSE
      file_contents_size := clp$trimmed_string_size (static_file_contents);
      file_structure_size := clp$trimmed_string_size (static_file_structure);
      file_contents_truncated := ((file_contents_size + file_structure_size + 1) >
            STRLENGTH (new_file_contents)) AND (static_file_structure <> 'UNKNOWN');

      new_file_contents := static_file_contents;
      IF ((file_contents_size + 1) < STRLENGTH (new_file_contents)) AND
            (static_file_structure <> 'UNKNOWN') THEN
        new_file_contents ((file_contents_size + 1), 1) := $CHAR (200);
        new_file_contents ((file_contents_size + 2), * ) := static_file_structure;
      IFEND;
    IFEND;
*else

    VAR
      file_contents_size: 1 .. osc$max_name_size + 1,
      file_structure_size: 1 .. osc$max_name_size + 1;

    file_contents_truncated := FALSE;
    CASE static_file_contents (1) OF
    = 'A' =
      IF (static_file_contents = 'ASCII_LOG') AND (static_file_structure = 'DATA') THEN
        new_file_contents := fsc$ascii_log;
        RETURN; {----->
      IFEND;

    = 'B' =
      IF (static_file_contents = 'BINARY_LOG') AND (static_file_structure = 'DATA') THEN
        new_file_contents := fsc$binary_log;
        RETURN; {----->
      IFEND;

    = 'F' =
      IF (static_file_contents = 'FILE_BACKUP') AND (static_file_structure = 'DATA') THEN
        new_file_contents := fsc$file_backup;
        RETURN; {----->
      IFEND;

    = 'L' =
      IF (static_file_contents = 'LIST') AND ((static_file_structure = 'DATA') OR (static_file_structure =
            'UNKNOWN')) THEN
        new_file_contents := fsc$list;
        RETURN; {----->
      ELSEIF static_file_contents = 'LEGIBLE' THEN
        IF (static_file_structure = 'DATA') OR (static_file_structure = 'UNKNOWN') THEN
          new_file_contents := fsc$legible_data;
          RETURN; {----->
        ELSEIF static_file_structure = 'LIBRARY' THEN
          new_file_contents := fsc$legible_library;
          RETURN; {----->
        ELSEIF static_file_structure = 'SCL_PROCEDURE' THEN
          new_file_contents := fsc$legible_scl_procedure;
          RETURN; {----->
        ELSEIF static_file_structure = 'SCL_INCLUDE' THEN
          new_file_contents := fsc$legible_scl_include;
          RETURN; {----->
        ELSEIF static_file_structure = 'SCL_JOB' THEN
          new_file_contents := fsc$legible_scl_job;
          RETURN; {----->
        IFEND;
      IFEND;

    = 'O' =
      IF static_file_contents = 'OBJECT' THEN
        IF static_file_structure = 'LIBRARY' THEN
          new_file_contents := fsc$object_library;
          RETURN; {----->
        ELSEIF static_file_structure = 'DATA' THEN
          new_file_contents := fsc$object_data;
          RETURN; {----->
        IFEND;
      IFEND;

    = 'S' =
      IF (static_file_contents = 'SCREEN') AND (static_file_structure = 'FORM') THEN
        new_file_contents := fsc$screen_form;
        RETURN; {----->
      IFEND;

    = 'U' =
      IF static_file_contents = 'UNKNOWN' THEN
        IF static_file_structure = 'UNKNOWN' THEN
          new_file_contents := fsc$unknown_contents;
          RETURN; {----->
        ELSEIF static_file_structure = 'DATA' THEN
          new_file_contents := fsc$data;
          RETURN; {----->
        IFEND;
      IFEND;

    ELSE
      ;
    CASEND;

    file_contents_size := clp$trimmed_string_size (static_file_contents);
    file_structure_size := clp$trimmed_string_size (static_file_structure);
    file_contents_truncated := ((file_contents_size + file_structure_size + 1) >
          STRLENGTH (new_file_contents)) AND (static_file_structure <> 'UNKNOWN');

    new_file_contents := static_file_contents;
    IF ((file_contents_size + 1) < STRLENGTH (new_file_contents)) AND
          (static_file_structure <> 'UNKNOWN') THEN
      new_file_contents ((file_contents_size + 1), 1) := $CHAR (200);
      new_file_contents ((file_contents_size + 2), * ) := static_file_structure;
    IFEND;

*ifend
  PROCEND fsp$convert_to_new_contents;

*copyc amt$file_contents
*copyc amt$file_structure
*copyc fsc$file_contents
*copyc clp$trimmed_string_size
?? POP ??
