CVS update: php3/functions
| From: | thies | Date: | Fri, 11 Dec 1998 07:25:43 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2770@lists.php.net to get a copy of this message | ||
Date: Friday December 11, 1998 @ 2:25
Author: thies
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv2034/functions
Modified Files:
iptc.c
Log Message:
support for long IPTC-Fields
added iptcparse() function to ChangeLog
Index: php3/functions/iptc.c
diff -c php3/functions/iptc.c:1.2 php3/functions/iptc.c:1.3
*** php3/functions/iptc.c:1.2 Thu Oct 22 13:09:23 1998
--- php3/functions/iptc.c Fri Dec 11 02:25:42 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: iptc.c,v 1.2 1998/10/22 17:09:23 thies Exp $ */
/*
* Functions to parse & compse IPTC data.
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: iptc.c,v 1.3 1998/12/11 07:25:42 thies Exp $ */
/*
* Functions to parse & compse IPTC data.
***************
*** 47,53 ****
void php3_iptcparse(INTERNAL_FUNCTION_PARAMETERS)
{
! int length, inx, len;
unsigned char *buffer;
unsigned char recnum, dataset;
unsigned char key[ 16 ];
--- 47,53 ----
void php3_iptcparse(INTERNAL_FUNCTION_PARAMETERS)
{
! int length,inx, len;
unsigned char *buffer;
unsigned char recnum, dataset;
unsigned char key[ 16 ];
***************
*** 77,84 ****
dataset = buffer[ inx++ ];
recnum = buffer[ inx++ ];
! len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];
! inx += 2;
sprintf(key,"%d#%03d",(unsigned int) dataset,(unsigned int) recnum);
--- 77,92 ----
dataset = buffer[ inx++ ];
recnum = buffer[ inx++ ];
!
! if (buffer[ inx ] & (unsigned char) 0x80) {
! len = (((long) buffer[ inx + 2 ]) << 24) + (((long) buffer[ inx + 3 ]) << 16) +
! (((long) buffer[ inx + 4 ]) << 8) + (((long) buffer[ inx + 5 ]));
! inx += 6;
! } else {
! len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];
! inx += 2;
! }
!
sprintf(key,"%d#%03d",(unsigned int) dataset,(unsigned int) recnum);
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net