shithub: scc

Download patch

ref: 2c5529c39770df644545efe7a75eede147b52b90
parent: eee59735a33ca030a5787eec69d494ee143e81dd
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Sep 16 16:53:33 EDT 2021

doc: Import libc man pages

These man pages were generated by the scc team
out of the public source tree.

diff: cannot open b/doc/man1//null: file does not exist: 'b/doc/man1//null' diff: cannot open b/doc/man3//null: file does not exist: 'b/doc/man3//null'
--- /dev/null
+++ b/doc/man1/scc.1
@@ -1,0 +1,154 @@
+.TH SCC 1 scc\-VERSION
+.SH NAME
+scc \- simple C compiler with magic
+.SH SYNOPSIS
+.B scc
+.RB [ \-cdgkqQsWw ]
+.RB [ \-M | \-E | \-S ]
+.RB [ \-D
+.IR def[=val] ] ...
+.RB [ \-I
+.IR dir ] ...
+.RB [ \-L
+.IR dir ] ...
+.RB [ \-U
+.IR def ] ...
+.RB [ \-l
+.IR lib ]
+.RB [ \-m
+.IR arch ]
+.RB [ \-o
+.IR outfile ]
+.RB [ \-O
+.IR level ]
+.RB [ \-t
+.IR sys ]
+.RB sourcefile ...
+.SH DESCRIPTION
+.B scc
+is a simple C compiler which takes several
+.I sourcefiles
+and compiles them to an executable. The default output file is
+.B a.out,
+which can be changed by defining some
+.I outfile.
+.SH OPTIONS
+.TP
+.B \-c
+Do not run the linker.
+.TP
+.B \-d
+Do output internal tool messages.
+.TP
+.BI \-D " define[=value]"
+Specify a
+.I define
+for the preprocessor.
+.TP
+.B \-E
+Stop after the preprocessing stage, do not run the compiler and output the then
+resulting source.
+.TP
+.B \-g
+Do generate debug information.
+.TP
+.BI \-I " directory"
+Define a include
+.I directory
+to get header files from. This directory is searched for before standard
+include directories.
+.TP
+.B \-k
+Do keep temporary objects.
+.TP
+.BI \-l " library"
+Link against this 
+.I library.
+.TP
+.BI \-L " directory"
+Define a library
+.I directory
+to resolve dependencies from. This directory is used before the standard
+paths.
+.TP
+.BI \-m " architecture"
+Define the
+.I architecture
+to compile for (i.e. amd64, i386 ...).
+.TP
+.B \-M
+Output a rule for 
+.B make
+describing the dependencies of the main source file.
+.TP
+.BI \-o " outfile"
+Define the name of the
+.I outfile.
+.TP
+.BI \-O " level"
+Define the optimisation
+.I level
+to compile with. (This is a stub for compatibility reasons.)
+.TP
+.B \-q
+Do not use
+.I QBE.
+.TP
+.B \-Q
+Do use the
+.I QBE.
+.TP
+.B \-s
+Strip all symbol tables and relocation information from the resulting executable.
+.TP
+.B \-S
+Stop after the compilation stage, do not assemble and output the assembler
+source.
+.TP
+.BI \-t " system"
+Define the
+.I system
+to compile for (i.e. linux, openbsd ...).
+.TP
+.BI \-U " define"
+Undefine a previously defined
+.I define
+by the -D parameter.
+.TP
+.B \-W
+Show warning messages.
+.TP
+.B \-w
+Do not show warning messages (default).
+.SH ENVIRONMENT VARIABLES
+Certain environment variables control the behaviour of scc.
+.TP
+.B ARCH
+defines the
+.I architecture
+to compile for (i.e. amd64, i386 ...).
+.TP
+.B SYS
+defines the
+.I system
+to compile for (i.e. linux, openbsd ...).
+.TP
+.B ABI
+defines the
+.I application binary interface
+to compile for (i.e. sysv ...).
+.TP
+.B FORMAT
+defines the format of the output executable.
+.TP
+.B SCCPREFIX
+defines the path prefix scc will search the scc suite in.
+.SH AUTHORS
+See the LICENSE file for the authors.
+.SH LICENSE
+See the LICENSE file for the terms of redistribution.
+.SH SEE ALSO
+.BR scpp (1),
+.BR make (1)
+.SH BUGS
+See the TODO file in the distribution.
--- /dev/null
+++ b/doc/man3/clock.3
@@ -1,0 +1,21 @@
+.TH CLOCK 3
+.SH NAME
+clock - determine processor time
+.SH SYNOPSIS
+#include <time.h>
+
+clock_t clock(void)
+.SH DESCRIPTION
+The
+.BR clock ()
+function returns an approximation of processor time used by the program.
+.SH RETURN VALUE
+The value returned is the CPU time used so far as a clock_t.
+In order to get the number of seconds used, divide by
+.BR CLOCKS_PER_SEC .
+If the processor time used is not available or its value cannot
+be represented, the function returns the value (clock_t)-1.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.23.2.1 Paragraph 1,2,3
+.SH SEE ALSO
+.BR time.h (3)
--- /dev/null
+++ b/doc/man3/ctime.3
@@ -1,0 +1,132 @@
+.TH CTIME 3
+.SH NAME
+asctime, ctime, gmtime, localtime, mktime - transform date and time to
+broken-down time
+.SH SYNOPSIS
+#include <time.h>
+
+.nf
+char *asctime(const struct tm *tm);
+char *ctime(const time_t *timep);
+struct tm *gmtime(const time_t *timep);
+struct tm *localtime(const time_t *timep);
+time_t mktime(struct tm *tm);
+.fi
+.SH DESCRIPTION
+The
+.BR ctime ,
+.B gmtime
+and
+.B localtime
+functions all take an argument of data type
+.BR time_t ,
+which represents calendar time.
+
+The
+.B asctime
+and
+.B mktime
+functions both takes an argument representing broken-down time,
+which is a representation separated into year, month, day and so on.
+
+Broken-down time is stored in the struct tm.
+
+The call
+.B ctime(t)
+is equivalent to
+.BR asctime(localtime(t)) .
+It converts the calendar time
+.I t
+into a null-terminated string of the form:
+
+	"Wed Jun 30 21:49:08 1993\\n\\0"
+
+In C locale, the abbreviations for the days of the week are
+"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", and "Sat";
+the abbreviations for the months are "Jan", "Feb", "Mar", "Apr",
+"May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", and "Dec".
+
+The
+.B gmtime
+function converts the calendar time
+.I timep
+into broken-down time representation, expressed as
+Coordinated Universal Time (UTC).
+It may return NULL if the specified time cannot be converted to UTC.
+
+The
+.B localtime
+function converts the calendar time
+.I timep
+to broken-down time representation,
+expressed relative to the user's specified timezone.
+
+The
+.B asctime
+function converts the broken-down time value
+.I tm
+into a null-terminated string with the same format as
+.B ctime
+function.
+
+The
+.B mktime
+function converts a broken-down time structure,
+expressed as local time, to calendar time representation.
+The function ignores
+the values supplied by the caller in the
+.B tm_wday
+and
+.B tm_yday
+fields and the original values of other fields
+are not restricted to the ranges indicated above.
+On successful completion, the values of
+.B tm_wday
+and
+.B tm_yday
+are set appropriately and the other components are set to represent
+the specified calendar time within their respective ranges.
+The final value of
+.B tm_mday
+is not set until
+.B tm_mon
+and
+.B tm_year
+are determined.
+
+.SH RETURN VALUE
+On success,
+.B gmtime
+and
+.B localtime
+functions return a pointer to a struct tm.
+
+On success,
+.B asctime
+and
+.B ctime
+functions return a pointer to a string.
+
+On success,
+.B mktime
+function returns the calendar time, expressed as a value of type
+.BR time_t .
+
+On error,
+.B mktime
+function returns the value
+.BR (time_t)-1 .
+The remaining functions return NULL on error.
+On error,
+.B errno
+is set to indicate the cause of the error.
+.SH STANDARDS
+.nf
+ISO/IEC 9899:1999 7.23.2.3 Paragraph 1,2,3
+ISO/IEC 9899:1999 7.23.3.1 Paragraph 1,2,3
+ISO/IEC 9899:1999 7.23.3.2 Paragraph 1,2,3
+ISO/IEC 9899:1999 7.23.3.3 Paragraph 1,2,3
+ISO/IEC 9899:1999 7.23.3.4 Paragraph 1,2,3
+.fi
+.SH SEE ALSO
+.BR time.h (3)
--- /dev/null
+++ b/doc/man3/difftime.3
@@ -1,0 +1,22 @@
+.TH DIFFTIME 3
+.SH NAME
+difftime - calculate time difference
+.SH SYNOPSIS
+#include <time.h>
+
+double difftime(time_t time1, time_t time0)
+.SH DESCRIPTION
+The
+.BR difftime ()
+function returns the difference (time1 - time0)
+between time
+.I time1
+and time
+.IR time0 .
+.SH RETURN VALUE
+The value returned is the number of seconds elapsed,
+represented as a double.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.23.2.2 Paragraph 1,2,3
+.SH SEE ALSO
+.BR time.h (3)
--- /dev/null
+++ b/doc/man3/locale.h.3
@@ -1,0 +1,171 @@
+.TH locale.h 3
+.SH NAME
+locale.h - category macros
+.SH SYNOPSIS
+#include <locale.h>
+
+The locale.h header declares the following functions:
+
+.nf
+char *setlocale(int category, const char *locale);
+struct lconv *localeconv(void);
+.fi
+.SH DESCRIPTION
+The locale.h header defines the following macros:
+
+.nf
+LC_ALL
+LC_COLLATE
+LC_CTYPE
+LC_MESSAGES
+LC_MONETARY
+LC_NUMERIC
+LC_TIME
+.fi
+
+These macros expand to integer constant expressions with distinct values,
+suitable for use as the first argument,
+.IR category ,
+to the
+.B setlocale
+function.
+
+The locale.h header declares the lconv structure defined as follows:
+
+.nf
+char *currency_symbol
+char *decimal_point
+char frac_digits
+char *grouping
+char *int_curr_symbol
+char int_frac_digits
+char int_n_cs_precedes
+char int_n_sep_by_space
+char int_n_sign_posn
+char int_p_cs_precedes
+char int_p_sep_by_space
+char int_p_sign_posn
+char *mon_decimal_point
+char *mon_grouping
+char *mon_thousands_sep
+char *negative_sign
+char n_cs_precedes
+char n_sep_by_space
+char n_sign_posn
+char *positive_sign
+char p_cs_precedes
+char p_sep_by_space
+char p_sign_posn
+char *thousands_sep
+.fi
+
+The members of the
+.I lconv
+structure are:
+.TP 10
+currency_symbol
+The local currency symbol applicable to the current locale.
+.TP
+decimal_point
+The decimal-point character used to format monetary quantities.
+.TP
+thousands_sep
+The character used to separate groups of digits
+before the decimal-point character in formatted monetary quantities.
+.TP
+grouping
+A string whose elements indicate the size of each group of digits in
+formatted nonmonetary quantities.
+.TP
+mon_decimal_point
+The decimal-point used to format monetary quantities.
+.TP
+mon_thousands_sep
+The separator for groups of digits before
+the decimal-point in formatted monetary quantities.
+.TP
+mon_grouping
+A string whose elements indicate the size of each group of digits in
+formatted monetary quantities.
+.TP
+positive_sign
+The string used to indicate a nonnegative-valued formatted monetary
+quantity.
+.TP
+negative_sign
+The string used to indicate a negative-valued formatted
+monetary quantity.
+.TP
+frac_digits
+The number of fractional digits (those after the decimal-point)
+to be displayed in a locally formatted monetary quantity.
+.TP
+p_cs_precedes
+Set to 1 or 0 if the currency_symbol respectively precedes or
+succeeds the value for a nonnegative locally formatted
+monetary quantity.
+.TP
+n_cs_precedes
+Set to 1 or 0 if the currency_symbol respectively precedes or
+succeeds the value for a negative locally formatted
+monetary quantity
+.TP
+p_sep_by_space
+Set to a value indicating the separation of the currency_symbol,
+the sign string, and the value for a nonnegative locally formatted
+monetary quantity.
+.TP
+n_sep_by_space
+Set to a value indicating the separation of the currency_symbol,
+the sign string, and the value for a negative locally formatted
+monetary quantity.
+.TP
+p_sign_posn
+Set to a value indicating the positioning of the positive_sign for
+a nonnegative locally formatted monetary quantity.
+.TP
+n_sign_posn
+Set to a value indicating the positioning of the negative_sign for
+a negative locally formatted monetary quantity.
+.TP
+int_curr_symbol
+The international currency symbol applicable to the current locale.
+.TP
+int_frac_digits
+The number of fractional digits (those after the decimal-point) to be
+displayed in an internationally formatted monetary quantity.
+.TP
+int_p_cs_precedes
+Set to 1 or 0 if the int_curr_symbol respectively precedes or
+succeeds the value for a nonnegative internationally formatted
+monetary quantity.
+.TP
+int_n_cs_precedes
+Set to 1 or 0 if the int_curr_symbol respectively precedes or
+succeeds the value for a negative internationally formatted
+monetary quantity.
+.TP
+int_p_sep_by_space
+Set to a value indicating the separation of the int_curr_symbol,
+the sign string, and the value for a nonnegative internationally
+formatted monetary quantity.
+.TP
+int_n_sep_by_space
+Set to a value indicating the separation of the int_curr_symbol,
+the sign string, and the value for a negative internationally
+formatted monetary quantity.
+.TP
+int_p_sign_posn
+Set to a value indicating the positioning of the positive_sign for
+a nonnegative internationally formatted monetary quantity.
+.TP
+int_n_sign_posn
+Set to a value indicating the positioning of the negative_sign for
+a negative internationally formatted monetary quantity.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.11
+
+ISO/IEC 9899:1999 Section 7.11.2.1
+.SH SEE ALSO
+.BR localeconv (3)
+.BR setlocale (3)
--- /dev/null
+++ b/doc/man3/localeconv.3
@@ -1,0 +1,31 @@
+.TH localeconv 3
+.SH NAME
+localeconv - get numeric formatting information
+.SH SYNOPSIS
+#include <locale.h>
+
+struct lconv *localeconv(void);
+.SH DESCRIPTION
+The
+.BR localeconv ()
+function is used to set
+the components of an object with type struct lconv
+with values appropriate for the formatting of numeric quantities
+according to the rules of the current locale and return a pointer to it.
+.SH RETURN VALUE
+The
+.B localeconv
+function returns a pointer to the filled-in object.
+The structure pointed to by the return value
+shall not be modified by the program,
+but may be overwritten by a subsequent call to the
+.B localeconv
+function.
+In addition, calls to
+.B setlocale
+function with categories LC_ALL, LC_MONETARY, or LC_NUMERIC
+may overwrite the contents of the structure.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.11.2.1 Paragraph 1,2,8
+.SH SEE ALSO
+.B locale.h(3)
--- /dev/null
+++ b/doc/man3/memchr.3
@@ -1,0 +1,32 @@
+.TH memchr 3
+.SH NAME
+memchr - find byte in memory
+.SH SYNOPSIS
+#include <string.h>
+
+void *memchr(const void *s, int c, size_t n)
+.SH DESCRIPTION
+The
+.BR memchr ()
+function locates the first occurence of
+.I c
+(converted to an unsigned char)
+in the initial
+.I n
+characters
+(each interpreted as unsigned char)
+of the object pointed to by
+.IR s .
+.PP
+The function shall not try to locate
+.I c
+if
+.I n
+is equal to 0.
+.SH RETURN VALUE
+The
+.BR memchr ()
+function shall return a pointer to the located character
+or a null pointer if the character does not occur in the object.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.1
--- /dev/null
+++ b/doc/man3/memcmp.3
@@ -1,0 +1,34 @@
+.TH MEMCMP 3
+.SH NAME
+memcmp - compare bytes in memory
+.SH SYNOPSIS
+#include <string.h>
+
+int memcmp (const void *s1, const void *s2, size_t n)
+.SH DESCRIPTION
+The
+.BR memcmp ()
+function compares the first
+.I n
+bytes of the object pointed to by
+.I s1
+to the first
+.I n
+bytes of the object pointed to by
+.IR s2 .
+The value returned shall be used to determine
+if an object is lexicographically greater than,
+lesser than or equal to another object.
+.SH RETURN VALUE
+The
+.BR memcmp ()
+function shall return an integer greater than,
+equal to, or lesser than 0,
+if the object pointed to by
+.I s1
+is greater than,
+equal to, or lesser than the object pointed to by
+.IR s2 ,
+respectively.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.4.1
--- /dev/null
+++ b/doc/man3/memcpy.3
@@ -1,0 +1,30 @@
+.TH memcpy 3
+.SH NAME
+memcpy - copy bytes in memory
+.SH SYNOPSIS
+#include <string.h>
+
+void *memcpy (void *restrict s1, const void *restrict s2, size_t n)
+.SH DESCRIPTION
+The
+.BR memcpy ()
+function copies the first
+.I n
+bytes of the object pointed to by
+.I s2
+into the object pointed to by
+.IR s1 .
+The function does not modify
+.I s1
+if
+.I n
+is equal to 0.
+If copying takes place between objects that overlap,
+the behavior is undefined.
+.SH RETURN VALUE
+The
+.BR memcpy ()
+function shall always return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.2.1
--- /dev/null
+++ b/doc/man3/memmove.3
@@ -1,0 +1,29 @@
+.TH memmove 3
+.SH NAME
+memmove - copy bytes in memory with overlapping areas
+.SH SYNOPSIS
+#include <string.h>
+
+void *memmove (void *s1, const void *s2, size_t n)
+.SH DESCRIPTION
+The
+.BR memmove ()
+function copies the first
+.I n
+bytes of the object pointed to by
+.I s2
+to the object pointed to by
+.IR s1 .
+The
+.BR memmove ()
+function facilitates copying between overlapping memory blocks.
+The function shall not copy anything if
+.I n
+is equal to 0.
+.SH RETURN VALUE
+The
+.BR memmove ()
+function shall return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.2.2
--- /dev/null
+++ b/doc/man3/memset.3
@@ -1,0 +1,29 @@
+.TH memset 3
+.SH NAME
+memset - set bytes in memory
+.SH SYNOPSIS
+#include <string.h>
+
+void *memset(void *s, int c, size_t n)
+.SH DESCRIPTION
+The
+.BR memset ()
+function copies the value of
+.I c
+(converted to an unsigned char)
+into each of the first
+.I n
+characters of the object
+pointed to by
+.IR s .
+.PP
+The function does not modify
+.I s
+if
+.I n
+is equal to 0.
+.SH RETURN VALUE
+The function shall return the value of
+.IR s .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.6.1
--- /dev/null
+++ b/doc/man3/setjmp.3
@@ -1,0 +1,71 @@
+.TH SETJMP 3
+.SH NAME
+setjmp - non-local jumps
+.SH SYNOPSIS
+#include <setjmp.h>
+
+.nf
+int setjmp(jmp_buf env)
+void longjmp(jmp_buf env, int val)
+.fi
+.SH DESCRIPTION
+The
+.BR setjmp ()
+function saves it calling environment in its argument
+.I env
+for later use by the
+.BR longjmp .
+
+The
+.BR longjmp ()
+function restores the environment saved
+by the most recent invocation of
+.B setjmp
+in the same invocation of the program
+with the corresponding
+.I env
+as argument.
+
+If there has been no such invocation,
+or if the function containing the invocation of
+.B setjmp
+has terminated execution,
+or if the invocation of
+.B setjmp
+was within the scope of an identifier with variably modified type
+and execution has left that scope in interim,
+the behavior is undefined.
+.SH RETURN VALUE
+If the return is from a direct invocation,
+.B setjmp
+shall return the value zero.
+If the return is from a call to
+.BR longjmp ,
+.B setjmp
+shall return a nonzero value.
+
+After the function
+.B longjmp
+is called,
+program execution continues as
+if the corresponding invocation of
+.B setjmp
+has just returned the value specified by
+.IR val .
+The function
+.B longjmp
+shall not cause the function
+.B setjmp
+to return the value 0.
+If
+.I val
+is set to 0,
+.B setjmp
+shall return the value 1.
+.SH STANDARDS
+.nf
+ISO/IEC 9899:1999 Section 7.13.1.1 Paragraph 1,2,3
+ISO/IEC 9899:1999 Section 7.13.2.1 Paragraph 1,2,3,4
+.fi
+.SH SEE ALSO
+.BR setjmp.h (3)
--- /dev/null
+++ b/doc/man3/setjmp.h.3
@@ -1,0 +1,32 @@
+.TH setjmp.h 3
+.SH NAME
+setjmp.h - non-local jumps
+.SH SYNOPSIS
+
+#include <setjmp.h>
+
+The setjmp.h header declares the following functions:
+
+.nf
+void longjmp(jmp_buf env, int val)
+int setjmp(jmp_buf env)
+.fi
+.SH DESCRIPTION
+The setjmp.h header defines the type
+
+.B jmp_buf
+
+It is an array type suitable for holding
+the information needed to restore a calling environment.
+The environment of a call to
+.B setjmp
+consists of information
+that is essential for a call to
+.B longjmp
+to return execution to the respective block,
+and the invocation of that block, were it called recursively.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.13.1 Paragraph 1,2,3
+.SH SEE ALSO
+.BR setjmp (3)
+.BR longjmp (3)
--- /dev/null
+++ b/doc/man3/setlocale.3
@@ -1,0 +1,63 @@
+.TH setlocale 3
+.SH NAME
+setlocale - set the current locale
+.SH SYNOPSIS
+#include <locale.h>
+
+char *setlocale(int category, const char *locale);
+.SH DESCRIPTION
+The
+.BR setlocale ()
+function is used to set or query the program's current locale.
+It can be used to set or query the locale entirely or partially.
+If
+.I locale
+is not NULL,
+the program's current locale is modified according to the arguments.
+The argument
+.I category
+determines which parts of the program's current locale
+should be modified.
+
+.nf
+Category   	Governs
+LC_ALL     	All of the locale
+LC_COLLATE 	String collation
+LC_CTYPE   	Character classification
+LC_MONETARY	Formatting of monetary values
+LC_NUMERIC 	Formatting of nonmonetary numeric values
+LC_TIME    	Formatting of date and time values
+.fi
+
+A value of
+.B C
+for
+.I locale
+specifies the minimum environment for C translation;
+a value of " " for
+.I locale
+specifies the locale-specific native environment.
+
+At program startup,
+.BR setlocale (LC_ALL,"C");
+is executed.
+.SH RETURN VALUE
+A pointer to the string associated with the specified
+.I category
+for the new
+.I locale
+is returned if it can be honored.
+A pointer to the string associated with the specified
+.I category
+for the current locale is returned if
+.I locale
+is NULL.
+The string returned is such that a subsequent call
+with that string value and its associated category
+will restore that part of the program's locale.
+The string pointed to shall not be modified by the program,
+but may be overwritten by a subsequent call to the setlocale function.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.11.1.1 Paragraph 1,2,3,4,6,7,8
+.SH SEE ALSO
+.B locale.h(3)
--- /dev/null
+++ b/doc/man3/strcat.3
@@ -1,0 +1,32 @@
+.TH strcat 3
+.SH NAME
+strcat - concatenate two strings
+.SH SYNOPSIS
+#include <string.h>
+
+char *strcat(char *restrict s1, const char *restrict s2)
+.SH DESCRIPTION
+The
+.BR strcat ()
+function appends a copy of the string
+pointed to by
+.I s2
+(including the terminating null character)
+to the end of the string pointed to by
+.IR s1 .
+.PP
+The initial character of
+.I s2
+overwrites the null character
+at the end of
+.I s1
+.PP
+If copying takes place between objects that overlap,
+the behaviour is undefined.
+.SH RETURN VALUE
+The
+.BR strcat ()
+function shall return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.3.1
--- /dev/null
+++ b/doc/man3/strchr.3
@@ -1,0 +1,23 @@
+.TH strchr 3
+.SH NAME
+strchr - find character in string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strchr(const char *s, int c)
+.SH DESCRIPTION
+The
+.BR strchr ()
+function locates the first occurence of
+.I c
+(converted to a char)
+in the string pointed to by
+.IR s .
+The terminating null character is considered to be part of the string.
+.SH RETURN VALUE
+The
+.BR strchr ()
+function shall return a pointer to the located character
+or a null pointer if the character does not occur in the string.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.2
--- /dev/null
+++ b/doc/man3/strcmp.3
@@ -1,0 +1,35 @@
+.TH strcmp 3
+.SH NAME
+strcmp - compare strings
+.SH SYNOPSIS
+#include <string.h>
+
+int strcmp(const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strcmp ()
+function compares the string
+pointed to by
+.I s1
+to the string pointed to by
+.IR s2 .
+.PP
+The value returned shall be used to determine
+if a string is lexicographically
+greater than, lesser than or equal to
+the other string.
+.PP
+The function shall not modify either of the strings.
+.SH RETURN VALUE
+The
+.BR strcmp ()
+function shall return an integer
+greater than, equal to or lesser than 0,
+if the string pointed to by
+.I s1
+is greater than, equal to or lesser than
+the string pointed to by
+.IR s2 ,
+respectively.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.4.2
--- /dev/null
+++ b/doc/man3/strcoll.3
@@ -1,0 +1,37 @@
+.TH strcoll 3
+.SH NAME
+strcoll - compare two strings using the current locale
+.SH SYNOPSIS
+#include <string.h>
+
+int strcoll (const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strcoll ()
+function compares the string
+pointed to by
+.I s1
+to the string pointed to by
+.IR s2 ,
+both interpreted
+as appropriate to the
+LC_COLLATE category of the current locale.
+.PP
+The value returned shall be used to determine
+if a string is lexicographically
+greater than, lesser than or equal to
+the other string,
+according to the current locale.
+.SH RETURN VALUE
+The
+.BR strcoll ()
+function shall return an integer
+greater than, equal to or lesser than 0,
+if the string pointed to by
+.I s1
+is greater than, equal to or lesser than
+the string pointed to by
+.IR s2 ,
+respectively.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.4.3
--- /dev/null
+++ b/doc/man3/strcpy.3
@@ -1,0 +1,25 @@
+.TH strcpy 3
+.SH NAME
+strcpy - copy a string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strcpy(char *restrict s1, const char *restrict s2)
+.SH DESCRIPTION
+The
+.BR strcpy ()
+function copies the string
+pointed to by
+.I s2
+(including the terminating null character)
+into the character array pointed to by
+.IR s1 .
+If copying takes place between objects that overlap,
+behaviour is undefined.
+.SH RETURN VALUE
+The
+.BR strcpy ()
+function shall return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.2.3
--- /dev/null
+++ b/doc/man3/strcspn.3
@@ -1,0 +1,23 @@
+.TH strcspn 3
+.SH NAME
+strcspn - get length of complementary substring
+.SH SYNOPSIS
+#include <string.h>
+
+size_t strcspn(const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strcspn ()
+function computes the length
+of the maximum initial segment
+of string pointed to by
+.I s1
+which consists entirely of characters
+not from the string pointed to by
+.IR s2 .
+.SH RETURN VALUE
+The
+.BR strcspn ()
+function shall return the length of the segment.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.3
--- /dev/null
+++ b/doc/man3/strerror.3
@@ -1,0 +1,29 @@
+.TH strerror 3
+.SH NAME
+strerror - get error message string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strerror(int errnum)
+.SH DESCRIPTION
+The
+.BR strerror ()
+function maps the number passed with errnum
+to a message string.
+.PP
+Typically, the values for
+.I errnum
+come from errno,
+but strerror shall map any value of type int to a message.
+.PP
+The array pointed to by the pointer returned
+shall not be modified by the program,
+but may be overwritten
+by a subsequent call to the
+.B strerror
+function.
+.SH RETURN VALUE
+The function returns a pointer to the string,
+the contents of which are locale-specific.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.6.2
--- /dev/null
+++ b/doc/man3/strftime.3
@@ -1,0 +1,314 @@
+.TH STRFTIME 3
+.SH NAME
+strftime - formats the broken-down time according to specified format
+.SH SYNOPSIS
+#include <time.h>
+
+.nf
+size_t strftime(char * restrict s,
+                size_t maxsize,
+                const char * restrict format,
+                const struct tm * restrict timeptr);
+.fi
+.SH DESCRIPTION
+The
+.BR strftime ()
+function places characters into the array pointed to by
+.I s
+as controlled by the string pointed to by
+.IR format .
+
+The
+.I format
+shall be a multibyte character sequence,
+beginning and ending in its initial shift state.
+The
+.I format
+shall consist of zero or more conversion specifiers and
+ordinary characters.
+A conversion specifier consists of a % character,
+possibly followed by an E or O modifier character,
+followed by a character that determines the behavior of the conversion
+specifier.
+All ordinary characters
+(including the terminating null character) are copied unchanged into the
+array.
+No more than
+.I maxsize
+characters are placed into the array.
+
+The format specification is a null-terminated string and
+shall contain special character sequences, called conversion specifiers,
+which get replaced with the appropriate characters as described in the
+following list:
+.TP
+.B %a
+The abbreviated name of the day of the week according to the current
+locale.
+.TP
+.B %A
+THe full name of the day of the week according to the current locale.
+.TP
+.B %b
+The abbreviated name of the month according to the current locale.
+.TP
+.B %B
+The full name of the month according to the current locale.
+.TP
+.B %c
+The preferred date and time representation for the current locale.
+.TP
+.B %C
+The decimal number representing the year divided by 100 and truncated
+to an integer (century number).
+.TP
+.B %d
+The day of the month as a decimal number between 01 and 31.
+.TP
+.B %D
+Equivalent to "%m/%d/%y"
+.TP
+.B %e
+The day of the month as a decimal number between 0 and 31;
+a single digit is preceded by a space.
+.TP
+.B %F
+Equivalent to "%y-%m-%d"
+(the ISO 8601 date format).
+.TP
+.B %G
+The ISO 8601 week-based-year with century as a decimal number.
+The 4-digit year corresponding to the ISO week number. (Calculated
+from
+.BR tm_year ,
+.BR tm_yday ,
+and
+.BR tm_wday )
+.TP
+.B %g
+Like
+.B %G
+but without century, that is, with a 2-digit year (00-99).
+(Calculated from
+.BR tm_year ,
+.BR tm_yday ,
+and
+.BR tm_wday )
+.TP
+.B %h
+Equivalent to
+.BR %b .
+(Calculated from
+.BR tm_mon )
+.TP
+.B %H
+The hour as a decimal number using a 24-hour clock between
+00 and 23.
+(Calculated from
+.BR tm_hour )
+.TP
+.B %I
+The hour as a decimal number using a 12-hour clock between 01 and 12
+(Calculated from
+.BR tm_hour )
+.TP
+.B %j
+The day of the year as a decimal number between 001 and 366.
+(Calculated from
+.BR tm_yday )
+.TP
+.B %m
+The month as a decimal number between 01 and 12
+(Calculated from
+.BR tm_mon )
+.TP
+.B %M
+The minute as a decimal number between 00 and 59
+.TP
+.B %n
+A newline character.
+.TP
+.B %p
+Either "AM" or "PM" according to the given time value.
+(Calculated from
+.BR tm_hour )
+.B %r
+The locale's 12-hour clock time.
+.TP
+.B %R
+The time in 24-hour notation (%H:%M).
+.TP
+.B %S
+The second as a decimal number between 00 and 60.
+(Calculated from
+.BR tm_sec ).
+.TP
+.B %t
+A tab character.
+.TP
+.B %T
+The time in 24-hour notation (%H:%M:%S).
+.TP
+.B %u
+The day of the week (ISO 8601) as a decimal between 1 and 7,
+Monday being 1.
+(Calculated from
+.BR tm_wday )
+.TP
+.B %U
+The week number of the current year as a decimal number
+between 00 and 53,
+starting with the first Sunday as the first day of week 01. (Calculated from
+.BR tm_year ,
+.BR tm_wday ,
+.BR tm_yday )
+.TP
+.B %V
+The ISO 8601 week (see NOTES) number of the current year as a decimal number
+between 01 and 53,
+where week 1 is the first week that has at least 4 days in the new year.
+.TP
+.B %w
+The day of the week as a decimal between 0 and 6,
+Sunday being 0.
+.TP
+.B %W
+The week number of the current year as a decimal number
+between 00 and 53,
+starting with the first Monday as the first day of week 01.
+(Calculated from
+.B tm_yday
+and
+.BR tm_wday ).
+.TP
+.B %x
+The preferred date representation for the current locale without the
+time.
+.TP
+.B %X
+The preferred time representation for the current locale without the
+date.
+.TP
+.B %y
+The year as a decimal number without a century between 00 and 99.
+.TP
+.B %Y
+The year as a decimal number including the century.
+.TP
+.B %z
+The +hhmm or -hhmm numeric timezone
+(that is, the hour and minute offset from UTC in ISO 8601 format).
+.TP
+.B %Z
+The timezone name or abbreviation.
+.TP
+.B %%
+This is replaced with %.
+.P
+Some conversion specifiers can be modified by the inclusion of an
+.B E
+or
+.B O
+modifier character to indicate an alternative format or specification.
+If the alternative format or character doesn't exist for the current locale,
+the modifier is ignored.
+
+The C Standard mentions the following specifiers:
+.BR %Ec ,
+.BR %EC ,
+.BR %Ex ,
+.BR %EX ,
+.BR %Ey ,
+.BR %EY ,
+.BR %Od ,
+.BR %Oe ,
+.BR %OH ,
+.BR %OI ,
+.BR %Om ,
+.BR %OM ,
+.BR %OS ,
+.BR %Ou ,
+.BR %OU ,
+.BR %OV ,
+.BR %Ow ,
+.BR %OW ,
+.BR %Oy ,
+where the effect of the
+.B O
+modifier is to use
+alternative numeric symbols, and that of the
+.B E
+modifier is to use a locale-dependent alternative representation.
+
+In the "C" locale, the E and O modifiers are ignored and the
+replacement strings for the following specifiers are:
+.TP
+.B %a
+the first three characters of %A
+.TP
+.B %A
+one of Sunday ,Monday, ..., Saturday
+.TP
+.B %b
+the first three characters of %B
+.TP
+.B %B
+one of January, February, ..., December
+.TP
+.B %c
+equivalent to %a %b %e %T %Y
+.TP
+.B %p
+one of AM or PM
+.TP
+.B %r
+equivalent to %I:%M:%S %p
+.TP
+.B %x
+equivalent to %m/%d/%y
+.TP
+.B %X
+equivalent to %T
+.TP
+.B %Z
+The timezone name or abbreviation.
+.SH RETURN VALUE
+If the total number of resulting characters
+including the terminating null character doesn't exceed
+.IR maxsize ,
+then
+.I strftime
+function returns the number of characters
+placed into the array pointed to by
+.I s
+not including the terminating null character. Otherwise, zero is
+returned and the contents of the array are indeterminate.
+.SH NOTES
+In the ISO 8601 week-based year, weeks begin on a Monday and week 1
+of the year is the week that includes January 4th, which also includes
+the first Thursday of the year, and is also the first week that
+contains at least four days in the year. As mentioned above,
+.B %g, %G,
+and
+.B %V
+are dependent on ISO 8601 week-based year, and the following examples
+are provided for illustrative purposes:
+
+If the first Monday of January is the 2nd, 3rd, or 4th,
+the preceding days are part of the last week of the preceding year;
+thus, for Saturday 2nd January 1999,
+.B %G
+is replaced by 1998 and
+.B %V
+is replaced with 53. Similarly,
+if December 29th, 30th or 31st is a Monday,
+it and following days are part of week 1 and hence,
+for Tuesday 30th December 1997,
+.B %G
+is replaced by 1998 and
+.B %V
+is replaced with 01.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.23.3.5 Paragraph 1,2,3,4,5,6,7
+.SH SEE ALSO
+.BR time.h (3)
--- /dev/null
+++ b/doc/man3/string.h.3
@@ -1,0 +1,62 @@
+.TH string.h 3
+.SH NAME
+string.h - string operations
+.SH SYNOPSIS
+#include <string.h>
+
+The string.h header declares the following functions:
+
+.nf
+void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
+void *memmove(void *s1, const void *s2, size_t n);
+char *strcpy(char *restrict s1, const char *restrict s2);
+char *strncpy(char *restrict s1, const char *restrict s2, size_t n);
+char *strcat(chaar *restrict s1, const char *restrict s2);
+char *strncat(chaar *restrict s1, const char *restrict s2, size_t n);
+int memcmp(const void *s1, const void *s2, size_t n);
+int strcmp(const char *s1, const char *s2);
+int strcoll(const char *s1, const char *s2);
+int strncmp(const char *s1, const char *s2, size_t n);
+size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n);
+void *memchr(const void *s, int c, size_t n);
+char *strchr(const char *s, int c);
+size_t strcspn(const char *s1, const char *s2);
+char *strpbrk(const char *s1, const char *s2);
+char *strrchr(const char *s, int c);
+size_t strspn(const char *s1, const char *s2);
+char *strstr(const char *s1, const char *s2);
+char *strtok(char *restrict s1, const char *restrict s2);
+void *memset(void *s, int c, size_t n);
+char *strerror(int errnum);
+size_t strlen(const char *s);
+.fi
+.SH DESCRIPTION
+The string.h header defines the macro
+.B NULL
+and the type
+.BR size_t .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.1
+.SH SEE ALSO
+.BR memchr (3)
+.BR memcmp (3)
+.BR memcpy (3)
+.BR memmove (3)
+.BR memset (3)
+.BR strcat (3)
+.BR strchr (3)
+.BR strcmp (3)
+.BR strcoll (3)
+.BR strcpy (3)
+.BR strcspn (3)
+.BR strerror (3)
+.BR strlen (3)
+.BR strncat (3)
+.BR strncmp (3)
+.BR strncpy (3)
+.BR strpbrk (3)
+.BR strrchr (3)
+.BR strspn (3)
+.BR strstr (3)
+.BR strtok (3)
+.BR strxfrm (3)
--- /dev/null
+++ b/doc/man3/strlen.3
@@ -1,0 +1,18 @@
+.TH strlen 3
+.SH NAME
+strlen - get the length of a string
+.SH SYNOPSIS
+#include <string.h>
+
+size_t strlen(const char *s)
+.SH DESCRIPTION
+The
+.BR strlen ()
+function computes the length of the string
+pointed to by
+.I s
+.SH RETURN VALUE
+The function shall return the length of the string
+.IR s .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.6.3
--- /dev/null
+++ b/doc/man3/strncat.3
@@ -1,0 +1,38 @@
+.TH strncat 3
+.SH NAME
+strncat - concatenate a string with a part of another
+.SH SYNOPSIS
+#include <string.h>
+
+char *strncat(char *restrict s1, const char *restrict s2, size_t n)
+.SH DESCRIPTION
+The
+.BR strncat ()
+function appends not more than n characters
+(a null character and characters that follow are not appended)
+from the array pointed to by
+.I s2
+to the end of the string pointed to by
+.IR s1 .
+.PP
+The initial character of
+.I s2
+overwrites the null character
+at the end of
+.IR s1 .
+.PP
+A terminating null character is always appended to the result.
+The function shall not append anything to
+.I s1
+if
+.I n
+is equal to 0.
+If copying takes place between objects that overlap,
+the behaviour is undefined.
+.SH RETURN VALUE
+The
+.BR strncat ()
+function shall return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.3.2
--- /dev/null
+++ b/doc/man3/strncmp.3
@@ -1,0 +1,40 @@
+.TH strncmp 3
+.SH NAME
+strncmp - compare part of two strings
+.SH SYNOPSIS
+#include <string.h>
+
+int strncmp(const char *s1, const char *s2, size_t n)
+.SH DESCRIPTION
+The
+.BR strncmp ()
+function compares not more than
+.I n
+characters
+(characters that follow a null character are not compared)
+from the array pointed to by
+.I s1
+to the array pointed to by
+.IR s2 .
+.PP
+The value returned shall be used to determine
+if a string is lexicographically
+greater than, lesser than or equal to
+the other string.
+.SH RETURN VALUE
+The
+.BR strncmp ()
+function shall return an integer greater than,
+equal to, or lesser than 0,
+if the string pointed to by
+.I s1
+is greater than,
+equal to, or lesser than the string pointed to by
+.IR s2 ,
+respectively.
+.PP
+The function shall return 0 if
+.I n
+is equal to 0.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.4.4
--- /dev/null
+++ b/doc/man3/strncpy.3
@@ -1,0 +1,42 @@
+.TH strncpy 3
+.SH NAME
+strncpy - copy bounded-length string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strncpy(char *restrict s1, const char *restrict s2, size_t n)
+.SH DESCRIPTION
+The
+.BR strncpy ()
+function copies not more than
+.I n
+characters
+(characters that follow a null character are not copied)
+from the array pointed to by
+.I s2
+into the array pointed to by
+.IR s1 .
+.PP
+If copying takes place between objects that overlap,
+the behaviour is undefined.
+.PP
+If the array pointed to by
+.I s2
+is a string that is shorter than
+.I n
+characters,
+null characters are appended
+to the copy in the array pointed to by
+.IR s1 ,
+until n characters in all have been written.
+.PP
+The function shall not copy anything if
+.I n
+is equal to 0.
+.SH RETURN VALUE
+The
+.BR strcpy ()
+function shall return the pointer
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.2.4
--- /dev/null
+++ b/doc/man3/strpbrk.3
@@ -1,0 +1,27 @@
+.TH strpbrk 3
+.SH NAME
+strpbrk - scan a string for a byte
+.SH SYNOPSIS
+#include <string.h>
+
+char *strpbrk(const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strpbrk ()
+function locates the first occurence
+in the string pointed to by
+.I s1
+of any character from
+the string pointed to by
+.IR s2 .
+.SH RETURN VALUE
+The
+.BR strpbrk ()
+function shall return a pointer to the character in
+.I s1
+or a null pointer if
+.I s2
+does not occur in
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.4
--- /dev/null
+++ b/doc/man3/strrchr.3
@@ -1,0 +1,24 @@
+.TH strrchr 3
+.SH NAME
+strrchr - find character in string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strrchr(const char *s, int c)
+.SH DESCRIPTION
+The
+.BR strrchr ()
+function locates the last occurence of
+.I c
+(converted to a char)
+in the string pointed to by
+.IR s .
+.PP
+The terminating null character is considered to be part of the string.
+.SH RETURN VALUE
+The
+.BR strchr ()
+function shall return a pointer to the located character
+or a null pointer if the character does not occur in the string.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.5
--- /dev/null
+++ b/doc/man3/strspn.3
@@ -1,0 +1,23 @@
+.TH strspn 3
+.SH NAME
+strspn - get length of substring
+.SH SYNOPSIS
+#include <string.h>
+
+size_t strspn(const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strspn ()
+function computes the length
+of the maximum initial segment
+of string pointed to by
+.I s1
+which consists entirely of characters
+from the string pointed to by
+.IR s2 .
+.SH RETURN VALUE
+The
+.BR strcspn ()
+function shall return the length of the segment.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.6
--- /dev/null
+++ b/doc/man3/strstr.3
@@ -1,0 +1,32 @@
+.TH strstr 3
+.SH NAME
+strstr - find substring in string
+.SH SYNOPSIS
+#include <string.h>
+
+char *strstr(const char *s1, const char *s2)
+.SH DESCRIPTION
+The
+.BR strstr ()
+function locates the first occurence
+in the string pointed to by
+.I s1
+of the sequence of characters
+(excluding the terminating null character)
+in the string pointed to by
+.IR s2 .
+.SH RETURN VALUE
+The
+.BR strchr ()
+function shall return a pointer to the located string
+or a null pointer if
+.I s2
+is not found.
+.PP
+If
+.I s2
+points to an empty string,
+the function returns
+.IR s1 .
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.7
--- /dev/null
+++ b/doc/man3/strtok.3
@@ -1,0 +1,68 @@
+.TH strtok 3
+.SH NAME
+strtok - split a string into tokens
+.SH SYNOPSIS
+#include <string.h>
+
+char *strtok(char *restrict s1, const char *restrict s2)
+.SH DESCRIPTION
+The
+.BR strtok ()
+function, called in sequence,
+breaks the string pointed to by
+.I s1
+into a sequence of tokens,
+each of which is delimited by a character
+from the string pointed to by
+.IR s2 .
+.PP
+The first call in the sequence has a non-null first argument;
+subsequent calls in the sequence have a null first argument.
+.PP
+The separator string pointed to by
+.I s2
+may be different from call to call.
+.PP
+The first call in the sequence
+searches the string pointed to by
+.I s1
+for the first character
+that is not contained in the current separator
+string pointed to by
+.IR s2 .
+If no such character is found,
+then there are
+no tokens in the string pointed to by s1
+and the strtok function returns a null pointer.
+If such a character is found,
+it is the start of the first token.
+.PP
+The strtok function then searches from there
+for a character that is contained
+in the current separator string.
+If no such character is found,
+the current token extends to
+the end of the string pointed to by
+.IR s1 ,
+and subsequent searches for a token will return a null pointer.
+If such a character is found,
+it is overwritten by a null character,
+which terminates the current token.
+The strtok function saves
+a pointer to the following character,
+from which the next search for a token will start.
+.PP
+Each subsequent call,
+with a null pointer as the value of the first argument,
+starts searching from the saved pointer
+and behaves as described above.
+The function returns a pointer to the first
+character of a token,
+or a null pointer if there is no token.
+.SH RETURN VALUE
+The
+.BR strtok ()
+function shall return a pointer to the first character of a token,
+or a null pointer if there is no token.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.5.8
--- /dev/null
+++ b/doc/man3/strxfrm.3
@@ -1,0 +1,47 @@
+.TH strxfrm 3
+.SH NAME
+strxfrm - string transformation
+.SH SYNOPSIS
+#include <string.h>
+
+size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n)
+.SH DESCRIPTION
+The
+.BR strxfrm ()
+function transforms
+the string pointed to by
+.I s2
+and places the resulting string
+into the array pointed to by
+.IR s1 .
+The transformation is such that
+if the strcmp function is applied to two transformed strings,
+it returns a value
+greater than, equal to or less than zero,
+corresponding to the result of the strcoll function
+applied to the same two original strings.
+.PP
+No more than n characters shall be placed into
+the resulting array pointed to by
+.IR s1 ,
+including the terminating null character.
+If n is zero,
+.I s1
+is permitted to be a null pointer.
+.PP
+If copying takes place between objects that overlap,
+the behaviour is undefined.
+.SH RETURN VALUE
+The
+.BR strxfrm ()
+function shall return the length of
+the transformed string
+(not including the terminating null character).
+If the value returned is
+.I n
+or more,
+the contents of the array pointed to
+.I s1
+are indeterminate.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.21.4.5
--- /dev/null
+++ b/doc/man3/time.3
@@ -1,0 +1,23 @@
+.TH TIME 3
+.SH NAME
+time - determines the current calendar time
+.SH SYNOPSIS
+#include <time.h>
+
+time_t time(time_t *timer)
+.SH DESCRIPTION
+The
+.BR time ()
+function determines the current calendar time.
+.SH RETURN VALUE
+The value returned is the best approximation
+to the current calendar time. The value
+.B (time_t)-1
+is returned if the calendar time is unavailable. If
+.I timer
+is not a null pointer,
+the return value is also assigned to the object it points to.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.23.2.4 Paragraph 1,2,3
+.SH SEE ALSO
+.BR time.h (3)
--- /dev/null
+++ b/doc/man3/time.h.3
@@ -1,0 +1,102 @@
+.TH time.h 3
+.SH NAME
+time.h - time types
+.SH SYNOPSIS
+
+#include <time.h>
+
+The time.h header declares the following functions:
+
+.nf
+char asctime(const struct tm *tm);
+clock_t clock(void);
+char ctime(const time_t *timep);
+double difftime(time_t t1, time_t t2);
+struct tm *gmtime(const time_t *timep);
+struct tm *localtime(const time_t *timep);
+time_t mktime(struct tm *tm);
+size_t strftime(char *restrict, size_t, const char *restrict,
+                const struct tm *restrict);
+time_t time(time_t *timer);
+.fi
+.SH DESCRIPTION
+The time.h header defines the following macros:
+
+.B NULL
+
+It expands to an implementation-defined null pointer constant,
+as defined in stddef.h header.
+
+.B CLOCKS_PER_SEC
+
+A number used to convert the value returned by the
+.BR clock ()
+function into seconds. The value is an expression with type
+clock_t.
+
+The time.h header defines the following types:
+.BR clock_t ,
+.BR size_t ,
+.BR time_t .
+
+The
+time.h header declares the
+.B tm
+structure,
+which includes at least the following members:
+
+.nf
+int tm_sec	Seconds[0,60]
+int tm_min	Minutes[0,59]
+int tm_hour 	Hour[0,23]
+int tm_mday 	Day of month [1,31]
+int tm_mon 	Month of year [0,11]
+int tm_year 	Years since 1900
+int tm_wday 	Day of week [0,6] (Sunday =0)
+int tm_yday 	Day of year [0,365]
+int tm_isdst 	Daylight Savings flag
+.fi
+
+The members of the
+.I tm
+structure are:
+.TP 10
+tm_sec
+The number of seconds after the minute, normally in the range 0 to 59,
+but can be up to 60 to allow for leap seconds.
+.TP
+tm_min
+The number of minutes after the hour, in the range 0 to 59.
+.TP
+tm_hour
+The number of hours past midnight, in the range 0 to 23.
+.TP
+tm_mday
+The day of the month, in the range 1 to 31.
+.TP
+tm_mon
+The number of months since January, in the range 0 to 11.
+.TP
+tm_year
+The number of years since 1900.
+.TP
+tm_wday
+The number of days since Sunday, in the range 0 to 6.
+.TP
+tm_yday
+The number of days since January 1, in the range 0 to 365.
+.TP
+tm_isdst
+A flag that indicates whether daylight saving time is
+in effect at the time described.
+The value is positive if daylight saving time is in
+effect, zero if it is not, and negative if the information is not
+available.
+.SH STANDARDS
+ISO/IEC 9899:1999 Section 7.23.1 Paragraph 1,2,3,4
+.SH SEE ALSO
+.BR clock (3)
+.BR ctime (3)
+.BR difftime (3)
+.BR strftime (3)
+.BR time (3)
--- a/doc/scc.1
+++ /dev/null
@@ -1,154 +1,0 @@
-.TH SCC 1 scc\-VERSION
-.SH NAME
-scc \- simple C compiler with magic
-.SH SYNOPSIS
-.B scc
-.RB [ \-cdgkqQsWw ]
-.RB [ \-M | \-E | \-S ]
-.RB [ \-D
-.IR def[=val] ] ...
-.RB [ \-I
-.IR dir ] ...
-.RB [ \-L
-.IR dir ] ...
-.RB [ \-U
-.IR def ] ...
-.RB [ \-l
-.IR lib ]
-.RB [ \-m
-.IR arch ]
-.RB [ \-o
-.IR outfile ]
-.RB [ \-O
-.IR level ]
-.RB [ \-t
-.IR sys ]
-.RB sourcefile ...
-.SH DESCRIPTION
-.B scc
-is a simple C compiler which takes several
-.I sourcefiles
-and compiles them to an executable. The default output file is
-.B a.out,
-which can be changed by defining some
-.I outfile.
-.SH OPTIONS
-.TP
-.B \-c
-Do not run the linker.
-.TP
-.B \-d
-Do output internal tool messages.
-.TP
-.BI \-D " define[=value]"
-Specify a
-.I define
-for the preprocessor.
-.TP
-.B \-E
-Stop after the preprocessing stage, do not run the compiler and output the then
-resulting source.
-.TP
-.B \-g
-Do generate debug information.
-.TP
-.BI \-I " directory"
-Define a include
-.I directory
-to get header files from. This directory is searched for before standard
-include directories.
-.TP
-.B \-k
-Do keep temporary objects.
-.TP
-.BI \-l " library"
-Link against this 
-.I library.
-.TP
-.BI \-L " directory"
-Define a library
-.I directory
-to resolve dependencies from. This directory is used before the standard
-paths.
-.TP
-.BI \-m " architecture"
-Define the
-.I architecture
-to compile for (i.e. amd64, i386 ...).
-.TP
-.B \-M
-Output a rule for 
-.B make
-describing the dependencies of the main source file.
-.TP
-.BI \-o " outfile"
-Define the name of the
-.I outfile.
-.TP
-.BI \-O " level"
-Define the optimisation
-.I level
-to compile with. (This is a stub for compatibility reasons.)
-.TP
-.B \-q
-Do not use
-.I QBE.
-.TP
-.B \-Q
-Do use the
-.I QBE.
-.TP
-.B \-s
-Strip all symbol tables and relocation information from the resulting executable.
-.TP
-.B \-S
-Stop after the compilation stage, do not assemble and output the assembler
-source.
-.TP
-.BI \-t " system"
-Define the
-.I system
-to compile for (i.e. linux, openbsd ...).
-.TP
-.BI \-U " define"
-Undefine a previously defined
-.I define
-by the -D parameter.
-.TP
-.B \-W
-Show warning messages.
-.TP
-.B \-w
-Do not show warning messages (default).
-.SH ENVIRONMENT VARIABLES
-Certain environment variables control the behaviour of scc.
-.TP
-.B ARCH
-defines the
-.I architecture
-to compile for (i.e. amd64, i386 ...).
-.TP
-.B SYS
-defines the
-.I system
-to compile for (i.e. linux, openbsd ...).
-.TP
-.B ABI
-defines the
-.I application binary interface
-to compile for (i.e. sysv ...).
-.TP
-.B FORMAT
-defines the format of the output executable.
-.TP
-.B SCCPREFIX
-defines the path prefix scc will search the scc suite in.
-.SH AUTHORS
-See the LICENSE file for the authors.
-.SH LICENSE
-See the LICENSE file for the terms of redistribution.
-.SH SEE ALSO
-.BR scpp (1),
-.BR make (1)
-.SH BUGS
-See the TODO file in the distribution.