Re: php_error_docref() (Was: gd on OSX)

From: Date: Mon, 12 Aug 2002 23:40:47 +0000
Subject: Re: php_error_docref() (Was: gd on OSX)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-86750@lists.php.net to get a copy of this message
At 22:43 12.08.2002, you wrote:
Marcus, I've already run through the ODBC code and put in php_error_docref's to error messages that can be referenced back to documentation. But the question is, instead of passing in a NULL what is the proper format? i.e. "odbc-tables.xml" or "odbc_tables.???"
format of docref parameter is either name of manual entry without fileextension but with additional target and '_' will become '-'. This makes "odbc-tables". Or for an eample with a target: "odbc-tables#8868" You can use external references when docref value starts with "http://". For example: "http://php.net/credits.php" or "http://pear.php.net/manual/en/faq.patches.php#TOP". Notice the difference: internal references must not use fileextensions or directories. Instead you can use ini settings: docref_root and docref_ext where docref_root must end with "/" and docref_ext must start with a dot. marcus
On Mon, 12 Aug 2002, Marcus [iso-8859-1] Börger wrote: At 18:44 12.08.2002, you wrote:
[snip] I guess I should start updating ODBC to be using the php_error_docref() as well... I'll wait for your commit for samples ;) Dan
Here is a script that converts unified php_error() calls to php_error_docref() calls with docref parameter set NULL automatically. All you have to do is look for non unified messages and insert a special docref value where needed. Also you can make use of php_error_docref1/2 and expand calls to show one or two important parameters (look for php_error_docref<n> in commit on exif.c). marcus #!/bin/sh for i in find -name '*.c' do
     echo ${i}
     cat ${i} | sed "s/\(php_error(\)\([^\"]*\"\)\(%s()\: \)\(.*\)\(,
get_active_function_name(TSRMLS_C)\)/php_error_docref( NULL TSRMLS_CC, \2\4/g" >> $i.docref && cp -f $i.docref $i done ---------------------------------------------------------------<
Dan Kalowsky                    "A little less conversation,
http://www.deadmime.org/~dank a little more action."
dank-nom@aps-deadmime.org       - "A Little Less Conversation",
kalowsky@php.net                        Elvis Presley


« previous php.dev (#86750) next »