aboutsummaryrefslogtreecommitdiff
path: root/src/cctk_Misc.F90
blob: be99736953c83a5cc2b83f091b4b3a5dd54b5889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*@@
  @file    $RCSfile$
  @author  $Author$
  @date    $Date$
  @desc
           Fortran 90 interface declarations for the routines
           which have their C declarations in cctk_Misc.h
  @enddesc
  @version $Header$
@@*/

#include "cctk.h"

module cctk_Misc
  implicit none

  interface

     subroutine Util_SplitString (ierr, before, before_length, after, after_length, string, sep)
       implicit none
       integer      ierr
       character(*) before
       integer      before_length
       character(*) after
       integer      after_length
       character(*) string
       character(*) sep
     end subroutine Util_SplitString

     ! CCTK_Equals is declared in cctk.h
     
     subroutine CCTK_FortranString (nchars, c_string, f_string)
       implicit none
       integer               nchars
       CCTK_POINTER_TO_CONST c_string
       character(*)          f_string
     end subroutine CCTK_FortranString

     subroutine Util_NullTerminateString (c_string, f_string)
       implicit none
       CCTK_POINTER c_string
       character(*) f_string
     end subroutine Util_NullTerminateString

     subroutine Util_IntInRange (inrange, inval, range)
       implicit none
       integer      inrange
       integer      inval
       character(*) range
     end subroutine Util_IntInRange

     subroutine Util_DoubleInRange (inrange, inval, range)
       implicit none
       integer          inrange
       double precision inval
       character(*)     range
     end subroutine Util_DoubleInRange

     subroutine CCTK_SetString (ierr, data, value)
       implicit none
       integer      ierr
       CCTK_POINTER data
       character(*) value
     end subroutine CCTK_SetString

     subroutine CCTK_SetBoolean (ierr, data, value)
       implicit none
       integer      ierr
       CCTK_INT     data
       character(*) value
     end subroutine CCTK_SetBoolean

     subroutine CCTK_RunTime (time)
       implicit none
       integer time
     end subroutine CCTK_RunTime

     subroutine Util_CurrentTime (ierr, now)
       implicit none
       integer      ierr
       character(*) now
     end subroutine Util_CurrentTime

     subroutine Util_CurrentDate (ierr, now)
       implicit none
       integer      ierr
       character(*) now
     end subroutine Util_CurrentDate

     subroutine Util_RunTitle (ierr, title)
       implicit none
       integer      ierr
       character(*) title
     end subroutine Util_RunTitle

  end interface
  
  ! Do not declare these, because some compilers insist on a
  ! definition once they have seen an external declaration:
!!$  external Util_InList
!!$  external Util_IntInRangeList
!!$  external Util_DoubleInRangeList
!!$  external CCTK_SetDoubleInRangeList
!!$  external CCTK_SetIntInRangeList
!!$  external CCTK_SetKeywordInRangeList
  
end module cctk_Misc