diff options
Diffstat (limited to 'lib/enca/devel-docs/tmpl/analyser.sgml')
-rw-r--r-- | lib/enca/devel-docs/tmpl/analyser.sgml | 291 |
1 files changed, 0 insertions, 291 deletions
diff --git a/lib/enca/devel-docs/tmpl/analyser.sgml b/lib/enca/devel-docs/tmpl/analyser.sgml deleted file mode 100644 index 44f6460502..0000000000 --- a/lib/enca/devel-docs/tmpl/analyser.sgml +++ /dev/null @@ -1,291 +0,0 @@ -<!-- ##### SECTION Title ##### --> -Analyser - -<!-- ##### SECTION Short_Description ##### --> - -Basic analyser interface. - -<!-- ##### SECTION Long_Description ##### --> -<para> -Basically you want to allocate an analyser with enca_analyser_alloc() for some -language, use enca_analyse() (or enca_analyse_const()) on a buffer to find its -encoding, and interpret the results with something like enca_charset_name(). -The analyser then can be used for another buffer. Once you no longer need -it, call enca_analyser_free() to release it. -</para> - -<para> -A single working example is better than a hundred pages of reference manual. -</para> - -<example> -<title>A minimal Enca library application – Czech encoding -detector.</title> -<programlisting> -#include <stdio.h> -#include <enca.h> - -int -main(void) -{ - EncaAnalyser analyser; - EncaEncoding encoding; - unsigned char buffer[4096]; - size_t buflen; - - buflen = fread(buffer, 1, 4096, stdin); - analyser = enca_analyser_alloc("cs"); - encoding = enca_analyse(analyser, buffer, buflen); - printf("Charset: %%s\n", enca_charset_name(encoding.charset, - ENCA_NAME_STYLE_HUMAN)); - enca_analyser_free(analyser); - - return 0; -} -</programlisting> -</example> - -<para> -The analyser has plenty of options, but generally you don't need to fiddle -with them, except enca_set_termination_strictness(). -</para> - -<para> -All names prefixed with <function>ENCA_</function>, -<function>Enca</function>, <function>_Enca</function>, -or <function>enca_</function> should be treated as reserved and not used for -application function/variable/type/macro names. -</para> - -<!-- ##### SECTION See_Also ##### --> -<para> - -</para> - -<!-- ##### SECTION Stability_Level ##### --> - - -<!-- ##### FUNCTION enca_analyser_alloc ##### --> -<para> - -</para> - -@langname: -@Returns: - - -<!-- ##### FUNCTION enca_analyser_free ##### --> -<para> - -</para> - -@analyser: - - -<!-- ##### FUNCTION enca_analyse ##### --> -<para> - -</para> - -@analyser: -@buffer: -@size: -@Returns: - - -<!-- ##### FUNCTION enca_analyse_const ##### --> -<para> - -</para> - -@analyser: -@buffer: -@size: -@Returns: - - -<!-- ##### FUNCTION enca_errno ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_strerror ##### --> -<para> - -</para> - -@analyser: -@errnum: -@Returns: - - -<!-- ##### FUNCTION enca_double_utf8_check ##### --> -<para> - -</para> - -@analyser: -@buffer: -@size: -@Returns: - - -<!-- ##### FUNCTION enca_double_utf8_get_candidates ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_multibyte ##### --> -<para> - -</para> - -@analyser: -@multibyte: - - -<!-- ##### FUNCTION enca_get_multibyte ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_interpreted_surfaces ##### --> -<para> - -</para> - -@analyser: -@interpreted_surfaces: - - -<!-- ##### FUNCTION enca_get_interpreted_surfaces ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_ambiguity ##### --> -<para> - -</para> - -@analyser: -@ambiguity: - - -<!-- ##### FUNCTION enca_get_ambiguity ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_filtering ##### --> -<para> - -</para> - -@analyser: -@filtering: - - -<!-- ##### FUNCTION enca_get_filtering ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_garbage_test ##### --> -<para> - -</para> - -@analyser: -@garabage_test: - - -<!-- ##### FUNCTION enca_get_garbage_test ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_termination_strictness ##### --> -<para> - -</para> - -@analyser: -@termination_strictness: - - -<!-- ##### FUNCTION enca_get_termination_strictness ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_significant ##### --> -<para> - -</para> - -@analyser: -@significant: -@Returns: - - -<!-- ##### FUNCTION enca_get_significant ##### --> -<para> - -</para> - -@analyser: -@Returns: - - -<!-- ##### FUNCTION enca_set_threshold ##### --> -<para> - -</para> - -@analyser: -@threshold: -@Returns: - - -<!-- ##### FUNCTION enca_get_threshold ##### --> -<para> - -</para> - -@analyser: -@Returns: - - |