]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
more ANSIFY'ing
authorwessels <>
Sat, 14 Sep 1996 22:05:39 +0000 (22:05 +0000)
committerwessels <>
Sat, 14 Sep 1996 22:05:39 +0000 (22:05 +0000)
src/acl.cc
src/client_side.cc
src/disk.cc
src/gopher.cc
src/squid.h
src/stmem.cc

index 2a875a7f19e98cd49f8dd97baa169a149b801224..6a8555192a1012d625d9762e568ee48b9bf0561d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.34 1996/09/14 08:45:32 wessels Exp $
+ * $Id: acl.cc,v 1.35 1996/09/14 16:05:39 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -51,9 +51,6 @@ static int aclMatchInteger(intlist * data, int i);
 static int aclMatchIp(struct _acl_ip_data *data, struct in_addr c);
 static int aclMatchRegex(relist * data, char *word);
 static int aclMatchTime(struct _acl_time_data *data, time_t when);
-#ifdef UNUSED_CODE
-static int aclMatchEndOfWord(wordlist * data, char *word);
-#endif
 static intlist *aclParseIntlist(void);
 static struct _acl_ip_data *aclParseIpList(void);
 static intlist *aclParseMethodList(void);
@@ -657,40 +654,6 @@ aclMatchIp(struct _acl_ip_data *data, struct in_addr c)
     return 0;
 }
 
-#ifdef UNUSED_CODE
-static int
-aclMatchWord(wordlist * data, char *word)
-{
-    if (word == NULL)
-       return 0;
-    debug(28, 3, "aclMatchWord: checking '%s'\n", word);
-    while (data) {
-       debug(28, 3, "aclMatchWord: looking for '%s'\n", data->key);
-       if (strstr(word, data->key))
-           return 1;
-       data = data->next;
-    }
-    return 0;
-}
-
-static int
-aclMatchEndOfWord(wordlist * data, char *word)
-{
-    int offset;
-    if (word == NULL)
-       return 0;
-    debug(28, 3, "aclMatchEndOfWord: checking '%s'\n", word);
-    for (; data; data = data->next) {
-       debug(28, 3, "aclMatchEndOfWord: looking for '%s'\n", data->key);
-       if ((offset = strlen(word) - strlen(data->key)) < 0)
-           continue;
-       if (strcasecmp(word + offset, data->key) == 0)
-           return 1;
-    }
-    return 0;
-}
-#endif
-
 static int
 aclMatchDomainList(wordlist * data, char *host)
 {
index 38618eb60d596b381f305f42d0dfdc8d4ae00cf7..84f1c11a64a346fe5826044e282d8d5996ad8ab6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.23 1996/09/14 08:45:41 wessels Exp $
+ * $Id: client_side.cc,v 1.24 1996/09/14 16:05:41 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -103,7 +103,9 @@ clientProxyAuthCheck(icpStateData * icpState)
 #endif /* USE_PROXY_AUTH */
 
 void
-clientAccessCheck(icpStateData * icpState, void (*handler) _PARAMS((icpStateData *, int)))
+clientAccessCheck(icpStateData * icpState,
+       void (*handler) (icpStateData *,
+       int))
 {
     int answer = 1;
     request_t *r = icpState->request;
index 3ecb420712727b28eff373efead5b1491783eea9..a7bb00954163f8825cfb280f87723ea1a94afbc5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: disk.cc,v 1.23 1996/09/14 08:45:47 wessels Exp $
+ * $Id: disk.cc,v 1.24 1996/09/14 16:05:42 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -185,32 +185,6 @@ file_open(char *path, int (*handler) (), int mode)
     return fd;
 }
 
-#ifdef UNUSED_CODE
-int file_update_open(int fd, char *path;       /* path to file */
-) {
-    FD_ENTRY *conn;
-
-    /* update fdstat */
-    fdstat_open(fd, FD_FILE);
-
-    /* init table */
-    strncpy(file_table[fd].filename, path, MAX_FILE_NAME_LEN);
-    file_table[fd].at_eof = NO;
-    file_table[fd].open_stat = FILE_OPEN;
-    file_table[fd].close_request = NOT_REQUEST;
-    file_table[fd].write_lock = UNLOCK;
-    file_table[fd].write_pending = NO_WRT_PENDING;
-    file_table[fd].write_daemon = NOT_PRESENT;
-    file_table[fd].access_code = 0;
-    file_table[fd].write_q = NULL;
-
-    conn = &fd_table[fd];
-    memset(conn, '\0', sizeof(FD_ENTRY));
-    conn->comm_type = COMM_NONBLOCKING;
-    return fd;
-}
-#endif
-
 
 /* close a disk file. */
 int 
@@ -358,7 +332,13 @@ diskHandleWrite(int fd, FileEntry * entry)
 /* write back queue. Only one writer at a time. */
 /* call a handle when writing is complete. */
 int
-file_write(int fd, char *ptr_to_buf, int len, int access_code, void (*handle) (), void *handle_data, void (*free) _PARAMS((void *)))
+file_write(int fd,
+       char *ptr_to_buf,
+       int len,
+       int access_code,
+       void (*handle) (),
+       void *handle_data,
+       void (*free) (void *))
 {
     dwrite_q *wq = NULL;
 
index 24cf0f249f4ba9820e995c28efc61eea2c232bb4..9aa8c0bb6eff0587f1d077ef45661bf1d4783ab9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: gopher.cc,v 1.43 1996/09/14 08:46:02 wessels Exp $
+ * $Id: gopher.cc,v 1.44 1996/09/14 16:05:43 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -161,21 +161,21 @@ typedef struct gopher_ds {
 static int gopherStateFree(int fd, GopherStateData *);
 static void gopher_mime_content(char *buf, char *name, char *def);
 static void gopherMimeCreate(GopherStateData *);
-static int gopher_url_parser _PARAMS((char *url,
+static int gopher_url_parser (char *url,
        char *host,
        int *port,
        char *type_id,
-       char *request));
+       char *request);
 static void gopherEndHTML(GopherStateData *);
 static void gopherToHTML(GopherStateData *, char *inbuf, int len);
 static int gopherReadReplyTimeout(int fd, GopherStateData *);
 static void gopherLifetimeExpire(int fd, GopherStateData *);
 static void gopherReadReply(int fd, GopherStateData *);
-static void gopherSendComplete _PARAMS((int fd,
+static void gopherSendComplete (int fd,
        char *buf,
        int size,
        int errflag,
-       void *data));
+       void *data);
 static void gopherSendRequest(int fd, GopherStateData *);
 static GopherStateData *CreateGopherStateData(void);
 
index 746e1071fb00b312f57c1f6ad463fc6c110d5bb4..7b9eaadc11b9544b6bcf3386cb32443b42576d48 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.45 1996/09/14 08:46:23 wessels Exp $
+ * $Id: squid.h,v 1.46 1996/09/14 16:05:48 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -216,7 +216,7 @@ typedef unsigned long u_num32;
 #include "GNUregex.h"
 #include "ansihelp.h"
 
-typedef void (*SIH) _PARAMS((int, void *));    /* swap in */
+typedef void (*SIH) (int, void *);     /* swap in */
 typedef int (*QS) (const void *, const void *);
 
 #include "cache_cf.h"
index 9769178076ede016e7fd8d7741968c87132c63ad..417acefc347f7871fff18a1fe9c45301af92b381 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stmem.cc,v 1.20 1996/09/14 08:46:28 wessels Exp $
+ * $Id: stmem.cc,v 1.21 1996/09/14 16:05:49 wessels Exp $
  *
  * DEBUG: section 19    Memory Primitives
  * AUTHOR: Harvest Derived
@@ -247,57 +247,6 @@ memAppend(mem_ptr mem, char *data, int len)
     return len;
 }
 
-#ifdef UNUSED_CODE
-int
-memGrep(mem_ptr mem, char *string, int nbytes)
-{
-    mem_node p = mem->head;
-    char *str_i, *mem_i;
-    int i = 0, blk_idx = 0, state, goal;
-
-    debug(19, 6, "memGrep: looking for %s in less than %d bytes.\n",
-       string, nbytes);
-
-    if (!p)
-       return 0;
-
-    if (mem->origin_offset != 0) {
-       debug(19, 1, "memGrep: Some lower chunk of data has been erased. Can't do memGrep!\n");
-       return 0;
-    }
-    str_i = string;
-    mem_i = p->data;
-    state = 1;
-    goal = strlen(string);
-
-    while (i < nbytes) {
-       if (tolower(*mem_i++) == tolower(*str_i++))
-           state++;
-       else {
-           state = 1;
-           str_i = string;
-       }
-
-       i++;
-       blk_idx++;
-
-       /* Return offset of byte beyond the matching string */
-       if (state == goal)
-           return (i + 1);
-
-       if (blk_idx >= p->len) {
-           if (p->next) {
-               p = p->next;
-               mem_i = p->data;
-               blk_idx = 0;
-           } else
-               break;
-       }
-    }
-    return 0;
-}
-#endif
-
 int
 memCopy(mem_ptr mem, int offset, char *buf, int size)
 {
@@ -366,9 +315,6 @@ memInit()
     new->mem_free_data_upto = memFreeDataUpto;
     new->mem_append = memAppend;
     new->mem_copy = memCopy;
-#ifdef UNUSED_CODE
-    new->mem_grep = memGrep;
-#endif
     return new;
 }