Skip to content
Snippets Groups Projects
Commit c4640f65 authored by Luis Kornblueh's avatar Luis Kornblueh
Browse files

Out of source build and some documentation tests.

parent ba6df6c1
No related branches found
No related tags found
No related merge requests found
...@@ -668,7 +668,7 @@ WARN_LOGFILE = ...@@ -668,7 +668,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = @top_srcdir@/src INPUT = @top_srcdir@/include @top_srcdir@/src
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......
/**
* @addtogroup CBindings libmtime C language bindings
*
* @file calendar.c
*
* @brief Singleton Calendar connecting all supported calendar types.
*
* @author Luis Kornblueh, Rahul Sinha. MPIM.
* @date March 2013
*
* @note Calendar type, once initialized, should not be changed.
*/
#ifndef CALENDAR_H #ifndef CALENDAR_H
#define CALENDAR_H #define CALENDAR_H
#include <stdlib.h>
#define MAX_CALENDAR_STR_LEN 32 #define MAX_CALENDAR_STR_LEN 32
struct _datetime; struct _datetime;
struct _julianday; struct _julianday;
/**
* @enum calendarType
*
* @brief calendar selector
*/
typedef enum typedef enum
{ {
CALENDAR_NOT_SET = 0, PROLEPTIC_GREGORIAN = 1, YEAR_OF_365_DAYS = 2, YEAR_OF_360_DAYS = 3 CALENDAR_NOT_SET = 0, PROLEPTIC_GREGORIAN = 1, YEAR_OF_365_DAYS = 2, YEAR_OF_360_DAYS = 3
......
/** /**
* @addtogroup CBindings libmtime C language bindings
*
* @file calendar.c * @file calendar.c
* *
* @brief Singleton Calendar connecting all supported calendar types. * @brief Singleton Calendar connecting all supported calendar types.
...@@ -10,6 +12,7 @@ ...@@ -10,6 +12,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -29,7 +32,6 @@ struct _datetime * ...@@ -29,7 +32,6 @@ struct _datetime *
(*julian2date)(struct _julianday *julian, struct _datetime *date); (*julian2date)(struct _julianday *julian, struct _datetime *date);
/*! \endcond */ /*! \endcond */
static calendarType _calendar_type = CALENDAR_NOT_SET; static calendarType _calendar_type = CALENDAR_NOT_SET;
static bool calendar_initialized = false; static bool calendar_initialized = false;
......
/** /**
* \addtogroup CBindings libmtime C language bindings
*
* @file date.c * @file date.c
* *
* @brief Date and some operations supported on Date. * @brief Date and some operations supported on Date.
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
!! @author Luis Kornblueh, Max Planck Institute for Meteorology !! @author Luis Kornblueh, Max Planck Institute for Meteorology
!! @author Rahul Sinha, Max Planck Institute for Meteorology !! @author Rahul Sinha, Max Planck Institute for Meteorology
!! !!
!! defgroup FortranBindings libmtime Fortran language bindings !! @defgroup FortranBindings libmtime Fortran language bindings
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
!> !>
!! @brief Provides the calendar to the users, abstracting the different calendars available. !! @brief Provides the calendar to the users, abstracting the different calendars available.
!! !!
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
!! !!
!! @author Luis Kornblueh, Max Planck Institute for Meteorology !! @author Luis Kornblueh, Max Planck Institute for Meteorology
!! @author Rahul Sinha, Max Planck Institute for Meteorology !! @author Rahul Sinha, Max Planck Institute for Meteorology
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_calendar module mtime_calendar
! !
use, intrinsic :: iso_c_binding, only: c_int, c_char, c_null_char use, intrinsic :: iso_c_binding, only: c_int, c_char, c_null_char
...@@ -32,6 +32,7 @@ module mtime_calendar ...@@ -32,6 +32,7 @@ module mtime_calendar
! !
private private
! !
enum, bind(c) enum, bind(c)
enumerator :: calendar_not_set = 0 !> calendar is not defined yet enumerator :: calendar_not_set = 0 !> calendar is not defined yet
enumerator :: proleptic_gregorian = 1 !> proleptic Gregorian calendar enumerator :: proleptic_gregorian = 1 !> proleptic Gregorian calendar
...@@ -85,7 +86,7 @@ contains ...@@ -85,7 +86,7 @@ contains
end module mtime_calendar end module mtime_calendar
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_julianday module mtime_julianday
! !
use, intrinsic :: iso_c_binding, only: c_int64_t, c_char, c_null_char, c_ptr, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int64_t, c_char, c_null_char, c_ptr, c_loc, c_f_pointer
...@@ -161,7 +162,7 @@ contains ...@@ -161,7 +162,7 @@ contains
end module mtime_julianday end module mtime_julianday
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_date module mtime_date
! !
use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer
...@@ -238,7 +239,7 @@ contains ...@@ -238,7 +239,7 @@ contains
end module mtime_date end module mtime_date
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_time module mtime_time
! !
use, intrinsic :: iso_c_binding, only: c_int, c_char, c_ptr, c_null_char, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int, c_char, c_ptr, c_null_char, c_loc, c_f_pointer
...@@ -315,7 +316,7 @@ contains ...@@ -315,7 +316,7 @@ contains
end module mtime_time end module mtime_time
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_datetime module mtime_datetime
! !
use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer
...@@ -603,7 +604,7 @@ contains ...@@ -603,7 +604,7 @@ contains
end module mtime_datetime end module mtime_datetime
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_timedelta module mtime_timedelta
! !
use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_char, c_ptr, c_null_char, c_loc, c_f_pointer
...@@ -717,7 +718,7 @@ contains ...@@ -717,7 +718,7 @@ contains
end module mtime_timedelta end module mtime_timedelta
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_events module mtime_events
! !
use, intrinsic :: iso_c_binding, only: c_int64_t, c_char, c_null_char, c_bool, c_ptr, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int64_t, c_char, c_null_char, c_bool, c_ptr, c_loc, c_f_pointer
...@@ -818,7 +819,7 @@ contains ...@@ -818,7 +819,7 @@ contains
end module mtime_events end module mtime_events
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime_eventgroups module mtime_eventgroups
! !
use, intrinsic :: iso_c_binding, only: c_int64_t, c_ptr, c_char, c_null_char, c_bool, c_loc, c_f_pointer use, intrinsic :: iso_c_binding, only: c_int64_t, c_ptr, c_char, c_null_char, c_bool, c_loc, c_f_pointer
...@@ -906,7 +907,7 @@ contains ...@@ -906,7 +907,7 @@ contains
end module mtime_eventgroups end module mtime_eventgroups
!> !>
!! !!
!!___________________________________________________________________________________________________________ !___________________________________________________________________________________________________________
module mtime module mtime
! !
use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_bool, c_ptr, c_char use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_bool, c_ptr, c_char
......
/** /**
* @addtogroup CBindings libmtime C language bindings
*
* @file time.c * @file time.c
* *
* @brief Time and some operations supported on Time. * @brief Time and some operations supported on Time.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment