Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
gd /
libgd /
Delete
Unzip
Name
Size
Permission
Date
Action
bmp.h
2.39
KB
-rw-rw-r--
2022-10-31 11:36
gd.c
72.21
KB
-rw-rw-r--
2022-10-31 11:36
gd.h
33.01
KB
-rw-rw-r--
2022-10-31 11:36
gd2copypal.c
1.32
KB
-rw-rw-r--
2022-10-31 11:36
gd2time.c
1.2
KB
-rw-rw-r--
2022-10-31 11:36
gd2topng.c
1.04
KB
-rw-rw-r--
2022-10-31 11:36
gd_bmp.c
25.8
KB
-rw-rw-r--
2022-10-31 11:36
gd_color_match.c
1.42
KB
-rw-rw-r--
2022-10-31 11:36
gd_crop.c
7.68
KB
-rw-rw-r--
2022-10-31 11:36
gd_errors.h
673
B
-rw-rw-r--
2022-10-31 11:36
gd_filter.c
12.52
KB
-rw-rw-r--
2022-10-31 11:36
gd_gd.c
5.2
KB
-rw-rw-r--
2022-10-31 11:36
gd_gd2.c
19.53
KB
-rw-rw-r--
2022-10-31 11:36
gd_gif_in.c
13.9
KB
-rw-rw-r--
2022-10-31 11:36
gd_gif_out.c
20.75
KB
-rw-rw-r--
2022-10-31 11:36
gd_intern.h
261
B
-rw-rw-r--
2022-10-31 11:36
gd_interpolation.c
69.57
KB
-rw-rw-r--
2022-10-31 11:36
gd_io.c
3.39
KB
-rw-rw-r--
2022-10-31 11:36
gd_io.h
1.05
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_dp.c
6.96
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_file.c
2.31
KB
-rw-rw-r--
2022-10-31 11:36
gd_io_ss.c
2.66
KB
-rw-rw-r--
2022-10-31 11:36
gd_jpeg.c
26.3
KB
-rw-rw-r--
2022-10-31 11:36
gd_matrix.c
7.77
KB
-rw-rw-r--
2022-10-31 11:36
gd_pixelate.c
1.33
KB
-rw-rw-r--
2022-10-31 11:36
gd_png.c
22.61
KB
-rw-rw-r--
2022-10-31 11:36
gd_rotate.c
7.97
KB
-rw-rw-r--
2022-10-31 11:36
gd_security.c
662
B
-rw-rw-r--
2022-10-31 11:36
gd_ss.c
1.07
KB
-rw-rw-r--
2022-10-31 11:36
gd_tga.c
8.92
KB
-rw-rw-r--
2022-10-31 11:36
gd_tga.h
1.66
KB
-rw-rw-r--
2022-10-31 11:36
gd_topal.c
51.71
KB
-rw-rw-r--
2022-10-31 11:36
gd_transform.c
1.27
KB
-rw-rw-r--
2022-10-31 11:36
gd_wbmp.c
5.48
KB
-rw-rw-r--
2022-10-31 11:36
gd_webp.c
4.03
KB
-rw-rw-r--
2022-10-31 11:36
gd_xbm.c
5.27
KB
-rw-rw-r--
2022-10-31 11:36
gdcache.c
4.99
KB
-rw-rw-r--
2022-10-31 11:36
gdcache.h
2.68
KB
-rw-rw-r--
2022-10-31 11:36
gddemo.c
3.18
KB
-rw-rw-r--
2022-10-31 11:36
gdfontg.c
113.25
KB
-rw-rw-r--
2022-10-31 11:36
gdfontg.h
529
B
-rw-rw-r--
2022-10-31 11:36
gdfontl.c
108.5
KB
-rw-rw-r--
2022-10-31 11:36
gdfontl.h
527
B
-rw-rw-r--
2022-10-31 11:36
gdfontmb.c
79.24
KB
-rw-rw-r--
2022-10-31 11:36
gdfontmb.h
495
B
-rw-rw-r--
2022-10-31 11:36
gdfonts.c
69.46
KB
-rw-rw-r--
2022-10-31 11:36
gdfonts.h
491
B
-rw-rw-r--
2022-10-31 11:36
gdfontt.c
38.49
KB
-rw-rw-r--
2022-10-31 11:36
gdfontt.h
522
B
-rw-rw-r--
2022-10-31 11:36
gdft.c
32.75
KB
-rw-rw-r--
2022-10-31 11:36
gdhelpers.c
1.17
KB
-rw-rw-r--
2022-10-31 11:36
gdhelpers.h
1.54
KB
-rw-rw-r--
2022-10-31 11:36
gdkanji.c
12.01
KB
-rw-rw-r--
2022-10-31 11:36
gdparttopng.c
1.26
KB
-rw-rw-r--
2022-10-31 11:36
gdtables.c
5.45
KB
-rw-rw-r--
2022-10-31 11:36
gdtest.c
9.11
KB
-rw-rw-r--
2022-10-31 11:36
gdtestft.c
2.76
KB
-rw-rw-r--
2022-10-31 11:36
gdtopng.c
965
B
-rw-rw-r--
2022-10-31 11:36
gdxpm.c
3.21
KB
-rw-rw-r--
2022-10-31 11:36
jisx0208.h
69.68
KB
-rw-rw-r--
2022-10-31 11:36
pngtogd.c
967
B
-rw-rw-r--
2022-10-31 11:36
pngtogd2.c
1.17
KB
-rw-rw-r--
2022-10-31 11:36
testac.c
4.11
KB
-rw-rw-r--
2022-10-31 11:36
wbmp.c
6.79
KB
-rw-rw-r--
2022-10-31 11:36
wbmp.h
1.25
KB
-rw-rw-r--
2022-10-31 11:36
webpng.c
6.32
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
#include "gd.h" #include "gdhelpers.h" #ifdef HAVE_LIBFREETYPE #define NEED_CACHE 1 #endif #ifdef NEED_CACHE /* * gdcache.c * * 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@graphviz.org) 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. */ #include "gdcache.h" /*********************************************************/ /* implementation */ /*********************************************************/ /* create a new cache */ gdCache_head_t * gdCacheCreate ( int size, gdCacheTestFn_t gdCacheTest, gdCacheFetchFn_t gdCacheFetch, gdCacheReleaseFn_t gdCacheRelease) { gdCache_head_t *head; head = (gdCache_head_t *) gdPMalloc(sizeof (gdCache_head_t)); head->mru = NULL; head->size = size; head->gdCacheTest = gdCacheTest; head->gdCacheFetch = gdCacheFetch; head->gdCacheRelease = gdCacheRelease; return head; } void gdCacheDelete (gdCache_head_t * head) { gdCache_element_t *elem, *prev; elem = head->mru; while (elem) { (*(head->gdCacheRelease)) (elem->userdata); prev = elem; elem = elem->next; gdPFree ((char *) prev); } gdPFree ((char *) head); } void * gdCacheGet (gdCache_head_t * head, void *keydata) { int i = 0; gdCache_element_t *elem, *prev = NULL, *prevprev = NULL; void *userdata; elem = head->mru; while (elem) { if ((*(head->gdCacheTest)) (elem->userdata, keydata)) { if (i) { /* if not already most-recently-used */ /* relink to top of list */ prev->next = elem->next; elem->next = head->mru; head->mru = elem; } return elem->userdata; } prevprev = prev; prev = elem; elem = elem->next; i++; } userdata = (*(head->gdCacheFetch)) (&(head->error), keydata); if (!userdata) { /* if there was an error in the fetch then don't cache */ return NULL; } if (i < head->size) { /* cache still growing - add new elem */ elem = (gdCache_element_t *) gdPMalloc(sizeof (gdCache_element_t)); } else { /* cache full - replace least-recently-used */ /* preveprev becomes new end of list */ prevprev->next = NULL; elem = prev; (*(head->gdCacheRelease)) (elem->userdata); } /* relink to top of list */ elem->next = head->mru; head->mru = elem; elem->userdata = userdata; return userdata; } /*********************************************************/ /* test stub */ /*********************************************************/ #ifdef TEST #include <stdio.h> typedef struct { int key; int value; } key_value_t; static int cacheTest (void *map, void *key) { return (((key_value_t *) map)->key == *(int *) key); } static void * cacheFetch (char **error, void *key) { key_value_t *map; map = (key_value_t *) gdMalloc (sizeof (key_value_t)); map->key = *(int *) key; map->value = 3; *error = NULL; return (void *) map; } static void cacheRelease (void *map) { gdFree ((char *) map); } int main (char *argv[], int argc) { gdCache_head_t *cacheTable; int elem, key; cacheTable = gdCacheCreate (3, cacheTest, cacheFetch, cacheRelease); key = 20; elem = *(int *) gdCacheGet (cacheTable, &key); key = 30; elem = *(int *) gdCacheGet (cacheTable, &key); key = 40; elem = *(int *) gdCacheGet (cacheTable, &key); key = 50; elem = *(int *) gdCacheGet (cacheTable, &key); key = 30; elem = *(int *) gdCacheGet (cacheTable, &key); key = 30; elem = *(int *) gdCacheGet (cacheTable, &key); gdCacheDelete (cacheTable); return 0; } #endif /* TEST */ #endif /* HAVE_NEECACHE */