Lines Matching refs:ptdoc

64 	if (!obj->ptdoc->initialized) { \
109 PHPTidyDoc *ptdoc; member
396 if (intern->ptdoc) { in tidy_object_free_storage()
397 intern->ptdoc->ref_count--; in tidy_object_free_storage()
399 if (intern->ptdoc->ref_count <= 0) { in tidy_object_free_storage()
400 tidyBufFree(intern->ptdoc->errbuf); in tidy_object_free_storage()
401 efree(intern->ptdoc->errbuf); in tidy_object_free_storage()
402 tidyRelease(intern->ptdoc->doc); in tidy_object_free_storage()
403 efree(intern->ptdoc); in tidy_object_free_storage()
421 intern->ptdoc = emalloc(sizeof(PHPTidyDoc)); in tidy_object_new()
422 intern->ptdoc->doc = tidyCreate(); in tidy_object_new()
423 intern->ptdoc->ref_count = 1; in tidy_object_new()
424 intern->ptdoc->initialized = 0; in tidy_object_new()
425 intern->ptdoc->errbuf = emalloc(sizeof(TidyBuffer)); in tidy_object_new()
426 tidyBufInit(intern->ptdoc->errbuf); in tidy_object_new()
428 if (tidySetErrorBuffer(intern->ptdoc->doc, intern->ptdoc->errbuf) != 0) { in tidy_object_new()
429 tidyBufFree(intern->ptdoc->errbuf); in tidy_object_new()
430 efree(intern->ptdoc->errbuf); in tidy_object_new()
431 tidyRelease(intern->ptdoc->doc); in tidy_object_new()
432 efree(intern->ptdoc); in tidy_object_new()
437 tidyOptSetBool(intern->ptdoc->doc, TidyForceOutput, yes); in tidy_object_new()
438 tidyOptSetBool(intern->ptdoc->doc, TidyMark, no); in tidy_object_new()
440 TIDY_SET_DEFAULT_CONFIG(intern->ptdoc->doc); in tidy_object_new()
487 tidySaveBuffer (obj->ptdoc->doc, &output); in tidy_doc_cast_handler()
525 if (obj->ptdoc) { in tidy_node_cast_handler()
526 tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf); in tidy_node_cast_handler()
546 tidySaveBuffer (obj->ptdoc->doc, &output); in tidy_doc_update_properties()
561 if (obj->ptdoc->errbuf->size) { in tidy_doc_update_properties()
567 (char*) obj->ptdoc->errbuf->bp, in tidy_doc_update_properties()
568 obj->ptdoc->errbuf->size-1 in tidy_doc_update_properties()
583 tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf); in tidy_add_node_default_properties()
635 tidyNodeIsProp(obj->ptdoc->doc, obj->node) in tidy_add_node_default_properties()
701 newobj->ptdoc = obj->ptdoc; in tidy_add_node_default_properties()
702 newobj->ptdoc->ref_count++; in tidy_add_node_default_properties()
724 static void *php_tidy_get_opt_val(PHPTidyDoc *ptdoc, TidyOption opt, TidyOptionType *type) in php_tidy_get_opt_val() argument
730 char *val = (char *) tidyOptGetValue(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
740 return (void *) (uintptr_t) tidyOptGetInt(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
744 return (void *) tidyOptGetBool(ptdoc->doc, tidyOptGetId(opt)); in php_tidy_get_opt_val()
760 node = tidyGetRoot(obj->ptdoc->doc); in php_tidy_create_node()
764 node = tidyGetHtml(obj->ptdoc->doc); in php_tidy_create_node()
768 node = tidyGetHead(obj->ptdoc->doc); in php_tidy_create_node()
772 node = tidyGetBody(obj->ptdoc->doc); in php_tidy_create_node()
785 newobj->ptdoc = obj->ptdoc; in php_tidy_create_node()
787 newobj->ptdoc->ref_count++; in php_tidy_create_node()
813 if (tidySetCharEncoding(obj->ptdoc->doc, enc) < 0) { in php_tidy_parse_string()
819 obj->ptdoc->initialized = 1; in php_tidy_parse_string()
823 if (tidyParseBuffer(obj->ptdoc->doc, &buf) < 0) { in php_tidy_parse_string()
824 php_error_docref(NULL, E_WARNING, "%s", obj->ptdoc->errbuf->bp); in php_tidy_parse_string()
1027 if (php_tidy_apply_config(obj->ptdoc->doc, options_str, options_ht) != SUCCESS in PHP_FUNCTION()
1040 if (obj->ptdoc->errbuf && obj->ptdoc->errbuf->bp) { in PHP_FUNCTION()
1041 RETURN_STRINGL((char*)obj->ptdoc->errbuf->bp, obj->ptdoc->errbuf->size-1); in PHP_FUNCTION()
1055 tidySaveBuffer(obj->ptdoc->doc, &output); in PHP_FUNCTION()
1095 if (php_tidy_apply_config(obj->ptdoc->doc, options_str, options_ht) != SUCCESS in PHP_FUNCTION()
1110 if (tidyCleanAndRepair(obj->ptdoc->doc) >= 0) { in PHP_FUNCTION()
1138 if (obj->ptdoc->initialized && tidyRunDiagnostics(obj->ptdoc->doc) >= 0) { in PHP_FUNCTION()
1179 opt = tidyGetOptionByName(obj->ptdoc->doc, optname); in PHP_FUNCTION()
1186 if ( (optval = (char *) tidyOptGetDoc(obj->ptdoc->doc, opt)) ) { in PHP_FUNCTION()
1206 itOpt = tidyGetOptionList(obj->ptdoc->doc); in PHP_FUNCTION()
1211 TidyOption opt = tidyGetNextOption(obj->ptdoc->doc, &itOpt); in PHP_FUNCTION()
1214 opt_value = php_tidy_get_opt_val(obj->ptdoc, opt, &optt); in PHP_FUNCTION()
1239 RETURN_LONG(tidyStatus(obj->ptdoc->doc)); in PHP_FUNCTION()
1248 RETURN_LONG(tidyDetectedHtmlVersion(obj->ptdoc->doc)); in PHP_FUNCTION()
1257 RETURN_BOOL(tidyDetectedXhtml(obj->ptdoc->doc)); in PHP_FUNCTION()
1266 RETURN_BOOL(tidyDetectedGenericXml(obj->ptdoc->doc)); in PHP_FUNCTION()
1275 RETURN_LONG(tidyErrorCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1284 RETURN_LONG(tidyWarningCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1293 RETURN_LONG(tidyAccessWarningCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1302 RETURN_LONG(tidyConfigErrorCount(obj->ptdoc->doc)); in PHP_FUNCTION()
1323 opt = tidyGetOptionByName(obj->ptdoc->doc, optname); in PHP_FUNCTION()
1330 optval = php_tidy_get_opt_val(obj->ptdoc, opt, &optt); in PHP_FUNCTION()
1389 if (php_tidy_apply_config(obj->ptdoc->doc, options_str, options_ht) != SUCCESS) { in PHP_METHOD()
1432 if (php_tidy_apply_config(obj->ptdoc->doc, options_str, options_ht) != SUCCESS in PHP_METHOD()
1465 if (php_tidy_apply_config(obj->ptdoc->doc, options_str, options_ht) == SUCCESS in PHP_METHOD()
1622 newobj->ptdoc = obj->ptdoc; in PHP_METHOD()
1623 newobj->ptdoc->ref_count++; in PHP_METHOD()