Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF.

This commit is contained in:
Roy Marples
2008-03-16 17:00:56 +00:00
parent 40e12f6ba0
commit cb9da6a262
41 changed files with 4675 additions and 5322 deletions

View File

@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd Feb 22, 2008
.Dd Mar 16, 2008
.Dt RC_RUNLEVEL 3 SMM
.Os OpenRC
.Sh NAME
@@ -35,7 +35,7 @@ Run Command library (librc, -lrc)
.In rc.h
.Ft "char *" Fn rc_runlevel_get void
.Ft bool Fn rc_runlevel_exists
.Ft "char **" Fn rc_runlevel_list void
.Ft "RC_STRINGLIST *" Fn rc_runlevel_list void
.Ft bool Fn rc_runlevel_set "const char *runlevel"
.Ft bool Fn rc_runlevel_starting void
.Ft bool Fn rc_runlevel_stopping void
@@ -48,10 +48,9 @@ Each function that returns
returns a malloced NULL terminated string that should be freed when done.
.Pp
Each function that returns
.Fr "char **"
returns a malloced NULL terminated array of malloced NULL terminated strings,
all of which need to be freed using
.Fn rc_strlist_free
.Fr "RC_STRINGLIST *"
should by freed by calling
.Fn rc_stringlist_free
when done.
.Sh FILES
.Pa /etc/init.d/functions.sh
@@ -62,6 +61,6 @@ Rinse and repeat for the other verbose functions.
.Sh SEE ALSO
.Xr malloc 3 ,
.Xr free 3
.Xr rc_strlist_free 3
.Xr rc_stringlist_free 3
.Sh AUTHORS
.An "Roy Marples" Aq roy@marples.name