Permalink
Browse files

This commit was manufactured by cvs2svn to create tag 'SQLITE_4_3_200…

…41227'.
  • Loading branch information...
1 parent fff93cd commit db7b5b196a00f14cb626758257a42b9c8c02cd1c SVN Migration committed Dec 12, 2004
View
@@ -1,2 +0,0 @@
-tidy
-John Coggeshall, Ilia Alshanetsky
View
@@ -1,52 +0,0 @@
-
-README FOR ext/tidy by John Coggeshall <john@php.net>
-
-Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows a PHP developer
-to clean, repair, and traverse HTML, XHTML, and XML documents -- including ones with
-embedded scripting languages such as PHP or ASP within them using OO constructs.
-
-
-The general API is provided below:
-
- tidy_create() Reinitialize the tidy engine
- tidy_parse_file($file) Parse the document stored in $file
- tidy_parse_string($str) Parse the string stored in $str
-
- tidy_clean_repair() Clean and repair the document
- tidy_diagnose() Diagnose a parsed document
-
- tidy_setopt($opt, $val) Set a configuration option $opt to $val
- tidy_getopt($opt) Retrieve a configuration option
-
- ** note: $opt is a string representing the option. Although no formal
- documentation yet exists for PHP, you can find a description of many
- of them at http://www.w3.org/People/Raggett/tidy/ and a list of supported
- options in the phpinfo(); output**
-
- tidy_get_output() Return the cleaned tidy HTML as a string
- tidy_get_error_buffer() Return a log of the errors and warnings
- returned by tidy
-
- tidy_get_release() Return the Libtidy release date
- tidy_get_status() Return the status of the document
- tidy_get_html_ver() Return the major HTML version detected for
- the document;
-
- tidy_is_xhtml() Determines if the document is XHTML
- tidy_is_xml() Determines if the document is a generic XML
-
- tidy_error_count() Returns the number of errors in the document
- tidy_warning_count() Returns the number of warnings in the document
- tidy_access_count() Returns the number of accessibility-related
- warnings in the document.
- tidy_config_count() Returns the number of configuration errors found
-
- tidy_load_config($file) Loads the specified configuration file
- tidY_load_config_enc($file,
- $enc) Loads the specified config file using the specified
- character encoding
- tidy_set_encoding($enc) Sets the current character encoding for the document
- tidy_save_config($file) Saves the current config to $file
-
-
-E-mail thoughts, suggestions, patches, etc. to <john@php.net>
View
@@ -1,3 +0,0 @@
-TODO
-
-
View
@@ -1,35 +0,0 @@
-dnl
-dnl $Id$
-dnl
-
-PHP_ARG_WITH(tidy,for TIDY support,
-[ --with-tidy[=DIR] Include TIDY support])
-
-if test "$PHP_TIDY" != "no"; then
- PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared)
- if test "$PHP_TIDY" != "yes"; then
- TIDY_SEARCH_DIRS=$PHP_TIDY
- else
- TIDY_SEARCH_DIRS="/usr/local /usr"
- fi
- for i in $TIDY_SEARCH_DIRS; do
- if test -f $i/include/tidy/tidy.h; then
- TIDY_DIR=$i
- TIDY_INCDIR=$i/include/tidy
- elif test -f $i/include/tidy.h; then
- TIDY_DIR=$i
- TIDY_INCDIR=$i/include
- fi
- done
-
- if test -z "$TIDY_DIR"; then
- AC_MSG_ERROR(Cannot find libtidy)
- fi
-
- TIDY_LIBDIR=$TIDY_DIR/lib
-
- AC_DEFINE(HAVE_TIDY,1,[ ])
- PHP_SUBST(TIDY_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD)
- PHP_ADD_INCLUDE($TIDY_INCDIR)
-fi
@@ -1,38 +0,0 @@
-<?php
-
- /*
- * cleanhtml.php
- *
- * A simple script to clean and repair HTML,XHTML,PHP,ASP,etc. documents
- * if no file is provided, it reads from standard input.
- *
- * By: John Coggeshall <john@php.net>
- *
- * Usage: php cleanhtml.php [filename]
- *
- */
-
- if(!isset($_SERVER['argv'][1])) {
- $data = file_get_contents("php://stdin");
- tidy_parse_string($data);
- } else {
- tidy_parse_file($_SERVER['argv'][1]);
- }
-
- tidy_clean_repair();
-
- if(tidy_warning_count() ||
- tidy_error_count()) {
-
- echo "\n\nThe following errors or warnings occured:\n";
- echo tidy_get_error_buffer();
- echo "\n";
- }
-
- echo tidy_get_output();
-
-?>
-
-
-
-
View
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE package SYSTEM "../pear/package.dtd">
-<package>
- <name>tidy</name>
- <summary>Tidy HTML Repairing and Parsing</summary>
- <maintainers>
- <maintainer>
- <user>john</user>
- <name>John Coggeshall</name>
- <email>john@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>iliaa</user>
- <name>Ilia Alshanetsky</name>
- <email>ilia@php.net</email>
- <role>lead</role>
- </maintainer>
- </maintainers>
- <description>
-Tidy is a binding for the Tidy HTML clean and repair utility which
-allows you to not only clean and otherwise manipluate HTML documents,
-but also traverse the document tree using the Zend Engine 2 OO semantics.
- </description>
- <license>PHP</license>
- <release>
- <state>stable</state>
- <version>1.0</version>
- <date>2003-11-13</date>
- <notes>
- Fixed a few PHP5-specific bugs when working with node objects.
- </notes>
- <configureoptions>
- <configureoption name="with-tidy" default="autodetect" prompt="Tidy library installation dir?"/>
- </configureoptions>
- <filelist>
- <file role="src" name="config.m4"/>
- <file role="src" name="tidy.c"/>
- <file role="src" name="php_tidy.h"/>
-
- <file role="doc" name="CREDITS"/>
- <file role="doc" name="README"/>
- <file role="doc" name="TODO"/>
- <file role="doc" name="examples/cleanhtml.php"/>
- <file role="doc" name="examples/dumpit.php"/>
- <file role="doc" name="examples/urlgrab.php"/>
-
- <file role="test" name="tests/001.phpt"/>
- <file role="test" name="tests/002.phpt"/>
- <file role="test" name="tests/003.phpt"/>
- <file role="test" name="tests/004.phpt"/>
- <file role="test" name="tests/005.phpt"/>
- <file role="test" name="tests/005.html"/>
- <file role="test" name="tests/006.phpt"/>
- <file role="test" name="tests/007.phpt"/>
- </filelist>
- <deps>
- <dep type="php" rel="ge">4.3.0</dep>
- </deps>
- </release>
-</package>
-<!--
-vim:et:ts=1:sw=1
--->
View
@@ -1,128 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2003 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: John Coggeshall <john@php.net> |
- | Ilia Alshanetsky <ilia@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-#ifndef PHP_TIDY_H
-#define PHP_TIDY_H
-
-extern zend_module_entry tidy_module_entry;
-#define phpext_tidy_ptr &tidy_module_entry
-
-#ifdef PHP_WIN32
-#define PHP_TIDY_API __declspec(dllexport)
-#else
-#define PHP_TIDY_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-#include "tidyenum.h"
-#include "tidy.h"
-#include "buffio.h"
-
-#ifdef ZTS
-#define TG(v) TSRMG(tidy_globals_id, zend_tidy_globals *, v)
-#else
-#define TG(v) (tidy_globals.v)
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
-#define TIDY_RV_FALSE(__t) __t->type = IS_BOOL; __t->value.lval = FALSE
-#define TIDY_RV_TRUE(__t) __t->type = IS_BOOL; __t->value.lval = TRUE
-
-#define REMOVE_NEWLINE(_z) _z->value.str.val[_z->value.str.len-1] = '\0'; _z->value.str.len--;
-
-struct _PHPTidyDoc {
-
- TidyDoc doc;
- TidyBuffer *errbuf;
- zend_bool parsed;
-};
-
-typedef struct _PHPTidyDoc PHPTidyDoc;
-
-
-PHP_MINIT_FUNCTION(tidy);
-PHP_MSHUTDOWN_FUNCTION(tidy);
-PHP_RINIT_FUNCTION(tidy);
-PHP_RSHUTDOWN_FUNCTION(tidy);
-PHP_MINFO_FUNCTION(tidy);
-
-PHP_FUNCTION(tidy_setopt);
-PHP_FUNCTION(tidy_getopt);
-PHP_FUNCTION(tidy_parse_string);
-PHP_FUNCTION(tidy_parse_file);
-PHP_FUNCTION(tidy_clean_repair);
-PHP_FUNCTION(tidy_repair_string);
-PHP_FUNCTION(tidy_repair_file);
-PHP_FUNCTION(tidy_diagnose);
-PHP_FUNCTION(tidy_get_output);
-PHP_FUNCTION(tidy_get_error_buffer);
-PHP_FUNCTION(tidy_get_release);
-PHP_FUNCTION(tidy_reset_config);
-PHP_FUNCTION(tidy_get_config);
-PHP_FUNCTION(tidy_get_status);
-PHP_FUNCTION(tidy_get_html_ver);
-PHP_FUNCTION(tidy_is_xhtml);
-PHP_FUNCTION(tidy_is_xml);
-PHP_FUNCTION(tidy_error_count);
-PHP_FUNCTION(tidy_warning_count);
-PHP_FUNCTION(tidy_access_count);
-PHP_FUNCTION(tidy_config_count);
-PHP_FUNCTION(tidy_load_config);
-PHP_FUNCTION(tidy_load_config_enc);
-PHP_FUNCTION(tidy_set_encoding);
-PHP_FUNCTION(tidy_save_config);
-
-/* resource dtor */
-void dtor_TidyDoc(zend_rsrc_list_entry * TSRMLS_DC);
-
-ZEND_BEGIN_MODULE_GLOBALS(tidy)
- PHPTidyDoc *tdoc;
- zend_bool used;
- char *default_config;
-ZEND_END_MODULE_GLOBALS(tidy)
-
-#ifdef ZTS
-#define TG(v) TSRMG(tidy_globals_id, zend_tidy_globals *, v)
-#else
-#define TG(v) (tidy_globals.v)
-#endif
-
-
-
-
-#endif
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
View
@@ -1,24 +0,0 @@
---TEST--
-Check for tidy presence
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---POST--
---GET--
---INI--
---FILE--
-<?php
-echo "tidy extension is available";
-/*
- you can add regression tests for your extension here
-
- the output of your test code has to be equal to the
- text in the --EXPECT-- section below for the tests
- to pass, differences between the output and the
- expected text are interpreted as failure
-
- see php4/README.TESTING for further information on
- writing regression tests
-*/
-?>
---EXPECT--
-tidy extension is available
View
@@ -1,22 +0,0 @@
---TEST--
-tidy_parse_string()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---POST--
---GET--
---INI--
---FILE--
-<?php
- tidy_parse_string("<HTML></HTML>");
-
- echo tidy_get_output();
-
-?>
---EXPECT--
-<html>
-<head>
-<title></title>
-</head>
-<body>
-</body>
-</html>
Oops, something went wrong.

0 comments on commit db7b5b1

Please sign in to comment.