diff options
Diffstat (limited to 'lib/asn1/doc/src')
-rw-r--r-- | lib/asn1/doc/src/Makefile | 106 | ||||
-rw-r--r-- | lib/asn1/doc/src/asn1ct.xml | 94 | ||||
-rw-r--r-- | lib/asn1/doc/src/make.dep | 31 | ||||
-rw-r--r-- | lib/asn1/doc/src/notes.xml | 77 |
4 files changed, 143 insertions, 165 deletions
diff --git a/lib/asn1/doc/src/Makefile b/lib/asn1/doc/src/Makefile index d29225f6c9..9ef5750353 100644 --- a/lib/asn1/doc/src/Makefile +++ b/lib/asn1/doc/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2009. All Rights Reserved. +# Copyright Ericsson AB 1997-2011. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -27,15 +27,6 @@ include ../../vsn.mk VSN=$(ASN1_VSN) APPLICATION=asn1 - -# ---------------------------------------------------- -# Include dependency -# ---------------------------------------------------- - -ifndef DOCSUPPORT -include make.dep -endif - # ---------------------------------------------------- # Release directory specification # ---------------------------------------------------- @@ -86,34 +77,10 @@ EXTRA_FILES = \ MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) -ifdef DOCSUPPORT - HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf -else - -TEX_FILES_BOOK = \ - $(BOOK_FILES:%.xml=%.tex) \ - $(BOOK_FILES:%.xml=%.sgml) part.tex -TEX_FILES_REF_MAN = $(XML_REF3_FILES:%.xml=%.tex) \ - $(XML_APPLICATION_FILES:%.xml=%.tex) -TEX_FILES_USERS_GUIDE = \ - $(XML_CHAPTER_FILES:%.xml=%.tex) - -TOP_PDF_FILE = $(APPLICATION)-$(VSN).pdf -TOP_PS_FILE = $(APPLICATION)-$(VSN).ps - -$(TOP_PDF_FILE): book.dvi ../../vsn.mk - $(DVI2PS) $(DVIPS_FLAGS) -f $< | $(DISTILL) $(DISTILL_FLAGS) > $@ - -$(TOP_PS_FILE): book.dvi ../../vsn.mk - $(DVI2PS) $(DVIPS_FLAGS) -f $< > $@ - -endif - - # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- @@ -126,8 +93,6 @@ DVIPS_FLAGS += $(HTMLDIR)/%.gif: %.gif $(INSTALL_DATA) $< $@ -ifdef DOCSUPPORT - docs: pdf html man $(TOP_PDF_FILE): $(XML_FILES) @@ -142,32 +107,6 @@ clean clean_docs: rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) rm -f $(GEN_XML) errs core *~ -else - -ifeq ($(DOCTYPE),pdf) -docs: pdf -else -ifeq ($(DOCTYPE),ps) -docs: ps -else -docs: html gifs man -endif -endif - -pdf: $(TOP_PDF_FILE) - -ps: $(TOP_PS_FILE) - -html: $(HTML_FILES) - -clean clean_docs clean_tex: - rm -f $(TEX_FILES_USERS_GUIDE) $(TEX_FILES_REF_MAN) $(TEX_FILES_BOOK) - rm -f $(HTML_FILES) $(MAN3_FILES) - rm -f $(TOP_PDF_FILE) $(TOP_PS_FILE) - rm -f errs core *~ $(LATEX_CLEAN) - -endif - man: $(MAN3_FILES) gifs: $(GIF_FILES:%=$(HTMLDIR)/%) @@ -179,43 +118,14 @@ debug opt: # ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mk -ifdef DOCSUPPORT - release_docs_spec: docs - $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf - $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf - $(INSTALL_DIR) $(RELSYSDIR)/doc/html + $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf" + $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf" + $(INSTALL_DIR) "$(RELSYSDIR)/doc/html" $(INSTALL_DATA) $(HTMLDIR)/* \ - $(RELSYSDIR)/doc/html - $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) - $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 - $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3 - -else - -ifeq ($(DOCTYPE),pdf) -release_docs_spec: pdf - $(INSTALL_DIR) $(RELEASE_PATH)/pdf - $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELEASE_PATH)/pdf -else -ifeq ($(DOCTYPE),ps) -release_docs_spec: ps - $(INSTALL_DIR) $(RELEASE_PATH)/ps - $(INSTALL_DATA) $(TOP_PS_FILE) $(RELEASE_PATH)/ps -else -release_docs_spec: docs - $(INSTALL_DIR) $(RELSYSDIR)/doc/html - $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTML_FILES) \ - $(HTML_APPHISTORY) $(RELSYSDIR)/doc/html - $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR) - $(INSTALL_DIR) $(RELEASE_PATH)/man/man3 - $(INSTALL_DATA) $(MAN3_FILES) $(RELEASE_PATH)/man/man3 -endif -endif - -endif + "$(RELSYSDIR)/doc/html" + $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" + $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" + $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" release_spec: - - - diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml index 0b9ec3df7f..3be58cbc8e 100644 --- a/lib/asn1/doc/src/asn1ct.xml +++ b/lib/asn1/doc/src/asn1ct.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2011</year> + <year>1997</year><year>2012</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -44,15 +44,15 @@ </description> <funcs> <func> - <name>compile(Asn1module) -> ok | {error,Reason}</name> - <name>compile(Asn1module , Options) -> ok | {error,Reason}</name> + <name>compile(Asn1module) -> ok | {error, Reason}</name> + <name>compile(Asn1module, Options) -> ok | {error, Reason}</name> <fsummary>Compile an ASN.1 module and generate encode/decode functions according to the encoding rules BER or PER.</fsummary> <type> <v>Asn1module = atom() | string()</v> <v>Options = [Option| OldOption]</v> - <v>Option = ber_bin | per_bin | uper_bin | der | compact_bit_string | - noobj | {n2n,EnumTypeName} |{outdir,Dir} | {i,IncludeDir} | optimize | - nif | asn1config | undec_rest | {inline,OutputName} | inline | + <v>Option = ber_bin | per_bin | uper_bin | der | compact_bit_string | + noobj | {n2n, EnumTypeName} |{outdir, Dir} | {i, IncludeDir} | optimize | + nif | asn1config | undec_rest | {inline, OutputName} | inline | {macro_name_prefix, Prefix} | {record_name_prefix, Prefix} | verbose | warnings_as_errors</v> <v>OldOption = ber | per</v> <v>Reason = term()</v> @@ -158,7 +158,7 @@ File3.asn </pre> of the BIT STRING type in Erlang. The notation: </p> <pre> -BitString = {Unused,Binary}, +BitString = {Unused, Binary}, Unused = integer(), Binary = binary() </pre> @@ -172,7 +172,7 @@ Binary = binary() </seealso>. </p> </item> - <tag><c>{n2n,EnumTypeName}</c></tag> + <tag><c>{n2n, EnumTypeName}</c></tag> <item> <p> Tells the compiler to generate functions for conversion between @@ -190,17 +190,17 @@ Binary = binary() <c>.erl</c> file. If this option is omitted the generated Erlang module will be compiled.</p> </item> - <tag><c>{i,IncludeDir}</c></tag> + <tag><c>{i, IncludeDir}</c></tag> <item> <p>Adds <c>IncludeDir</c> to the search-path for <c>.asn1db</c> and asn1 source files. The compiler tries to open a <c>.asn1db</c> file when a module imports definitions from another ASN.1 module. If no <c>.asn1db</c> file is found the asn1 source file is - parsed. Several <c>{i,IncludeDir}</c> can be given. + parsed. Several <c>{i, IncludeDir}</c> can be given. </p> </item> - <tag><c>{outdir,Dir}</c></tag> + <tag><c>{outdir, Dir}</c></tag> <item> <p>Specifies the directory <c>Dir</c> where all generated files shall be placed. If omitted the files are placed in the @@ -251,11 +251,11 @@ Binary = binary() also have some following bytes. Now it is possible to get those following bytes returned together with the decoded value. If an asn1 spec is compiled with this option a tuple - <c>{ok,Value,Rest}</c> is returned. <c>Rest</c> may be a + <c>{ok, Value, Rest}</c> is returned. <c>Rest</c> may be a list or a binary. Earlier versions of the compiler ignored those following bytes.</p> </item> - <tag><c>{inline,OutputName}</c></tag> + <tag><c>{inline, OutputName}</c></tag> <item> <p>Compiling with this option gives one output module containing all asn1 run-time functionality. The asn1 specs @@ -267,7 +267,7 @@ Binary = binary() by the <c>igor</c> module of <c>syntax_tools</c>. By default the functions generated from the first asn1 spec in the <c>.set.asn</c> are exported, unless a - <c>{export,[atom()]}</c> or <c>{export_all,true}</c> option + <c>{export, [atom()]}</c> or <c>{export_all, true}</c> option are provided. The list of atoms are names of chosen asn1 specs from the <c>.set.asn</c> file. </p> <p>When used together with <c>nif</c> for <c>ber_bin</c>, the @@ -278,7 +278,7 @@ Binary = binary() <tag><c>inline</c></tag> <item> <p>It is also possible to use the sole argument <c>inline</c>. - It is as <c>{inline,OutputName}</c>, but the output file gets the + It is as <c>{inline, OutputName}</c>, but the output file gets the default name of the source <c>.set.asn</c> file.</p> </item> <tag><c>{macro_name_prefix, Prefix}</c></tag> @@ -322,7 +322,7 @@ Binary = binary() </desc> </func> <func> - <name>encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason}</name> + <name>encode(Module, Type, Value)-> {ok, Bytes} | {error, Reason}</name> <fsummary>Encode an ASN.1 value.</fsummary> <type> <v>Module = Type = atom()</v> @@ -337,13 +337,13 @@ Binary = binary() encode function only performs rudimentary tests that the input <c>Value</c> is a correct instance of <c>Type</c>. The length of strings is for example - not always checked. Returns <c>{ok,Bytes}</c> if successful or - <c>{error,Reason}</c> if an error occurred. + not always checked. Returns <c>{ok, Bytes}</c> if successful or + <c>{error, Reason}</c> if an error occurred. </p> </desc> </func> <func> - <name>decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}</name> + <name>decode(Module, Type, Bytes) -> {ok, Value} | {error, Reason}</name> <fsummary>Decode from Bytes into an ASN.1 value.</fsummary> <type> <v>Module = Type = atom()</v> @@ -352,11 +352,11 @@ Binary = binary() </type> <desc> <p>Decodes <c>Type</c> from <c>Module</c> from the list of bytes - <c>Bytes</c>. Returns <c>{ok,Value}</c> if successful.</p> + <c>Bytes</c>. Returns <c>{ok, Value}</c> if successful.</p> </desc> </func> <func> - <name>value(Module ,Type) -> {ok,Value} | {error,Reason}</name> + <name>value(Module, Type) -> {ok, Value} | {error, Reason}</name> <fsummary>Create an ASN.1 value for test purposes.</fsummary> <type> <v>Module = Type = atom()</v> @@ -371,26 +371,48 @@ Binary = binary() </desc> </func> <func> - <name>test(Module) -> ok | {error,Reason}</name> - <name>test(Module,Type) -> ok | {error,Reason}</name> - <name>test(Module,Type,Value) -> ok | {error,Reason}</name> - <fsummary>Perform a test of encode and decode for types in an ASN.1 module.</fsummary> + <name>test(Module) -> ok | {error, Reason}</name> + <name>test(Module, Type | Options) -> ok | {error, Reason}</name> + <name>test(Module, Type, Value | Options) -> ok | {error, Reason}</name> + <fsummary>Perform a test of encode and decode for types in an ASN.1 module.</fsummary> + <type> + <v>Module = Type = atom()</v> + <v>Value = term()</v> + <v>Options = [{i, IncludeDir}]</v> + <v>Reason = term()</v> + </type> <desc> - <p>Performs a test of encode and decode of all types in <c>Module</c>. + <p>Performs a test of encode and decode of types in <c>Module</c>. The generated functions are called by this function. This function is useful during test to secure that the generated - encode and decode functions and the general runtime support work - as expected. <br></br> -<c>test/1</c> iterates over all types in <c>Module</c>. <br></br> -<c>test/2</c> tests type <c>Type</c> with a random value. <br></br> -<c><![CDATA[test/3 tests type <c>Type]]></c> with <c>Value</c>. <br></br> + encode and decode functions and the general runtime support work + as expected.</p> + + <list type="bulleted"> + <item> + <p><c>test/1</c> iterates over all types in <c>Module</c>.</p> + </item> + <item> + <p><c>test/2</c> tests type <c>Type</c> with a random value.</p> + </item> + <item> + <p><c>test/3</c> tests type <c>Type</c> with <c>Value</c>.</p> + </item> + </list> - Schematically the following happens for each type in the module.</p> - <p></p> + <p>Schematically the following happens for each type in the module: <code type="none"> -{ok,Value} = asn1ct:value(Module,Type), -{ok,Bytes} = asn1ct:encode(Module,Type,Value), -{ok,Value} = asn1ct:decode(Module,Type,Bytes). </code> +{ok, Value} = asn1ct:value(Module, Type), +{ok, Bytes} = asn1ct:encode(Module, Type, Value), +{ok, Value} = asn1ct:decode(Module, Type, Bytes).</code></p> + + <p>The <c>test</c> functions utilizes the <c>*.asn1db</c> files + for all included modules. If they are located in a different + directory than the current working directory, use the include + option to add paths. This is only needed when automatically + generating values. For static values using <c>Value</c> no + options are needed.</p> + </desc> </func> </funcs> diff --git a/lib/asn1/doc/src/make.dep b/lib/asn1/doc/src/make.dep deleted file mode 100644 index eb2c0e9a98..0000000000 --- a/lib/asn1/doc/src/make.dep +++ /dev/null @@ -1,31 +0,0 @@ -# ---------------------------------------------------- -# >>>> Do not edit this file <<<< -# This file was automaticly generated by -# /home/gandalf/otp/bin/docdepend -# ---------------------------------------------------- - - -# ---------------------------------------------------- -# TeX files that the DVI file depend on -# ---------------------------------------------------- - -book.dvi: asn1_spec.tex asn1_ug.tex asn1ct.tex asn1rt.tex \ - book.tex part.tex ref_man.tex - -# ---------------------------------------------------- -# Source inlined when transforming from source to LaTeX -# ---------------------------------------------------- - -asn1_spec.tex: Seq.asn Seq.asn1config - -book.tex: part.xml ref_man.xml - -asn1_ug.tex: ../../../../system/doc/definitions/cite.defs - -# ---------------------------------------------------- -# Pictures that the DVI file depend on -# ---------------------------------------------------- - -book.dvi: exclusive_Win_But.ps selective_TypeList.ps \ - selective_Window2.ps - diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml index 52d770c9f6..b5422c9083 100644 --- a/lib/asn1/doc/src/notes.xml +++ b/lib/asn1/doc/src/notes.xml @@ -31,6 +31,83 @@ <p>This document describes the changes made to the asn1 application.</p> +<section><title>Asn1 1.7</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Some ASN.1 INTEGER type and SEQUENCE constructor variants + previously not handled by the ASN.1 compiler are now + correctly handled</p> + <p> + Own Id: OTP-9688</p> + </item> + <item> + <p> + An INTEGER with a value constraint where unions are used + e.g. X1 ::= INTEGER (1..4 | 6 | 8 | 10 | 20) is not + handled correctly. For PER the value is encoded in wrong + number of bits.</p> + <p> + Own Id: OTP-9946</p> + </item> + </list> + </section> + +</section> + +<section><title>Asn1 1.6.19</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + The linked-in driver used for ber decode and per encode + has been replaced with nifs. To enable the usage of nifs + pass the nif option to erlc or asn1rt:compile when + compiling. If you previously used the linked-in driver, + you have to recompile your ASN1 modules with the current + version of asn1 application as the linked-in driver + modules have been removed.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-9419</p> + </item> + <item> + <p> + A few of the heavy calculations which are done for + encoding and decoding operations when dealing with + SEQUENCE OF and DEFAULT in runtime have been moved to be + done in compile time instead.</p> + <p> + Own Id: OTP-9440</p> + </item> + <item> + <p> + When compiling an ASN.1 ber module with the +nif option, + the module will use a new nif for ber encoding, + increasing performance by about 5%.</p> + <p> + Own Id: OTP-9441</p> + </item> + <item> + <p> + Tuple funs (a two-element tuple with a module name and a + function) are now officially deprecated and will be + removed in R16. Use '<c>fun M:F/A</c>' instead. To make + you aware that your system uses tuple funs, the very + first time a tuple fun is applied, a warning will be sent + to the error logger.</p> + <p> + Own Id: OTP-9649</p> + </item> + </list> + </section> + +</section> + <section><title>Asn1 1.6.18</title> <section><title>Fixed Bugs and Malfunctions</title> |