source: Sophya/trunk/SophyaExt/XephemAstroLib/auxil.c@ 1783

Last change on this file since 1783 was 1719, checked in by cmv, 24 years ago

Adapted to version 3.5 xephem cmv 22/10/2001

File size: 1.0 KB
Line 
1/* aux functions so programs besides XEphem can use this library.
2 */
3
4#include <stdio.h>
5
6#if defined (__STDC__)
7#include <stdlib.h>
8#endif
9
10#include "P_.h"
11#include "astro.h"
12#include "circum.h"
13#include "preferences.h"
14
15static int prefs[NPREFS] = {
16 PREF_TOPO, PREF_METRIC, PREF_MDY, PREF_UTCTZ, PREF_HIPREC, PREF_NOMSGBELL,
17 PREF_PREFILL, PREF_TIPSON, PREF_CONFIRMON, PREF_WEEKSTART
18};
19
20/* called anytime we want to know a preference.
21 */
22int
23pref_get(pref)
24Preferences pref;
25{
26 return (prefs[pref]);
27}
28
29/* call to force a certain preference, return the old setting.
30 */
31int
32pref_set (pref, new)
33Preferences pref;
34int new;
35{
36 int prior = pref_get(pref);
37 prefs[pref] = new;
38 return (prior);
39}
40
41/* given an mjd, return it modified for terrestial dynamical time */
42double
43mm_mjed (np)
44Now *np;
45{
46 return (mjd + deltat(mjd)/86400.0);
47}
48
49/* For RCS Only -- Do Not Edit */
50static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2001-10-22 12:08:26 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.