-
Notifications
You must be signed in to change notification settings - Fork 1
/
hds_start.c
83 lines (65 loc) · 2.18 KB
/
hds_start.c
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
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include "f77.h" /* F77 <-> C interface macros */
#include "ems.h" /* EMS error reporting routines */
#include "hds1.h" /* Global definitions for HDS */
#include "str.h" /* Character string import/export macros */
#include "dat_err.h" /* DAT__ error code definitions */
#include "rec.h"
#include "dat1.h" /* Function prototypes */
/* Note that this routine is obselete and does NOT have a counterpart in */
/* C interface to HDS */
F77_SUBROUTINE(hds_start)( F77_INTEGER_TYPE(*status) )
{
/*
*+
* Name:
* HDS_START
* Purpose:
* Start up HDS.
* Language:
* ANSI C
* Invocation:
* CALL HDS_START( STATUS )
* Description:
* This routine should be called to start up HDS prior to making
* calls to other HDS routines. It ensures that HDS is active,
* returning without action if it is already active.
* Arguments:
* STATUS = INTEGER (Given and Returned)
* The global status.
* Notes:
* This routine is now obsolete, as HDS starts itself up automatically
* when required.
* Authors:
* RFWS: R.F. Warren-Smith (STARLINK, RAL)
* BKM: B.K. McIlwrath (STARLINK, RAL)
* {enter_new_authors_here}
* History:
* 4-APR-1991 (RFWS):
* Added prologue and made portable.
* 24-FEB-1992 (RFWS):
* Modified to call HDS1_INIT internally.
* 19-MAR-2001 (BKM):
* Convert to use consistent F77 macros and remove tabs.
* {enter_changes_here}
* Bugs:
* {note_any_bugs_here}
*-
*/
/* Check the inherited global status */
if ( !_ok( *status ) ) return;
hds_gl_status = DAT__OK;
/* Initialise HDS */
dat1_init();
/* If an error occurred, then report contextual information */
if ( !_ok( hds_gl_status ) )
{
emsRep( "HDS_START_ERR",
"HDS_START: Error activating the Hierarchical Data System \
(HDS).",&hds_gl_status );
}
/* Exit the routine */
*status = hds_gl_status;
}