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

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

    TYPE
      ch = set of char;

    VAR
      found: boolean,
      mark_index: 1 .. osc$max_name_size + 1,
      mark: ch;


    IF new_file_contents = fsc$unknown_contents THEN
      static_file_contents := fsc$unknown_contents;
      static_file_structure := fsc$unknown_contents;
    ELSEIF new_file_contents = fsc$list THEN
      static_file_contents := fsc$list;
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$object_library THEN
      static_file_contents := 'OBJECT';
      static_file_structure := 'LIBRARY';
    ELSEIF new_file_contents = fsc$legible_data THEN
      static_file_contents := 'LEGIBLE';
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$legible_scl_procedure THEN
      static_file_contents := 'LEGIBLE';
      static_file_structure := 'SCL_PROCEDURE';
    ELSEIF new_file_contents = fsc$legible_scl_include THEN
      static_file_contents := 'LEGIBLE';
      static_file_structure := 'SCL_INCLUDE';
    ELSEIF new_file_contents = fsc$legible_scl_job THEN
      static_file_contents := 'LEGIBLE';
      static_file_structure := 'SCL_JOB';
    ELSEIF new_file_contents = fsc$legible_library THEN
      static_file_contents := 'LEGIBLE';
      static_file_structure := 'LIBRARY';
    ELSEIF new_file_contents = fsc$object_data THEN
      static_file_contents := 'OBJECT';
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$ascii_log THEN
      static_file_contents := fsc$ascii_log;
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$binary_log THEN
      static_file_contents := fsc$binary_log;
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$data THEN
      static_file_contents := fsc$unknown_contents;
      static_file_structure := fsc$data;
    ELSEIF new_file_contents = fsc$file_backup THEN
      static_file_contents := fsc$file_backup;
      static_file_structure := 'DATA';
    ELSEIF new_file_contents = fsc$screen_form THEN
      static_file_contents := 'SCREEN';
      static_file_structure := 'FORM';
    ELSEIF new_file_contents = fsc$source_map THEN
      static_file_contents := 'SOURCE_MAP';
      static_file_structure := 'UNKNOWN';
    ELSE
      mark := $ch [$CHAR (200)];
      #SCAN (mark, new_file_contents, mark_index, found);
      IF found THEN
        static_file_contents := new_file_contents (1, mark_index - 1);
        static_file_structure := new_file_contents (mark_index + 1, * )
      ELSE
        static_file_contents := new_file_contents;
        static_file_structure := fsc$unknown_contents;
      IFEND;
    IFEND;
*else

    TYPE
      ch = set of char;

    VAR
      found: boolean,
      mark_index: 1 .. osc$max_name_size + 1,
      mark: ch;

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

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

    = 'D' =
      IF new_file_contents = fsc$data THEN
        static_file_contents := fsc$unknown_contents;
        static_file_structure := fsc$data;
        RETURN; {----->
      IFEND;

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

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

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

    = 'S' =
      IF new_file_contents = fsc$screen_form THEN
        static_file_contents := 'SCREEN';
        static_file_structure := 'FORM';
        RETURN; {----->
      ELSEIF new_file_contents = fsc$source_map THEN
        static_file_contents := 'SOURCE_MAP';
        static_file_structure := 'UNKNOWN';
        RETURN; {----->
      IFEND;

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

    ELSE
      ;
    CASEND;

    mark := $ch [$CHAR (200)];
    #SCAN (mark, new_file_contents, mark_index, found);
    IF found THEN
      static_file_contents := new_file_contents (1, mark_index - 1);
      static_file_structure := new_file_contents (mark_index + 1, * )
    ELSE
      static_file_contents := new_file_contents;
      static_file_structure := fsc$unknown_contents;
    IFEND;

*ifend
  PROCEND fsp$convert_to_old_contents;

*copyc amt$file_contents
*copyc amt$file_structure
*copyc fsc$file_contents
*copyc ost$name
?? POP ??
