LCOV - code coverage report
Current view: top level - src/input - cp_parser_status_types.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:936074a) Lines: 90.9 % 11 10
Test Date: 2025-12-04 06:27:48 Functions: 66.7 % 3 2

            Line data    Source code
       1              : !--------------------------------------------------------------------------------------------------!
       2              : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3              : !   Copyright 2000-2025 CP2K developers group <https://cp2k.org>                                   !
       4              : !                                                                                                  !
       5              : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6              : !--------------------------------------------------------------------------------------------------!
       7              : 
       8              : ! **************************************************************************************************
       9              : !> \brief a module to allow the storage of the parser status
      10              : !> \author Teodoro Laino [tlaino] - University of Zurich
      11              : !> \date 08.2008
      12              : ! **************************************************************************************************
      13              : MODULE cp_parser_status_types
      14              :    USE cp_parser_buffer_types,          ONLY: buffer_type,&
      15              :                                               create_buffer_type,&
      16              :                                               release_buffer_type
      17              :    USE kinds,                           ONLY: max_line_length
      18              : #include "../base/base_uses.f90"
      19              : 
      20              :    IMPLICIT NONE
      21              :    PRIVATE
      22              : 
      23              :    TYPE status_type
      24              :       LOGICAL                                        :: in_use = .FALSE.
      25              :       INTEGER                                        :: old_input_line_number = HUGE(0)
      26              :       INTEGER                                        :: old_icol = HUGE(0)
      27              :       INTEGER                                        :: old_icol1 = HUGE(0)
      28              :       INTEGER                                        :: old_icol2 = HUGE(0)
      29              :       CHARACTER(LEN=max_line_length)                 :: old_input_line = ""
      30              :       ! Store status of the buffer
      31              :       TYPE(buffer_type), POINTER                     :: buffer => NULL()
      32              :    END TYPE status_type
      33              : 
      34              :    PUBLIC :: status_type, create_status_type, release_status_type
      35              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_parser_status_types'
      36              : 
      37              : CONTAINS
      38              : 
      39              : ! ****************************************************************************
      40              : !> \brief creates the parser status type
      41              : !> \param status ...
      42              : !> \date  08.2008
      43              : !> \author Teodoro Laino [tlaino] - University of Zurich
      44              : ! **************************************************************************************************
      45        54435 :    SUBROUTINE create_status_type(status)
      46              :       TYPE(status_type), POINTER                         :: status
      47              : 
      48        54435 :       CPASSERT(.NOT. ASSOCIATED(status))
      49        54435 :       ALLOCATE (status)
      50        54435 :       CALL create_buffer_type(status%buffer)
      51        54435 :    END SUBROUTINE create_status_type
      52              : 
      53              : ! ****************************************************************************
      54              : !> \brief releases the parser status type
      55              : !> \param status ...
      56              : !> \date  08.2008
      57              : !> \author Teodoro Laino [tlaino] - University of Zurich
      58              : ! **************************************************************************************************
      59        54435 :    SUBROUTINE release_status_type(status)
      60              :       TYPE(status_type), POINTER                         :: status
      61              : 
      62        54435 :       CPASSERT(ASSOCIATED(status))
      63        54435 :       CALL release_buffer_type(status%buffer)
      64        54435 :       DEALLOCATE (status)
      65        54435 :    END SUBROUTINE release_status_type
      66              : 
      67            0 : END MODULE cp_parser_status_types
        

Generated by: LCOV version 2.0-1