Header reorganization. Basically all system headers are now included in

tinyproxy.h and all the other files include the tinyproxy.h header. This
moves all the dependancy issues into one file.
This commit is contained in:
Robert James Kaes 2001-10-25 17:27:39 +00:00
parent 722a7d2142
commit 4ac03908fc
10 changed files with 28 additions and 66 deletions

View File

@ -1,4 +1,4 @@
/* $Id: acl.c,v 1.8 2001-09-15 21:21:01 rjkaes Exp $
/* $Id: acl.c,v 1.9 2001-10-25 17:27:39 rjkaes Exp $
*
* This system handles Access Control for use of this daemon. A list of
* domains, or IP addresses (including IP blocks) are stored in a list
@ -19,8 +19,6 @@
#include "tinyproxy.h"
#include <ctype.h>
#include "acl.h"
#include "log.h"
#include "sock.h"

View File

@ -1,4 +1,4 @@
/* $Id: anonymous.c,v 1.6 2001-08-26 21:07:27 rjkaes Exp $
/* $Id: anonymous.c,v 1.7 2001-10-25 17:27:39 rjkaes Exp $
*
* Handles insertion and searches for headers which should be let through when
* the anonymous feature is turned on. The headers are stored in a Ternary
@ -18,15 +18,7 @@
* General Public License for more details.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include "tinyproxy.h"
#include "anonymous.h"
#include "log.h"

View File

@ -1,4 +1,4 @@
/* $Id: dnscache.c,v 1.16 2001-09-12 03:32:24 rjkaes Exp $
/* $Id: dnscache.c,v 1.17 2001-10-25 17:27:39 rjkaes Exp $
*
* This is a caching DNS system. When a host name is needed we look it up here
* and see if there is already an answer for it. The domains are placed in a
@ -20,14 +20,7 @@
* General Public License for more details.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
#include <unistd.h>
#include "tinyproxy.h"
#include "dnscache.h"
#include "log.h"

View File

@ -1,4 +1,4 @@
/* $Id: filter.c,v 1.6 2001-09-12 03:32:54 rjkaes Exp $
/* $Id: filter.c,v 1.7 2001-10-25 17:27:39 rjkaes Exp $
*
* Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca)
*
@ -18,9 +18,6 @@
#include "tinyproxy.h"
#include <ctype.h>
#include <sysexits.h>
#include "filter.h"
#include "regexp.h"
#include "utils.h"

View File

@ -1,4 +1,4 @@
/* $Id: log.c,v 1.14 2001-09-04 16:50:22 rjkaes Exp $
/* $Id: log.c,v 1.15 2001-10-25 17:27:39 rjkaes Exp $
*
* Logs the various messages which tinyproxy produces to either a log file or
* the syslog daemon. Not much to it...
@ -19,8 +19,6 @@
#include "tinyproxy.h"
#include <stdarg.h>
#include "log.h"
static char *syslog_level[] = {

View File

@ -1,4 +1,4 @@
/* $Id: scanner.l,v 1.5 2001-09-16 20:08:24 rjkaes Exp $
/* $Id: scanner.l,v 1.6 2001-10-25 17:27:39 rjkaes Exp $
*
* This builds the scanner for the tinyproxy configuration file. This
* file needs to stay in sync with grammar.y. If someone knows lex and yacc
@ -19,9 +19,8 @@
%{
#include "tinyproxy.h"
#include "grammar.h"
#include <string.h>
#include <stdio.h>
struct keyword {
char *kw_name;

View File

@ -1,4 +1,4 @@
/* $Id: ternary.c,v 1.10 2001-09-08 18:58:02 rjkaes Exp $
/* $Id: ternary.c,v 1.11 2001-10-25 17:27:39 rjkaes Exp $
*
* This module creates a Ternary Search Tree which can store both string
* keys, and arbitrary data for each key. It works similar to a hash, and
@ -21,23 +21,11 @@
* General Public License for more details.
*/
#if defined HAVE_CONFIG_H
# include <config.h>
#endif
#include "tinyproxy.h"
#if defined HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include "ternary.h"
#include "tinyproxy.h"
#include "utils.h"
#include "log.h"
#include "ternary.h"
#include "utils.h"
/*
* Macros for the tree structures (limits)

View File

@ -1,4 +1,4 @@
/* $Id: tinyproxy.c,v 1.17 2001-09-16 20:11:54 rjkaes Exp $
/* $Id: tinyproxy.c,v 1.18 2001-10-25 17:27:39 rjkaes Exp $
*
* The initialise routine. Basically sets up all the initial stuff (logfile,
* listening socket, config options, etc.) and then sits there and loops
@ -24,15 +24,6 @@
#include "tinyproxy.h"
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOUCE_H */
#include <grp.h>
#include <pwd.h>
#include <signal.h>
#include <sysexits.h>
#include <syslog.h>
#include "anonymous.h"
#include "buffer.h"
#include "dnscache.h"

View File

@ -1,4 +1,4 @@
/* $Id: tinyproxy.h,v 1.18 2001-10-25 16:58:50 rjkaes Exp $
/* $Id: tinyproxy.h,v 1.19 2001-10-25 17:27:39 rjkaes Exp $
*
* See 'tinyproxy.c' for a detailed description.
*
@ -27,6 +27,9 @@
* Include standard headers which are used through-out tinyproxy
*/
#include <sys/types.h>
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
@ -45,12 +48,18 @@
#include <sys/uio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <netdb.h>
#ifdef HAVE_PTHREAD_H
# include <pthread.h>
#endif
#include <pwd.h>
#include <signal.h>
#include <stdarg.h>
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
@ -60,8 +69,9 @@
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <sysexits.h>
#include <syslog.h>
#include <unistd.h>
#include <assert.h>
#ifndef SHUT_RD /* these three Posix.1g names are quite new */
# define SHUT_RD 0 /* shutdown for reading */

View File

@ -1,4 +1,4 @@
/* $Id: utils.c,v 1.15 2001-10-25 16:58:50 rjkaes Exp $
/* $Id: utils.c,v 1.16 2001-10-25 17:27:39 rjkaes Exp $
*
* Misc. routines which are used by the various functions to handle strings
* and memory allocation and pretty much anything else we can think of. Also,
@ -21,10 +21,6 @@
#include "tinyproxy.h"
#include <ctype.h>
#include <signal.h>
#include <sysexits.h>
#include "buffer.h"
#include "conns.h"
#include "log.h"