Index: /trunk/Ohana/src/skycalc/Makefile
===================================================================
--- /trunk/Ohana/src/skycalc/Makefile	(revision 3262)
+++ /trunk/Ohana/src/skycalc/Makefile	(revision 3263)
@@ -22,4 +22,6 @@
 
 install: $(DESTINC)/skycalc.h $(DESTLIB)/libskycalc.a
+
+all: moondata dusktime sundata
 
 OBJ = 	$(SRC)/time.$(ARCH).o		$(SRC)/geometry.$(ARCH).o \
Index: /trunk/Ohana/src/skycalc/include/skycalc_internal.h
===================================================================
--- /trunk/Ohana/src/skycalc/include/skycalc_internal.h	(revision 3262)
+++ /trunk/Ohana/src/skycalc/include/skycalc_internal.h	(revision 3263)
@@ -90,2 +90,15 @@
        double *topora, double *topodec, double *topodist);
 double jd_moon_alt (double alt, double jdguess, double lat, double longit, double elevsea);
+
+double sunset_tonight (struct SC_date_time date, double lat, double longit, double elev);
+double sunrise_tonight (struct SC_date_time date, double lat, double longit, double elev);
+
+int dms_to_ddd (double *Value, char *string);
+int str_to_radec (double *ra, double *dec, char *str1, char *str2);
+int chk_time (char *line);
+double sec_to_jd (time_t second);
+time_t jd_to_sec (double jd);
+char *sec_to_date (time_t second);
+time_t date_to_sec (char *date);
+int str_to_time (char *line, time_t *second);
+int str_to_dtime (char *line, double *second);
Index: /trunk/Ohana/src/skycalc/src/dusktime.c
===================================================================
--- /trunk/Ohana/src/skycalc/src/dusktime.c	(revision 3262)
+++ /trunk/Ohana/src/skycalc/src/dusktime.c	(revision 3263)
@@ -2,4 +2,5 @@
 # include <math.h>
 # include <skycalc_internal.h>
+# define VERBOSE 0
 
 void set_site (double *longit, double *lat, double *elevsea, double *elev) {
@@ -17,5 +18,5 @@
   double longit, lat, elevsea, elev;
   double jdnow, jdset, jdrise, d1, d2;
-  unsigned long int tzero;
+  time_t tzero;
   struct tm *stm;
 
@@ -37,7 +38,5 @@
   date.s  = (float) (stm->tm_sec);
 
-  /*
-  fprintf (stderr, "%4d/%02d/%02d %02d:%02d:%02f\n", date.y, date.mo, date.d, date.h, date.mn, date.s);
-  */
+  if (VERBOSE) fprintf (stderr, "%4d/%02d/%02d %02d:%02d:%02f\n", date.y, date.mo, date.d, date.h, date.mn, date.s);
 
   set_site (&longit, &lat, &elevsea, &elev);
@@ -59,10 +58,9 @@
   }    
 
-  /*
-  jd_to_date (jdnow, &tmpdate);
-  fprintf (stderr, "%4d/%02d/%02d %02d:%02d:%02f\n", tmpdate.y, tmpdate.mo, tmpdate.d, tmpdate.h, tmpdate.mn, tmpdate.s);
-  */
+  if (VERBOSE) {
+    jd_to_date (jdnow, &tmpdate);
+    fprintf (stderr, "%4d/%02d/%02d %02d:%02d:%02f\n", tmpdate.y, tmpdate.mo, tmpdate.d, tmpdate.h, tmpdate.mn, tmpdate.s);
+  }
   exit (0);
-
 }
 
Index: /trunk/Ohana/src/skycalc/src/misc.c
===================================================================
--- /trunk/Ohana/src/skycalc/src/misc.c	(revision 3262)
+++ /trunk/Ohana/src/skycalc/src/misc.c	(revision 3263)
@@ -1,12 +1,5 @@
 # include <ohana.h>
-
-int dms_to_ddd (double *Value, char *string);
-int str_to_radec (double *ra, double *dec, char *str1, char *str2);
-int chk_time (char *line);
-double sec_to_jd (unsigned long second);
-unsigned long int jd_to_sec (double jd);
-char *sec_to_date (unsigned long second);
-unsigned long date_to_sec (char *date);
-  
+# include <skycalc_internal.h>
+
 /***** convert [-]00:00:00 to 0.0000 ****/
 int dms_to_ddd (double *Value, char *string) {
@@ -133,5 +126,5 @@
 
 /**********/
-int str_to_time (char *line, unsigned int *second) {
+int str_to_time (char *line, time_t *second) {
   
   struct timeval now;
@@ -201,5 +194,5 @@
 
 /**********/
-double sec_to_jd (unsigned long second) {
+double sec_to_jd (time_t second) {
 
   double jd;
@@ -210,7 +203,7 @@
 
 /**********/
-unsigned long int jd_to_sec (double jd) {
-
-  unsigned long int second;
+time_t jd_to_sec (double jd) {
+
+  time_t second;
 
   second = (jd - 2440587.5)*86400;
@@ -219,5 +212,5 @@
 
 /**********/
-char *sec_to_date (unsigned long second) {
+char *sec_to_date (time_t second) {
   
   struct tm *gmt;
@@ -232,7 +225,7 @@
 
 /***** date in format yyyy/mm/dd,hh:mm:ss *****/
-unsigned long date_to_sec (char *date) {
-  
-  unsigned long second;
+time_t date_to_sec (char *date) {
+  
+  time_t second;
   double tmp, jd;
   struct tm now;
Index: /trunk/Ohana/src/skycalc/src/moondata.c
===================================================================
--- /trunk/Ohana/src/skycalc/src/moondata.c	(revision 3262)
+++ /trunk/Ohana/src/skycalc/src/moondata.c	(revision 3263)
@@ -25,5 +25,5 @@
   double RAo, DECo, abx, aby, abz, cs, theta;
   double Rsun, Dsun, days;
-  unsigned long int tzero;
+  time_t tzero;
   struct tm *stm;
 
Index: /trunk/Ohana/src/skycalc/src/sundata.c
===================================================================
--- /trunk/Ohana/src/skycalc/src/sundata.c	(revision 3262)
+++ /trunk/Ohana/src/skycalc/src/sundata.c	(revision 3263)
@@ -27,5 +27,5 @@
   double RAo, DECo, abx, aby, abz, cs, theta;
   double Rsun, Dsun, days, Hsun;
-  unsigned long int tzero;
+  time_t tzero;
   struct tm *stm;
 
