From cc4bd717537482337d2b0ba22f7ce0e22df5b854 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 11 Oct 2024 23:18:10 -0700 Subject: nng_opts_parse converted to mdbook. --- docs/man/libnng.3.adoc | 14 +-- docs/man/nng_opts_parse.3supp.adoc | 185 ------------------------------------- 2 files changed, 8 insertions(+), 191 deletions(-) delete mode 100644 docs/man/nng_opts_parse.3supp.adoc (limited to 'docs/man') diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index 1ec270f2..e6a0da4b 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -277,11 +277,13 @@ Common functionality for message logging. === Supplemental API -These supplemental functions are not intrinsic to building -network applications with _NNG_, but they are made available -as a convenience to aid in creating portable applications. +NOTE: All these functions have been moved to new mdbook docs. -|=== +// These supplemental functions are not intrinsic to building +// network applications with _NNG_, but they are made available +// as a convenience to aid in creating portable applications. +// +// |=== // |xref:nng_clock.3supp.adoc[nng_clock()]|get time // |xref:nng_cv_alloc.3supp.adoc[nng_cv_alloc()]|allocate condition variable // |xref:nng_cv_free.3supp.adoc[nng_cv_free()]|free condition variable @@ -295,13 +297,13 @@ as a convenience to aid in creating portable applications. // |xref:nng_mtx_free.3supp.adoc[nng_mtx_free()]|free mutex // |xref:nng_mtx_lock.3supp.adoc[nng_mtx_lock()]|lock mutex // |xref:nng_mtx_unlock.3supp.adoc[nng_mtx_unlock()]|unlock mutex -|xref:nng_opts_parse.3supp.adoc[nng_opts_parse()]|parse command line options +// |xref:nng_opts_parse.3supp.adoc[nng_opts_parse()]|parse command line options // |xref:nng_random.3supp.adoc[nng_random()]|get random number // |xref:nng_socket_pair.3supp.adoc[nng_socket_pair()]|create connected pair of BSD sockets // |xref:nng_thread_create.3supp.adoc[nng_thread_create()]|create thread // |xref:nng_thread_destroy.3supp.adoc[nng_thread_destroy()]|reap thread // |xref:nng_thread_set_name.3supp.adoc[nng_thread_set_name()]|set thread name -|=== +// |=== === Byte Streams diff --git a/docs/man/nng_opts_parse.3supp.adoc b/docs/man/nng_opts_parse.3supp.adoc deleted file mode 100644 index beb9e1bf..00000000 --- a/docs/man/nng_opts_parse.3supp.adoc +++ /dev/null @@ -1,185 +0,0 @@ -= nng_opts_parse(3supp) -// -// Copyright 2018 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_opts_parse - parse command line options - -== SYNOPSIS - -[source, c] ----- -#include -#include - -typedef struct nng_optspec { - const char *o_name; // Long style name (may be NULL for short only) - int o_short; // Short option (no clustering!) - int o_val; // Value stored on a good parse (>0) - bool o_arg; // Option takes an argument if true -} nng_optspec; - -int nng_opts_parse(int argc, char *const *argv, const nng_optspec *spec, int *val, char **arg, int *idx); ----- - -== DESCRIPTION - -The `nng_opts_parse()` is function is a supplemental function intended to -facilitate parsing command line arguments. -This function exists largely to stand in for `getopt()` from POSIX -systems, but it is available everywhere that _NNG_ is, and it includes -some capabilities missing from `getopt()`. - -The function parses arguments from `main()` (using _argc_ and _argv_), -starting at the index referenced by _idx_. -(New invocations typically set the value pointed to by _idx_ to 1.) - -Options are parsed as specified by _spec_ (see <