aboutsummaryrefslogblamecommitdiffstats
path: root/man0/libsimple.h.0
blob: 36e4f7125c0932fb5ea99581d1e57228b59f1023 (plain) (tree)
1
2
3
4
5
6
7
8
9
                           

                                        
 



                      
 





































                                    

                
   
                



































                                                                   












                                                              












































                                                          
   
                              
   
                               
   
                              
   
                               
   
                               
                                                             














                                                                                
   
                            
   
                             
   
                            
   
                             
   
                             
                              






                                          
   
                                 


                                      


                                 
   
                                  
   
                                   
   
                                  
   
                                   
   
                                   



                                 


                                 
   
                                  
   
                                  


                                          


                                  
   
                                   
   
                                    
   
                                   
   
                                    
   
                                    




                                         


                                 
   
                                  
   
                                  

                                    


                                 




                                           
   
                                   
   
                                   


                      









                                       
   
                                        
   
                                        




                                











                                       
   
                                    




                                           


                                   
   
                                    
   
                                     
   
                                    
   
                                     
   
                                     



                                           


                               
   
                                
   
                                




                        

















                                        
   
                            




                                           


                                 
   
                                  
   
                                   
   
                                  
   
                                   
   
                                   

                                     


                                  
   
                                  

                                  


                                 
   
                                  
   
                                   
   
                                  
   
                                   
   
                                   

                                        


                                  
   
                                  

                                      


                                  
   
                                   
   
                                   

                                          




                                          


                           
   
                           
                                                       


                            
   
                            

                                               


                          
   
                          


                                      


                          
   
                           
   
                            
   
                           
   
                            
   
                            


                                                                   


                              
   
                            
                      


                               
   
                             
                                          


                                   
   
                                 
                                                  


                          
   
                           
   
                           
   
                            
   
                           
   
                           

                                                              








                                                    











                                                          
   
                              
                                      








                                                    


                          
   
                          


                                      


                          
   
                           
   
                            
   
                           
   
                            
   
                            



                                           


                          
   
                           
   
                           


                                          


                           
   
                            
   
                             
   
                            
   
                             
   
                             



                                                         


                           
   
                            
   
                            


                                 


                            
   
                             
   
                              
   
                             
   
                              
   
                              



                                                  


                            
   
                             
   
                             


                                          


                             
   
                              
   
                               
   
                              
   
                               
   
                               



                                                         











                            
                             
   
                                
                                                        


                           
   
                             




                                 

   
                         
   
                          
   
                          
                                               












                                           







                               
   
                                
   
                              
   
                                







                                    

   






                               






                                 
                          
   
                             
                                   


                        
   
                           
                                         


                           
   
                              

                                           


                         
   
                            
                                               







                                          





                                          












                                          
   
                             

                                           

   
                              
   
                                 

                                           








                               




                                              









                                          
                            
   
                               

                                           


                          
   
                             

                                          

   
                          
   
                             





                                

   
                              
   
                                 
                   

   




                            
   
                               
                                         


                              
   
                            
                                    


                                  
   
                                  


                                      


                                  
   
                                   
   
                                    
   
                                   
   
                                    
   
                                    



                                 


                                  
   
                                   
   
                                   


                                          


                                   
   
                                    
   
                                     
   
                                    
   
                                     
   
                                     




                                         


                          
   
                           
   
                            
   
                           
   
                            
   
                            


                        


                          
   
                           
   
                           


                                 


                           
   
                            
   
                             
   
                            
   
                             
   
                             



                                                  


                           
   
                            
   
                            


                                          


                            
   
                             
   
                              
   
                             
   
                              
   
                              



                                                         

   







                                       
   
                               

                                            
                                                


                                
   
                                   


                                                  













                                          


                            
   
                                

                                           
                                                


                                 
   
                                    
















                                                 


                           
   
                           


                                      


                           
   
                            
   
                             
   
                            
   
                             
   
                             



                                           











                            
                          
   
                          

                                      


                             
   
                                 
   
                              
   
                                 

                                          

   
                            
   
                                
   
                             
   
                                







                                

   
                                
   
                                    
   
                                 
   
                                    
                        


                           
   
                           

                                      

   
                            
   
                                
   
                             
   
                                







                   


                          
   
                           
   
                           
   
                           




                                      


                          
   
                          




                                      


                         
   
                         
                     


                          
   
                              
   
                           
   
                              
                          


                        
   
                            
   
                         
   
                            
                                 


                           
   
                               
   
                            
   
                               

                                   


                           
   
                               
   
                            
   
                               





                           

   
                            
   
                             
   
                           


                                 
                          
   
                           
   
                          
   
                          




                            

   
                          
   
                             




                                             


                          
   
                             




                                             






                               
                                 
   
                                     
   
                                  
   
                                     
                         


                             
   
                             

                                           

   
                            
   
                                
   
                             
   
                                

                                   


                           
   
                              




                                             


                          
   
                              
   
                           
   
                              
                                        

   
                          
   
                         
   
                          
   
                        
                               

   
                            
   
                                
   
                             
   
                                
                                

   
                             
   
                              
   
                             
   
                             
   
                              
   
                             
                               

   
                                
   
                              


                                    

   
                             
   
                              
   
                             
   
                             
   
                              
   
                             
                               

   
                              
   
                            
                                   


                                   
   
                                  
                                              


                                   
   
                                 

                                       


                                
   
                               
   
                                        

                                       


                         
   
                        
                                                                                  


                         
   
                          
   
                          


                                 


                          
   
                           
   
                            
   
                           
   
                            
   
                            



                                                  


                          
   
                           
   
                           


                                          


                           
   
                            
   
                             
   
                            
   
                             
   
                             



                                                         
 

                          
   
                           
   
                          
   
                           
   
                           
                                  


                          
   
                          




                                      


                          
   
                           
   
                           
                                     





                                      
 

                     
 

             
 

                     
 

         
 

                       
.TH LIBSIMPLE.H 0 libsimple
.SH NAME
libsimple.h \- main header for libsimple

.SH SYNOPSIS
.nf
#include <libsimple.h>
.fi

.SH DESCRIPTION
The header
.I <libsimple.h>
includes the following header files:
.IR <arpa/inet.h> ,
.IR <netinet/in.h> ,
.IR <netinet/tcp.h> ,
.IR <sys/mman.h> ,
.IR <sys/select.h> ,
.IR <sys/socket.h> ,
.IR <sys/stat.h> ,
.IR <sys/time.h> ,
.IR <sys/types.h> ,
.IR <sys/uio.h> ,
.IR <sys/un.h> ,
.IR <sys/wait.h> ,
.IR <aio.h> ,
.IR <alloca.h> ,
.IR <ctype.h> ,
.IR <dirent.h> ,
.IR <errno.h> ,
.IR <fcntl.h> ,
.IR <grp.h> ,
.IR <inttypes.h> ,
.IR <limits.h> ,
.IR <netdb.h> ,
.IR <poll.h> ,
.IR <pwd.h> ,
.IR <setjmp.h> ,
.IR <signal.h> ,
.IR <stdarg.h> ,
.IR <stddef.h> ,
.IR <stdint.h> ,
.IR <stdio.h> ,
.IR <stdlib.h> ,
.IR <string.h> ,
.IR <strings.h> ,
.IR <time.h> ,
.IR <unistd.h> ,
.IR <wchar.h> ,
and
.IR <wctype.h> .
.PP
The header
.I <libsimple.h>
defines the following symbols if at least one them are defined:
.BR AF_LOCAL ,
.BR AF_UNIX ,
and
.BR AF_FILE ;
the following symbols if at least one them are defined:
.B AF_NETLINK
and
.BR AF_ROUTE ;
the following symbols if at least one them are defined, or if their
.B AF_
counterpart is defined:
.BR PF_LOCAL ,
.BR PF_UNIX ,
and
.BR PF_FILE ;
the following symbols if at least one them are defined, or if their
.B AF_
counterpart is defined:
.B PF_NETLINK
and
.BR PF_ROUTE .
Additionally, unless
.B DONT_DEFINE_CLOCK_MONOTONIC_RAW
is defined,
.B CLOCK_MONOTONIC_RAW
is defined to
.BR CLOCK_MONOTONIC ,
unless the system defines
.BR CLOCK_MONOTONIC_RAW .
.PP
The header
.I <libsimple.h>
also defines, without a value,
.B TWOS_COMPLEMENT
if two's complement is used to represent signed integers,
.B ONES_COMPLEMENT
if ones' complement is used to represent signed integers, or
.B SIGN_MAGNITUDE
if sign\-magnitude is used to represent signed integers. Since
no other representation is permitted in C, the header
.I <libsimple.h>
will define exactly one of these macros.
.PP
The header
.I <libsimple.h>
defines a number of functions, macros, and variables.
The following macros are defined only without namespacing:

.TP
.BR ELEMSOF (3libsimple)
Size of array in number of elements.

.TP
.BR INTSTRLEN (3libsimple)
Maximum length of a string representing an integer.

.TP
.BR MAX (3libsimple)
Maximum of 2 values.

.TP
.BR MAX3 (3libsimple)
Maximum of 3 values.

.TP
.BR MIN (3libsimple)
Minimum of 2 values.

.TP
.BR MIN3 (3libsimple)
Minimum of 3 values.

.TP
.BR STRLEN (3libsimple)
Length of string literal.

.TP
.BR TYPE_MAX (3libsimple)
Largest integer.

.TP
.BR TYPE_MIN (3libsimple)
Smallest integer.

.PP
The following functions, macros, and variables
are defined only with namespacing:

.TP
.BR libsimple_arrayalloc (3),
.TQ
.BR libsimple_earrayalloc (3),
.TQ
.BR libsimple_enarrayalloc (3),
.TQ
.BR libsimple_varrayalloc (3),
.TQ
.BR libsimple_evarrayalloc (3),
.TQ
.BR libsimple_envarrayalloc (3)
Flexible allocation of memory suitable for allocating arrays.

.TP
.BR libsimple_close (3)
Close a file and set to stored file descriptor number to mark it file as closed.
.TP
.BR libsimple_default_failure_exit (3)
Default exit value on failure.
.TP
.BR libsimple_eprintf_postprint (3)
Function called after printing error messages.
.TP
.BR libsimple_eprintf_preprint (3)
Function called before printing error messages.
.TP
.BR libsimple_memalloc (3),
.TQ
.BR libsimple_ememalloc (3),
.TQ
.BR libsimple_enmemalloc (3),
.TQ
.BR libsimple_vmemalloc (3),
.TQ
.BR libsimple_evmemalloc (3),
.TQ
.BR libsimple_envmemalloc (3)
Flexible allocation of memory.

.PP
The following functions and macros are
defined both with and without namespacing:

.TP
.BR libsimple_ealigned_alloc (3),
.TQ
.BR libsimple_enaligned_alloc (3)
Wrappers for
.BR aligned_alloc (3)
that terminate the process on failure.

.TP
.BR libsimple_aligned_allocn (3),
.TQ
.BR libsimple_ealigned_allocn (3),
.TQ
.BR libsimple_enaligned_allocn (3),
.TQ
.BR libsimple_valigned_allocn (3),
.TQ
.BR libsimple_evaligned_allocn (3),
.TQ
.BR libsimple_envaligned_allocn (3)
Wrappers for
.BR aligned_alloc (3)
that take the product of multiple
arguments as the allocation size.

.TP
.BR libsimple_aligned_allocz (3),
.TQ
.BR libsimple_ealigned_allocz (3),
.TQ
.BR libsimple_enaligned_allocz (3)
Wrappers for
.BR aligned_alloc (3)
that conditionally initialises the memory.

.TP
.BR libsimple_aligned_alloczn (3),
.TQ
.BR libsimple_ealigned_alloczn (3),
.TQ
.BR libsimple_enaligned_alloczn (3),
.TQ
.BR libsimple_valigned_alloczn (3),
.TQ
.BR libsimple_evaligned_alloczn (3),
.TQ
.BR libsimple_envaligned_alloczn (3)
Wrappers for
.BR aligned_alloc (3)
that take the product of multiple
arguments as the allocation size
and conditionally initialises the memory.

.TP
.BR libsimple_aligned_memdup (3),
.TQ
.BR libsimple_ealigned_memdup (3),
.TQ
.BR libsimple_enaligned_memdup (3)
Duplicate an array of bytes into a
new pointer with a custom alignment.

.TP
.BR libsimple_aligned_memdupa (3)
Duplicate an array of bytes onto the stack,
with custom alignment.

.TP
.BR libsimple_aligned_realloc (3),
.TQ
.BR libsimple_ealigned_realloc (3),
.TQ
.BR libsimple_enaligned_realloc (3)
Version of
.BR realloc (3)
with custom alignment.

.TP
.BR libsimple_aligned_reallocf (3)
Version of
.BR realloc (3)
with custom alignment that deallocates
the pointer on failure.

.TP
.BR libsimple_aligned_reallocarray (3),
.TQ
.BR libsimple_ealigned_reallocarray (3),
.TQ
.BR libsimple_enaligned_reallocarray (3)
Version of
.BR realloc (3)
with custom alignment that, like
.BR calloc (3),
takes two size arguments.

.TP
.BR libsimple_aligned_reallocarrayf (3)
Version of
.BR realloc (3)
with custom alignment that, like
.BR calloc (3),
takes two size arguments, and that
deallocates the pointer on failure.

.TP
.BR libsimple_aligned_reallocfn (3),
.TQ
.BR libsimple_valigned_reallocfn (3)
Version of
.BR realloc (3)
that take the product of multiple arguments
as the allocation size, and that
deallocates the pointer on failure.

.TP
.BR libsimple_aligned_reallocn (3),
.TQ
.BR libsimple_ealigned_reallocn (3),
.TQ
.BR libsimple_enaligned_reallocn (3),
.TQ
.BR libsimple_valigned_reallocn (3),
.TQ
.BR libsimple_evaligned_reallocn (3),
.TQ
.BR libsimple_envaligned_reallocn (3)
Version of
.BR realloc (3)
that take the product of multiple arguments
as the allocation size.

.TP
.BR libsimple_reallocarray (3),
.TQ
.BR libsimple_ereallocarray (3),
.TQ
.BR libsimple_enreallocarray (3)
Version of
.BR realloc (3)
that, like
.BR calloc (3),
takes to size arguments.

.TP
.BR libsimple_reallocarrayf (3)
Version of
.BR realloc (3)
that, like
.BR calloc (3),
takes to size arguments, and that
deallocates the pointer on failure.

.TP
.BR libsimple_reallocf (3)
Version of
.BR realloc (3)
that deallocates the pointer on failure.

.TP
.BR libsimple_reallocfn (3),
.TQ
.BR libsimple_vreallocfn (3)
Version of
.BR realloc (3)
that take the product of multiple arguments
as the allocation size, and that
deallocates the pointer on failure.

.TP
.BR libsimple_aligned_strdup (3),
.TQ
.BR libsimple_ealigned_strdup (3),
.TQ
.BR libsimple_enaligned_strdup (3),
.TQ
.BR libsimple_aligned_strndup (3),
.TQ
.BR libsimple_ealigned_strndup (3),
.TQ
.BR libsimple_enaligned_strndup (3)
Duplicate a string into a new pointer
with a custom alignment.

.TP
.BR libsimple_aligned_strdupa (3),
.TQ
.BR libsimple_aligned_strndupa (3)
Duplicate a string onto the stack,
with custom alignment.

.TP
.BR libsimple_aligned_wcsdup (3),
.TQ
.BR libsimple_ealigned_wcsdup (3),
.TQ
.BR libsimple_enaligned_wcsdup (3),
.TQ
.BR libsimple_aligned_wcsndup (3),
.TQ
.BR libsimple_ealigned_wcsndup (3),
.TQ
.BR libsimple_enaligned_wcsndup (3)
Duplicate a wide-character string into a
new pointer with a custom alignment.

.TP
.BR libsimple_aligned_wcsdupa (3),
.TQ
.BR libsimple_aligned_wcsndupa (3)
Duplicate a wide-character string onto
the stack, with custom alignment.

.TP
.BR libsimple_aligned_wmemdup (3),
.TQ
.BR libsimple_ealigned_wmemdup (3),
.TQ
.BR libsimple_enaligned_wmemdup (3)
Duplicate an array of wide characters into
a new pointer with a custom alignment.

.TP
.BR libsimple_aligned_wmemdupa (3)
Duplicate an array of wide characters onto
the stack, with custom alignment.

.TP
.BR libsimple_asprintf (3),
.TQ
.BR libsimple_vasprintf (3)
Format a string and allocate a sufficient large string.

.TP
.BR libsimple_asprintfa (3),
.TQ
.BR libsimple_vasprintfa (3)
Format a string and allocate a sufficient large
string onto the stack.

.TP
.BR libsimple_ecalloc (3),
.TQ
.BR libsimple_encalloc (3)
Wrappers for
.BR calloc (3)
that terminate the process on failure.

.TP
.BR libsimple_callocn (3),
.TQ
.BR libsimple_ecallocn (3),
.TQ
.BR libsimple_encallocn (3),
.TQ
.BR libsimple_vcallocn (3),
.TQ
.BR libsimple_evcallocn (3),
.TQ
.BR libsimple_envcallocn (3)
Wrappers for
.BR calloc (3)
that take the product of multiple arguments as the allocation size.

.TP
.BR libsimple_cmptimespec (3),
.TQ
.BR libsimple_cmptimeval (3)
Compare two durations.

.TP
.BR libsimple_difftimespec (3),
.TQ
.BR libsimple_difftimeval (3)
Calculate the difference of two durations.

.TP
.BR libsimple_doubletotimespec (3),
.TQ
.BR libsimple_doubletotimeval (3)
Convert a real value to a duration data structure.

.TP
.BR libsimple_eprintf (3),
.TQ
.BR libsimple_enprintf (3),
.TQ
.BR libsimple_veprintf (3),
.TQ
.BR libsimple_venprintf (3),
.TQ
.BR libsimple_weprintf (3),
.TQ
.BR libsimple_vweprintf (3)
Print an error message and (except for the two last functions)
terminate the process.

.TP
.BR libsimple_gmtime (3),
.TQ
.BR libsimple_egmtime (3),
.TQ
.BR libsimple_engmtime (3)
Get the current time in the UTC timezone, and adjust
for leapsecond insertions and delections.

.TP
.BR libsimple_getenv_e (3)
Get the value of an environment value or the empty string.

.TP
.BR libsimple_getenv_ne (3)
Get the value of a non-empty environment value or
.BR NULL .

.TP
.BR libsimple_inchrset (3)
.TQ
.BR libsimple_inchrcaseset (3)
Test if a byte belongs to set of byte.

.TP
.BR libsimple_localtime (3),
.TQ
.BR libsimple_elocaltime (3),
.TQ
.BR libsimple_enlocaltime (3)
Get the current time in the UTC timezone, and adjust
for leapsecond insertions and delections.

.TP
.BR libsimple_emalloc (3),
.TQ
.BR libsimple_enmalloc (3)
Wrappers for
.BR malloc (3)
that terminate the process on failure.

.TP
.BR libsimple_mallocn (3),
.TQ
.BR libsimple_emallocn (3),
.TQ
.BR libsimple_enmallocn (3),
.TQ
.BR libsimple_vmallocn (3),
.TQ
.BR libsimple_evmallocn (3),
.TQ
.BR libsimple_envmallocn (3)
Wrappers for
.BR malloc (3)
that take the product of multiple arguments
as the allocation size.

.TP
.BR libsimple_mallocz (3),
.TQ
.BR libsimple_emallocz (3),
.TQ
.BR libsimple_enmallocz (3)
Wrappers for
.BR aligned_alloc (3)
that conditionally initialises the memory.

.TP
.BR libsimple_malloczn (3),
.TQ
.BR libsimple_emalloczn (3),
.TQ
.BR libsimple_enmalloczn (3),
.TQ
.BR libsimple_vmalloczn (3),
.TQ
.BR libsimple_evmalloczn (3),
.TQ
.BR libsimple_envmalloczn (3)
Wrappers for
.BR malloc (3)
that take the product of multiple arguments as the
allocation size and conditionally initialises the memory.

.TP
.BR libsimple_memalign (3),
.TQ
.BR libsimple_ememalign (3),
.TQ
.BR libsimple_enmemalign (3)
Implementation of the nonstandard
.BR memalign (3)
function.

.TP
.BR libsimple_memalignn (3),
.TQ
.BR libsimple_ememalignn (3),
.TQ
.BR libsimple_enmemalignn (3),
.TQ
.BR libsimple_vmemalignn (3),
.TQ
.BR libsimple_evmemalignn (3),
.TQ
.BR libsimple_envmemalignn (3)
Versions of
.BR libsimple_memalign (3)
that take the product of multiple arguments as the
allocation size.

.TP
.BR libsimple_memalignz (3),
.TQ
.BR libsimple_ememalignz (3),
.TQ
.BR libsimple_enmemalignz (3)
Versions of
.BR libsimple_memalign (3)
that conditionally initialises the memory.

.TP
.BR libsimple_memalignzn (3),
.TQ
.BR libsimple_ememalignzn (3),
.TQ
.BR libsimple_enmemalignzn (3),
.TQ
.BR libsimple_vmemalignzn (3),
.TQ
.BR libsimple_evmemalignzn (3),
.TQ
.BR libsimple_envmemalignzn (3)
Versions of
.BR libsimple_memalign (3)
that take the product of multiple arguments as the
allocation size and conditionally initialises the memory.

.TP
.BR libsimple_memcasechr (3)
Case-insensitive version of
.BR memchr (3).

.TP
.BR libsimple_memcasecmp (3)
Case-insensitive version of
.BR memcmp (3).

.TP
.BR libsimple_memchr_inv (3),
.TQ
.BR libsimple_memcasechr_inv (3)
Find first byte that is different from a specified byte.

.TP
.BR libsimple_memcmove (3),
.TQ
.BR libsimple_rawmemcmove (3)
Versions of
.BR memccpy (3)
and
.BR libsimple_rawmemccpy (3)
that allow overlap of the arrays.

.TP
.BR libsimple_memdup (3),
.TQ
.BR libsimple_ememdup (3),
.TQ
.BR libsimple_enmemdup (3)
Duplicate an array of bytes into a new pointer.

.TP
.BR libsimple_memdupa (3)
Duplicate an array of bytes onto the stack.

.TP
.BR libsimple_memelem (3)
Version of
.BR memchr (3)
that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memelem_inv (3)
Version of
.BR libsimple_memchr_inv (3)
that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memelemcpy (3),
.TQ
.BR libsimple_rawmemelemcpy (3),
.TQ
.BR libsimple_memelemmove (3),
.TQ
.BR libsimple_rawmemelemmove (3)
Versions of
.BR memccpy (3),
.BR libsimple_rawmemccpy (3),
.BR libsimple_memcmove (3),
and
.BR libsimple_rawmemcmove (3)
that that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memelemscan (3)
Version of
.BR memscan (3)
that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memelemscan_inv (3)
Version of
.BR libsimple_memscan_inv (3)
that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memends (3),
.TQ
.BR libsimple_memcaseends (3)
Check the end if an array of bytes.

.TP
.BR libsimple_memeq (3),
.TQ
.BR libsimple_memcaseeq (3)
Compare two arrays of bytes for equality.

.TP
.BR libsimple_memeqlen (3),
.TQ
.BR libsimple_memcaseeqlen (3)
Get the number if bytes two arrays of bytes
have in common at their beginning.

.TP
.BR libsimple_memmem (3),
.TQ
.BR libsimple_memcasemem (3)
Find a substring of bytes in an array of bytes.

.TP
.BR libsimple_mempcpy (3)
Version of
.BR memcpy
that returns the end of the written array.

.TP
.BR libsimple_mempmove (3)
Version of
.BR memmove
that returns the end of the written array.

.TP
.BR libsimple_mempset (3)
Version of
.BR memset
that returns the end of the written array.

.TP
.BR libsimple_mempsetelem (3)
Version of
.BR libsimple_memsetelem
that returns the end of the written array.

.TP
.BR libsimple_memrchr (3),
.TQ
.BR libsimple_memrcasechr (3)
Find the last occurrence of a specific byte
in an array of bytes.

.TP
.BR libsimple_memrchr_inv (3),
.TQ
.BR libsimple_memrcasechr_inv (3)
Find the last byte that is different from a
specified byte.

.TP
.BR libsimple_memrelem_inv (3)
Version of
.BR libsimple_memrchr_inv (3)
that operate on multibyte units
rather than simple bytes.

.TP
.BR libsimple_memrelem (3)
Find the last occurrence of a specific element
in an array.

.TP
.BR libsimple_memreplace (3)
Replace all occurrences of a byte with
another byte.

.TP
.BR libsimple_memreplaceelem (3)
Replace all occurrences of an element with
another element.

.TP
.BR libsimple_memreqlen (3),
.TQ
.BR libsimple_memrcaseeqlen (3)
Get the number if bytes two arrays of bytes
have in common at their end.

.TP
.BR libsimple_memrmem (3),
.TQ
.BR libsimple_memrcasemem (3)
Find the last occurrence of string of byte
in an array of bytes.

.TP
.BR libsimple_memscan (3),
.TQ
.BR libsimple_memcasescan (3)
Versions of
.BR memchr (3)
and
.BR libsimple_memcasechr (3)
that return the end of the array
if the byte is not found.

.TP
.BR libsimple_memscan_inv (3),
.TQ
.BR libsimple_memcasescan_inv (3)
Skip leading bytes.

.TP
.BR libsimple_memsetelem (3)
Fill en array.

.TP
.BR libsimple_memstarts (3),
.TQ
.BR libsimple_memcasestarts (3)
Check the beginning if an array of bytes.

.TP
.BR libsimple_multimespec (3),
.TQ
.BR libsimple_multimeval (3)
Multiple a duration with an integer.

.TP
.BR libsimple_eposix_memalign (3),
.TQ
.BR libsimple_enposix_memalign (3)
Wrappers for
.BR posix_memalign (3)
that terminate the process on failure.

.TP
.BR libsimple_posix_memalignn (3),
.TQ
.BR libsimple_eposix_memalignn (3),
.TQ
.BR libsimple_enposix_memalignn (3),
.TQ
.BR libsimple_vposix_memalignn (3),
.TQ
.BR libsimple_evposix_memalignn (3),
.TQ
.BR libsimple_envposix_memalignn (3)
Wrappers for
.BR posix_memalign (3)
that take the product of multiple
arguments as the allocation size.

.TP
.BR libsimple_posix_memalignz (3),
.TQ
.BR libsimple_eposix_memalignz (3),
.TQ
.BR libsimple_enposix_memalignz (3)
Wrappers for
.BR posix_memalign (3)
that conditionally initialises the memory.

.TP
.BR libsimple_posix_memalignzn (3),
.TQ
.BR libsimple_eposix_memalignzn (3),
.TQ
.BR libsimple_enposix_memalignzn (3),
.TQ
.BR libsimple_vposix_memalignzn (3),
.TQ
.BR libsimple_evposix_memalignzn (3),
.TQ
.BR libsimple_envposix_memalignzn (3)
Wrappers for
.BR posix_memalign (3)
that take the product of multiple
arguments as the allocation size
and conditionally initialises the memory.

.TP
.BR libsimple_putenvf (3),
.TQ
.BR libsimple_eputenvf (3),
.TQ
.BR libsimple_enputenvf (3),
.TQ
.BR libsimple_vputenvf (3),
.TQ
.BR libsimple_evputenvf (3),
.TQ
.BR libsimple_envputenvf (3)
Verion of
.BR putenv (3)
that formats the string.

.TP
.BR libsimple_pvalloc (3),
.TQ
.BR libsimple_epvalloc (3),
.TQ
.BR libsimple_enpvalloc (3)
Implementation of the nonstandard
.BR pvalloc (3)
function.

.TP
.BR libsimple_pvallocn (3),
.TQ
.BR libsimple_epvallocn (3),
.TQ
.BR libsimple_enpvallocn (3),
.TQ
.BR libsimple_vpvallocn (3),
.TQ
.BR libsimple_evpvallocn (3),
.TQ
.BR libsimple_envpvallocn (3)
Versions of
.BR libsimple_pvalloc (3)
that take the product of multiple arguments as the
allocation size.

.TP
.BR libsimple_pvallocz (3),
.TQ
.BR libsimple_epvallocz (3),
.TQ
.BR libsimple_enpvallocz (3)
Versions of
.BR libsimple_pvalloc (3)
that conditionally initialises the memory.

.TP
.BR libsimple_pvalloczn (3),
.TQ
.BR libsimple_epvalloczn (3),
.TQ
.BR libsimple_enpvalloczn (3),
.TQ
.BR libsimple_vpvalloczn (3),
.TQ
.BR libsimple_evpvalloczn (3),
.TQ
.BR libsimple_envpvalloczn (3)
Versions of
.BR libsimple_pvalloc (3)
that take the product of multiple arguments as the
allocation size and conditionally initialises the memory.

.TP
.BR libsimple_rawmemccpy (3)
Version of
.BR memccpy (3)
with the optimising assumption that the
byte actually exists in the array.

.TP
.BR libsimple_rawmemchr (3),
.TQ
.BR libsimple_rawmemcasechr (3)
Find the first occurrence of a specific byte
in an array of bytes, with the optimising
assumption that it actually exists in the array.

.TP
.BR libsimple_rawmemchr_inv (3),
.TQ
.BR libsimple_rawmemcasechr_inv (3)
Find first byte that is different from a specified
byte, with the optimising assumption that such a
byte actually exists in the array.

.TP
.BR libsimple_rawmemelem (3)
Version of
.BR libsimple_memelem (3),
with the optimising assumption that the
element actually exists in the array.

.TP
.BR libsimple_rawmemelem_inv (3)
Version of
.BR libsimple_memelem_inv (3)
with the optimising assumption that such a
element actually exists in the array.

.TP
.BR libsimple_rawmemrchr (3)
.TQ
.BR libsimple_rawmemrcasechr (3)
Find the last occurrence of a specific byte
in an array of bytes, with the optimising
assumption that it actually exists in the array.

.TP
.BR libsimple_rawmemrchr_inv (3),
.TQ
.BR libsimple_rawmemrcasechr_inv (3)
Find last byte that is different from a specified
byte, with the optimising assumption that such a
byte actually exists in the array.

.TP
.BR libsimple_rawmemrelem (3)
Version of
.BR libsimple_memrelem (3),
with the optimising assumption that the
element actually exists in the array.

.TP
.BR libsimple_rawmemrelem_inv (3)
Version of
.BR libsimple_memrelem_inv (3),
with the optimising assumption that such a
element actually exists in the array.

.TP
.BR libsimple_erealloc (3),
.TQ
.BR libsimple_enrealloc (3)
Wrappers for
.BR realloc (3)
that terminate the process on failure.

.TP
.BR libsimple_reallocn (3),
.TQ
.BR libsimple_ereallocn (3),
.TQ
.BR libsimple_enreallocn (3),
.TQ
.BR libsimple_vreallocn (3),
.TQ
.BR libsimple_evreallocn (3),
.TQ
.BR libsimple_envreallocn (3)
Wrappers for
.BR realloc (3)
that take the product of multiple arguments
as the allocation size.

.TP
.BR libsimple_strcasechr (3)
Case-insensitive version of
.BR strchr (3).

.TP
.BR libsimple_strcasestr (3)
Case-insensitive version of
.BR strstr (3).

.TP
.BR libsimple_strccpy (3),
.TQ
.BR libsimple_strnccpy (3)
Copy a string but stop after the first
occurrence of a specified character.

.TP
.BR libsimple_strchr_inv (3),
.TQ
.BR libsimple_strcasechr_inv (3),
.TQ
.BR libsimple_strnchr_inv (3),
.TQ
.BR libsimple_strncasechr_inv (3)
Find the first character that is different
from a specified character.

.TP
.BR libsimple_strchrnul (3),
.TQ
.BR libsimple_strcasechrnul (3),
.TQ
.BR libsimple_strnchrnul (3),
.TQ
.BR libsimple_strncasechrnul (3)
Versions of
.BR strchr (3),
.BR libsimple_strcasechr (3),
.BR libsimple_strnchr (3),
and
.BR libsimple_strncasechr (3)
that return the end of the
string if the byte is not found.

.TP
.BR libsimple_strchrnul_inv (3),
.TQ
.BR libsimple_strcasechrnul_inv (3),
.TQ
.BR libsimple_strnchrnul_inv (3),
.TQ
.BR libsimple_strncasechrnul_inv (3)
Skip leading characters.

.TP
.BR libsimple_strcmove (3),
.TQ
.BR libsimple_strncmove (3)
Move a string but stop after the first
occurrence of a specified character.

.TP
.BR libsimple_strcmpnul (3),
.TQ
.BR libsimple_strcasecmpnul (3),
.TQ
.BR libsimple_strncmpnul (3),
.TQ
.BR libsimple_strncasecmpnul (3)
Versions of
.BR strcmp (3),
.BR strcasecmp (3),
.BR strncmp (3),
and
.BR strncasecmp (3)
that support
.BR NULL .

.TP
.BR libsimple_estrdup (3),
.TQ
.BR libsimple_enstrdup (3),
.TQ
.BR libsimple_estrndup (3),
.TQ
.BR libsimple_enstrndup (3)
Wrappers of
.BR strdup (3)
and
.BR strndup (3)
that terminate the process on failure.

.TP
.BR libsimple_strdupa (3),
.TQ
.BR libsimple_strndupa (3)
Versions of
.BR strdup (3),
and
.BR strndup (3)
that allocate the string on the stack.

.TP
.BR libsimple_strend (3),
.TQ
.BR libsimple_strnend (3)
Locate end of string.

.TP
.BR libsimple_strends (3),
.TQ
.BR libsimple_strcaseends (3),
.TQ
.BR libsimple_strnends (3),
.TQ
.BR libsimple_strncaseends (3)
Check the end if a string.

.TP
.BR libsimple_streq (3),
.TQ
.BR libsimple_strcaseeq (3),
.TQ
.BR libsimple_strneq (3),
.TQ
.BR libsimple_strncaseeq (3)
Compare two strings for equality.

.TP
.BR libsimple_streqlen (3),
.TQ
.BR libsimple_strcaseeqlen (3),
.TQ
.BR libsimple_strneqlen (3),
.TQ
.BR libsimple_strncaseeqlen (3)
Get the number if bytes two strings
have in common at their beginning.

.TP
.BR libsimple_streqnul (3),
.TQ
.BR libsimple_strcaseeqnul (3),
.TQ
.BR libsimple_strneqnul (3),
.TQ
.BR libsimple_strncaseeqnul (3)
Verions of
.BR libsimple_streq (3)
and
.BR libsimple_strcaseeq (3)
that support
.BR NULL .

.TP
.BR libsimple_strisutf8 (3),
.TQ
.BR libsimple_strnisutf8 (3),
.TQ
.BR libsimple_memisutf8 (3)
Check if a string is valid UTF-8.

.TP
.BR libsimple_strmove (3),
.TQ
.BR libsimple_strnmove (3),
.TQ
.BR libsimple_stpmove (3),
.TQ
.BR libsimple_stpnmove (3)
Versions of
.BR memmove (3)
and
.BR libsimple_mempmove (3)
that moves an entire string.

.TP
.BR libsimple_strnchr (3),
.TQ
.BR libsimple_strncasechr (3)
Versions of
.BR strchr (3)
and
.BR libsimple_strcasechr (3)
that support strings without NUL-termination.

.TP
.BR libsimple_strnstr (3),
.TQ
.BR libsimple_strncasestr (3)
Versions of
.BR strstr (3)
and
.BR libsimple_strcasestr (3)
that support strings without NUL-termination.

.TP
.BR libsimple_strrcasechr (3)
Case-insensitive version of the
.BR strrchr (3).

.TP
.BR libsimple_strrchrnul_inv (3),
.TQ
.BR libsimple_strrcasechrnul_inv (3),
.TQ
.BR libsimple_strrnchrnul_inv (3),
.TQ
.BR libsimple_strrncasechrnul_inv (3)
Skip trailing characters.

.TP
.BR libsimple_strreplace (3),
.TQ
.BR libsimple_strnreplace (3)
Replace all occurrences of a character with
another character.

.TP
.BR libsimple_strreqlen (3),
.TQ
.BR libsimple_strrcaseeqlen (3),
.TQ
.BR libsimple_strrneqlen (3),
.TQ
.BR libsimple_strrncaseeqlen (3)
Get the number if bytes two strings
have in common at their end.

.TP
.BR libsimple_strrnchr (3),
.TQ
.BR libsimple_strrncasechr (3)
Versions of
.BR strrchr (3)
and
.BR libsimple_strrcasechr (3)
that support strings without NUL-termination.

.TP
.BR libsimple_strrstr (3),
.TQ
.BR libsimple_strrcasestr (3),
.TQ
.BR libsimple_strrnstr (3),
.TQ
.BR libsimple_strrncasestr (3)
Find the last occurrence of a substring.

.TP
.BR libsimple_stpnset (3),
.TQ
.BR libsimple_stpset (3),
.TQ
.BR libsimple_strnset (3),
.TQ
.BR libsimple_strset (3)
Fill a string a with character.

.TP
.BR libsimple_strstarts (3),
.TQ
.BR libsimple_strcasestarts (3),
.TQ
.BR libsimple_strnstarts (3),
.TQ
.BR libsimple_strncasestarts (3)
Check the beginning if a string.

.TP
.BR libsimple_strtolower (3),
.TQ
.BR libsimple_strntolower (3),
.TQ
.BR libsimple_memtolower (3),
.TQ
.BR libsimple_stptolower (3),
.TQ
.BR libsimple_stpntolower (3),
.TQ
.BR libsimple_memptolower (3)
Convert a string to lower case.

.TP
.BR libsimple_strtotimespec (3),
.TQ
.BR libsimple_strtotimeval (3)
Convert a string, with a real value
representing a number of seconds, to
a duration.

.TP
.BR libsimple_strtoupper (3),
.TQ
.BR libsimple_strntoupper (3),
.TQ
.BR libsimple_memtoupper (3),
.TQ
.BR libsimple_stptoupper (3),
.TQ
.BR libsimple_stpntoupper (3),
.TQ
.BR libsimple_memptoupper (3)
Convert a string to upper case.

.TP
.BR libsimple_sumtimespec (3),
.TQ
.BR libsimple_sumtimeval (3)
Calculate the sum of two durations.

.TP
.BR libsimple_timespec2timeval (3),
.TQ
.BR libsimple_timeval2timespec (3)
Convert a duration between to storage formats.

.TP
.BR libsimple_timespectodouble (3),
.TQ
.BR libsimple_timevaltodouble (3)
Convert a duration stored in a duration
specific format to a double.

.TP
.BR libsimple_timespectostr (3),
.TQ
.BR libsimple_timevaltostr (3),
.TQ
.BR libsimple_minimise_number_string (3)
Convert a duration stored in a duration
specific format to a string.

.TP
.BR libsimple_unlist (3),
.TQ
.BR LIBSIMPLE_UNLIST (3)
Remove an item from an array without changing the order of the items in the array.

.TP
.BR libsimple_valloc (3),
.TQ
.BR libsimple_evalloc (3),
.TQ
.BR libsimple_envalloc (3)
Implementation of the nonstandard
.BR valloc (3)
function.

.TP
.BR libsimple_vallocn (3),
.TQ
.BR libsimple_evallocn (3),
.TQ
.BR libsimple_envallocn (3),
.TQ
.BR libsimple_vvallocn (3),
.TQ
.BR libsimple_evvallocn (3),
.TQ
.BR libsimple_envvallocn (3)
Versions of
.BR libsimple_valloc (3)
that take the product of multiple arguments as the
allocation size.

.TP
.BR libsimple_vallocz (3),
.TQ
.BR libsimple_evallocz (3),
.TQ
.BR libsimple_envallocz (3)
Versions of
.BR libsimple_valloc (3)
that conditionally initialises the memory.

.TP
.BR libsimple_valloczn (3),
.TQ
.BR libsimple_evalloczn (3),
.TQ
.BR libsimple_envalloczn (3),
.TQ
.BR libsimple_vvalloczn (3),
.TQ
.BR libsimple_evvalloczn (3),
.TQ
.BR libsimple_envvalloczn (3)
Versions of
.BR libsimple_valloc (3)
that take the product of multiple arguments as the
allocation size and conditionally initialises the memory.

.TP
.BR libsimple_ewcsdup (3),
.TQ
.BR libsimple_enwcsdup (3),
.TQ
.BR libsimple_wcsndup (3),
.TQ
.BR libsimple_ewcsndup (3),
.TQ
.BR libsimple_enwcsndup (3)
Duplicate a wide-character string.

.TP
.BR libsimple_wcsdupa (3),
.TQ
.BR libsimple_wcsndupa (3)
Versions of
.BR wcsdup (3),
and
.BR libsimple_wcsndup (3)
that allocate the string on the stack.

.TP
.BR libsimple_wmemdup (3),
.TQ
.BR libsimple_ewmemdup (3),
.TQ
.BR libsimple_enwmemdup (3)
Duplicate an array of wide character.

.TP
.BR libsimple_wmemdupa (3)
Version of
.BR libsimple_wmemdup (3)
that allocate the string on the stack.

.SH APPLICATION USAGE
None.

.SH RATIONALE
None.

.SH FUTURE DIRECTIONS
None.

.SH NOTES
None.

.SH SEE ALSO
.BR libsimple-arg.h (0)