Lines Matching refs:ptdoc
64 if (!obj->ptdoc->initialized) { \
169 PHPTidyDoc *ptdoc; member
440 if (intern->ptdoc) { in tidy_object_free_storage()
441 intern->ptdoc->ref_count--; in tidy_object_free_storage()
443 if (intern->ptdoc->ref_count <= 0) { in tidy_object_free_storage()
444 tidyBufFree(intern->ptdoc->errbuf); in tidy_object_free_storage()
445 efree(intern->ptdoc->errbuf); in tidy_object_free_storage()
446 tidyRelease(intern->ptdoc->doc); in tidy_object_free_storage()
447 efree(intern->ptdoc); in tidy_object_free_storage()
465 intern->ptdoc = emalloc(sizeof(PHPTidyDoc)); in tidy_object_new()
466 intern->ptdoc->doc = tidyCreate(); in tidy_object_new()
467 intern->ptdoc->ref_count = 1; in tidy_object_new()
468 intern->ptdoc->initialized = 0; in tidy_object_new()
469 intern->ptdoc->errbuf = emalloc(sizeof(TidyBuffer)); in tidy_object_new()
470 tidyBufInit(intern->ptdoc->errbuf); in tidy_object_new()
472 if (tidySetErrorBuffer(intern->ptdoc->doc, intern->ptdoc->errbuf) != 0) { in tidy_object_new()
473 tidyBufFree(intern->ptdoc->errbuf); in tidy_object_new()
474 efree(intern->ptdoc->errbuf); in tidy_object_new()
475 tidyRelease(intern->ptdoc->doc); in tidy_object_new()
476 efree(intern->ptdoc); in tidy_object_new()
481 tidyOptSetBool(intern->ptdoc->doc, TidyForceOutput, yes); in tidy_object_new()
482 tidyOptSetBool(intern->ptdoc->doc, TidyMark, no); in tidy_object_new()
484 TIDY_SET_DEFAULT_CONFIG(intern->ptdoc->doc); in tidy_object_new()
533 tidySaveBuffer (obj->ptdoc->doc, &output); in tidy_doc_cast_handler()
571 if (obj->ptdoc) { in tidy_node_cast_handler()
572 tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf); in tidy_node_cast_handler()
594 tidySaveBuffer (obj->ptdoc->doc, &output); in tidy_doc_update_properties()
606 if (obj->ptdoc->errbuf->size) { in tidy_doc_update_properties()
610 ZVAL_STRINGL(&temp, (char*)obj->ptdoc->errbuf->bp, obj->ptdoc->errbuf->size-1); in tidy_doc_update_properties()
631 tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf); in tidy_add_default_properties()
639 ADD_PROPERTY_BOOL(obj->std.properties, proprietary, tidyNodeIsProp(obj->ptdoc->doc, obj->node)); in tidy_add_default_properties()
679 newobj->ptdoc = obj->ptdoc; in tidy_add_default_properties()
680 newobj->ptdoc->ref_count++; in tidy_add_default_properties()
705 static void *php_tidy_get_opt_val(PHPTidyDoc *ptdoc, TidyOption opt, TidyOptionType *type) in php_tidy_get_opt_val() argument
711 char *val = (char *) tidyOptGetValue(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
721 return (void *) (uintptr_t) tidyOptGetInt(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
725 return (void *) tidyOptGetBool(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
741 node = tidyGetRoot(obj->ptdoc->doc); in php_tidy_create_node()
745 node = tidyGetHtml(obj->ptdoc->doc); in php_tidy_create_node()
749 node = tidyGetHead(obj->ptdoc->doc); in php_tidy_create_node()
753 node = tidyGetBody(obj->ptdoc->doc); in php_tidy_create_node()
766 newobj->ptdoc = obj->ptdoc; in php_tidy_create_node()
768 newobj->ptdoc->ref_count++; in php_tidy_create_node()
793 if (tidySetCharEncoding(obj->ptdoc->doc, enc) < 0) { in php_tidy_parse_string()
799 obj->ptdoc->initialized = 1; in php_tidy_parse_string()
803 if (tidyParseBuffer(obj->ptdoc->doc, &buf) < 0) { in php_tidy_parse_string()
804 php_error_docref(NULL, E_WARNING, "%s", obj->ptdoc->errbuf->bp); in php_tidy_parse_string()
1008 TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); in PHP_FUNCTION()
1022 if (obj->ptdoc->errbuf && obj->ptdoc->errbuf->bp) { in PHP_FUNCTION()
1023 RETURN_STRINGL((char*)obj->ptdoc->errbuf->bp, obj->ptdoc->errbuf->size-1); in PHP_FUNCTION()
1037 tidySaveBuffer(obj->ptdoc->doc, &output); in PHP_FUNCTION()
1077 TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); in PHP_FUNCTION()
1093 if (tidyCleanAndRepair(obj->ptdoc->doc) >= 0) { in PHP_FUNCTION()
1121 if (obj->ptdoc->initialized && tidyRunDiagnostics(obj->ptdoc->doc) >= 0) { in PHP_FUNCTION()
1162 opt = tidyGetOptionByName(obj->ptdoc->doc, optname); in PHP_FUNCTION()
1169 if ( (optval = (char *) tidyOptGetDoc(obj->ptdoc->doc, opt)) ) { in PHP_FUNCTION()
1189 itOpt = tidyGetOptionList(obj->ptdoc->doc); in PHP_FUNCTION()
1194 TidyOption opt = tidyGetNextOption(obj->ptdoc->doc, &itOpt); in PHP_FUNCTION()
1197 opt_value = php_tidy_get_opt_val(obj->ptdoc, opt, &optt); in PHP_FUNCTION()
1222 RETURN_LONG(tidyStatus(obj->ptdoc->doc)); in PHP_FUNCTION()
1231 RETURN_LONG(tidyDetectedHtmlVersion(obj->ptdoc->doc)); in PHP_FUNCTION()
1240 RETURN_BOOL(tidyDetectedXhtml(obj->ptdoc->doc)); in PHP_FUNCTION()
1249 RETURN_BOOL(tidyDetectedGenericXml(obj->ptdoc->doc)); in PHP_FUNCTION()
1258 RETURN_LONG(tidyErrorCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1267 RETURN_LONG(tidyWarningCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1276 RETURN_LONG(tidyAccessWarningCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1285 RETURN_LONG(tidyConfigErrorCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1306 opt = tidyGetOptionByName(obj->ptdoc->doc, optname); in PHP_FUNCTION()
1313 optval = php_tidy_get_opt_val(obj->ptdoc, opt, &optt); in PHP_FUNCTION()
1372 TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); in PHP_METHOD()
1411 TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); in PHP_METHOD()
1445 TIDY_APPLY_CONFIG(obj->ptdoc->doc, options_str, options_ht); in PHP_METHOD()
1603 newobj->ptdoc = obj->ptdoc; in PHP_METHOD()
1604 newobj->ptdoc->ref_count++; in PHP_METHOD()