CVS update: php3/functions

From: Date: Tue, 06 Oct 1998 09:44:20 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-1697@lists.php.net to get a copy of this message
Date: Tuesday October 6, 1998 @ 5:44 Author: martin Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv21165/functions Modified Files: dns.c gdttf.h gdcache.h url.c Log Message: Some more BS2000 compilation tweaks Index: php3/functions/dns.c diff -c php3/functions/dns.c:1.47 php3/functions/dns.c:1.48 *** php3/functions/dns.c:1.47 Thu Sep 10 19:57:17 1998 --- php3/functions/dns.c Tue Oct 6 05:44:18 1998 *************** *** 28,34 **** +----------------------------------------------------------------------+ */ ! /* $Id: dns.c,v 1.47 1998/09/10 23:57:17 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 28,34 ---- +----------------------------------------------------------------------+ */ ! /* $Id: dns.c,v 1.48 1998/10/06 09:44:18 martin Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 53,58 **** --- 53,62 ---- #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> + #ifdef _OSD_POSIX + #undef STATUS + #undef T_UNSPEC + #endif #include <arpa/nameser.h> #include <resolv.h> #endif Index: php3/functions/gdttf.h diff -c php3/functions/gdttf.h:1.3 php3/functions/gdttf.h:1.4 *** php3/functions/gdttf.h:1.3 Sat Jul 11 17:57:25 1998 --- php3/functions/gdttf.h Tue Oct 6 05:44:19 1998 *************** *** 1,3 **** --- 1,14 ---- + #ifdef _OSD_POSIX + #ifndef APACHE + #error On this EBCDIC platform, PHP3 is only supported as an Apache module. + #else /*APACHE*/ + #ifndef CHARSET_EBCDIC + #define CHARSET_EBCDIC /* this machine uses EBCDIC, not ASCII! */ + #endif + #include "ebcdic.h" + #endif /*APACHE*/ + #endif /*_OSD_POSIX*/ + char * gdttf(gdImage *im, int *brect, int fg, char *fontname, double ptsize, double angle, int x, int y, char *string); Index: php3/functions/gdcache.h diff -c php3/functions/gdcache.h:1.1 php3/functions/gdcache.h:1.2 *** php3/functions/gdcache.h:1.1 Mon Apr 20 10:16:38 1998 --- php3/functions/gdcache.h Tue Oct 6 05:44:19 1998 *************** *** 1,83 **** - /* - * gdcache.h - * - * Caches of pointers to user structs in which the least-recently-used - * element is replaced in the event of a cache miss after the cache has - * reached a given size. - * - * John Ellson (ellson@lucent.com) Oct 31, 1997 - * - * Test this with: - * gcc -o gdcache -g -Wall -DTEST gdcache.c - * - * The cache is implemented by a singly-linked list of elements - * each containing a pointer to a user struct that is being managed by - * the cache. - * - * The head structure has a pointer to the most-recently-used - * element, and elements are moved to this position in the list each - * time they are used. The head also contains pointers to three - * user defined functions: - * - a function to test if a cached userdata matches some keydata - * - a function to provide a new userdata struct to the cache - * if there has been a cache miss. - * - a function to release a userdata struct when it is - * no longer being managed by the cache - * - * In the event of a cache miss the cache is allowed to grow up to - * a specified maximum size. After the maximum size is reached then - * the least-recently-used element is discarded to make room for the - * new. The most-recently-returned value is always left at the - * beginning of the list after retrieval. - * - * In the current implementation the cache is traversed by a linear - * search from most-recent to least-recent. This linear search - * probably limits the usefulness of this implementation to cache - * sizes of a few tens of elements. - */ - - /*********************************************************/ - /* header */ - /*********************************************************/ - - #include <malloc.h> - #ifndef NULL - #define NULL (void *)0 - #endif - - /* user defined function templates */ - typedef int (*gdCacheTestFn_t)(void *userdata, void *keydata); - typedef void *(*gdCacheFetchFn_t)(char **error, void *keydata); - typedef void (*gdCacheReleaseFn_t)(void *userdata); - - /* element structure */ - typedef struct gdCache_element_s gdCache_element_t; - struct gdCache_element_s { - gdCache_element_t *next; - void *userdata; - }; - - /* head structure */ - typedef struct gdCache_head_s gdCache_head_t; - struct gdCache_head_s { - gdCache_element_t *mru; - int size; - char *error; - gdCacheTestFn_t gdCacheTest; - gdCacheFetchFn_t gdCacheFetch; - gdCacheReleaseFn_t gdCacheRelease; - }; - - /* function templates */ - gdCache_head_t * - gdCacheCreate( - int size, - gdCacheTestFn_t gdCacheTest, - gdCacheFetchFn_t gdCacheFetch, - gdCacheReleaseFn_t gdCacheRelease ); - - void - gdCacheDelete( gdCache_head_t *head ); - - void * - gdCacheGet( gdCache_head_t *head, void *keydata ); --- 0 ---- Index: php3/functions/url.c diff -c php3/functions/url.c:1.39 php3/functions/url.c:1.40 *** php3/functions/url.c:1.39 Mon Oct 5 12:14:54 1998 --- php3/functions/url.c Tue Oct 6 05:44:19 1998 *************** *** 26,32 **** | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: url.c,v 1.39 1998/10/05 16:14:54 zeev Exp $ */ #include <stdlib.h> #include <string.h> --- 26,32 ---- | Author: Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: url.c,v 1.40 1998/10/06 09:44:19 martin Exp $ */ #include <stdlib.h> #include <string.h> *************** *** 41,49 **** #include "internal_functions.h" #include "url.h" ! #ifdef CHARSET_EBCDIC #include "ebcdic.h" ! #endif /*CHARSET_EBCDIC*/ void free_url(url * theurl) --- 41,56 ---- #include "internal_functions.h" #include "url.h" ! #ifdef _OSD_POSIX ! #ifndef APACHE ! #error On this EBCDIC platform, PHP3 is only supported as an Apache module. ! #else /*APACHE*/ ! #ifndef CHARSET_EBCDIC ! #define CHARSET_EBCDIC /* this machine uses EBCDIC, not ASCII! */ ! #endif #include "ebcdic.h" ! #endif /*APACHE*/ ! #endif /*_OSD_POSIX*/ void free_url(url * theurl) -- 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

« previous php.dev (#1697) next »