<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># HG changeset patch
# Parent 0069854f6af788a01bae0473bfff28cf4570b01c
Rename CacheClient_t to CacheClient and CacheEntry_t to CacheEntry.

diff -r 0069854f6af7 src/cache.c
--- a/src/cache.c
+++ b/src/cache.c
@@ -61,13 +61,13 @@
    int ExpectedSize;         /* Goal size of the HTTP transfer (0 if unknown)*/
    int TransferSize;         /* Actual length of the HTTP transfer */
    uint_t Flags;             /* See Flag Defines in cache.h */
-} CacheEntry_t;
+} CacheEntry;
 
 
 /*
  *  Local data
  */
-/* A sorted list for cached data. Holds pointers to CacheEntry_t structs */
+/* A sorted list for cached data. Holds pointers to CacheEntry structs */
 static Dlist *CachedURLs;
 
 /* A list for cache clients.
@@ -83,9 +83,9 @@
 /*
  *  Forward declarations
  */
-static CacheEntry_t *Cache_process_queue(CacheEntry_t *entry);
-static void Cache_delayed_process_queue(CacheEntry_t *entry);
-static void Cache_auth_entry(CacheEntry_t *entry, BrowserWindow *bw);
+static CacheEntry *Cache_process_queue(CacheEntry *entry);
+static void Cache_delayed_process_queue(CacheEntry *entry);
+static void Cache_auth_entry(CacheEntry *entry, BrowserWindow *bw);
 static void Cache_entry_inject(const DilloUrl *Url, Dstr *data_ds);
 
 /*
@@ -93,7 +93,7 @@
  */
 static int Cache_entry_cmp(const void *v1, const void *v2)
 {
-   const CacheEntry_t *d1 = v1, *d2 = v2;
+   const CacheEntry *d1 = v1, *d2 = v2;
 
    return a_Url_cmp(d1-&gt;Url, d2-&gt;Url);
 }
@@ -103,7 +103,7 @@
  */
 static int Cache_entry_by_url_cmp(const void *v1, const void *v2)
 {
-   const DilloUrl *u1 = ((CacheEntry_t*)v1)-&gt;Url;
+   const DilloUrl *u1 = ((CacheEntry*)v1)-&gt;Url;
    const DilloUrl *u2 = v2;
 
    return a_Url_cmp(u1, u2);
@@ -139,14 +139,14 @@
                                  CA_Callback_t Callback, void *CbData)
 {
    static int ClientKey = 0; /* Provide a primary key for each client */
-   CacheClient_t *NewClient;
+   CacheClient *NewClient;
 
    if (ClientKey &lt; INT_MAX) /* check for integer overflow */
       ClientKey++;
    else
       ClientKey = 1;
 
-   NewClient = dNew(CacheClient_t, 1);
+   NewClient = dNew(CacheClient, 1);
    NewClient-&gt;Key = ClientKey;
    NewClient-&gt;Url = Url;
    NewClient-&gt;Version = 0;
@@ -166,13 +166,13 @@
  */
 static int Cache_client_by_key_cmp(const void *client, const void *key)
 {
-   return ((CacheClient_t *)client)-&gt;Key - VOIDP2INT(key);
+   return ((CacheClient *)client)-&gt;Key - VOIDP2INT(key);
 }
 
 /*
  * Remove a client from the queue
  */
-static void Cache_client_dequeue(CacheClient_t *Client)
+static void Cache_client_dequeue(CacheClient *Client)
 {
    if (Client) {
       dList_remove(ClientQueue, Client);
@@ -187,7 +187,7 @@
 /*
  * Set safe values for a new cache entry
  */
-static void Cache_entry_init(CacheEntry_t *NewEntry, const DilloUrl *Url)
+static void Cache_entry_init(CacheEntry *NewEntry, const DilloUrl *Url)
 {
    NewEntry-&gt;Url = a_Url_dup(Url);
    NewEntry-&gt;TypeDet = NULL;
@@ -212,7 +212,7 @@
  * Get the data structure for a cached URL (using 'Url' as the search key)
  * If 'Url' isn't cached, return NULL
  */
-static CacheEntry_t *Cache_entry_search(const DilloUrl *Url)
+static CacheEntry *Cache_entry_search(const DilloUrl *Url)
 {
    return dList_find_sorted(CachedURLs, Url, Cache_entry_by_url_cmp);
 }
@@ -220,10 +220,10 @@
 /*
  * Given a URL, find its cache entry, following redirections.
  */
-static CacheEntry_t *Cache_entry_search_with_redirect(const DilloUrl *Url)
+static CacheEntry *Cache_entry_search_with_redirect(const DilloUrl *Url)
 {
    int i;
-   CacheEntry_t *entry;
+   CacheEntry *entry;
 
    for (i = 0; (entry = Cache_entry_search(Url)); ++i) {
 
@@ -244,16 +244,16 @@
 /*
  * Allocate and set a new entry in the cache list
  */
-static CacheEntry_t *Cache_entry_add(const DilloUrl *Url)
+static CacheEntry *Cache_entry_add(const DilloUrl *Url)
 {
-   CacheEntry_t *old_entry, *new_entry;
+   CacheEntry *old_entry, *new_entry;
 
    if ((old_entry = Cache_entry_search(Url))) {
       MSG_WARN("Cache_entry_add, leaking an entry.\n");
       dList_remove(CachedURLs, old_entry);
    }
 
-   new_entry = dNew(CacheEntry_t, 1);
+   new_entry = dNew(CacheEntry, 1);
    Cache_entry_init(new_entry, Url);  /* Set safe values */
    dList_insert_sorted(CachedURLs, new_entry, Cache_entry_cmp);
    return new_entry;
@@ -265,7 +265,7 @@
  */
 static void Cache_entry_inject(const DilloUrl *Url, Dstr *data_ds)
 {
-   CacheEntry_t *entry;
+   CacheEntry *entry;
 
    if (!(entry = Cache_entry_search(Url)))
       entry = Cache_entry_add(Url);
@@ -291,9 +291,9 @@
 }
 
 /*
- *  Free the components of a CacheEntry_t struct.
+ *  Free the components of a CacheEntry struct.
  */
-static void Cache_entry_free(CacheEntry_t *entry)
+static void Cache_entry_free(CacheEntry *entry)
 {
    a_Url_free((DilloUrl *)entry-&gt;Url);
    dFree(entry-&gt;TypeDet);
@@ -319,10 +319,10 @@
  * All the entry clients are removed too! (it may stop rendering of this
  * same resource on other windows, but nothing more).
  */
-static void Cache_entry_remove(CacheEntry_t *entry, DilloUrl *url)
+static void Cache_entry_remove(CacheEntry *entry, DilloUrl *url)
 {
    int i;
-   CacheClient_t *Client;
+   CacheClient *Client;
 
    if (!entry &amp;&amp; !(entry = Cache_entry_search(url)))
       return;
@@ -373,7 +373,7 @@
 int a_Cache_open_url(void *web, CA_Callback_t Call, void *CbData)
 {
    int ClientKey;
-   CacheEntry_t *entry;
+   CacheEntry *entry;
    DilloWeb *Web = web;
    DilloUrl *Url = Web-&gt;url;
 
@@ -402,7 +402,7 @@
  */
 uint_t a_Cache_get_flags(const DilloUrl *url)
 {
-   CacheEntry_t *entry = Cache_entry_search(url);
+   CacheEntry *entry = Cache_entry_search(url);
    return (entry ? entry-&gt;Flags : 0);
 }
 
@@ -411,14 +411,14 @@
  */
 uint_t a_Cache_get_flags_with_redirection(const DilloUrl *url)
 {
-   CacheEntry_t *entry = Cache_entry_search_with_redirect(url);
+   CacheEntry *entry = Cache_entry_search_with_redirect(url);
    return (entry ? entry-&gt;Flags : 0);
 }
 
 /*
  * Reference the cache data.
  */
-static void Cache_ref_data(CacheEntry_t *entry)
+static void Cache_ref_data(CacheEntry *entry)
 {
    if (entry) {
       entry-&gt;DataRefcount++;
@@ -436,7 +436,7 @@
 /*
  * Unreference the cache data.
  */
-static void Cache_unref_data(CacheEntry_t *entry)
+static void Cache_unref_data(CacheEntry *entry)
 {
    if (entry) {
       entry-&gt;DataRefcount--;
@@ -457,7 +457,7 @@
 /*
  * Get current content type.
  */
-static const char *Cache_current_content_type(CacheEntry_t *entry)
+static const char *Cache_current_content_type(CacheEntry *entry)
 {
    return entry-&gt;TypeNorm ? entry-&gt;TypeNorm : entry-&gt;TypeMeta ? entry-&gt;TypeMeta
           : entry-&gt;TypeHdr ? entry-&gt;TypeHdr : entry-&gt;TypeDet;
@@ -468,7 +468,7 @@
  */
 const char *a_Cache_get_content_type(const DilloUrl *url)
 {
-   CacheEntry_t *entry = Cache_entry_search_with_redirect(url);
+   CacheEntry *entry = Cache_entry_search_with_redirect(url);
 
    return (entry) ? Cache_current_content_type(entry) : NULL;
 }
@@ -476,7 +476,7 @@
 /*
  * Get pointer to entry's data.
  */
-static Dstr *Cache_data(CacheEntry_t *entry)
+static Dstr *Cache_data(CacheEntry *entry)
 {
    return entry-&gt;UTF8Data ? entry-&gt;UTF8Data : entry-&gt;Data;
 }
@@ -491,7 +491,7 @@
 {
    const char *curr;
    char *major, *minor, *charset;
-   CacheEntry_t *entry = Cache_entry_search(url);
+   CacheEntry *entry = Cache_entry_search(url);
 
    dReturn_val_if_fail (entry != NULL, NULL);
 
@@ -543,7 +543,7 @@
  */
 int a_Cache_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize)
 {
-   CacheEntry_t *entry = Cache_entry_search_with_redirect(Url);
+   CacheEntry *entry = Cache_entry_search_with_redirect(Url);
    if (entry) {
       Dstr *data;
       Cache_ref_data(entry);
@@ -649,7 +649,7 @@
  * Scan, allocate, and set things according to header info.
  * (This function needs the whole header to work)
  */
-static void Cache_parse_header(CacheEntry_t *entry)
+static void Cache_parse_header(CacheEntry *entry)
 {
    char *header = entry-&gt;Header-&gt;str;
    char *Length, *Type, *location_str, *encoding;
@@ -743,7 +743,7 @@
 
 #ifndef DISABLE_COOKIES
    if ((Cookies = Cache_parse_multiple_fields(header, "Set-Cookie"))) {
-      CacheClient_t *client;
+      CacheClient *client;
 
       for (i = 0; (client = dList_nth_data(ClientQueue, i)); ++i) {
          if (client-&gt;Url == entry-&gt;Url) {
@@ -803,7 +803,7 @@
  * Consume bytes until the whole header is got (up to a "\r\n\r\n" sequence)
  * (Also unfold multi-line fields and strip '\r' chars from header)
  */
-static int Cache_get_header(CacheEntry_t *entry,
+static int Cache_get_header(CacheEntry *entry,
                             const char *buf, size_t buf_size)
 {
    size_t N, i;
@@ -848,7 +848,7 @@
    int offset, len;
    const char *str;
    Dstr *dstr1, *dstr2, *dstr3;
-   CacheEntry_t *entry = Cache_entry_search(Url);
+   CacheEntry *entry = Cache_entry_search(Url);
 
    /* Assert a valid entry (not aborted) */
    dReturn_if_fail (entry != NULL);
@@ -947,7 +947,7 @@
  * Process redirections (HTTP 30x answers)
  * (This is a work in progress --not finished yet)
  */
-static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw)
+static int Cache_redirect(CacheEntry *entry, int Flags, BrowserWindow *bw)
 {
    DilloUrl *NewUrl;
 
@@ -1014,7 +1014,7 @@
 /*
  * Set a timeout function to ask for user/password.
  */
-static void Cache_auth_entry(CacheEntry_t *entry, BrowserWindow *bw)
+static void Cache_auth_entry(CacheEntry *entry, BrowserWindow *bw)
 {
    static int busy = 0;
    CacheAuthData_t *data;
@@ -1052,7 +1052,7 @@
  * (Currently used to handle WEB_RootUrl redirects,
  *  and to ignore image redirects --Jcid)
  */
-static void Cache_null_client(int Op, CacheClient_t *Client)
+static void Cache_null_client(int Op, CacheClient *Client)
 {
    DilloWeb *Web = Client-&gt;Web;
 
@@ -1099,13 +1099,13 @@
  *
  * TODO: Implement CA_Abort Op in client callback
  */
-static CacheEntry_t *Cache_process_queue(CacheEntry_t *entry)
+static CacheEntry *Cache_process_queue(CacheEntry *entry)
 {
    uint_t i;
    int st;
    const char *Type;
    Dstr *data;
-   CacheClient_t *Client;
+   CacheClient *Client;
    DilloWeb *ClientWeb;
    BrowserWindow *Client_bw = NULL;
    static bool_t Busy = FALSE;
@@ -1272,9 +1272,9 @@
  */
 static void Cache_delayed_process_queue_callback()
 {
-   CacheEntry_t *entry;
+   CacheEntry *entry;
 
-   while ((entry = (CacheEntry_t *)dList_nth_data(DelayedQueue, 0))) {
+   while ((entry = (CacheEntry *)dList_nth_data(DelayedQueue, 0))) {
       Cache_ref_data(entry);
       if ((entry = Cache_process_queue(entry))) {
          Cache_unref_data(entry);
@@ -1288,7 +1288,7 @@
 /*
  * Set a call to Cache_process_queue from the main cycle.
  */
-static void Cache_delayed_process_queue(CacheEntry_t *entry)
+static void Cache_delayed_process_queue(CacheEntry *entry)
 {
    /* there's no need to repeat entries in the queue */
    if (!dList_find(DelayedQueue, entry))
@@ -1306,10 +1306,10 @@
  * Return: Client if true, NULL otherwise
  * (cache.c has only one call to a capi function. This avoids a second one)
  */
-CacheClient_t *a_Cache_client_get_if_unique(int Key)
+CacheClient *a_Cache_client_get_if_unique(int Key)
 {
    int i, n = 0;
-   CacheClient_t *Client, *iClient;
+   CacheClient *Client, *iClient;
 
    if ((Client = dList_find_custom(ClientQueue, INT2VOIDP(Key),
                                    Cache_client_by_key_cmp))) {
@@ -1328,8 +1328,8 @@
  */
 void a_Cache_stop_client(int Key)
 {
-   CacheClient_t *Client;
-   CacheEntry_t *entry;
+   CacheClient *Client;
+   CacheEntry *entry;
    DICacheEntry *DicEntry;
 
    /* The client can be in both queues at the same time */
@@ -1357,7 +1357,7 @@
  */
 void a_Cache_freeall(void)
 {
-   CacheClient_t *Client;
+   CacheClient *Client;
    void *data;
 
    /* free the client queue */
diff -r 0069854f6af7 src/cache.h
--- a/src/cache.h
+++ b/src/cache.h
@@ -34,12 +34,12 @@
 #define CA_HugeFile     0x1000  /* URL content is too big */
 #define CA_IsEmpty      0x2000  /* True until a byte of content arrives */
 
-typedef struct CacheClient CacheClient_t;
+typedef struct CacheClient CacheClient;
 
 /*
  * Callback type for cache clients
  */
-typedef void (*CA_Callback_t)(int Op, CacheClient_t *Client);
+typedef void (*CA_Callback_t)(int Op, CacheClient *Client);
 
 /*
  * Data structure for cache clients.
@@ -72,7 +72,7 @@
 int a_Cache_download_enabled(const DilloUrl *url);
 void a_Cache_entry_remove_by_url(DilloUrl *url);
 void a_Cache_freeall(void);
-CacheClient_t *a_Cache_client_get_if_unique(int Key);
+CacheClient *a_Cache_client_get_if_unique(int Key);
 void a_Cache_stop_client(int Key);
 
 
diff -r 0069854f6af7 src/capi.c
--- a/src/capi.c
+++ b/src/capi.c
@@ -599,7 +599,7 @@
  */
 void a_Capi_stop_client(int Key, int force)
 {
-   CacheClient_t *Client;
+   CacheClient *Client;
 
    _MSG("a_Capi_stop_client:  force=%d\n", force);
 
diff -r 0069854f6af7 src/dicache.c
--- a/src/dicache.c
+++ b/src/dicache.c
@@ -357,7 +357,7 @@
 /*
  * Implement the close method of the decoding process
  */
-void a_Dicache_close(DilloUrl *url, int version, CacheClient_t *Client)
+void a_Dicache_close(DilloUrl *url, int version, CacheClient *Client)
 {
    DilloWeb *Web = Client-&gt;Web;
    DICacheEntry *DicEntry = a_Dicache_get_entry(url, version);
@@ -461,7 +461,7 @@
 /*
  * This function is a cache client; (but feeds its clients from dicache)
  */
-void a_Dicache_callback(int Op, CacheClient_t *Client)
+void a_Dicache_callback(int Op, CacheClient *Client)
 {
    uint_t i;
    DilloWeb *Web = Client-&gt;Web;
diff -r 0069854f6af7 src/dicache.h
--- a/src/dicache.h
+++ b/src/dicache.h
@@ -56,7 +56,7 @@
                           void **Data);
 void *a_Dicache_jpeg_image(const char *Type, void *Ptr, CA_Callback_t *Call,
                            void **Data);
-void a_Dicache_callback(int Op, CacheClient_t *Client);
+void a_Dicache_callback(int Op, CacheClient *Client);
 
 void a_Dicache_set_parms(DilloUrl *url, int version, DilloImage *Image,
                          uint_t width, uint_t height, DilloImgType type);
@@ -65,7 +65,7 @@
                         int num_colors_max, int bg_index);
 void a_Dicache_new_scan(const DilloUrl *url, int version);
 void a_Dicache_write(DilloUrl *url, int version, const uchar_t *buf, uint_t Y);
-void a_Dicache_close(DilloUrl *url, int version, CacheClient_t *Client);
+void a_Dicache_close(DilloUrl *url, int version, CacheClient *Client);
 
 void a_Dicache_invalidate_entry(const DilloUrl *Url);
 DICacheEntry* a_Dicache_ref(const DilloUrl *Url, int version);
diff -r 0069854f6af7 src/dpng.h
--- a/src/dpng.h
+++ b/src/dpng.h
@@ -10,7 +10,7 @@
 
 
 void *a_Png_new(DilloImage *Image, DilloUrl *url, int version);
-void a_Png_callback(int Op, CacheClient_t *Client);
+void a_Png_callback(int Op, CacheClient *Client);
 
 
 #ifdef __cplusplus
diff -r 0069854f6af7 src/gif.c
--- a/src/gif.c
+++ b/src/gif.c
@@ -144,7 +144,7 @@
  * Forward declarations
  */
 static void Gif_write(DilloGif *gif, void *Buf, uint_t BufSize);
-static void Gif_close(DilloGif *gif, CacheClient_t *Client);
+static void Gif_close(DilloGif *gif, CacheClient *Client);
 static size_t Gif_process_bytes(DilloGif *gif, const uchar_t *buf,
                                 int bufsize, void *Buf);
 
@@ -203,10 +203,10 @@
 void a_Gif_callback(int Op, void *data)
 {
    if (Op == CA_Send) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Gif_write(Client-&gt;CbData, Client-&gt;Buf, Client-&gt;BufSize);
    } else if (Op == CA_Close) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Gif_close(Client-&gt;CbData, Client);
    } else if (Op == CA_Abort) {
       Gif_free(data);
@@ -243,7 +243,7 @@
 /*
  * Finish the decoding process (and free the memory)
  */
-static void Gif_close(DilloGif *gif, CacheClient_t *Client)
+static void Gif_close(DilloGif *gif, CacheClient *Client)
 {
    _MSG("Gif_close: destroy gif %p\n", gif);
    a_Dicache_close(gif-&gt;url, gif-&gt;version, Client);
diff -r 0069854f6af7 src/html.cc
--- a/src/html.cc
+++ b/src/html.cc
@@ -101,7 +101,7 @@
 static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof);
 static bool Html_load_image(BrowserWindow *bw, DilloUrl *url,
                             const DilloUrl *requester, DilloImage *image);
-static void Html_callback(int Op, CacheClient_t *Client);
+static void Html_callback(int Op, CacheClient *Client);
 static void Html_tag_cleanup_at_close(DilloHtml *html, int TagIdx);
 
 /*-----------------------------------------------------------------------------
@@ -2913,7 +2913,7 @@
 /*
  * Called by the network engine when a stylesheet has new data.
  */
-static void Html_css_load_callback(int Op, CacheClient_t *Client)
+static void Html_css_load_callback(int Op, CacheClient *Client)
 {
    _MSG("Html_css_load_callback: Op=%d\n", Op);
    if (Op) { /* EOF */
@@ -3786,7 +3786,7 @@
  *  Buf     : a pointer to new data
  *  BufSize : new data size (in bytes)
  */
-static void Html_callback(int Op, CacheClient_t *Client)
+static void Html_callback(int Op, CacheClient *Client)
 {
    DilloHtml *html = (DilloHtml*)Client-&gt;CbData;
 
diff -r 0069854f6af7 src/jpeg.c
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -111,7 +111,7 @@
 /*
  * Finish the decoding process
  */
-static void Jpeg_close(DilloJpeg *jpeg, CacheClient_t *Client)
+static void Jpeg_close(DilloJpeg *jpeg, CacheClient *Client)
 {
    _MSG("Jpeg_close\n");
    a_Dicache_close(jpeg-&gt;url, jpeg-&gt;version, Client);
@@ -224,10 +224,10 @@
 void a_Jpeg_callback(int Op, void *data)
 {
    if (Op == CA_Send) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Jpeg_write(Client-&gt;CbData, Client-&gt;Buf, Client-&gt;BufSize);
    } else if (Op == CA_Close) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Jpeg_close(Client-&gt;CbData, Client);
    } else if (Op == CA_Abort) {
       Jpeg_free(data);
diff -r 0069854f6af7 src/nav.c
--- a/src/nav.c
+++ b/src/nav.c
@@ -539,7 +539,7 @@
 /*
  * Receive data from the cache and save it to a local file
  */
-static void Nav_save_cb(int Op, CacheClient_t *Client)
+static void Nav_save_cb(int Op, CacheClient *Client)
 {
    DilloWeb *Web = Client-&gt;Web;
    int Bytes;
diff -r 0069854f6af7 src/plain.cc
--- a/src/plain.cc
+++ b/src/plain.cc
@@ -76,7 +76,7 @@
 /*
  * Forward declarations
  */
-static void Plain_callback(int Op, CacheClient_t *Client);
+static void Plain_callback(int Op, CacheClient *Client);
 void a_Plain_free(void *data);
 
 
@@ -219,7 +219,7 @@
 /*
  * This function is a cache client
  */
-static void Plain_callback(int Op, CacheClient_t *Client)
+static void Plain_callback(int Op, CacheClient *Client)
 {
    DilloPlain *plain = (DilloPlain*)Client-&gt;CbData;
 
diff -r 0069854f6af7 src/png.c
--- a/src/png.c
+++ b/src/png.c
@@ -310,7 +310,7 @@
 /*
  * Finish the decoding process (and free the memory)
  */
-static void Png_close(DilloPng *png, CacheClient_t *Client)
+static void Png_close(DilloPng *png, CacheClient *Client)
 {
    _MSG("Png_close\n");
    /* Let dicache know decoding is over */
@@ -412,10 +412,10 @@
 void a_Png_callback(int Op, void *data)
 {
    if (Op == CA_Send) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Png_write(Client-&gt;CbData, Client-&gt;Buf, Client-&gt;BufSize);
    } else if (Op == CA_Close) {
-      CacheClient_t *Client = data;
+      CacheClient *Client = data;
       Png_close(Client-&gt;CbData, Client);
    } else if (Op == CA_Abort) {
       Png_free(data);
</pre></body></html>