cake
/
libp7
Archived
1
0
Fork 1

Added HTML generation, slightly clarified p7_sinit's manpage

This commit is contained in:
Thomas Touhey 2017-03-03 15:57:21 +01:00
parent 37fa838e5c
commit 9f2d5a2c3c
4 changed files with 43 additions and 9 deletions

1
.gitignore vendored
View File

@ -5,5 +5,6 @@
/libp7.so*
/libp7.dll
/man
/html
.*.swp

View File

@ -15,7 +15,7 @@ mostlyclean: mostlyclean-lib mostlyclean-doc
mclean: mostlyclean
# Clean everything.
clean: clean-lib clean-doc
clean: clean-lib clean-doc clean-html
fclean: clean
# To original state.
@ -220,9 +220,9 @@ $(eval $(call make-moduleobj-rule,$(mod))))
# Make a manpage.
define make-manpage-rule
$(MANDIR)/man$1/%.$1: $(DOCDIR)/%.$1.txt | $(MANDIR)/man$1
$(call bcmd,a2x,$$<,$(A2X) -f manpage -D $$| $$< 2>/dev/null)
$(call bcmd,a2x,$$@,$(A2X) -f manpage -D $$| $$< 2>/dev/null)
endef
$(foreach section, $(MAN_SECTIONS), \
$(foreach section,$(MAN_SECTIONS), \
$(eval $(call make-manpage-rule,$(section))))
# Mostly clean (do nothing, really)
@ -270,4 +270,35 @@ $(eval $(call make-uninstall-doc-rule,$(sec))))
.PHONY: all-doc mostlyclean-doc mclean-doc clean-doc re-doc
.PHONY: install-doc uninstall-doc
.PHONY: $(foreach s,$(MAN_SECTIONS),install-doc-$(s) uninstall-doc-$(s))
#******************************************************************************#
# HTML documentation-related #
#******************************************************************************#
# Make all HTML files.
all-html: $(foreach s,$(MAN_SECTIONS), $(MAN_$(s):%=$(HTMLDIR)/%.$(s).html))
# Make the HTML directory.
$(HTMLDIR):
$(call bcmd,mkdir,$@,$(MD) $@)
# Make an HTML page file.
define make-htmlpage-rule
$(HTMLDIR)/%.$1.html: $(DOCDIR)/%.$1.txt | $(HTMLDIR)
$(call bcmd,a2x,$$@,$(A2X) -f xhtml -D $$| $$< 2>/dev/null)
endef
$(foreach section,$(MAN_SECTIONS),\
$(eval $(call make-htmlpage-rule,$(section))))
# Mostly clean (do nothing, really)
mostlyclean-html:
mclean-html: mostlyclean-html
# Remove all built html pages.
clean-html:
$(call rmsg,Removing HTML pages directory.)
$(call qcmd,$(RM) -r $(HTMLDIR))
# Remake all HTML pages
re-html: clean-html all-html
.PHONY: all-html mostlyclean-html mclean-html clean-html re-html
# End of file

View File

@ -51,6 +51,9 @@
# Manpages directory - where the manpages will be put.
MANDIR := ./man
# Web directory - where the HTML files will be put.
HTMLDIR := ./html
#******************************************************************************#
# Object names, libs #
#******************************************************************************#

View File

@ -41,13 +41,12 @@ it must be *NULL*! Otherwise, it will try to use the existing one!
DESCRIPTION
-----------
This initialization function will, as the others (see *p7_init*(3)), create
a handle that other functions will use to communicate with the calculator. It
will also initiate communication and detect the environment. The difference with
the other initialization functions is that this one is used by the others, as
it creates a P7 Stream using the sent data.
This function is a more advanced version of the functions defined *p7_init*(3):
where these functions use the built-in streams, `p7_sinit` let you define your
own stream, which means *it's up to you to make the connexion between the
external device and the library*.
The *p7_stream_t* structure is the following:
The stream structure is the following:
[source,c]
----