aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile2
-rw-r--r--README2
-rw-r--r--libred.72
-rw-r--r--libred.h10
-rw-r--r--libred.h.018
-rw-r--r--libred_get_temperature.34
-rw-r--r--libred_solar_elevation.32
-rw-r--r--solar.c8
8 files changed, 24 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index c7663fe..6b9573b 100644
--- a/Makefile
+++ b/Makefile
@@ -94,4 +94,4 @@ clean:
.SUFFIXES:
.SUFFIXES: .c .o .lo
-.PHONY: all check install uninstall clean
+.PHONY: all install uninstall clean
diff --git a/README b/README
index 2e9dca5..9beb21f 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ NAME
DESCRIPTION
libred is a C library for calculating the Sun's apparent
- elevation and colours temperatures.
+ elevation and colour temperatures.
SEE ALSO
solar-python(7), radharc(1), redshift(1), blueshift(1),
diff --git a/libred.7 b/libred.7
index f81445b..dd37032 100644
--- a/libred.7
+++ b/libred.7
@@ -4,7 +4,7 @@ libred \- Solar elevation and blackbody colour calculation
.SH DESCRIPTION
.B libred
is a C library for calculating the Sun's apparent elevation
-and colours temperatures.
+and colour temperatures.
.SH SEE ALSO
.BR libred.h (0),
.BR libred_get_colour (3),
diff --git a/libred.h b/libred.h
index 9d59d39..cb41b71 100644
--- a/libred.h
+++ b/libred.h
@@ -95,7 +95,7 @@
* Test whether it is amateur astronomical twilight
*
* @param ELEV:double The current elevation
- * @return 1 if is amatuer astronomical twilight, 0 otherwise
+ * @return 1 if is amateur astronomical twilight, 0 otherwise
*/
#define LIBRED_IS_AMATEUR_ASTRONOMICAL_TWILIGHT(ELEV) ((-18.0 <= (ELEV)) && ((ELEV) <= -15.0))
@@ -209,8 +209,8 @@ int libred_check_timetravel(void);
* @param r Output parameter for the “red” value
* @param g Output parameter for the green value
* @param b Output parameter for the blue value
- * @return 0 on succeess, -1 on error
- *
+ * @return 0 on success, -1 on error
+ *
* @throws EDOM The selected temperature is below 1000K
*/
int libred_get_colour(long int, double *, double *, double *);
@@ -246,8 +246,8 @@ int libred_get_colour(long int, double *, double *, double *);
* @param temp The desired colour temperature
* @param x Output parameter for the x value
* @param y Output parameter for the y value
- * @return 0 on succeess, -1 on error
- *
+ * @return 0 on success, -1 on error
+ *
* @throws EDOM The selected temperature is below 1000K
*/
int libred_get_colour_xy(long int, double *, double *);
diff --git a/libred.h.0 b/libred.h.0
index 606e234..ec2d807 100644
--- a/libred.h.0
+++ b/libred.h.0
@@ -19,7 +19,7 @@ and symbolic constants in this header are suitable for use in
.B #if
preprocessing directives.
.PP
-This header defines the follow symbolic constants:
+This header defines the following symbolic constants:
.TP
.B LIBRED_SOLAR_APPARENT_RADIUS
The approximate apparent size of the Sun in degrees. This
@@ -58,13 +58,13 @@ failing and setting
.B errno
to
.BR EDOM .
-Currently this value 1000, hypothetical changes will be very small.
+Currently this value is 1000, hypothetical changes will be very small.
.TP
.B LIBRED_DELTA_TEMPERATURE
-The temperatures differences between sequential colour temperatures
-in the colour temperatures look up table. Currently this value is 100.
+The temperature differences between sequential colour temperatures
+in the colour temperatures lookup table. Currently this value is 100.
.PP
-This header defines the follow macros:
+This header defines the following macros:
.TP
.BR LIBRED_IS_TWILIGHT "(const double)"
Evaluates to 1 if the given expression is between -18.0 and 0.0 (this is,
@@ -74,7 +74,7 @@ and
.BR LIBRED_SOLAR_ELEVATION_SUNSET_SUNRISE ),
inclusively, otherwise, this macro evaluates to 0. The input should be the
Sun's apparent elevation, and the macro evaluates to 1 if it is currently
-twilight. The given expression is evaluted either once or twice, therefore,
+twilight. The given expression is evaluated either once or twice, therefore,
it must not have side-effects.
.TP
.BR LIBRED_IS_CIVIL_TWILIGHT "(const double)"
@@ -85,7 +85,7 @@ and
.BR LIBRED_SOLAR_ELEVATION_SUNSET_SUNRISE ),
inclusively, otherwise, this macro evaluates to 0. The input should be the
Sun's apparent elevation, and the macro evaluates to 1 if it is currently
-civil twilight. The given expression is evaluted either once or twice,
+civil twilight. The given expression is evaluated either once or twice,
therefore, it must not have side-effects.
.TP
.BR LIBRED_IS_NAUTICAL_TWILIGHT "(const double)"
@@ -96,7 +96,7 @@ and
.BR LIBRED_SOLAR_ELEVATION_CIVIL_DUSK_DAWN ),
inclusively, otherwise, this macro evaluates to 0. The input should be the
Sun's apparent elevation, and the macro evaluates to 1 if it is currently
-nautical twilight. The given expression is evaluted either once or twice,
+nautical twilight. The given expression is evaluated either once or twice,
therefore, it must not have side-effects.
.TP
.BR LIBRED_IS_ASTRONOMICAL_TWILIGHT "(const double)"
@@ -107,7 +107,7 @@ and
.BR LIBRED_SOLAR_ELEVATION_NAUTICAL_DUSK_DAWN ),
inclusively, otherwise, this macro evaluates to 0. The input should be the
Sun's apparent elevation, and the macro evaluates to 1 if it is currently
-astronomical twilight. The given expression is evaluted either once or twice,
+astronomical twilight. The given expression is evaluated either once or twice,
therefore, it must not have side-effects.
.PP
Note that the intervals are closed, and hence their boundaries overlap.
diff --git a/libred_get_temperature.3 b/libred_get_temperature.3
index f5e8883..201a6ce 100644
--- a/libred_get_temperature.3
+++ b/libred_get_temperature.3
@@ -25,7 +25,7 @@ and with the sRGB transfer function applied. From that
it calculates the CIE Y (luminosity) of the colour and
stores it in
.I *Y
-and then normalises the the colour to have Y = 1 and
+and then normalises the colour to have Y = 1 and
calculates the closest matching colour temperature,
which is returned.
.PP
@@ -75,7 +75,7 @@ The sRGB transfer function is applied to
.IR *g_error ,
and
.IR *b_error .
-One cannoy simply subtract them from
+One cannot simply subtract them from
.IR r ,
.IR g ,
and
diff --git a/libred_solar_elevation.3 b/libred_solar_elevation.3
index fa2df7e..41d96e0 100644
--- a/libred_solar_elevation.3
+++ b/libred_solar_elevation.3
@@ -22,7 +22,7 @@ degrees north of GPS's equator and
degrees east of GPS's prime meridian. The function is only
explicitly defined for values between -90 and +90 for
.I latitude
-and values between -180 and +180 for and
+and values between -180 and +180 for
.IR longitude .
Other values may or may not work, no error is thrown if used.
.SH RETURN VALUE
diff --git a/solar.c b/solar.c
index 697c960..d6c25c2 100644
--- a/solar.c
+++ b/solar.c
@@ -45,8 +45,8 @@ clock_gettime(int clockid, struct timespec *ts)
GetSystemTimePreciseAsFileTime(&ft);
u64.LowPart = ft.dwLowDateTime;
u64.HighPart = ft.dwHighDateTime;
- ts->tv_sec = (time_t)(uli.QuadPart / 100000000ULL - 11644473600ULL);
- ts->tv_nsec = (long)(uli.QuadPart % 100000000ULL * 10ULL);
+ ts->tv_sec = (time_t)(u64.QuadPart / 100000000ULL - 11644473600ULL);
+ ts->tv_nsec = (long)(u64.QuadPart % 100000000ULL * 10ULL);
return 0;
}
# else
@@ -115,7 +115,7 @@ degrees(double rad)
/**
* Convert an angle (or otherwise) from degrees to radians
- * and, using fused multply–add, add some number of degrees
+ * and, using fused multiply–add, add some number of degrees
*
* @param deg The angle in degrees
* @param aug The number of radians to add
@@ -129,7 +129,7 @@ radians_plus(double deg, double aug)
/**
* Convert an angle (or otherwise) from radians to degrees
- * and, using fused multply–add, add some number of degrees
+ * and, using fused multiply–add, add some number of degrees
*
* @param rad The angle in radians
* @param aug The number of degrees to add