| 
            Last change
 on this file since 3444 was             3111, checked in by cmv, 19 years ago           | 
        
        
          | 
             
mise en conformite xephem 3.7.2    cmv 22/11/2006 
 
           | 
        
        
          | 
            File size:
            963 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [1457] | 1 | /* aux functions so programs besides XEphem can use this library.
 | 
|---|
 | 2 |  */
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | #include <stdio.h>
 | 
|---|
 | 5 | #include <stdlib.h>
 | 
|---|
 | 6 | 
 | 
|---|
 | 7 | #include "astro.h"
 | 
|---|
 | 8 | #include "preferences.h"
 | 
|---|
 | 9 | 
 | 
|---|
| [2551] | 10 | /* default preferences */
 | 
|---|
| [1457] | 11 | static int prefs[NPREFS] = {
 | 
|---|
 | 12 |     PREF_TOPO, PREF_METRIC, PREF_MDY, PREF_UTCTZ, PREF_HIPREC, PREF_NOMSGBELL,
 | 
|---|
| [2551] | 13 |     PREF_PREFILL, PREF_TIPSON, PREF_CONFIRMON, PREF_SUN
 | 
|---|
| [1457] | 14 | };
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | /* called anytime we want to know a preference.
 | 
|---|
 | 17 |  */
 | 
|---|
 | 18 | int
 | 
|---|
| [2551] | 19 | pref_get(Preferences pref)
 | 
|---|
| [1457] | 20 | {
 | 
|---|
 | 21 |         return (prefs[pref]);
 | 
|---|
 | 22 | }
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | /* call to force a certain preference, return the old setting.
 | 
|---|
 | 25 |  */
 | 
|---|
 | 26 | int
 | 
|---|
| [2551] | 27 | pref_set (Preferences pref, int newp)
 | 
|---|
| [1457] | 28 | {
 | 
|---|
 | 29 |         int prior = pref_get(pref);
 | 
|---|
| [2551] | 30 |         prefs[pref] = newp;
 | 
|---|
| [1457] | 31 |         return (prior);
 | 
|---|
 | 32 | }
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 | /* given an mjd, return it modified for terrestial dynamical time */
 | 
|---|
 | 35 | double
 | 
|---|
| [2551] | 36 | mm_mjed (Now *np)
 | 
|---|
| [1457] | 37 | {
 | 
|---|
 | 38 |         return (mjd + deltat(mjd)/86400.0);
 | 
|---|
 | 39 | }
 | 
|---|
 | 40 | 
 | 
|---|
 | 41 | /* For RCS Only -- Do Not Edit */
 | 
|---|
| [3111] | 42 | static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2006-11-22 13:53:28 $ $Revision: 1.6 $ $Name: not supported by cvs2svn $"};
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.