#include "php.h"
#include "php_tidy.h"
-#if HAVE_TIDY
+#ifdef HAVE_TIDY
#include "php_ini.h"
#include "ext/standard/info.h"
-#if HAVE_TIDY_H
+#ifdef HAVE_TIDY_H
#include "tidy.h"
-#elif HAVE_TIDYP_H
+#elif defined(HAVE_TIDYP_H)
#include "tidyp.h"
#endif
-#if HAVE_TIDYBUFFIO_H
+#ifdef HAVE_TIDYBUFFIO_H
#include "tidybuffio.h"
#else
#include "buffio.h"
{
php_info_print_table_start();
php_info_print_table_row(2, "Tidy support", "enabled");
-#if HAVE_TIDYBUFFIO_H
+#ifdef HAVE_TIDYBUFFIO_H
php_info_print_table_row(2, "libTidy Version", (char *)tidyLibraryVersion());
-#elif HAVE_TIDYP_H
+#elif defined(HAVE_TIDYP_H)
php_info_print_table_row(2, "libtidyp Version", (char *)tidyVersion());
#endif
-#if HAVE_TIDYRELEASEDATE
+#ifdef HAVE_TIDYRELEASEDATE
php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate());
#endif
php_info_print_table_end();
RETURN_THROWS();
}
-#if HAVE_TIDYRELEASEDATE
+#ifdef HAVE_TIDYRELEASEDATE
RETURN_STRING((char *)tidyReleaseDate());
#else
RETURN_STRING((char *)"unknown");
/* }}} */
-#if HAVE_TIDYOPTGETDOC
+#ifdef HAVE_TIDYOPTGETDOC
/* {{{ proto string tidy_get_opt_doc(tidy resource, string optname)
Returns the documentation for the given option name */
PHP_FUNCTION(tidy_get_opt_doc)
TIDY_TAG_CONST(VAR);
TIDY_TAG_CONST(WBR);
TIDY_TAG_CONST(XMP);
-# if HAVE_TIDYBUFFIO_H
+# ifdef HAVE_TIDYBUFFIO_H
TIDY_TAG_CONST(ARTICLE);
TIDY_TAG_CONST(ASIDE);
TIDY_TAG_CONST(AUDIO);
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_tidy_get_release, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()
-#if HAVE_TIDYOPTGETDOC
+#if defined(HAVE_TIDYOPTGETDOC)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_tidy_get_opt_doc, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_OBJ_INFO(0, object, tidy, 0)
ZEND_ARG_TYPE_INFO(0, optname, IS_STRING, 0)
#define arginfo_class_tidy_getHtmlVer arginfo_class_tidy_cleanRepair
-#if HAVE_TIDYOPTGETDOC
+#if defined(HAVE_TIDYOPTGETDOC)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_tidy_getOptDoc, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, optname, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_FUNCTION(tidy_repair_file);
ZEND_FUNCTION(tidy_diagnose);
ZEND_FUNCTION(tidy_get_release);
-#if HAVE_TIDYOPTGETDOC
+#if defined(HAVE_TIDYOPTGETDOC)
ZEND_FUNCTION(tidy_get_opt_doc);
#endif
ZEND_FUNCTION(tidy_get_config);
ZEND_FE(tidy_repair_file, arginfo_tidy_repair_file)
ZEND_FE(tidy_diagnose, arginfo_tidy_diagnose)
ZEND_FE(tidy_get_release, arginfo_tidy_get_release)
-#if HAVE_TIDYOPTGETDOC
+#if defined(HAVE_TIDYOPTGETDOC)
ZEND_FE(tidy_get_opt_doc, arginfo_tidy_get_opt_doc)
#endif
ZEND_FE(tidy_get_config, arginfo_tidy_get_config)
ZEND_ME_MAPPING(getConfig, tidy_get_config, arginfo_class_tidy_getConfig, ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(getStatus, tidy_get_status, arginfo_class_tidy_getStatus, ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(getHtmlVer, tidy_get_html_ver, arginfo_class_tidy_getHtmlVer, ZEND_ACC_PUBLIC)
-#if HAVE_TIDYOPTGETDOC
+#if defined(HAVE_TIDYOPTGETDOC)
ZEND_ME_MAPPING(getOptDoc, tidy_get_opt_doc, arginfo_class_tidy_getOptDoc, ZEND_ACC_PUBLIC)
#endif
ZEND_ME_MAPPING(isXhtml, tidy_is_xhtml, arginfo_class_tidy_isXhtml, ZEND_ACC_PUBLIC)