HTML-Valid

 view release on metacpan or  search on metacpan

tidy-html5.h  view on Meta::CPAN

*/
opaque_type( TidyIterator );

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* __TIDY_PLATFORM_H__ */

/*
 * DISABLEDLOCALVARIABLES
 * mode: c
 * indent-tabs-mode: nil
 * c-basic-offset: 4
 * eval: (c-set-offset 'substatement-open 0)
 * end:
 */
#ifndef __TIDYENUM_H__
#define __TIDYENUM_H__

/**************************************************************************//**
 * @file
 * Separated public enumerations header providing important indentifiers for
 * LibTidy and internal users, as well as code-generator macros used to
 * generate many of them.
 *
 * The use of enums simplifies enum re-use in various wrappers, e.g. SWIG,
 * generated wrappers, and COM IDL files.
 *
 * This file also contains macros to generate additional enums for use in
 * Tidy's language localizations and/or to access Tidy's strings via the API.
 * See detailed information elsewhere in this file's documentation.
 *
 * @note LibTidy does *not* guarantee the value of any enumeration member,
 * including the starting integer value, except where noted. Always use enum
 * members rather than their values!
 *
 * Enums that have starting values have starting values for a good reason,
 * mainly to prevent string key overlap.
 *
 * @author  Dave Raggett [dsr@w3.org]
 * @author  HTACG, et al (consult git log)
 *
 * @copyright
 *     Copyright (c) 1998-2017 World Wide Web Consortium (Massachusetts
 *     Institute of Technology, European Research Consortium for Informatics
 *     and Mathematics, Keio University).
 * @copyright
 *     See tidy.h for license.
 *
 * @date      Created 2001-05-20 by Charles Reitzel
 * @date      Updated 2002-07-01 by Charles Reitzel
 * @date      Further modifications: consult git log.
 ******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

/***************************************************************************//**
 ** @defgroup public_enum_gen Tidy Strings Generation Macros
 ** @ingroup internal_api
 **
 ** Tidy aims to provide a consistent API for library users, and so we go to
 ** some lengths to provide a `tidyStrings` enum that consists of the message
 ** code for every string that Tidy can emit (used internally), and the array
 ** `tidyStringsKeys[]` containing string representations of each message code.
 **
 ** In order to keep code maintainable and make it simple to add new messages,
 ** the message code enums and `tidyStringsKeys[]` are generated dynamically
 ** with preprocessor macros defined below.
 **
 ** Any visible FOREACH_MSG_* macro (including new ones) must be applied to the
 ** `tidyStrings` enum with the `MAKE_ENUM()` macro in this file, and to the
 ** `tidyStringsKeys[]` (in `messages.c`) with `MAKE_STRUCT` in this file.
 **
 ** Modern IDE's will dynamically pre-process all of these macros, enabling
 ** code-completion of these enums and array of structs.
 **
 ** @{
 ******************************************************************************/

/* MARK: - Code Generation Macros */
/** @name Code Generation Macros
 ** These macros generate the enums and arrays from the Content Generation
 ** Macros defined below.
 ** @{
 */

/** Used to populate the contents of an enumerator, such as `tidyStrings`. */
#define MAKE_ENUM(MESSAGE) MESSAGE,

/** Used to populate the contents of a structure, such as tidyStringsKeys[]. */
#define MAKE_STRUCT(MESSAGE) {#MESSAGE, MESSAGE},


/** @} */
/* MARK: - Content Generation Macros */
/** @name Content Generation Macros
 ** These macros generate the individual entries in the enums and structs used
 ** to manage strings in Tidy.
 ** @{
 */

/** Codes for populating TidyConfigCategory enumeration. */
#define FOREACH_TIDYCONFIGCATEGORY(FN)                                    \
    FN(TidyDiagnostics)      /**< Diagnostics */                          \
    FN(TidyDisplay)          /**< Affecting screen display */             \
    FN(TidyDocumentIO)       /**< Pertaining to document I/O */           \
    FN(TidyEncoding)         /**< Relating to encoding */                 \
    FN(TidyFileIO)           /**< Pertaining to file I/O */               \
    FN(TidyMarkupCleanup)    /**< Cleanup related options */              \
    FN(TidyMarkupEntities)   /**< Entity related options */               \
    FN(TidyMarkupRepair)     /**< Document repair related options */      \
    FN(TidyMarkupTeach)      /**< Teach tidy new things */                \
    FN(TidyMarkupXForm)      /**< Transform HTML one way or another */    \
    FN(TidyPrettyPrint)      /**< Pretty printing options */              \
    FN(TidyInternalCategory) /**< Option is internal only. */             \


/** These message codes comprise every possible message that can be output by
 ** Tidy that are *not* diagnostic style messages, and are *not* console
 ** application specific messages.
 */
#define FOREACH_MSG_MISC(FN) \
/** line %d column %d */                           FN(LINE_COLUMN_STRING)          \
/** %s: line %d column %d */                       FN(FN_LINE_COLUMN_STRING)       \
/** discarding */                                  FN(STRING_DISCARDING)           \
/** error and errors */                            FN(STRING_ERROR_COUNT_ERROR)    \
/** warning and warnings */                        FN(STRING_ERROR_COUNT_WARNING)  \
/** Accessibility hello message */                 FN(STRING_HELLO_ACCESS)         \
/** HTML Proprietary */                            FN(STRING_HTML_PROPRIETARY)     \
/** plain text */                                  FN(STRING_PLAIN_TEXT)           \
/** replacing */                                   FN(STRING_REPLACING)            \
/** specified */                                   FN(STRING_SPECIFIED)            \
/** XML declaration */                             FN(STRING_XML_DECLARATION)      \
/** no */                                          FN(TIDYCUSTOMNO_STRING)         \
/** block level */                                 FN(TIDYCUSTOMBLOCKLEVEL_STRING) \
/** empty */                                       FN(TIDYCUSTOMEMPTY_STRING)      \
/** inline */                                      FN(TIDYCUSTOMINLINE_STRING)     \
/** pre */                                         FN(TIDYCUSTOMPRE_STRING)        \

    
/** These messages are used to generate additional dialogue style output from
 ** Tidy when certain conditions exist, and provide more verbose explanations
 ** than the short report.
 */
#define FOREACH_FOOTNOTE_MSG(FN) \
    FN(FOOTNOTE_TRIM_EMPTY_ELEMENT) \
    FN(TEXT_ACCESS_ADVICE1)         \
    FN(TEXT_ACCESS_ADVICE2)         \
    FN(TEXT_BAD_FORM)               \
    FN(TEXT_BAD_MAIN)               \
    FN(TEXT_HTML_T_ALGORITHM)       \
    FN(TEXT_INVALID_URI)            \
    FN(TEXT_INVALID_UTF16)          \
    FN(TEXT_INVALID_UTF8)           \
    FN(TEXT_M_IMAGE_ALT)            \
    FN(TEXT_M_IMAGE_MAP)            \



( run in 1.088 second using v1.01-cache-2.11-cpan-df04353d9ac )