aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-10-06 14:54:42 +0200
committerMattias Andrée <maandree@kth.se>2019-10-06 14:54:42 +0200
commitf5b396dd73ea28506286e0be09d5e76e802222a2 (patch)
treecfc285a83639e78858d954cf82815cefe10a55ce /man
parentClean up (diff)
downloadlibred-f5b396dd73ea28506286e0be09d5e76e802222a2.tar.gz
libred-f5b396dd73ea28506286e0be09d5e76e802222a2.tar.bz2
libred-f5b396dd73ea28506286e0be09d5e76e802222a2.tar.xz
Simplify
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libred.7 (renamed from man/libred.7)4
-rw-r--r--libred.h.0 (renamed from man/libred.h.0)24
-rw-r--r--libred_check_timetravel.3 (renamed from man/libred_check_timetravel.3)22
-rw-r--r--man/libred_get_colour.374
-rw-r--r--man/libred_init_colour.341
-rw-r--r--man/libred_solar_elevation.348
-rw-r--r--man/libred_term_colour.333
7 files changed, 12 insertions, 234 deletions
diff --git a/man/libred.7 b/libred.7
index a5a6f36..0e0b6b9 100644
--- a/man/libred.7
+++ b/libred.7
@@ -5,9 +5,7 @@ libred \- Solar elevation and blackbody colour calculation
.B libred
is a C library for calculating the Sun's apparent elevation
and colours temperatures.
-.SH "FUTURE DIRECTIONS"
-None.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR libred.h (0),
.BR solar-python (7),
.BR redshift (1),
diff --git a/man/libred.h.0 b/libred.h.0
index 95a5144..c3aa853 100644
--- a/man/libred.h.0
+++ b/libred.h.0
@@ -122,31 +122,9 @@ This header defines the following functions:
.BR libred_check_timetravel (3)
.TP
*
-.BR libred_init_colour (3)
-.TP
-*
-.BR libred_term_colour (3)
-.TP
-*
.BR libred_get_colour (3)
-.PP
-This header may define
-.B extern int libred_fd
-iff it does it also defines the macro
-.BR LIBRED_HAVE_FD .
-If it does, you want to keep this file descriptor open when you daemonise
-your process. It is set by
-.BR libred_init_colour (3)
-and unset by
-.BR libred_term_colour (3).
-It value is negative (more precisely it is -1) if no file descriptor has
-been opened.
-.SH "FUTURE DIRECTIONS"
-None.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR libred (7),
.BR libred_solar_elevation (3),
.BR libred_check_timetravel (3),
-.BR libred_init_colour (3),
-.BR libred_term_colour (3),
.BR libred_get_colour (3)
diff --git a/man/libred_check_timetravel.3 b/libred_check_timetravel.3
index 1d34d39..cf79cd2 100644
--- a/man/libred_check_timetravel.3
+++ b/libred_check_timetravel.3
@@ -11,8 +11,9 @@ int \fBlibred_check_timetravel\fP(void);
Link with
.IR -lred .
.SH DESCRIPTION
-.B libred_check_timetravel
-exits the process if
+The
+.BR libred_check_timetravel ()
+function exits the process if
.B libred
is not compiled to support the current time, which is the case
if it was compiled without
@@ -20,19 +21,16 @@ if it was compiled without
and the clock is before year 2000.5 in the Julian calendar. Before
exiting, the function will print an informative error message to
standard error.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
Upon successful completion, without time incompatibility, the function
-returns 0. Upon failure, that is, it is unable to read the clock, the
-function returns -1.
+.BR libred_check_timetravel ()
+returns 0. On failure, the function returns -1 and sets
+.I errno
+to indicate the error.
.SH ERRORS
The function may fail for any reason specified for
-.BR clock_gettime (3),
-and set the value of
-.B errno
-to the same values.
-.SH "FUTURE DIRECTIONS"
-None.
-.SH "SEE ALSO"
+.BR clock_gettime (3).
+.SH SEE ALSO
.BR libred.h (0),
.BR libred (7),
.BR libred_solar_elevation (3)
diff --git a/man/libred_get_colour.3 b/man/libred_get_colour.3
deleted file mode 100644
index fd32eb3..0000000
--- a/man/libred_get_colour.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH LIBRED_GET_COLOUR 3 LIBRED
-.SH NAME
-libred_get_colour \- Calculate a colour temperature
-.SH SYNOPSIS
-.nf
-#include <libred.h>
-
-int \fBlibred_get_colour\fP(long int \fItemp\fP, double* \fIr\fP, double* \fIg\fP, double* \fIb\fP);
-.fi
-.PP
-Link with
-.IR -lred .
-.SH DESCRIPTION
-.B libred_get_colour
-gets or interpolates the colour temperature for
-.I temp
-kelvins, and returns the colour temperature in sRGB. The values,
-between 0.0 and 1.0, for the "red", green, and blue channels
-are stored in
-.IR *r ,
-.IR *g ,
-and
-.IR *b ,
-respectively.
-.PP
-At least one of the values will be 1.0, none will be greater than
-1.0, and none will be less than 0.0. It is guaranteed (unless the
-resources file has been modified) that
-.IR *r ,
-.IR *g ,
-and
-.I *b
-all will be 1.0 if
-.I temp
-is 6500.
-.PP
-You must call
-.BR libred_init_colour (3)
-before the first use of this function,
-and you should call
-.BR libred_term_colour (3)
-after the last use of this function.
-.SH "RETURN VALUE"
-Upon successful completion, the function returns 0. On failure,
-the function returns -1 and sets
-.B errno
-appropriately.
-.SH ERRORS
-The function may fail if:
-.TP
-.B EOVERFLOW
-The colour temperature lookup table is smaller than it should be.
-.TP
-.B EDOM
-If
-.I temp
-is less than
-.B LIBRED_LOWEST_TEMPERATURE
-(which is 1000.)
-.PP
-The function may also fail for any reason specified for
-.BR pread (3),
-and set the value of
-.B errno
-to the same values.
-.SH "FUTURE DIRECTIONS"
-It is possible that the behaviour is changed to loading the
-colour temperature lookup table rather than just open a
-file descriptor to it.
-.SH "SEE ALSO"
-.BR libred.h (0),
-.BR libred (7),
-.BR libred_init_colour (3),
-.BR libred_term_colour (3)
diff --git a/man/libred_init_colour.3 b/man/libred_init_colour.3
deleted file mode 100644
index 9463245..0000000
--- a/man/libred_init_colour.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH LIBRED_INIT_COLOUR 3 LIBRED
-.SH NAME
-libred_init_colour \- Prepare for use of libred_get_colour(3)
-.SH SYNOPSIS
-.nf
-#include <libred.h>
-
-int \fBlibred_init_colour\fP(void);
-.fi
-.PP
-Link with
-.IR -lred .
-.SH DESCRIPTION
-.B libred_init_colour
-open a file descriptor, without returning it, to the colour
-temperature lookup table, and stores the file descriptor to
-.BR libred_fd .
-It is necessary to call this function before the first call to
-.BR libred_get_colour (3).
-.SH "RETURN VALUE"
-Upon successful completion, the function returns 0. On failure,
-the function returns -1 and sets
-.B errno
-appropriately.
-.SH ERRORS
-The function may fail for any reason specified for
-.BR open (3),
-and set the value of
-.B errno
-to the same values.
-.B errno
-is always set to 0 on success.
-.SH "FUTURE DIRECTIONS"
-It is possible that the behaviour is changed to loading the
-colour temperature lookup table rather than just open a
-file descriptor to it.
-.SH "SEE ALSO"
-.BR libred.h (0),
-.BR libred (7),
-.BR libred_get_colour (3),
-.BR libred_term_colour (3)
diff --git a/man/libred_solar_elevation.3 b/man/libred_solar_elevation.3
deleted file mode 100644
index 7fd499f..0000000
--- a/man/libred_solar_elevation.3
+++ /dev/null
@@ -1,48 +0,0 @@
-.TH LIBRED_SOLAR_ELEVATION 3 LIBRED
-.SH NAME
-libred_solar_elevation \- Calculate the Sun's apparent elevation
-.SH SYNOPSIS
-.nf
-#include <libred.h>
-
-double \fBlibred_solar_elevation\fP(double \fIlatitude\fP, double \fIlongitude\fP);
-.fi
-.PP
-Link with
-.IR -lred .
-.SH DESCRIPTION
-.B libred_solar_elevation
-calculates the Sun's elevation as apparent from a select geographical position.
-Namely from
-.I latitude
-degrees north of GPS's equator and
-.I longitude
-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
-.IR longitude .
-Other values may or may not work, no error is thrown if used.
-.SH "RETURN VALUE"
-Upon successful completion, the function sets
-.B errno
-to 0 and returns the Sun's current apparent elevation, measured in
-degrees above the horizon. On failure, the function returns an
-arbitrary value (happens to always be 0.0) and sets
-.B errno
-an a non-zero value.
-.SH ERRORS
-The function may fail for any reason specified for
-.BR clock_gettime (3),
-and set the value of
-.B errno
-to the same values.
-.B errno
-is always set to 0 on success.
-.SH "FUTURE DIRECTIONS"
-None.
-.SH "SEE ALSO"
-.BR libred.h (0),
-.BR libred (7),
-.BR libred_check_timetravel (3),
-.BR libred_init_colour (3)
diff --git a/man/libred_term_colour.3 b/man/libred_term_colour.3
deleted file mode 100644
index 6d327c2..0000000
--- a/man/libred_term_colour.3
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH LIBRED_TERM_COLOUR 3 LIBRED
-.SH NAME
-libred_term_colour \- Deallocate resources required by libred_get_colour(3)
-.SH SYNOPSIS
-.nf
-#include <libred.h>
-
-void \fBlibred_term_colour\fP(void);
-.fi
-.PP
-Link with
-.IR -lred .
-.SH DESCRIPTION
-.B libred_term_colour
-deallocates all resources acquired by
-.BR libred_init_colour (3).
-It is highly recommended to call this function before calling an
-.BR exec (3)-function.
-If you want to use
-.BR libred_get_colour (3)
-again after a call to this function has been made, you must first call
-.BR libred_init_colour (3).
-.SH "RETURN VALUE"
-None.
-.SH ERRORS
-None.
-.SH "FUTURE DIRECTIONS"
-None.
-.SH "SEE ALSO"
-.BR libred.h (0),
-.BR libred (7),
-.BR libred_get_colour (3),
-.BR libred_init_colour (3)