summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-11-22 08:47:06 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-11-22 08:47:06 +0100
commit55b64a02e7f3b1ce9e512240a9f9a337ead3b54c (patch)
tree2e99ea10ace9f57dd9b73db7f69562316533cdfb
parentc41daca3da6ffd033f93c3e24898414567f71eb3 (diff)
man pages - initial (dummy) version
-rw-r--r--Makefile.am8
-rw-r--r--configure.in8
-rw-r--r--man/Makefile.am16
-rw-r--r--man/convert2pdf.sh48
-rw-r--r--man/man1/zmq_forwarder.111
-rw-r--r--man/man3/zmq_bind.312
-rw-r--r--man/man3/zmq_close.312
-rw-r--r--man/man3/zmq_connect.312
-rw-r--r--man/man3/zmq_flush.312
-rw-r--r--man/man3/zmq_init.312
-rw-r--r--man/man3/zmq_poll.312
-rw-r--r--man/man3/zmq_recv.312
-rw-r--r--man/man3/zmq_send.312
-rw-r--r--man/man3/zmq_setsockopt.312
-rw-r--r--man/man3/zmq_socket.312
-rw-r--r--man/man3/zmq_term.312
-rw-r--r--man/man7/zmq.79
17 files changed, 229 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index fe0f1f0..af6ba2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,8 +2,12 @@ if BUILD_PERF
DIR_PERF = perf
endif
-SUBDIRS = src $(DIR_PERF) devices bindings
-DIST_SUBDIRS = src perf devices bindings
+if INSTALL_MAN
+DIR_MAN = man
+endif
+
+SUBDIRS = src $(DIR_MAN) $(DIR_PERF) devices bindings
+DIST_SUBDIRS = src man perf devices bindings
EXTRA_DIST = $(top_srcdir)/foreign/openpgm/@pgm1_basename@.tar.bz2 \
$(top_srcdir)/foreign/openpgm/@pgm2_basename@ \
diff --git a/configure.in b/configure.in
index 1b1db35..c2cf678 100644
--- a/configure.in
+++ b/configure.in
@@ -49,6 +49,10 @@ on_mingw32="no"
# Host speciffic checks
AC_CANONICAL_HOST
+# Whether or not install manual pages.
+# Note that on MinGW manpages are not installed.
+install_man="yes"
+
case "${host_os}" in
*linux*)
AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS])
@@ -134,6 +138,7 @@ case "${host_os}" in
[AC_MSG_ERROR([Could not link with Iphlpapi.dll.])])
CFLAGS="${CFLAGS} -std=c99"
on_mingw32="yes"
+ install_man="no"
;;
*)
AC_MSG_ERROR([Not supported os: $host.])
@@ -617,6 +622,7 @@ AM_CONDITIONAL(BUILD_FORWARDER, test "x$forwarder" = "xyes")
AM_CONDITIONAL(BUILD_PERF, test "x$perf" = "xyes")
AM_CONDITIONAL(ON_MINGW, test "x$on_mingw32" = "xyes")
AM_CONDITIONAL(BUILD_PGM2_EXAMPLES, test "x$with_pgm2_ext" = "xyes")
+AM_CONDITIONAL(INSTALL_MAN, test "x$install_man" = "xyes")
AC_SUBST(stdint)
AC_SUBST(inttypes)
@@ -631,7 +637,7 @@ AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset socket getifaddrs freeifaddrs)
-AC_OUTPUT(Makefile src/Makefile bindings/python/Makefile \
+AC_OUTPUT(Makefile src/Makefile man/Makefile bindings/python/Makefile \
bindings/python/setup.py bindings/ruby/Makefile \
bindings/java/Makefile perf/Makefile perf/c/Makefile perf/cpp/Makefile \
perf/python/Makefile perf/ruby/Makefile perf/java/Makefile src/libzmq.pc \
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..84e0e47
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,16 @@
+dist_man_MANS = man1/zmq_forwarder.1 man3/zmq_init.3 man3/zmq_term.3 \
+ man3/zmq_socket.3 man3/zmq_close.3 man3/zmq_setsockopt.3 man3/zmq_bind.3 \
+ man3/zmq_connect.3 man3/zmq_send.3 man3/zmq_flush.3 man3/zmq_recv.3 \
+ man3/zmq_poll.3 man7/zmq.7
+
+distclean-local:
+ -rm *.pdf
+ -rm man1/*.ps
+ -rm man3/*.ps
+ -rm man7/*.ps
+
+dist-hook:
+ ./convert2pdf.sh
+ $(mkdir_p) $(top_distdir)/doc
+ cp $(top_srcdir)/man/*.pdf $(top_distdir)/doc
+
diff --git a/man/convert2pdf.sh b/man/convert2pdf.sh
new file mode 100644
index 0000000..6a7029f
--- /dev/null
+++ b/man/convert2pdf.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# Copyright (c) 2007-2009 FastMQ Inc.
+#
+# This file is part of 0MQ.
+#
+# 0MQ is free software; you can redistribute it and/or modify it under
+# the terms of the Lesser GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# 0MQ is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# Lesser GNU General Public License for more details.
+#
+# You should have received a copy of the Lesser GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+groff -man -Tps man1/zmq_forwarder.1 > man1/zmq_forwarder.1.ps
+ps2pdf man1/zmq_forwarder.1.ps zmq_forwarder.pdf
+
+groff -man -Tps man3/zmq_init.3 > man3/zmq_init.3.ps
+ps2pdf man3/zmq_init.3.ps zmq_init.pdf
+groff -man -Tps man3/zmq_term.3 > man3/zmq_term.3.ps
+ps2pdf man3/zmq_term.3.ps zmq_term.pdf
+groff -man -Tps man3/zmq_socket.3 > man3/zmq_socket.3.ps
+ps2pdf man3/zmq_socket.3.ps zmq_socket.pdf
+groff -man -Tps man3/zmq_close.3 > man3/zmq_close.3.ps
+ps2pdf man3/zmq_close.3.ps zmq_close.pdf
+groff -man -Tps man3/zmq_setsockopt.3 > man3/zmq_setsockopt.3.ps
+ps2pdf man3/zmq_setsockopt.3.ps zmq_setsockopt.pdf
+groff -man -Tps man3/zmq_bind.3 > man3/zmq_bind.3.ps
+ps2pdf man3/zmq_bind.3.ps zmq_bind.pdf
+groff -man -Tps man3/zmq_connect.3 > man3/zmq_connect.3.ps
+ps2pdf man3/zmq_connect.3.ps zmq_connect.pdf
+groff -man -Tps man3/zmq_send.3 > man3/zmq_send.3.ps
+ps2pdf man3/zmq_send.3.ps zmq_send.pdf
+groff -man -Tps man3/zmq_flush.3 > man3/zmq_flush.3.ps
+ps2pdf man3/zmq_flush.3.ps zmq_flush.pdf
+groff -man -Tps man3/zmq_recv.3 > man3/zmq_recv.3.ps
+ps2pdf man3/zmq_recv.3.ps zmq_recv.pdf
+groff -man -Tps man3/zmq_poll.3 > man3/zmq_poll.3.ps
+ps2pdf man3/zmq_poll.3.ps zmq_poll.pdf
+
+groff -man -Tps man7/zmq.7 > man7/zmq.7.ps
+ps2pdf man7/zmq.7.ps zmq.pdf
+
diff --git a/man/man1/zmq_forwarder.1 b/man/man1/zmq_forwarder.1
new file mode 100644
index 0000000..63a0b6b
--- /dev/null
+++ b/man/man1/zmq_forwarder.1
@@ -0,0 +1,11 @@
+.TH zmq_forwarder 1 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_forwarder \- forwards the stream of PUB/SUB messages
+.SH SYNOPSIS
+.SH DESCRIPTION
+.SH OPTIONS
+.SH "SEE ALSO"
+.SH AUTHOR
+Martin Sustrik <sustrik at fastmq dot com>
+
+
diff --git a/man/man3/zmq_bind.3 b/man/man3/zmq_bind.3
new file mode 100644
index 0000000..70f1df7
--- /dev/null
+++ b/man/man3/zmq_bind.3
@@ -0,0 +1,12 @@
+.TH zmq_bind 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_bind \- binds the socket to the specified address
+.SH SYNOPSIS
+.B int zmq_bind (void *s, const char *addr);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_close.3 b/man/man3/zmq_close.3
new file mode 100644
index 0000000..c04f97a
--- /dev/null
+++ b/man/man3/zmq_close.3
@@ -0,0 +1,12 @@
+.TH zmq_close 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_close \- destroys 0MQ socket
+.SH SYNOPSIS
+.B int zmq_close (void *s);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_connect.3 b/man/man3/zmq_connect.3
new file mode 100644
index 0000000..c68101c
--- /dev/null
+++ b/man/man3/zmq_connect.3
@@ -0,0 +1,12 @@
+.TH zmq_connect 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_connect \- connects the socket to the specified address
+.SH SYNOPSIS
+.B int zmq_connect (void *s, const char *addr);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_flush.3 b/man/man3/zmq_flush.3
new file mode 100644
index 0000000..f84c561
--- /dev/null
+++ b/man/man3/zmq_flush.3
@@ -0,0 +1,12 @@
+.TH zmq_flush 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_flush \- flushes pre-sent messages to the socket
+.SH SYNOPSIS
+.B int zmq_flush (void *s);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_init.3 b/man/man3/zmq_init.3
new file mode 100644
index 0000000..04f04ef
--- /dev/null
+++ b/man/man3/zmq_init.3
@@ -0,0 +1,12 @@
+.TH zmq_init 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_init \- initialises 0MQ context
+.SH SYNOPSIS
+.B void *zmq_init (int app_threads, int io_threads, int flags);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_poll.3 b/man/man3/zmq_poll.3
new file mode 100644
index 0000000..d821e9f
--- /dev/null
+++ b/man/man3/zmq_poll.3
@@ -0,0 +1,12 @@
+.TH zmq_poll 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_poll \- polls for events on a set of 0MQ and POSIX sockets
+.SH SYNOPSIS
+.B int zmq_poll (zmq_pollitem_t *items, int nitems);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_recv.3 b/man/man3/zmq_recv.3
new file mode 100644
index 0000000..8308f79
--- /dev/null
+++ b/man/man3/zmq_recv.3
@@ -0,0 +1,12 @@
+.TH zmq_recv 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_recv \- retrieves a message from the socket
+.SH SYNOPSIS
+.B int zmq_recv (void *s, zmq_msg_t *msg, int flags);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_send.3 b/man/man3/zmq_send.3
new file mode 100644
index 0000000..ff6e429
--- /dev/null
+++ b/man/man3/zmq_send.3
@@ -0,0 +1,12 @@
+.TH zmq_send 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_send \- sends a message
+.SH SYNOPSIS
+.B int zmq_send (void *s, zmq_msg_t *msg, int flags);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_setsockopt.3 b/man/man3/zmq_setsockopt.3
new file mode 100644
index 0000000..da528cf
--- /dev/null
+++ b/man/man3/zmq_setsockopt.3
@@ -0,0 +1,12 @@
+.TH zmq_setsockopt 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_setsockopt \- sets a specified option on a 0MQ socket
+.SH SYNOPSIS
+.B int zmq_setsockopt (void *s, int option, const void *optval, size_t optvallen);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_socket.3 b/man/man3/zmq_socket.3
new file mode 100644
index 0000000..f404b6b
--- /dev/null
+++ b/man/man3/zmq_socket.3
@@ -0,0 +1,12 @@
+.TH zmq_socket 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_socket \- creates 0MQ socket
+.SH SYNOPSIS
+.B void *zmq_socket (void *context, int type);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man3/zmq_term.3 b/man/man3/zmq_term.3
new file mode 100644
index 0000000..afd3273
--- /dev/null
+++ b/man/man3/zmq_term.3
@@ -0,0 +1,12 @@
+.TH zmq_term 3 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+zmq_init \- terminates 0MQ context
+.SH SYNOPSIS
+.B int zmq_term (void *context);
+.SH DESCRIPTION
+.SH RETURN VALUE
+.SH ERRORS
+.SH EXAMPLE
+.SH SEE ALSO
+.SH AUTHOR
+Martin Sustrik <sustrik at 250bpm dot com>
diff --git a/man/man7/zmq.7 b/man/man7/zmq.7
new file mode 100644
index 0000000..02257a7
--- /dev/null
+++ b/man/man7/zmq.7
@@ -0,0 +1,9 @@
+.TH zmq 7 "" "(c)2007-2009 FastMQ Inc." "0MQ User Manuals"
+.SH NAME
+0MQ \- a lightweight messaging kernel
+.SH SYNOPSIS
+.SH DESCRIPTION
+.SH "SEE ALSO"
+.SH AUTHOR
+Martin Sustrik <sustrik at fastmq dot com>
+