---------------------
PatchSet 2887 
Date: 2001/08/27 21:48:15
Author: tolsty
Branch: nt-2_3-tolsty
Tag: (none) 
Log:
Reworked error handling. More Unix sources compatibility

Members: 
	CONTRIBUTORS:1.1.1.3.22.1->1.1.1.3.22.1.2.1 
	ChangeLog:1.1.1.3.4.4.2.1->1.1.1.3.4.4.2.1.2.1 
	acconfig.h:1.1.1.3.12.1->1.1.1.3.12.1.2.1 
	configure.in:1.1.1.3.4.5.2.2->1.1.1.3.4.5.2.2.2.1 
	makefile.in:1.1.1.3->1.1.1.3.18.1 
	auth_modules/LDAP/LDAP_auth.dsp:1.1.2.2->1.1.2.2.2.1 
	auth_modules/LDAP/LDAP_auth.mak:1.1.2.2->1.1.2.2.2.1 
	auth_modules/LDAP/LDAP_auth.rc:1.1.2.1->1.1.2.1.2.1 
	auth_modules/LDAP/squid_ldap_auth.c:1.1.1.1.56.1->1.1.1.1.56.1.2.1 
	auth_modules/MSNT/denyusers.c:1.1.16.1->1.1.16.1.6.1 
	auth_modules/MSNT/md4.c:1.1.1.1->1.1.1.1.62.1 
	auth_modules/MSNT/rfcnb-common.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb-error.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb-io.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb-io.h:1.1.1.1->1.1.1.1.62.1 
	auth_modules/MSNT/rfcnb-priv.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb-util.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb-util.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/rfcnb.h:1.1.1.1->1.1.1.1.62.1 
	auth_modules/MSNT/session.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smbauth.c:1.1.1.1.4.2->1.1.1.1.4.2.6.1 
	auth_modules/MSNT/smbdes.c:1.1.1.1->1.1.1.1.62.1 
	auth_modules/MSNT/smbencrypt.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smblib-common.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smblib-priv.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smblib-util.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smblib.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/smblib.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/std-defines.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/std-includes.h:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/valid.c:1.1.1.1->1.1.1.1.30.1 
	auth_modules/MSNT/valid.h:1.1.1.1->1.1.1.1.62.1 
	auth_modules/NCSA/Makefile.in:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	auth_modules/NCSA/NCSA_auth.dsp:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NCSA/NCSA_auth.mak:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NCSA/NCSA_auth.rc:1.1.2.1->1.1.2.1.2.1 
	auth_modules/NCSA/ncsa_auth.c:1.1.1.1.66.1->1.1.1.1.66.1.2.1 
	auth_modules/NT/NT_auth.c:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NT/NT_auth.dsp:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NT/NT_auth.mak:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NT/NT_auth.rc:1.1.2.1->1.1.2.1.2.1 
	auth_modules/NT/valid.c:1.1.2.2->1.1.2.2.2.1 
	auth_modules/NT/valid.h:1.1.2.1->1.1.2.1.2.1 
	auth_modules/PAM/Makefile.in:1.1.1.1.22.1->1.1.1.1.22.1.2.1 
	auth_modules/PAM/pam_auth.c:1.1.1.1.18.1->1.1.1.1.18.1.2.1 
	auth_modules/SMB/Makefile.in:1.1.1.1.20.1->1.1.1.1.20.1.2.1 
	auth_modules/SMB/smb_auth.c:1.1.1.2->1.1.1.2.28.1 
	auth_modules/getpwnam/Makefile.in:1.1.1.2.30.1->1.1.1.2.30.1.2.1 
	auth_modules/getpwnam/getpwnam_auth.c:1.1.1.1->1.1.1.1.72.1 
	contrib/rredir.c:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	contrib/chpasswd/Dutch.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/English.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/French.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/German.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/Hungarian.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/Italian.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/Portuguese.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/Russian.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/Spanish.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/chpasswd.c:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/chpasswd.dsp:1.1.2.3->1.1.2.3.2.1 
	contrib/chpasswd/chpasswd.mak:1.1.2.3->1.1.2.3.2.1 
	contrib/chpasswd/chpasswd.rc:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/conf.h:1.1.2.1->1.1.2.1.2.1 
	contrib/chpasswd/language.h:1.1.2.1->1.1.2.1.2.1 
	contrib/htpasswd/htpasswd.c:1.1.2.1->1.1.2.1.2.1 
	contrib/htpasswd/htpasswd.dsp:1.1.2.3->1.1.2.3.2.1 
	contrib/htpasswd/htpasswd.mak:1.1.2.3->1.1.2.3.2.1 
	contrib/htpasswd/htpasswd.rc:1.1.2.1->1.1.2.1.2.1 
	doc/Release-Notes-1.0.txt:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	doc/Release-Notes-1.1.txt:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	doc/Programming-Guide/prog-guide.sgml:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	errors/Makefile.in:1.1.1.2->1.1.1.2.26.1 
	errors/Czech/ERR_SHUTTING_DOWN:1.1.1.2->1.1.1.2.122.1 
	errors/Traditional_Chinese/ERR_ACCESS_DENIED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_CACHE_ACCESS_DENIED:1.1.1.1->1.1.1.1.32.1 
	errors/Traditional_Chinese/ERR_CACHE_MGR_ACCESS_DENIED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_CANNOT_FORWARD:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_CONNECT_FAIL:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_DNS_FAIL:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FORWARDING_DENIED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FTP_DISABLED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FTP_FAILURE:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FTP_PUT_CREATED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FTP_PUT_ERROR:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_FTP_PUT_MODIFIED:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_INVALID_REQ:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_INVALID_URL:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_LIFETIME_EXP:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_NO_RELAY:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_ONLY_IF_CACHED_MISS:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_READ_ERROR:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_READ_TIMEOUT:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_SHUTTING_DOWN:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_SOCKET_FAILURE:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_UNSUP_REQ:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_URN_RESOLVE:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_WRITE_ERROR:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/ERR_ZERO_SIZE_OBJECT:1.1.1.1->1.1.1.1.136.1 
	errors/Traditional_Chinese/generic:1.1.1.1->1.1.1.1.136.1 
	icons/Makefile.in:1.1.1.3->1.1.1.3.26.1 
	include/Array.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/GNUregex.h:1.1.1.2.44.1->1.1.1.2.44.1.2.1 
	include/PSAPI.H:1.1.2.1->1.1.2.1.2.1 
	include/READDIR.H:1.1.2.1->1.1.2.1.2.1 
	include/Stack.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/asn1.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/autoconf.h:1.1.2.6->1.1.2.6.2.1 
	include/cache_snmp.h:1.1.1.3.30.1->1.1.1.3.30.1.2.1 
	include/config.h:1.1.2.6->1.1.2.6.2.1 
	include/config.h.in:1.1.1.3.4.1.2.5->1.1.1.3.4.1.2.5.2.1 
	include/crypt.h:1.1.2.1->1.1.2.1.2.1 
	include/getopt.h:1.1.2.1->1.1.2.1.2.1 
	include/hash.h:1.1.1.1.42.1->1.1.1.1.42.1.2.1 
	include/heap.h:1.1.1.1.2.1->1.1.1.1.2.1.2.1 
	include/md5.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/parse.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/radix.h:1.1.1.1.42.2->1.1.1.1.42.2.2.1 
	include/rfc1035.h:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	include/snmp.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_api.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_api_error.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_api_util.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_client.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_coexist.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_debug.h:1.1.1.2.44.1->1.1.1.2.44.1.2.1 
	include/snmp_error.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_impl.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_msg.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_pdu.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_session.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_util.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/snmp_vars.h:1.1.1.2.30.1->1.1.1.2.30.1.2.1 
	include/snprintf.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/splay.h:1.1.1.2.2.1->1.1.1.2.2.1.2.1 
	include/tree.h:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	include/util.h:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	include/version.h:1.1.1.3.4.4.2.4->1.1.1.3.4.4.2.4.2.1 
	lib/Array.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	lib/GNUregex.c:1.1.1.1.42.1->1.1.1.1.42.1.2.1 
	lib/Makefile.in:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	lib/base64.c:1.1.1.1.40.1->1.1.1.1.40.1.2.1 
	lib/dlmalloc.c:1.1.1.1.44.2->1.1.1.1.44.2.2.1 
	lib/drand48.c:1.1.1.2->1.1.1.2.122.1 
	lib/encrypt.c:1.1.2.1->1.1.2.1.2.1 
	lib/getfullhostname.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	lib/hash.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	lib/heap.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	lib/html_quote.c:1.1.30.1.2.1->1.1.30.1.2.1.2.1 
	lib/md5-test.c:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	lib/md5.c:1.1.1.2.30.1->1.1.1.2.30.1.2.1 
	lib/radix.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	lib/readdir.c:1.1.78.1->1.1.78.1.2.1 
	lib/rfc1035.c:1.1.1.1.4.3.2.1->1.1.1.1.4.3.2.1.2.1 
	lib/rfc1123.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	lib/rfc1738.c:1.1.1.2.4.1.2.2->1.1.1.2.4.1.2.2.2.1 
	lib/safe_inet_addr.c:1.1.1.3.30.1->1.1.1.3.30.1.2.1 
	lib/snprintf.c:1.1.1.3.30.1->1.1.1.3.30.1.2.1 
	lib/splay.c:1.1.1.2.2.1->1.1.1.2.2.1.2.1 
	lib/tempnam.c:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	lib/util.c:1.1.1.3.4.2.2.2->1.1.1.3.4.2.2.2.2.1 
	lib/uudecode.c:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	lib/win32lib.c:1.1.2.4->1.1.2.4.2.1 
	scripts/RunAccel.in:1.1.1.2.44.1->1.1.1.2.44.1.2.1 
	scripts/RunCache.in:1.1.1.2.44.1->1.1.1.2.44.1.2.1 
	scripts/check_cache.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	scripts/fileno-to-pathname.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	scripts/flag_truncs.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	scripts/upgrade-1.0-store.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	snmplib/asn1.c:1.1.1.1->1.1.1.1.136.1 
	snmplib/coexistance.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/mib.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/parse.c:1.1.1.2.70.1->1.1.1.2.70.1.2.1 
	snmplib/snmp_api.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/snmp_api_error.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/snmp_error.c:1.1.1.1->1.1.1.1.136.1 
	snmplib/snmp_msg.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/snmp_pdu.c:1.1.1.1->1.1.1.1.76.1 
	snmplib/snmp_vars.c:1.1.1.2->1.1.1.2.122.1 
	snmplib/snmplib_debug.c:1.1.1.2->1.1.1.2.126.1 
	src/CacheDigest.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/ETag.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/HttpBody.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/HttpHdrCc.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpHdrContRange.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpHdrExtField.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpHdrRange.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpHeader.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/HttpHeaderTools.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpMsg.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/HttpReply.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpRequest.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/HttpStatusLine.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/Makefile.in:1.1.1.3.14.2->1.1.1.3.14.2.2.1 
	src/MemBuf.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/MemPool.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/Packer.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/StatHist.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/String.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/access_log.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/acl.c:1.1.1.3.4.3.2.3->1.1.1.3.4.3.2.3.2.1 
	src/aiops.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/asn.c:1.1.1.3.4.2.2.3->1.1.1.3.4.2.2.3.2.1 
	src/async_io.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/authenticate.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/cache_cf.c:1.1.1.3.4.4.2.3->1.1.1.3.4.4.2.3.2.1 
	src/cache_diff.c:1.1.1.1.4.1.2.2->1.1.1.1.4.1.2.2.2.1 
	src/cache_manager.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/cachemgr.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/carp.c:1.1.1.1.4.4.2.2->1.1.1.1.4.4.2.2.2.1 
	src/cbdata.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/cf.data.pre:1.1.1.3.4.3.2.2->1.1.1.3.4.3.2.2.2.1 
	src/cf_gen.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/client.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/client_db.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/client_side.c:1.1.1.3.4.6.2.4->1.1.1.3.4.6.2.4.2.1 
	src/comm.c:1.1.1.3.4.1.2.5->1.1.1.3.4.1.2.5.2.1 
	src/comm_select.c:1.1.1.3.4.2.2.3->1.1.1.3.4.2.2.3.2.1 
	src/debug.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/defines.h:1.1.1.3.4.2.2.2->1.1.1.3.4.2.2.2.2.1 
	src/delay_pools.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/disk.c:1.1.1.3.4.1.2.6->1.1.1.3.4.1.2.6.2.1 
	src/dns.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/dns_internal.c:1.1.1.1.4.6.2.3->1.1.1.1.4.6.2.3.2.1 
	src/dnsserver.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/enums.h:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/errorpage.c:1.1.1.3.4.3.2.2->1.1.1.3.4.3.2.2.2.1 
	src/event.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/fd.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/filemap.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/forward.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/fqdncache.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/ftp.c:1.1.1.3.4.3.2.1->1.1.1.3.4.3.2.1.2.1 
	src/globals.h:1.1.1.3.4.2.2.4->1.1.1.3.4.2.2.4.2.1 
	src/gopher.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/helper.c:1.1.1.3.24.1->1.1.1.3.24.1.2.1 
	src/htcp.c:1.1.1.2.4.1.2.2->1.1.1.2.4.1.2.2.2.1 
	src/http.c:1.1.1.3.4.3.2.2->1.1.1.3.4.3.2.2.2.1 
	src/icmp.c:1.1.1.2.4.2.2.1->1.1.1.2.4.2.2.1.2.1 
	src/icp_v2.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/icp_v3.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/ident.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/internal.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/ipc.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/ipcache.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/leakfinder.c:1.1.1.1.4.1.2.2->1.1.1.1.4.1.2.2.2.1 
	src/main.c:1.1.1.3.4.2.2.9->1.1.1.3.4.2.2.9.2.1 
	src/mem.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/mib.txt:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/mime.c:1.1.1.3.4.1.2.2->1.1.1.3.4.1.2.2.2.1 
	src/mk-string-arrays.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	src/multicast.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/neighbors.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/net_db.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/pconn.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/peer_digest.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/peer_select.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/pinger.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/protos.h:1.1.1.3.4.1.2.6->1.1.1.3.4.1.2.6.2.1 
	src/pump.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/recv-announce.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/redirect.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/refresh.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/send-announce.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/snmp_agent.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/snmp_core.c:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/squid.h:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/ssl.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/stat.c:1.1.1.3.4.1.2.5->1.1.1.3.4.1.2.5.2.1 
	src/stmem.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/store.c:1.1.1.3.4.5.2.4->1.1.1.3.4.5.2.4.2.1 
	src/store_client.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/store_digest.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/store_dir.c:1.1.1.3.4.2.2.7->1.1.1.3.4.2.2.7.2.1 
	src/store_dir_ufs.c:1.1.1.1.4.1.2.8->1.1.1.1.4.1.2.8.2.1 
	src/store_heap_replacement.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/store_io.c:1.1.1.1.20.1->1.1.1.1.20.1.2.1 
	src/store_io_asyncufs.c:1.1.1.1.4.3->1.1.1.1.4.3.6.1 
	src/store_io_ufs.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/store_key_md5.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/store_log.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/store_rebuild.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/store_swapin.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/store_swapmeta.c:1.1.1.2.4.2.2.1->1.1.1.2.4.2.2.1.2.1 
	src/store_swapout.c:1.1.1.3.4.2.2.1->1.1.1.3.4.2.2.1.2.1 
	src/structs.h:1.1.1.3.4.2.2.3->1.1.1.3.4.2.2.3.2.1 
	src/test-ellipses.pl:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	src/test_cache_digest.c:1.1.1.1.4.1.2.1->1.1.1.1.4.1.2.1.2.1 
	src/tools.c:1.1.1.3.4.1.2.6->1.1.1.3.4.1.2.6.2.1 
	src/typedefs.h:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.3.2.1 
	src/unlinkd.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/url.c:1.1.1.3.4.4.2.3->1.1.1.3.4.4.2.3.2.1 
	src/urn.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.1.2.1 
	src/useragent.c:1.1.1.3.4.1.2.10->1.1.1.3.4.1.2.10.2.1 
	src/wais.c:1.1.1.2.4.1.2.1->1.1.1.2.4.1.2.1.2.1 
	src/wccp.c:1.1.1.1.4.2.2.1->1.1.1.1.4.2.2.1.2.1 
	src/whois.c:1.1.1.2.4.2.2.1->1.1.1.2.4.2.2.1.2.1 
	src/win32.c:1.1.2.3->1.1.2.3.2.1 
	test-suite/hash.c:1.1.1.1.44.1->1.1.1.1.44.1.2.1 
	test-suite/hash.h:1.1.1.1->1.1.1.1.76.1 
	test-suite/membanger.c:1.1.1.1->1.1.1.1.76.1 
	test-suite/pconn-banger.c:1.1.1.1->1.1.1.1.76.1 
	test-suite/tcp-banger2.c:1.1.1.3.30.1->1.1.1.3.30.1.2.1 
	test-suite/tcp-banger3.c:1.1.1.2->1.1.1.2.76.1 
	test-suite/waiter.c:1.1.1.1->1.1.1.1.76.1 
	win/cf.data.mak:1.1.2.1->1.1.2.1.2.1 
	win/resource.h:1.1.2.1->1.1.2.1.2.1 
	win/squid.rc:1.1.2.1->1.1.2.1.2.1 
	win/update.bat:1.1.2.1->1.1.2.1.2.1 
	win/win.dsw:1.1.2.4->1.1.2.4.2.1 
	win/cachemgr/cachemgr.dsp:1.1.2.3->1.1.2.3.2.1 
	win/cachemgr/cachemgr.mak:1.1.2.3->1.1.2.3.2.1 
	win/cachemgr/cachemgr.rc:1.1.2.1->1.1.2.1.2.1 
	win/cf_gen/cf_gen.dsp:1.1.2.2->1.1.2.2.2.1 
	win/cf_gen/cf_gen.mak:1.1.2.2->1.1.2.2.2.1 
	win/dnsserver/dnsserver.dsp:1.1.2.3->1.1.2.3.2.1 
	win/dnsserver/dnsserver.mak:1.1.2.3->1.1.2.3.2.1 
	win/libsnmp/libsnmp.dsp:1.1.2.1->1.1.2.1.2.1 
	win/libsnmp/libsnmp.mak:1.1.2.1->1.1.2.1.2.1 
	win/miscutil/miscutil.dsp:1.1.2.3->1.1.2.3.2.1 
	win/miscutil/miscutil.mak:1.1.2.3->1.1.2.3.2.1 
	win/squidnt/squidnt.dsp:1.1.2.5->1.1.2.5.2.1 
	win/squidnt/squidnt.mak:1.1.2.5->1.1.2.5.2.1 

Index: squid/CONTRIBUTORS
===================================================================
RCS file: /cvsroot/squid-sf//squid/CONTRIBUTORS,v
retrieving revision 1.1.1.3.22.1
retrieving revision 1.1.1.3.22.1.2.1
diff -u -r1.1.1.3.22.1 -r1.1.1.3.22.1.2.1
--- squid/CONTRIBUTORS	28 Jul 2001 10:18:13 -0000	1.1.1.3.22.1
+++ squid/CONTRIBUTORS	27 Aug 2001 21:48:15 -0000	1.1.1.3.22.1.2.1
@@ -70,9 +70,6 @@
 	Niall Doherty <ndoherty@eei.ericsson.se>
 	Pedro Ribeiro <pribeiro@isel.pt>
 	John Dilley <jad@hpl.hp.com>
-	Romeo Anghelache <romeo@andrew.cmu.edu>
-	Guido Serassio <serassio@libero.it>
-	Andrey Shorin <a_shorin@mail.ru>
 
 Development of this caching software is funded by the National Science
 Foundation (grants NCR-9616602 and NCR-9521745).  Paid staff members on
Index: squid/ChangeLog
===================================================================
RCS file: /cvsroot/squid-sf//squid/ChangeLog,v
retrieving revision 1.1.1.3.4.4.2.1
retrieving revision 1.1.1.3.4.4.2.1.2.1
diff -u -r1.1.1.3.4.4.2.1 -r1.1.1.3.4.4.2.1.2.1
--- squid/ChangeLog	15 Jul 2001 08:49:37 -0000	1.1.1.3.4.4.2.1
+++ squid/ChangeLog	27 Aug 2001 21:48:15 -0000	1.1.1.3.4.4.2.1.2.1
@@ -1,4 +1,4 @@
-Changes to Squid-2.3.STABLE5 (Jul 13, 2001):
+Changes to Squid-2.3:
 
 	- Fixed more domain-matching bugs, this time relating
 	  to the '-' character.  Copied the improved aclDomainCompare
@@ -18,8 +18,6 @@
 	  (www....squid-cache....org), which can fool some access
 	  controls.  Changed URL parsing in url.c to collapse these
 	  multiple dots.
-	- clientAccessCheck() was incorrectly allowing all proxy
-	  requests in accel_only mode.
 
 Changes to Squid-2.3.STABLE4 (July 18, 2000):
 
Index: squid/acconfig.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/acconfig.h,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.1.2.1
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.1.2.1
--- squid/acconfig.h	16 Jun 2001 21:00:11 -0000	1.1.1.3.12.1
+++ squid/acconfig.h	27 Aug 2001 21:48:15 -0000	1.1.1.3.12.1.2.1
@@ -20,8 +20,7 @@
  *
  */
 @ TOP @
-/* $Id: acconfig.h,v 1.1.1.3.12.1 2001/06/16 21:00:11 serassio Exp $ */
-
+/* $Id: acconfig.h,v 1.1.1.3.12.1.2.1 2001/08/27 21:48:15 tolsty Exp $ */
 /*********************************
  * START OF CONFIGURABLE OPTIONS *
  *********************************/
@@ -30,27 +29,19 @@
  * field blank, then define this to getfullhostname()
  */
 #undef CACHEMGR_HOSTNAME
-
 /* Define to do simple malloc debugging */
 #undef XMALLOC_DEBUG
-
 /* Define for log file trace of mem alloc/free */
 #undef MEM_GEN_TRACE
-
 /* Define to have malloc statistics */
 #undef XMALLOC_STATISTICS
-
 /* Define to have a detailed trace of memory allocations */
 #undef XMALLOC_TRACE
-
 #undef FORW_VIA_DB
-
 /* Define to use async disk I/O operations */
 #undef USE_ASYNC_IO
-
 /* Defines how many threads to use for async I/O */
 #undef NUMTHREADS
-
 /*
  * If you want to use Squid's ICMP features (highly recommended!) then
  * define this.  When USE_ICMP is defined, Squid will send ICMP pings
@@ -62,34 +53,28 @@
  *           ICP_OP_MISS_NOFETCH for sites which it cannot ping.
  */
 #undef USE_ICMP
-
 /*
  * Traffic management via "delay pools".
  */
 #undef DELAY_POOLS
-
 /*
  * If you want to log User-Agent request header values, define this.
  * By default, they are written to useragent.log in the Squid log
  * directory.
  */
 #undef USE_USERAGENT_LOG
-
 /*
  * A dangerous feature which causes Squid to kill its parent process
  * (presumably the RunCache script) upon receipt of SIGTERM or SIGINT.
  * Use with caution.
  */
 #undef KILL_PARENT_OPT
-
 /* Define to enable SNMP monitoring of Squid */
 #undef SQUID_SNMP
-
 /*
  * Define to enable WCCP
  */
 #define USE_WCCP 1
-
 /*
  * Squid frequently calls gettimeofday() for accurate timestamping.
  * If you are concerned that gettimeofday() is called too often, and
@@ -98,107 +83,80 @@
  * intervals (one second) with ALARM signals.
  */
 #undef ALARM_UPDATES_TIME
-
 /*
  * Define this to include code which lets you specify access control
  * elements based on ethernet hardware addresses.  This code uses
  * functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).
  */
 #undef USE_ARP_ACL
-
 /*
  * Define this to include code for the Hypertext Cache Protocol (HTCP)
  */
 #undef USE_HTCP
-
 /*
  * Use Cache Digests for locating objects in neighbor caches.  This
  * code is still semi-experimental. 
  */
 #undef USE_CACHE_DIGESTS
-
 /*
  * Cache Array Routing Protocol
  */
 #undef USE_CARP
-
 /*
  * Define Windows NT & Windows 2000 run service mode
  */
 #undef USE_WIN32_SERVICE
-
 /********************************
  *  END OF CONFIGURABLE OPTIONS *
  ********************************/
-
 /* Define if struct tm has tm_gmtoff member */
 #undef HAVE_TM_GMTOFF
-
 /* Define if struct mallinfo has mxfast member */
 #undef HAVE_EXT_MALLINFO
-
 /* Default FD_SETSIZE value */
 #undef DEFAULT_FD_SETSIZE
-
 /* Maximum number of open filedescriptors */
 #undef SQUID_MAXFD
-
 /* UDP send buffer size */
 #undef SQUID_UDP_SO_SNDBUF
-
 /* UDP receive buffer size */
 #undef SQUID_UDP_SO_RCVBUF
-
 /* TCP send buffer size */
 #undef SQUID_TCP_SO_SNDBUF
-
 /* TCP receive buffer size */
 #undef SQUID_TCP_SO_RCVBUF
-
 /* Host type from configure */
 #undef CONFIG_HOST_TYPE
-
 /* If we need to declare sys_errlist[] as external */
 #undef NEED_SYS_ERRLIST
-
 /* If gettimeofday is known to take only one argument */
 #undef GETTIMEOFDAY_NO_TZP
-
 /* If libresolv.a has been hacked to export _dns_ttl_ */
 #undef LIBRESOLV_DNS_TTL_HACK
-
 /* Define if struct ip has ip_hl member */
 #undef HAVE_IP_HL
-
 /* Define if your compiler supports prototyping */
 #undef HAVE_ANSI_PROTOTYPES
-
 /* Define if we should use GNU regex */
 #undef USE_GNUREGEX
-
 /* signed size_t, grr */
 #undef ssize_t
-
 /*
  * Yay! Another Linux brokenness.  Its not good enough to know that
  * setresuid() exists, because RedHat 5.0 declare setresuid() but
  * doesn't implement it.
  */
 #undef HAVE_SETRESUID
-
 /* Define if you have struct rusage */
 #undef HAVE_STRUCT_RUSAGE
-
 /* Define if you have PSAPI.DLL on Windows systems */
 #undef HAVE_WIN32_PSAPI
-
 /*
  * This makes warnings go away.  If you have socklen_t defined in your
  * /usr/include files, then this should remain undef'd.  Otherwise it
  * should be defined to int.
  */
 #undef socklen_t
-
 /*
  * By default (for now anyway) Squid includes options which allows
  * the cache administrator to violate the HTTP protocol specification
@@ -206,65 +164,53 @@
  * such code.
  */
 #define HTTP_VIOLATIONS 1
-
 /*
  * Enable support for Transparent Proxy on systems using IP-Filter
  * address redirection. This provides "masquerading" support for non
  *  Linux system.
  */
 #undef IPF_TRANSPARENT
-
 /*
  * Enable code for assiting in finding memory leaks.  Hacker stuff only.
  */
 #undef USE_LEAKFINDER
-
 /*
  * type of fd_set array
  */
 #undef fd_mask
-
 /*
  * If _res structure has nsaddr_list member
  */
 #undef HAVE_RES_NSADDR_LIST
-
 /*
  * If _res structure has ns_list member
  */
 #undef HAVE_RES_NS_LIST
-
 /*
  * Compile in support for Ident (RFC 931) lookups?  Enabled by default.
  */
 #define USE_IDENT 1
-
 /*
  * If your system has statvfs(), and if it actually works!
  */
 #undef HAVE_STATVFS
-
 /*
  * If --disable-internal-dns was given to configure, then we'll use
  * the dnsserver processes instead.
  */
 #undef USE_DNSSERVERS
-
 /*
  * we check for the existance of struct mallinfo
  */
 #undef HAVE_STRUCT_MALLINFO
-
 /*
  * Do we want to use truncate(2) or unlink(2)?
  */
 #undef USE_TRUNCATE
-
 /*
  * Allow underscores in host names
  */
 #undef ALLOW_HOSTNAME_UNDERSCORES
-
 /*
  * Use the heap-based replacement techniques
  */
Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.1.1.3.4.5.2.2
retrieving revision 1.1.1.3.4.5.2.2.2.1
diff -u -r1.1.1.3.4.5.2.2 -r1.1.1.3.4.5.2.2.2.1
--- squid/configure.in	16 Jun 2001 20:58:29 -0000	1.1.1.3.4.5.2.2
+++ squid/configure.in	27 Aug 2001 21:48:15 -0000	1.1.1.3.4.5.2.2.2.1
@@ -3,13 +3,13 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.1.1.3.4.5.2.2 2001/06/16 20:58:29 serassio Exp $
+dnl  $Id: configure.in,v 1.1.1.3.4.5.2.2.2.1 2001/08/27 21:48:15 tolsty Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.1.1.3.4.5.2.2 $)dnl
+AC_REVISION($Revision: 1.1.1.3.4.5.2.2.2.1 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(cfgaux)
 
Index: squid/makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/makefile.in,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.18.1
diff -u -r1.1.1.3 -r1.1.1.3.18.1
--- squid/makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/makefile.in	27 Aug 2001 21:48:15 -0000	1.1.1.3.18.1
@@ -1,4 +1,4 @@
-# $Id: makefile.in,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+# $Id: makefile.in,v 1.1.1.3.18.1 2001/08/27 21:48:15 tolsty Exp $
 #
 
 srcdir		= @srcdir@
Index: squid/auth_modules/LDAP/LDAP_auth.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/LDAP/Attic/LDAP_auth.dsp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/LDAP/LDAP_auth.dsp	30 Jun 2001 18:49:42 -0000	1.1.2.2
+++ squid/auth_modules/LDAP/LDAP_auth.dsp	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -40,20 +40,18 @@
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "Release"
 # PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "NDEBUG"
-# ADD RSC /l 0x410 /d "NDEBUG"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /YX /FD /c
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib wldap32.lib /nologo /dll /machine:I386
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib wldap32.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "LDAP_auth - Win32 Debug"
 
@@ -66,20 +64,18 @@
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "Debug"
 # PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "_DEBUG"
-# ADD RSC /l 0x410 /d "_DEBUG"
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib wldap32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib wldap32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
Index: squid/auth_modules/LDAP/LDAP_auth.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/LDAP/Attic/LDAP_auth.mak,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/LDAP/LDAP_auth.mak	30 Jun 2001 18:49:42 -0000	1.1.2.2
+++ squid/auth_modules/LDAP/LDAP_auth.mak	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -39,11 +39,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\LDAP_auth.dll"
+ALL : "$(OUTDIR)\LDAP_auth.exe"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Release" "$(OUTDIR)\LDAP_auth.dll"
+ALL : "miscutil - Win32 Release" "$(OUTDIR)\LDAP_auth.exe"
 
 !ENDIF 
 
@@ -55,27 +55,25 @@
 	-@erase "$(INTDIR)\LDAP_auth.res"
 	-@erase "$(INTDIR)\squid_ldap_auth.obj"
 	-@erase "$(INTDIR)\vc60.idb"
-	-@erase "$(OUTDIR)\LDAP_auth.dll"
-	-@erase "$(OUTDIR)\LDAP_auth.exp"
+	-@erase "$(OUTDIR)\LDAP_auth.exe"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /Fp"$(INTDIR)\LDAP_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\LDAP_auth.res" /d "NDEBUG" 
+CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\LDAP_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\LDAP_auth.res" /d "NDEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\LDAP_auth.bsc" 
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib wldap32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\LDAP_auth.pdb" /machine:I386 /out:"$(OUTDIR)\LDAP_auth.dll" /implib:"$(OUTDIR)\LDAP_auth.lib" 
+LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\LDAP_auth.pdb" /machine:I386 /out:"$(OUTDIR)\LDAP_auth.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\squid_ldap_auth.obj" \
 	"$(INTDIR)\LDAP_auth.res" \
 	"..\..\win\miscutil\Release\miscutil.lib"
 
-"$(OUTDIR)\LDAP_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\LDAP_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -90,11 +88,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\LDAP_auth.dll"
+ALL : "$(OUTDIR)\LDAP_auth.exe" "$(OUTDIR)\LDAP_auth.bsc"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Debug" "$(OUTDIR)\LDAP_auth.dll"
+ALL : "miscutil - Win32 Debug" "$(OUTDIR)\LDAP_auth.exe" "$(OUTDIR)\LDAP_auth.bsc"
 
 !ENDIF 
 
@@ -105,31 +103,37 @@
 !ENDIF 
 	-@erase "$(INTDIR)\LDAP_auth.res"
 	-@erase "$(INTDIR)\squid_ldap_auth.obj"
+	-@erase "$(INTDIR)\squid_ldap_auth.sbr"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
-	-@erase "$(OUTDIR)\LDAP_auth.dll"
-	-@erase "$(OUTDIR)\LDAP_auth.exp"
+	-@erase "$(OUTDIR)\LDAP_auth.bsc"
+	-@erase "$(OUTDIR)\LDAP_auth.exe"
 	-@erase "$(OUTDIR)\LDAP_auth.ilk"
 	-@erase "$(OUTDIR)\LDAP_auth.pdb"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LDAP_AUTH_EXPORTS" /Fp"$(INTDIR)\LDAP_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\LDAP_auth.res" /d "_DEBUG" 
+CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\LDAP_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\LDAP_auth.res" /d "_DEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\LDAP_auth.bsc" 
 BSC32_SBRS= \
-	
+	"$(INTDIR)\squid_ldap_auth.sbr"
+
+"$(OUTDIR)\LDAP_auth.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib wldap32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\LDAP_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\LDAP_auth.dll" /implib:"$(OUTDIR)\LDAP_auth.lib" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\LDAP_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\LDAP_auth.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\squid_ldap_auth.obj" \
 	"$(INTDIR)\LDAP_auth.res" \
 	"..\..\win\miscutil\Debug\miscutil.lib"
 
-"$(OUTDIR)\LDAP_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\LDAP_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -166,6 +170,7 @@
    $(CPP_PROJ) $< 
 <<
 
+MTL_PROJ=
 
 !IF "$(NO_EXTERNAL_DEPS)" != "1"
 !IF EXISTS("LDAP_auth.dep")
@@ -179,9 +184,20 @@
 !IF "$(CFG)" == "LDAP_auth - Win32 Release" || "$(CFG)" == "LDAP_auth - Win32 Debug"
 SOURCE=.\squid_ldap_auth.c
 
+!IF  "$(CFG)" == "LDAP_auth - Win32 Release"
+
+
 "$(INTDIR)\squid_ldap_auth.obj" : $(SOURCE) "$(INTDIR)"
 
 
+!ELSEIF  "$(CFG)" == "LDAP_auth - Win32 Debug"
+
+
+"$(INTDIR)\squid_ldap_auth.obj"	"$(INTDIR)\squid_ldap_auth.sbr" : $(SOURCE) "$(INTDIR)"
+
+
+!ENDIF 
+
 SOURCE=.\LDAP_auth.rc
 
 "$(INTDIR)\LDAP_auth.res" : $(SOURCE) "$(INTDIR)"
@@ -191,25 +207,25 @@
 !IF  "$(CFG)" == "LDAP_auth - Win32 Release"
 
 "miscutil - Win32 Release" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" 
    cd "..\..\auth_modules\LDAP"
 
 "miscutil - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\LDAP"
 
 !ELSEIF  "$(CFG)" == "LDAP_auth - Win32 Debug"
 
 "miscutil - Win32 Debug" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" 
    cd "..\..\auth_modules\LDAP"
 
 "miscutil - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\LDAP"
 
 !ENDIF 
Index: squid/auth_modules/LDAP/LDAP_auth.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/LDAP/Attic/LDAP_auth.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/auth_modules/LDAP/LDAP_auth.rc	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/auth_modules/LDAP/LDAP_auth.rc	27 Aug 2001 21:48:15 -0000	1.1.2.1.2.1
@@ -13,11 +13,11 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// Italian (Italy) resources
+// English (U.S.) resources
 
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
 #ifdef _WIN32
-LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
 #endif //_WIN32
 
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - LDAP Authenticator DLL plug-in\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "LDAP_auth\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
-            VALUE "OriginalFilename", "LDAP_auth.dll\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "OriginalFilename", "LDAP_auth.exe\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
@@ -66,6 +66,18 @@
 
 #endif    // !_MAC
 
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Italian (Italy) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
+#ifdef _WIN32
+LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
+#pragma code_page(1252)
+#endif //_WIN32
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
Index: squid/auth_modules/LDAP/squid_ldap_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/LDAP/Attic/squid_ldap_auth.c,v
retrieving revision 1.1.1.1.56.1
retrieving revision 1.1.1.1.56.1.2.1
diff -u -r1.1.1.1.56.1 -r1.1.1.1.56.1.2.1
--- squid/auth_modules/LDAP/squid_ldap_auth.c	6 Jan 2001 12:40:08 -0000	1.1.1.1.56.1
+++ squid/auth_modules/LDAP/squid_ldap_auth.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.56.1.2.1
@@ -1,7 +1,5 @@
 /*
-
   squid_ldap_auth: authentication via ldap for squid proxy server
-     
   Author: Glen Newton 
 	  glen.newton@nrc.ca
           Advanced Services 
@@ -23,6 +21,7 @@
 #undef sprintf
 #include <stdio.h>
 #ifdef _SQUID_MSWIN_
+#define OPTIONAL
 #include <winldap.h>
 #else
 #include <lber.h>
@@ -30,153 +29,77 @@
 #include <ldap.h>
 #endif
 
-typedef struct {
+typedef struct
+{
     void *data;
     acl_proxy_auth_user *auth_user;
     RH *handler;
-} authenticateStateData;
+}
+authenticateStateData;
 
 
 /* Change this to your search base */
 #define SEARCHBASE "ou=people,o=nrc.ca"
 
-int checkLDAP(LDAP *ld, char *userid, char *password);
-
-#ifdef _SQUID_MSWIN_
-
-static char *ldapServer=NULL;
-
-
-BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, 
-                       LPVOID reserved /* Not used. */ );
+int checkLDAP(LDAP * ld, char *userid, char *password);
 
-__declspec (dllexport) int 
-Authenticate(char *username, char *password, authenticateStateData *data, HLPCB callback)
+int
+main(int argc, char **argv)
 {
-	LDAP *ld;
-
-#else
-int main(int argc, char **argv)
-{
-	char buf[256]; 
-	char *username, *password, *p;
-	char *ldapServer;
-	LDAP *ld;
-
-	setbuf(stdout, NULL);
-
-	if (argc != 2) 
-    {
-		fprintf(stderr, "Usage: squid_ldap_auth ldap_server_name\n");
-		exit(1);
+    char buf[256];
+    char *username, *password, *p;
+    char *ldapServer;
+    LDAP *ld;
+
+    setbuf(stdout, NULL);
+
+    if (argc != 2) {
+	fprintf(stderr, "Usage: squid_ldap_auth ldap_server_name\n");
+	exit(1);
     }
 
-	ldapServer = (char*)argv[1];
-  
-	while (fgets(buf, 256, stdin) != NULL) 
-    {
-		/* You can put this ldap connect outside the loop, but i didn't want to 
-		have the connection open too much. If you have a site which will 
-		be doing >1 authentication per second, you should move this (and the 
-		below ldap_unbind()) outside the loop. 
-		*/
-#endif
-		if( (ld = ldap_init(ldapServer, LDAP_PORT)) == NULL)
-		{
-#ifndef _SQUID_MSWIN_
-			fprintf(stderr, "\nUnable to connect to LDAP server:%s port:%d\n",
-			ldapServer, LDAP_PORT);
-			exit(1);
-#else
-			(callback)(data,"ERR");
-   			return 0;
-#endif
-		}
-#ifndef _SQUID_MSWIN_
-		if ((p = strchr(buf, '\n')) != NULL)
-			*p = '\0';		/* strip \n */
-
-		if ((username = strtok(buf, " ")) == NULL) 
-		{
-			printf("ERR\n");
-			continue;
-		}
-		if ((password = strtok(NULL, "")) == NULL) 
-		{
-			printf("ERR\n");
-			continue;
-		}
-#endif
-		if(checkLDAP(ld, username, password) != 0)
-		{
-#ifndef _SQUID_MSWIN_
-			printf("ERR\n");
-			continue;
-#else
-			ldap_unbind(ld);
-			(callback)(data,"ERR");
-   			return 0;
-#endif
-		}
-		else
-		{
-#ifndef _SQUID_MSWIN_
-			printf("OK\n");
-		}      
-		ldap_unbind(ld);
-	}
-#else
-			ldap_unbind(ld);
-			(callback)(data,"OK");
-   			return 0;
-		}
-#endif
-}
-
-int checkLDAP(LDAP *ld, char *userid, char *password)
-{
-	char buffer[256];
-
-	sprintf (buffer, "uid=%s, %s", userid, SEARCHBASE);
-  
-	if(ldap_simple_bind_s(ld, buffer, password) != LDAP_SUCCESS)
-    	return 1;
-	return 0;
-}
+    ldapServer = (char *) argv[1];
 
-#ifdef _SQUID_MSWIN_
+    while (fgets(buf, 256, stdin) != NULL) {
+	/* You can put this ldap connect outside the loop, but i didn't want to 
+	 * have the connection open too much. If you have a site which will 
+	 * be doing >1 authentication per second, you should move this (and the 
+	 * below ldap_unbind()) outside the loop. 
+	 */
+	if ((ld = ldap_init(ldapServer, LDAP_PORT)) == NULL) {
+	    fprintf(stderr, "\nUnable to connect to LDAP server:%s port:%d\n",
+		ldapServer, LDAP_PORT);
+	    exit(1);
+	}
+	if ((p = strchr(buf, '\n')) != NULL)
+	    *p = '\0';		/* strip \n */
 
-__declspec (dllexport) int Init(char *Server)
-{
-	if (ldapServer)
-		xfree(ldapServer);
-	ldapServer = xstrdup(Server);
-	return 0;
+	if ((username = strtok(buf, " ")) == NULL) {
+	    printf("ERR\n");
+	    continue;
+	}
+	if ((password = strtok(NULL, "")) == NULL) {
+	    printf("ERR\n");
+	    continue;
+	}
+	if (checkLDAP(ld, username, password) != 0) {
+	    printf("ERR\n");
+	    continue;
+	} else {
+	    printf("OK\n");
+	}
+	ldap_unbind(ld);
+    }
 }
 
-
-BOOL APIENTRY
-DllMain (
-	 HINSTANCE hInst /* Library instance handle. */ ,
-	 DWORD reason /* Reason this function is being called. */ ,
-	 LPVOID reserved /* Not used. */ )
+int
+checkLDAP(LDAP * ld, char *userid, char *password)
 {
+    char buffer[256];
 
-	switch (reason)
-    {
-    	case DLL_PROCESS_ATTACH:
-    	  	break;
-
-		case DLL_PROCESS_DETACH:
-			break;
+    sprintf(buffer, "uid=%s, %s", userid, SEARCHBASE);
 
-    	case DLL_THREAD_ATTACH:
-      		break;
-
-		case DLL_THREAD_DETACH:
-      		break;
-    }
-  	return TRUE;
+    if (ldap_simple_bind_s(ld, buffer, password) != LDAP_SUCCESS)
+	return 1;
+    return 0;
 }
-
-#endif
Index: squid/auth_modules/MSNT/denyusers.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/denyusers.c,v
retrieving revision 1.1.16.1
retrieving revision 1.1.16.1.6.1
diff -u -r1.1.16.1 -r1.1.16.1.6.1
--- squid/auth_modules/MSNT/denyusers.c	15 Jul 2000 20:50:07 -0000	1.1.16.1
+++ squid/auth_modules/MSNT/denyusers.c	27 Aug 2001 21:48:15 -0000	1.1.16.1.6.1
@@ -1,4 +1,3 @@
-
 /*
  * denyusers.c
  * (C) 2000 Antonino Iannella, Stellar-X Pty Ltd
@@ -39,7 +38,7 @@
  * Logs any messages to the syslog daemon.
  */
 
-int 
+int
 Read_denyusers()
 {
     FILE *DFile;		/* DENYUSER file pointer */
@@ -77,13 +76,15 @@
     free(DeniedUsers);
 
     if ((DeniedUsers = malloc(sizeof(char) * (DenyUserSize + 1))) == NULL) {
-	syslog(LOG_USER | LOG_ERR, "Read_denyusers: malloc(DeniedUsers) failed.");
+	syslog(LOG_USER | LOG_ERR,
+	    "Read_denyusers: malloc(DeniedUsers) failed.");
 	return 1;
     }
     /* Open the DENYUSERS file. Report any errors. */
 
     if ((DFile = fopen(DENYUSERS, "r")) == NULL) {
-	syslog(LOG_USER | LOG_ERR, "Read_denyusers: Failed to open denied user file.");
+	syslog(LOG_USER | LOG_ERR,
+	    "Read_denyusers: Failed to open denied user file.");
 	syslog(LOG_USER | LOG_ERR, strerror(errno));
 	return 1;
     }
@@ -111,7 +112,7 @@
  * Returns 0 if the user was not found, and 1 if they were.
  */
 
-int 
+int
 Check_user(char *ConnectingUser)
 {
     static char CUBuf[NAMELEN + 1];
@@ -150,7 +151,7 @@
  * signal.
  */
 
-void 
+void
 Checkforchange()
 {
     struct stat ChkBuf;		/* Stat data buffer */
@@ -176,7 +177,8 @@
      * Log a message of its actions. */
 
     if (ChkBuf.st_mtime != LastModTime) {
-	syslog(LOG_USER | LOG_INFO, "Checkforchange: Reloading denied user list.");
+	syslog(LOG_USER | LOG_INFO,
+	    "Checkforchange: Reloading denied user list.");
 	Read_denyusers();
     }
 }
Index: squid/auth_modules/MSNT/md4.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/md4.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.62.1
diff -u -r1.1.1.1 -r1.1.1.1.62.1
--- squid/auth_modules/MSNT/md4.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/md4.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.62.1
@@ -29,25 +29,29 @@
 
 static uint32 A, B, C, D;
 
-static uint32 F(uint32 X, uint32 Y, uint32 Z)
+static uint32
+F(uint32 X, uint32 Y, uint32 Z)
 {
-	return (X&Y) | ((~X)&Z);
+    return (X & Y) | ((~X) & Z);
 }
 
-static uint32 G(uint32 X, uint32 Y, uint32 Z)
+static uint32
+G(uint32 X, uint32 Y, uint32 Z)
 {
-	return (X&Y) | (X&Z) | (Y&Z); 
+    return (X & Y) | (X & Z) | (Y & Z);
 }
 
-static uint32 H(uint32 X, uint32 Y, uint32 Z)
+static uint32
+H(uint32 X, uint32 Y, uint32 Z)
 {
-	return X^Y^Z;
+    return X ^ Y ^ Z;
 }
 
-static uint32 lshift(uint32 x, int s)
+static uint32
+lshift(uint32 x, int s)
 {
-	x &= 0xFFFFFFFF;
-	return ((x<<s)&0xFFFFFFFF) | (x>>(32-s));
+    x &= 0xFFFFFFFF;
+    return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s));
 }
 
 #define ROUND1(a,b,c,d,k,s) a = lshift(a + F(b,c,d) + X[k], s)
@@ -55,117 +59,151 @@
 #define ROUND3(a,b,c,d,k,s) a = lshift(a + H(b,c,d) + X[k] + (uint32)0x6ED9EBA1,s)
 
 /* this applies md4 to 64 byte chunks */
-static void mdfour64(uint32 *M)
+static void
+mdfour64(uint32 * M)
 {
-	int j;
-	uint32 AA, BB, CC, DD;
-	uint32 X[16];
-
-	for (j=0;j<16;j++)
-		X[j] = M[j];
-
-	AA = A; BB = B; CC = C; DD = D;
-
-        ROUND1(A,B,C,D,  0,  3);  ROUND1(D,A,B,C,  1,  7);  
-	ROUND1(C,D,A,B,  2, 11);  ROUND1(B,C,D,A,  3, 19);
-        ROUND1(A,B,C,D,  4,  3);  ROUND1(D,A,B,C,  5,  7);  
-	ROUND1(C,D,A,B,  6, 11);  ROUND1(B,C,D,A,  7, 19);
-        ROUND1(A,B,C,D,  8,  3);  ROUND1(D,A,B,C,  9,  7);  
-	ROUND1(C,D,A,B, 10, 11);  ROUND1(B,C,D,A, 11, 19);
-        ROUND1(A,B,C,D, 12,  3);  ROUND1(D,A,B,C, 13,  7);  
-	ROUND1(C,D,A,B, 14, 11);  ROUND1(B,C,D,A, 15, 19);	
-
-        ROUND2(A,B,C,D,  0,  3);  ROUND2(D,A,B,C,  4,  5);  
-	ROUND2(C,D,A,B,  8,  9);  ROUND2(B,C,D,A, 12, 13);
-        ROUND2(A,B,C,D,  1,  3);  ROUND2(D,A,B,C,  5,  5);  
-	ROUND2(C,D,A,B,  9,  9);  ROUND2(B,C,D,A, 13, 13);
-        ROUND2(A,B,C,D,  2,  3);  ROUND2(D,A,B,C,  6,  5);  
-	ROUND2(C,D,A,B, 10,  9);  ROUND2(B,C,D,A, 14, 13);
-        ROUND2(A,B,C,D,  3,  3);  ROUND2(D,A,B,C,  7,  5);  
-	ROUND2(C,D,A,B, 11,  9);  ROUND2(B,C,D,A, 15, 13);
-
-	ROUND3(A,B,C,D,  0,  3);  ROUND3(D,A,B,C,  8,  9);  
-	ROUND3(C,D,A,B,  4, 11);  ROUND3(B,C,D,A, 12, 15);
-        ROUND3(A,B,C,D,  2,  3);  ROUND3(D,A,B,C, 10,  9);  
-	ROUND3(C,D,A,B,  6, 11);  ROUND3(B,C,D,A, 14, 15);
-        ROUND3(A,B,C,D,  1,  3);  ROUND3(D,A,B,C,  9,  9);  
-	ROUND3(C,D,A,B,  5, 11);  ROUND3(B,C,D,A, 13, 15);
-        ROUND3(A,B,C,D,  3,  3);  ROUND3(D,A,B,C, 11,  9);  
-	ROUND3(C,D,A,B,  7, 11);  ROUND3(B,C,D,A, 15, 15);
-
-	A += AA; B += BB; C += CC; D += DD;
-	
-	A &= 0xFFFFFFFF; B &= 0xFFFFFFFF;
-	C &= 0xFFFFFFFF; D &= 0xFFFFFFFF;
-
-	for (j=0;j<16;j++)
-		X[j] = 0;
-}
-
-static void copy64(uint32 *M, unsigned char *in)
-{
-	int i;
-
-	for (i=0;i<16;i++)
-		M[i] = (in[i*4+3]<<24) | (in[i*4+2]<<16) |
-			(in[i*4+1]<<8) | (in[i*4+0]<<0);
-}
-
-static void copy4(unsigned char *out,uint32 x)
-{
-	out[0] = x&0xFF;
-	out[1] = (x>>8)&0xFF;
-	out[2] = (x>>16)&0xFF;
-	out[3] = (x>>24)&0xFF;
+    int j;
+    uint32 AA, BB, CC, DD;
+    uint32 X[16];
+
+    for (j = 0; j < 16; j++)
+	X[j] = M[j];
+
+    AA = A;
+    BB = B;
+    CC = C;
+    DD = D;
+
+    ROUND1(A, B, C, D, 0, 3);
+    ROUND1(D, A, B, C, 1, 7);
+    ROUND1(C, D, A, B, 2, 11);
+    ROUND1(B, C, D, A, 3, 19);
+    ROUND1(A, B, C, D, 4, 3);
+    ROUND1(D, A, B, C, 5, 7);
+    ROUND1(C, D, A, B, 6, 11);
+    ROUND1(B, C, D, A, 7, 19);
+    ROUND1(A, B, C, D, 8, 3);
+    ROUND1(D, A, B, C, 9, 7);
+    ROUND1(C, D, A, B, 10, 11);
+    ROUND1(B, C, D, A, 11, 19);
+    ROUND1(A, B, C, D, 12, 3);
+    ROUND1(D, A, B, C, 13, 7);
+    ROUND1(C, D, A, B, 14, 11);
+    ROUND1(B, C, D, A, 15, 19);
+
+    ROUND2(A, B, C, D, 0, 3);
+    ROUND2(D, A, B, C, 4, 5);
+    ROUND2(C, D, A, B, 8, 9);
+    ROUND2(B, C, D, A, 12, 13);
+    ROUND2(A, B, C, D, 1, 3);
+    ROUND2(D, A, B, C, 5, 5);
+    ROUND2(C, D, A, B, 9, 9);
+    ROUND2(B, C, D, A, 13, 13);
+    ROUND2(A, B, C, D, 2, 3);
+    ROUND2(D, A, B, C, 6, 5);
+    ROUND2(C, D, A, B, 10, 9);
+    ROUND2(B, C, D, A, 14, 13);
+    ROUND2(A, B, C, D, 3, 3);
+    ROUND2(D, A, B, C, 7, 5);
+    ROUND2(C, D, A, B, 11, 9);
+    ROUND2(B, C, D, A, 15, 13);
+
+    ROUND3(A, B, C, D, 0, 3);
+    ROUND3(D, A, B, C, 8, 9);
+    ROUND3(C, D, A, B, 4, 11);
+    ROUND3(B, C, D, A, 12, 15);
+    ROUND3(A, B, C, D, 2, 3);
+    ROUND3(D, A, B, C, 10, 9);
+    ROUND3(C, D, A, B, 6, 11);
+    ROUND3(B, C, D, A, 14, 15);
+    ROUND3(A, B, C, D, 1, 3);
+    ROUND3(D, A, B, C, 9, 9);
+    ROUND3(C, D, A, B, 5, 11);
+    ROUND3(B, C, D, A, 13, 15);
+    ROUND3(A, B, C, D, 3, 3);
+    ROUND3(D, A, B, C, 11, 9);
+    ROUND3(C, D, A, B, 7, 11);
+    ROUND3(B, C, D, A, 15, 15);
+
+    A += AA;
+    B += BB;
+    C += CC;
+    D += DD;
+
+    A &= 0xFFFFFFFF;
+    B &= 0xFFFFFFFF;
+    C &= 0xFFFFFFFF;
+    D &= 0xFFFFFFFF;
+
+    for (j = 0; j < 16; j++)
+	X[j] = 0;
+}
+
+static void
+copy64(uint32 * M, unsigned char *in)
+{
+    int i;
+
+    for (i = 0; i < 16; i++)
+	M[i] = (in[i * 4 + 3] << 24) | (in[i * 4 + 2] << 16) |
+	    (in[i * 4 + 1] << 8) | (in[i * 4 + 0] << 0);
+}
+
+static void
+copy4(unsigned char *out, uint32 x)
+{
+    out[0] = x & 0xFF;
+    out[1] = (x >> 8) & 0xFF;
+    out[2] = (x >> 16) & 0xFF;
+    out[3] = (x >> 24) & 0xFF;
 }
 
 /* produce a md4 message digest from data of length n bytes */
-void mdfour(unsigned char *out, unsigned char *in, int n)
+void
+mdfour(unsigned char *out, unsigned char *in, int n)
 {
-	unsigned char buf[128];
-	uint32 M[16];
-	uint32 b = n * 8;
-	int i;
-
-	A = 0x67452301;
-	B = 0xefcdab89;
-	C = 0x98badcfe;
-	D = 0x10325476;
-
-	while (n > 64) {
-		copy64(M, in);
-		mdfour64(M);
-		in += 64;
-		n -= 64;
-	}
-
-	for (i=0;i<128;i++)
-		buf[i] = 0;
-	memcpy(buf, in, n);
-	buf[n] = 0x80;
-	
-	if (n <= 55) {
-		copy4(buf+56, b);
-		copy64(M, buf);
-		mdfour64(M);
-	} else {
-		copy4(buf+120, b); 
-		copy64(M, buf);
-		mdfour64(M);
-		copy64(M, buf+64);
-		mdfour64(M);
-	}
+    unsigned char buf[128];
+    uint32 M[16];
+    uint32 b = n * 8;
+    int i;
+
+    A = 0x67452301;
+    B = 0xefcdab89;
+    C = 0x98badcfe;
+    D = 0x10325476;
+
+    while (n > 64) {
+	copy64(M, in);
+	mdfour64(M);
+	in += 64;
+	n -= 64;
+    }
+
+    for (i = 0; i < 128; i++)
+	buf[i] = 0;
+    memcpy(buf, in, n);
+    buf[n] = 0x80;
 
-	for (i=0;i<128;i++)
-		buf[i] = 0;
+    if (n <= 55) {
+	copy4(buf + 56, b);
 	copy64(M, buf);
+	mdfour64(M);
+    } else {
+	copy4(buf + 120, b);
+	copy64(M, buf);
+	mdfour64(M);
+	copy64(M, buf + 64);
+	mdfour64(M);
+    }
+
+    for (i = 0; i < 128; i++)
+	buf[i] = 0;
+    copy64(M, buf);
+
+    copy4(out, A);
+    copy4(out + 4, B);
+    copy4(out + 8, C);
+    copy4(out + 12, D);
 
-	copy4(out, A);
-	copy4(out+4, B);
-	copy4(out+8, C);
-	copy4(out+12, D);
-
-	A = B = C = D = 0;
+    A = B = C = D = 0;
 }
-
-
Index: squid/auth_modules/MSNT/rfcnb-common.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-common.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-common.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-common.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Common Structures etc Defines
 
@@ -25,12 +24,12 @@
 
 /* A data structure we need */
 
-typedef struct RFCNB_Pkt {
-
-  char * data;			/* The data in this portion */
-  int len;
-  struct RFCNB_Pkt *next;
-
-} RFCNB_Pkt;
+typedef struct RFCNB_Pkt
+{
 
+    char *data;			/* The data in this portion */
+    int len;
+    struct RFCNB_Pkt *next;
 
+}
+RFCNB_Pkt;
Index: squid/auth_modules/MSNT/rfcnb-error.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-error.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-error.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-error.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Error Response Defines
 
@@ -25,51 +24,47 @@
 
 /* Error responses */
 
-#define RFCNBE_Bad -1          /* Bad response */
+#define RFCNBE_Bad -1		/* Bad response */
 #define RFCNBE_OK 0
 
 /* these should follow the spec ... is there one ?*/
 
-#define RFCNBE_NoSpace 1       /* Could not allocate space for a struct */
-#define RFCNBE_BadName 2       /* Could not translate a name            */
-#define RFCNBE_BadRead 3       /* Read sys call failed                  */
-#define RFCNBE_BadWrite 4      /* Write Sys call failed                 */
-#define RFCNBE_ProtErr 5       /* Protocol Error                        */
-#define RFCNBE_ConGone 6       /* Connection dropped                    */
-#define RFCNBE_BadHandle 7     /* Handle passed was bad                 */
-#define RFCNBE_BadSocket 8     /* Problems creating socket              */
-#define RFCNBE_ConnectFailed 9 /* Connect failed                        */
-#define RFCNBE_CallRejNLOCN 10 /* Call rejected, not listening on CN    */
-#define RFCNBE_CallRejNLFCN 11 /* Call rejected, not listening for CN   */
-#define RFCNBE_CallRejCNNP  12 /* Call rejected, called name not present */
-#define RFCNBE_CallRejInfRes 13/* Call rejetced, name ok, no resources   */
-#define RFCNBE_CallRejUnSpec 14/* Call rejected, unspecified error      */
-#define RFCNBE_BadParam      15/* Bad parameters passed ...             */
-#define RFCNBE_Timeout       16/* IO Timed out                          */
+#define RFCNBE_NoSpace 1	/* Could not allocate space for a struct */
+#define RFCNBE_BadName 2	/* Could not translate a name            */
+#define RFCNBE_BadRead 3	/* Read sys call failed                  */
+#define RFCNBE_BadWrite 4	/* Write Sys call failed                 */
+#define RFCNBE_ProtErr 5	/* Protocol Error                        */
+#define RFCNBE_ConGone 6	/* Connection dropped                    */
+#define RFCNBE_BadHandle 7	/* Handle passed was bad                 */
+#define RFCNBE_BadSocket 8	/* Problems creating socket              */
+#define RFCNBE_ConnectFailed 9	/* Connect failed                        */
+#define RFCNBE_CallRejNLOCN 10	/* Call rejected, not listening on CN    */
+#define RFCNBE_CallRejNLFCN 11	/* Call rejected, not listening for CN   */
+#define RFCNBE_CallRejCNNP  12	/* Call rejected, called name not present */
+#define RFCNBE_CallRejInfRes 13	/* Call rejetced, name ok, no resources   */
+#define RFCNBE_CallRejUnSpec 14	/* Call rejected, unspecified error      */
+#define RFCNBE_BadParam      15	/* Bad parameters passed ...             */
+#define RFCNBE_Timeout       16	/* IO Timed out                          */
 
 /* Text strings for the error responses                                 */
 
 static char *RFCNB_Error_Strings[] = {
 
-  "RFCNBE_OK: Routine completed successfully.",
-  "RFCNBE_NoSpace: No space available for a malloc call.",
-  "RFCNBE_BadName: NetBIOS name could not be translated to IP address.",
-  "RFCNBE_BadRead: Read system call returned an error. Check errno.",
-  "RFCNBE_BadWrite: Write system call returned an error. Check errno.",
-  "RFCNBE_ProtErr: A protocol error has occurred.",
-  "RFCNBE_ConGone: Connection dropped during a read or write system call.",
-  "RFCNBE_BadHandle: Bad connection handle passed.",
-  "RFCNBE_BadSocket: Problems creating socket.",
-  "RFCNBE_ConnectFailed: Connection failed. See errno.",
-  "RFCNBE_CallRejNLOCN: Call rejected. Not listening on called name.",
-  "RFCNBE_CallRejNLFCN: Call rejected. Not listening for called name.",
-  "RFCNBE_CallRejCNNP: Call rejected. Called name not present.",
-  "RFCNBE_CallRejInfRes: Call rejected. Name present, but insufficient resources.",
-  "RFCNBE_CallRejUnSpec: Call rejected. Unspecified error.",
-  "RFCNBE_BadParam: Bad parameters passed to a routine.",
-  "RFCNBE_Timeout: IO Operation timed out ..."
-
+    "RFCNBE_OK: Routine completed successfully.",
+    "RFCNBE_NoSpace: No space available for a malloc call.",
+    "RFCNBE_BadName: NetBIOS name could not be translated to IP address.",
+    "RFCNBE_BadRead: Read system call returned an error. Check errno.",
+    "RFCNBE_BadWrite: Write system call returned an error. Check errno.",
+    "RFCNBE_ProtErr: A protocol error has occurred.",
+    "RFCNBE_ConGone: Connection dropped during a read or write system call.",
+    "RFCNBE_BadHandle: Bad connection handle passed.",
+    "RFCNBE_BadSocket: Problems creating socket.",
+    "RFCNBE_ConnectFailed: Connection failed. See errno.",
+    "RFCNBE_CallRejNLOCN: Call rejected. Not listening on called name.",
+    "RFCNBE_CallRejNLFCN: Call rejected. Not listening for called name.",
+    "RFCNBE_CallRejCNNP: Call rejected. Called name not present.",
+    "RFCNBE_CallRejInfRes: Call rejected. Name present, but insufficient resources.",
+    "RFCNBE_CallRejUnSpec: Call rejected. Unspecified error.",
+    "RFCNBE_BadParam: Bad parameters passed to a routine.",
+    "RFCNBE_Timeout: IO Operation timed out ..."
 };
-
-
-
Index: squid/auth_modules/MSNT/rfcnb-io.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-io.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-io.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-io.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NEtBIOS implementation
-
    Version 1.0
    RFCNB IO Routines ...
 
@@ -30,108 +29,109 @@
 #include <sys/uio.h>
 #include <sys/signal.h>
 
-int RFCNB_Timeout = 0;    /* Timeout in seconds ... */
-
-void rfcnb_alarm(int sig)
+int RFCNB_Timeout = 0;		/* Timeout in seconds ... */
 
+void
+rfcnb_alarm(int sig)
 {
 
-  fprintf(stderr, "IO Timed out ...\n");
+    fprintf(stderr, "IO Timed out ...\n");
 
 }
 
 /* Set timeout value and setup signal handling */
 
-int RFCNB_Set_Timeout(int seconds)
-
+int
+RFCNB_Set_Timeout(int seconds)
 {
-  int temp;
-  /* If we are on a Bezerkeley system, use sigvec, else sigaction */
+    int temp;
+    /* If we are on a Bezerkeley system, use sigvec, else sigaction */
 #ifndef SA_RESTART
-  struct sigvec invec, outvec; 
+    struct sigvec invec, outvec;
 #else
-  struct sigaction inact, outact;
+    struct sigaction inact, outact;
 #endif
 
-  RFCNB_Timeout = seconds;
+    RFCNB_Timeout = seconds;
 
-  if (RFCNB_Timeout > 0) { /* Set up handler to ignore but not restart */
+    if (RFCNB_Timeout > 0) {	/* Set up handler to ignore but not restart */
 
 #ifndef SA_RESTART
-    invec.sv_handler = (void (*)())rfcnb_alarm;
-    invec.sv_mask = 0;
-    invec.sv_flags = SV_INTERRUPT;
+	invec.sv_handler = (void (*)()) rfcnb_alarm;
+	invec.sv_mask = 0;
+	invec.sv_flags = SV_INTERRUPT;
 
-    if (sigvec(SIGALRM, &invec, &outvec)  < 0)
-      return(-1);
+	if (sigvec(SIGALRM, &invec, &outvec) < 0)
+	    return (-1);
 #else
-    inact.sa_handler = (void (*)())rfcnb_alarm;
+	inact.sa_handler = (void (*)()) rfcnb_alarm;
 #ifdef SOLARIS
-    /* Solaris seems to have an array of vectors ... */
-    inact.sa_mask.__sigbits[0] = 0;
-    inact.sa_mask.__sigbits[1] = 0;
-    inact.sa_mask.__sigbits[2] = 0;
-    inact.sa_mask.__sigbits[3] = 0;
+	/* Solaris seems to have an array of vectors ... */
+	inact.sa_mask.__sigbits[0] = 0;
+	inact.sa_mask.__sigbits[1] = 0;
+	inact.sa_mask.__sigbits[2] = 0;
+	inact.sa_mask.__sigbits[3] = 0;
 #else
 #ifdef __GLIBC__
-    for (temp = 0 ; temp < 32 ; temp ++)
-	inact.sa_mask.__val[temp]=0;
+	for (temp = 0; temp < 32; temp++)
+	    inact.sa_mask.__val[temp] = 0;
 #else
-    inact.sa_mask = 0;
+	inact.sa_mask = 0;
 #endif
 #endif
-    inact.sa_flags = 0;    /* Don't restart */
+	inact.sa_flags = 0;	/* Don't restart */
 
-    if (sigaction(SIGALRM, &inact, &outact) < 0)
-      return(-1);
+	if (sigaction(SIGALRM, &inact, &outact) < 0)
+	    return (-1);
 
 #endif
 
-  }
+    }
 
-  return(0);
+    return (0);
 
 }
 
 /* Discard the rest of an incoming packet as we do not have space for it
    in the buffer we allocated or were passed ...                         */
 
-int RFCNB_Discard_Rest(struct RFCNB_Con *con, int len)
-
-{ char temp[100];   /* Read into here */
-  int rest, this_read, bytes_read;
+int
+RFCNB_Discard_Rest(struct RFCNB_Con *con, int len)
+{
+    char temp[100];		/* Read into here */
+    int rest, this_read, bytes_read;
 
-  /* len is the amount we should read */
+    /* len is the amount we should read */
 
 #ifdef RFCNB_DEBUG
-  fprintf(stderr, "Discard_Rest called to discard: %i\n", len);
+    fprintf(stderr, "Discard_Rest called to discard: %i\n", len);
 #endif
 
-  rest = len;
+    rest = len;
 
-  while (rest > 0) {
+    while (rest > 0) {
 
-    this_read = (rest > sizeof(temp)?sizeof(temp):rest);
+	this_read = (rest > sizeof(temp) ? sizeof(temp) : rest);
 
-    bytes_read = read(con -> fd, temp, this_read);
+	bytes_read = read(con->fd, temp, this_read);
 
-    if (bytes_read <= 0) { /* Error so return */
+	if (bytes_read <= 0) {	/* Error so return */
 
-      if (bytes_read < 0) 
-	RFCNB_errno = RFCNBE_BadRead;
-      else
-	RFCNB_errno = RFCNBE_ConGone;
+	    if (bytes_read < 0)
+		RFCNB_errno = RFCNBE_BadRead;
+	    else
+		RFCNB_errno = RFCNBE_ConGone;
 
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
+	    RFCNB_saved_errno = errno;
+	    return (RFCNBE_Bad);
 
-    }
-    
-    rest = rest - bytes_read;
+	}
 
-  }
+	rest = rest - bytes_read;
 
-  return(0);
+    }
+
+    return (0);
 
 }
 
@@ -144,85 +144,87 @@
 
 */
 
-int RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
-
-{ int len_sent, tot_sent, this_len;
-  struct RFCNB_Pkt *pkt_ptr;
-  char *this_data;
-  int i;
-  struct iovec io_list[10];          /* We should never have more      */
-                                     /* If we do, this will blow up ...*/
+int
+RFCNB_Put_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
+{
+    int len_sent, tot_sent, this_len;
+    struct RFCNB_Pkt *pkt_ptr;
+    char *this_data;
+    int i;
+    struct iovec io_list[10];	/* We should never have more      */
+    /* If we do, this will blow up ... */
 
-  /* Try to send the data ... We only send as many bytes as len claims */
-  /* We should try to stuff it into an IOVEC and send as one write     */
+    /* Try to send the data ... We only send as many bytes as len claims */
+    /* We should try to stuff it into an IOVEC and send as one write     */
 
 
-  pkt_ptr = pkt;
-  len_sent =  tot_sent = 0;             /* Nothing sent so far */
-  i = 0;
+    pkt_ptr = pkt;
+    len_sent = tot_sent = 0;	/* Nothing sent so far */
+    i = 0;
 
-  while ((pkt_ptr != NULL) & (i < 10)) {  /* Watch that magic number! */
+    while ((pkt_ptr != NULL) & (i < 10)) {	/* Watch that magic number! */
 
-    this_len = pkt_ptr -> len;
-    this_data = pkt_ptr -> data;
-    if ((tot_sent + this_len) > len) 
-      this_len = len - tot_sent;        /* Adjust so we don't send too much */
+	this_len = pkt_ptr->len;
+	this_data = pkt_ptr->data;
+	if ((tot_sent + this_len) > len)
+	    this_len = len - tot_sent;	/* Adjust so we don't send too much */
 
-    /* Now plug into the iovec ... */
+	/* Now plug into the iovec ... */
 
-    io_list[i].iov_len = this_len;
-    io_list[i].iov_base = this_data;
-    i++;
+	io_list[i].iov_len = this_len;
+	io_list[i].iov_base = this_data;
+	i++;
 
-    tot_sent += this_len;
+	tot_sent += this_len;
 
-    if (tot_sent == len) break;   /* Let's not send too much */
+	if (tot_sent == len)
+	    break;		/* Let's not send too much */
 
-    pkt_ptr = pkt_ptr -> next;
+	pkt_ptr = pkt_ptr->next;
 
-  }
+    }
 
 #ifdef RFCNB_DEBUG
-  fprintf(stderr, "Frags = %i, tot_sent = %i\n", i, tot_sent);
+    fprintf(stderr, "Frags = %i, tot_sent = %i\n", i, tot_sent);
 #endif
 
-  /* Set up an alarm if timeouts are set ... */
+    /* Set up an alarm if timeouts are set ... */
 
-  if (RFCNB_Timeout > 0) 
-    alarm(RFCNB_Timeout);
+    if (RFCNB_Timeout > 0)
+	alarm(RFCNB_Timeout);
 
-  if ((len_sent = writev(con -> fd, io_list, i)) < 0) { /* An error */
+    if ((len_sent = writev(con->fd, io_list, i)) < 0) {	/* An error */
 
-    con -> rfc_errno = errno;
-    if (errno == EINTR)  /* We were interrupted ... */
-      RFCNB_errno = RFCNBE_Timeout;
-    else
-      RFCNB_errno = RFCNBE_BadWrite;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-
-  }
-
-  if (len_sent < tot_sent) { /* Less than we wanted */
-    if (errno == EINTR)      /* We were interrupted */
-      RFCNB_errno = RFCNBE_Timeout;
-    else
-      RFCNB_errno = RFCNBE_BadWrite;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-  }
+	con->rfc_errno = errno;
+	if (errno == EINTR)	/* We were interrupted ... */
+	    RFCNB_errno = RFCNBE_Timeout;
+	else
+	    RFCNB_errno = RFCNBE_BadWrite;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
+
+    }
+
+    if (len_sent < tot_sent) {	/* Less than we wanted */
+	if (errno == EINTR)	/* We were interrupted */
+	    RFCNB_errno = RFCNBE_Timeout;
+	else
+	    RFCNB_errno = RFCNBE_BadWrite;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
+    }
 
-  if (RFCNB_Timeout > 0)
-    alarm(0);                /* Reset that sucker */
+    if (RFCNB_Timeout > 0)
+	alarm(0);		/* Reset that sucker */
 
 #ifdef RFCNB_DEBUG
 
-  fprintf(stderr, "Len sent = %i ...\n", len_sent);
-  RFCNB_Print_Pkt(stderr, "sent", pkt, len_sent); /* Print what send ... */
+    fprintf(stderr, "Len sent = %i ...\n", len_sent);
+    RFCNB_Print_Pkt(stderr, "sent", pkt, len_sent);	/* Print what send ... */
 
 #endif
 
-  return(len_sent);
+    return (len_sent);
 
 }
 
@@ -234,188 +236,187 @@
 */
 
 
-int RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
-
-{ int read_len, pkt_len;
-  char hdr[RFCNB_Pkt_Hdr_Len];      /* Local space for the header */
-  struct RFCNB_Pkt *pkt_frag;
-  int more, this_time, offset, frag_len, this_len;
-  BOOL seen_keep_alive = TRUE;
+int
+RFCNB_Get_Pkt(struct RFCNB_Con *con, struct RFCNB_Pkt *pkt, int len)
+{
+    int read_len, pkt_len;
+    char hdr[RFCNB_Pkt_Hdr_Len];	/* Local space for the header */
+    struct RFCNB_Pkt *pkt_frag;
+    int more, this_time, offset, frag_len, this_len;
+    BOOL seen_keep_alive = TRUE;
 
-  /* Read that header straight into the buffer */
+    /* Read that header straight into the buffer */
 
-  if (len < RFCNB_Pkt_Hdr_Len) { /* What a bozo */
+    if (len < RFCNB_Pkt_Hdr_Len) {	/* What a bozo */
 
 #ifdef RFCNB_DEBUG
-    fprintf(stderr, "Trying to read less than a packet:");
-    perror("");
+	fprintf(stderr, "Trying to read less than a packet:");
+	perror("");
 #endif
-    RFCNB_errno = RFCNBE_BadParam;
-    return(RFCNBE_Bad);
+	RFCNB_errno = RFCNBE_BadParam;
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  /* We discard keep alives here ... */
+    /* We discard keep alives here ... */
 
-  if (RFCNB_Timeout > 0) 
-    alarm(RFCNB_Timeout);
+    if (RFCNB_Timeout > 0)
+	alarm(RFCNB_Timeout);
 
-  while (seen_keep_alive) {
+    while (seen_keep_alive) {
 
-    if ((read_len = read(con -> fd, hdr, sizeof(hdr))) < 0) { /* Problems */
+	if ((read_len = read(con->fd, hdr, sizeof(hdr))) < 0) {	/* Problems */
 #ifdef RFCNB_DEBUG
-      fprintf(stderr, "Reading the packet, we got:");
-      perror("");
+	    fprintf(stderr, "Reading the packet, we got:");
+	    perror("");
 #endif
-      if (errno == EINTR)
-	RFCNB_errno = RFCNBE_Timeout;
-      else
-	RFCNB_errno = RFCNBE_BadRead;
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
+	    if (errno == EINTR)
+		RFCNB_errno = RFCNBE_Timeout;
+	    else
+		RFCNB_errno = RFCNBE_BadRead;
+	    RFCNB_saved_errno = errno;
+	    return (RFCNBE_Bad);
 
-    }
+	}
 
-    /* Now we check out what we got */
+	/* Now we check out what we got */
 
-    if (read_len == 0) { /* Connection closed, send back eof?  */
+	if (read_len == 0) {	/* Connection closed, send back eof?  */
 
 #ifdef RFCNB_DEBUG
-      fprintf(stderr, "Connection closed reading\n");
-#endif 
+	    fprintf(stderr, "Connection closed reading\n");
+#endif
 
-      if (errno == EINTR) 
-	RFCNB_errno = RFCNBE_Timeout;
-      else
-	RFCNB_errno = RFCNBE_ConGone;
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
+	    if (errno == EINTR)
+		RFCNB_errno = RFCNBE_Timeout;
+	    else
+		RFCNB_errno = RFCNBE_ConGone;
+	    RFCNB_saved_errno = errno;
+	    return (RFCNBE_Bad);
 
-    }
+	}
 
-    if (RFCNB_Pkt_Type(hdr) == RFCNB_SESSION_KEEP_ALIVE) {
+	if (RFCNB_Pkt_Type(hdr) == RFCNB_SESSION_KEEP_ALIVE) {
 
 #ifdef RFCNB_DEBUG
-      fprintf(stderr, "RFCNB KEEP ALIVE received\n");
+	    fprintf(stderr, "RFCNB KEEP ALIVE received\n");
 #endif
-      
-    }
-    else {
-      seen_keep_alive = FALSE;
+
+	} else {
+	    seen_keep_alive = FALSE;
+	}
+
     }
 
-  }
- 
-  /* What if we got less than or equal to a hdr size in bytes? */
+    /* What if we got less than or equal to a hdr size in bytes? */
 
-  if (read_len < sizeof(hdr)) { /* We got a small packet */
+    if (read_len < sizeof(hdr)) {	/* We got a small packet */
 
-    /* Now we need to copy the hdr portion we got into the supplied packet */
+	/* Now we need to copy the hdr portion we got into the supplied packet */
 
-    memcpy(pkt -> data, hdr, read_len);  /*Copy data */
+	memcpy(pkt->data, hdr, read_len);	/*Copy data */
 
 #ifdef RFCNB_DEBUG
-    RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len);
+	RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len);
 #endif
 
-    return(read_len);
+	return (read_len);
 
-  }
+    }
 
-  /* Now, if we got at least a hdr size, alloc space for rest, if we need it */
+    /* Now, if we got at least a hdr size, alloc space for rest, if we need it */
 
-  pkt_len = RFCNB_Pkt_Len(hdr);
+    pkt_len = RFCNB_Pkt_Len(hdr);
 
 #ifdef RFCNB_DEBUG
-  fprintf(stderr, "Reading Pkt: Length = %i\n", pkt_len);
-#endif  
+    fprintf(stderr, "Reading Pkt: Length = %i\n", pkt_len);
+#endif
 
-  /* Now copy in the hdr */
+    /* Now copy in the hdr */
 
-  memcpy(pkt -> data, hdr, sizeof(hdr));
+    memcpy(pkt->data, hdr, sizeof(hdr));
 
-  /* Get the rest of the packet ... first figure out how big our buf is? */
-  /* And make sure that we handle the fragments properly ... Sure should */
-  /* use an iovec ...                                                    */
+    /* Get the rest of the packet ... first figure out how big our buf is? */
+    /* And make sure that we handle the fragments properly ... Sure should */
+    /* use an iovec ...                                                    */
 
-  if (len < pkt_len)            /* Only get as much as we have space for */
-    more = len - RFCNB_Pkt_Hdr_Len;
-  else
-    more = pkt_len;
+    if (len < pkt_len)		/* Only get as much as we have space for */
+	more = len - RFCNB_Pkt_Hdr_Len;
+    else
+	more = pkt_len;
 
-  this_time = 0;
+    this_time = 0;
 
-  /* We read for each fragment ... */
+    /* We read for each fragment ... */
 
-  if (pkt -> len == read_len){     /* If this frag was exact size */
-    pkt_frag = pkt -> next;        /* Stick next lot in next frag */
-    offset = 0;                    /* then we start at 0 in next  */
-  }
-  else {
-    pkt_frag = pkt;                /* Otherwise use rest of this frag */
-    offset = RFCNB_Pkt_Hdr_Len;    /* Otherwise skip the header       */
-  }
+    if (pkt->len == read_len) {	/* If this frag was exact size */
+	pkt_frag = pkt->next;	/* Stick next lot in next frag */
+	offset = 0;		/* then we start at 0 in next  */
+    } else {
+	pkt_frag = pkt;		/* Otherwise use rest of this frag */
+	offset = RFCNB_Pkt_Hdr_Len;	/* Otherwise skip the header       */
+    }
 
-  frag_len = pkt_frag -> len;
+    frag_len = pkt_frag->len;
 
-  if (more <= frag_len)     /* If len left to get less than frag space */
-    this_len = more;        /* Get the rest ...                        */
-  else
-    this_len = frag_len - offset;
+    if (more <= frag_len)	/* If len left to get less than frag space */
+	this_len = more;	/* Get the rest ...                        */
+    else
+	this_len = frag_len - offset;
 
-  while (more > 0) {
+    while (more > 0) {
 
-    if ((this_time = read(con -> fd, (pkt_frag -> data) + offset, this_len)) <= 0) { /* Problems */
+	if ((this_time = read(con->fd, (pkt_frag->data) + offset, this_len)) <= 0) {	/* Problems */
 
-      if (errno == EINTR) {
+	    if (errno == EINTR) {
 
-	RFCNB_errno = RFCNB_Timeout;
+		RFCNB_errno = RFCNB_Timeout;
 
-      }
-      else {
-	if (this_time < 0)
-	  RFCNB_errno = RFCNBE_BadRead;
-	else
-	  RFCNB_errno = RFCNBE_ConGone;
-      }
+	    } else {
+		if (this_time < 0)
+		    RFCNB_errno = RFCNBE_BadRead;
+		else
+		    RFCNB_errno = RFCNBE_ConGone;
+	    }
 
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
-
-    }
+	    RFCNB_saved_errno = errno;
+	    return (RFCNBE_Bad);
 
+	}
 #ifdef RFCNB_DEBUG
-    fprintf(stderr, "Frag_Len = %i, this_time = %i, this_len = %i, more = %i\n", frag_len,
-                    this_time, this_len, more);
+	fprintf(stderr,
+	    "Frag_Len = %i, this_time = %i, this_len = %i, more = %i\n",
+	    frag_len, this_time, this_len, more);
 #endif
 
-    read_len = read_len + this_time;  /* How much have we read ... */
+	read_len = read_len + this_time;	/* How much have we read ... */
 
-    /* Now set up the next part */
+	/* Now set up the next part */
 
-    if (pkt_frag -> next == NULL) break;       /* That's it here */
+	if (pkt_frag->next == NULL)
+	    break;		/* That's it here */
 
-    pkt_frag = pkt_frag -> next;
-    this_len = pkt_frag -> len;
-    offset = 0;
+	pkt_frag = pkt_frag->next;
+	this_len = pkt_frag->len;
+	offset = 0;
 
-    more = more - this_time;
+	more = more - this_time;
 
-  }
+    }
 
 #ifdef RFCNB_DEBUG
-  fprintf(stderr,"Pkt Len = %i, read_len = %i\n", pkt_len, read_len);
-  RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len + sizeof(hdr));
+    fprintf(stderr, "Pkt Len = %i, read_len = %i\n", pkt_len, read_len);
+    RFCNB_Print_Pkt(stderr, "rcvd", pkt, read_len + sizeof(hdr));
 #endif
 
-  if (read_len < (pkt_len + sizeof(hdr))) {  /* Discard the rest */
+    if (read_len < (pkt_len + sizeof(hdr))) {	/* Discard the rest */
 
-    return(RFCNB_Discard_Rest(con, (pkt_len + sizeof(hdr)) - read_len));
+	return (RFCNB_Discard_Rest(con, (pkt_len + sizeof(hdr)) - read_len));
 
-  }
+    }
 
-  if (RFCNB_Timeout > 0)
-    alarm(0);                /* Reset that sucker */
+    if (RFCNB_Timeout > 0)
+	alarm(0);		/* Reset that sucker */
 
-  return(read_len + sizeof(RFCNB_Hdr));
+    return (read_len + sizeof(RFCNB_Hdr));
 }
Index: squid/auth_modules/MSNT/rfcnb-io.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-io.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.62.1
diff -u -r1.1.1.1 -r1.1.1.1.62.1
--- squid/auth_modules/MSNT/rfcnb-io.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-io.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.62.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB IO Routines Defines
 
Index: squid/auth_modules/MSNT/rfcnb-priv.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-priv.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-priv.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-priv.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Defines
 
@@ -52,30 +51,33 @@
 
 /* Structures      */
 
-typedef struct redirect_addr * redirect_ptr;
+typedef struct redirect_addr *redirect_ptr;
 
-struct redirect_addr {
+struct redirect_addr
+{
 
-  struct in_addr ip_addr;
-  int port;
-  redirect_ptr next;
+    struct in_addr ip_addr;
+    int port;
+    redirect_ptr next;
 
 };
 
-typedef struct RFCNB_Con {
+typedef struct RFCNB_Con
+{
 
-  int fd;                     /* File descripter for TCP/IP connection */
-  int rfc_errno;                  /* last error                            */
-  int timeout;		      /* How many milli-secs before IO times out */
-  int redirects;	      /* How many times we were redirected     */
-  struct redirect_addr *redirect_list;  /* First is first address */
-  struct redirect_addr *last_addr;
-
-} RFCNB_Con;
-
-typedef char RFCNB_Hdr[4]; /* The header is 4 bytes long with  */
-                                    /* char[0] as the type, char[1] the */
-			            /* flags, and char[2..3] the length */
+    int fd;			/* File descripter for TCP/IP connection */
+    int rfc_errno;		/* last error                            */
+    int timeout;		/* How many milli-secs before IO times out */
+    int redirects;		/* How many times we were redirected     */
+    struct redirect_addr *redirect_list;	/* First is first address */
+    struct redirect_addr *last_addr;
+
+}
+RFCNB_Con;
+
+typedef char RFCNB_Hdr[4];	/* The header is 4 bytes long with  */
+				    /* char[0] as the type, char[1] the */
+				    /* flags, and char[2..3] the length */
 
 /* Macros to extract things from the header. These are for portability
    between architecture types where we are worried about byte order     */
@@ -86,7 +88,7 @@
 #define RFCNB_Pkt_Nack_Len       5
 #define RFCNB_Pkt_Type_Offset    0
 #define RFCNB_Pkt_Flags_Offset   1
-#define RFCNB_Pkt_Len_Offset     2   /* Length is 2 bytes plus a flag bit */
+#define RFCNB_Pkt_Len_Offset     2	/* Length is 2 bytes plus a flag bit */
 #define RFCNB_Pkt_N1Len_Offset   4
 #define RFCNB_Pkt_Called_Offset  5
 #define RFCNB_Pkt_N2Len_Offset   38
@@ -147,5 +149,5 @@
 
 #ifndef RFCNB_ERRNO
 extern int RFCNB_errno;
-extern int RFCNB_saved_errno;    /* Save this from point of error */
+extern int RFCNB_saved_errno;	/* Save this from point of error */
 #endif
Index: squid/auth_modules/MSNT/rfcnb-util.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-util.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-util.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-util.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Utility Routines ...
 
@@ -28,38 +27,40 @@
 #include "rfcnb-util.h"
 #include "rfcnb-io.h"
 
-extern void (*Prot_Print_Routine)(); /* Pointer to protocol print routine */
+extern void (*Prot_Print_Routine) ();	/* Pointer to protocol print routine */
 
 /* Convert name and pad to 16 chars as needed */
 /* Name 1 is a C string with null termination, name 2 may not be */
 /* If SysName is true, then put a <00> on end, else space>       */
 
-void RFCNB_CvtPad_Name(char *name1, char *name2)
+void
+RFCNB_CvtPad_Name(char *name1, char *name2)
+{
+    char c, c1, c2;
+    int i, len;
 
-{ char c, c1, c2;
-  int i, len;
+    len = strlen(name1);
 
-  len = strlen(name1);
+    for (i = 0; i < 16; i++) {
 
-  for (i = 0; i < 16; i++) {
+	if (i >= len) {
 
-    if (i >= len) {
+	    c1 = 'C';
+	    c2 = 'A';		/* CA is a space */
 
-     c1 = 'C'; c2 = 'A'; /* CA is a space */
- 
-    } else {
+	} else {
 
-      c = name1[i];
-      c1 = (char)((int)c/16 + (int)'A');
-      c2 = (char)((int)c%16 + (int)'A');
-    }
+	    c = name1[i];
+	    c1 = (char) ((int) c / 16 + (int) 'A');
+	    c2 = (char) ((int) c % 16 + (int) 'A');
+	}
 
-    name2[i*2] = c1;
-    name2[i*2+1] = c2;
+	name2[i * 2] = c1;
+	name2[i * 2 + 1] = c2;
 
-  }
+    }
 
-  name2[32] = 0;   /* Put in the nll ...*/
+    name2[32] = 0;		/* Put in the nll ... */
 
 }
 
@@ -72,327 +73,337 @@
 
 */
 
-void RFCNB_AName_To_NBName(char *AName, char *NBName)
-
-{ char c, c1, c2;
-  int i;
+void
+RFCNB_AName_To_NBName(char *AName, char *NBName)
+{
+    char c, c1, c2;
+    int i;
 
-  for (i=0; i < 16; i++) {
+    for (i = 0; i < 16; i++) {
 
-    c = AName[i];
+	c = AName[i];
 
-    c1 = (char)((c >> 4) + 'A');
-    c2 = (char)((c & 0xF) + 'A');
+	c1 = (char) ((c >> 4) + 'A');
+	c2 = (char) ((c & 0xF) + 'A');
 
-    NBName[i*2] = c1;
-    NBName[i*2+1] = c2;
-  }
+	NBName[i * 2] = c1;
+	NBName[i * 2 + 1] = c2;
+    }
 
-  NBName[32] = 0; /* Put in a null */
+    NBName[32] = 0;		/* Put in a null */
 
 }
 
 /* Do the reverse of the above ... */
 
-void RFCNB_NBName_To_AName(char *NBName, char *AName)
-
-{ char c, c1, c2;
-  int i;
+void
+RFCNB_NBName_To_AName(char *NBName, char *AName)
+{
+    char c, c1, c2;
+    int i;
 
-  for (i=0; i < 16; i++) {
+    for (i = 0; i < 16; i++) {
 
-    c1 = NBName[i*2];
-    c2 = NBName[i*2+1];
+	c1 = NBName[i * 2];
+	c2 = NBName[i * 2 + 1];
 
-    c = (char)(((int)c1 - (int)'A') * 16 + ((int)c2 - (int)'A'));
+	c = (char) (((int) c1 - (int) 'A') * 16 + ((int) c2 - (int) 'A'));
 
-    AName[i] = c;
+	AName[i] = c;
 
-  }
+    }
 
-  AName[i] = 0;   /* Put a null on the end ... */
+    AName[i] = 0;		/* Put a null on the end ... */
 
 }
 
 /* Print a string of bytes in HEX etc */
 
-void RFCNB_Print_Hex(FILE *fd, struct RFCNB_Pkt *pkt, int Offset, int Len)
+void
+RFCNB_Print_Hex(FILE * fd, struct RFCNB_Pkt *pkt, int Offset, int Len)
+{
+    char c1, c2, outbuf1[33];
+    unsigned char c;
+    int i, j;
+    struct RFCNB_Pkt *pkt_ptr = pkt;
+    static char Hex_List[17] = "0123456789ABCDEF";
 
-{ char c1, c2, outbuf1[33];
-  unsigned char c;
-  int i, j;
-  struct RFCNB_Pkt *pkt_ptr = pkt;
-  static char Hex_List[17] = "0123456789ABCDEF";
+    j = 0;
 
-  j = 0;
+    /* We only want to print as much as sepcified in Len */
 
-  /* We only want to print as much as sepcified in Len */
+    while (pkt_ptr != NULL) {
 
-  while (pkt_ptr != NULL) {
+	for (i = 0;
+	    i < ((Len > (pkt_ptr->len) ? pkt_ptr->len : Len) - Offset); i++) {
 
-    for (i = 0; 
-	 i < ((Len > (pkt_ptr -> len)?pkt_ptr -> len:Len) - Offset); 
-	 i++) {
+	    c = pkt_ptr->data[i + Offset];
+	    c1 = Hex_List[c >> 4];
+	    c2 = Hex_List[c & 0xF];
 
-      c = pkt_ptr -> data[i + Offset];
-      c1 = Hex_List[c >> 4];
-      c2 = Hex_List[c & 0xF];
+	    outbuf1[j++] = c1;
+	    outbuf1[j++] = c2;
 
-      outbuf1[j++] = c1; outbuf1[j++] = c2;
+	    if (j == 32) {	/* Print and reset */
+		outbuf1[j] = 0;
+		fprintf(fd, "    %s\n", outbuf1);
+		j = 0;
+	    }
 
-      if (j == 32){ /* Print and reset */
-	outbuf1[j] = 0;
-	fprintf(fd, "    %s\n", outbuf1);
-	j = 0;
-      }
+	}
 
-    }
+	Offset = 0;
+	Len = Len - pkt_ptr->len;	/* Reduce amount by this much */
+	pkt_ptr = pkt_ptr->next;
 
-    Offset = 0;
-    Len = Len - pkt_ptr -> len;   /* Reduce amount by this much */
-    pkt_ptr = pkt_ptr -> next;
-
-  }
+    }
 
-  /* Print last lot in the buffer ... */
+    /* Print last lot in the buffer ... */
 
-  if (j > 0) {
+    if (j > 0) {
 
-    outbuf1[j] = 0;
-    fprintf(fd, "    %s\n", outbuf1);
+	outbuf1[j] = 0;
+	fprintf(fd, "    %s\n", outbuf1);
 
-  }
+    }
 
-  fprintf(fd, "\n");
+    fprintf(fd, "\n");
 
 }
 
 /* Get a packet of size n */
 
-struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n)
-
-{ RFCNB_Pkt *pkt;
+struct RFCNB_Pkt *
+RFCNB_Alloc_Pkt(int n)
+{
+    RFCNB_Pkt *pkt;
 
-  if ((pkt = (struct RFCNB_Pkt *)malloc(sizeof(struct RFCNB_Pkt))) == NULL) {
+    if ((pkt = (struct RFCNB_Pkt *) malloc(sizeof(struct RFCNB_Pkt))) == NULL) {
 
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(NULL);
+	RFCNB_errno = RFCNBE_NoSpace;
+	RFCNB_saved_errno = errno;
+	return (NULL);
 
-  }
+    }
 
-  pkt -> next = NULL;
-  pkt -> len = n;
+    pkt->next = NULL;
+    pkt->len = n;
 
-  if (n == 0) return(pkt);
+    if (n == 0)
+	return (pkt);
 
-  if ((pkt -> data = (char *)malloc(n)) == NULL) {
+    if ((pkt->data = (char *) malloc(n)) == NULL) {
 
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    free(pkt);
-    return(NULL);
+	RFCNB_errno = RFCNBE_NoSpace;
+	RFCNB_saved_errno = errno;
+	free(pkt);
+	return (NULL);
 
-  }
+    }
 
-  return(pkt);
+    return (pkt);
 
 }
 
 /* Free up a packet */
 
-int RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt)
-
-{ struct RFCNB_Pkt *pkt_next; char *data_ptr;
+int
+RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt)
+{
+    struct RFCNB_Pkt *pkt_next;
+    char *data_ptr;
 
-  while (pkt != NULL) {
+    while (pkt != NULL) {
 
-    pkt_next = pkt -> next;
+	pkt_next = pkt->next;
 
-    data_ptr = pkt -> data;
+	data_ptr = pkt->data;
 
-    if (data_ptr != NULL)
-      free(data_ptr);
+	if (data_ptr != NULL)
+	    free(data_ptr);
 
-    free(pkt);
+	free(pkt);
 
-    pkt = pkt_next;
+	pkt = pkt_next;
 
-  }
+    }
 
 }
 
 /* Print an RFCNB packet */
 
-void RFCNB_Print_Pkt(FILE *fd, char *dirn, struct RFCNB_Pkt *pkt, int len)
-
-{ char lname[17];
+void
+RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len)
+{
+    char lname[17];
 
-  /* We assume that the first fragment is the RFCNB Header  */
-  /* We should loop through the fragments printing them out */
+    /* We assume that the first fragment is the RFCNB Header  */
+    /* We should loop through the fragments printing them out */
 
-  fprintf(fd, "RFCNB Pkt %s:", dirn);
+    fprintf(fd, "RFCNB Pkt %s:", dirn);
 
-  switch (RFCNB_Pkt_Type(pkt -> data)) {
+    switch (RFCNB_Pkt_Type(pkt->data)) {
 
-  case RFCNB_SESSION_MESSAGE: 
+    case RFCNB_SESSION_MESSAGE:
 
-    fprintf(fd, "SESSION MESSAGE: Length = %i\n", RFCNB_Pkt_Len(pkt -> data));
-    RFCNB_Print_Hex(fd, pkt, RFCNB_Pkt_Hdr_Len, 
+	fprintf(fd, "SESSION MESSAGE: Length = %i\n", RFCNB_Pkt_Len(pkt->data));
+	RFCNB_Print_Hex(fd, pkt, RFCNB_Pkt_Hdr_Len,
 #ifdef RFCNB_PRINT_DATA
-		    RFCNB_Pkt_Len(pkt -> data) - RFCNB_Pkt_Hdr_Len);
+	    RFCNB_Pkt_Len(pkt->data) - RFCNB_Pkt_Hdr_Len);
 #else
-                    40);
+	    40);
 #endif
 
-  if (Prot_Print_Routine != 0) { /* Print the rest of the packet */
-	
-    Prot_Print_Routine(fd, strcmp(dirn, "sent"), pkt, RFCNB_Pkt_Hdr_Len,
-		       RFCNB_Pkt_Len(pkt -> data) - RFCNB_Pkt_Hdr_Len);
+	if (Prot_Print_Routine != 0) {	/* Print the rest of the packet */
 
-      }
+	    Prot_Print_Routine(fd, strcmp(dirn, "sent"), pkt, RFCNB_Pkt_Hdr_Len,
+		RFCNB_Pkt_Len(pkt->data) - RFCNB_Pkt_Hdr_Len);
 
-      break;
+	}
 
- case RFCNB_SESSION_REQUEST:
+	break;
 
-      fprintf(fd, "SESSION REQUEST: Length = %i\n",
-		  RFCNB_Pkt_Len(pkt -> data));
-      RFCNB_NBName_To_AName((char *)(pkt -> data + RFCNB_Pkt_Called_Offset), lname);
-      fprintf(fd, "  Called Name: %s\n", lname);
-      RFCNB_NBName_To_AName((char *)(pkt -> data + RFCNB_Pkt_Calling_Offset), lname);
-      fprintf(fd, "  Calling Name: %s\n", lname);
+    case RFCNB_SESSION_REQUEST:
 
-      break;
+	fprintf(fd, "SESSION REQUEST: Length = %i\n", RFCNB_Pkt_Len(pkt->data));
+	RFCNB_NBName_To_AName((char *) (pkt->data + RFCNB_Pkt_Called_Offset),
+	    lname);
+	fprintf(fd, "  Called Name: %s\n", lname);
+	RFCNB_NBName_To_AName((char *) (pkt->data + RFCNB_Pkt_Calling_Offset),
+	    lname);
+	fprintf(fd, "  Calling Name: %s\n", lname);
 
- case RFCNB_SESSION_ACK:
+	break;
 
-      fprintf(fd, "RFCNB SESSION ACK: Length = %i\n",
-		  RFCNB_Pkt_Len(pkt -> data));
+    case RFCNB_SESSION_ACK:
 
-      break;
+	fprintf(fd, "RFCNB SESSION ACK: Length = %i\n",
+	    RFCNB_Pkt_Len(pkt->data));
 
- case RFCNB_SESSION_REJ:
-      fprintf(fd, "RFCNB SESSION REJECT: Length = %i\n", 
-		  RFCNB_Pkt_Len(pkt -> data));
+	break;
 
-      if (RFCNB_Pkt_Len(pkt -> data) < 1) {
-	fprintf(fd, "   Protocol Error, short Reject packet!\n");
-      }
-      else {
-	fprintf(fd, "   Error = %x\n", CVAL(pkt -> data, RFCNB_Pkt_Error_Offset));
-      }
+    case RFCNB_SESSION_REJ:
+	fprintf(fd, "RFCNB SESSION REJECT: Length = %i\n",
+	    RFCNB_Pkt_Len(pkt->data));
+
+	if (RFCNB_Pkt_Len(pkt->data) < 1) {
+	    fprintf(fd, "   Protocol Error, short Reject packet!\n");
+	} else {
+	    fprintf(fd, "   Error = %x\n", CVAL(pkt->data,
+		    RFCNB_Pkt_Error_Offset));
+	}
 
-      break;
+	break;
 
- case RFCNB_SESSION_RETARGET:
+    case RFCNB_SESSION_RETARGET:
 
-      fprintf(fd, "RFCNB SESSION RETARGET: Length = %i\n",
-		  RFCNB_Pkt_Len(pkt -> data));
+	fprintf(fd, "RFCNB SESSION RETARGET: Length = %i\n",
+	    RFCNB_Pkt_Len(pkt->data));
 
-      /* Print out the IP address etc and the port? */
+	/* Print out the IP address etc and the port? */
 
-      break;
+	break;
 
- case RFCNB_SESSION_KEEP_ALIVE:
+    case RFCNB_SESSION_KEEP_ALIVE:
 
-      fprintf(fd, "RFCNB SESSION KEEP ALIVE: Length = %i\n",
-	      RFCNB_Pkt_Len(pkt -> data));
-      break;
+	fprintf(fd, "RFCNB SESSION KEEP ALIVE: Length = %i\n",
+	    RFCNB_Pkt_Len(pkt->data));
+	break;
 
     default:
 
-      break;
-  }
+	break;
+    }
 
 }
 
 /* Resolve a name into an address */
 
-int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
+int
+RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
+{
+    int addr;			/* Assumes IP4, 32 bit network addresses */
+    struct hostent *hp;
 
-{ int addr;         /* Assumes IP4, 32 bit network addresses */
-  struct hostent *hp;
+    /* Use inet_addr to try to convert the address */
 
-        /* Use inet_addr to try to convert the address */
+    if ((addr = inet_addr(host)) == INADDR_NONE) {	/* Oh well, a good try :-) */
 
-  if ((addr = inet_addr(host)) == INADDR_NONE) { /* Oh well, a good try :-) */
+	/* Now try a name look up with gethostbyname */
 
-        /* Now try a name look up with gethostbyname */
+	if ((hp = gethostbyname(host)) == NULL) {	/* Not in DNS */
 
-    if ((hp = gethostbyname(host)) == NULL) { /* Not in DNS */
+	    /* Try NetBIOS name lookup, how the hell do we do that? */
 
-        /* Try NetBIOS name lookup, how the hell do we do that? */
+	    RFCNB_errno = RFCNBE_BadName;	/* Is this right? */
+	    RFCNB_saved_errno = errno;
+	    return (RFCNBE_Bad);
 
-      RFCNB_errno = RFCNBE_BadName;   /* Is this right? */
-      RFCNB_saved_errno = errno;
-      return(RFCNBE_Bad);
+	} else {		/* We got a name */
 
-    }
-    else {  /* We got a name */
+	    memcpy((void *) Dest_IP, (void *) hp->h_addr_list[0],
+		sizeof(struct in_addr));
 
-       memcpy((void *)Dest_IP, (void *)hp -> h_addr_list[0], sizeof(struct in_addr));
+	}
+    } else {			/* It was an IP address */
 
-    }
-  }
-  else { /* It was an IP address */
+	memcpy((void *) Dest_IP, (void *) &addr, sizeof(struct in_addr));
 
-    memcpy((void *)Dest_IP, (void *)&addr, sizeof(struct in_addr));
-
-  }
+    }
 
-  return 0;
+    return 0;
 
 }
 
 /* Disconnect the TCP connection to the server */
 
-int RFCNB_Close(int socket)
-
+int
+RFCNB_Close(int socket)
 {
 
-  close(socket);
+    close(socket);
 
-  /* If we want to do error recovery, here is where we put it */
+    /* If we want to do error recovery, here is where we put it */
 
-  return 0;
+    return 0;
 
 }
 
 /* Connect to the server specified in the IP address.
    Not sure how to handle socket options etc.         */
 
-int RFCNB_IP_Connect(struct in_addr Dest_IP, int port)
-
-{ struct sockaddr_in Socket;
-  int fd;
+int
+RFCNB_IP_Connect(struct in_addr Dest_IP, int port)
+{
+    struct sockaddr_in Socket;
+    int fd;
 
-  /* Create a socket */
+    /* Create a socket */
 
-  if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) { /* Handle the error */
+    if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) {	/* Handle the error */
 
-    RFCNB_errno = RFCNBE_BadSocket;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
-    } 
+	RFCNB_errno = RFCNBE_BadSocket;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
+    }
 
-  bzero((char *)&Socket, sizeof(Socket));
-  memcpy((char *)&Socket.sin_addr, (char *)&Dest_IP, sizeof(Dest_IP));
+    bzero((char *) &Socket, sizeof(Socket));
+    memcpy((char *) &Socket.sin_addr, (char *) &Dest_IP, sizeof(Dest_IP));
 
-  Socket.sin_port = htons(port);
-  Socket.sin_family = PF_INET;
+    Socket.sin_port = htons(port);
+    Socket.sin_family = PF_INET;
 
-  /* Now connect to the destination */
+    /* Now connect to the destination */
 
-  if (connect(fd, (struct sockaddr *)&Socket, sizeof(Socket)) < 0) { /* Error */
+    if (connect(fd, (struct sockaddr *) &Socket, sizeof(Socket)) < 0) {	/* Error */
 
-    close(fd);
-    RFCNB_errno = RFCNBE_ConnectFailed;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
+	close(fd);
+	RFCNB_errno = RFCNBE_ConnectFailed;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
     }
 
-  return(fd);
+    return (fd);
 
 }
 
@@ -401,132 +412,120 @@
 
 */
 
-int RFCNB_Session_Req(struct RFCNB_Con *con, 
-		      char *Called_Name, 
-		      char *Calling_Name,
-		      BOOL *redirect,
-		      struct in_addr *Dest_IP,
-		      int * port)
-
-{ char *sess_pkt;
+int
+RFCNB_Session_Req(struct RFCNB_Con *con,
+    char *Called_Name,
+    char *Calling_Name, BOOL * redirect, struct in_addr *Dest_IP, int *port)
+{
+    char *sess_pkt;
 
-  /* Response packet should be no more than 9 bytes, make 16 jic */
+    /* Response packet should be no more than 9 bytes, make 16 jic */
 
-  char ln1[16], ln2[16], n1[32], n2[32], resp[16];
-  int len;
-  struct RFCNB_Pkt *pkt, res_pkt;
+    char ln1[16], ln2[16], n1[32], n2[32], resp[16];
+    int len;
+    struct RFCNB_Pkt *pkt, res_pkt;
 
-  /* We build and send the session request, then read the response */
+    /* We build and send the session request, then read the response */
 
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Sess_Len);
+    pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Sess_Len);
 
-  if (pkt == NULL) {
+    if (pkt == NULL) {
 
-    return(RFCNBE_Bad);  /* Leave the error that RFCNB_Alloc_Pkt gives) */
+	return (RFCNBE_Bad);	/* Leave the error that RFCNB_Alloc_Pkt gives) */
 
-  }
+    }
 
-  sess_pkt = pkt -> data;    /* Get pointer to packet proper */
+    sess_pkt = pkt->data;	/* Get pointer to packet proper */
 
-  sess_pkt[RFCNB_Pkt_Type_Offset]  = RFCNB_SESSION_REQUEST;
-  RFCNB_Put_Pkt_Len(sess_pkt, RFCNB_Pkt_Sess_Len-RFCNB_Pkt_Hdr_Len);
-  sess_pkt[RFCNB_Pkt_N1Len_Offset] = 32;
-  sess_pkt[RFCNB_Pkt_N2Len_Offset] = 32;
+    sess_pkt[RFCNB_Pkt_Type_Offset] = RFCNB_SESSION_REQUEST;
+    RFCNB_Put_Pkt_Len(sess_pkt, RFCNB_Pkt_Sess_Len - RFCNB_Pkt_Hdr_Len);
+    sess_pkt[RFCNB_Pkt_N1Len_Offset] = 32;
+    sess_pkt[RFCNB_Pkt_N2Len_Offset] = 32;
 
-  RFCNB_CvtPad_Name(Called_Name, (sess_pkt + RFCNB_Pkt_Called_Offset));
-  RFCNB_CvtPad_Name(Calling_Name, (sess_pkt + RFCNB_Pkt_Calling_Offset));
+    RFCNB_CvtPad_Name(Called_Name, (sess_pkt + RFCNB_Pkt_Called_Offset));
+    RFCNB_CvtPad_Name(Calling_Name, (sess_pkt + RFCNB_Pkt_Calling_Offset));
 
-  /* Now send the packet */
+    /* Now send the packet */
 
 #ifdef RFCNB_DEBUG
 
-  fprintf(stderr, "Sending packet: ");
-  
+    fprintf(stderr, "Sending packet: ");
+
 #endif
 
-  if ((len = RFCNB_Put_Pkt(con, pkt, RFCNB_Pkt_Sess_Len)) < 0) {
+    if ((len = RFCNB_Put_Pkt(con, pkt, RFCNB_Pkt_Sess_Len)) < 0) {
 
-    return(RFCNBE_Bad);       /* Should be able to write that lot ... */
+	return (RFCNBE_Bad);	/* Should be able to write that lot ... */
 
     }
-
 #ifdef RFCNB_DEBUG
 
-  fprintf(stderr, "Getting packet.\n");
+    fprintf(stderr, "Getting packet.\n");
 
 #endif
 
-  res_pkt.data = resp;
-  res_pkt.len  = sizeof(resp);
-  res_pkt.next = NULL;
+    res_pkt.data = resp;
+    res_pkt.len = sizeof(resp);
+    res_pkt.next = NULL;
 
-  if ((len = RFCNB_Get_Pkt(con, &res_pkt, sizeof(resp))) < 0) {
+    if ((len = RFCNB_Get_Pkt(con, &res_pkt, sizeof(resp))) < 0) {
 
-    return(RFCNBE_Bad);
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  /* Now analyze the packet ... */
+    /* Now analyze the packet ... */
 
-  switch (RFCNB_Pkt_Type(resp)) {
+    switch (RFCNB_Pkt_Type(resp)) {
 
-    case RFCNB_SESSION_REJ:         /* Didnt like us ... too bad */
+    case RFCNB_SESSION_REJ:	/* Didnt like us ... too bad */
 
-      /* Why did we get rejected ? */
-    
-      switch (CVAL(resp,RFCNB_Pkt_Error_Offset)) {
+	/* Why did we get rejected ? */
 
-      case 0x80: 
-	RFCNB_errno = RFCNBE_CallRejNLOCN;
-	break;
-      case 0x81:
-	RFCNB_errno = RFCNBE_CallRejNLFCN;
-	break;
-      case 0x82:
-	RFCNB_errno = RFCNBE_CallRejCNNP;
-	break;
-      case 0x83:
-	RFCNB_errno = RFCNBE_CallRejInfRes;
-	break;
-      case 0x8F:
-	RFCNB_errno = RFCNBE_CallRejUnSpec;
-	break;
-      default:
-	RFCNB_errno = RFCNBE_ProtErr;
-	break;
-      }
+	switch (CVAL(resp, RFCNB_Pkt_Error_Offset)) {
+
+	case 0x80:
+	    RFCNB_errno = RFCNBE_CallRejNLOCN;
+	    break;
+	case 0x81:
+	    RFCNB_errno = RFCNBE_CallRejNLFCN;
+	    break;
+	case 0x82:
+	    RFCNB_errno = RFCNBE_CallRejCNNP;
+	    break;
+	case 0x83:
+	    RFCNB_errno = RFCNBE_CallRejInfRes;
+	    break;
+	case 0x8F:
+	    RFCNB_errno = RFCNBE_CallRejUnSpec;
+	    break;
+	default:
+	    RFCNB_errno = RFCNBE_ProtErr;
+	    break;
+	}
 
-      return(RFCNBE_Bad);
-      break;
+	return (RFCNBE_Bad);
+	break;
 
-    case RFCNB_SESSION_ACK:        /* Got what we wanted ...      */
+    case RFCNB_SESSION_ACK:	/* Got what we wanted ...      */
 
-      return(0);
-      break;
+	return (0);
+	break;
 
-    case RFCNB_SESSION_RETARGET:   /* Go elsewhere                */
+    case RFCNB_SESSION_RETARGET:	/* Go elsewhere                */
 
-      *redirect = TRUE;       /* Copy port and ip addr       */
+	*redirect = TRUE;	/* Copy port and ip addr       */
 
-      memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct in_addr));
-      *port = SVAL(resp, RFCNB_Pkt_Port_Offset);
+	memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct in_addr));
+	*port = SVAL(resp, RFCNB_Pkt_Port_Offset);
 
-      return(0);
-      break;
+	return (0);
+	break;
 
-    default:  /* A protocol error */
+    default:			/* A protocol error */
 
-      RFCNB_errno = RFCNBE_ProtErr;
-      return(RFCNBE_Bad);
-      break;
+	RFCNB_errno = RFCNBE_ProtErr;
+	return (RFCNBE_Bad);
+	break;
     }
 }
-
-
-
-
-
-
-
-
-
Index: squid/auth_modules/MSNT/rfcnb-util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb-util.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/rfcnb-util.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb-util.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Utility Defines
 
@@ -29,11 +28,11 @@
 
 void RFCNB_NBName_To_AName(char *NBName, char *AName);
 
-void RFCNB_Print_Hex(FILE *fd, struct RFCNB_Pkt *pkt, int Offset, int Len);
+void RFCNB_Print_Hex(FILE * fd, struct RFCNB_Pkt *pkt, int Offset, int Len);
 
 struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n);
 
-void RFCNB_Print_Pkt(FILE *fd, char *dirn, struct RFCNB_Pkt *pkt, int len);
+void RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len);
 
 int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP);
 
@@ -41,10 +40,6 @@
 
 int RFCNB_IP_Connect(struct in_addr Dest_IP, int port);
 
-int RFCNB_Session_Req(struct RFCNB_Con *con, 
-		      char *Called_Name, 
-		      char *Calling_Name,
-		      BOOL *redirect,
-		      struct in_addr *Dest_IP,
-		      int * port);
-
+int RFCNB_Session_Req(struct RFCNB_Con *con,
+    char *Called_Name,
+    char *Calling_Name, BOOL * redirect, struct in_addr *Dest_IP, int *port);
Index: squid/auth_modules/MSNT/rfcnb.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/rfcnb.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.62.1
diff -u -r1.1.1.1 -r1.1.1.1.62.1
--- squid/auth_modules/MSNT/rfcnb.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/rfcnb.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.62.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    RFCNB Defines
 
@@ -35,7 +34,7 @@
 /* Definition of routines we define */
 
 void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
-		 int port);
+    int port);
 
 int RFCNB_Send(void *Con_Handle, struct RFCNB_Pkt *Data, int Length);
 
Index: squid/auth_modules/MSNT/session.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/session.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/session.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/session.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX RFCNB (RFC1001/RFC1002) NetBIOS implementation
-
    Version 1.0
    Session Routines ...
 
@@ -34,7 +33,7 @@
 
 int RFCNB_Stats[RFCNB_MAX_STATS];
 
-void (*Prot_Print_Routine)() = NULL;      /* Pointer to print routine */
+void (*Prot_Print_Routine) () = NULL;	/* Pointer to print routine */
 
 /* Set up a session with a remote name. We are passed Called_Name as a
    string which we convert to a NetBIOS name, ie space terminated, up to
@@ -43,123 +42,128 @@
    Address can be a DNS based name, or a TCP/IP address ...
 */
 
-void *RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
-		 int port)
+void *
+RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
+    int port)
 
-{ struct RFCNB_Con *con;
-  struct in_addr Dest_IP;
-  int Client;
-  BOOL redirect; struct redirect_addr *redir_addr;
-  char *Service_Address;
+{
+    struct RFCNB_Con *con;
+    struct in_addr Dest_IP;
+    int Client;
+    BOOL redirect;
+    struct redirect_addr *redir_addr;
+    char *Service_Address;
 
-  /* Now, we really should look up the port in /etc/services ... */
+    /* Now, we really should look up the port in /etc/services ... */
 
-  if (port == 0) port = RFCNB_Default_Port;
+    if (port == 0)
+	port = RFCNB_Default_Port;
 
-  /* Create a connection structure first */
+    /* Create a connection structure first */
 
-  if ((con = (struct RFCNB_Con *)malloc(sizeof(struct RFCNB_Con))) == NULL) { /* Error in size */
+    if ((con = (struct RFCNB_Con *) malloc(sizeof(struct RFCNB_Con))) == NULL) {	/* Error in size */
 
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(NULL);
+	RFCNB_errno = RFCNBE_NoSpace;
+	RFCNB_saved_errno = errno;
+	return (NULL);
 
     }
- 
-  con -> fd = -0;             /* no descriptor yet */
-  con -> rfc_errno = 0;           /* no error yet */
-  con -> timeout = 0;         /* no timeout   */
-  con -> redirects = 0;
-  con -> redirect_list = NULL; /* Fix bug still in version 0.50 */
 
-  /* Resolve that name into an IP address */
-
-  Service_Address = Called_Name;
-  if (strcmp(Called_Address, "") != 0) { /* If the Called Address = "" */
-    Service_Address = Called_Address;
-  }
+    con->fd = -0;		/* no descriptor yet */
+    con->rfc_errno = 0;		/* no error yet */
+    con->timeout = 0;		/* no timeout   */
+    con->redirects = 0;
+    con->redirect_list = NULL;	/* Fix bug still in version 0.50 */
+
+    /* Resolve that name into an IP address */
+
+    Service_Address = Called_Name;
+    if (strcmp(Called_Address, "") != 0) {	/* If the Called Address = "" */
+	Service_Address = Called_Address;
+    }
 
-  if ((errno = RFCNB_Name_To_IP(Service_Address, &Dest_IP)) < 0) { /* Error */
+    if ((errno = RFCNB_Name_To_IP(Service_Address, &Dest_IP)) < 0) {	/* Error */
 
-    /* No need to modify RFCNB_errno as it was done by RFCNB_Name_To_IP */
+	/* No need to modify RFCNB_errno as it was done by RFCNB_Name_To_IP */
 
-    return(NULL);
+	return (NULL);
 
     }
 
-  /* Now connect to the remote end */
+    /* Now connect to the remote end */
 
-  redirect = TRUE;     /* Fudge this one so we go once through */
+    redirect = TRUE;		/* Fudge this one so we go once through */
 
-  while (redirect) {   /* Connect and get session info etc */
+    while (redirect) {		/* Connect and get session info etc */
 
-    redirect = FALSE;  /* Assume all OK */
+	redirect = FALSE;	/* Assume all OK */
 
-    /* Build the redirect info. First one is first addr called */
-    /* And tack it onto the list of addresses we called        */
+	/* Build the redirect info. First one is first addr called */
+	/* And tack it onto the list of addresses we called        */
 
-    if ((redir_addr = (struct redirect_addr *)malloc(sizeof(struct redirect_addr))) == NULL) { /* Could not get space */
-      
-      RFCNB_errno = RFCNBE_NoSpace;
-      RFCNB_saved_errno = errno;
-      return(NULL);
+	if ((redir_addr =
+		(struct redirect_addr *) malloc(sizeof(struct redirect_addr)))
+	    == NULL) {		/* Could not get space */
 
-    }
+	    RFCNB_errno = RFCNBE_NoSpace;
+	    RFCNB_saved_errno = errno;
+	    return (NULL);
 
-    memcpy((char *)&(redir_addr -> ip_addr), (char *)&Dest_IP, sizeof(Dest_IP));
-    redir_addr -> port = port;
-    redir_addr -> next = NULL;
+	}
 
-    if (con -> redirect_list == NULL) { /* Stick on head */
+	memcpy((char *) &(redir_addr->ip_addr), (char *) &Dest_IP,
+	    sizeof(Dest_IP));
+	redir_addr->port = port;
+	redir_addr->next = NULL;
 
-      con -> redirect_list = con -> last_addr = redir_addr;
+	if (con->redirect_list == NULL) {	/* Stick on head */
 
-    } else {
+	    con->redirect_list = con->last_addr = redir_addr;
 
-      con -> last_addr -> next = redir_addr;
-      con -> last_addr = redir_addr;
+	} else {
 
-    }
+	    con->last_addr->next = redir_addr;
+	    con->last_addr = redir_addr;
+
+	}
 
-    /* Now, make that connection */
+	/* Now, make that connection */
 
-    if ((Client = RFCNB_IP_Connect(Dest_IP, port)) < 0) { /* Error */
+	if ((Client = RFCNB_IP_Connect(Dest_IP, port)) < 0) {	/* Error */
 
-      /* No need to modify RFCNB_errno as it was done by RFCNB_IP_Connect */
+	    /* No need to modify RFCNB_errno as it was done by RFCNB_IP_Connect */
 
-      return(NULL);
+	    return (NULL);
 
-      }
+	}
 
-    con -> fd = Client;
+	con->fd = Client;
 
-    /* Now send and handle the RFCNB session request              */
-    /* If we get a redirect, we will comeback with redirect true 
-       and a new IP address in DEST_IP                            */
+	/* Now send and handle the RFCNB session request              */
+	/* If we get a redirect, we will comeback with redirect true 
+	 * and a new IP address in DEST_IP                            */
 
-    if ((errno = RFCNB_Session_Req(con, 
-				   Called_Name,
-   				   Calling_Name,
-				   &redirect, &Dest_IP, &port)) < 0) {
+	if ((errno = RFCNB_Session_Req(con,
+		    Called_Name, Calling_Name, &redirect, &Dest_IP, &port)) < 0) {
 
-      /* No need to modify RFCNB_errno as it was done by RFCNB_Session.. */
+	    /* No need to modify RFCNB_errno as it was done by RFCNB_Session.. */
 
-      return(NULL);
+	    return (NULL);
 
-      }
+	}
 
-    if (redirect) {
+	if (redirect) {
 
-      /* We have to close the connection, and then try again */
+	    /* We have to close the connection, and then try again */
 
-      (con -> redirects)++;
+	    (con->redirects)++;
 
-      RFCNB_Close(con -> fd);  /* Close it */
+	    RFCNB_Close(con->fd);	/* Close it */
 
-      }
+	}
     }
 
-  return(con);
+    return (con);
 
 }
 
@@ -167,133 +171,138 @@
    data as a series of pointers to blocks of data ... we should check the
    length ... */
 
-int RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length)
-
-{ struct RFCNB_Pkt *pkt; char *hdr;
-  int len;
+int
+RFCNB_Send(struct RFCNB_Con *Con_Handle, struct RFCNB_Pkt *udata, int Length)
+{
+    struct RFCNB_Pkt *pkt;
+    char *hdr;
+    int len;
 
-  /* Plug in the header and send the data */
+    /* Plug in the header and send the data */
 
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
+    pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
 
-  if (pkt == NULL) {
+    if (pkt == NULL) {
 
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
+	RFCNB_errno = RFCNBE_NoSpace;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  pkt -> next = udata;   /* The user data we want to send */
+    pkt->next = udata;		/* The user data we want to send */
 
-  hdr = pkt -> data;
+    hdr = pkt->data;
 
-  /* Following crap is for portability across multiple UNIX machines */
+    /* Following crap is for portability across multiple UNIX machines */
 
-  *(hdr + RFCNB_Pkt_Type_Offset)  = RFCNB_SESSION_MESSAGE;
-  RFCNB_Put_Pkt_Len(hdr, Length);
+    *(hdr + RFCNB_Pkt_Type_Offset) = RFCNB_SESSION_MESSAGE;
+    RFCNB_Put_Pkt_Len(hdr, Length);
 
 #ifdef RFCNB_DEBUG
 
-  fprintf(stderr, "Sending packet: ");
-  
+    fprintf(stderr, "Sending packet: ");
+
 #endif
 
-  if ((len = RFCNB_Put_Pkt(Con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
+    if ((len = RFCNB_Put_Pkt(Con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
 
-    /* No need to change RFCNB_errno as it was done by put_pkt ...     */
+	/* No need to change RFCNB_errno as it was done by put_pkt ...     */
 
-    return(RFCNBE_Bad);   /* Should be able to write that lot ... */
-    
-  }
+	return (RFCNBE_Bad);	/* Should be able to write that lot ... */
 
-  /* Now we have sent that lot, let's get rid of the RFCNB Header and return */
+    }
+
+    /* Now we have sent that lot, let's get rid of the RFCNB Header and return */
 
-  pkt -> next = NULL;
+    pkt->next = NULL;
 
-  RFCNB_Free_Pkt(pkt);
+    RFCNB_Free_Pkt(pkt);
 
-  return(len);
+    return (len);
 
 }
 
 /* We pick up a message from the internet ... We have to worry about 
    non-message packets ...                                           */
 
-int RFCNB_Recv(void *con_Handle, struct RFCNB_Pkt *Data, int Length)
-
-{ struct RFCNB_Pkt *pkt; struct RFCNB_Hdr *hdr;
-  int ret_len;
-
-  if (con_Handle == NULL){
-
-    RFCNB_errno = RFCNBE_BadHandle;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
+int
+RFCNB_Recv(void *con_Handle, struct RFCNB_Pkt *Data, int Length)
+{
+    struct RFCNB_Pkt *pkt;
+    struct RFCNB_Hdr *hdr;
+    int ret_len;
+
+    if (con_Handle == NULL) {
+
+	RFCNB_errno = RFCNBE_BadHandle;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  /* Now get a packet from below. We allocate a header first */
+    /* Now get a packet from below. We allocate a header first */
 
-  /* Plug in the header and send the data */
+    /* Plug in the header and send the data */
 
-  pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
+    pkt = RFCNB_Alloc_Pkt(RFCNB_Pkt_Hdr_Len);
 
-  if (pkt == NULL) {
+    if (pkt == NULL) {
 
-    RFCNB_errno = RFCNBE_NoSpace;
-    RFCNB_saved_errno = errno;
-    return(RFCNBE_Bad);
+	RFCNB_errno = RFCNBE_NoSpace;
+	RFCNB_saved_errno = errno;
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  pkt -> next = Data;  /* Plug in the data portion */
+    pkt->next = Data;		/* Plug in the data portion */
 
-  if ((ret_len = RFCNB_Get_Pkt(con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
+    if ((ret_len =
+	    RFCNB_Get_Pkt(con_Handle, pkt, Length + RFCNB_Pkt_Hdr_Len)) < 0) {
 
 #ifdef RFCNB_DEBUG
-    fprintf(stderr, "Bad packet return in RFCNB_Recv... \n");
+	fprintf(stderr, "Bad packet return in RFCNB_Recv... \n");
 #endif
 
-    return(RFCNBE_Bad);
+	return (RFCNBE_Bad);
 
-  }
+    }
 
-  /* We should check that we go a message and not a keep alive */
+    /* We should check that we go a message and not a keep alive */
 
-  pkt -> next = NULL;
+    pkt->next = NULL;
 
-  RFCNB_Free_Pkt(pkt);
+    RFCNB_Free_Pkt(pkt);
 
-  return(ret_len);
+    return (ret_len);
 
 }
 
 /* We just disconnect from the other end, as there is nothing in the RFCNB */
 /* protocol that specifies any exchange as far as I can see                */
 
-int RFCNB_Hangup(struct RFCNB_Con *con_Handle)
-
+int
+RFCNB_Hangup(struct RFCNB_Con *con_Handle)
 {
 
-  if (con_Handle != NULL) {
-    RFCNB_Close(con_Handle -> fd);  /* Could this fail? */
-    free(con_Handle);
-  }
+    if (con_Handle != NULL) {
+	RFCNB_Close(con_Handle->fd);	/* Could this fail? */
+	free(con_Handle);
+    }
 
-  return 0;
+    return 0;
 
 
 }
 
 /* Set TCP_NODELAY on the socket                                          */
 
-int RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, BOOL yn)
-
+int
+RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, BOOL yn)
 {
 
-  return(setsockopt(con_Handle -> fd, IPPROTO_TCP, TCP_NODELAY, 
-		    (char *)&yn, sizeof(yn)));
+    return (setsockopt(con_Handle->fd, IPPROTO_TCP, TCP_NODELAY,
+	    (char *) &yn, sizeof(yn)));
 
 }
 
@@ -301,8 +310,8 @@
 /* Listen for a connection on a port???, when                             */
 /* the connection comes in, we return with the connection                 */
 
-void *RFCNB_Listen()
-
+void *
+RFCNB_Listen()
 {
 
 }
@@ -310,56 +319,55 @@
 /* Pick up the last error response as a string, hmmm, this routine should */
 /* have been different ...                                                */
 
-void RFCNB_Get_Error(char *buffer, int buf_len)
-
+void
+RFCNB_Get_Error(char *buffer, int buf_len)
 {
 
-  if (RFCNB_saved_errno <= 0) {
-    sprintf(buffer, "%s", RFCNB_Error_Strings[RFCNB_errno]);
-  }
-  else {
-    sprintf(buffer, "%s\n\terrno:%s", RFCNB_Error_Strings[RFCNB_errno],
+    if (RFCNB_saved_errno <= 0) {
+	sprintf(buffer, "%s", RFCNB_Error_Strings[RFCNB_errno]);
+    } else {
+	sprintf(buffer, "%s\n\terrno:%s", RFCNB_Error_Strings[RFCNB_errno],
 	    strerror(RFCNB_saved_errno));
-  }
+    }
 
 }
 
 /* Pick up the last error response and returns as a code                 */
 
-int RFCNB_Get_Last_Error()
-
+int
+RFCNB_Get_Last_Error()
 {
 
-  return(RFCNB_errno);
+    return (RFCNB_errno);
 
 }
 
 /* Pick up saved errno as well */
 
-int RFCNB_Get_Last_Errno()
-
+int
+RFCNB_Get_Last_Errno()
 {
 
-  return(RFCNB_saved_errno);
+    return (RFCNB_saved_errno);
 
 }
 
 /* Pick up the last error response and return in string ...             */
 
-int RFCNB_Get_Error_Msg(int code, char *msg_buf, int len)
-
+int
+RFCNB_Get_Error_Msg(int code, char *msg_buf, int len)
 {
 
-  strncpy(msg_buf, RFCNB_Error_Strings[abs(code)], len);
+    strncpy(msg_buf, RFCNB_Error_Strings[abs(code)], len);
 
 }
 
 /* Register a higher level protocol print routine */
 
-void RFCNB_Register_Print_Routine(void (*fn)())
-
+void
+RFCNB_Register_Print_Routine(void (*fn) ())
 {
 
-  Prot_Print_Routine = fn;
+    Prot_Print_Routine = fn;
 
 }
Index: squid/auth_modules/MSNT/smbauth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smbauth.c,v
retrieving revision 1.1.1.1.4.2
retrieving revision 1.1.1.1.4.2.6.1
diff -u -r1.1.1.1.4.2 -r1.1.1.1.4.2.6.1
--- squid/auth_modules/MSNT/smbauth.c	22 May 2000 11:00:35 -0000	1.1.1.1.4.2
+++ squid/auth_modules/MSNT/smbauth.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.4.2.6.1
@@ -1,7 +1,5 @@
-
 /*
   msntauth
-
   Modified to act as a Squid authenticator module.
   Removed all Pike stuff.
   Returns OK for a successful authentication, or ERR upon error.
@@ -36,78 +34,75 @@
 #include <sys/time.h>
 #include "sitedef.h"
 
-extern void Checkforchange();       /* For signal() to find the function */
+extern void Checkforchange();	/* For signal() to find the function */
 
 /* Main program for simple authentication.
    Reads the denied user file. Sets alarm timer.
    Scans and checks for Squid input, and attempts to validate the user.
 */
 
-int main()
+int
+main()
 {
-  char username[256];
-  char password[256];
-  char wstr[256];
-  struct itimerval TimeOut;
-
-  /* Read denied user file. If it fails there is a serious problem.
-     Check syslog messages. Deny all users while in this state.
-     The process should then be killed. */
-
-  if (Read_denyusers() == 1)
-  {
-     while (1)
-     {
-       fgets(wstr, 255, stdin);
-       puts("ERR");
-       fflush(stdout);
-     }
-  }
-
-  /* An alarm timer is used to check the denied user file for changes
-     every minute. Reload the file if it has changed. */ 
-
-  TimeOut.it_interval.tv_sec = 60;
-  TimeOut.it_interval.tv_usec = 0;
-  TimeOut.it_value.tv_sec = 60;
-  TimeOut.it_value.tv_usec = 0;
-  setitimer(ITIMER_REAL, &TimeOut, 0);
-  signal(SIGALRM, Checkforchange);
-  signal(SIGHUP, Checkforchange);
-
-  while (1)
-  {
-    /* Read whole line from standard input. Terminate on break. */
-    if (fgets(wstr, 255, stdin) == NULL)    
-       break;
-
-    /* Clear any current settings */
-    username[0] = '\0';
-    password[0] = '\0';
-    sscanf(wstr, "%s %s", username, password);     /* Extract parameters */
-
-    /* Check for invalid or blank entries */
-    if ((username[0] == '\0') || (password[0] == '\0'))
-  {
-       puts("ERR");
-       fflush(stdout);
-       continue;
+    char username[256];
+    char password[256];
+    char wstr[256];
+    struct itimerval TimeOut;
+
+    /* Read denied user file. If it fails there is a serious problem.
+     * Check syslog messages. Deny all users while in this state.
+     * The process should then be killed. */
+
+    if (Read_denyusers() == 1) {
+	while (1) {
+	    fgets(wstr, 255, stdin);
+	    puts("ERR");
+	    fflush(stdout);
+	}
     }
 
-    if (Check_user(username) == 1)            /* Check if user is denied */
-        puts("ERR");
-    else
-    {
-    if (Valid_User(username, password, PRIMARY_DC, BACKUP_DC, NTDOMAIN) == 0)
-       puts("OK");
-    else
-       puts("ERR");
-  }
-
-    fflush(stdout);
-  }
-  
-  return 0;
+    /* An alarm timer is used to check the denied user file for changes
+     * every minute. Reload the file if it has changed. */
+
+    TimeOut.it_interval.tv_sec = 60;
+    TimeOut.it_interval.tv_usec = 0;
+    TimeOut.it_value.tv_sec = 60;
+    TimeOut.it_value.tv_usec = 0;
+    setitimer(ITIMER_REAL, &TimeOut, 0);
+    signal(SIGALRM, Checkforchange);
+    signal(SIGHUP, Checkforchange);
+
+    while (1) {
+	/* Read whole line from standard input. Terminate on break. */
+	if (fgets(wstr, 255, stdin) == NULL)
+	    break;
+
+	/* Clear any current settings */
+	username[0] = '\0';
+	password[0] = '\0';
+	sscanf(wstr, "%s %s", username, password);	/* Extract parameters */
+
+	/* Check for invalid or blank entries */
+	if ((username[0] == '\0') || (password[0] == '\0')) {
+	    puts("ERR");
+	    fflush(stdout);
+	    continue;
+	}
+
+	if (Check_user(username) == 1)	/* Check if user is denied */
+	    puts("ERR");
+	else {
+	    if (Valid_User(username, password, PRIMARY_DC, BACKUP_DC,
+		    NTDOMAIN) == 0)
+		puts("OK");
+	    else
+		puts("ERR");
+	}
+
+	fflush(stdout);
+    }
+
+    return 0;
 }
 
 /* Valid_User return codes -
@@ -117,4 +112,3 @@
    2 - Protocol error.
    3 - Logon error; Incorrect password or username given.
 */
-
Index: squid/auth_modules/MSNT/smbdes.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smbdes.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.62.1
diff -u -r1.1.1.1 -r1.1.1.1.62.1
--- squid/auth_modules/MSNT/smbdes.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smbdes.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.62.1
@@ -47,291 +47,308 @@
 
 
 
-static int perm1[56] = {57, 49, 41, 33, 25, 17,  9,
-			 1, 58, 50, 42, 34, 26, 18,
-			10,  2, 59, 51, 43, 35, 27,
-			19, 11,  3, 60, 52, 44, 36,
-			63, 55, 47, 39, 31, 23, 15,
-			 7, 62, 54, 46, 38, 30, 22,
-			14,  6, 61, 53, 45, 37, 29,
-			21, 13,  5, 28, 20, 12,  4};
-
-static int perm2[48] = {14, 17, 11, 24,  1,  5,
-                         3, 28, 15,  6, 21, 10,
-                        23, 19, 12,  4, 26,  8,
-                        16,  7, 27, 20, 13,  2,
-                        41, 52, 31, 37, 47, 55,
-                        30, 40, 51, 45, 33, 48,
-                        44, 49, 39, 56, 34, 53,
-                        46, 42, 50, 36, 29, 32};
-
-static int perm3[64] = {58, 50, 42, 34, 26, 18, 10,  2,
-			60, 52, 44, 36, 28, 20, 12,  4,
-			62, 54, 46, 38, 30, 22, 14,  6,
-			64, 56, 48, 40, 32, 24, 16,  8,
-			57, 49, 41, 33, 25, 17,  9,  1,
-			59, 51, 43, 35, 27, 19, 11,  3,
-			61, 53, 45, 37, 29, 21, 13,  5,
-			63, 55, 47, 39, 31, 23, 15,  7};
-
-static int perm4[48] = {   32,  1,  2,  3,  4,  5,
-                            4,  5,  6,  7,  8,  9,
-                            8,  9, 10, 11, 12, 13,
-                           12, 13, 14, 15, 16, 17,
-                           16, 17, 18, 19, 20, 21,
-                           20, 21, 22, 23, 24, 25,
-                           24, 25, 26, 27, 28, 29,
-                           28, 29, 30, 31, 32,  1};
-
-static int perm5[32] = {      16,  7, 20, 21,
-                              29, 12, 28, 17,
-                               1, 15, 23, 26,
-                               5, 18, 31, 10,
-                               2,  8, 24, 14,
-                              32, 27,  3,  9,
-                              19, 13, 30,  6,
-                              22, 11,  4, 25};
-
-
-static int perm6[64] ={ 40,  8, 48, 16, 56, 24, 64, 32,
-                        39,  7, 47, 15, 55, 23, 63, 31,
-                        38,  6, 46, 14, 54, 22, 62, 30,
-                        37,  5, 45, 13, 53, 21, 61, 29,
-                        36,  4, 44, 12, 52, 20, 60, 28,
-                        35,  3, 43, 11, 51, 19, 59, 27,
-                        34,  2, 42, 10, 50, 18, 58, 26,
-                        33,  1, 41,  9, 49, 17, 57, 25};
+static int perm1[56] = { 57, 49, 41, 33, 25, 17, 9,
+    1, 58, 50, 42, 34, 26, 18,
+    10, 2, 59, 51, 43, 35, 27,
+    19, 11, 3, 60, 52, 44, 36,
+    63, 55, 47, 39, 31, 23, 15,
+    7, 62, 54, 46, 38, 30, 22,
+    14, 6, 61, 53, 45, 37, 29,
+    21, 13, 5, 28, 20, 12, 4
+};
+
+static int perm2[48] = { 14, 17, 11, 24, 1, 5,
+    3, 28, 15, 6, 21, 10,
+    23, 19, 12, 4, 26, 8,
+    16, 7, 27, 20, 13, 2,
+    41, 52, 31, 37, 47, 55,
+    30, 40, 51, 45, 33, 48,
+    44, 49, 39, 56, 34, 53,
+    46, 42, 50, 36, 29, 32
+};
+
+static int perm3[64] = { 58, 50, 42, 34, 26, 18, 10, 2,
+    60, 52, 44, 36, 28, 20, 12, 4,
+    62, 54, 46, 38, 30, 22, 14, 6,
+    64, 56, 48, 40, 32, 24, 16, 8,
+    57, 49, 41, 33, 25, 17, 9, 1,
+    59, 51, 43, 35, 27, 19, 11, 3,
+    61, 53, 45, 37, 29, 21, 13, 5,
+    63, 55, 47, 39, 31, 23, 15, 7
+};
+
+static int perm4[48] = { 32, 1, 2, 3, 4, 5,
+    4, 5, 6, 7, 8, 9,
+    8, 9, 10, 11, 12, 13,
+    12, 13, 14, 15, 16, 17,
+    16, 17, 18, 19, 20, 21,
+    20, 21, 22, 23, 24, 25,
+    24, 25, 26, 27, 28, 29,
+    28, 29, 30, 31, 32, 1
+};
+
+static int perm5[32] = { 16, 7, 20, 21,
+    29, 12, 28, 17,
+    1, 15, 23, 26,
+    5, 18, 31, 10,
+    2, 8, 24, 14,
+    32, 27, 3, 9,
+    19, 13, 30, 6,
+    22, 11, 4, 25
+};
+
+
+static int perm6[64] = { 40, 8, 48, 16, 56, 24, 64, 32,
+    39, 7, 47, 15, 55, 23, 63, 31,
+    38, 6, 46, 14, 54, 22, 62, 30,
+    37, 5, 45, 13, 53, 21, 61, 29,
+    36, 4, 44, 12, 52, 20, 60, 28,
+    35, 3, 43, 11, 51, 19, 59, 27,
+    34, 2, 42, 10, 50, 18, 58, 26,
+    33, 1, 41, 9, 49, 17, 57, 25
+};
 
 
-static int sc[16] = {1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1};
+static int sc[16] = { 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 };
 
 static int sbox[8][4][16] = {
-	{{14,  4, 13,  1,  2, 15, 11,  8,  3, 10,  6, 12,  5,  9,  0,  7},
-	 {0, 15,  7,  4, 14,  2, 13,  1, 10,  6, 12, 11,  9,  5,  3,  8},
-	 {4,  1, 14,  8, 13,  6,  2, 11, 15, 12,  9,  7,  3, 10,  5,  0},
-	 {15, 12,  8,  2,  4,  9,  1,  7,  5, 11,  3, 14, 10,  0,  6, 13}},
+    {{14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7},
+	{0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8},
+	{4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0},
+	{15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13}},
+
+    {{15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10},
+	{3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5},
+	{0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15},
+	{13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9}},
+
+    {{10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8},
+	{13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1},
+	{13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7},
+	{1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12}},
+
+    {{7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15},
+	{13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9},
+	{10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4},
+	{3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14}},
+
+    {{2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9},
+	{14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6},
+	{4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14},
+	{11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3}},
+
+    {{12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11},
+	{10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8},
+	{9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6},
+	{4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13}},
+
+    {{4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1},
+	{13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6},
+	{1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2},
+	{6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12}},
+
+    {{13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7},
+	{1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2},
+	{7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8},
+	{2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11}}
+};
+
+static void
+permute(char *out, char *in, int *p, int n)
+{
+    int i;
+    for (i = 0; i < n; i++)
+	out[i] = in[p[i] - 1];
+}
+
+static void
+lshift(char *d, int count, int n)
+{
+    char out[64];
+    int i;
+    for (i = 0; i < n; i++)
+	out[i] = d[(i + count) % n];
+    for (i = 0; i < n; i++)
+	d[i] = out[i];
+}
+
+static void
+concat(char *out, char *in1, char *in2, int l1, int l2)
+{
+    while (l1--)
+	*out++ = *in1++;
+    while (l2--)
+	*out++ = *in2++;
+}
+
+static void
+xor(char *out, char *in1, char *in2, int n)
+{
+    int i;
+    for (i = 0; i < n; i++)
+	out[i] = in1[i] ^ in2[i];
+}
+
+static void
+dohash(char *out, char *in, char *key)
+{
+    int i, j, k;
+    char pk1[56];
+    char c[28];
+    char d[28];
+    char cd[56];
+    char ki[16][48];
+    char pd1[64];
+    char l[32], r[32];
+    char rl[64];
+
+    permute(pk1, key, perm1, 56);
+
+    for (i = 0; i < 28; i++)
+	c[i] = pk1[i];
+    for (i = 0; i < 28; i++)
+	d[i] = pk1[i + 28];
+
+    for (i = 0; i < 16; i++) {
+	lshift(c, sc[i], 28);
+	lshift(d, sc[i], 28);
+
+	concat(cd, c, d, 28, 28);
+	permute(ki[i], cd, perm2, 48);
+    }
+
+    permute(pd1, in, perm3, 64);
+
+    for (j = 0; j < 32; j++) {
+	l[j] = pd1[j];
+	r[j] = pd1[j + 32];
+    }
+
+    for (i = 0; i < 16; i++) {
+	char er[48];
+	char erk[48];
+	char b[8][6];
+	char cb[32];
+	char pcb[32];
+	char r2[32];
+
+	permute(er, r, perm4, 48);
+
+	xor(erk, er, ki[i], 48);
+
+	for (j = 0; j < 8; j++)
+	    for (k = 0; k < 6; k++)
+		b[j][k] = erk[j * 6 + k];
+
+	for (j = 0; j < 8; j++) {
+	    int m, n;
+	    m = (b[j][0] << 1) | b[j][5];
 
-	{{15,  1,  8, 14,  6, 11,  3,  4,  9,  7,  2, 13, 12,  0,  5, 10},
-	 {3, 13,  4,  7, 15,  2,  8, 14, 12,  0,  1, 10,  6,  9, 11,  5},
-	 {0, 14,  7, 11, 10,  4, 13,  1,  5,  8, 12,  6,  9,  3,  2, 15},
-	 {13,  8, 10,  1,  3, 15,  4,  2, 11,  6,  7, 12,  0,  5, 14,  9}},
+	    n = (b[j][1] << 3) | (b[j][2] << 2) | (b[j][3] << 1) | b[j][4];
 
-	{{10,  0,  9, 14,  6,  3, 15,  5,  1, 13, 12,  7, 11,  4,  2,  8},
-	 {13,  7,  0,  9,  3,  4,  6, 10,  2,  8,  5, 14, 12, 11, 15,  1},
-	 {13,  6,  4,  9,  8, 15,  3,  0, 11,  1,  2, 12,  5, 10, 14,  7},
-	 {1, 10, 13,  0,  6,  9,  8,  7,  4, 15, 14,  3, 11,  5,  2, 12}},
+	    for (k = 0; k < 4; k++)
+		b[j][k] = (sbox[j][m][n] & (1 << (3 - k))) ? 1 : 0;
+	}
 
-	{{7, 13, 14,  3,  0,  6,  9, 10,  1,  2,  8,  5, 11, 12,  4, 15},
-	 {13,  8, 11,  5,  6, 15,  0,  3,  4,  7,  2, 12,  1, 10, 14,  9},
-	 {10,  6,  9,  0, 12, 11,  7, 13, 15,  1,  3, 14,  5,  2,  8,  4},
-	 {3, 15,  0,  6, 10,  1, 13,  8,  9,  4,  5, 11, 12,  7,  2, 14}},
+	for (j = 0; j < 8; j++)
+	    for (k = 0; k < 4; k++)
+		cb[j * 4 + k] = b[j][k];
+	permute(pcb, cb, perm5, 32);
 
-	{{2, 12,  4,  1,  7, 10, 11,  6,  8,  5,  3, 15, 13,  0, 14,  9},
-	 {14, 11,  2, 12,  4,  7, 13,  1,  5,  0, 15, 10,  3,  9,  8,  6},
-	 {4,  2,  1, 11, 10, 13,  7,  8, 15,  9, 12,  5,  6,  3,  0, 14},
-	 {11,  8, 12,  7,  1, 14,  2, 13,  6, 15,  0,  9, 10,  4,  5,  3}},
+	xor(r2, l, pcb, 32);
 
-	{{12,  1, 10, 15,  9,  2,  6,  8,  0, 13,  3,  4, 14,  7,  5, 11},
-	 {10, 15,  4,  2,  7, 12,  9,  5,  6,  1, 13, 14,  0, 11,  3,  8},
-	 {9, 14, 15,  5,  2,  8, 12,  3,  7,  0,  4, 10,  1, 13, 11,  6},
-	 {4,  3,  2, 12,  9,  5, 15, 10, 11, 14,  1,  7,  6,  0,  8, 13}},
+	for (j = 0; j < 32; j++)
+	    l[j] = r[j];
 
-	{{4, 11,  2, 14, 15,  0,  8, 13,  3, 12,  9,  7,  5, 10,  6,  1},
-	 {13,  0, 11,  7,  4,  9,  1, 10, 14,  3,  5, 12,  2, 15,  8,  6},
-	 {1,  4, 11, 13, 12,  3,  7, 14, 10, 15,  6,  8,  0,  5,  9,  2},
-	 {6, 11, 13,  8,  1,  4, 10,  7,  9,  5,  0, 15, 14,  2,  3, 12}},
+	for (j = 0; j < 32; j++)
+	    r[j] = r2[j];
+    }
 
-	{{13,  2,  8,  4,  6, 15, 11,  1, 10,  9,  3, 14,  5,  0, 12,  7},
-	 {1, 15, 13,  8, 10,  3,  7,  4, 12,  5,  6, 11,  0, 14,  9,  2},
-	 {7, 11,  4,  1,  9, 12, 14,  2,  0,  6, 10, 13, 15,  3,  5,  8},
-	 {2,  1, 14,  7,  4, 10,  8, 13, 15, 12,  9,  0,  3,  5,  6, 11}}};
+    concat(rl, r, l, 32, 32);
 
-static void permute(char *out, char *in, int *p, int n)
-{
-	int i;
-	for (i=0;i<n;i++)
-		out[i] = in[p[i]-1];
+    permute(out, rl, perm6, 64);
 }
 
-static void lshift(char *d, int count, int n)
+static void
+str_to_key(unsigned char *str, unsigned char *key)
 {
-	char out[64];
-	int i;
-	for (i=0;i<n;i++)
-		out[i] = d[(i+count)%n];
-	for (i=0;i<n;i++)
-		d[i] = out[i];
-}
+    int i;
 
-static void concat(char *out, char *in1, char *in2, int l1, int l2)
-{
-	while (l1--)
-		*out++ = *in1++;
-	while (l2--)
-		*out++ = *in2++;
+    key[0] = str[0] >> 1;
+    key[1] = ((str[0] & 0x01) << 6) | (str[1] >> 2);
+    key[2] = ((str[1] & 0x03) << 5) | (str[2] >> 3);
+    key[3] = ((str[2] & 0x07) << 4) | (str[3] >> 4);
+    key[4] = ((str[3] & 0x0F) << 3) | (str[4] >> 5);
+    key[5] = ((str[4] & 0x1F) << 2) | (str[5] >> 6);
+    key[6] = ((str[5] & 0x3F) << 1) | (str[6] >> 7);
+    key[7] = str[6] & 0x7F;
+    for (i = 0; i < 8; i++) {
+	key[i] = (key[i] << 1);
+    }
 }
 
-static void xor(char *out, char *in1, char *in2, int n)
-{
-	int i;
-	for (i=0;i<n;i++)
-		out[i] = in1[i] ^ in2[i];
-}
 
-static void dohash(char *out, char *in, char *key)
+static void
+smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
 {
-	int i, j, k;
-	char pk1[56];
-	char c[28];
-	char d[28];
-	char cd[56];
-	char ki[16][48];
-	char pd1[64];
-	char l[32], r[32];
-	char rl[64];
-
-	permute(pk1, key, perm1, 56);
-
-	for (i=0;i<28;i++)
-		c[i] = pk1[i];
-	for (i=0;i<28;i++)
-		d[i] = pk1[i+28];
-
-	for (i=0;i<16;i++) {
-		lshift(c, sc[i], 28);
-		lshift(d, sc[i], 28);
-
-		concat(cd, c, d, 28, 28); 
-		permute(ki[i], cd, perm2, 48); 
-	}
-
-	permute(pd1, in, perm3, 64);
-
-	for (j=0;j<32;j++) {
-		l[j] = pd1[j];
-		r[j] = pd1[j+32];
-	}
-
-	for (i=0;i<16;i++) {
-		char er[48];
-		char erk[48];
-		char b[8][6];
-		char cb[32];
-		char pcb[32];
-		char r2[32];
-
-		permute(er, r, perm4, 48);
-
-		xor(erk, er, ki[i], 48);
-
-		for (j=0;j<8;j++)
-			for (k=0;k<6;k++)
-				b[j][k] = erk[j*6 + k];
-
-		for (j=0;j<8;j++) {
-			int m, n;
-			m = (b[j][0]<<1) | b[j][5];
-
-			n = (b[j][1]<<3) | (b[j][2]<<2) | (b[j][3]<<1) | b[j][4]; 
+    int i;
+    char outb[64];
+    char inb[64];
+    char keyb[64];
+    unsigned char key2[8];
 
-			for (k=0;k<4;k++) 
-				b[j][k] = (sbox[j][m][n] & (1<<(3-k)))?1:0; 
-		}
+    str_to_key(key, key2);
 
-		for (j=0;j<8;j++)
-			for (k=0;k<4;k++)
-				cb[j*4+k] = b[j][k];
-		permute(pcb, cb, perm5, 32);
+    for (i = 0; i < 64; i++) {
+	inb[i] = (in[i / 8] & (1 << (7 - (i % 8)))) ? 1 : 0;
+	keyb[i] = (key2[i / 8] & (1 << (7 - (i % 8)))) ? 1 : 0;
+	outb[i] = 0;
+    }
 
-		xor(r2, l, pcb, 32);
+    dohash(outb, inb, keyb);
 
-		for (j=0;j<32;j++)
-			l[j] = r[j];
+    for (i = 0; i < 8; i++) {
+	out[i] = 0;
+    }
 
-		for (j=0;j<32;j++)
-			r[j] = r2[j];
-	}
-
-	concat(rl, r, l, 32, 32);
-
-	permute(out, rl, perm6, 64);
+    for (i = 0; i < 64; i++) {
+	if (outb[i])
+	    out[i / 8] |= (1 << (7 - (i % 8)));
+    }
 }
 
-static void str_to_key(unsigned char *str,unsigned char *key)
+void
+E_P16(unsigned char *p14, unsigned char *p16)
 {
-	int i;
-
-	key[0] = str[0]>>1;
-	key[1] = ((str[0]&0x01)<<6) | (str[1]>>2);
-	key[2] = ((str[1]&0x03)<<5) | (str[2]>>3);
-	key[3] = ((str[2]&0x07)<<4) | (str[3]>>4);
-	key[4] = ((str[3]&0x0F)<<3) | (str[4]>>5);
-	key[5] = ((str[4]&0x1F)<<2) | (str[5]>>6);
-	key[6] = ((str[5]&0x3F)<<1) | (str[6]>>7);
-	key[7] = str[6]&0x7F;
-	for (i=0;i<8;i++) {
-		key[i] = (key[i]<<1);
-	}
+    unsigned char sp8[8] = { 0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 };
+    smbhash(p16, sp8, p14);
+    smbhash(p16 + 8, sp8, p14 + 7);
 }
 
-
-static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
+void
+E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
 {
-	int i;
-	char outb[64];
-	char inb[64];
-	char keyb[64];
-	unsigned char key2[8];
-
-	str_to_key(key, key2);
-
-	for (i=0;i<64;i++) {
-		inb[i] = (in[i/8] & (1<<(7-(i%8)))) ? 1 : 0;
-		keyb[i] = (key2[i/8] & (1<<(7-(i%8)))) ? 1 : 0;
-		outb[i] = 0;
-	}
-
-	dohash(outb, inb, keyb);
-
-	for (i=0;i<8;i++) {
-		out[i] = 0;
-	}
-
-	for (i=0;i<64;i++) {
-		if (outb[i])
-			out[i/8] |= (1<<(7-(i%8)));
-	}
+    smbhash(p24, c8, p21);
+    smbhash(p24 + 8, c8, p21 + 7);
+    smbhash(p24 + 16, c8, p21 + 14);
 }
 
-void E_P16(unsigned char *p14,unsigned char *p16)
+void
+cred_hash1(unsigned char *out, unsigned char *in, unsigned char *key)
 {
-	unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
-	smbhash(p16, sp8, p14);
-	smbhash(p16+8, sp8, p14+7);
-}
+    unsigned char buf[8];
 
-void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
-{
-	smbhash(p24, c8, p21);
-	smbhash(p24+8, c8, p21+7);
-	smbhash(p24+16, c8, p21+14);
+    smbhash(buf, in, key);
+    smbhash(out, buf, key + 9);
 }
 
-void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key)
+void
+cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key)
 {
-	unsigned char buf[8];
+    unsigned char buf[8];
+    static unsigned char key2[8];
 
-	smbhash(buf, in, key);
-	smbhash(out, buf, key+9);
+    smbhash(buf, in, key);
+    key2[0] = key[7];
+    smbhash(out, buf, key2);
 }
-
-void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
-{
-	unsigned char buf[8];
-	static unsigned char key2[8];
-
-	smbhash(buf, in, key);
-	key2[0] = key[7];
-	smbhash(out, buf, key2);
-}
-
Index: squid/auth_modules/MSNT/smbencrypt.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smbencrypt.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smbencrypt.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smbencrypt.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -33,33 +33,35 @@
 
 #include "byteorder.h"
 
-char *StrnCpy(char *dest,char *src,int n);
+char *StrnCpy(char *dest, char *src, int n);
 void strupper(char *s);
 
 /*
    This implements the X/Open SMB password encryption
    It takes a password, a 8 byte "crypt key" and puts 24 bytes of 
    encrypted password into p24 */
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void
+SMBencrypt(uchar * passwd, uchar * c8, uchar * p24)
 {
-  uchar p14[15], p21[21];
+    uchar p14[15], p21[21];
 
-  memset(p21,'\0',21);
-  memset(p14,'\0',14);
-  StrnCpy((char *)p14,(char *)passwd,14);
-
-  strupper((char *)p14);
-  E_P16(p14, p21); 
-  E_P24(p21, c8, p24);
+    memset(p21, '\0', 21);
+    memset(p14, '\0', 14);
+    StrnCpy((char *) p14, (char *) passwd, 14);
+
+    strupper((char *) p14);
+    E_P16(p14, p21);
+    E_P24(p21, c8, p24);
 }
 
 /* Routines for Windows NT MD4 Hash functions. */
-static int _my_wcslen(int16 *str)
+static int
+_my_wcslen(int16 * str)
 {
-	int len = 0;
-	while(*str++ != 0)
-		len++;
-	return len;
+    int len = 0;
+    while (*str++ != 0)
+	len++;
+    return len;
 }
 
 /*
@@ -68,129 +70,135 @@
  * this must be in intel (little-endian)
  * format.
  */
- 
-static int _my_mbstowcs(int16 *dst, uchar *src, int len)
+
+static int
+_my_mbstowcs(int16 * dst, uchar * src, int len)
 {
-	int i;
-	int16 val;
- 
-	for(i = 0; i < len; i++) {
-		val = *src;
-		SSVAL(dst,0,val);
-		dst++;
-		src++;
-		if(val == 0)
-			break;
-	}
-	return i;
+    int i;
+    int16 val;
+
+    for (i = 0; i < len; i++) {
+	val = *src;
+	SSVAL(dst, 0, val);
+	dst++;
+	src++;
+	if (val == 0)
+	    break;
+    }
+    return i;
 }
 
 /* 
  * Creates the MD4 Hash of the users password in NT UNICODE.
  */
- 
-void E_md4hash(uchar *passwd, uchar *p16)
+
+void
+E_md4hash(uchar * passwd, uchar * p16)
 {
-	int len;
-	int16 wpwd[129];
-	
-	/* Password cannot be longer than 128 characters */
-	len = strlen((char *)passwd);
-	if(len > 128)
-		len = 128;
-	/* Password must be converted to NT unicode */
-	_my_mbstowcs(wpwd, passwd, len);
-	wpwd[len] = 0; /* Ensure string is null terminated */
-	/* Calculate length in bytes */
-	len = _my_wcslen(wpwd) * sizeof(int16);
+    int len;
+    int16 wpwd[129];
 
-	mdfour(p16, (unsigned char *)wpwd, len);
+    /* Password cannot be longer than 128 characters */
+    len = strlen((char *) passwd);
+    if (len > 128)
+	len = 128;
+    /* Password must be converted to NT unicode */
+    _my_mbstowcs(wpwd, passwd, len);
+    wpwd[len] = 0;		/* Ensure string is null terminated */
+    /* Calculate length in bytes */
+    len = _my_wcslen(wpwd) * sizeof(int16);
+
+    mdfour(p16, (unsigned char *) wpwd, len);
 }
 
 /* Does the NT MD4 hash then des encryption. */
- 
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
+
+void
+SMBNTencrypt(uchar * passwd, uchar * c8, uchar * p24)
 {
-	uchar p21[21];
- 
-	memset(p21,'\0',21);
- 
-	E_md4hash(passwd, p21);    
-	E_P24(p21, c8, p24);
+    uchar p21[21];
+
+    memset(p21, '\0', 21);
+
+    E_md4hash(passwd, p21);
+    E_P24(p21, c8, p24);
 }
 
 /* Does both the NT and LM owfs of a user's password */
 
-void nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16)
+void
+nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16)
 {
-	char passwd[130];
-	StrnCpy(passwd, pwd, sizeof(passwd)-1);
+    char passwd[130];
+    StrnCpy(passwd, pwd, sizeof(passwd) - 1);
 
-	/* Calculate the MD4 hash (NT compatible) of the password */
-	memset(nt_p16, '\0', 16);
-	E_md4hash((uchar *)passwd, (uchar *)nt_p16);
+    /* Calculate the MD4 hash (NT compatible) of the password */
+    memset(nt_p16, '\0', 16);
+    E_md4hash((uchar *) passwd, (uchar *) nt_p16);
 
-	/* Mangle the passwords into Lanman format */
-	passwd[14] = '\0';
-	strupper(passwd);
+    /* Mangle the passwords into Lanman format */
+    passwd[14] = '\0';
+    strupper(passwd);
 
-	/* Calculate the SMB (lanman) hash functions of the password */
+    /* Calculate the SMB (lanman) hash functions of the password */
 
-	memset(p16, '\0', 16);
-	E_P16((uchar *) passwd, (uchar *)p16);
+    memset(p16, '\0', 16);
+    E_P16((uchar *) passwd, (uchar *) p16);
 
-	/* clear out local copy of user's password (just being paranoid). */
-	bzero(passwd, sizeof(passwd));
+    /* clear out local copy of user's password (just being paranoid). */
+    bzero(passwd, sizeof(passwd));
 }
 
 /****************************************************************************
 line strncpy but always null terminates. Make sure there is room!
 ****************************************************************************/
-char *StrnCpy(char *dest,char *src,int n)
+char *
+StrnCpy(char *dest, char *src, int n)
 {
-  char *d = dest;
-  if (!dest) return(NULL);
-  if (!src) {
-    *dest = 0;
-    return(dest);
-  }
-  while (n-- && (*d++ = *src++)) ;
-  *d = 0;
-  return(dest);
-}
-
-void strupper(char *s)
-{
-  while (*s)
-  {
-    /*
-#if !defined(KANJI_WIN95_COMPATIBILITY)
-    if(lp_client_code_page() == KANJI_CODEPAGE)
-    {
-      
-      if (is_shift_jis (*s))
-      {
-        if (is_sj_lower (s[0], s[1]))
-          s[1] = sj_toupper2 (s[1]);
-        s += 2;
-      }
-      else if (is_kana (*s))
-      {
-        s++;
-      }
-      else
-      {
-        if (islower(*s))                           
-	  *s = toupper(*s);
-        s++;
-      }
+    char *d = dest;
+    if (!dest)
+	return (NULL);
+    if (!src) {
+	*dest = 0;
+	return (dest);
     }
-    else
-#endif */ /* KANJI_WIN95_COMPATIBILITY */
-    {
-      if (islower(*s))
-        *s = toupper(*s);
-      s++;
+    while (n-- && (*d++ = *src++));
+    *d = 0;
+    return (dest);
+}
+
+void
+strupper(char *s)
+{
+    while (*s) {
+	/*
+	 * #if !defined(KANJI_WIN95_COMPATIBILITY)
+	 * if(lp_client_code_page() == KANJI_CODEPAGE)
+	 * {
+	 * 
+	 * if (is_shift_jis (*s))
+	 * {
+	 * if (is_sj_lower (s[0], s[1]))
+	 * s[1] = sj_toupper2 (s[1]);
+	 * s += 2;
+	 * }
+	 * else if (is_kana (*s))
+	 * {
+	 * s++;
+	 * }
+	 * else
+	 * {
+	 * if (islower(*s))                           
+	 * *s = toupper(*s);
+	 * s++;
+	 * }
+	 * }
+	 * else
+ * #endif *//* KANJI_WIN95_COMPATIBILITY */
+	{
+	    if (islower(*s))
+		*s = toupper(*s);
+	    s++;
+	}
     }
-  }
-}                      
+}
Index: squid/auth_modules/MSNT/smblib-common.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smblib-common.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smblib-common.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smblib-common.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX SMBlib NetBIOS implementation
-
    Version 1.0
    SMBlib Common Defines
 
@@ -73,7 +72,7 @@
 
 /* Server errors ... */
 
-#define SMBV_error          0x01         /* Generic error */
+#define SMBV_error          0x01	/* Generic error */
 #define SMBV_badpw          0x02
 #define SMBV_badtype        0x03
 #define SMBV_access         0x04
@@ -138,12 +137,12 @@
 
 /* Define the protocol types ... */
 
-#define SMB_P_Unknown      -1        /* Hmmm, is this smart? */
+#define SMB_P_Unknown      -1	/* Hmmm, is this smart? */
 #define SMB_P_Core         0
 #define SMB_P_CorePlus     1
 #define SMB_P_DOSLanMan1   2
 #define SMB_P_LanMan1      3
-#define SMB_P_DOSLanMan2   4 
+#define SMB_P_DOSLanMan2   4
 #define SMB_P_LanMan2      5
 #define SMB_P_DOSLanMan2_1 6
 #define SMB_P_LanMan2_1    7
@@ -158,27 +157,29 @@
 /* SMBlibE_ values >1 indicate local from SMBlib code errors?              */
 
 #define SMBlibE_Success 0
-#define SMBlibE_Remote  1    /* Remote error, get more info from con        */
+#define SMBlibE_Remote  1	/* Remote error, get more info from con        */
 #define SMBlibE_BAD     -1
-#define SMBlibE_LowerLayer 2 /* Lower layer error                           */
-#define SMBlibE_NotImpl 3    /* Function not yet implemented                */
-#define SMBlibE_ProtLow 4    /* Protocol negotiated does not support req    */
-#define SMBlibE_NoSpace 5    /* No space to allocate a structure            */
-#define SMBlibE_BadParam 6   /* Bad parameters                              */
-#define SMBlibE_NegNoProt 7  /* None of our protocols was liked             */
-#define SMBlibE_SendFailed 8 /* Sending an SMB failed                       */
-#define SMBlibE_RecvFailed 9 /* Receiving an SMB failed                     */
-#define SMBlibE_GuestOnly 10 /* Logged in as guest                          */
-#define SMBlibE_CallFailed 11 /* Call remote end failed                     */
-#define SMBlibE_ProtUnknown 12 /* Protocol unknown                          */
-#define SMBlibE_NoSuchMsg  13 /* Keep this up to date                       */
-
-typedef struct {                       /* A structure for a Dirent */
-
-  unsigned char resume_key[21];        /* Don't touch this          */
-  unsigned char file_attributes;       /* Attributes of file        */
-  unsigned int date_time;              /* date and time of last mod */
-  unsigned int size;
-  char filename[13];                   /* The name of the file      */
+#define SMBlibE_LowerLayer 2	/* Lower layer error                           */
+#define SMBlibE_NotImpl 3	/* Function not yet implemented                */
+#define SMBlibE_ProtLow 4	/* Protocol negotiated does not support req    */
+#define SMBlibE_NoSpace 5	/* No space to allocate a structure            */
+#define SMBlibE_BadParam 6	/* Bad parameters                              */
+#define SMBlibE_NegNoProt 7	/* None of our protocols was liked             */
+#define SMBlibE_SendFailed 8	/* Sending an SMB failed                       */
+#define SMBlibE_RecvFailed 9	/* Receiving an SMB failed                     */
+#define SMBlibE_GuestOnly 10	/* Logged in as guest                          */
+#define SMBlibE_CallFailed 11	/* Call remote end failed                     */
+#define SMBlibE_ProtUnknown 12	/* Protocol unknown                          */
+#define SMBlibE_NoSuchMsg  13	/* Keep this up to date                       */
+
+typedef struct
+{				/* A structure for a Dirent */
+
+    unsigned char resume_key[21];	/* Don't touch this          */
+    unsigned char file_attributes;	/* Attributes of file        */
+    unsigned int date_time;	/* date and time of last mod */
+    unsigned int size;
+    char filename[13];		/* The name of the file      */
 
-} SMB_CP_dirent;
+}
+SMB_CP_dirent;
Index: squid/auth_modules/MSNT/smblib-priv.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smblib-priv.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smblib-priv.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smblib-priv.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX SMBlib NetBIOS implementation
-
    Version 1.0
    SMBlib private Defines
 
@@ -29,106 +28,106 @@
 #include <unistd.h>
 
 typedef unsigned short uint16;
-typedef unsigned int   uint32;
+typedef unsigned int uint32;
 
-#include "byteorder.h"     /* Hmmm ... hot good */
+#include "byteorder.h"		/* Hmmm ... hot good */
 
 #define max(a,b) (a < b ? b : a)
 
-#define SMB_DEF_IDF 0x424D53FF        /* "\377SMB" */
- 
+#define SMB_DEF_IDF 0x424D53FF	/* "\377SMB" */
+
 /* Core protocol commands */
 
-#define SMBmkdir      0x00   /* create directory */
-#define SMBrmdir      0x01   /* delete directory */
-#define SMBopen       0x02   /* open file */
-#define SMBcreate     0x03   /* create file */
-#define SMBclose      0x04   /* close file */
-#define SMBflush      0x05   /* flush file */
-#define SMBunlink     0x06   /* delete file */
-#define SMBmv         0x07   /* rename file */
-#define SMBgetatr     0x08   /* get file attributes */
-#define SMBsetatr     0x09   /* set file attributes */
-#define SMBread       0x0A   /* read from file */
-#define SMBwrite      0x0B   /* write to file */
-#define SMBlock       0x0C   /* lock byte range */
-#define SMBunlock     0x0D   /* unlock byte range */
-#define SMBctemp      0x0E   /* create temporary file */
-#define SMBmknew      0x0F   /* make new file */
-#define SMBchkpth     0x10   /* check directory path */
-#define SMBexit       0x11   /* process exit */
-#define SMBlseek      0x12   /* seek */
-#define SMBtcon       0x70   /* tree connect */
-#define SMBtdis       0x71   /* tree disconnect */
-#define SMBnegprot    0x72   /* negotiate protocol */
-#define SMBdskattr    0x80   /* get disk attributes */
-#define SMBsearch     0x81   /* search directory */
-#define SMBsplopen    0xC0   /* open print spool file */
-#define SMBsplwr      0xC1   /* write to print spool file */
-#define SMBsplclose   0xC2   /* close print spool file */
-#define SMBsplretq    0xC3   /* return print queue */
-#define SMBsends      0xD0   /* send single block message */
-#define SMBsendb      0xD1   /* send broadcast message */
-#define SMBfwdname    0xD2   /* forward user name */
-#define SMBcancelf    0xD3   /* cancel forward */
-#define SMBgetmac     0xD4   /* get machine name */
-#define SMBsendstrt   0xD5   /* send start of multi-block message */
-#define SMBsendend    0xD6   /* send end of multi-block message */
-#define SMBsendtxt    0xD7   /* send text of multi-block message */
+#define SMBmkdir      0x00	/* create directory */
+#define SMBrmdir      0x01	/* delete directory */
+#define SMBopen       0x02	/* open file */
+#define SMBcreate     0x03	/* create file */
+#define SMBclose      0x04	/* close file */
+#define SMBflush      0x05	/* flush file */
+#define SMBunlink     0x06	/* delete file */
+#define SMBmv         0x07	/* rename file */
+#define SMBgetatr     0x08	/* get file attributes */
+#define SMBsetatr     0x09	/* set file attributes */
+#define SMBread       0x0A	/* read from file */
+#define SMBwrite      0x0B	/* write to file */
+#define SMBlock       0x0C	/* lock byte range */
+#define SMBunlock     0x0D	/* unlock byte range */
+#define SMBctemp      0x0E	/* create temporary file */
+#define SMBmknew      0x0F	/* make new file */
+#define SMBchkpth     0x10	/* check directory path */
+#define SMBexit       0x11	/* process exit */
+#define SMBlseek      0x12	/* seek */
+#define SMBtcon       0x70	/* tree connect */
+#define SMBtdis       0x71	/* tree disconnect */
+#define SMBnegprot    0x72	/* negotiate protocol */
+#define SMBdskattr    0x80	/* get disk attributes */
+#define SMBsearch     0x81	/* search directory */
+#define SMBsplopen    0xC0	/* open print spool file */
+#define SMBsplwr      0xC1	/* write to print spool file */
+#define SMBsplclose   0xC2	/* close print spool file */
+#define SMBsplretq    0xC3	/* return print queue */
+#define SMBsends      0xD0	/* send single block message */
+#define SMBsendb      0xD1	/* send broadcast message */
+#define SMBfwdname    0xD2	/* forward user name */
+#define SMBcancelf    0xD3	/* cancel forward */
+#define SMBgetmac     0xD4	/* get machine name */
+#define SMBsendstrt   0xD5	/* send start of multi-block message */
+#define SMBsendend    0xD6	/* send end of multi-block message */
+#define SMBsendtxt    0xD7	/* send text of multi-block message */
 
 /* CorePlus protocol                                        */
 
-#define SMBlockread   0x13  /* Lock a range and read it */
-#define SMBwriteunlock 0x14 /* Unlock a range and then write */
-#define SMBreadbraw   0x1a  /* read a block of data without smb header ohead*/
-#define SMBwritebraw  0x1d  /* write a block of data without smb header ohead*/
-#define SMBwritec     0x20  /* secondary write request */
-#define SMBwriteclose 0x2c  /* write a file and then close it */
+#define SMBlockread   0x13	/* Lock a range and read it */
+#define SMBwriteunlock 0x14	/* Unlock a range and then write */
+#define SMBreadbraw   0x1a	/* read a block of data without smb header ohead */
+#define SMBwritebraw  0x1d	/* write a block of data without smb header ohead */
+#define SMBwritec     0x20	/* secondary write request */
+#define SMBwriteclose 0x2c	/* write a file and then close it */
 
 /* DOS Extended Protocol                                    */
 
-#define SMBreadBraw      0x1A   /* read block raw */
-#define SMBreadBmpx      0x1B   /* read block multiplexed */
-#define SMBreadBs        0x1C   /* read block (secondary response) */
-#define SMBwriteBraw     0x1D   /* write block raw */
-#define SMBwriteBmpx     0x1E   /* write block multiplexed */
-#define SMBwriteBs       0x1F   /* write block (secondary request) */
-#define SMBwriteC        0x20   /* write complete response */
-#define SMBsetattrE      0x22   /* set file attributes expanded */
-#define SMBgetattrE      0x23   /* get file attributes expanded */
-#define SMBlockingX      0x24   /* lock/unlock byte ranges and X */
-#define SMBtrans         0x25   /* transaction - name, bytes in/out */
-#define SMBtranss        0x26   /* transaction (secondary request/response) */
-#define SMBioctl         0x27   /* IOCTL */
-#define SMBioctls        0x28   /* IOCTL  (secondary request/response) */
-#define SMBcopy          0x29   /* copy */
-#define SMBmove          0x2A   /* move */
-#define SMBecho          0x2B   /* echo */
-#define SMBopenX         0x2D   /* open and X */
-#define SMBreadX         0x2E   /* read and X */
-#define SMBwriteX        0x2F   /* write and X */
-#define SMBsesssetupX    0x73   /* Session Set Up & X (including User Logon) */
-#define SMBtconX         0x75   /* tree connect and X */
-#define SMBffirst        0x82   /* find first */
-#define SMBfunique       0x83   /* find unique */
-#define SMBfclose        0x84   /* find close */
-#define SMBinvalid       0xFE   /* invalid command */
+#define SMBreadBraw      0x1A	/* read block raw */
+#define SMBreadBmpx      0x1B	/* read block multiplexed */
+#define SMBreadBs        0x1C	/* read block (secondary response) */
+#define SMBwriteBraw     0x1D	/* write block raw */
+#define SMBwriteBmpx     0x1E	/* write block multiplexed */
+#define SMBwriteBs       0x1F	/* write block (secondary request) */
+#define SMBwriteC        0x20	/* write complete response */
+#define SMBsetattrE      0x22	/* set file attributes expanded */
+#define SMBgetattrE      0x23	/* get file attributes expanded */
+#define SMBlockingX      0x24	/* lock/unlock byte ranges and X */
+#define SMBtrans         0x25	/* transaction - name, bytes in/out */
+#define SMBtranss        0x26	/* transaction (secondary request/response) */
+#define SMBioctl         0x27	/* IOCTL */
+#define SMBioctls        0x28	/* IOCTL  (secondary request/response) */
+#define SMBcopy          0x29	/* copy */
+#define SMBmove          0x2A	/* move */
+#define SMBecho          0x2B	/* echo */
+#define SMBopenX         0x2D	/* open and X */
+#define SMBreadX         0x2E	/* read and X */
+#define SMBwriteX        0x2F	/* write and X */
+#define SMBsesssetupX    0x73	/* Session Set Up & X (including User Logon) */
+#define SMBtconX         0x75	/* tree connect and X */
+#define SMBffirst        0x82	/* find first */
+#define SMBfunique       0x83	/* find unique */
+#define SMBfclose        0x84	/* find close */
+#define SMBinvalid       0xFE	/* invalid command */
 
 /* Any more ? */
 
-#define SMBdatablockID     0x01  /* A data block identifier */
-#define SMBdialectID       0x02  /* A dialect id            */
-#define SMBpathnameID      0x03  /* A pathname ID           */
-#define SMBasciiID         0x04  /* An ascii string ID      */
-#define SMBvariableblockID 0x05  /* A variable block ID     */
+#define SMBdatablockID     0x01	/* A data block identifier */
+#define SMBdialectID       0x02	/* A dialect id            */
+#define SMBpathnameID      0x03	/* A pathname ID           */
+#define SMBasciiID         0x04	/* An ascii string ID      */
+#define SMBvariableblockID 0x05	/* A variable block ID     */
 
 /* some other defines we need */
 
 /* Flags defines ... */
 
-#define SMB_FLG2_NON_DOS    0x01 /* We know non dos names             */
-#define SMB_FLG2_EXT_ATR    0x02 /* We know about Extended Attributes */
-#define SMB_FLG2_LNG_NAM    0x04 /* Long names ?                      */
+#define SMB_FLG2_NON_DOS    0x01	/* We know non dos names             */
+#define SMB_FLG2_EXT_ATR    0x02	/* We know about Extended Attributes */
+#define SMB_FLG2_LNG_NAM    0x04	/* Long names ?                      */
 
 typedef unsigned short WORD;
 typedef unsigned short UWORD;
@@ -162,17 +161,17 @@
 /* the data that follows in the SMB packet, so the code will have to   */
 /* take that into account.                                             */
 
-#define SMB_hdr_idf_offset    0          /* 0xFF,'SMB' 0-3 */
-#define SMB_hdr_com_offset    4          /* BYTE       4   */
-#define SMB_hdr_rcls_offset   5          /* BYTE       5   */
-#define SMB_hdr_reh_offset    6          /* BYTE       6   */
-#define SMB_hdr_err_offset    7          /* WORD       7   */
-#define SMB_hdr_reb_offset    9          /* BYTE       9   */
-#define SMB_hdr_flg_offset    9          /* same as reb ...*/
-#define SMB_hdr_res_offset    10         /* 7 WORDs    10  */
-#define SMB_hdr_res0_offset   10         /* WORD       10  */
-#define SMB_hdr_flg2_offset   10         /* WORD           */
-#define SMB_hdr_res1_offset   12         /* WORD       12  */
+#define SMB_hdr_idf_offset    0	/* 0xFF,'SMB' 0-3 */
+#define SMB_hdr_com_offset    4	/* BYTE       4   */
+#define SMB_hdr_rcls_offset   5	/* BYTE       5   */
+#define SMB_hdr_reh_offset    6	/* BYTE       6   */
+#define SMB_hdr_err_offset    7	/* WORD       7   */
+#define SMB_hdr_reb_offset    9	/* BYTE       9   */
+#define SMB_hdr_flg_offset    9	/* same as reb ... */
+#define SMB_hdr_res_offset    10	/* 7 WORDs    10  */
+#define SMB_hdr_res0_offset   10	/* WORD       10  */
+#define SMB_hdr_flg2_offset   10	/* WORD           */
+#define SMB_hdr_res1_offset   12	/* WORD       12  */
 #define SMB_hdr_res2_offset   14
 #define SMB_hdr_res3_offset   16
 #define SMB_hdr_res4_offset   18
@@ -184,275 +183,275 @@
 #define SMB_hdr_mid_offset    30
 #define SMB_hdr_wct_offset    32
 
-#define SMB_hdr_len           33        /* 33 byte header?      */
+#define SMB_hdr_len           33	/* 33 byte header?      */
 
-#define SMB_hdr_axc_offset    33        /* AndX Command         */
-#define SMB_hdr_axr_offset    34        /* AndX Reserved        */
-#define SMB_hdr_axo_offset    35     /* Offset from start to WCT of AndX cmd */
+#define SMB_hdr_axc_offset    33	/* AndX Command         */
+#define SMB_hdr_axr_offset    34	/* AndX Reserved        */
+#define SMB_hdr_axo_offset    35	/* Offset from start to WCT of AndX cmd */
 
 /* Format of the Negotiate Protocol SMB */
 
 #define SMB_negp_bcc_offset   33
-#define SMB_negp_buf_offset   35        /* Where the buffer starts   */
-#define SMB_negp_len          35        /* plus the data             */
+#define SMB_negp_buf_offset   35	/* Where the buffer starts   */
+#define SMB_negp_len          35	/* plus the data             */
 
 /* Format of the Negotiate Response SMB, for CoreProtocol, LM1.2 and */
 /* NT LM 0.12. wct will be 1 for CoreProtocol, 13 for LM 1.2, and 17 */
 /* for NT LM 0.12                                                    */
 
-#define SMB_negrCP_idx_offset   33        /* Response to the neg req */
+#define SMB_negrCP_idx_offset   33	/* Response to the neg req */
 #define SMB_negrCP_bcc_offset   35
-#define SMB_negrLM_idx_offset   33        /* dialect index           */
-#define SMB_negrLM_sec_offset   35        /* Security mode           */
-#define SMB_sec_user_mask       0x01      /* 0 = share, 1 = user     */
-#define SMB_sec_encrypt_mask    0x02      /* pick out encrypt        */
-#define SMB_negrLM_mbs_offset   37        /* max buffer size         */
-#define SMB_negrLM_mmc_offset   39        /* max mpx count           */
-#define SMB_negrLM_mnv_offset   41        /* max number of VCs       */
-#define SMB_negrLM_rm_offset    43        /* raw mode support bit vec*/
+#define SMB_negrLM_idx_offset   33	/* dialect index           */
+#define SMB_negrLM_sec_offset   35	/* Security mode           */
+#define SMB_sec_user_mask       0x01	/* 0 = share, 1 = user     */
+#define SMB_sec_encrypt_mask    0x02	/* pick out encrypt        */
+#define SMB_negrLM_mbs_offset   37	/* max buffer size         */
+#define SMB_negrLM_mmc_offset   39	/* max mpx count           */
+#define SMB_negrLM_mnv_offset   41	/* max number of VCs       */
+#define SMB_negrLM_rm_offset    43	/* raw mode support bit vec */
 #define SMB_read_raw_mask       0x01
 #define SMB_write_raw_mask      0x02
-#define SMB_negrLM_sk_offset    45        /* session key, 32 bits    */
-#define SMB_negrLM_st_offset    49        /* Current server time     */
-#define SMB_negrLM_sd_offset    51        /* Current server date     */
-#define SMB_negrLM_stz_offset   53        /* Server Time Zone        */
-#define SMB_negrLM_ekl_offset   55        /* encryption key length   */
-#define SMB_negrLM_res_offset   57        /* reserved                */
-#define SMB_negrLM_bcc_offset   59        /* bcc                     */
-#define SMB_negrLM_len          61        /* 61 bytes ?              */
-#define SMB_negrLM_buf_offset   61        /* Where the fun begins    */
-
-#define SMB_negrNTLM_idx_offset 33        /* Selected protocol       */
-#define SMB_negrNTLM_sec_offset 35        /* Security more           */
-#define SMB_negrNTLM_mmc_offset 36        /* Different format above  */
-#define SMB_negrNTLM_mnv_offset 38        /* Max VCs                 */
-#define SMB_negrNTLM_mbs_offset 40        /* MBS now a long          */
-#define SMB_negrNTLM_mrs_offset 44        /* Max raw size            */
-#define SMB_negrNTLM_sk_offset  48        /* Session Key             */
-#define SMB_negrNTLM_cap_offset 52        /* Capabilities            */
-#define SMB_negrNTLM_stl_offset 56        /* Server time low         */
-#define SMB_negrNTLM_sth_offset 60        /* Server time high        */
-#define SMB_negrNTLM_stz_offset 64        /* Server time zone        */
-#define SMB_negrNTLM_ekl_offset 66        /* Encrypt key len         */
-#define SMB_negrNTLM_bcc_offset 67        /* Bcc                     */
+#define SMB_negrLM_sk_offset    45	/* session key, 32 bits    */
+#define SMB_negrLM_st_offset    49	/* Current server time     */
+#define SMB_negrLM_sd_offset    51	/* Current server date     */
+#define SMB_negrLM_stz_offset   53	/* Server Time Zone        */
+#define SMB_negrLM_ekl_offset   55	/* encryption key length   */
+#define SMB_negrLM_res_offset   57	/* reserved                */
+#define SMB_negrLM_bcc_offset   59	/* bcc                     */
+#define SMB_negrLM_len          61	/* 61 bytes ?              */
+#define SMB_negrLM_buf_offset   61	/* Where the fun begins    */
+
+#define SMB_negrNTLM_idx_offset 33	/* Selected protocol       */
+#define SMB_negrNTLM_sec_offset 35	/* Security more           */
+#define SMB_negrNTLM_mmc_offset 36	/* Different format above  */
+#define SMB_negrNTLM_mnv_offset 38	/* Max VCs                 */
+#define SMB_negrNTLM_mbs_offset 40	/* MBS now a long          */
+#define SMB_negrNTLM_mrs_offset 44	/* Max raw size            */
+#define SMB_negrNTLM_sk_offset  48	/* Session Key             */
+#define SMB_negrNTLM_cap_offset 52	/* Capabilities            */
+#define SMB_negrNTLM_stl_offset 56	/* Server time low         */
+#define SMB_negrNTLM_sth_offset 60	/* Server time high        */
+#define SMB_negrNTLM_stz_offset 64	/* Server time zone        */
+#define SMB_negrNTLM_ekl_offset 66	/* Encrypt key len         */
+#define SMB_negrNTLM_bcc_offset 67	/* Bcc                     */
 #define SMB_negrNTLM_len        69
 #define SMB_negrNTLM_buf_offset 69
 
 /* Offsets related to Tree Connect                                      */
 
 #define SMB_tcon_bcc_offset     33
-#define SMB_tcon_buf_offset     35        /* where the data is for tcon */
-#define SMB_tcon_len            35        /* plus the data              */
+#define SMB_tcon_buf_offset     35	/* where the data is for tcon */
+#define SMB_tcon_len            35	/* plus the data              */
 
-#define SMB_tconr_mbs_offset    33        /* max buffer size         */
-#define SMB_tconr_tid_offset    35        /* returned tree id        */
-#define SMB_tconr_bcc_offset    37       
-#define SMB_tconr_len           39 
-
-#define SMB_tconx_axc_offset    33        /* And X Command                */
-#define SMB_tconx_axr_offset    34        /* reserved                     */
-#define SMB_tconx_axo_offset    35        /* Next command offset          */
-#define SMB_tconx_flg_offset    37        /* Flags, bit0=1 means disc TID */
-#define SMB_tconx_pwl_offset    39        /* Password length              */
-#define SMB_tconx_bcc_offset    41        /* bcc                          */
-#define SMB_tconx_buf_offset    43        /* buffer                       */
-#define SMB_tconx_len           43        /* up to data ...               */
-
-#define SMB_tconxr_axc_offset   33        /* Where the AndX Command is    */
-#define SMB_tconxr_axr_offset   34        /* Reserved                     */
-#define SMB_tconxr_axo_offset   35        /* AndX offset location         */
+#define SMB_tconr_mbs_offset    33	/* max buffer size         */
+#define SMB_tconr_tid_offset    35	/* returned tree id        */
+#define SMB_tconr_bcc_offset    37
+#define SMB_tconr_len           39
+
+#define SMB_tconx_axc_offset    33	/* And X Command                */
+#define SMB_tconx_axr_offset    34	/* reserved                     */
+#define SMB_tconx_axo_offset    35	/* Next command offset          */
+#define SMB_tconx_flg_offset    37	/* Flags, bit0=1 means disc TID */
+#define SMB_tconx_pwl_offset    39	/* Password length              */
+#define SMB_tconx_bcc_offset    41	/* bcc                          */
+#define SMB_tconx_buf_offset    43	/* buffer                       */
+#define SMB_tconx_len           43	/* up to data ...               */
+
+#define SMB_tconxr_axc_offset   33	/* Where the AndX Command is    */
+#define SMB_tconxr_axr_offset   34	/* Reserved                     */
+#define SMB_tconxr_axo_offset   35	/* AndX offset location         */
 
 /* Offsets related to tree_disconnect                                  */
 
-#define SMB_tdis_bcc_offset     33        /* bcc                     */
-#define SMB_tdis_len            35        /* total len               */
+#define SMB_tdis_bcc_offset     33	/* bcc                     */
+#define SMB_tdis_len            35	/* total len               */
 
-#define SMB_tdisr_bcc_offset    33        /* bcc                     */
+#define SMB_tdisr_bcc_offset    33	/* bcc                     */
 #define SMB_tdisr_len           35
 
 /* Offsets related to Open Request                                     */
 
-#define SMB_open_mod_offset     33        /* Mode to open with       */
-#define SMB_open_atr_offset     35        /* Attributes of file      */
-#define SMB_open_bcc_offset     37        /* bcc                     */
-#define SMB_open_buf_offset     39        /* File name               */
-#define SMB_open_len            39        /* Plus the file name      */
-
-#define SMB_openx_axc_offset    33        /* Next command            */
-#define SMB_openx_axr_offset    34        /* Reserved                */
-#define SMB_openx_axo_offset    35        /* offset of next wct      */
-#define SMB_openx_flg_offset    37        /* Flags, bit0 = need more info */
-                                          /* bit1 = exclusive oplock */
-                                          /* bit2 = batch oplock     */
-#define SMB_openx_mod_offset    39        /* mode to open with       */
-#define SMB_openx_atr_offset    41        /* search attributes       */
-#define SMB_openx_fat_offset    43        /* File attributes         */
-#define SMB_openx_tim_offset    45        /* time and date of creat  */
-#define SMB_openx_ofn_offset    49        /* Open function           */
-#define SMB_openx_als_offset    51        /* Space to allocate on    */
-#define SMB_openx_res_offset    55        /* reserved                */
-#define SMB_openx_bcc_offset    63        /* bcc                     */
-#define SMB_openx_buf_offset    65        /* Where file name goes    */
+#define SMB_open_mod_offset     33	/* Mode to open with       */
+#define SMB_open_atr_offset     35	/* Attributes of file      */
+#define SMB_open_bcc_offset     37	/* bcc                     */
+#define SMB_open_buf_offset     39	/* File name               */
+#define SMB_open_len            39	/* Plus the file name      */
+
+#define SMB_openx_axc_offset    33	/* Next command            */
+#define SMB_openx_axr_offset    34	/* Reserved                */
+#define SMB_openx_axo_offset    35	/* offset of next wct      */
+#define SMB_openx_flg_offset    37	/* Flags, bit0 = need more info */
+					  /* bit1 = exclusive oplock */
+					  /* bit2 = batch oplock     */
+#define SMB_openx_mod_offset    39	/* mode to open with       */
+#define SMB_openx_atr_offset    41	/* search attributes       */
+#define SMB_openx_fat_offset    43	/* File attributes         */
+#define SMB_openx_tim_offset    45	/* time and date of creat  */
+#define SMB_openx_ofn_offset    49	/* Open function           */
+#define SMB_openx_als_offset    51	/* Space to allocate on    */
+#define SMB_openx_res_offset    55	/* reserved                */
+#define SMB_openx_bcc_offset    63	/* bcc                     */
+#define SMB_openx_buf_offset    65	/* Where file name goes    */
 #define SMB_openx_len           65
 
-#define SMB_openr_fid_offset    33        /* FID returned            */
-#define SMB_openr_atr_offset    35        /* Attributes opened with  */
-#define SMB_openr_tim_offset    37        /* Last mod time of file   */
-#define SMB_openr_fsz_offset    41        /* File size 4 bytes       */
-#define SMB_openr_acc_offset    45        /* Access allowed          */
+#define SMB_openr_fid_offset    33	/* FID returned            */
+#define SMB_openr_atr_offset    35	/* Attributes opened with  */
+#define SMB_openr_tim_offset    37	/* Last mod time of file   */
+#define SMB_openr_fsz_offset    41	/* File size 4 bytes       */
+#define SMB_openr_acc_offset    45	/* Access allowed          */
 #define SMB_openr_bcc_offset    47
 #define SMB_openr_len           49
 
-#define SMB_openxr_axc_offset   33        /* And X command           */
-#define SMB_openxr_axr_offset   34        /* reserved                */
-#define SMB_openxr_axo_offset   35        /* offset to next command  */
-#define SMB_openxr_fid_offset   37        /* FID returned            */
-#define SMB_openxr_fat_offset   39        /* File attributes returned*/
-#define SMB_openxr_tim_offset   41        /* File creation date etc  */
-#define SMB_openxr_fsz_offset   45        /* Size of file            */
-#define SMB_openxr_acc_offset   49        /* Access granted          */
-
-#define SMB_clos_fid_offset     33        /* FID to close            */
-#define SMB_clos_tim_offset     35        /* Last mod time           */
-#define SMB_clos_bcc_offset     39        /* bcc                     */        
+#define SMB_openxr_axc_offset   33	/* And X command           */
+#define SMB_openxr_axr_offset   34	/* reserved                */
+#define SMB_openxr_axo_offset   35	/* offset to next command  */
+#define SMB_openxr_fid_offset   37	/* FID returned            */
+#define SMB_openxr_fat_offset   39	/* File attributes returned */
+#define SMB_openxr_tim_offset   41	/* File creation date etc  */
+#define SMB_openxr_fsz_offset   45	/* Size of file            */
+#define SMB_openxr_acc_offset   49	/* Access granted          */
+
+#define SMB_clos_fid_offset     33	/* FID to close            */
+#define SMB_clos_tim_offset     35	/* Last mod time           */
+#define SMB_clos_bcc_offset     39	/* bcc                     */
 #define SMB_clos_len            41
 
 /* Offsets related to Write requests                                 */
 
-#define SMB_write_fid_offset    33        /* FID to write            */
-#define SMB_write_cnt_offset    35        /* bytes to write          */
-#define SMB_write_ofs_offset    37        /* location to write to    */
-#define SMB_write_clf_offset    41        /* advisory count left     */
-#define SMB_write_bcc_offset    43        /* bcc = data bytes + 3    */
-#define SMB_write_buf_offset    45        /* Data=0x01, len, data    */
-#define SMB_write_len           45        /* plus the data ...       */
+#define SMB_write_fid_offset    33	/* FID to write            */
+#define SMB_write_cnt_offset    35	/* bytes to write          */
+#define SMB_write_ofs_offset    37	/* location to write to    */
+#define SMB_write_clf_offset    41	/* advisory count left     */
+#define SMB_write_bcc_offset    43	/* bcc = data bytes + 3    */
+#define SMB_write_buf_offset    45	/* Data=0x01, len, data    */
+#define SMB_write_len           45	/* plus the data ...       */
 
-#define SMB_writr_cnt_offset    33        /* Count of bytes written  */
-#define SMB_writr_bcc_offset    35        /* bcc                     */
+#define SMB_writr_cnt_offset    33	/* Count of bytes written  */
+#define SMB_writr_bcc_offset    35	/* bcc                     */
 #define SMB_writr_len           37
 
 /* Offsets related to read requests */
 
-#define SMB_read_fid_offset     33        /* FID of file to read     */
-#define SMB_read_cnt_offset     35        /* count of words to read  */
-#define SMB_read_ofs_offset     37        /* Where to read from      */
-#define SMB_read_clf_offset     41        /* Advisory count to go    */
+#define SMB_read_fid_offset     33	/* FID of file to read     */
+#define SMB_read_cnt_offset     35	/* count of words to read  */
+#define SMB_read_ofs_offset     37	/* Where to read from      */
+#define SMB_read_clf_offset     41	/* Advisory count to go    */
 #define SMB_read_bcc_offset     43
 #define SMB_read_len            45
 
-#define SMB_readr_cnt_offset    33        /* Count of bytes returned */
-#define SMB_readr_res_offset    35        /* 4 shorts reserved, 8 bytes */
-#define SMB_readr_bcc_offset    43        /* bcc                     */
-#define SMB_readr_bff_offset    45        /* buffer format char = 0x01 */
-#define SMB_readr_len_offset    46        /* buffer len              */
-#define SMB_readr_len           45        /* length of the readr before data */
+#define SMB_readr_cnt_offset    33	/* Count of bytes returned */
+#define SMB_readr_res_offset    35	/* 4 shorts reserved, 8 bytes */
+#define SMB_readr_bcc_offset    43	/* bcc                     */
+#define SMB_readr_bff_offset    45	/* buffer format char = 0x01 */
+#define SMB_readr_len_offset    46	/* buffer len              */
+#define SMB_readr_len           45	/* length of the readr before data */
 
 /* Offsets for Create file                                           */
 
-#define SMB_creat_atr_offset    33        /* Attributes of new file ... */
-#define SMB_creat_tim_offset    35        /* Time of creation           */
-#define SMB_creat_dat_offset    37        /* 4004BCE :-)                */
-#define SMB_creat_bcc_offset    39        /* bcc                        */
+#define SMB_creat_atr_offset    33	/* Attributes of new file ... */
+#define SMB_creat_tim_offset    35	/* Time of creation           */
+#define SMB_creat_dat_offset    37	/* 4004BCE :-)                */
+#define SMB_creat_bcc_offset    39	/* bcc                        */
 #define SMB_creat_buf_offset    41
-#define SMB_creat_len           41        /* Before the data            */
+#define SMB_creat_len           41	/* Before the data            */
 
-#define SMB_creatr_fid_offset   33        /* FID of created file        */
+#define SMB_creatr_fid_offset   33	/* FID of created file        */
 
 /* Offsets for Delete file                                           */
 
-#define SMB_delet_sat_offset    33        /* search attribites          */
-#define SMB_delet_bcc_offset    35        /* bcc                        */
+#define SMB_delet_sat_offset    33	/* search attribites          */
+#define SMB_delet_bcc_offset    35	/* bcc                        */
 #define SMB_delet_buf_offset    37
 #define SMB_delet_len           37
 
 /* Offsets for SESSION_SETUP_ANDX for both LM and NT LM protocols    */
 
-#define SMB_ssetpLM_mbs_offset  37        /* Max buffer Size, allow for AndX */
-#define SMB_ssetpLM_mmc_offset  39        /* max multiplex count             */
-#define SMB_ssetpLM_vcn_offset  41        /* VC number if new VC             */
-#define SMB_ssetpLM_snk_offset  43        /* Session Key                     */
-#define SMB_ssetpLM_pwl_offset  47        /* password length                 */
-#define SMB_ssetpLM_res_offset  49        /* reserved                        */
-#define SMB_ssetpLM_bcc_offset  53        /* bcc                             */
-#define SMB_ssetpLM_len         55        /* before data ...                 */
+#define SMB_ssetpLM_mbs_offset  37	/* Max buffer Size, allow for AndX */
+#define SMB_ssetpLM_mmc_offset  39	/* max multiplex count             */
+#define SMB_ssetpLM_vcn_offset  41	/* VC number if new VC             */
+#define SMB_ssetpLM_snk_offset  43	/* Session Key                     */
+#define SMB_ssetpLM_pwl_offset  47	/* password length                 */
+#define SMB_ssetpLM_res_offset  49	/* reserved                        */
+#define SMB_ssetpLM_bcc_offset  53	/* bcc                             */
+#define SMB_ssetpLM_len         55	/* before data ...                 */
 #define SMB_ssetpLM_buf_offset  55
 
-#define SMB_ssetpNTLM_mbs_offset 37       /* Max Buffer Size for NT LM 0.12  */
-                                          /* and above                       */
-#define SMB_ssetpNTLM_mmc_offset 39       /* Max Multiplex count             */
-#define SMB_ssetpNTLM_vcn_offset 41       /* VC Number                       */
-#define SMB_ssetpNTLM_snk_offset 43       /* Session key                     */
-#define SMB_ssetpNTLM_cipl_offset 47      /* Case Insensitive PW Len         */
-#define SMB_ssetpNTLM_cspl_offset 49      /* Unicode pw len                  */
-#define SMB_ssetpNTLM_res_offset 51       /* reserved                        */
-#define SMB_ssetpNTLM_cap_offset 55       /* server capabilities             */
-#define SMB_ssetpNTLM_bcc_offset 59       /* bcc                             */
-#define SMB_ssetpNTLM_len        61       /* before data                     */
+#define SMB_ssetpNTLM_mbs_offset 37	/* Max Buffer Size for NT LM 0.12  */
+					  /* and above                       */
+#define SMB_ssetpNTLM_mmc_offset 39	/* Max Multiplex count             */
+#define SMB_ssetpNTLM_vcn_offset 41	/* VC Number                       */
+#define SMB_ssetpNTLM_snk_offset 43	/* Session key                     */
+#define SMB_ssetpNTLM_cipl_offset 47	/* Case Insensitive PW Len         */
+#define SMB_ssetpNTLM_cspl_offset 49	/* Unicode pw len                  */
+#define SMB_ssetpNTLM_res_offset 51	/* reserved                        */
+#define SMB_ssetpNTLM_cap_offset 55	/* server capabilities             */
+#define SMB_ssetpNTLM_bcc_offset 59	/* bcc                             */
+#define SMB_ssetpNTLM_len        61	/* before data                     */
 #define SMB_ssetpNTLM_buf_offset 61
 
-#define SMB_ssetpr_axo_offset  35         /* Offset of next response ...    */
-#define SMB_ssetpr_act_offset  37         /* action, bit 0 = 1 => guest     */
-#define SMB_ssetpr_bcc_offset  39         /* bcc                            */
-#define SMB_ssetpr_buf_offset  41         /* Native OS etc                  */
+#define SMB_ssetpr_axo_offset  35	/* Offset of next response ...    */
+#define SMB_ssetpr_act_offset  37	/* action, bit 0 = 1 => guest     */
+#define SMB_ssetpr_bcc_offset  39	/* bcc                            */
+#define SMB_ssetpr_buf_offset  41	/* Native OS etc                  */
 
 /* Offsets for SMB create directory                                         */
 
-#define SMB_creatdir_bcc_offset 33        /* only a bcc here                */
-#define SMB_creatdir_buf_offset 35        /* Where things start             */
+#define SMB_creatdir_bcc_offset 33	/* only a bcc here                */
+#define SMB_creatdir_buf_offset 35	/* Where things start             */
 #define SMB_creatdir_len        35
 
 /* Offsets for SMB delete directory                                         */
 
-#define SMB_deletdir_bcc_offset 33        /* only a bcc here                */
-#define SMB_deletdir_buf_offset 35        /* where things start             */
+#define SMB_deletdir_bcc_offset 33	/* only a bcc here                */
+#define SMB_deletdir_buf_offset 35	/* where things start             */
 #define SMB_deletdir_len        35
 
 /* Offsets for SMB check directory                                          */
 
-#define SMB_checkdir_bcc_offset 33        /* Only a bcc here                */
-#define SMB_checkdir_buf_offset 35        /* where things start             */
+#define SMB_checkdir_bcc_offset 33	/* Only a bcc here                */
+#define SMB_checkdir_buf_offset 35	/* where things start             */
 #define SMB_checkdir_len        35
 
 /* Offsets for SMB search                                                   */
 
-#define SMB_search_mdc_offset   33        /* Max Dir ents to return         */
-#define SMB_search_atr_offset   35        /* Search attributes              */
-#define SMB_search_bcc_offset   37        /* bcc                            */
-#define SMB_search_buf_offset   39        /* where the action is            */
+#define SMB_search_mdc_offset   33	/* Max Dir ents to return         */
+#define SMB_search_atr_offset   35	/* Search attributes              */
+#define SMB_search_bcc_offset   37	/* bcc                            */
+#define SMB_search_buf_offset   39	/* where the action is            */
 #define SMB_search_len          39
 
-#define SMB_searchr_dec_offset  33        /* Dir ents returned              */
-#define SMB_searchr_bcc_offset  35        /* bcc                            */
-#define SMB_searchr_buf_offset  37        /* Where the action starts        */
-#define SMB_searchr_len         37        /* before the dir ents            */
+#define SMB_searchr_dec_offset  33	/* Dir ents returned              */
+#define SMB_searchr_bcc_offset  35	/* bcc                            */
+#define SMB_searchr_buf_offset  37	/* Where the action starts        */
+#define SMB_searchr_len         37	/* before the dir ents            */
 
-#define SMB_searchr_dirent_len  43        /* 53 bytes                       */
+#define SMB_searchr_dirent_len  43	/* 53 bytes                       */
 
 /* Defines for SMB transact and transact2 calls                             */
 
-#define SMB_trans_tpc_offset    33        /* Total param count              */
-#define SMB_trans_tdc_offset    35        /* total Data count               */
-#define SMB_trans_mpc_offset    37        /* Max params bytes to return     */
-#define SMB_trans_mdc_offset    39        /* Max data bytes to return       */
-#define SMB_trans_msc_offset    41        /* Max setup words to return      */
-#define SMB_trans_rs1_offset    42        /* Reserved byte                  */
-#define SMB_trans_flg_offset    43        /* flags                          */
-#define SMB_trans_tmo_offset    45        /* Timeout, long                  */
-#define SMB_trans_rs2_offset    49        /* Next reserved                  */
-#define SMB_trans_pbc_offset    51        /* Param Byte count in buf        */
-#define SMB_trans_pbo_offset    53        /* Offset to param bytes          */
-#define SMB_trans_dbc_offset    55        /* Data byte count in buf         */
-#define SMB_trans_dbo_offset    57        /* Data byte offset               */
-#define SMB_trans_suc_offset    59        /* Setup count - byte             */
-#define SMB_trans_rs3_offset    60        /* Reserved to pad ...            */
-#define SMB_trans_len           61        /* Up to setup, still need bcc    */
+#define SMB_trans_tpc_offset    33	/* Total param count              */
+#define SMB_trans_tdc_offset    35	/* total Data count               */
+#define SMB_trans_mpc_offset    37	/* Max params bytes to return     */
+#define SMB_trans_mdc_offset    39	/* Max data bytes to return       */
+#define SMB_trans_msc_offset    41	/* Max setup words to return      */
+#define SMB_trans_rs1_offset    42	/* Reserved byte                  */
+#define SMB_trans_flg_offset    43	/* flags                          */
+#define SMB_trans_tmo_offset    45	/* Timeout, long                  */
+#define SMB_trans_rs2_offset    49	/* Next reserved                  */
+#define SMB_trans_pbc_offset    51	/* Param Byte count in buf        */
+#define SMB_trans_pbo_offset    53	/* Offset to param bytes          */
+#define SMB_trans_dbc_offset    55	/* Data byte count in buf         */
+#define SMB_trans_dbo_offset    57	/* Data byte offset               */
+#define SMB_trans_suc_offset    59	/* Setup count - byte             */
+#define SMB_trans_rs3_offset    60	/* Reserved to pad ...            */
+#define SMB_trans_len           61	/* Up to setup, still need bcc    */
 
-#define SMB_transr_tpc_offset   33        /* Total param bytes returned     */
+#define SMB_transr_tpc_offset   33	/* Total param bytes returned     */
 #define SMB_transr_tdc_offset   35
 #define SMB_transr_rs1_offset   37
 #define SMB_transr_pbc_offset   39
 #define SMB_transr_pbo_offset   41
-#define SMB_transr_pdi_offset   43        /* parameter displacement         */
+#define SMB_transr_pdi_offset   43	/* parameter displacement         */
 #define SMB_transr_dbc_offset   45
 #define SMB_transr_dbo_offset   47
 #define SMB_transr_ddi_offset   49
@@ -477,102 +476,118 @@
 
 #define SMB_LMapi_SetUserInfo     0x0072
 #define SMB_LMapi_UserPasswordSet 0x0073
- 
+
 /* Structures and defines we use in the client interface */
 
 /* The protocols we might support. Perhaps a bit ambitious, as only RFCNB */
 /* has any support so far 0(sometimes called NBT)                         */
 
-typedef enum {SMB_RFCNB, SMB_IPXNB, SMB_NETBEUI, SMB_X25} SMB_Transport_Types;
-
-typedef enum {SMB_Con_FShare, SMB_Con_PShare, SMB_Con_IPC} SMB_Con_Types;
-
-typedef enum {SMB_State_NoState, SMB_State_Stopped, SMB_State_Started} SMB_State_Types;
+typedef enum
+{ SMB_RFCNB, SMB_IPXNB, SMB_NETBEUI, SMB_X25 }
+SMB_Transport_Types;
+
+typedef enum
+{ SMB_Con_FShare, SMB_Con_PShare, SMB_Con_IPC }
+SMB_Con_Types;
+
+typedef enum
+{ SMB_State_NoState, SMB_State_Stopped, SMB_State_Started }
+SMB_State_Types;
 
 /* The following two arrays need to be in step!              */
 /* We must make it possible for callers to specify these ... */
 
 
-static char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0", 
-			    "MICROSOFT NETWORKS 1.03",
-			    "MICROSOFT NETWORKS 3.0",
-			    "DOS LANMAN1.0",
-			    "LANMAN1.0",
-			    "DOS LM1.2X002",
-			    "LM1.2X002",
-			    "DOS LANMAN2.1",
-			    "LANMAN2.1",
-			    "Samba",
-			    "NT LM 0.12",
-			    "NT LANMAN 1.0",
-			    NULL};
-
-static int SMB_Types[] = {SMB_P_Core,
-                          SMB_P_CorePlus,
-			  SMB_P_DOSLanMan1,
-			  SMB_P_DOSLanMan1,
-	                  SMB_P_LanMan1,
-			  SMB_P_DOSLanMan2,
-		          SMB_P_LanMan2,
-	 	          SMB_P_LanMan2_1,
-		          SMB_P_LanMan2_1,
-		          SMB_P_NT1,
-		          SMB_P_NT1,
-		          SMB_P_NT1,
-		          -1};
-
-typedef struct SMB_Status {
-
-  union {
-    struct {
-      unsigned char ErrorClass;
-      unsigned char Reserved;
-      unsigned short Error;
-    } DosError;
-    unsigned int NtStatus;
-  } status;
-} SMB_Status;
-
-typedef struct SMB_Tree_Structure * SMB_Tree_Handle;
-
-typedef struct SMB_Connect_Def * SMB_Handle_Type;
-
-struct SMB_Connect_Def {
-
-  SMB_Handle_Type Next_Con, Prev_Con;          /* Next and previous conn */
-  int protocol;                                /* What is the protocol   */
-  int prot_IDX;                                /* And what is the index  */
-  void *Trans_Connect;                         /* The connection         */
-
-  /* All these strings should be malloc'd */
-
-  char service[80], username[80], password[80], desthost[80], sock_options[80];
-  char address[80], myname[80];
-
-  SMB_Tree_Handle first_tree, last_tree;  /* List of trees on this server */
-
-  int gid;         /* Group ID, do we need it?                      */
-  int mid;         /* Multiplex ID? We might need one per con       */
-  int pid;         /* Process ID                                    */
-
-  int uid;         /* Authenticated user id.                        */
-
-                   /* It is pretty clear that we need to bust some of */
-                   /* these out into a per TCon record, as there may  */
-                   /* be multiple TCon's per server, etc ... later    */
-
-  int port;        /* port to use in case not default, this is a TCPism! */
-
-  int max_xmit;    /* Max xmit permitted by server                  */
-  int Security;    /* 0 = share, 1 = user                           */
-  int Raw_Support; /* bit 0 = 1 = Read Raw supported, 1 = 1 Write raw */
-  BOOL encrypt_passwords; /* FALSE = don't                          */ 
-  int MaxMPX, MaxVC, MaxRaw;
-  unsigned int SessionKey, Capabilities;
-  int SvrTZ;                                 /* Server Time Zone */
-  int Encrypt_Key_Len;
-  char Encrypt_Key[80], Domain[80], PDomain[80], OSName[80], LMType[40];
-  char Svr_OS[80], Svr_LMType[80], Svr_PDom[80];
+static char *SMB_Prots[] = { "PC NETWORK PROGRAM 1.0",
+    "MICROSOFT NETWORKS 1.03",
+    "MICROSOFT NETWORKS 3.0",
+    "DOS LANMAN1.0",
+    "LANMAN1.0",
+    "DOS LM1.2X002",
+    "LM1.2X002",
+    "DOS LANMAN2.1",
+    "LANMAN2.1",
+    "Samba",
+    "NT LM 0.12",
+    "NT LANMAN 1.0",
+    NULL
+};
+
+static int SMB_Types[] = { SMB_P_Core,
+    SMB_P_CorePlus,
+    SMB_P_DOSLanMan1,
+    SMB_P_DOSLanMan1,
+    SMB_P_LanMan1,
+    SMB_P_DOSLanMan2,
+    SMB_P_LanMan2,
+    SMB_P_LanMan2_1,
+    SMB_P_LanMan2_1,
+    SMB_P_NT1,
+    SMB_P_NT1,
+    SMB_P_NT1,
+    -1
+};
+
+typedef struct SMB_Status
+{
+
+    union
+    {
+	struct
+	{
+	    unsigned char ErrorClass;
+	    unsigned char Reserved;
+	    unsigned short Error;
+	}
+	DosError;
+	unsigned int NtStatus;
+    }
+    status;
+}
+SMB_Status;
+
+typedef struct SMB_Tree_Structure *SMB_Tree_Handle;
+
+typedef struct SMB_Connect_Def *SMB_Handle_Type;
+
+struct SMB_Connect_Def
+{
+
+    SMB_Handle_Type Next_Con, Prev_Con;	/* Next and previous conn */
+    int protocol;		/* What is the protocol   */
+    int prot_IDX;		/* And what is the index  */
+    void *Trans_Connect;	/* The connection         */
+
+    /* All these strings should be malloc'd */
+
+    char service[80], username[80], password[80], desthost[80],
+	sock_options[80];
+    char address[80], myname[80];
+
+    SMB_Tree_Handle first_tree, last_tree;	/* List of trees on this server */
+
+    int gid;			/* Group ID, do we need it?                      */
+    int mid;			/* Multiplex ID? We might need one per con       */
+    int pid;			/* Process ID                                    */
+
+    int uid;			/* Authenticated user id.                        */
+
+    /* It is pretty clear that we need to bust some of */
+    /* these out into a per TCon record, as there may  */
+    /* be multiple TCon's per server, etc ... later    */
+
+    int port;			/* port to use in case not default, this is a TCPism! */
+
+    int max_xmit;		/* Max xmit permitted by server                  */
+    int Security;		/* 0 = share, 1 = user                           */
+    int Raw_Support;		/* bit 0 = 1 = Read Raw supported, 1 = 1 Write raw */
+    BOOL encrypt_passwords;	/* FALSE = don't                          */
+    int MaxMPX, MaxVC, MaxRaw;
+    unsigned int SessionKey, Capabilities;
+    int SvrTZ;			/* Server Time Zone */
+    int Encrypt_Key_Len;
+    char Encrypt_Key[80], Domain[80], PDomain[80], OSName[80], LMType[40];
+    char Svr_OS[80], Svr_LMType[80], Svr_PDom[80];
 
 };
 
@@ -586,28 +601,30 @@
 
 /* A Tree_Structure                       */
 
-struct SMB_Tree_Structure {
+struct SMB_Tree_Structure
+{
 
-  SMB_Tree_Handle next, prev;
-  SMB_Handle_Type con;
-  char path[129];
-  char device_type[20];
-  int mbs;                   /* Local MBS */
-  int tid;
+    SMB_Tree_Handle next, prev;
+    SMB_Handle_Type con;
+    char path[129];
+    char device_type[20];
+    int mbs;			/* Local MBS */
+    int tid;
 
 };
 
 typedef struct SMB_File_Def SMB_File;
 
-struct SMB_File_Def {
+struct SMB_File_Def
+{
 
-  SMB_Tree_Handle tree;
-  char filename[256];          /* We should malloc this ... */
-  UWORD fid;
-  unsigned int lastmod;
-  unsigned int size;           /* Could blow up if 64bit files supported */
-  UWORD access;
-  off_t fileloc;
+    SMB_Tree_Handle tree;
+    char filename[256];		/* We should malloc this ... */
+    UWORD fid;
+    unsigned int lastmod;
+    unsigned int size;		/* Could blow up if 64bit files supported */
+    UWORD access;
+    off_t fileloc;
 
 };
 
@@ -617,8 +634,8 @@
 
 #ifndef SMBLIB_ERRNO
 extern int SMBlib_errno;
-extern int SMBlib_SMB_Error;          /* last Error             */
+extern int SMBlib_SMB_Error;	/* last Error             */
 #endif
 
 SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, SMB_Tree_Handle tree,
-				char *path, char *password, char *dev);
+    char *path, char *password, char *dev);
Index: squid/auth_modules/MSNT/smblib-util.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smblib-util.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smblib-util.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smblib-util.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX SMBlib NetBIOS implementation
-
    Version 1.0
    SMBlib Utility Routines
 
@@ -29,44 +28,45 @@
 
 /* Print out an SMB pkt in all its gory detail ... */
 
-void SMB_Print_Pkt(FILE fd, RFCNB_Pkt *pkt, BOOL command, int Offset, int Len)
-
+void
+SMB_Print_Pkt(FILE fd, RFCNB_Pkt * pkt, BOOL command, int Offset, int Len)
 {
 
-  /* Well, just how do we do this ... print it I suppose */
+    /* Well, just how do we do this ... print it I suppose */
 
-  /* Print out the SMB header ...                        */
+    /* Print out the SMB header ...                        */
 
-  /* Print the command                                   */
+    /* Print the command                                   */
 
-  /* Print the other bits in the header                  */
+    /* Print the other bits in the header                  */
 
 
-  /* etc                                                 */
+    /* etc                                                 */
 
 }
 
 /* Convert a DOS Date_Time to a local host type date time for printing */
 
-char *SMB_DOSTimToStr(int DOS_time)
-
-{ static char SMB_Time_Temp[48];
-  int DOS_sec, DOS_min, DOS_hour, DOS_day, DOS_month, DOS_year;
+char *
+SMB_DOSTimToStr(int DOS_time)
+{
+    static char SMB_Time_Temp[48];
+    int DOS_sec, DOS_min, DOS_hour, DOS_day, DOS_month, DOS_year;
 
-  SMB_Time_Temp[0] = 0;
+    SMB_Time_Temp[0] = 0;
 
-  DOS_sec   = (DOS_time & 0x001F) * 2;
-  DOS_min   = (DOS_time & 0x07E0) >> 5;   
-  DOS_hour  = ((DOS_time & 0xF800) >> 11);
+    DOS_sec = (DOS_time & 0x001F) * 2;
+    DOS_min = (DOS_time & 0x07E0) >> 5;
+    DOS_hour = ((DOS_time & 0xF800) >> 11);
 
-  DOS_day   = (DOS_time & 0x001F0000) >> 16;
-  DOS_month = (DOS_time & 0x01E00000) >> 21;
-  DOS_year  = ((DOS_time & 0xFE000000) >> 25) + 80;
+    DOS_day = (DOS_time & 0x001F0000) >> 16;
+    DOS_month = (DOS_time & 0x01E00000) >> 21;
+    DOS_year = ((DOS_time & 0xFE000000) >> 25) + 80;
 
-  sprintf(SMB_Time_Temp, "%2d/%02d/%2d %2d:%02d:%02d", DOS_day, DOS_month,
-	                 DOS_year, DOS_hour, DOS_min, DOS_sec);
+    sprintf(SMB_Time_Temp, "%2d/%02d/%2d %2d:%02d:%02d", DOS_day, DOS_month,
+	DOS_year, DOS_hour, DOS_min, DOS_sec);
 
-  return(SMB_Time_Temp);
+    return (SMB_Time_Temp);
 
 }
 
@@ -74,85 +74,82 @@
    to a static string which we guarantee is long enough. If verbose is 
    true, we print out long form of strings ...                            */
 
-char *SMB_AtrToStr(int attribs, BOOL verbose)
-
-{ static char SMB_Attrib_Temp[128];
+char *
+SMB_AtrToStr(int attribs, BOOL verbose)
+{
+    static char SMB_Attrib_Temp[128];
 
-  SMB_Attrib_Temp[0] = 0;
+    SMB_Attrib_Temp[0] = 0;
 
-  if (attribs & SMB_FA_ROF) 
-    strcat(SMB_Attrib_Temp, (verbose?"Read Only ":"R"));
+    if (attribs & SMB_FA_ROF)
+	strcat(SMB_Attrib_Temp, (verbose ? "Read Only " : "R"));
 
-  if (attribs & SMB_FA_HID) 
-    strcat(SMB_Attrib_Temp, (verbose?"Hidden ":"H"));
+    if (attribs & SMB_FA_HID)
+	strcat(SMB_Attrib_Temp, (verbose ? "Hidden " : "H"));
 
-  if (attribs & SMB_FA_SYS) 
-    strcat(SMB_Attrib_Temp, (verbose?"System ":"S"));
+    if (attribs & SMB_FA_SYS)
+	strcat(SMB_Attrib_Temp, (verbose ? "System " : "S"));
 
-  if (attribs & SMB_FA_VOL) 
-    strcat(SMB_Attrib_Temp, (verbose?"Volume ":"V"));
+    if (attribs & SMB_FA_VOL)
+	strcat(SMB_Attrib_Temp, (verbose ? "Volume " : "V"));
 
-  if (attribs & SMB_FA_DIR) 
-    strcat(SMB_Attrib_Temp, (verbose?"Directory ":"D"));
+    if (attribs & SMB_FA_DIR)
+	strcat(SMB_Attrib_Temp, (verbose ? "Directory " : "D"));
 
-  if (attribs & SMB_FA_ARC) 
-    strcat(SMB_Attrib_Temp, (verbose?"Archive ":"A"));
+    if (attribs & SMB_FA_ARC)
+	strcat(SMB_Attrib_Temp, (verbose ? "Archive " : "A"));
 
-  return(SMB_Attrib_Temp);
+    return (SMB_Attrib_Temp);
 
 }
 
 /* Pick up the Max Buffer Size from the Tree Structure ... */
 
-int SMB_Get_Tree_MBS(SMB_Tree_Handle tree)
-
+int
+SMB_Get_Tree_MBS(SMB_Tree_Handle tree)
 {
-  if (tree != NULL) {
-    return(tree -> mbs);
-  }
-  else {
-    return(SMBlibE_BAD);
-  }
+    if (tree != NULL) {
+	return (tree->mbs);
+    } else {
+	return (SMBlibE_BAD);
+    }
 }
 
 /* Pick up the Max buffer size */
 
-int SMB_Get_Max_Buf_Siz(SMB_Handle_Type Con_Handle)
-
+int
+SMB_Get_Max_Buf_Siz(SMB_Handle_Type Con_Handle)
 {
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> max_xmit);
-  }
-  else {
-    return(SMBlibE_BAD);
-  }
+    if (Con_Handle != NULL) {
+	return (Con_Handle->max_xmit);
+    } else {
+	return (SMBlibE_BAD);
+    }
 
 }
 /* Pickup the protocol index from the connection structure                 */
 
-int SMB_Get_Protocol_IDX(SMB_Handle_Type Con_Handle)
-
+int
+SMB_Get_Protocol_IDX(SMB_Handle_Type Con_Handle)
 {
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> prot_IDX);
-  }
-  else {
-    return(0xFFFF);  /* Invalid protocol */
-  }
+    if (Con_Handle != NULL) {
+	return (Con_Handle->prot_IDX);
+    } else {
+	return (0xFFFF);	/* Invalid protocol */
+    }
 
 }
 
 /* Pick up the protocol from the connection structure                       */
 
-int SMB_Get_Protocol(SMB_Handle_Type Con_Handle)
-
+int
+SMB_Get_Protocol(SMB_Handle_Type Con_Handle)
 {
-  if (Con_Handle != NULL) {
-    return(Con_Handle -> protocol);
-  }
-  else {
-    return(0xFFFF);  /* Invalid protocol */
-  }
+    if (Con_Handle != NULL) {
+	return (Con_Handle->protocol);
+    } else {
+	return (0xFFFF);	/* Invalid protocol */
+    }
 
 }
 
@@ -160,32 +157,32 @@
 /* We offered, and the index back from the server. We allow for a user      */
 /* supplied list, and assume that it is a subset of our list                */
 
-int SMB_Figure_Protocol(char *dialects[], int prot_index)
-
-{ int i;
+int
+SMB_Figure_Protocol(char *dialects[], int prot_index)
+{
+    int i;
 
-  if (dialects == SMB_Prots) { /* The jobs is easy, just index into table */
+    if (dialects == SMB_Prots) {	/* The jobs is easy, just index into table */
 
-    return(SMB_Types[prot_index]);
-  }
-  else { /* Search through SMB_Prots looking for a match */
+	return (SMB_Types[prot_index]);
+    } else {			/* Search through SMB_Prots looking for a match */
 
-    for (i = 0; SMB_Prots[i] != NULL; i++) {
+	for (i = 0; SMB_Prots[i] != NULL; i++) {
 
-      if (strcmp(dialects[prot_index], SMB_Prots[i]) == 0) { /* A match */
+	    if (strcmp(dialects[prot_index], SMB_Prots[i]) == 0) {	/* A match */
 
-	return(SMB_Types[i]);
+		return (SMB_Types[i]);
 
-      }
+	    }
 
-    }
+	}
 
-    /* If we got here, then we are in trouble, because the protocol was not */
-    /* One we understand ...                                                */
+	/* If we got here, then we are in trouble, because the protocol was not */
+	/* One we understand ...                                                */
 
-    return(SMB_P_Unknown);
+	return (SMB_P_Unknown);
 
-  }
+    }
 
 }
 
@@ -194,538 +191,546 @@
 /* we return the index of the accepted protocol in NegProt, -1 indicates  */
 /* none acceptible, and our return value is 0 if ok, <0 if problems       */
 
-int SMB_Negotiate(SMB_Handle_Type Con_Handle, char *Prots[])
-
-{ struct SMB_Neg_Prot_Def *prot_pkt;
-  struct SMB_Neg_Prot_Resp_Def *resp_pkt;
-  struct RFCNB_Pkt *pkt;
-  int prots_len, i, pkt_len, prot, alloc_len;
-  char *p;
+int
+SMB_Negotiate(SMB_Handle_Type Con_Handle, char *Prots[])
+{
+    struct SMB_Neg_Prot_Def *prot_pkt;
+    struct SMB_Neg_Prot_Resp_Def *resp_pkt;
+    struct RFCNB_Pkt *pkt;
+    int prots_len, i, pkt_len, prot, alloc_len;
+    char *p;
 
-  /* Figure out how long the prot list will be and allocate space for it */
+    /* Figure out how long the prot list will be and allocate space for it */
 
-  prots_len = 0;
+    prots_len = 0;
 
-  for (i = 0; Prots[i] != NULL; i++) {
+    for (i = 0; Prots[i] != NULL; i++) {
 
-    prots_len = prots_len + strlen(Prots[i]) + 2; /* Account for null etc */
+	prots_len = prots_len + strlen(Prots[i]) + 2;	/* Account for null etc */
 
-  }
+    }
 
-  /* The -1 accounts for the one byte smb_buf we have because some systems */
-  /* don't like char msg_buf[]                                             */
+    /* The -1 accounts for the one byte smb_buf we have because some systems */
+    /* don't like char msg_buf[]                                             */
 
-  pkt_len = SMB_negp_len + prots_len;
+    pkt_len = SMB_negp_len + prots_len;
 
-  /* Make sure that the pkt len is long enough for the max response ...   */
-  /* Which is a problem, because the encryption key len eec may be long   */
+    /* Make sure that the pkt len is long enough for the max response ...   */
+    /* Which is a problem, because the encryption key len eec may be long   */
 
-  if (pkt_len < (SMB_hdr_wct_offset + (19 * 2) + 40)) {
+    if (pkt_len < (SMB_hdr_wct_offset + (19 * 2) + 40)) {
 
-    alloc_len = SMB_hdr_wct_offset + (19 * 2) + 40;
+	alloc_len = SMB_hdr_wct_offset + (19 * 2) + 40;
 
-  }
-  else {
+    } else {
 
-    alloc_len = pkt_len;
+	alloc_len = pkt_len;
 
-  }
+    }
 
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(alloc_len);
+    pkt = (struct RFCNB_Pkt *) RFCNB_Alloc_Pkt(alloc_len);
 
-  if (pkt == NULL) {
+    if (pkt == NULL) {
 
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(SMBlibE_BAD);
+	SMBlib_errno = SMBlibE_NoSpace;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Now plug in the bits we need */
+    /* Now plug in the bits we need */
 
-  bzero(SMB_Hdr(pkt), SMB_negp_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBnegprot;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
+    bzero(SMB_Hdr(pkt), SMB_negp_len);
+    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);	/* Plunk in IDF */
+    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBnegprot;
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle->mid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle->uid);
+    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
 
-  SSVAL(SMB_Hdr(pkt), SMB_negp_bcc_offset, prots_len);
+    SSVAL(SMB_Hdr(pkt), SMB_negp_bcc_offset, prots_len);
 
-  /* Now copy the prot strings in with the right stuff */
+    /* Now copy the prot strings in with the right stuff */
 
-  p = (char *)(SMB_Hdr(pkt) + SMB_negp_buf_offset);
+    p = (char *) (SMB_Hdr(pkt) + SMB_negp_buf_offset);
 
-  for (i = 0; Prots[i] != NULL; i++) {
+    for (i = 0; Prots[i] != NULL; i++) {
 
-    *p = SMBdialectID;
-    strcpy(p + 1, Prots[i]);
-    p = p + strlen(Prots[i]) + 2; /* Adjust len of p for null plus dialectID */
+	*p = SMBdialectID;
+	strcpy(p + 1, Prots[i]);
+	p = p + strlen(Prots[i]) + 2;	/* Adjust len of p for null plus dialectID */
 
-  }
+    }
 
-  /* Now send the packet and sit back ... */
+    /* Now send the packet and sit back ... */
 
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
+    if (RFCNB_Send(Con_Handle->Trans_Connect, pkt, pkt_len) < 0) {
 
 
 #ifdef DEBUG
-    fprintf(stderr, "Error sending negotiate protocol\n");
+	fprintf(stderr, "Error sending negotiate protocol\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed; /* Failed, check lower layer errno */
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_SendFailed;	/* Failed, check lower layer errno */
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Now get the response ... */
+    /* Now get the response ... */
 
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, alloc_len) < 0) {
+    if (RFCNB_Recv(Con_Handle->Trans_Connect, pkt, alloc_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error receiving response to negotiate\n");
+	fprintf(stderr, "Error receiving response to negotiate\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed; /* Failed, check lower layer errno */
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_RecvFailed;	/* Failed, check lower layer errno */
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
+    if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {	/* Process error */
 
 #ifdef DEBUG
-    fprintf(stderr, "SMB_Negotiate failed with errorclass = %i, Error Code = %i\n",
-	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-	    SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
+	fprintf(stderr,
+	    "SMB_Negotiate failed with errorclass = %i, Error Code = %i\n",
+	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset), SVAL(SMB_Hdr(pkt),
+		SMB_hdr_err_offset));
 #endif
 
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
+	SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_Remote;
+	return (SMBlibE_BAD);
 
-  }
-  
-  if (SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset) == 0xFFFF) {
+    }
+
+    if (SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset) == 0xFFFF) {
 
 #ifdef DEBUG
-    fprintf(stderr, "None of our protocols was accepted ... ");
+	fprintf(stderr, "None of our protocols was accepted ... ");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_NegNoProt;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_NegNoProt;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Now, unpack the info from the response, if any and evaluate the proto */
-  /* selected. We must make sure it is one we like ...                     */
+    /* Now, unpack the info from the response, if any and evaluate the proto */
+    /* selected. We must make sure it is one we like ...                     */
 
-  Con_Handle -> prot_IDX = prot = SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset);
-  Con_Handle -> protocol = SMB_Figure_Protocol(Prots, prot);
+    Con_Handle->prot_IDX = prot = SVAL(SMB_Hdr(pkt), SMB_negrCP_idx_offset);
+    Con_Handle->protocol = SMB_Figure_Protocol(Prots, prot);
 
-  if (Con_Handle -> protocol == SMB_P_Unknown) { /* No good ... */
+    if (Con_Handle->protocol == SMB_P_Unknown) {	/* No good ... */
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_ProtUnknown;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_ProtUnknown;
+	return (SMBlibE_BAD);
+
+    }
 
-  }
-  
-  switch (CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset)) {
+    switch (CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset)) {
 
-  case 0x01:      /* No more info ... */
+    case 0x01:			/* No more info ... */
 
-    break;
+	break;
 
-  case 13:        /* Up to and including LanMan 2.1 */
+    case 13:			/* Up to and including LanMan 2.1 */
 
-    Con_Handle -> Security = SVAL(SMB_Hdr(pkt), SMB_negrLM_sec_offset);
-    Con_Handle -> encrypt_passwords = ((Con_Handle -> Security & SMB_sec_encrypt_mask) != 0x00);
-    Con_Handle -> Security = Con_Handle -> Security & SMB_sec_user_mask;
+	Con_Handle->Security = SVAL(SMB_Hdr(pkt), SMB_negrLM_sec_offset);
+	Con_Handle->encrypt_passwords =
+	    ((Con_Handle->Security & SMB_sec_encrypt_mask) != 0x00);
+	Con_Handle->Security = Con_Handle->Security & SMB_sec_user_mask;
 
-    Con_Handle -> max_xmit = SVAL(SMB_Hdr(pkt), SMB_negrLM_mbs_offset);
-    Con_Handle -> MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrLM_mmc_offset);
-    Con_Handle -> MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrLM_mnv_offset);
-    Con_Handle -> Raw_Support = SVAL(SMB_Hdr(pkt), SMB_negrLM_rm_offset);
-    Con_Handle -> SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrLM_sk_offset);
-    Con_Handle -> SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrLM_stz_offset);
-    Con_Handle -> Encrypt_Key_Len = SVAL(SMB_Hdr(pkt), SMB_negrLM_ekl_offset);
-    
-    p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset);
-    fprintf(stderr, "%d", (char *)(SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
-    memcpy(Con_Handle->Encrypt_Key, p, 8);
+	Con_Handle->max_xmit = SVAL(SMB_Hdr(pkt), SMB_negrLM_mbs_offset);
+	Con_Handle->MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrLM_mmc_offset);
+	Con_Handle->MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrLM_mnv_offset);
+	Con_Handle->Raw_Support = SVAL(SMB_Hdr(pkt), SMB_negrLM_rm_offset);
+	Con_Handle->SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrLM_sk_offset);
+	Con_Handle->SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrLM_stz_offset);
+	Con_Handle->Encrypt_Key_Len = SVAL(SMB_Hdr(pkt), SMB_negrLM_ekl_offset);
 
-    p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset + Con_Handle -> Encrypt_Key_Len);
+	p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset);
+	fprintf(stderr, "%d", (char *) (SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
+	memcpy(Con_Handle->Encrypt_Key, p, 8);
 
-    strncpy(p, Con_Handle -> Svr_PDom, sizeof(Con_Handle -> Svr_PDom) - 1);
+	p =
+	    (SMB_Hdr(pkt) + SMB_negrLM_buf_offset +
+	    Con_Handle->Encrypt_Key_Len);
 
-    break;
+	strncpy(p, Con_Handle->Svr_PDom, sizeof(Con_Handle->Svr_PDom) - 1);
 
-  case 17:        /* NT LM 0.12 and LN LM 1.0 */
+	break;
 
-    Con_Handle -> Security = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_sec_offset);
-    Con_Handle -> encrypt_passwords = ((Con_Handle -> Security & SMB_sec_encrypt_mask) != 0x00);
-    Con_Handle -> Security = Con_Handle -> Security & SMB_sec_user_mask;
+    case 17:			/* NT LM 0.12 and LN LM 1.0 */
 
-    Con_Handle -> max_xmit = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mbs_offset);
-    Con_Handle -> MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mmc_offset);
-    Con_Handle -> MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mnv_offset);
-    Con_Handle -> MaxRaw = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mrs_offset);
-    Con_Handle -> SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_sk_offset);
-    Con_Handle -> SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_stz_offset);
-    Con_Handle -> Encrypt_Key_Len = CVAL(SMB_Hdr(pkt), SMB_negrNTLM_ekl_offset);
+	Con_Handle->Security = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_sec_offset);
+	Con_Handle->encrypt_passwords =
+	    ((Con_Handle->Security & SMB_sec_encrypt_mask) != 0x00);
+	Con_Handle->Security = Con_Handle->Security & SMB_sec_user_mask;
 
-    p = (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset );
-    memcpy(Con_Handle -> Encrypt_Key, p, 8);
-    p = (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset + Con_Handle -> Encrypt_Key_Len);
+	Con_Handle->max_xmit = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mbs_offset);
+	Con_Handle->MaxMPX = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mmc_offset);
+	Con_Handle->MaxVC = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_mnv_offset);
+	Con_Handle->MaxRaw = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_mrs_offset);
+	Con_Handle->SessionKey = IVAL(SMB_Hdr(pkt), SMB_negrNTLM_sk_offset);
+	Con_Handle->SvrTZ = SVAL(SMB_Hdr(pkt), SMB_negrNTLM_stz_offset);
+	Con_Handle->Encrypt_Key_Len =
+	    CVAL(SMB_Hdr(pkt), SMB_negrNTLM_ekl_offset);
 
-    strncpy(p, Con_Handle -> Svr_PDom, sizeof(Con_Handle -> Svr_PDom) - 1);
+	p = (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset);
+	memcpy(Con_Handle->Encrypt_Key, p, 8);
+	p =
+	    (SMB_Hdr(pkt) + SMB_negrNTLM_buf_offset +
+	    Con_Handle->Encrypt_Key_Len);
 
-    break;
+	strncpy(p, Con_Handle->Svr_PDom, sizeof(Con_Handle->Svr_PDom) - 1);
 
-  default:
+	break;
+
+    default:
 
 #ifdef DEBUG
-    fprintf(stderr, "Unknown NegProt response format ... Ignored\n");
-    fprintf(stderr, "  wct = %i\n", CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset));
+	fprintf(stderr, "Unknown NegProt response format ... Ignored\n");
+	fprintf(stderr, "  wct = %i\n", CVAL(SMB_Hdr(pkt), SMB_hdr_wct_offset));
 #endif
 
-    break;
-  }
+	break;
+    }
 
 #ifdef DEBUG
-  fprintf(stderr, "Protocol selected is: %i:%s\n", prot, Prots[prot]);
+    fprintf(stderr, "Protocol selected is: %i:%s\n", prot, Prots[prot]);
 #endif
 
-  RFCNB_Free_Pkt(pkt);
-  return(0);
+    RFCNB_Free_Pkt(pkt);
+    return (0);
 
 }
 
 /* Get our hostname */
 
-void SMB_Get_My_Name(char *name, int len)
-
-{ int loc;
+void
+SMB_Get_My_Name(char *name, int len)
+{
+    int loc;
 
-  if (gethostname(name, len) < 0) { /* Error getting name */
+    if (gethostname(name, len) < 0) {	/* Error getting name */
 
-    strncpy(name, "unknown", len);
+	strncpy(name, "unknown", len);
 
-    /* Should check the error */
+	/* Should check the error */
 
 #ifdef DEBUG
-    fprintf(stderr, "gethostname in SMB_Get_My_Name returned error:");
-    perror("");
+	fprintf(stderr, "gethostname in SMB_Get_My_Name returned error:");
+	perror("");
 #endif
 
-  }
+    }
 
-  /* only keep the portion up to the first "." */
+    /* only keep the portion up to the first "." */
 
 
 }
 
 /* Send a TCON to the remote server ...               */
 
-SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type Con_Handle, 
-				SMB_Tree_Handle Tree_Handle,
-				char *path, 
-				char *password,
-				char *device)
-
-{ struct RFCNB_Pkt *pkt;
-  int param_len, i, pkt_len;
-  char *p;
-  SMB_Tree_Handle tree;
+SMB_Tree_Handle
+SMB_TreeConnect(SMB_Handle_Type Con_Handle,
+SMB_Tree_Handle Tree_Handle, char *path, char *password, char *device)
+{
+    struct RFCNB_Pkt *pkt;
+    int param_len, i, pkt_len;
+    char *p;
+    SMB_Tree_Handle tree;
 
-  /* Figure out how much space is needed for path, password, dev ... */
+    /* Figure out how much space is needed for path, password, dev ... */
 
-  if (path == NULL | password == NULL | device == NULL) {
+    if (path == NULL | password == NULL | device == NULL) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Bad parameter passed to SMB_TreeConnect\n");
+	fprintf(stderr, "Bad parameter passed to SMB_TreeConnect\n");
 #endif
 
-    SMBlib_errno = SMBlibE_BadParam;
-    return(NULL);
+	SMBlib_errno = SMBlibE_BadParam;
+	return (NULL);
+
+    }
 
-  }
+    /* The + 2 is because of the \0 and the marker ...                    */
 
-  /* The + 2 is because of the \0 and the marker ...                    */
+    param_len = strlen(path) + 2 + strlen(password) + 2 + strlen(device) + 2;
 
-  param_len = strlen(path) + 2 + strlen(password) + 2 + strlen(device) + 2;
+    /* The -1 accounts for the one byte smb_buf we have because some systems */
+    /* don't like char msg_buf[]                                             */
 
-  /* The -1 accounts for the one byte smb_buf we have because some systems */
-  /* don't like char msg_buf[]                                             */
+    pkt_len = SMB_tcon_len + param_len;
 
-  pkt_len = SMB_tcon_len + param_len;
+    pkt = (struct RFCNB_Pkt *) RFCNB_Alloc_Pkt(pkt_len);
 
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
+    if (pkt == NULL) {
 
-  if (pkt == NULL) {
+	SMBlib_errno = SMBlibE_NoSpace;
+	return (NULL);		/* Should handle the error */
 
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(NULL); /* Should handle the error */
+    }
 
-  }
+    /* Now allocate a tree for this to go into ... */
 
-  /* Now allocate a tree for this to go into ... */
+    if (Tree_Handle == NULL) {
 
-  if (Tree_Handle == NULL) {
+	tree = (SMB_Tree_Handle) malloc(sizeof(struct SMB_Tree_Structure));
 
-    tree = (SMB_Tree_Handle)malloc(sizeof(struct SMB_Tree_Structure));
+	if (tree == NULL) {
 
-    if (tree == NULL) {
-    
-      RFCNB_Free_Pkt(pkt);
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(NULL);
-      
-    }
-  }
-  else {
+	    RFCNB_Free_Pkt(pkt);
+	    SMBlib_errno = SMBlibE_NoSpace;
+	    return (NULL);
 
-    tree = Tree_Handle;
+	}
+    } else {
 
-  }
+	tree = Tree_Handle;
+
+    }
 
-  tree -> next = tree -> prev = NULL;
-  tree -> con = Con_Handle;
-  strncpy(tree -> path, path, sizeof(tree -> path));
-  strncpy(tree -> device_type, device, sizeof(tree -> device_type));
+    tree->next = tree->prev = NULL;
+    tree->con = Con_Handle;
+    strncpy(tree->path, path, sizeof(tree->path));
+    strncpy(tree->device_type, device, sizeof(tree->device_type));
 
-  /* Now plug in the values ... */
+    /* Now plug in the values ... */
 
-  bzero(SMB_Hdr(pkt), SMB_tcon_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtcon;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
+    bzero(SMB_Hdr(pkt), SMB_tcon_len);
+    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);	/* Plunk in IDF */
+    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtcon;
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle->mid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle->uid);
+    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
 
-  SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, param_len);
+    SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, param_len);
 
-  /* Now copy the param strings in with the right stuff */
+    /* Now copy the param strings in with the right stuff */
 
-  p = (char *)(SMB_Hdr(pkt) + SMB_tcon_buf_offset);
-  *p = SMBasciiID;
-  strcpy(p + 1, path);
-  p = p + strlen(path) + 2;
-  *p = SMBasciiID;
-  strcpy(p + 1, password);
-  p = p + strlen(password) + 2;
-  *p = SMBasciiID;
-  strcpy(p + 1, device);
+    p = (char *) (SMB_Hdr(pkt) + SMB_tcon_buf_offset);
+    *p = SMBasciiID;
+    strcpy(p + 1, path);
+    p = p + strlen(path) + 2;
+    *p = SMBasciiID;
+    strcpy(p + 1, password);
+    p = p + strlen(password) + 2;
+    *p = SMBasciiID;
+    strcpy(p + 1, device);
 
-  /* Now send the packet and sit back ... */
+    /* Now send the packet and sit back ... */
 
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
+    if (RFCNB_Send(Con_Handle->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error sending TCon request\n");
+	fprintf(stderr, "Error sending TCon request\n");
 #endif
 
-    if (Tree_Handle == NULL)
-      free(tree);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed;
-    return(NULL);
+	if (Tree_Handle == NULL)
+	    free(tree);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_SendFailed;
+	return (NULL);
 
-  }
+    }
 
-  /* Now get the response ... */
+    /* Now get the response ... */
 
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
+    if (RFCNB_Recv(Con_Handle->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error receiving response to TCon\n");
+	fprintf(stderr, "Error receiving response to TCon\n");
 #endif
 
-    if (Tree_Handle == NULL) 
-      free(tree);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed;
-    return(NULL);
+	if (Tree_Handle == NULL)
+	    free(tree);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_RecvFailed;
+	return (NULL);
 
-  }
+    }
 
-  /* Check out the response type ... */
+    /* Check out the response type ... */
 
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
+    if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {	/* Process error */
 
 #ifdef DEBUG
-    fprintf(stderr, "SMB_TCon failed with errorclass = %i, Error Code = %i\n",
-	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-	    SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
+	fprintf(stderr,
+	    "SMB_TCon failed with errorclass = %i, Error Code = %i\n",
+	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset), SVAL(SMB_Hdr(pkt),
+		SMB_hdr_err_offset));
 #endif
 
-    if (Tree_Handle == NULL)
-      free(tree);
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(NULL);
+	if (Tree_Handle == NULL)
+	    free(tree);
+	SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_Remote;
+	return (NULL);
 
-  }
+    }
 
-  tree -> tid = SVAL(SMB_Hdr(pkt), SMB_tconr_tid_offset);
-  tree -> mbs = SVAL(SMB_Hdr(pkt), SMB_tconr_mbs_offset);
+    tree->tid = SVAL(SMB_Hdr(pkt), SMB_tconr_tid_offset);
+    tree->mbs = SVAL(SMB_Hdr(pkt), SMB_tconr_mbs_offset);
 
 #ifdef DEBUG
-  fprintf(stderr, "TConn succeeded, with TID=%i, Max Xmit=%i\n",
-                 tree -> tid, tree -> mbs);
+    fprintf(stderr, "TConn succeeded, with TID=%i, Max Xmit=%i\n",
+	tree->tid, tree->mbs);
 #endif
 
-  /* Now link the Tree to the Server Structure ... */
+    /* Now link the Tree to the Server Structure ... */
 
-  if (Con_Handle -> first_tree == NULL) {
+    if (Con_Handle->first_tree == NULL) {
 
-    Con_Handle -> first_tree == tree;
-    Con_Handle -> last_tree == tree;
+	Con_Handle->first_tree == tree;
+	Con_Handle->last_tree == tree;
 
-  }
-  else {
+    } else {
 
-    Con_Handle -> last_tree -> next = tree;
-    tree -> prev = Con_Handle -> last_tree;
-    Con_Handle -> last_tree = tree;
+	Con_Handle->last_tree->next = tree;
+	tree->prev = Con_Handle->last_tree;
+	Con_Handle->last_tree = tree;
 
-  }
+    }
 
-  RFCNB_Free_Pkt(pkt);
-  return(tree); 
+    RFCNB_Free_Pkt(pkt);
+    return (tree);
 
 }
 
-int SMB_TreeDisconnect(SMB_Tree_Handle Tree_Handle, BOOL discard)
-
-{ struct RFCNB_Pkt *pkt;
-  int pkt_len;
+int
+SMB_TreeDisconnect(SMB_Tree_Handle Tree_Handle, BOOL discard)
+{
+    struct RFCNB_Pkt *pkt;
+    int pkt_len;
 
-  pkt_len = SMB_tdis_len;
+    pkt_len = SMB_tdis_len;
 
-  pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
+    pkt = (struct RFCNB_Pkt *) RFCNB_Alloc_Pkt(pkt_len);
 
-  if (pkt == NULL) {
+    if (pkt == NULL) {
 
-    SMBlib_errno = SMBlibE_NoSpace;
-    return(SMBlibE_BAD); /* Should handle the error */
+	SMBlib_errno = SMBlibE_NoSpace;
+	return (SMBlibE_BAD);	/* Should handle the error */
 
-  }
+    }
 
-  /* Now plug in the values ... */
+    /* Now plug in the values ... */
 
-  bzero(SMB_Hdr(pkt), SMB_tdis_len);
-  SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-  *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtdis;
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Tree_Handle -> con -> pid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Tree_Handle -> con -> mid);
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Tree_Handle -> con -> uid);
-  *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
+    bzero(SMB_Hdr(pkt), SMB_tdis_len);
+    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);	/* Plunk in IDF */
+    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBtdis;
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Tree_Handle->con->pid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Tree_Handle->con->mid);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Tree_Handle->con->uid);
+    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 0;
 
-  SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, Tree_Handle -> tid);
-  SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, 0);
+    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, Tree_Handle->tid);
+    SSVAL(SMB_Hdr(pkt), SMB_tcon_bcc_offset, 0);
 
-  /* Now send the packet and sit back ... */
+    /* Now send the packet and sit back ... */
 
-  if (RFCNB_Send(Tree_Handle -> con -> Trans_Connect, pkt, pkt_len) < 0){
+    if (RFCNB_Send(Tree_Handle->con->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error sending TDis request\n");
+	fprintf(stderr, "Error sending TDis request\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_SendFailed;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_SendFailed;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Now get the response ... */
+    /* Now get the response ... */
 
-  if (RFCNB_Recv(Tree_Handle -> con -> Trans_Connect, pkt, pkt_len) < 0) {
+    if (RFCNB_Recv(Tree_Handle->con->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error receiving response to TCon\n");
+	fprintf(stderr, "Error receiving response to TCon\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = -SMBlibE_RecvFailed;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = -SMBlibE_RecvFailed;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Check out the response type ... */
+    /* Check out the response type ... */
 
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
+    if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {	/* Process error */
 
 #ifdef DEBUG
-    fprintf(stderr, "SMB_TDis failed with errorclass = %i, Error Code = %i\n",
-	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-	    SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
+	fprintf(stderr,
+	    "SMB_TDis failed with errorclass = %i, Error Code = %i\n",
+	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset), SVAL(SMB_Hdr(pkt),
+		SMB_hdr_err_offset));
 #endif
 
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
+	SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_Remote;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  Tree_Handle -> tid = 0xFFFF;        /* Invalid TID */
-  Tree_Handle -> mbs = 0;             /* Invalid     */
+    Tree_Handle->tid = 0xFFFF;	/* Invalid TID */
+    Tree_Handle->mbs = 0;	/* Invalid     */
 
 #ifdef DEBUG
 
-  fprintf(stderr, "Tree disconnect successful ...\n");
+    fprintf(stderr, "Tree disconnect successful ...\n");
 
 #endif
 
-  /* What about the tree handle ? */
+    /* What about the tree handle ? */
 
-  if (discard == TRUE) { /* Unlink it and free it ... */
+    if (discard == TRUE) {	/* Unlink it and free it ... */
 
-    if (Tree_Handle -> next == NULL)
-      Tree_Handle -> con -> first_tree = Tree_Handle -> prev;
-    else
-      Tree_Handle -> next -> prev = Tree_Handle -> prev;
+	if (Tree_Handle->next == NULL)
+	    Tree_Handle->con->first_tree = Tree_Handle->prev;
+	else
+	    Tree_Handle->next->prev = Tree_Handle->prev;
 
-    if (Tree_Handle -> prev == NULL)
-      Tree_Handle -> con -> last_tree = Tree_Handle -> next;
-    else
-      Tree_Handle -> prev -> next = Tree_Handle -> next;
+	if (Tree_Handle->prev == NULL)
+	    Tree_Handle->con->last_tree = Tree_Handle->next;
+	else
+	    Tree_Handle->prev->next = Tree_Handle->next;
 
-  }
+    }
 
-  RFCNB_Free_Pkt(pkt);
-  return(0);
+    RFCNB_Free_Pkt(pkt);
+    return (0);
 
 }
 
 /* Pick up the last LMBlib error ... */
 
-int SMB_Get_Last_Error()
-
+int
+SMB_Get_Last_Error()
 {
 
-  return(SMBlib_errno);
+    return (SMBlib_errno);
 
 }
 
 /* Pick up the last error returned in an SMB packet          */
 /* We will need macros to extract error class and error code */
 
-int SMB_Get_Last_SMB_Err()
-
+int
+SMB_Get_Last_SMB_Err()
 {
 
-  return(SMBlib_SMB_Error);
+    return (SMBlib_SMB_Error);
 
 }
 
@@ -735,55 +740,55 @@
 
 static char *SMBlib_Error_Messages[] = {
 
-  "Request completed sucessfully.",
-  "Server returned a non-zero SMB Error Class and Code.",
-  "A lower layer protocol error occurred.",
-  "Function not yet implemented.",
-  "The protocol negotiated does not support the request.",
-  "No space available for operation.",
-  "One or more bad parameters passed.",
-  "None of the protocols we offered were accepted.",
-  "The attempt to send an SMB request failed. See protocol error info.",
-  "The attempt to get an SMB response failed. See protocol error info.",
-  "The logon request failed, but you were logged in as guest.",
-  "The attempt to call the remote server failed. See protocol error info.",
-  "The protocol dialect specified in a NegProt and accepted by the server is unknown.",
-  /* This next one simplifies error handling */
-  "No such error code.",
-  NULL};
-
-int SMB_Get_Error_Msg(int msg, char *msgbuf, int len)
+    "Request completed sucessfully.",
+    "Server returned a non-zero SMB Error Class and Code.",
+    "A lower layer protocol error occurred.",
+    "Function not yet implemented.",
+    "The protocol negotiated does not support the request.",
+    "No space available for operation.",
+    "One or more bad parameters passed.",
+    "None of the protocols we offered were accepted.",
+    "The attempt to send an SMB request failed. See protocol error info.",
+    "The attempt to get an SMB response failed. See protocol error info.",
+    "The logon request failed, but you were logged in as guest.",
+    "The attempt to call the remote server failed. See protocol error info.",
+    "The protocol dialect specified in a NegProt and accepted by the server is unknown.",
+    /* This next one simplifies error handling */
+    "No such error code.",
+    NULL
+};
 
+int
+SMB_Get_Error_Msg(int msg, char *msgbuf, int len)
 {
 
-  if (msg >= 0) {
+    if (msg >= 0) {
 
-    strncpy(msgbuf, 
-	    SMBlib_Error_Messages[msg>SMBlibE_NoSuchMsg?SMBlibE_NoSuchMsg:msg],
-	    len - 1);
-    msgbuf[len - 1] = 0; /* Make sure it is a string */
-  }
-  else { /* Add the lower layer message ... */
+	strncpy(msgbuf,
+	    SMBlib_Error_Messages[msg >
+    SMBlibE_NoSuchMsg ? SMBlibE_NoSuchMsg : msg], len - 1);
+	msgbuf[len - 1] = 0;	/* Make sure it is a string */
+    } else {			/* Add the lower layer message ... */
 
-    char prot_msg[1024];
+	char prot_msg[1024];
 
-    msg = -msg;   /* Make it positive */
+	msg = -msg;		/* Make it positive */
 
-    strncpy(msgbuf,
-	    SMBlib_Error_Messages[msg>SMBlibE_NoSuchMsg?SMBlibE_NoSuchMsg:msg],
-	    len - 1);
+	strncpy(msgbuf,
+	    SMBlib_Error_Messages[msg >
+    SMBlibE_NoSuchMsg ? SMBlibE_NoSuchMsg : msg], len - 1);
 
-    msgbuf[len - 1] = 0; /* make sure it is a string */
+	msgbuf[len - 1] = 0;	/* make sure it is a string */
 
-    if (strlen(msgbuf) < len) { /* If there is space, put rest in */
+	if (strlen(msgbuf) < len) {	/* If there is space, put rest in */
 
-      strncat(msgbuf, "\n\t", len - strlen(msgbuf));
+	    strncat(msgbuf, "\n\t", len - strlen(msgbuf));
 
-      RFCNB_Get_Error(prot_msg, sizeof(prot_msg) - 1);
+	    RFCNB_Get_Error(prot_msg, sizeof(prot_msg) - 1);
 
-      strncat(msgbuf, prot_msg, len - strlen(msgbuf));
+	    strncat(msgbuf, prot_msg, len - strlen(msgbuf));
 
+	}
     }
-  }
 
 }
Index: squid/auth_modules/MSNT/smblib.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smblib.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smblib.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smblib.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX SMBlib NetBIOS implementation
-
    Version 1.0
    SMBlib Routines
 
@@ -37,36 +36,36 @@
 
 /* Initialize the SMBlib package     */
 
-int SMB_Init()
-
+int
+SMB_Init()
 {
 
-  SMBlib_State = SMB_State_Started;
+    SMBlib_State = SMB_State_Started;
 
-  signal(SIGPIPE, SIG_IGN);   /* Ignore these ... */
+    signal(SIGPIPE, SIG_IGN);	/* Ignore these ... */
 
 /* If SMBLIB_Instrument is defines, turn on the instrumentation stuff */
 #ifdef SMBLIB_INSTRUMENT
 
-  SMBlib_Instrument_Init();
+    SMBlib_Instrument_Init();
 
 #endif
 
-  return 0;
+    return 0;
 
 }
 
-int SMB_Term()
-
+int
+SMB_Term()
 {
 
 #ifdef SMBLIB_INSTRUMENT
 
-  SMBlib_Instrument_Term();       /* Clean up and print results */
+    SMBlib_Instrument_Term();	/* Clean up and print results */
 
 #endif
 
-  return 0;
+    return 0;
 
 }
 
@@ -74,118 +73,117 @@
 /* We have other helper routines to set variables                     */
 
 SMB_Handle_Type SMB_Create_Con_Handle()
-
 {
 
-  SMBlib_errno = SMBlibE_NotImpl;
-  return(NULL);
+    SMBlib_errno = SMBlibE_NotImpl;
+    return (NULL);
 
 }
 
-int SMBlib_Set_Sock_NoDelay(SMB_Handle_Type Con_Handle, BOOL yn)
-
+int
+SMBlib_Set_Sock_NoDelay(SMB_Handle_Type Con_Handle, BOOL yn)
 {
 
 
-  if (RFCNB_Set_Sock_NoDelay(Con_Handle -> Trans_Connect, yn) < 0) {
+    if (RFCNB_Set_Sock_NoDelay(Con_Handle->Trans_Connect, yn) < 0) {
 
 #ifdef DEBUG
 #endif
 
-    fprintf(stderr, "Setting no-delay on TCP socket failed ...\n");
+	fprintf(stderr, "Setting no-delay on TCP socket failed ...\n");
 
-  }
+    }
 
-  return(0);
+    return (0);
 
 }
 
 /* SMB_Connect_Server: Connect to a server, but don't negotiate protocol */
 /* or anything else ...                                                  */
 
-SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
-				   char *server, char *NTdomain)
+SMB_Handle_Type
+SMB_Connect_Server(SMB_Handle_Type Con_Handle, char *server, char *NTdomain)
+{
+    SMB_Handle_Type con;
+    char temp[80], called[80], calling[80], *address;
+    int i;
 
-{ SMB_Handle_Type con;
-  char temp[80], called[80], calling[80], *address;
-  int i;
+    /* Get a connection structure if one does not exist */
 
-  /* Get a connection structure if one does not exist */
+    con = Con_Handle;
 
-  con = Con_Handle;
+    if (Con_Handle == NULL) {
 
-  if (Con_Handle == NULL) {
+	if ((con =
+		(struct SMB_Connect_Def *) malloc(sizeof(struct
+		     SMB_Connect_Def))) == NULL) {
 
-    if ((con = (struct SMB_Connect_Def *)malloc(sizeof(struct SMB_Connect_Def))) == NULL) {
 
+	    SMBlib_errno = SMBlibE_NoSpace;
+	    return NULL;
+	}
 
-      SMBlib_errno = SMBlibE_NoSpace;
-      return NULL;
     }
 
-  }
+    /* Init some things ... */
 
-  /* Init some things ... */
+    strcpy(con->service, "");
+    strcpy(con->username, "");
+    strcpy(con->password, "");
+    strcpy(con->sock_options, "");
+    strcpy(con->address, "");
+    strcpy(con->desthost, server);
+    strcpy(con->PDomain, NTdomain);
+    strcpy(con->OSName, SMBLIB_DEFAULT_OSNAME);
+    strcpy(con->LMType, SMBLIB_DEFAULT_LMTYPE);
+    con->first_tree = con->last_tree = NULL;
 
-  strcpy(con -> service, "");
-  strcpy(con -> username, "");
-  strcpy(con -> password, "");
-  strcpy(con -> sock_options, "");
-  strcpy(con -> address, "");
-  strcpy(con -> desthost, server);
-  strcpy(con -> PDomain, NTdomain);
-  strcpy(con -> OSName, SMBLIB_DEFAULT_OSNAME);
-  strcpy(con -> LMType, SMBLIB_DEFAULT_LMTYPE);
-  con -> first_tree = con -> last_tree = NULL; 
+    SMB_Get_My_Name(con->myname, sizeof(con->myname));
 
-  SMB_Get_My_Name(con -> myname, sizeof(con -> myname));
+    con->port = 0;		/* No port selected */
 
-  con -> port = 0;                    /* No port selected */
+    /* Get some things we need for the SMB Header */
 
-  /* Get some things we need for the SMB Header */
+    con->pid = getpid();
+    con->mid = con->pid;	/* This will do for now ... */
+    con->uid = 0;		/* Until we have done a logon, no uid ... */
+    con->gid = getgid();
 
-  con -> pid = getpid();
-  con -> mid = con -> pid;      /* This will do for now ... */
-  con -> uid = 0;               /* Until we have done a logon, no uid ... */ 
-  con -> gid = getgid();
+    /* Now connect to the remote end, but first upper case the name of the
+     * service we are going to call, sine some servers want it in uppercase */
 
-  /* Now connect to the remote end, but first upper case the name of the
-     service we are going to call, sine some servers want it in uppercase */
+    for (i = 0; i < strlen(server); i++)
+	called[i] = toupper(server[i]);
 
-  for (i=0; i < strlen(server); i++)
-    called[i] = toupper(server[i]);
-		       
-  called[strlen(server)] = 0;    /* Make it a string */
+    called[strlen(server)] = 0;	/* Make it a string */
 
-  for (i=0; i < strlen(con -> myname); i++)
-    calling[i] = toupper(con -> myname[i]);
-		       
-  calling[strlen(con -> myname)] = 0;    /* Make it a string */
+    for (i = 0; i < strlen(con->myname); i++)
+	calling[i] = toupper(con->myname[i]);
 
-  if (strcmp(con -> address, "") == 0)
-    address = con -> desthost;
-  else
-    address = con -> address;
+    calling[strlen(con->myname)] = 0;	/* Make it a string */
 
-  con -> Trans_Connect = RFCNB_Call(called,
-				    calling,
-				    address, /* Protocol specific */
-				    con -> port);
+    if (strcmp(con->address, "") == 0)
+	address = con->desthost;
+    else
+	address = con->address;
 
-  /* Did we get one? */
+    con->Trans_Connect = RFCNB_Call(called, calling, address,	/* Protocol specific */
+	con->port);
 
-  if (con -> Trans_Connect == NULL) {
+    /* Did we get one? */
 
-    if (Con_Handle == NULL) {
-      Con_Handle = NULL;
-      free(con);
-    }
-    SMBlib_errno = -SMBlibE_CallFailed;
-    return NULL;
+    if (con->Trans_Connect == NULL) {
+
+	if (Con_Handle == NULL) {
+	    Con_Handle = NULL;
+	    free(con);
+	}
+	SMBlib_errno = -SMBlibE_CallFailed;
+	return NULL;
 
-  }
+    }
 
-  return(con);
+    return (con);
 
 }
 
@@ -193,366 +191,361 @@
 /* If Con_Handle == NULL then create a handle and connect, otherwise  */
 /* use the handle passed                                              */
 
-char *SMB_Prots_Restrict[] = {"PC NETWORK PROGRAM 1.0",
-			      NULL};
+char *SMB_Prots_Restrict[] = { "PC NETWORK PROGRAM 1.0",
+    NULL
+};
+
+
+SMB_Handle_Type
+SMB_Connect(SMB_Handle_Type Con_Handle,
+SMB_Tree_Handle * tree, char *service, char *username, char *password)
+ {
+    SMB_Handle_Type con;
+    char *host, *address;
+    char temp[80], called[80], calling[80];
+    int i;
 
+    /* Get a connection structure if one does not exist */
 
-SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
-			    SMB_Tree_Handle *tree,
-			    char *service, 
-			    char *username, 
-			    char *password)
+    con = Con_Handle;
 
-{ SMB_Handle_Type con;
-  char *host, *address;
-  char temp[80], called[80], calling[80];
-  int i;
-
-  /* Get a connection structure if one does not exist */
+    if (Con_Handle == NULL) {
 
-  con = Con_Handle;
+	if ((con =
+		(struct SMB_Connect_Def *) malloc(sizeof(struct
+		     SMB_Connect_Def))) == NULL) {
+
+	    SMBlib_errno = SMBlibE_NoSpace;
+	    return NULL;
+	}
 
-  if (Con_Handle == NULL) {
+    }
 
-    if ((con = (struct SMB_Connect_Def *)malloc(sizeof(struct SMB_Connect_Def))) == NULL) {
+    /* Init some things ... */
 
-      SMBlib_errno = SMBlibE_NoSpace;
-      return NULL;
-    }
+    strcpy(con->service, service);
+    strcpy(con->username, username);
+    strcpy(con->password, password);
+    strcpy(con->sock_options, "");
+    strcpy(con->address, "");
+    strcpy(con->PDomain, SMBLIB_DEFAULT_DOMAIN);
+    strcpy(con->OSName, SMBLIB_DEFAULT_OSNAME);
+    strcpy(con->LMType, SMBLIB_DEFAULT_LMTYPE);
+    con->first_tree = con->last_tree = NULL;
 
-  }
+    SMB_Get_My_Name(con->myname, sizeof(con->myname));
 
-  /* Init some things ... */
+    con->port = 0;		/* No port selected */
 
-  strcpy(con -> service, service);
-  strcpy(con -> username, username);
-  strcpy(con -> password, password);
-  strcpy(con -> sock_options, "");
-  strcpy(con -> address, "");
-  strcpy(con -> PDomain, SMBLIB_DEFAULT_DOMAIN);
-  strcpy(con -> OSName, SMBLIB_DEFAULT_OSNAME);
-  strcpy(con -> LMType, SMBLIB_DEFAULT_LMTYPE);
-  con -> first_tree = con -> last_tree = NULL;
+    /* Get some things we need for the SMB Header */
 
-  SMB_Get_My_Name(con -> myname, sizeof(con -> myname));
+    con->pid = getpid();
+    con->mid = con->pid;	/* This will do for now ... */
+    con->uid = 0;		/* Until we have done a logon, no uid */
+    con->gid = getgid();
 
-  con -> port = 0;                    /* No port selected */
+    /* Now figure out the host portion of the service */
 
-  /* Get some things we need for the SMB Header */
+    strcpy(temp, service);
+    host = strtok(temp, "/\\");	/* Separate host name portion */
+    strcpy(con->desthost, host);
 
-  con -> pid = getpid();
-  con -> mid = con -> pid;      /* This will do for now ... */
-  con -> uid = 0;               /* Until we have done a logon, no uid */
-  con -> gid = getgid();
+    /* Now connect to the remote end, but first upper case the name of the
+     * service we are going to call, sine some servers want it in uppercase */
 
-  /* Now figure out the host portion of the service */
+    for (i = 0; i < strlen(host); i++)
+	called[i] = toupper(host[i]);
 
-  strcpy(temp, service);
-  host = strtok(temp, "/\\");     /* Separate host name portion */
-  strcpy(con -> desthost, host);
+    called[strlen(host)] = 0;	/* Make it a string */
 
-  /* Now connect to the remote end, but first upper case the name of the
-     service we are going to call, sine some servers want it in uppercase */
+    for (i = 0; i < strlen(con->myname); i++)
+	calling[i] = toupper(con->myname[i]);
 
-  for (i=0; i < strlen(host); i++)
-    called[i] = toupper(host[i]);
-		       
-  called[strlen(host)] = 0;    /* Make it a string */
+    calling[strlen(con->myname)] = 0;	/* Make it a string */
 
-  for (i=0; i < strlen(con -> myname); i++)
-    calling[i] = toupper(con -> myname[i]);
-		       
-  calling[strlen(con -> myname)] = 0;    /* Make it a string */
+    if (strcmp(con->address, "") == 0)
+	address = con->desthost;
+    else
+	address = con->address;
 
-  if (strcmp(con -> address, "") == 0)
-    address = con -> desthost;
-  else
-    address = con -> address;
+    con->Trans_Connect = RFCNB_Call(called, calling, address,	/* Protocol specific */
+	con->port);
 
-  con -> Trans_Connect = RFCNB_Call(called,
-				    calling,
-				    address, /* Protocol specific */
-				    con -> port);
+    /* Did we get one? */
 
-  /* Did we get one? */
+    if (con->Trans_Connect == NULL) {
 
-  if (con -> Trans_Connect == NULL) {
+	if (Con_Handle == NULL) {
+	    free(con);
+	    Con_Handle = NULL;
+	}
+	SMBlib_errno = -SMBlibE_CallFailed;
+	return NULL;
 
-    if (Con_Handle == NULL) {
-      free(con);
-      Con_Handle = NULL;
     }
-    SMBlib_errno = -SMBlibE_CallFailed;
-    return NULL;
-
-  }
 
-  /* Now, negotiate the protocol */
+    /* Now, negotiate the protocol */
 
-  if (SMB_Negotiate(con, SMB_Prots_Restrict) < 0) {
+    if (SMB_Negotiate(con, SMB_Prots_Restrict) < 0) {
 
-    /* Hmmm what should we do here ... We have a connection, but could not
-       negotiate ...                                                      */
+	/* Hmmm what should we do here ... We have a connection, but could not
+	 * negotiate ...                                                      */
 
-    return NULL;
+	return NULL;
 
-  }
+    }
 
-  /* Now connect to the service ... */
+    /* Now connect to the service ... */
 
-  if ((*tree = SMB_TreeConnect(con, NULL, service, password, "A:")) == NULL) {
+    if ((*tree = SMB_TreeConnect(con, NULL, service, password, "A:")) == NULL) {
 
-    return NULL;
+	return NULL;
 
-  }
+    }
 
-  return(con);
+    return (con);
 
 }
 
 /* Logon to the server. That is, do a session setup if we can. We do not do */
 /* Unicode yet!                                                             */
 
-int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, 
-		     char *PassWord)
-
-{ struct RFCNB_Pkt *pkt;
-  int param_len, i, pkt_len, pass_len,a;
-  char *p, pword[128];
-
-  /* First we need a packet etc ... but we need to know what protocol has  */
-  /* been negotiated to figure out if we can do it and what SMB format to  */
-  /* use ...                                                               */
+int
+SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, char *PassWord)
+{
+    struct RFCNB_Pkt *pkt;
+    int param_len, i, pkt_len, pass_len, a;
+    char *p, pword[128];
+
+    /* First we need a packet etc ... but we need to know what protocol has  */
+    /* been negotiated to figure out if we can do it and what SMB format to  */
+    /* use ...                                                               */
 
-  if (Con_Handle -> protocol < SMB_P_LanMan1) {
+    if (Con_Handle->protocol < SMB_P_LanMan1) {
 
-    SMBlib_errno = SMBlibE_ProtLow;
-    return(SMBlibE_BAD);
+	SMBlib_errno = SMBlibE_ProtLow;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  strcpy(pword, PassWord);
+    strcpy(pword, PassWord);
 #ifdef PAM_SMB_ENC_PASS
-  if (Con_Handle -> encrypt_passwords)
-  {
-    pass_len=24;
-    SMBencrypt((uchar *) PassWord, (uchar *)Con_Handle -> Encrypt_Key,(uchar *)pword); 
-  } 
-  else 
+    if (Con_Handle->encrypt_passwords) {
+	pass_len = 24;
+	SMBencrypt((uchar *) PassWord, (uchar *) Con_Handle->Encrypt_Key,
+	    (uchar *) pword);
+    } else
 #endif
-	pass_len=strlen(pword);
+	pass_len = strlen(pword);
 
 
-  /* Now build the correct structure */
+    /* Now build the correct structure */
 
-  if (Con_Handle -> protocol < SMB_P_NT1) {
+    if (Con_Handle->protocol < SMB_P_NT1) {
 
-    param_len = strlen(UserName) + 1 + pass_len + 1 + 
-                strlen(Con_Handle -> PDomain) + 1 + 
-	        strlen(Con_Handle -> OSName) + 1;
+	param_len = strlen(UserName) + 1 + pass_len + 1 +
+	    strlen(Con_Handle->PDomain) + 1 + strlen(Con_Handle->OSName) + 1;
 
-    pkt_len = SMB_ssetpLM_len + param_len;
+	pkt_len = SMB_ssetpLM_len + param_len;
 
-    pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
+	pkt = (struct RFCNB_Pkt *) RFCNB_Alloc_Pkt(pkt_len);
 
-    if (pkt == NULL) {
+	if (pkt == NULL) {
 
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(SMBlibE_BAD); /* Should handle the error */
+	    SMBlib_errno = SMBlibE_NoSpace;
+	    return (SMBlibE_BAD);	/* Should handle the error */
 
-    }
+	}
 
-    bzero(SMB_Hdr(pkt), SMB_ssetpLM_len);
-    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 10;
-    *(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;    /* No extra command */
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
+	bzero(SMB_Hdr(pkt), SMB_ssetpLM_len);
+	SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);	/* Plunk in IDF */
+	*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle->mid);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle->uid);
+	*(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 10;
+	*(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;	/* No extra command */
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
 
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mbs_offset, SMBLIB_MAX_XMIT);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mmc_offset, 2);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_vcn_offset, Con_Handle -> pid);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_snk_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_pwl_offset, pass_len + 1);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_res_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_bcc_offset, param_len);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mbs_offset, SMBLIB_MAX_XMIT);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_mmc_offset, 2);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_vcn_offset, Con_Handle->pid);
+	SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_snk_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_pwl_offset, pass_len + 1);
+	SIVAL(SMB_Hdr(pkt), SMB_ssetpLM_res_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpLM_bcc_offset, param_len);
 
-    /* Now copy the param strings in with the right stuff */
+	/* Now copy the param strings in with the right stuff */
 
-    p = (char *)(SMB_Hdr(pkt) + SMB_ssetpLM_buf_offset);
+	p = (char *) (SMB_Hdr(pkt) + SMB_ssetpLM_buf_offset);
 
-    /* Copy  in password, then the rest. Password has a null at end */
+	/* Copy  in password, then the rest. Password has a null at end */
 
-    memcpy(p, pword, pass_len);
+	memcpy(p, pword, pass_len);
 
-    p = p + pass_len + 1;
+	p = p + pass_len + 1;
 
-    strcpy(p, UserName);
-    p = p + strlen(UserName);
-    *p = 0;
+	strcpy(p, UserName);
+	p = p + strlen(UserName);
+	*p = 0;
 
-    p = p + 1;
+	p = p + 1;
 
-    strcpy(p, Con_Handle -> PDomain);
-    p = p + strlen(Con_Handle -> PDomain);
-    *p = 0;
-    p = p + 1;
+	strcpy(p, Con_Handle->PDomain);
+	p = p + strlen(Con_Handle->PDomain);
+	*p = 0;
+	p = p + 1;
 
-    strcpy(p, Con_Handle -> OSName);
-    p = p + strlen(Con_Handle -> OSName);
-    *p = 0;
+	strcpy(p, Con_Handle->OSName);
+	p = p + strlen(Con_Handle->OSName);
+	*p = 0;
 
-  }
-  else {
+    } else {
 
-    /* We don't admit to UNICODE support ... */
+	/* We don't admit to UNICODE support ... */
 
-    param_len = strlen(UserName) + 1 + pass_len + 
-                strlen(Con_Handle -> PDomain) + 1 + 
-	        strlen(Con_Handle -> OSName) + 1 +
-		strlen(Con_Handle -> LMType) + 1;
+	param_len = strlen(UserName) + 1 + pass_len +
+	    strlen(Con_Handle->PDomain) + 1 +
+	    strlen(Con_Handle->OSName) + 1 + strlen(Con_Handle->LMType) + 1;
 
-    pkt_len = SMB_ssetpNTLM_len + param_len;
+	pkt_len = SMB_ssetpNTLM_len + param_len;
 
-    pkt = (struct RFCNB_Pkt *)RFCNB_Alloc_Pkt(pkt_len);
+	pkt = (struct RFCNB_Pkt *) RFCNB_Alloc_Pkt(pkt_len);
 
-    if (pkt == NULL) {
+	if (pkt == NULL) {
 
-      SMBlib_errno = SMBlibE_NoSpace;
-      return(-1); /* Should handle the error */
+	    SMBlib_errno = SMBlibE_NoSpace;
+	    return (-1);	/* Should handle the error */
 
-    }
+	}
 
-    bzero(SMB_Hdr(pkt), SMB_ssetpNTLM_len);
-    SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);  /* Plunk in IDF */
-    *(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle -> pid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle -> mid);
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle -> uid);
-    *(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 13;
-    *(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;    /* No extra command */
-    SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
+	bzero(SMB_Hdr(pkt), SMB_ssetpNTLM_len);
+	SIVAL(SMB_Hdr(pkt), SMB_hdr_idf_offset, SMB_DEF_IDF);	/* Plunk in IDF */
+	*(SMB_Hdr(pkt) + SMB_hdr_com_offset) = SMBsesssetupX;
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_pid_offset, Con_Handle->pid);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_tid_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_mid_offset, Con_Handle->mid);
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset, Con_Handle->uid);
+	*(SMB_Hdr(pkt) + SMB_hdr_wct_offset) = 13;
+	*(SMB_Hdr(pkt) + SMB_hdr_axc_offset) = 0xFF;	/* No extra command */
+	SSVAL(SMB_Hdr(pkt), SMB_hdr_axo_offset, 0);
 
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mbs_offset, SMBLIB_MAX_XMIT);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mmc_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_vcn_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_snk_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cipl_offset, pass_len);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cspl_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_res_offset, 0);
-    SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cap_offset, 0);
-    SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_bcc_offset, param_len);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mbs_offset, SMBLIB_MAX_XMIT);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_mmc_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_vcn_offset, 0);
+	SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_snk_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cipl_offset, pass_len);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cspl_offset, 0);
+	SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_res_offset, 0);
+	SIVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_cap_offset, 0);
+	SSVAL(SMB_Hdr(pkt), SMB_ssetpNTLM_bcc_offset, param_len);
 
-    /* Now copy the param strings in with the right stuff */
+	/* Now copy the param strings in with the right stuff */
 
-    p = (char *)(SMB_Hdr(pkt) + SMB_ssetpNTLM_buf_offset);
+	p = (char *) (SMB_Hdr(pkt) + SMB_ssetpNTLM_buf_offset);
 
-    /* Copy  in password, then the rest. Password has no null at end */
+	/* Copy  in password, then the rest. Password has no null at end */
 
-    memcpy(p, pword, pass_len);
+	memcpy(p, pword, pass_len);
 
-    p = p + pass_len;
+	p = p + pass_len;
 
-    strcpy(p, UserName);
-    p = p + strlen(UserName);
-    *p = 0;
+	strcpy(p, UserName);
+	p = p + strlen(UserName);
+	*p = 0;
 
-    p = p + 1;
+	p = p + 1;
 
-    strcpy(p, Con_Handle -> PDomain);
-    p = p + strlen(Con_Handle -> PDomain);
-  *p = 0;
-    p = p + 1;
+	strcpy(p, Con_Handle->PDomain);
+	p = p + strlen(Con_Handle->PDomain);
+	*p = 0;
+	p = p + 1;
 
-    strcpy(p, Con_Handle -> OSName);
-    p = p + strlen(Con_Handle -> OSName);
-    *p = 0;
-    p = p + 1;
+	strcpy(p, Con_Handle->OSName);
+	p = p + strlen(Con_Handle->OSName);
+	*p = 0;
+	p = p + 1;
 
-    strcpy(p, Con_Handle -> LMType);
-    p = p + strlen(Con_Handle -> LMType);
-    *p = 0;
+	strcpy(p, Con_Handle->LMType);
+	p = p + strlen(Con_Handle->LMType);
+	*p = 0;
 
-  }
+    }
 
-  /* Now send it and get a response */
+    /* Now send it and get a response */
 
-  if (RFCNB_Send(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0){
+    if (RFCNB_Send(Con_Handle->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error sending SessSetupX request\n");
+	fprintf(stderr, "Error sending SessSetupX request\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_SendFailed;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_SendFailed;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Now get the response ... */
+    /* Now get the response ... */
 
-  if (RFCNB_Recv(Con_Handle -> Trans_Connect, pkt, pkt_len) < 0) {
+    if (RFCNB_Recv(Con_Handle->Trans_Connect, pkt, pkt_len) < 0) {
 
 #ifdef DEBUG
-    fprintf(stderr, "Error receiving response to SessSetupAndX\n");
+	fprintf(stderr, "Error receiving response to SessSetupAndX\n");
 #endif
 
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_RecvFailed;
-    return(SMBlibE_BAD);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_RecvFailed;
+	return (SMBlibE_BAD);
 
-  }
+    }
 
-  /* Check out the response type ... */
+    /* Check out the response type ... */
 
-  if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {  /* Process error */
+    if (CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset) != SMBC_SUCCESS) {	/* Process error */
 
 #ifdef DEBUG
-    fprintf(stderr, "SMB_SessSetupAndX failed with errorclass = %i, Error Code = %i\n",
-	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset),
-	    SVAL(SMB_Hdr(pkt), SMB_hdr_err_offset));
+	fprintf(stderr,
+	    "SMB_SessSetupAndX failed with errorclass = %i, Error Code = %i\n",
+	    CVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset), SVAL(SMB_Hdr(pkt),
+		SMB_hdr_err_offset));
 #endif
 
-    SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
-    RFCNB_Free_Pkt(pkt);
-    SMBlib_errno = SMBlibE_Remote;
-    return(SMBlibE_BAD);
-
-  }
+	SMBlib_SMB_Error = IVAL(SMB_Hdr(pkt), SMB_hdr_rcls_offset);
+	RFCNB_Free_Pkt(pkt);
+	SMBlib_errno = SMBlibE_Remote;
+	return (SMBlibE_BAD);
 
+    }
 #ifdef DEBUG
-  fprintf(stderr, "SessSetupAndX response. Action = %i\n", 
-          SVAL(SMB_Hdr(pkt), SMB_ssetpr_act_offset));
+    fprintf(stderr, "SessSetupAndX response. Action = %i\n",
+	SVAL(SMB_Hdr(pkt), SMB_ssetpr_act_offset));
 #endif
 
-  /* Now pick up the UID for future reference ... */
+    /* Now pick up the UID for future reference ... */
 
-  Con_Handle -> uid = SVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset);
-  RFCNB_Free_Pkt(pkt);
+    Con_Handle->uid = SVAL(SMB_Hdr(pkt), SMB_hdr_uid_offset);
+    RFCNB_Free_Pkt(pkt);
 
-  return(0);
+    return (0);
 
 }
 
 
 /* Disconnect from the server, and disconnect all tree connects */
 
-int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle)
-
+int
+SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle)
 {
 
-  /* We just disconnect the connection for now ... */
+    /* We just disconnect the connection for now ... */
 
-  RFCNB_Hangup(Con_Handle -> Trans_Connect);
+    RFCNB_Hangup(Con_Handle->Trans_Connect);
 
-  if (!KeepHandle)
-    free(Con_Handle);
+    if (!KeepHandle)
+	free(Con_Handle);
 
-  return(0);
+    return (0);
 
 }
Index: squid/auth_modules/MSNT/smblib.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/smblib.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/smblib.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/smblib.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,5 +1,4 @@
 /* UNIX SMBlib NetBIOS implementation
-
    Version 1.0
    SMBlib Defines
 
@@ -39,8 +38,8 @@
 /* Connect to a server and give us back a handle. If Con == NULL, create */
 /* The handle and populate it with defaults                              */
 
-void *SMB_Connect(void *Con, void **tree, 
-		  char *name, char *User, char *Password);
+void *SMB_Connect(void *Con, void **tree,
+    char *name, char *User, char *Password);
 
 /* Negotiate a protocol                                                  */
 
@@ -48,8 +47,8 @@
 
 /* Connect to a tree ...                                                 */
 
-void *SMB_TreeConnect(void *con_handle, void *tree_handle, 
-		      char *path, char *password, char *dev);
+void *SMB_TreeConnect(void *con_handle, void *tree_handle,
+    char *path, char *password, char *dev);
 
 /* Disconnect a tree ...                                                 */
 
@@ -58,10 +57,8 @@
 /* Open a file                                                           */
 
 void *SMB_Open(void *tree_handle,
-	       void *file_handle,
-	       char *file_name,
-	       unsigned short mode,
-	       unsigned short search); 
+    void *file_handle,
+    char *file_name, unsigned short mode, unsigned short search);
 
 /* Close a file                                                          */
 
@@ -73,9 +70,7 @@
 int SMB_Discon(void *Con, BOOL KeepHandle);
 
 void *SMB_Create(void *Tree_Handle,
-	       void *File_Handle, 
-	       char *file_name, 
-  	       short search);
+    void *File_Handle, char *file_name, short search);
 
 int SMB_Delete(void *tree, char *file_name, short search);
 
@@ -92,6 +87,6 @@
 int SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
 
 void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
-			 char *service, char *st);
+    char *service, char *st);
 
 #define SMBLIB_DEFAULT_DOMAIN "anydom"
Index: squid/auth_modules/MSNT/std-defines.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/std-defines.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/std-defines.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/std-defines.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,6 +1,5 @@
 /* RFCNB Standard includes ... */
 /*
-
    SMBlib Standard Includes
 
    Copyright (C) 1996, Richard Sharpe
Index: squid/auth_modules/MSNT/std-includes.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/std-includes.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/std-includes.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/std-includes.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -1,6 +1,5 @@
 /* RFCNB Standard includes ... */
 /*
-
    RFCNB Standard Includes
 
    Copyright (C) 1996, Richard Sharpe
Index: squid/auth_modules/MSNT/valid.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/valid.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.30.1
diff -u -r1.1.1.1 -r1.1.1.1.30.1
--- squid/auth_modules/MSNT/valid.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/valid.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.30.1
@@ -4,36 +4,39 @@
 #include "smblib.h"
 #include "valid.h"
 
-int Valid_User(char *USERNAME,char *PASSWORD,char *SERVER,char *BACKUP, char *DOMAIN)
+int
+Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP,
+    char *DOMAIN)
 {
-  char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-			    "MICROSOFT NETWORKS 1.03",
-			    "MICROSOFT NETWORKS 3.0",
-			    "LANMAN1.0",
-			    "LM1.2X002",
-			    "Samba",
-			    "NT LM 0.12",
-			    "NT LANMAN 1.0",
-			    NULL};
-  void *con;
+    char *SMB_Prots[] = { "PC NETWORK PROGRAM 1.0",
+	"MICROSOFT NETWORKS 1.03",
+	"MICROSOFT NETWORKS 3.0",
+	"LANMAN1.0",
+	"LM1.2X002",
+	"Samba",
+	"NT LM 0.12",
+	"NT LANMAN 1.0",
+	NULL
+    };
+    void *con;
 
-  SMB_Init();
-  con = SMB_Connect_Server(NULL, SERVER, DOMAIN);
-  if (con == NULL) { /* Error ... */
-   con = SMB_Connect_Server(NULL, BACKUP, DOMAIN);
-   if (con == NULL) {
-   	return(NTV_SERVER_ERROR);   
-   }
-  }
-  if (SMB_Negotiate(con, SMB_Prots) < 0) { /* An error */
-    SMB_Discon(con,0);
-    return(NTV_PROTOCOL_ERROR);
-  }
-  if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
-    SMB_Discon(con,0);
-    return(NTV_LOGON_ERROR);
-  }
-  
-  SMB_Discon(con,0);
-  return(NTV_NO_ERROR);
+    SMB_Init();
+    con = SMB_Connect_Server(NULL, SERVER, DOMAIN);
+    if (con == NULL) {		/* Error ... */
+	con = SMB_Connect_Server(NULL, BACKUP, DOMAIN);
+	if (con == NULL) {
+	    return (NTV_SERVER_ERROR);
+	}
+    }
+    if (SMB_Negotiate(con, SMB_Prots) < 0) {	/* An error */
+	SMB_Discon(con, 0);
+	return (NTV_PROTOCOL_ERROR);
+    }
+    if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
+	SMB_Discon(con, 0);
+	return (NTV_LOGON_ERROR);
+    }
+
+    SMB_Discon(con, 0);
+    return (NTV_NO_ERROR);
 }
Index: squid/auth_modules/MSNT/valid.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/MSNT/Attic/valid.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.62.1
diff -u -r1.1.1.1 -r1.1.1.1.62.1
--- squid/auth_modules/MSNT/valid.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/MSNT/valid.h	27 Aug 2001 21:48:15 -0000	1.1.1.1.62.1
@@ -7,6 +7,7 @@
 #define NTV_PROTOCOL_ERROR 2
 #define NTV_LOGON_ERROR 3
 
-int Valid_User(char *USERNAME,char *PASSWORD,char *SERVER, char *BACKUP, char *DOMAIN);
+int Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP,
+    char *DOMAIN);
 
 #endif
Index: squid/auth_modules/NCSA/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/Makefile.in,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/auth_modules/NCSA/Makefile.in	6 Jan 2001 12:40:08 -0000	1.1.1.1.44.1
+++ squid/auth_modules/NCSA/Makefile.in	27 Aug 2001 21:48:15 -0000	1.1.1.1.44.1.2.1
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.1.44.1 2001/01/06 12:40:08 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:15 tolsty Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
Index: squid/auth_modules/NCSA/NCSA_auth.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/NCSA_auth.dsp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NCSA/NCSA_auth.dsp	30 Jun 2001 18:49:42 -0000	1.1.2.2
+++ squid/auth_modules/NCSA/NCSA_auth.dsp	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -40,21 +40,18 @@
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "Release"
 # PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "..\include" /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "NDEBUG"
-# ADD RSC /l 0x410 /d "NDEBUG"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /YX /FD /c
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /dll /machine:I386
-# SUBTRACT LINK32 /pdb:none
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib advapi32.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "NCSA_auth - Win32 Debug"
 
@@ -67,21 +64,18 @@
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "Debug"
 # PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /FR /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "_DEBUG"
-# ADD RSC /l 0x410 /d "_DEBUG"
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
Index: squid/auth_modules/NCSA/NCSA_auth.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/NCSA_auth.mak,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NCSA/NCSA_auth.mak	30 Jun 2001 18:49:42 -0000	1.1.2.2
+++ squid/auth_modules/NCSA/NCSA_auth.mak	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -39,16 +39,16 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\NCSA_auth.dll"
+ALL : "$(OUTDIR)\NCSA_auth.exe"
 
 !ELSE 
 
-ALL : "htpasswd - Win32 Release" "chpasswd - Win32 Release" "miscutil - Win32 Release" "$(OUTDIR)\NCSA_auth.dll"
+ALL : "miscutil - Win32 Release" "htpasswd - Win32 Release" "chpasswd - Win32 Release" "$(OUTDIR)\NCSA_auth.exe"
 
 !ENDIF 
 
 !IF "$(RECURSE)" == "1" 
-CLEAN :"miscutil - Win32 ReleaseCLEAN" "chpasswd - Win32 ReleaseCLEAN" "htpasswd - Win32 ReleaseCLEAN" 
+CLEAN :"chpasswd - Win32 ReleaseCLEAN" "htpasswd - Win32 ReleaseCLEAN" "miscutil - Win32 ReleaseCLEAN" 
 !ELSE 
 CLEAN :
 !ENDIF 
@@ -56,28 +56,26 @@
 	-@erase "$(INTDIR)\ncsa_auth.obj"
 	-@erase "$(INTDIR)\NCSA_auth.res"
 	-@erase "$(INTDIR)\vc60.idb"
-	-@erase "$(OUTDIR)\NCSA_auth.dll"
-	-@erase "$(OUTDIR)\NCSA_auth.exp"
+	-@erase "$(OUTDIR)\NCSA_auth.exe"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /O2 /I "..\include" /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /Fp"$(INTDIR)\NCSA_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\NCSA_auth.res" /d "NDEBUG" 
+CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\NCSA_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\NCSA_auth.res" /d "NDEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\NCSA_auth.bsc" 
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\NCSA_auth.pdb" /machine:I386 /out:"$(OUTDIR)\NCSA_auth.dll" /implib:"$(OUTDIR)\NCSA_auth.lib" 
+LINK32_FLAGS=kernel32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\NCSA_auth.pdb" /machine:I386 /out:"$(OUTDIR)\NCSA_auth.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\encrypt.obj" \
 	"$(INTDIR)\ncsa_auth.obj" \
 	"$(INTDIR)\NCSA_auth.res" \
 	"..\..\win\miscutil\Release\miscutil.lib"
 
-"$(OUTDIR)\NCSA_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\NCSA_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -92,16 +90,16 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\NCSA_auth.dll" "$(OUTDIR)\NCSA_auth.bsc"
+ALL : "$(OUTDIR)\NCSA_auth.exe" "$(OUTDIR)\NCSA_auth.bsc"
 
 !ELSE 
 
-ALL : "htpasswd - Win32 Debug" "chpasswd - Win32 Debug" "miscutil - Win32 Debug" "$(OUTDIR)\NCSA_auth.dll" "$(OUTDIR)\NCSA_auth.bsc"
+ALL : "miscutil - Win32 Debug" "htpasswd - Win32 Debug" "chpasswd - Win32 Debug" "$(OUTDIR)\NCSA_auth.exe" "$(OUTDIR)\NCSA_auth.bsc"
 
 !ENDIF 
 
 !IF "$(RECURSE)" == "1" 
-CLEAN :"miscutil - Win32 DebugCLEAN" "chpasswd - Win32 DebugCLEAN" "htpasswd - Win32 DebugCLEAN" 
+CLEAN :"chpasswd - Win32 DebugCLEAN" "htpasswd - Win32 DebugCLEAN" "miscutil - Win32 DebugCLEAN" 
 !ELSE 
 CLEAN :
 !ENDIF 
@@ -113,17 +111,15 @@
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
 	-@erase "$(OUTDIR)\NCSA_auth.bsc"
-	-@erase "$(OUTDIR)\NCSA_auth.dll"
-	-@erase "$(OUTDIR)\NCSA_auth.exp"
+	-@erase "$(OUTDIR)\NCSA_auth.exe"
 	-@erase "$(OUTDIR)\NCSA_auth.ilk"
 	-@erase "$(OUTDIR)\NCSA_auth.pdb"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NCSA_AUTH_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\NCSA_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\NCSA_auth.res" /d "_DEBUG" 
+CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\NCSA_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\NCSA_auth.res" /d "_DEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\NCSA_auth.bsc" 
 BSC32_SBRS= \
@@ -136,14 +132,14 @@
 <<
 
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\NCSA_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\NCSA_auth.dll" /implib:"$(OUTDIR)\NCSA_auth.lib" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\NCSA_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\NCSA_auth.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\encrypt.obj" \
 	"$(INTDIR)\ncsa_auth.obj" \
 	"$(INTDIR)\NCSA_auth.res" \
 	"..\..\win\miscutil\Debug\miscutil.lib"
 
-"$(OUTDIR)\NCSA_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\NCSA_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -180,6 +176,7 @@
    $(CPP_PROJ) $< 
 <<
 
+MTL_PROJ=
 
 !IF "$(NO_EXTERNAL_DEPS)" != "1"
 !IF EXISTS("NCSA_auth.dep")
@@ -233,78 +230,78 @@
 
 !IF  "$(CFG)" == "NCSA_auth - Win32 Release"
 
-"miscutil - Win32 Release" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" 
+"chpasswd - Win32 Release" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Release" 
    cd "..\..\auth_modules\NCSA"
 
-"miscutil - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
+"chpasswd - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ELSEIF  "$(CFG)" == "NCSA_auth - Win32 Debug"
 
-"miscutil - Win32 Debug" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" 
+"chpasswd - Win32 Debug" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Debug" 
    cd "..\..\auth_modules\NCSA"
 
-"miscutil - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
+"chpasswd - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ENDIF 
 
 !IF  "$(CFG)" == "NCSA_auth - Win32 Release"
 
-"chpasswd - Win32 Release" : 
-   cd "\work\nt-2.3\contrib\chpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\chpasswd.mak" CFG="chpasswd - Win32 Release" 
+"htpasswd - Win32 Release" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Release" 
    cd "..\..\auth_modules\NCSA"
 
-"chpasswd - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\contrib\chpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\chpasswd.mak" CFG="chpasswd - Win32 Release" RECURSE=1 CLEAN 
+"htpasswd - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ELSEIF  "$(CFG)" == "NCSA_auth - Win32 Debug"
 
-"chpasswd - Win32 Debug" : 
-   cd "\work\nt-2.3\contrib\chpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\chpasswd.mak" CFG="chpasswd - Win32 Debug" 
+"htpasswd - Win32 Debug" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Debug" 
    cd "..\..\auth_modules\NCSA"
 
-"chpasswd - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\contrib\chpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\chpasswd.mak" CFG="chpasswd - Win32 Debug" RECURSE=1 CLEAN 
+"htpasswd - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ENDIF 
 
 !IF  "$(CFG)" == "NCSA_auth - Win32 Release"
 
-"htpasswd - Win32 Release" : 
-   cd "\work\nt-2.3\contrib\htpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\htpasswd.mak" CFG="htpasswd - Win32 Release" 
+"miscutil - Win32 Release" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" 
    cd "..\..\auth_modules\NCSA"
 
-"htpasswd - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\contrib\htpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\htpasswd.mak" CFG="htpasswd - Win32 Release" RECURSE=1 CLEAN 
+"miscutil - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ELSEIF  "$(CFG)" == "NCSA_auth - Win32 Debug"
 
-"htpasswd - Win32 Debug" : 
-   cd "\work\nt-2.3\contrib\htpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\htpasswd.mak" CFG="htpasswd - Win32 Debug" 
+"miscutil - Win32 Debug" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" 
    cd "..\..\auth_modules\NCSA"
 
-"htpasswd - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\contrib\htpasswd"
-   $(MAKE) /$(MAKEFLAGS) /F ".\htpasswd.mak" CFG="htpasswd - Win32 Debug" RECURSE=1 CLEAN 
+"miscutil - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NCSA"
 
 !ENDIF 
Index: squid/auth_modules/NCSA/NCSA_auth.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/NCSA_auth.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/auth_modules/NCSA/NCSA_auth.rc	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/auth_modules/NCSA/NCSA_auth.rc	27 Aug 2001 21:48:15 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - NCSA Authenticator DLL plug-in\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "NCSA_auth\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
-            VALUE "OriginalFilename", "NCSA_auth.dll\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "OriginalFilename", "NCSA_auth.exe\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/auth_modules/NCSA/ncsa_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/ncsa_auth.c,v
retrieving revision 1.1.1.1.66.1
retrieving revision 1.1.1.1.66.1.2.1
diff -u -r1.1.1.1.66.1 -r1.1.1.1.66.1.2.1
--- squid/auth_modules/NCSA/ncsa_auth.c	6 Jan 2001 12:40:08 -0000	1.1.1.1.66.1
+++ squid/auth_modules/NCSA/ncsa_auth.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.66.1.2.1
@@ -17,30 +17,43 @@
  *
  */
 
-#include "squid.h"
+#include "config.h"
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_CRYPT_H
+#include <crypt.h>
+#endif
+
+#include "util.h"
+#include "hash.h"
 
 static hash_table *hash = NULL;
 static HASHFREE my_free;
-static char *passwdfile=NULL;
-
-#ifdef _SQUID_MSWIN_
-typedef struct {
-    void *data;
-    acl_proxy_auth_user *auth_user;
-    RH *handler;
-} authenticateStateData;
 
-
-BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, 
-                       LPVOID reserved /* Not used. */ );
-#endif
-
-typedef struct _user_data {
+typedef struct _user_data
+{
     /* first two items must be same as hash_link */
     char *user;
     struct _user_data *next;
     char *passwd;
-} user_data;
+}
+user_data;
 
 static void
 my_free(void *p)
@@ -65,6 +78,7 @@
     /* initial setup */
     hash = hash_create((HASHCMP *) strcmp, 7921, hash_string);
     if (NULL == hash) {
+	fprintf(stderr, "ncsa_auth: cannot create hash table\n");
 	exit(1);
     }
     f = fopen(passwdfile, "r");
@@ -84,26 +98,18 @@
     fclose(f);
 }
 
-#ifdef _SQUID_MSWIN_
-__declspec (dllexport) int
-Authenticate(char *user, char *passwd, authenticateStateData *data, HLPCB callback)
-{
-#else
+int
 main(int argc, char **argv)
 {
+    struct stat sb;
+    time_t change_time = 0;
     char buf[256];
     char *user, *passwd, *p;
-#endif
-	static time_t change_time = 0;
-    struct stat sb;
     user_data *u;
-
-#ifndef _SQUID_MSWIN_
     setbuf(stdout, NULL);
-    if (argc != 2) 
-	{
-		fprintf(stderr, "Usage: ncsa_auth <passwordfile>\n");
-		exit(1);
+    if (argc != 2) {
+	fprintf(stderr, "Usage: ncsa_auth <passwordfile>\n");
+	exit(1);
     }
     if (stat(argv[1], &sb) != 0) {
 	fprintf(stderr, "cannot stat %s\n", argv[1]);
@@ -119,79 +125,21 @@
 	    }
 	}
 	if ((user = strtok(buf, " ")) == NULL) {
-		printf("ERR\n");
-		continue;
+	    printf("ERR\n");
+	    continue;
 	}
 	if ((passwd = strtok(NULL, "")) == NULL) {
-		printf("ERR\n");
-		continue;
-	}
-#else
-	if (stat(passwdfile, &sb) == 0) {
-	    if (sb.st_mtime != change_time) {
-			read_passwd_file(passwdfile);
-			change_time = sb.st_mtime;
-	    }
+	    printf("ERR\n");
+	    continue;
 	}
-#endif
 	u = hash_lookup(hash, user);
 	if (u == NULL) {
-#ifdef _SQUID_MSWIN_
-		(callback)(data,"ERR");
-#else
 	    printf("ERR\n");
-#endif
-		return 0;
 	} else if (strcmp(u->passwd, (char *) crypt(passwd, u->passwd))) {
-#ifdef _SQUID_MSWIN_
-		(callback)(data,"ERR");
-#else
 	    printf("ERR\n");
-#endif
-		return 0;
 	} else {
-#ifdef _SQUID_MSWIN_
-		(callback)(data,"OK");
-#else
 	    printf("OK\n");
-#endif
-		return 0;
 	}
-}
-
-#ifdef _SQUID_MSWIN_
-__declspec (dllexport) int
-Init(char *pwfile)
-{
-	if (passwdfile)
-		xfree(passwdfile);
-	passwdfile = xstrdup(pwfile);
-	return 0;
-}
-
-BOOL APIENTRY
-DllMain (
-	 HINSTANCE hInst /* Library instance handle. */ ,
-	 DWORD reason /* Reason this function is being called. */ ,
-	 LPVOID reserved /* Not used. */ )
-{
-
-  switch (reason)
-    {
-    case DLL_PROCESS_ATTACH:
-      break;
-
-	case DLL_PROCESS_DETACH:
-		if (passwdfile)
-			xfree(passwdfile);
-		break;
-
-    case DLL_THREAD_ATTACH:
-      break;
-
-    case DLL_THREAD_DETACH:
-      break;
     }
-  return TRUE;
+    exit(0);
 }
-#endif
Index: squid/auth_modules/NT/NT_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/NT_auth.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NT/NT_auth.c	17 Jun 2001 12:39:53 -0000	1.1.2.2
+++ squid/auth_modules/NT/NT_auth.c	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -1,6 +1,5 @@
 /*
   NT_auth -  Version 1.11
-
   Modified to act as a Squid authenticator module.
   Can run as dll on NT native port.
   Removed all Pike stuff.
@@ -43,31 +42,10 @@
    Scans and checks for Squid input, and attempts to validate the user.
 */
 
-#if defined (_SQUID_CYGWIN_)
-
 static char NTGroup[256];
 int
 main(int argc, char **argv)
-
-#else defined (_SQUID_MSWIN_)
-
-typedef struct
 {
-    void *data;
-    acl_proxy_auth_user *auth_user;
-    RH *handler;
-}
-authenticateStateData;
-static char *NTGroup = NULL;
-BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason,
-    LPVOID reserved /* Not used. */ );
-
-__declspec(dllexport)
-     int Authenticate(char *username, char *password,
-    authenticateStateData * data, HLPCB callback)
-#endif
-{
-#if defined(_SQUID_CYGWIN_)
     char wstr[256];
     char username[256];
     char password[256];
@@ -90,35 +68,21 @@
 	username[0] = '\0';
 	password[0] = '\0';
 	sscanf(wstr, "%s %s", username, password);	/* Extract parameters */
-#endif
 	/* Check for invalid or blank entries */
 	if ((username[0] == '\0') || (password[0] == '\0')) {
-#if defined(_SQUID_CYGWIN_)
 	    puts("ERR");
 	    fflush(stdout);
 	    continue;
-#else
-	    (callback) (data, "ERR");
-	    return 0;
-#endif
 	}
 	if (Valid_User(username, password, NTGroup) == NTV_NO_ERROR)
-#if defined(_SQUID_CYGWIN_)
 	    puts("OK");
-#else
-	    (callback) (data, "OK");
-#endif
 	else
-#if defined(_SQUID_CYGWIN_)
 	    puts("ERR");
 	fflush(stdout);
     }
 
-#else
-	    (callback) (data, "ERR");
-#endif
-    return 0;
-}
+	return 0;
+    }
 
 /* Valid_User return codes -
    0 - User authenticated successfully.
@@ -127,35 +91,7 @@
    3 - Logon error; Incorrect password or username given.
 */
 
-#ifndef _SQUID_CYGWIN_
-
-__declspec(dllexport)
-     int Init(char *Group)
-{
-    if (NTGroup)
-	xfree(NTGroup);
-    NTGroup = xstrdup(Group);
-    return 0;
-}
-BOOL APIENTRY
-DllMain(HINSTANCE hInst /* Library instance handle. */ ,
-    DWORD reason /* Reason this function is being called. */ ,
-    LPVOID reserved /* Not used. */ )
-{
-    switch (reason) {
-    case DLL_PROCESS_ATTACH:
-	break;
-    case DLL_PROCESS_DETACH:
-	break;
-    case DLL_THREAD_ATTACH:
-	break;
-    case DLL_THREAD_DETACH:
-	break;
-    }
-    return TRUE;
-}
-#endif
-#else  /* NON Windows Platform !!! */
+#else /* NON Windows Platform !!! */
 
 #error NON WINDOWS PLATFORM
 
Index: squid/auth_modules/NT/NT_auth.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/NT_auth.dsp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NT/NT_auth.dsp	30 Jun 2001 18:42:07 -0000	1.1.2.2
+++ squid/auth_modules/NT/NT_auth.dsp	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -33,57 +33,49 @@
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "NT_auth___Win32_Release"
-# PROP BASE Intermediate_Dir "NT_auth___Win32_Release"
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "Release"
 # PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /YX /FD /c
-# SUBTRACT CPP /Fr
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "NDEBUG"
-# ADD RSC /l 0x410 /d "NDEBUG"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /YX /FD /c
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib netapi32.lib /nologo /dll /machine:I386
-# SUBTRACT LINK32 /pdb:none
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib netapi32.lib advapi32.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "NT_auth - Win32 Debug"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "NT_auth___Win32_Debug"
-# PROP BASE Intermediate_Dir "NT_auth___Win32_Debug"
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "Debug"
 # PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /YX /FD /GZ /c
-# SUBTRACT CPP /Fr
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "_DEBUG"
-# ADD RSC /l 0x410 /d "_DEBUG"
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib netapi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /profile /pdb:none
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib netapi32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
Index: squid/auth_modules/NT/NT_auth.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/NT_auth.mak,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NT/NT_auth.mak	30 Jun 2001 18:42:07 -0000	1.1.2.2
+++ squid/auth_modules/NT/NT_auth.mak	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -39,11 +39,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\NT_auth.dll"
+ALL : "$(OUTDIR)\NT_auth.exe"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Release" "$(OUTDIR)\NT_auth.dll"
+ALL : "miscutil - Win32 Release" "$(OUTDIR)\NT_auth.exe"
 
 !ENDIF 
 
@@ -56,28 +56,26 @@
 	-@erase "$(INTDIR)\NT_auth.res"
 	-@erase "$(INTDIR)\valid.obj"
 	-@erase "$(INTDIR)\vc60.idb"
-	-@erase "$(OUTDIR)\NT_auth.dll"
-	-@erase "$(OUTDIR)\NT_auth.exp"
+	-@erase "$(OUTDIR)\NT_auth.exe"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "..\..\include" /I "..\..\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /Fp"$(INTDIR)\NT_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\NT_auth.res" /d "NDEBUG" 
+CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\NT_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\NT_auth.res" /d "NDEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\NT_auth.bsc" 
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib netapi32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\NT_auth.pdb" /machine:I386 /out:"$(OUTDIR)\NT_auth.dll" /implib:"$(OUTDIR)\NT_auth.lib" 
+LINK32_FLAGS=kernel32.lib netapi32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\NT_auth.pdb" /machine:I386 /out:"$(OUTDIR)\NT_auth.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\nt_auth.obj" \
 	"$(INTDIR)\valid.obj" \
 	"$(INTDIR)\NT_auth.res" \
 	"..\..\win\miscutil\Release\miscutil.lib"
 
-"$(OUTDIR)\NT_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\NT_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -92,11 +90,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\NT_auth.dll"
+ALL : "$(OUTDIR)\NT_auth.exe" "$(OUTDIR)\NT_auth.bsc"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Debug" "$(OUTDIR)\NT_auth.dll"
+ALL : "miscutil - Win32 Debug" "$(OUTDIR)\NT_auth.exe" "$(OUTDIR)\NT_auth.bsc"
 
 !ENDIF 
 
@@ -107,33 +105,41 @@
 !ENDIF 
 	-@erase "$(INTDIR)\nt_auth.obj"
 	-@erase "$(INTDIR)\NT_auth.res"
+	-@erase "$(INTDIR)\nt_auth.sbr"
 	-@erase "$(INTDIR)\valid.obj"
+	-@erase "$(INTDIR)\valid.sbr"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
-	-@erase "$(OUTDIR)\NT_auth.dll"
-	-@erase "$(OUTDIR)\NT_auth.exp"
+	-@erase "$(OUTDIR)\NT_auth.bsc"
+	-@erase "$(OUTDIR)\NT_auth.exe"
 	-@erase "$(OUTDIR)\NT_auth.ilk"
 	-@erase "$(OUTDIR)\NT_auth.pdb"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT_AUTH_EXPORTS" /Fp"$(INTDIR)\NT_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\NT_auth.res" /d "_DEBUG" 
+CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "UNLINK_DAEMON" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\NT_auth.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+RSC_PROJ=/l 0x419 /fo"$(INTDIR)\NT_auth.res" /d "_DEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\NT_auth.bsc" 
 BSC32_SBRS= \
-	
+	"$(INTDIR)\nt_auth.sbr" \
+	"$(INTDIR)\valid.sbr"
+
+"$(OUTDIR)\NT_auth.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib netapi32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\NT_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\NT_auth.dll" /implib:"$(OUTDIR)\NT_auth.lib" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib netapi32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\NT_auth.pdb" /debug /machine:I386 /out:"$(OUTDIR)\NT_auth.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\nt_auth.obj" \
 	"$(INTDIR)\valid.obj" \
 	"$(INTDIR)\NT_auth.res" \
 	"..\..\win\miscutil\Debug\miscutil.lib"
 
-"$(OUTDIR)\NT_auth.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\NT_auth.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -170,6 +176,7 @@
    $(CPP_PROJ) $< 
 <<
 
+MTL_PROJ=
 
 !IF "$(NO_EXTERNAL_DEPS)" != "1"
 !IF EXISTS("NT_auth.dep")
@@ -183,14 +190,36 @@
 !IF "$(CFG)" == "NT_auth - Win32 Release" || "$(CFG)" == "NT_auth - Win32 Debug"
 SOURCE=.\nt_auth.c
 
+!IF  "$(CFG)" == "NT_auth - Win32 Release"
+
+
 "$(INTDIR)\nt_auth.obj" : $(SOURCE) "$(INTDIR)"
 
 
+!ELSEIF  "$(CFG)" == "NT_auth - Win32 Debug"
+
+
+"$(INTDIR)\nt_auth.obj"	"$(INTDIR)\nt_auth.sbr" : $(SOURCE) "$(INTDIR)"
+
+
+!ENDIF 
+
 SOURCE=.\valid.c
 
+!IF  "$(CFG)" == "NT_auth - Win32 Release"
+
+
 "$(INTDIR)\valid.obj" : $(SOURCE) "$(INTDIR)"
 
 
+!ELSEIF  "$(CFG)" == "NT_auth - Win32 Debug"
+
+
+"$(INTDIR)\valid.obj"	"$(INTDIR)\valid.sbr" : $(SOURCE) "$(INTDIR)"
+
+
+!ENDIF 
+
 SOURCE=.\NT_auth.rc
 
 "$(INTDIR)\NT_auth.res" : $(SOURCE) "$(INTDIR)"
@@ -200,25 +229,25 @@
 !IF  "$(CFG)" == "NT_auth - Win32 Release"
 
 "miscutil - Win32 Release" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" 
    cd "..\..\auth_modules\NT"
 
 "miscutil - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NT"
 
 !ELSEIF  "$(CFG)" == "NT_auth - Win32 Debug"
 
 "miscutil - Win32 Debug" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" 
    cd "..\..\auth_modules\NT"
 
 "miscutil - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\auth_modules\NT"
 
 !ENDIF 
Index: squid/auth_modules/NT/NT_auth.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/NT_auth.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/auth_modules/NT/NT_auth.rc	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/auth_modules/NT/NT_auth.rc	27 Aug 2001 21:48:15 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - NT Authenticator DLL plug-in\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "NT_auth\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
-            VALUE "OriginalFilename", "NT_auth.dll\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "OriginalFilename", "NT_auth.exe\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/auth_modules/NT/valid.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/valid.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/auth_modules/NT/valid.c	17 Jun 2001 12:39:53 -0000	1.1.2.2
+++ squid/auth_modules/NT/valid.c	27 Aug 2001 21:48:15 -0000	1.1.2.2.2.1
@@ -1,12 +1,9 @@
 #include "squid.h"
-
 /* Check if we try to compile on a Windows Platform */
 #if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
 
 #include <assert.h>
-#if defined(_SQUID_CYGWIN_)
 #include <wchar.h>
-#endif
 #include <windows.h>
 #include <lm.h>
 #include "valid.h"
@@ -101,7 +98,7 @@
 	CloseHandle(hToken);
     return result;
 }
-#else  /* NON Windows Platform !!! */
+#else /* NON Windows Platform !!! */
 
 #error NON WINDOWS PLATFORM
 
Index: squid/auth_modules/NT/valid.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/valid.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/auth_modules/NT/valid.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/auth_modules/NT/valid.h	27 Aug 2001 21:48:15 -0000	1.1.2.1.2.1
@@ -11,6 +11,6 @@
 #define LOGON32_LOGON_NETWORK       3
 #endif
 
-int Valid_User(char *,char *, char *);
+int Valid_User(char *, char *, char *);
 
 #endif
Index: squid/auth_modules/PAM/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/PAM/Attic/Makefile.in,v
retrieving revision 1.1.1.1.22.1
retrieving revision 1.1.1.1.22.1.2.1
diff -u -r1.1.1.1.22.1 -r1.1.1.1.22.1.2.1
--- squid/auth_modules/PAM/Makefile.in	6 Jan 2001 12:40:08 -0000	1.1.1.1.22.1
+++ squid/auth_modules/PAM/Makefile.in	27 Aug 2001 21:48:15 -0000	1.1.1.1.22.1.2.1
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.1.22.1 2001/01/06 12:40:08 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.1.22.1.2.1 2001/08/27 21:48:15 tolsty Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
Index: squid/auth_modules/PAM/pam_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/PAM/Attic/pam_auth.c,v
retrieving revision 1.1.1.1.18.1
retrieving revision 1.1.1.1.18.1.2.1
diff -u -r1.1.1.1.18.1 -r1.1.1.1.18.1.2.1
--- squid/auth_modules/PAM/pam_auth.c	6 Jan 2001 12:40:08 -0000	1.1.1.1.18.1
+++ squid/auth_modules/PAM/pam_auth.c	27 Aug 2001 21:48:15 -0000	1.1.1.1.18.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: pam_auth.c,v 1.1.1.1.18.1 2001/01/06 12:40:08 hno Exp $
+ * $Id: pam_auth.c,v 1.1.1.1.18.1.2.1 2001/08/27 21:48:15 tolsty Exp $
  *
  * PAM authenticator module for Squid.
  * Copyright (C) 1999 Henrik Nordstrom <hno@hem.passagen.se>
@@ -71,10 +71,12 @@
  * expects a single converstation message of type PAM_PROMPT_ECHO_OFF.
  */
 static int
-password_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr)
+password_conversation(int num_msg, const struct pam_message **msg,
+    struct pam_response **resp, void *appdata_ptr)
 {
     if (num_msg != 1 || msg[0]->msg_style != PAM_PROMPT_ECHO_OFF) {
-	fprintf(stderr, "ERROR: Unexpected PAM converstaion '%d/%s'\n", msg[0]->msg_style, msg[0]->msg);
+	fprintf(stderr, "ERROR: Unexpected PAM converstaion '%d/%s'\n",
+	    msg[0]->msg_style, msg[0]->msg);
 	return PAM_CONV_ERR;
     }
     if (!appdata_ptr) {
@@ -84,7 +86,8 @@
 	appdata_ptr = password;
     }
     if (!appdata_ptr) {
-	fprintf(stderr, "ERROR: No password available to password_converstation!\n");
+	fprintf(stderr,
+	    "ERROR: No password available to password_converstation!\n");
 	return PAM_CONV_ERR;
     }
     *resp = calloc(num_msg, sizeof(struct pam_response));
@@ -98,8 +101,7 @@
     return ((*resp)[0].resp ? PAM_SUCCESS : PAM_CONV_ERR);
 }
 
-static struct pam_conv conv =
-{
+static struct pam_conv conv = {
     &password_conversation,
     NULL
 };
Index: squid/auth_modules/SMB/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/SMB/Attic/Makefile.in,v
retrieving revision 1.1.1.1.20.1
retrieving revision 1.1.1.1.20.1.2.1
diff -u -r1.1.1.1.20.1 -r1.1.1.1.20.1.2.1
--- squid/auth_modules/SMB/Makefile.in	6 Jan 2001 12:40:09 -0000	1.1.1.1.20.1
+++ squid/auth_modules/SMB/Makefile.in	27 Aug 2001 21:48:15 -0000	1.1.1.1.20.1.2.1
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.1.20.1 2001/01/06 12:40:09 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.1.20.1.2.1 2001/08/27 21:48:15 tolsty Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
Index: squid/auth_modules/SMB/smb_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/SMB/Attic/smb_auth.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.28.1
diff -u -r1.1.1.2 -r1.1.1.2.28.1
--- squid/auth_modules/SMB/smb_auth.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/auth_modules/SMB/smb_auth.c	27 Aug 2001 21:48:15 -0000	1.1.1.2.28.1
@@ -27,14 +27,14 @@
 
 struct SMBDOMAIN
 {
-	char				*name;			/* domain name */
-	char				*sname;			/* match this with user input */
-	char				*passthrough;	/* pass-through authentication */
-	char				*nmbaddr;		/* name service address */
-	int					nmbcast;		/* broadcast or unicast */
-	char				*authshare;		/* share name of auth file */
-	char				*authfile;		/* pathname of auth file */
-	struct SMBDOMAIN	*next;			/* linked list */
+    char *name;			/* domain name */
+    char *sname;		/* match this with user input */
+    char *passthrough;		/* pass-through authentication */
+    char *nmbaddr;		/* name service address */
+    int nmbcast;		/* broadcast or unicast */
+    char *authshare;		/* share name of auth file */
+    char *authfile;		/* pathname of auth file */
+    struct SMBDOMAIN *next;	/* linked list */
 };
 
 struct SMBDOMAIN *firstdom = NULL;
@@ -45,217 +45,199 @@
  * to the read command of the bourne shell.
  */
 
-void print_esc(FILE *p, char *s)
+void
+print_esc(FILE * p, char *s)
 {
-	char	buf[256];
-	char	*t;
-	int		i = 0;
-
-	for (t = s; *t != '\0'; t++)
-	{
-		if (i > 250)
-		{
-			buf[i] = '\0';
-			(void) fputs(buf, p);
-			i = 0;
-		}
+    char buf[256];
+    char *t;
+    int i = 0;
+
+    for (t = s; *t != '\0'; t++) {
+	if (i > 250) {
+	    buf[i] = '\0';
+	    (void) fputs(buf, p);
+	    i = 0;
+	}
 
-		if (*t == '\\')
-			buf[i++] = '\\';
+	if (*t == '\\')
+	    buf[i++] = '\\';
 
-		buf[i++] = *t;
-	}
+	buf[i++] = *t;
+    }
 
-	if (i > 0)
-	{
-		buf[i] = '\0';
-		(void) fputs(buf, p);
-	}
+    if (i > 0) {
+	buf[i] = '\0';
+	(void) fputs(buf, p);
+    }
 }
 
-void main(int argc, char *argv[])
+void
+main(int argc, char *argv[])
 {
-	int					i;
-	char				buf[BUFSIZE];
-	struct SMBDOMAIN	*dom;
-	char				*s;
-	char				*user;
-	char				*pass;
-	char				*domname;
-	FILE				*p;
-	int					debug = 0;
-	char				*shcmd;
-
-	/* make standard output line buffered */
-	if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
-		return;
-
-	/* parse command line arguments */
-	for (i = 1; i < argc; i++)
-	{
-		if (strcmp(argv[i], "-d") == 0)
-		{
-			debug = 1;
-			continue;
-		}
+    int i;
+    char buf[BUFSIZE];
+    struct SMBDOMAIN *dom;
+    char *s;
+    char *user;
+    char *pass;
+    char *domname;
+    FILE *p;
+    int debug = 0;
+    char *shcmd;
+
+    /* make standard output line buffered */
+    if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
+	return;
+
+    /* parse command line arguments */
+    for (i = 1; i < argc; i++) {
+	if (strcmp(argv[i], "-d") == 0) {
+	    debug = 1;
+	    continue;
+	}
 
-		/* the next options require an argument */
-		if (i + 1 == argc)
-			break;
-
-		if (strcmp(argv[i], "-W") == 0)
-		{
-			if ((dom = (struct SMBDOMAIN *) malloc(sizeof(struct SMBDOMAIN))) == NULL)
-				return;
-
-			dom->name = dom->sname = argv[++i];
-			dom->passthrough = "";
-			dom->nmbaddr = "";
-			dom->nmbcast = NMB_BROADCAST;
-			dom->authshare = "NETLOGON";
-			dom->authfile = "proxyauth";
-			dom->next = NULL;
-
-			/* append to linked list */
-			if (lastdom != NULL)
-				lastdom->next = dom;
-			else
-				firstdom = dom;
+	/* the next options require an argument */
+	if (i + 1 == argc)
+	    break;
+
+	if (strcmp(argv[i], "-W") == 0) {
+	    if ((dom =
+		    (struct SMBDOMAIN *) malloc(sizeof(struct SMBDOMAIN))) ==
+		NULL) return;
+
+	    dom->name = dom->sname = argv[++i];
+	    dom->passthrough = "";
+	    dom->nmbaddr = "";
+	    dom->nmbcast = NMB_BROADCAST;
+	    dom->authshare = "NETLOGON";
+	    dom->authfile = "proxyauth";
+	    dom->next = NULL;
+
+	    /* append to linked list */
+	    if (lastdom != NULL)
+		lastdom->next = dom;
+	    else
+		firstdom = dom;
 
-			lastdom = dom;
-			continue;
-		}
+	    lastdom = dom;
+	    continue;
+	}
 
-		if (strcmp(argv[i], "-w") == 0)
-		{
-			if (lastdom != NULL)
-				lastdom->sname = argv[++i];
-			continue;
-		}
+	if (strcmp(argv[i], "-w") == 0) {
+	    if (lastdom != NULL)
+		lastdom->sname = argv[++i];
+	    continue;
+	}
 
-		if (strcmp(argv[i], "-P") == 0)
-		{
-			if (lastdom != NULL)
-				lastdom->passthrough = argv[++i];
-			continue;
-		}
+	if (strcmp(argv[i], "-P") == 0) {
+	    if (lastdom != NULL)
+		lastdom->passthrough = argv[++i];
+	    continue;
+	}
 
-		if (strcmp(argv[i], "-B") == 0)
-		{
-			if (lastdom != NULL)
-			{
-				lastdom->nmbaddr = argv[++i];
-				lastdom->nmbcast = NMB_BROADCAST;
-			}
-			continue;
-		}
+	if (strcmp(argv[i], "-B") == 0) {
+	    if (lastdom != NULL) {
+		lastdom->nmbaddr = argv[++i];
+		lastdom->nmbcast = NMB_BROADCAST;
+	    }
+	    continue;
+	}
 
-		if (strcmp(argv[i], "-U") == 0)
-		{
-			if (lastdom != NULL)
-			{
-				lastdom->nmbaddr = argv[++i];
-				lastdom->nmbcast = NMB_UNICAST;
-			}
-			continue;
-		}
+	if (strcmp(argv[i], "-U") == 0) {
+	    if (lastdom != NULL) {
+		lastdom->nmbaddr = argv[++i];
+		lastdom->nmbcast = NMB_UNICAST;
+	    }
+	    continue;
+	}
 
-		if (strcmp(argv[i], "-S") == 0)
-		{
-			if (lastdom != NULL)
-			{
-				if ((lastdom->authshare = strdup(argv[++i])) == NULL)
-					return;
-
-				/* convert backslashes to forward slashes */
-				for (s = lastdom->authshare; *s != '\0'; s++)
-					if (*s == '\\')
-						*s = '/';
-
-				/* strip leading forward slash from share name */
-				if (*lastdom->authshare == '/')
-					lastdom->authshare++;
-
-				if ((s = strchr(lastdom->authshare, '/')) != NULL)
-  				{
-  					*s = '\0';
-  					lastdom->authfile = s + 1;
-  				}
-			}
-			continue;
+	if (strcmp(argv[i], "-S") == 0) {
+	    if (lastdom != NULL) {
+		if ((lastdom->authshare = strdup(argv[++i])) == NULL)
+		    return;
+
+		/* convert backslashes to forward slashes */
+		for (s = lastdom->authshare; *s != '\0'; s++)
+		    if (*s == '\\')
+			*s = '/';
+
+		/* strip leading forward slash from share name */
+		if (*lastdom->authshare == '/')
+		    lastdom->authshare++;
+
+		if ((s = strchr(lastdom->authshare, '/')) != NULL) {
+		    *s = '\0';
+		    lastdom->authfile = s + 1;
 		}
+	    }
+	    continue;
 	}
+    }
 
-	shcmd = debug ? HELPERSCRIPT : HELPERSCRIPT " > /dev/null 2>&1";
+    shcmd = debug ? HELPERSCRIPT : HELPERSCRIPT " > /dev/null 2>&1";
 
-	/* pass to helper script */
+    /* pass to helper script */
     if (putenv("SAMBAPREFIX=" SAMBAPREFIX) != 0)
-    	return;
+	return;
 
-	while (1)
-	{
-		if (fgets(buf, BUFSIZE, stdin) == NULL)
-			break;
-
-		if ((s = strchr(buf, '\n')) == NULL)
-			continue;
-		*s = '\0';
-
-		if ((s = strchr(buf, ' ')) == NULL)
-		{
-			(void) printf("ERR\n");
-			continue;
-		}
-		*s = '\0';
+    while (1) {
+	if (fgets(buf, BUFSIZE, stdin) == NULL)
+	    break;
+
+	if ((s = strchr(buf, '\n')) == NULL)
+	    continue;
+	*s = '\0';
+
+	if ((s = strchr(buf, ' ')) == NULL) {
+	    (void) printf("ERR\n");
+	    continue;
+	}
+	*s = '\0';
 
-		user = buf;
-		pass = s + 1;
-		domname = NULL;
-
-		if ((s = strchr(user, '\\')) != NULL)
-		{
-			*s = '\0';
-			domname = user;
-			user = s + 1;
-		}
+	user = buf;
+	pass = s + 1;
+	domname = NULL;
+
+	if ((s = strchr(user, '\\')) != NULL) {
+	    *s = '\0';
+	    domname = user;
+	    user = s + 1;
+	}
 
-		/* match domname with linked list */
-		if (domname != NULL && strlen(domname) > 0)
-		{
-			for (dom = firstdom; dom != NULL; dom = dom->next)
-				if (strcasecmp(dom->sname, domname) == 0)
-					break;
-		} else
-			dom = firstdom;
-
-		if (dom == NULL)
-		{
-			(void) printf("ERR\n");
-			continue;
-		}
+	/* match domname with linked list */
+	if (domname != NULL && strlen(domname) > 0) {
+	    for (dom = firstdom; dom != NULL; dom = dom->next)
+		if (strcasecmp(dom->sname, domname) == 0)
+		    break;
+	} else
+	    dom = firstdom;
+
+	if (dom == NULL) {
+	    (void) printf("ERR\n");
+	    continue;
+	}
 
-		if ((p = popen(shcmd, "w")) == NULL)
-		{
-			(void) printf("ERR\n");
-			continue;
-		}
+	if ((p = popen(shcmd, "w")) == NULL) {
+	    (void) printf("ERR\n");
+	    continue;
+	}
 
-		(void) fprintf(p, "%s\n", dom->name);
-		(void) fprintf(p, "%s\n", dom->passthrough);
-		(void) fprintf(p, "%s\n", dom->nmbaddr);
-		(void) fprintf(p, "%d\n", dom->nmbcast);
-		(void) fprintf(p, "%s\n", dom->authshare);
-		(void) fprintf(p, "%s\n", dom->authfile);
-		(void) fprintf(p, "%s\n", user);
-		/* the password can contain special characters */
-		print_esc(p, pass);
-		(void) fputc('\n', p);
-		(void) fflush(p);
-
-		if (pclose(p) == 0)
-			(void) printf("OK\n");
-		else
-			(void) printf("ERR\n");
+	(void) fprintf(p, "%s\n", dom->name);
+	(void) fprintf(p, "%s\n", dom->passthrough);
+	(void) fprintf(p, "%s\n", dom->nmbaddr);
+	(void) fprintf(p, "%d\n", dom->nmbcast);
+	(void) fprintf(p, "%s\n", dom->authshare);
+	(void) fprintf(p, "%s\n", dom->authfile);
+	(void) fprintf(p, "%s\n", user);
+	/* the password can contain special characters */
+	print_esc(p, pass);
+	(void) fputc('\n', p);
+	(void) fflush(p);
+
+	if (pclose(p) == 0)
+	    (void) printf("OK\n");
+	else
+	    (void) printf("ERR\n");
 
-	} /* while (1) */
+    }				/* while (1) */
 }
Index: squid/auth_modules/getpwnam/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/getpwnam/Attic/Makefile.in,v
retrieving revision 1.1.1.2.30.1
retrieving revision 1.1.1.2.30.1.2.1
diff -u -r1.1.1.2.30.1 -r1.1.1.2.30.1.2.1
--- squid/auth_modules/getpwnam/Makefile.in	6 Jan 2001 12:40:09 -0000	1.1.1.2.30.1
+++ squid/auth_modules/getpwnam/Makefile.in	27 Aug 2001 21:48:16 -0000	1.1.1.2.30.1.2.1
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.2.30.1 2001/01/06 12:40:09 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.2.30.1.2.1 2001/08/27 21:48:16 tolsty Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
Index: squid/auth_modules/getpwnam/getpwnam_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/getpwnam/Attic/getpwnam_auth.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.72.1
diff -u -r1.1.1.1 -r1.1.1.1.72.1
--- squid/auth_modules/getpwnam/getpwnam_auth.c	26 Jan 2000 03:23:09 -0000	1.1.1.1
+++ squid/auth_modules/getpwnam/getpwnam_auth.c	27 Aug 2001 21:48:16 -0000	1.1.1.1.72.1
@@ -44,7 +44,7 @@
 #define ERR    "ERR\n"
 #define OK     "OK\n"
 
-int 
+int
 main()
 {
     char buf[256];
Index: squid/contrib/rredir.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/rredir.c,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/contrib/rredir.c	6 Jan 2001 12:40:09 -0000	1.1.1.1.44.1
+++ squid/contrib/rredir.c	27 Aug 2001 21:48:16 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,4 @@
-/* $Id: rredir.c,v 1.1.1.1.44.1 2001/01/06 12:40:09 hno Exp $ */
-
+/* $Id: rredir.c,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:16 tolsty Exp $ */
 /*
  * From:    richard@hekkihek.hacom.nl (Richard Huveneers)
  * To:      squid-users@nlanr.net
Index: squid/contrib/chpasswd/Dutch.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Dutch.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Dutch.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Dutch.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,7 +1,5 @@
 /* Dutch language added by Richard Baselier <baselier@baselier.demon.nl> */
-
 #if defined(Dutch)
-
 char *msg01 = "Geen schrijfpermissie op paswoord file:";
 char *msg02 = "Nieuw paswoord leeg of te kort (minder dan";
 char *msg03 = "karakters).";
@@ -25,92 +23,109 @@
 char *msg21 = "Minimum aantal speciale karakters (toetsenbord)";
 char *msg22 = "Wijzig uw Squid Account Paswoord";
 char *msg23 = "Authorisatie file moet eigenaar root hebben. Aub. README.";
-char *msg24 = "Authorisatie file heeft verkeerde mode (moet 755 zijn). Aub. README.";
-char *msg25 = "Kan authorisatie file niet openen."; 
+char *msg24 =
+    "Authorisatie file heeft verkeerde mode (moet 755 zijn). Aub. README.";
+char *msg25 = "Kan authorisatie file niet openen.";
 char *msg26 = "U bent niet bevoegd het paswoord te wijzigen.";
 char *msg27 = "Authorisatie file niet gevonden.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Compositie:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Wijzig Squid paswoord</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Voor beveiligings redenen, pas deze regels toe op uw nieuwe paswoord :\n");
-  printf("<ul>\n");
-  printf("<li>Het paswoord is hoofdletter gevoelig, dit betekent dat 'A' niet gelijk is aan 'a'.<br>\n");
-  printf("<li>U mag letters, nummers, en andere speciale karakters op uw toetsenbord gebruiken.<br>\n");
-  printf("<li>Nieuw paswoord regels:<br>");
-  printf("<ul><li>Lengte: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> characters.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," karakters (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," nummers (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," speciale karakters (toetsenbord):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> vrije keus</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Uw nieuw paswoord is effectief binnen ongeveer 15 minuten.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Uw account naam:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Uw huidige paswoord:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Nieuw paswoord:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Nogmaals nieuw paswoord:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Wijzig mijn paswoord'>\n");
-  printf("<input type=reset name=reset value='Maak velden leeg'>\n");
-  printf("<input type=submit name=cancel value='Afbreken'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Compositie:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Wijzig Squid paswoord</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Voor beveiligings redenen, pas deze regels toe op uw nieuwe paswoord :\n");
+    printf("<ul>\n");
+    printf
+	("<li>Het paswoord is hoofdletter gevoelig, dit betekent dat 'A' niet gelijk is aan 'a'.<br>\n");
+    printf
+	("<li>U mag letters, nummers, en andere speciale karakters op uw toetsenbord gebruiken.<br>\n");
+    printf("<li>Nieuw paswoord regels:<br>");
+    printf
+	("<ul><li>Lengte: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> characters.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules,
+	    " karakters (a-z, A-Z):<font color=%s><b> %s</b></font>", rucolor,
+	    minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " nummers (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " speciale karakters (toetsenbord):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> vrije keus</b></font>", rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf("<li>Uw nieuw paswoord is effectief binnen ongeveer 15 minuten.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Uw account naam:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Uw huidige paswoord:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Nieuw paswoord:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Nogmaals nieuw paswoord:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Wijzig mijn paswoord'>\n");
+    printf("<input type=reset name=reset value='Maak velden leeg'>\n");
+    printf("<input type=submit name=cancel value='Afbreken'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/English.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/English.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/English.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/English.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,7 +1,5 @@
 /* English language added by Pedro L Orso <porso@usa.net> */
-
 #if defined(English)
-
 char *msg01 = "No write permission on password file:";
 char *msg02 = "New password missing or too short (less than";
 char *msg03 = "characters).";
@@ -30,87 +28,104 @@
 char *msg26 = "You are not authorized to change password.";
 char *msg27 = "Authorization file not found.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Composition:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Change Squid Password</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("For security reasons, remember these rules about your new password:\n");
-  printf("<ul>\n");
-  printf("<li>The password is letter-case sensitive, meaning an 'A' is not the same as an 'a'.<br>\n");
-  printf("<li>You may use letters, numbers, and other special characters on your keyboard.<br>\n");
-  printf("<li>New password rules:<br>");
-  printf("<ul><li>Length: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> characters.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," characters (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," numbers (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," special characters (keyboard):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> free choice</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Your new password will be effective within about 15 minutes.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Your Account Name:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Your Current Password:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>New Password:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Retype New Password:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Change My Password'>\n");
-  printf("<input type=reset name=reset value='Clear fields'>\n");
-  printf("<input type=submit name=cancel value='Cancel'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Composition:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Change Squid Password</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("For security reasons, remember these rules about your new password:\n");
+    printf("<ul>\n");
+    printf
+	("<li>The password is letter-case sensitive, meaning an 'A' is not the same as an 'a'.<br>\n");
+    printf
+	("<li>You may use letters, numbers, and other special characters on your keyboard.<br>\n");
+    printf("<li>New password rules:<br>");
+    printf
+	("<ul><li>Length: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> characters.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules,
+	    " characters (a-z, A-Z):<font color=%s><b> %s</b></font>", rucolor,
+	    minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " numbers (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " special characters (keyboard):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> free choice</b></font>", rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>Your new password will be effective within about 15 minutes.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Your Account Name:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Your Current Password:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>New Password:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Retype New Password:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Change My Password'>\n");
+    printf("<input type=reset name=reset value='Clear fields'>\n");
+    printf("<input type=submit name=cancel value='Cancel'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/French.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/French.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/French.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/French.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,8 +1,7 @@
 /* French language added by Alexandre Allien <aallien@teaser.fr> */
-
 #if defined(French)
-
-char *msg01 = "Vous n'avez pas le droit d'ecriture dans le fichier des mots de passe:";
+char *msg01 =
+    "Vous n'avez pas le droit d'ecriture dans le fichier des mots de passe:";
 char *msg02 = "Le nouveau mot de passe est maquant ou trop court (moins de";
 char *msg03 = "caractères).";
 char *msg04 = "Le nouveau mot de passe est trop long (plus de";
@@ -19,98 +18,118 @@
 char *msg15 = "Impossible d'ouvrir le fichier de configuration:";
 char *msg16 = "Impossible d'ouvrir le fichier de log:";
 char *msg17 = "Le nouveau mot de passe est invalide.";
-char *msg18 = "SVP, utilisez les règles suivantes pour saisir un nouveau mot de passe:";
+char *msg18 =
+    "SVP, utilisez les règles suivantes pour saisir un nouveau mot de passe:";
 char *msg19 = "Un minimun de caractères (a-z, A-Z)";
 char *msg20 = "Un minimun de chiffres (0-9)";
-char *msg21 = "Un minimun de caractères spéciaux"; 
+char *msg21 = "Un minimun de caractères spéciaux";
 char *msg22 = "Mise à jour du mot de passe d'accès à Squid";
-char *msg23 = "Le fichier d'Authentification doit être possedé par l'utilisateur root. Lisez README.";
-char *msg24 = "Le fichier d'Authentification ne possède pas les bons droits (il doit etre en 755). Lisez README.";
+char *msg23 =
+    "Le fichier d'Authentification doit être possedé par l'utilisateur root. Lisez README.";
+char *msg24 =
+    "Le fichier d'Authentification ne possède pas les bons droits (il doit etre en 755). Lisez README.";
 char *msg25 = "Impossible d'ouvrir le fichier d'authentification.";
 char *msg26 = "Vous n'étes pas autorisé a changer votre mot de passe.";
 char *msg27 = "Impossible de trouver le fichier d'authentification.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Composition:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Mise à jour du mot de passe Squid</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Pour des raisons de sécurité, rappelez-vous les règles pour votre nouveau mot de passe:\n");
-  printf("<ul>\n");
-  printf("<li>Le mot de passe tient compte de la casse, cela signifie qu'un 'A' est différent d'un 'a'.<br>\n");
-  printf("<li>Il est possible d'utiliser des lettres, des chiffres et des caractères spéciaux (disponible sur le clavier).<br>\n");
-  printf("<li>Règles du nouveau mot de passe:<br>");
-  printf("<ul><li>Longueur: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> caractères.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," caractères (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," chiffres (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," caractères spéciaux (clavier):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> libre</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Votre nouveau mot de passe deviendra actif dans 15 minutes environs.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Votre nom d'utilisateur:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Votre mot de passe actuel:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Nouveau mot de passe:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Resaisissez votre nouveau mot de passe:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Changer le mot de passe'>\n");
-  printf("<input type=reset name=reset value='Effacer les champs'>\n");
-  printf("<input type=submit name=cancel value='Annuler'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Composition:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Mise à jour du mot de passe Squid</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Pour des raisons de sécurité, rappelez-vous les règles pour votre nouveau mot de passe:\n");
+    printf("<ul>\n");
+    printf
+	("<li>Le mot de passe tient compte de la casse, cela signifie qu'un 'A' est différent d'un 'a'.<br>\n");
+    printf
+	("<li>Il est possible d'utiliser des lettres, des chiffres et des caractères spéciaux (disponible sur le clavier).<br>\n");
+    printf("<li>Règles du nouveau mot de passe:<br>");
+    printf
+	("<ul><li>Longueur: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> caractères.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules,
+	    " caractères (a-z, A-Z):<font color=%s><b> %s</b></font>", rucolor,
+	    minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " chiffres (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " caractères spéciaux (clavier):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> libre</b></font>", rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>Votre nouveau mot de passe deviendra actif dans 15 minutes environs.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Votre nom d'utilisateur:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Votre mot de passe actuel:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Nouveau mot de passe:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Resaisissez votre nouveau mot de passe:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Changer le mot de passe'>\n");
+    printf("<input type=reset name=reset value='Effacer les champs'>\n");
+    printf("<input type=submit name=cancel value='Annuler'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/German.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/German.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/German.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/German.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,7 +1,5 @@
 /* German language added by Juergen Scheiderer <jsch@odin.de> */
-
 #if defined(German)
-
 char *msg01 = "Sie haben kein Schreibrecht f&uuml;r die Passwortdatei:";
 char *msg02 = "Fehlendes oder zu kurzes Passwort (weniger als";
 char *msg03 = "Zeichen).";
@@ -19,7 +17,8 @@
 char *msg15 = "Konfigurationsdatei konnte nicht ge&ouml;ffnet werden:";
 char *msg16 = "Protokolldatei konnte nicht ge&ouml;ffnet werden:";
 char *msg17 = "Ung&uuml;ltiges neues Passwort.";
-char *msg18 = "Bitte beachten Sie die folgenden Regeln bei der Passworteingabe:";
+char *msg18 =
+    "Bitte beachten Sie die folgenden Regeln bei der Passworteingabe:";
 char *msg19 = "Zeichen (a-z, A-Z)";
 char *msg20 = "Ziffern (0-9)";
 char *msg21 = "Sonderzeichen (Tastatur)";
@@ -30,89 +29,108 @@
 char *msg26 = "Sie haben keine Berechtigung, Ihr Passwort zu &auml;ndern.";
 char *msg27 = "Authorisations File nicht gefunden.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Zusammensetzung:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Aendern des Zugriffspasswortes</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Aus Sicherheitsgr&uuml;nden sollten Sie sich bei Eingabe ihres neuen Passworts an folgenden Regeln orientieren:\n");
-  printf("<ul>\n");
-  printf("<li>Im Passwort wird zwischen Gross- und Kleinbuchstaben unterschieden. 'A' ist also nicht gleich 'a'.<br>\n");
-  printf("<li>Sie k&ouml;nnen Buchstaben, Ziffern und andere Zeichen auf Ihrer Tastatur verwenden.<br>\n");
-
-
-  printf("<li>Regeln f&uuml;r das neue Passwort:<br>");
-  printf("<ul><li>L&auml;nge: mindestens <font color=%s><b>%s</b></font>, h&ouml;chstens <font color=%s><b>%s</b></font> Zeichen.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," Buchstaben (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," Ziffern (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," Sonderzeichen (Tastatur):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> freie Zeichenwahl</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Ihr neues Passwort wird innerhalb der n&auml;chsten 15 Minuten aktiviert.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Benutzername:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>aktuelles Passwort:\n");
-  printf("      <td><input type=password name=old_pw size=10>\n");
-  printf("  <tr><td align=right>neues Passwort:\n");
-  printf("      <td><input type=password name=new_pw1 size=10>\n");
-  printf("  <tr><td align=right>neues Passwort wiederholen:\n");
-  printf("      <td><input type=password name=new_pw2 size=10>\n");
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Passwort &auml;ndern'>\n");
-  printf("<input type=reset name=reset value='Eingaben l&ouml;schen'>\n");
-  printf("<input type=submit name=cancel value='Passwort doch nicht &auml;ndern'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Zusammensetzung:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Aendern des Zugriffspasswortes</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Aus Sicherheitsgr&uuml;nden sollten Sie sich bei Eingabe ihres neuen Passworts an folgenden Regeln orientieren:\n");
+    printf("<ul>\n");
+    printf
+	("<li>Im Passwort wird zwischen Gross- und Kleinbuchstaben unterschieden. 'A' ist also nicht gleich 'a'.<br>\n");
+    printf
+	("<li>Sie k&ouml;nnen Buchstaben, Ziffern und andere Zeichen auf Ihrer Tastatur verwenden.<br>\n");
+
+
+    printf("<li>Regeln f&uuml;r das neue Passwort:<br>");
+    printf
+	("<ul><li>L&auml;nge: mindestens <font color=%s><b>%s</b></font>, h&ouml;chstens <font color=%s><b>%s</b></font> Zeichen.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules,
+	    " Buchstaben (a-z, A-Z):<font color=%s><b> %s</b></font>", rucolor,
+	    minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " Ziffern (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " Sonderzeichen (Tastatur):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> freie Zeichenwahl</b></font>",
+	    rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>Ihr neues Passwort wird innerhalb der n&auml;chsten 15 Minuten aktiviert.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Benutzername:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>aktuelles Passwort:\n");
+    printf("      <td><input type=password name=old_pw size=10>\n");
+    printf("  <tr><td align=right>neues Passwort:\n");
+    printf("      <td><input type=password name=new_pw1 size=10>\n");
+    printf("  <tr><td align=right>neues Passwort wiederholen:\n");
+    printf("      <td><input type=password name=new_pw2 size=10>\n");
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Passwort &auml;ndern'>\n");
+    printf("<input type=reset name=reset value='Eingaben l&ouml;schen'>\n");
+    printf
+	("<input type=submit name=cancel value='Passwort doch nicht &auml;ndern'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/Hungarian.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Hungarian.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Hungarian.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Hungarian.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,6 +1,5 @@
 /* Hungarian language re-added by Domonkos Sandor <domonkos@npp.hu> 
    Hungarian language added by Robert Szabo <rob@freemail.c3.hu> */
-
 #if defined(Hungarian)
 
 char *msg01 = "Nincs írási jog a jelszófile-hoz:";
@@ -25,93 +24,111 @@
 char *msg20 = "legalább az alábbi számokat (0-9)";
 char *msg21 = "Legalább az alábbi speciális jeleket (billentyüzet)";
 char *msg22 = "Internet hozzáférési jogosultság módosítása";
-char *msg23 = "Az autentikációs file-nak a root tulajdonában kell lennie. Olvasd el README.";
-char *msg24 = "Autentikációs file hibás jogosultsággal (755-nek kell lenni). Olvasd el README.";
+char *msg23 =
+    "Az autentikációs file-nak a root tulajdonában kell lennie. Olvasd el README.";
+char *msg24 =
+    "Autentikációs file hibás jogosultsággal (755-nek kell lenni). Olvasd el README.";
 char *msg25 = "Nem tudom megnyitni az autentikációs file-t.";
 char *msg26 = "Nincs jogod a jelszó módosítására.";
 char *msg27 = "Az autentikációs file-t nem találom.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Composition:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Change Squid Password</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Biztonsági okok miatt emlékezz az alábbi szabályokra az új jelszó megadásakor:\n");
-  printf("<ul>\n");
-  printf("<li>A jelszóban a kis és nagy betü különbözik, vagyis az 'A' és 'a' nem azonos.<br>\n");
-  printf("<li>Használhatsz betüket, számokat és speciális karakterek a billentyüzetröl.<br>\n");
-  printf("<li>Új jelszó szabályai:<br>");
-  printf("<ul><li>Hossza: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> karakter.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," betük (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," számok (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," speciális karakterek (billentyüzetröl):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> szabadon választva</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Az új jelszavad kb. 15 percen belül érvényes lesz.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Felhasználói neved:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Jelenlegi jelszavad:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Új jelszavad:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Új jelszavad megerösítése:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Jelszavam módosítása'>\n");
-  printf("<input type=reset name=reset value='Mezök törlése'>\n");
-  printf("<input type=submit name=cancel value='Megszakítás'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Composition:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Change Squid Password</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Biztonsági okok miatt emlékezz az alábbi szabályokra az új jelszó megadásakor:\n");
+    printf("<ul>\n");
+    printf
+	("<li>A jelszóban a kis és nagy betü különbözik, vagyis az 'A' és 'a' nem azonos.<br>\n");
+    printf
+	("<li>Használhatsz betüket, számokat és speciális karakterek a billentyüzetröl.<br>\n");
+    printf("<li>Új jelszó szabályai:<br>");
+    printf
+	("<ul><li>Hossza: minimum <font color=%s><b>%s</b></font>, maximum <font color=%s><b>%s</b></font> karakter.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules, " betük (a-z, A-Z):<font color=%s><b> %s</b></font>",
+	    rucolor, minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " számok (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " speciális karakterek (billentyüzetröl):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> szabadon választva</b></font>",
+	    rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf("<li>Az új jelszavad kb. 15 percen belül érvényes lesz.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Felhasználói neved:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Jelenlegi jelszavad:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Új jelszavad:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Új jelszavad megerösítése:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Jelszavam módosítása'>\n");
+    printf("<input type=reset name=reset value='Mezök törlése'>\n");
+    printf("<input type=submit name=cancel value='Megszakítás'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/Italian.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Italian.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Italian.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Italian.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,7 +1,5 @@
 /* Italian language added by Luigi Gangitano <lgangitano@netscape.net> */
-
 #if defined(Italian)
-
 char *msg01 = "Diritti insufficienti per scrivere il file delle password:";
 char *msg02 = "Manca la nuova password o e' troppo corta (meno di";
 char *msg03 = "caratteri).";
@@ -19,98 +17,116 @@
 char *msg15 = "Non e' possibile aprire il file di configurazione:";
 char *msg16 = "Non e' possibile aprire il file di log:";
 char *msg17 = "La nuova password non e' valida.";
-char *msg18 = "Per favore, usare le seguenti regole per inserire la nuova passowrd:";
+char *msg18 =
+    "Per favore, usare le seguenti regole per inserire la nuova passowrd:";
 char *msg19 = "Numero di lettere (minimo) (a-z, A-Z)";
 char *msg20 = "Numero di cifre (minimo9 (0-9)";
 char *msg21 = "Numero di caratteri speciali (minimo) (eg: %,&,*,ecc.)";
 char *msg22 = "Cambia la tua Password di Accesso al server Squid";
-char *msg23 = "Il file di autorizzazione deve essere intestato al root. Leggere il file README.";
-char *msg24 = "Il file di autorizzazione ha permessi insufficienti (deve essere 755). Leggere il file README.";
+char *msg23 =
+    "Il file di autorizzazione deve essere intestato al root. Leggere il file README.";
+char *msg24 =
+    "Il file di autorizzazione ha permessi insufficienti (deve essere 755). Leggere il file README.";
 char *msg25 = "Impossibile aprire il file di autorizzazione.";
 char *msg26 = "Non sei autorizzato a cambiare la password.";
 char *msg27 = "Il file di autorizzazione non e' stato trovato.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Composizione:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Cambia la Password del server Squid</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Per ragioni di sicurezza, ricorda queste avvertenze riguardo alla tua password:\n");
-  printf("<ul>\n");
-  printf("<li>La password e' case-sensitive, il che vuol dire che 'A' non e' la stessa cosa di 'a'.<br>\n");
-  printf("<li>Puoi usare lettere, numeri o caratteri speciali della tua tastiera.<br>\n");
-  printf("<li>Regole riguardanti la nuova password:<br>");
-  printf("<ul><li>Lunghezza: minimo <font color=%s><b>%s</b></font>, massimo <font color=%s><b>%s</b></font> caratteri.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," lettere (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," numeri (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," caratteri speciali (eg: %,&,*,ecc.):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> Scelta libera</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>La tua nuova password sara' attivata entro 15 minuti.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Il tuo Account:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>La tua Password attuale:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>La nuova Password:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Riscrivi la nuova Password:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Cambia la mia password'>\n");
-  printf("<input type=reset name=reset value='Pulisci i campi'>\n");
-  printf("<input type=submit name=cancel value='Cancella'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Composizione:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Cambia la Password del server Squid</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Per ragioni di sicurezza, ricorda queste avvertenze riguardo alla tua password:\n");
+    printf("<ul>\n");
+    printf
+	("<li>La password e' case-sensitive, il che vuol dire che 'A' non e' la stessa cosa di 'a'.<br>\n");
+    printf
+	("<li>Puoi usare lettere, numeri o caratteri speciali della tua tastiera.<br>\n");
+    printf("<li>Regole riguardanti la nuova password:<br>");
+    printf
+	("<ul><li>Lunghezza: minimo <font color=%s><b>%s</b></font>, massimo <font color=%s><b>%s</b></font> caratteri.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules, " lettere (a-z, A-Z):<font color=%s><b> %s</b></font>",
+	    rucolor, minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " numeri (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " caratteri speciali (eg: %,&,*,ecc.):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> Scelta libera</b></font>", rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf("<li>La tua nuova password sara' attivata entro 15 minuti.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Il tuo Account:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>La tua Password attuale:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>La nuova Password:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Riscrivi la nuova Password:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Cambia la mia password'>\n");
+    printf("<input type=reset name=reset value='Pulisci i campi'>\n");
+    printf("<input type=submit name=cancel value='Cancella'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/Portuguese.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Portuguese.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Portuguese.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Portuguese.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,8 +1,7 @@
 /* Portuguses language added by Pedro L Orso <porso@usa.net> */
-
 #if defined(Portuguese)
-
-char *msg01 = "Arquivo de senhas sem premiss&atilde;o para grava&ccedil;&atilde;o:";
+char *msg01 =
+    "Arquivo de senhas sem premiss&atilde;o para grava&ccedil;&atilde;o:";
 char *msg02 = "Faltou a nova senha ou &eacute; muito curta (menor que";
 char *msg03 = "caracteres).";
 char *msg04 = "Nova senha muito longa (mais que ";
@@ -19,96 +18,117 @@
 char *msg15 = "N&atilde;o pode abrir o arquivo de configuracao:";
 char *msg16 = "N&atilde;o pode abrir o arquivo log:";
 char *msg17 = "Nova senha inv&aacute;lida.";
-char *msg18 = "Por favor, use as seguintes regras para entrar com a nova senha:";
+char *msg18 =
+    "Por favor, use as seguintes regras para entrar com a nova senha:";
 char *msg19 = "M&iacute;nimo de letras (a-z, A-Z)";
 char *msg20 = "M&iacute;nimo de n&uacute;meros (0-9)";
 char *msg21 = "M&iacute;nimo de caracteres especiais (teclado)";
 char *msg22 = "Altera&ccedil;&atilde;o da senha de acesso ao Squid";
-char *msg23 = "Arquivo de autoriza&ccedil;&atilde;o deve pertencer ao root. Por favor leia o README.";
-char *msg24 = "Arquivo de autoriza&ccedil;&atilde;o deve ter como atributos 755. Por favor leia o README.";
+char *msg23 =
+    "Arquivo de autoriza&ccedil;&atilde;o deve pertencer ao root. Por favor leia o README.";
+char *msg24 =
+    "Arquivo de autoriza&ccedil;&atilde;o deve ter como atributos 755. Por favor leia o README.";
 char *msg25 = "N&atilde;o pode abrir o arquivo de autoriza&ccedil;&atilde;o.";
-char *msg26 = "Voc&ecirc; n&atilde;o tem autoriza&ccedil;&atilde;o para alterar a senha.";
+char *msg26 =
+    "Voc&ecirc; n&atilde;o tem autoriza&ccedil;&atilde;o para alterar a senha.";
 char *msg27 = "Arquivo de autoriza&ccedil;&atilde;o n&atilde;o encontrado";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
-  char rules[255] = "<li>Composi&ccedil;&atilde;o:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Altera&ccedil;&atilde;o de senha do Squid</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Por medida de seguran&ccedil;a, lembre-se das regras abaixo para escolher sua senha:\n");
-  printf("<ul>\n");
-  printf("<li>A senha pode conter letras mai&uacute;sculas e/ou min&uacute;sculas, n&uacute;meros ou qualquer caracter do teclado. <br>\n");
-  printf("<li>Regras para a nova senha:<br>");
-  printf("<ul><li>Comprimento: m&iacute;nimo <font color=%s><b>%s</b></font>, m&aacute;ximo <font color=%s><b>%s</b></font> caracteres.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," letras (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," n&uacute;meros (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," caracteres especiaus (teclado):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> livre escolha.</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>Sua nova senha ser&aacute; efetivada em torno de 15 minutos.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Usu&aacute;rio: \n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Senha atual:\n");
-  printf("      <td><input type=password name=old_pw size=10>\n");
-  printf("  <tr><td align=right>Nova senha:\n");
-  printf("      <td><input type=password name=new_pw1 size=10>\n");
-  printf("  <tr><td align=right>Reentre a nova senha:\n");
-  printf("      <td><input type=password name=new_pw2 size=10>\n");
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Altere minha senha'>\n");
-  printf("<input type=reset name=reset value='Limpa os campos'>\n");
-  printf("<input type=submit name=cancel value='Cancele'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Composi&ccedil;&atilde;o:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>Altera&ccedil;&atilde;o de senha do Squid</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Por medida de seguran&ccedil;a, lembre-se das regras abaixo para escolher sua senha:\n");
+    printf("<ul>\n");
+    printf
+	("<li>A senha pode conter letras mai&uacute;sculas e/ou min&uacute;sculas, n&uacute;meros ou qualquer caracter do teclado. <br>\n");
+    printf("<li>Regras para a nova senha:<br>");
+    printf
+	("<ul><li>Comprimento: m&iacute;nimo <font color=%s><b>%s</b></font>, m&aacute;ximo <font color=%s><b>%s</b></font> caracteres.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules, " letras (a-z, A-Z):<font color=%s><b> %s</b></font>",
+	    rucolor, minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " n&uacute;meros (0-9):<font color=%s><b> %s</b></font>", rucolor,
+	    minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " caracteres especiaus (teclado):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> livre escolha.</b></font>",
+	    rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>Sua nova senha ser&aacute; efetivada em torno de 15 minutos.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Usu&aacute;rio: \n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Senha atual:\n");
+    printf("      <td><input type=password name=old_pw size=10>\n");
+    printf("  <tr><td align=right>Nova senha:\n");
+    printf("      <td><input type=password name=new_pw1 size=10>\n");
+    printf("  <tr><td align=right>Reentre a nova senha:\n");
+    printf("      <td><input type=password name=new_pw2 size=10>\n");
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='Altere minha senha'>\n");
+    printf("<input type=reset name=reset value='Limpa os campos'>\n");
+    printf("<input type=submit name=cancel value='Cancele'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/Russian.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Russian.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Russian.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Russian.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,116 +1,131 @@
-/* Russian language added by Andrew <andrew@extrim.ru> */
-
-#if defined(Russian)
-
-char *msg01 = "îÅÔ ÐÒÁ× ÄÌÑ ÚÁÐÉÓÉ × ÆÁÊÌ ÐÁÒÏÌÅÊ:";
-char *msg02 = "îÏ×ÙÊ ÐÁÒÏÌØ ÎÅ ÚÁÄÁÎ ÉÌÉ ÍÅÎÅÅ";
-char *msg03 = "ÓÉÍ×ÏÌÏ×.";
-char *msg04 = "îÏ×ÙÊ ÐÁÒÏÌØ ÂÏÌÅÅ";
-char *msg05 = "ðÏÖÁÌÕÊÓÔÁ, ÎÅ ÉÓÐÏÌØÚÕÊÔÅ ÔÏÔ ÖÅ ÓÁÍÙÊ ÐÁÒÏÌØ. ðÁÒÏÌØ ÎÅ ÉÚÍÅÎÅÎ.";
-char *msg06 = "îÏ×ÙÊ ÐÁÒÏÌØ É ÐÏÄÔ×ÅÒÖÄÅÎÉÅ ÎÅ ÓÏ×ÐÁÄÁÀÔ.";
-char *msg07 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÐÁÒÏÌÅÊ:";
-char *msg08 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ.";
-char *msg09 = "îÅ×ÅÒÎÙÊ ÐÁÒÏÌØ ÐÏÌØÚÏ×ÁÔÅÌÑ:";
-char *msg10 = "ðÁÒÏÌØ ÎÅ ÂÙÌ ÉÚÍÅÎÅÎ.";
-char *msg11 = "õÓÐÅÛÎÏ ÉÚÍÅÎÅÎ ÐÁÒÏÌØ ÐÏÌØÚÏ×ÁÔÅÌÑ";
-char *msg12 = "";
-char *msg13 = "ðÏÌØÚÏ×ÁÔÅÌØ:";
-char *msg14 = "ÎÅ ÎÁÊÄÅÎ.";
-char *msg15 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ:";
-char *msg16 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ log-ÆÁÊÌ:";
-char *msg17 = "îÅ×ÅÒÎÙÊ ÎÏ×ÙÊ ÐÁÒÏÌØ.";
-char *msg18 = "ðÏÖÁÌÕÊÓÔÁ, ÐÏÌØÚÕÊÔÅÓØ ÓÌÅÄÕÀÝÉÍÉ ÐÒÁ×ÉÌÁÍÉ ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ:";
-char *msg19 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÂÕË× (a-z, A-Z)";
-char *msg20 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÃÉÆÒ (0-9)";
-char *msg21 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÐÅÃÓÉÍ×ÏÌÏ× (Ó ËÌÁ×ÉÁÔÕÒÙ)";
-char *msg22 = "éÚÍÅÎÅÎÉÅ ÐÁÒÏÌÑ ÕÞÅÔÎÏÊ ÚÁÐÉÓÉ ÐÒÏËÓÉ ÓÅÒ×ÅÒÁ Squid";
-char *msg23 = "÷ÌÁÄÅÌØÃÅÍ ÆÁÊÌÁ Á×ÔÏÒÉÚÁÃÉÉ ÄÏÌÖÅÔ ÂÙÔØ root. ðÏÖÁÌÕÊÓÔÁ, ÞÉÔÁÊÔÅ README.";
-char *msg24 = "íÁÓËÁ ÄÏÓÔÕÐÁ Ë ÆÁÊÌÕ Á×ÔÏÒÉÚÁÃÉÉ ÄÏÌÖÎÁ ÂÙÔØ 755. ðÏÖÁÌÕÊÓÔÁ, ÞÉÔÁÊÔÅ README.";
-char *msg25 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ Á×ÔÏÒÉÚÁÃÉÉ.";
-char *msg26 = "õ ÷ÁÓ ÎÅÔ ÐÒÁ× ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ.";
-char *msg27 = "æÁÊÌ Á×ÔÏÒÉÚÁÃÉÉ ÎÅ ÎÁÊÄÅÎ.";
-
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
-{
-
-  char rules[255] = "<li>ïÇÒÁÎÉÞÅÎÉÅ ÎÁ ÓÉÍ×ÏÌÙ:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>éÚÍÅÎÅÎÉÅ ÐÁÒÏÌÑ ÄÏÓÔÕÐÁ Ë Squid</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("éÚ ÓÏÏÂÒÁÖÅÎÉÊ ÂÅÚÏÐÁÓÎÏÓÔÉ, ÚÁÐÏÍÎÉÔÅ ÓÌÅÄÕÀÝÉÅ ÐÒÁ×ÉÌÁ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ:\n");
-  printf("<ul>\n");
-  printf("<li>ðÒÉ ××ÏÄÅ ÎÏ×ÏÇÏ ÐÁÒÏÌÑ ÒÁÚÌÉÞÁÀÔÓÑ ÍÁÌÅÎØËÉÅ É ÂÏÌØÛÉÅ ÂÕË×Ù, Ô.Å. 'A' ÎÅ ÔÏ ÖÅ ÓÁÍÏÅ, ÞÔÏ 'a'.<br>\n");
-  printf("<li>÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÂÕË×Ù, ÃÉÆÒÙ É ÄÒÕÇÉÅ ÓÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ ÎÁ ×ÁÛÅÊ ËÌÁ×ÉÁÔÕÒÅ.<br>\n");
-  printf("<li>ðÒÁ×ÉÌÁ ÄÌÑ ÎÏ×ÏÇÏ ÐÁÒÏÌÑ:<br>");
-  printf("<ul><li>äÌÉÎÁ: ÍÉÎÉÍÕÍ <font color=%s><b>%s</b></font>, ÍÁËÓÉÍÕÍ <font color=%s><b>%s</b></font> ÓÉÍ×ÏÌÏ×.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," ÂÕË×Ù (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," ÃÉÆÒÙ (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," ÓÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ (Ó ËÌÁ×ÉÁÔÕÒÙ):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> Ó×ÏÂÏÄÎÙÊ ×ÙÂÏÒ</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>÷ÁÛ ÎÏ×ÙÊ ÐÁÒÏÌØ ×ÓÔÕÐÉÔ × ÓÉÌÕ ÎÅ ÐÏÚÄÎÅÅ, ÞÅÍ ÞÅÒÅÚ 15 ÍÉÎÕÔ.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>éÍÑ ÷ÁÛÅÊ ÕÞÅÔÎÏÊ ÚÁÐÉÓÉ\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>÷ÁÛ ÔÅËÕÛÉÊ ÐÁÒÏÌØ:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>îÏ×ÙÊ ÐÁÒÏÌØ:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>ðÏÄÔ×ÅÒÄÉÔÅ ÎÏ×ÙÊ ÐÁÒÏÌØ:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='éÚÍÅÎÉÔØ ÍÏÊ ÐÁÒÏÌØ'>\n");
-  printf("<input type=reset name=reset value='ïÞÉÓÔÉÔØ ×ÓÅ ÐÏÌÑ'>\n");
-  printf("<input type=submit name=cancel value='ïÔÍÅÎÁ'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
-
-  fflush(stdout);
-  return;
-
-}
-#endif
+/* Russian language added by Andrew <andrew@extrim.ru> */  
+    
+#if defined(Russian)
+char *msg02 = "îÏ×ÙÊ ÐÁÒÏÌØ ÎÅ ÚÁÄÁÎ ÉÌÉ ÍÅÎÅÅ";
+char *msg03 = "ÓÉÍ×ÏÌÏ×.";
+char *msg04 = "îÏ×ÙÊ ÐÁÒÏÌØ ÂÏÌÅÅ";
+char *msg05 = "ðÏÖÁÌÕÊÓÔÁ, ÎÅ ÉÓÐÏÌØÚÕÊÔÅ ÔÏÔ ÖÅ ÓÁÍÙÊ ÐÁÒÏÌØ. ðÁÒÏÌØ ÎÅ ÉÚÍÅÎÅÎ.";
+char *msg06 = "îÏ×ÙÊ ÐÁÒÏÌØ É ÐÏÄÔ×ÅÒÖÄÅÎÉÅ ÎÅ ÓÏ×ÐÁÄÁÀÔ.";
+char *msg07 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÐÁÒÏÌÅÊ:";
+char *msg08 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ.";
+char *msg09 = "îÅ×ÅÒÎÙÊ ÐÁÒÏÌØ ÐÏÌØÚÏ×ÁÔÅÌÑ:";
+char *msg10 = "ðÁÒÏÌØ ÎÅ ÂÙÌ ÉÚÍÅÎÅÎ.";
+char *msg11 = "õÓÐÅÛÎÏ ÉÚÍÅÎÅÎ ÐÁÒÏÌØ ÐÏÌØÚÏ×ÁÔÅÌÑ";
+char *msg12 = "";
+char *msg13 = "ðÏÌØÚÏ×ÁÔÅÌØ:";
+char *msg14 = "ÎÅ ÎÁÊÄÅÎ.";
+char *msg15 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ:";
+char *msg16 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ log-ÆÁÊÌ:";
+char *msg17 = "îÅ×ÅÒÎÙÊ ÎÏ×ÙÊ ÐÁÒÏÌØ.";
+char *msg18 = "ðÏÖÁÌÕÊÓÔÁ, ÐÏÌØÚÕÊÔÅÓØ ÓÌÅÄÕÀÝÉÍÉ ÐÒÁ×ÉÌÁÍÉ ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ:";
+char *msg19 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÂÕË× (a-z, A-Z)";
+char *msg20 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÃÉÆÒ (0-9)";
+char *msg21 = "íÉÎÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÐÅÃÓÉÍ×ÏÌÏ× (Ó ËÌÁ×ÉÁÔÕÒÙ)";
+char *msg22 = "éÚÍÅÎÅÎÉÅ ÐÁÒÏÌÑ ÕÞÅÔÎÏÊ ÚÁÐÉÓÉ ÐÒÏËÓÉ ÓÅÒ×ÅÒÁ Squid";
+char *msg23 = "÷ÌÁÄÅÌØÃÅÍ ÆÁÊÌÁ Á×ÔÏÒÉÚÁÃÉÉ ÄÏÌÖÅÔ ÂÙÔØ root. ðÏÖÁÌÕÊÓÔÁ, ÞÉÔÁÊÔÅ README.";
+char *msg24 = "íÁÓËÁ ÄÏÓÔÕÐÁ Ë ÆÁÊÌÕ Á×ÔÏÒÉÚÁÃÉÉ ÄÏÌÖÎÁ ÂÙÔØ 755. ðÏÖÁÌÕÊÓÔÁ, ÞÉÔÁÊÔÅ README.";
+char *msg25 = "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ Á×ÔÏÒÉÚÁÃÉÉ.";
+char *msg26 = "õ ÷ÁÓ ÎÅÔ ÐÒÁ× ÄÌÑ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ.";
+char *msg27 = "æÁÊÌ Á×ÔÏÒÉÚÁÃÉÉ ÎÅ ÎÁÊÄÅÎ.";
+
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
+{
+
+    char rules[255] = "<li>ïÇÒÁÎÉÞÅÎÉÅ ÎÁ ÓÉÍ×ÏÌÙ:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf("  <title>éÚÍÅÎÅÎÉÅ ÐÁÒÏÌÑ ÄÏÓÔÕÐÁ Ë Squid</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("éÚ ÓÏÏÂÒÁÖÅÎÉÊ ÂÅÚÏÐÁÓÎÏÓÔÉ, ÚÁÐÏÍÎÉÔÅ ÓÌÅÄÕÀÝÉÅ ÐÒÁ×ÉÌÁ ÉÚÍÅÎÅÎÉÑ ÐÁÒÏÌÑ:\n");
+    printf("<ul>\n");
+    printf
+	("<li>ðÒÉ ××ÏÄÅ ÎÏ×ÏÇÏ ÐÁÒÏÌÑ ÒÁÚÌÉÞÁÀÔÓÑ ÍÁÌÅÎØËÉÅ É ÂÏÌØÛÉÅ ÂÕË×Ù, Ô.Å. 'A' ÎÅ ÔÏ ÖÅ ÓÁÍÏÅ, ÞÔÏ 'a'.<br>\n");
+    printf
+	("<li>÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÂÕË×Ù, ÃÉÆÒÙ É ÄÒÕÇÉÅ ÓÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ ÎÁ ×ÁÛÅÊ ËÌÁ×ÉÁÔÕÒÅ.<br>\n");
+    printf("<li>ðÒÁ×ÉÌÁ ÄÌÑ ÎÏ×ÏÇÏ ÐÁÒÏÌÑ:<br>");
+    printf
+	("<ul><li>äÌÉÎÁ: ÍÉÎÉÍÕÍ <font color=%s><b>%s</b></font>, ÍÁËÓÉÍÕÍ <font color=%s><b>%s</b></font> ÓÉÍ×ÏÌÏ×.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules, " ÂÕË×Ù (a-z, A-Z):<font color=%s><b> %s</b></font>",
+	    rucolor, minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules, " ÃÉÆÒÙ (0-9):<font color=%s><b> %s</b></font>",
+	    rucolor, minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " ÓÐÅÃÉÁÌØÎÙÅ ÓÉÍ×ÏÌÙ (Ó ËÌÁ×ÉÁÔÕÒÙ):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> Ó×ÏÂÏÄÎÙÊ ×ÙÂÏÒ</b></font>",
+	    rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>÷ÁÛ ÎÏ×ÙÊ ÐÁÒÏÌØ ×ÓÔÕÐÉÔ × ÓÉÌÕ ÎÅ ÐÏÚÄÎÅÅ, ÞÅÍ ÞÅÒÅÚ 15 ÍÉÎÕÔ.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>éÍÑ ÷ÁÛÅÊ ÕÞÅÔÎÏÊ ÚÁÐÉÓÉ\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>÷ÁÛ ÔÅËÕÛÉÊ ÐÁÒÏÌØ:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>îÏ×ÙÊ ÐÁÒÏÌØ:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>ðÏÄÔ×ÅÒÄÉÔÅ ÎÏ×ÙÊ ÐÁÒÏÌØ:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf("<input type=submit name=change value='éÚÍÅÎÉÔØ ÍÏÊ ÐÁÒÏÌØ'>\n");
+    printf("<input type=reset name=reset value='ïÞÉÓÔÉÔØ ×ÓÅ ÐÏÌÑ'>\n");
+    printf("<input type=submit name=cancel value='ïÔÍÅÎÁ'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
+
+    fflush(stdout);
+    return;
+
+}
+#endif
Index: squid/contrib/chpasswd/Spanish.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/Spanish.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/Spanish.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/Spanish.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,12 +1,13 @@
 /* Spanish language added by Horacio Diaz Requejo <horacio@edg.net.mx> */
-
 #if defined(Spanish)
-
-char *msg01 = "El archivo de contrase&ntilde;as no tiene permisos para ser modificado:";
-char *msg02 = "La nueva contrase&ntilde;a es muy peque&ntilde;a (tiene menos de";
+char *msg01 =
+    "El archivo de contrase&ntilde;as no tiene permisos para ser modificado:";
+char *msg02 =
+    "La nueva contrase&ntilde;a es muy peque&ntilde;a (tiene menos de";
 char *msg03 = "caracteres).";
 char *msg04 = "La nueva contrase&ntilde;a es muy grande (tiene mas de";
-char *msg05 = "Porfavor, no use la misma contrase&ntilde;a que tenia anteriormente";
+char *msg05 =
+    "Porfavor, no use la misma contrase&ntilde;a que tenia anteriormente";
 char *msg06 = "La nueva contrase&ntilde;a no coincide en ambos campos.";
 char *msg07 = "No pudo abrir el archivo de contrase&ntilde;as:";
 char *msg08 = "No se pudo crear un archivo temporal.";
@@ -19,98 +20,122 @@
 char *msg15 = "No pudo abrir el archivo de configuraci&oacute;n:";
 char *msg16 = "No se pudo abrir el archivo de logs:";
 char *msg17 = "La nueva contrasena es inv&aacute;lida.";
-char *msg18 = "Porfavor, utilize las siguientes reglas para contruir su nueva contrase&ntilde;a:";
+char *msg18 =
+    "Porfavor, utilize las siguientes reglas para contruir su nueva contrase&ntilde;a:";
 char *msg19 = "Utilize cualquiera de los siguientes caracteres (a-z, A-Z)";
 char *msg20 = "Utilize n&uacute;meros (0-9)";
 char *msg21 = "Utilize caracteres especiales (/,-,$,%,^,etc)";
 char *msg22 = "Cambiando la contrase&ntilde;a de navegaci&oacute;n en Internet";
-char *msg23 = "El archivo de autorizaci&oacute;n debe pertenecer a root. Porfavor lea el README.";
-char *msg24 = "Los permisos del archivo de autorizaci&oacute;n son incorrectos (deben ser 755). Porfavor lea el README.";
+char *msg23 =
+    "El archivo de autorizaci&oacute;n debe pertenecer a root. Porfavor lea el README.";
+char *msg24 =
+    "Los permisos del archivo de autorizaci&oacute;n son incorrectos (deben ser 755). Porfavor lea el README.";
 char *msg25 = "No se pudo abrir el archivo de autorizaci&oacute;n.";
 char *msg26 = "Usted no esta autorizado a cambiar contrase&ntilde;as.";
 char *msg27 = "No se encontro el archivo de autorizaci&oacute;n.";
 
-static void UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec, char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo, char *width, char *height, char *header, char *bgimage)
+static void
+UserForm(char *minlen, char *maxlen, char *minchar, char *minnum, char *minspec,
+    char *bgcolor, char *txcolor, char *ticolor, char *rucolor, char *logo,
+    char *width, char *height, char *header, char *bgimage)
 {
 
-  char rules[255] = "<li>Sintaxis del password:";
-  char wrules[255];
-  int  frules=0;
-
-  printf("Content-type: text/html\n");
-  puts("\n");
-  printf("<html>\n");
-  printf("<head>\n");
-  printf("  <title>Cambio de contrase&ntilde;a para navegar en internet</title>\n");
-  printf("</head>\n");
-  printf("<body bgcolor=%s text=%s background='%s'>\n",bgcolor,txcolor,bgimage);
-
-  if(strlen(logo) > 0)
-     printf("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",logo,width,height,ticolor,header);
-   else
-     printf("<h2><font color=%s>%s</font></h2>\n",ticolor,header);
-
-  printf("Por razones de seguridad, recuerde utilizar las siguientes reglas al momento de elegir su nueva contrase&ntilde;a:\n");
-  printf("<ul>\n");
-  printf("<li>La contrase&ntilde;a es sensitiva a las may&uacute;sculas y min&uacute;sculas, es decir, una  'A' no es igual a una 'a'.<br>\n");
-  printf("<li>Al seleccionar su nueva contrase&ntilde;a debe utilizar letras, n&uacute;meros y caractares especiales.<br>\n");
-  printf("<li>Reglas para crear su nueva contrase&ntilde;a:<br>");
-  printf("<ul><li>Longitud de la contrase&ntilde;a: minimo <font color=%s><b>%s</b></font>, maximo <font color=%s><b>%s</b></font> de caracteres.<br>\n",rucolor,minlen,rucolor,maxlen);
-
-  if(strcmp(minchar,"0") != 0) {
-     sprintf(wrules," caracteres (a-z, A-Z):<font color=%s><b> %s</b></font>",rucolor,minchar);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minnum,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," n&uacute;meros (0-9):<font color=%s><b> %s</b></font>",rucolor,minnum);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(strcmp(minspec,"0") != 0) {
-     if(frules)
-        strcat(rules,", ");
-     sprintf(wrules," caracteres especiales (#,/,-,etc):<font color=%s><b> %s</b></font>",rucolor,minspec);
-     strcat(rules,wrules);
-     frules=1;
-  }
-  if(!frules){
-     sprintf(wrules,"<font color=%s><b> A elecci&oacute;n libre</b></font>",rucolor);
-     strcat(rules,wrules);
-  }
-  strcat(rules,"<br>");
-  printf(rules);
-  printf("</ul>\n");
-
-  printf("<li>El nuevo password comenzar&aacute; a funcionar aproximadamente en 15 minutos.\n");
-  printf("</ul>\n");
-  printf("<form action='chpasswd.cgi' method=POST>\n");
-  printf("<center>\n");
-  printf("<hr noshade>\n");
-  printf("<table cellpadding=0 cellspacing=0>\n");
-  printf("  <tr><td align=right>Cuenta de acceso a Internet:\n");
-  printf("      <td><input type=text name=user size=10>\n");
-  printf("  <tr><td align=right>Su contrase&ntilde;a actual:\n");
-  printf("      <td><input type=password name=old_pw size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Su nueva contrase&ntilde;a:\n");
-  printf("      <td><input type=password name=new_pw1 size=%s>\n",maxlen);
-  printf("  <tr><td align=right>Reescriba su nueva contrase&ntilde;a:\n");
-  printf("      <td><input type=password name=new_pw2 size=%s>\n",maxlen);
-  printf("</table>\n");
-  printf("<hr noshade>\n");
-  printf("<input type=submit name=change value='Cambiar la contrase&ntilde;a'>\n");
-  printf("<input type=reset name=reset value='Borrar todo'>\n");
-  printf("<input type=submit name=cancel value='Cancelar'>\n");
-  printf("</center>\n");
-  printf("</form>\n");
-  printf("<a href='%s'>%s-%s</a>\n",URL,PGM,VERSION);
-  printf("</body>\n");
-  printf("</html>\n");
+    char rules[255] = "<li>Sintaxis del password:";
+    char wrules[255];
+    int frules = 0;
+
+    printf("Content-type: text/html\n");
+    puts("\n");
+    printf("<html>\n");
+    printf("<head>\n");
+    printf
+	("  <title>Cambio de contrase&ntilde;a para navegar en internet</title>\n");
+    printf("</head>\n");
+    printf("<body bgcolor=%s text=%s background='%s'>\n", bgcolor, txcolor,
+	bgimage);
+
+    if (strlen(logo) > 0)
+	printf
+	    ("<h2><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font></h2>\n",
+	    logo, width, height, ticolor, header);
+    else
+	printf("<h2><font color=%s>%s</font></h2>\n", ticolor, header);
+
+    printf
+	("Por razones de seguridad, recuerde utilizar las siguientes reglas al momento de elegir su nueva contrase&ntilde;a:\n");
+    printf("<ul>\n");
+    printf
+	("<li>La contrase&ntilde;a es sensitiva a las may&uacute;sculas y min&uacute;sculas, es decir, una  'A' no es igual a una 'a'.<br>\n");
+    printf
+	("<li>Al seleccionar su nueva contrase&ntilde;a debe utilizar letras, n&uacute;meros y caractares especiales.<br>\n");
+    printf("<li>Reglas para crear su nueva contrase&ntilde;a:<br>");
+    printf
+	("<ul><li>Longitud de la contrase&ntilde;a: minimo <font color=%s><b>%s</b></font>, maximo <font color=%s><b>%s</b></font> de caracteres.<br>\n",
+	rucolor, minlen, rucolor, maxlen);
+
+    if (strcmp(minchar, "0") != 0) {
+	sprintf(wrules,
+	    " caracteres (a-z, A-Z):<font color=%s><b> %s</b></font>", rucolor,
+	    minchar);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minnum, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " n&uacute;meros (0-9):<font color=%s><b> %s</b></font>", rucolor,
+	    minnum);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (strcmp(minspec, "0") != 0) {
+	if (frules)
+	    strcat(rules, ", ");
+	sprintf(wrules,
+	    " caracteres especiales (#,/,-,etc):<font color=%s><b> %s</b></font>",
+	    rucolor, minspec);
+	strcat(rules, wrules);
+	frules = 1;
+    }
+    if (!frules) {
+	sprintf(wrules, "<font color=%s><b> A elecci&oacute;n libre</b></font>",
+	    rucolor);
+	strcat(rules, wrules);
+    }
+    strcat(rules, "<br>");
+    printf(rules);
+    printf("</ul>\n");
+
+    printf
+	("<li>El nuevo password comenzar&aacute; a funcionar aproximadamente en 15 minutos.\n");
+    printf("</ul>\n");
+    printf("<form action='chpasswd.cgi' method=POST>\n");
+    printf("<center>\n");
+    printf("<hr noshade>\n");
+    printf("<table cellpadding=0 cellspacing=0>\n");
+    printf("  <tr><td align=right>Cuenta de acceso a Internet:\n");
+    printf("      <td><input type=text name=user size=10>\n");
+    printf("  <tr><td align=right>Su contrase&ntilde;a actual:\n");
+    printf("      <td><input type=password name=old_pw size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Su nueva contrase&ntilde;a:\n");
+    printf("      <td><input type=password name=new_pw1 size=%s>\n", maxlen);
+    printf("  <tr><td align=right>Reescriba su nueva contrase&ntilde;a:\n");
+    printf("      <td><input type=password name=new_pw2 size=%s>\n", maxlen);
+    printf("</table>\n");
+    printf("<hr noshade>\n");
+    printf
+	("<input type=submit name=change value='Cambiar la contrase&ntilde;a'>\n");
+    printf("<input type=reset name=reset value='Borrar todo'>\n");
+    printf("<input type=submit name=cancel value='Cancelar'>\n");
+    printf("</center>\n");
+    printf("</form>\n");
+    printf("<a href='%s'>%s-%s</a>\n", URL, PGM, VERSION);
+    printf("</body>\n");
+    printf("</html>\n");
 
-  fflush(stdout);
-  return;
+    fflush(stdout);
+    return;
 
 }
 #endif
Index: squid/contrib/chpasswd/chpasswd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/chpasswd.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/chpasswd.c	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/chpasswd.c	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -10,98 +10,105 @@
 #define MAXLEN 1024
 #define hhex(x) (((x) >= '0' && (x) <= '9') || ((x) >= 'a' && (x) <= 'f') || \
                   ((x) >= 'A' && (x) <= 'F'))
-char           *tn;
+char *tn;
 
 static void fixpwd(str);
-static int  htoi(s);
-void getconf(ConfigFile,IpAuth,PwdFile,PwdMinLen,PwdMaxLen,PwdLogFile,BgColor,TxColor,TiColor,RuColor,Logo,Width,Height,Header,BgImage,SmtpUser,SmtpSubject);
-static void vrfyrule(unsigned char *, unsigned char *, unsigned char *, unsigned char *);
-static void vrfyauth(IpAuth,PwdLogFile,PwdFile,SmtpUser,SmtpSubject);
+static int htoi(s);
+void getconf(ConfigFile, IpAuth, PwdFile, PwdMinLen, PwdMaxLen, PwdLogFile,
+    BgColor, TxColor, TiColor, RuColor, Logo, Width, Height, Header, BgImage,
+    SmtpUser, SmtpSubject);
+static void vrfyrule(unsigned char *, unsigned char *, unsigned char *,
+    unsigned char *);
+static void vrfyauth(IpAuth, PwdLogFile, PwdFile, SmtpUser, SmtpSubject);
 eperror(s);
 
-void main(argc, argv)
-    int             argc;
-    char           *argv[];
-{
-
-    FILE           *fpw,
-                   *tmp;
-    char            buf[MAXLEN];
-    char            User[255];
-    char            PUser[255];
-    char            WUser[255];
-    char            Old_pw[255];
-    char            WOld_pw[255];
-    char            New_pw1[255];
-    char            New_pw2[255];
-    char            Action[255];
-    char            Msg[MAXLEN];
-    char            command[255];
-    char	    PwdFile[MAXLEN]="c:\\squid23\\etc\\passwd";
-    char	    IpAuth[MAXLEN]="";
-    char	    PwdMinLen[255]="4";
-    char	    PwdMaxLen[255]="10";
-    char	    ShowPwd[255]="no";
-    char	    PwdMinChar[255]="0";
-    char	    PwdMinNum[255]="0";
-    char	    PwdMinSpec[255]="0";
-    char	    BgColor[255]="white";
-    char	    TiColor[255]="green";
-    char	    TxColor[255]="blue";
-    char	    RuColor[255]="red";
-    char	    Logo[MAXLEN]="";
-    char	    Width[MAXLEN]="80";
-    char	    Height[MAXLEN]="80";
-    char	    Header[MAXLEN];
-    char	    BgImage[MAXLEN]="";
-    char	    SmtpUser[MAXLEN]="";
-    char	    SmtpSubject[MAXLEN]="CHPASSWD EVENT";
-    char            InputBuffer[1024];
-    char	    ConfigFile[255];
-    char	    PwdLogFile[255];
-    char           *pContentLength;
-    char           *str;
-    char           *cpw,
-                    salt[3];
-    int             ContentLength;
-    int             i;
-    int             x,
-                    ok = 0;
+void
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+
+    FILE *fpw, *tmp;
+    char buf[MAXLEN];
+    char User[255];
+    char PUser[255];
+    char WUser[255];
+    char Old_pw[255];
+    char WOld_pw[255];
+    char New_pw1[255];
+    char New_pw2[255];
+    char Action[255];
+    char Msg[MAXLEN];
+    char command[255];
+    char PwdFile[MAXLEN] = "c:\\squid23\\etc\\passwd";
+    char IpAuth[MAXLEN] = "";
+    char PwdMinLen[255] = "4";
+    char PwdMaxLen[255] = "10";
+    char ShowPwd[255] = "no";
+    char PwdMinChar[255] = "0";
+    char PwdMinNum[255] = "0";
+    char PwdMinSpec[255] = "0";
+    char BgColor[255] = "white";
+    char TiColor[255] = "green";
+    char TxColor[255] = "blue";
+    char RuColor[255] = "red";
+    char Logo[MAXLEN] = "";
+    char Width[MAXLEN] = "80";
+    char Height[MAXLEN] = "80";
+    char Header[MAXLEN];
+    char BgImage[MAXLEN] = "";
+    char SmtpUser[MAXLEN] = "";
+    char SmtpSubject[MAXLEN] = "CHPASSWD EVENT";
+    char InputBuffer[1024];
+    char ConfigFile[255];
+    char PwdLogFile[255];
+    char *pContentLength;
+    char *str;
+    char *cpw, salt[3];
+    int ContentLength;
+    int i;
+    int x, ok = 0;
 
     tn = NULL;
     fpw = NULL;
     tmp = NULL;
 
-    buf[0]='\0';
-    User[0]='\0';
-    PUser[0]='\0';
-    WUser[0]='\0';
-    Old_pw[0]='\0';
-    WOld_pw[0]='\0';
-    New_pw1[0]='\0';
-    New_pw2[0]='\0';
-    Action[0]='\0';
-    Msg[0]='\0';
-    command[0]='\0';
-    PwdLogFile[0]='\0';
-    strcpy(Header,msg22);
+    buf[0] = '\0';
+    User[0] = '\0';
+    PUser[0] = '\0';
+    WUser[0] = '\0';
+    Old_pw[0] = '\0';
+    WOld_pw[0] = '\0';
+    New_pw1[0] = '\0';
+    New_pw2[0] = '\0';
+    Action[0] = '\0';
+    Msg[0] = '\0';
+    command[0] = '\0';
+    PwdLogFile[0] = '\0';
+    strcpy(Header, msg22);
 
-    sprintf(ConfigFile,"%s\\chpasswd.conf","c:\\squid23\\etc");
+    sprintf(ConfigFile, "%s\\chpasswd.conf", "c:\\squid23\\etc");
     if (access(ConfigFile, R_OK) == 0)
-       getconf(ConfigFile,IpAuth,PwdFile,PwdMinLen,PwdMaxLen,PwdMinChar,PwdMinNum,PwdMinSpec,PwdLogFile,ShowPwd,BgColor,TxColor,TiColor,RuColor,Logo,Width,Height,Header,BgImage,SmtpUser,SmtpSubject);
-
-    if (strlen(IpAuth) > 0 ) {
-       if (access(IpAuth, R_OK) != 0) {
-          Hmsg(msg27);
-          if(strlen(PwdLogFile) > 0)
-             Log(PwdLogFile,"-","","no",msg27,PwdFile,SmtpUser,SmtpSubject);
-          exit(1);
-       }
-       vrfyauth(IpAuth,PwdLogFile,PwdFile,SmtpUser,SmtpSubject);
+	getconf(ConfigFile, IpAuth, PwdFile, PwdMinLen, PwdMaxLen, PwdMinChar,
+	    PwdMinNum, PwdMinSpec, PwdLogFile, ShowPwd, BgColor, TxColor,
+	    TiColor, RuColor, Logo, Width, Height, Header, BgImage, SmtpUser,
+	    SmtpSubject);
+
+    if (strlen(IpAuth) > 0) {
+	if (access(IpAuth, R_OK) != 0) {
+	    Hmsg(msg27);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, "-", "", "no", msg27, PwdFile, SmtpUser,
+		    SmtpSubject);
+	    exit(1);
+	}
+	vrfyauth(IpAuth, PwdLogFile, PwdFile, SmtpUser, SmtpSubject);
     }
 
     if (strcmp(getenv("REQUEST_METHOD"), "GET") == 0) {
-	UserForm(PwdMinLen,PwdMaxLen,PwdMinChar,PwdMinNum,PwdMinSpec,BgColor,TxColor,TiColor,RuColor,Logo,Width,Height,Header,BgImage);
+	UserForm(PwdMinLen, PwdMaxLen, PwdMinChar, PwdMinNum, PwdMinSpec,
+	    BgColor, TxColor, TiColor, RuColor, Logo, Width, Height, Header,
+	    BgImage);
 	return;
     }
 
@@ -137,74 +144,79 @@
     getword(New_pw2, InputBuffer, '&');
     getword(Action, InputBuffer, '=');
 
-    if(atoi(PwdMinChar) || atoi(PwdMinNum) || atoi(PwdMinSpec))
-       vrfyrule(New_pw1,PwdMinChar,PwdMinNum,PwdMinSpec);
+    if (atoi(PwdMinChar) || atoi(PwdMinNum) || atoi(PwdMinSpec))
+	vrfyrule(New_pw1, PwdMinChar, PwdMinNum, PwdMinSpec);
 
     fixpwd(Old_pw);
 
     if (strcmp(Action, "change") == 0) {
-        if (strlen(New_pw1) < atoi(PwdMinLen)) {
-            sprintf(Msg, "%s %s %s",msg02, PwdMinLen, msg03);
- 	    if(strlen(PwdLogFile) > 0)
-  	       Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+	if (strlen(New_pw1) < atoi(PwdMinLen)) {
+	    sprintf(Msg, "%s %s %s", msg02, PwdMinLen, msg03);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, User, New_pw1, ShowPwd, Msg, PwdFile, SmtpUser,
+		    SmtpSubject);
 	    Herror(Msg, fpw, tmp);
 	    return;
-        }
+	}
 
 	if (strlen(New_pw1) > atoi(PwdMaxLen)) {
-	    sprintf(Msg, "%s %s %s",msg04, PwdMaxLen, msg03);
-            if(strlen(PwdLogFile) > 0)
-               Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+	    sprintf(Msg, "%s %s %s", msg04, PwdMaxLen, msg03);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, User, New_pw1, ShowPwd, Msg, PwdFile, SmtpUser,
+		    SmtpSubject);
 	    Herror(Msg, fpw, tmp);
 	    return;
 	}
 
 	if (strcmp(Old_pw, New_pw1) == 0) {
-	    sprintf(Msg, "%s",msg05);
-            if(strlen(PwdLogFile) > 0)
-               Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+	    sprintf(Msg, "%s", msg05);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, User, New_pw1, ShowPwd, Msg, PwdFile, SmtpUser,
+		    SmtpSubject);
 	    Herror(Msg, fpw, tmp);
 	    return;
 	}
 	if (strcmp(New_pw1, New_pw2) != 0) {
-	    sprintf(Msg, "%s",msg06);
-            if(strlen(PwdLogFile) > 0)
-               Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+	    sprintf(Msg, "%s", msg06);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, User, New_pw1, ShowPwd, Msg, PwdFile, SmtpUser,
+		    SmtpSubject);
 	    Herror(Msg, fpw, tmp);
 	    return;
 	}
 	if ((fpw = fopen(PwdFile, "r")) == NULL) {
-	    sprintf(Msg, "%s %s",msg07, PwdFile);
+	    sprintf(Msg, "%s %s", msg07, PwdFile);
 	    Herror(Msg, fpw, tmp);
 	    return;
 	}
 	tn = tmpnam(NULL);
 	if ((tmp = fopen(tn, "w")) == NULL) {
-	    sprintf(Msg, "%s",msg08);
+	    sprintf(Msg, "%s", msg08);
 	    Herror(Msg, fpw, tmp);
 	    return;
 	}
 	while (fgets(buf, MAXLEN, fpw) != NULL) {
 
 	    if (!ok) {
-                strcpy(PUser,User);
-                strcat(PUser,":");
+		strcpy(PUser, User);
+		strcat(PUser, ":");
 
-                if ((str = (char *) strstr(buf, PUser)) != (char *) NULL ) {
+		if ((str = (char *) strstr(buf, PUser)) != (char *) NULL) {
 		    getword(WUser, buf, ':');
 		    getword(WOld_pw, buf, '\n');
 
 		    if (strcmp(WOld_pw, crypt(Old_pw, WOld_pw)) != 0) {
-			sprintf(Msg, "%s %s",msg09, User);
-            		if(strlen(PwdLogFile) > 0)
-               		   Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+			sprintf(Msg, "%s %s", msg09, User);
+			if (strlen(PwdLogFile) > 0)
+			    Log(PwdLogFile, User, New_pw1, ShowPwd, Msg,
+				PwdFile, SmtpUser, SmtpSubject);
 			Herror(Msg, fpw, tmp);
 			return;
 		    }
-                    fixpwd(New_pw1);
+		    fixpwd(New_pw1);
 		    (void) srand((int) time((time_t *) NULL));
 		    to64(&salt[0], rand(), 2);
-		    cpw = crypt(New_pw1, salt);	
+		    cpw = crypt(New_pw1, salt);
 		    sprintf(buf, "%s:%s\n", User, cpw);
 		    ok++;
 
@@ -221,16 +233,19 @@
 	unlink(tn);
 
 	if (ok)
-	    Changed(User, PwdLogFile, New_pw1, ShowPwd, PwdFile, SmtpUser, SmtpSubject);
+	    Changed(User, PwdLogFile, New_pw1, ShowPwd, PwdFile, SmtpUser,
+		SmtpSubject);
 	else
-	    NotFound(User, PwdLogFile, New_pw1, ShowPwd, PwdFile, SmtpUser, SmtpSubject);
+	    NotFound(User, PwdLogFile, New_pw1, ShowPwd, PwdFile, SmtpUser,
+		SmtpSubject);
     } else {
-        if (strcmp(Action, "cancel") == 0) {
-   	   sprintf(Msg, "%s",msg10);
-           if(strlen(PwdLogFile) > 0)
-              Log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject);
-	   Herror(Msg, fpw, tmp);
-	   return;
+	if (strcmp(Action, "cancel") == 0) {
+	    sprintf(Msg, "%s", msg10);
+	    if (strlen(PwdLogFile) > 0)
+		Log(PwdLogFile, User, New_pw1, ShowPwd, Msg, PwdFile, SmtpUser,
+		    SmtpSubject);
+	    Herror(Msg, fpw, tmp);
+	    return;
 	}
     }
     return;
@@ -240,8 +255,7 @@
 void
 getword(char *word, char *line, char stop)
 {
-    int             x = 0,
-                    y;
+    int x = 0, y;
 
     for (x = 0; ((line[x]) && (line[x] != stop)); x++)
 	word[x] = line[x];
@@ -286,7 +300,7 @@
 void
 putline(FILE * f, char *l)
 {
-    int             x;
+    int x;
 
     for (x = 0; l[x]; x++)
 	fputc(l[x], f);
@@ -297,12 +311,13 @@
 static unsigned char itoa64[] =	/*
 				 * 0 ... 63 => ascii - 64 
 				 */
-"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
-void to64(s, v, n)
-    register char  *s;
-    register long   v;
-    register int    n;
+void
+to64(s, v, n)
+     register char *s;
+     register long v;
+     register int n;
 {
     while (--n >= 0) {
 	*s++ = itoa64[v & 0x3f];
@@ -312,7 +327,8 @@
 
 
 void
-Changed(char *user, char *PwdLogFile, char *newpwd, char *showpwd, char *PwdFile, char *SmtpUser, char *SmtpSubject)
+Changed(char *user, char *PwdLogFile, char *newpwd, char *showpwd,
+    char *PwdFile, char *SmtpUser, char *SmtpSubject)
 {
     char Msg[MAXLEN];
 
@@ -320,10 +336,11 @@
     puts("\n");
     printf("<html>\n");
     printf("<font color=blue size=+2>");
-    sprintf(Msg, "%s %s %s",msg11, user, msg12);
-    if(strlen(PwdLogFile) > 0)
-       Log(PwdLogFile,user,newpwd,showpwd,Msg,PwdFile,SmtpUser,SmtpSubject);
-    strcat(Msg,"</font>");
+    sprintf(Msg, "%s %s %s", msg11, user, msg12);
+    if (strlen(PwdLogFile) > 0)
+	Log(PwdLogFile, user, newpwd, showpwd, Msg, PwdFile, SmtpUser,
+	    SmtpSubject);
+    strcat(Msg, "</font>");
     printf(Msg);
 
     return;
@@ -331,7 +348,8 @@
 
 
 void
-NotFound(char *user, char *PwdLogFile, char *newpwd, char *showpwd, char *PwdFile, char *SmtpUser, char *SmtpSubject)
+NotFound(char *user, char *PwdLogFile, char *newpwd, char *showpwd,
+    char *PwdFile, char *SmtpUser, char *SmtpSubject)
 {
     char Msg[MAXLEN];
 
@@ -339,309 +357,314 @@
     puts("\n");
     printf("<html>\n");
     printf("<font color=red size=+2>");
-    sprintf(Msg, "%s %s %s",msg13, user, msg14);
+    sprintf(Msg, "%s %s %s", msg13, user, msg14);
     printf(Msg);
     printf("</font>\n");
-    
-    if(strlen(PwdLogFile) > 0)
-       Log(PwdLogFile,user,newpwd,showpwd,Msg,PwdFile,SmtpUser,SmtpSubject);
+
+    if (strlen(PwdLogFile) > 0)
+	Log(PwdLogFile, user, newpwd, showpwd, Msg, PwdFile, SmtpUser,
+	    SmtpSubject);
     return;
 }
 
 
 static void
 fixpwd(str)
-        unsigned char   *str;
+     unsigned char *str;
 {
-        unsigned char   *dest = str;
+    unsigned char *dest = str;
 
-        while (str[0])
-        {
-                if (str[0] == '+')
-                        dest[0] = ' ';
-                else if (str[0] == '%' && hhex(str[1]) && hhex(str[2]))
-                {
-                        dest[0] = (unsigned char) htoi(str + 1);
-                        str += 2;
-                }
-                else
-                        dest[0] = str[0];
-
-                str++;
-                dest++;
-        }
+    while (str[0]) {
+	if (str[0] == '+')
+	    dest[0] = ' ';
+	else if (str[0] == '%' && hhex(str[1]) && hhex(str[2])) {
+	    dest[0] = (unsigned char) htoi(str + 1);
+	    str += 2;
+	} else
+	    dest[0] = str[0];
 
-        dest[0] = '\0';
-	return;
+	str++;
+	dest++;
+    }
+
+    dest[0] = '\0';
+    return;
 
 }
 
 
 static int
 htoi(s)
-        unsigned char   *s;
+     unsigned char *s;
 {
-        int     value;
-        char    c;
+    int value;
+    char c;
+
+    c = s[0];
+    if (isupper(c))
+	c = tolower(c);
+    value = (c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10) * 16;
+
+    c = s[1];
+    if (isupper(c))
+	c = tolower(c);
+    value += c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10;
 
-        c = s[0];
-        if (isupper(c))
-                c = tolower(c);
-        value = (c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10) * 16;
-
-        c = s[1];
-        if (isupper(c))
-                c = tolower(c);
-        value += c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10;
-
-        return (value);
+    return (value);
 }
 
 
-void getconf(ConfigFile, IpAuth, PwdFile, PwdMinLen, PwdMaxLen, PwdMinChar, PwdMinNum, PwdMinSpec, PwdLogFile, ShowPwd, BgColor, TxColor, TiColor, RuColor, Logo, Width, Height, Header, BgImage, SmtpUser, SmtpSubject)
-	unsigned char *ConfigFile;
-	unsigned char *PwdFile;
-	unsigned char *IpAuth;
-	unsigned char *PwdLogFile;
-        unsigned char *ShowPwd;
-	unsigned char *PwdMinLen;
-	unsigned char *PwdMaxLen;
-	unsigned char *PwdMinChar;
-	unsigned char *PwdMinNum;
-	unsigned char *PwdMinSpec;
-	unsigned char *BgColor;
-	unsigned char *TxColor;
-	unsigned char *TiColor;
-	unsigned char *RuColor;
-	unsigned char *Logo;
-	unsigned char *Width;
-	unsigned char *Height;
-	unsigned char *Header;
-	unsigned char *BgImage;
-	unsigned char *SmtpUser;
-	unsigned char *SmtpSubject;
-{
-        
-        FILE *fp_in;
-        char buf[255];
-        char wbuf[255];
-	char Msg[255];
-	char *str;
-
-        if ((fp_in = fopen(ConfigFile, "r")) == NULL) {
-            sprintf(Msg, "%s %s", msg15, ConfigFile);
-	    Hmsg(Msg);
-	    exit(1);
+void
+getconf(ConfigFile, IpAuth, PwdFile, PwdMinLen, PwdMaxLen, PwdMinChar,
+    PwdMinNum, PwdMinSpec, PwdLogFile, ShowPwd, BgColor, TxColor, TiColor,
+    RuColor, Logo, Width, Height, Header, BgImage, SmtpUser, SmtpSubject)
+     unsigned char *ConfigFile;
+     unsigned char *PwdFile;
+     unsigned char *IpAuth;
+     unsigned char *PwdLogFile;
+     unsigned char *ShowPwd;
+     unsigned char *PwdMinLen;
+     unsigned char *PwdMaxLen;
+     unsigned char *PwdMinChar;
+     unsigned char *PwdMinNum;
+     unsigned char *PwdMinSpec;
+     unsigned char *BgColor;
+     unsigned char *TxColor;
+     unsigned char *TiColor;
+     unsigned char *RuColor;
+     unsigned char *Logo;
+     unsigned char *Width;
+     unsigned char *Height;
+     unsigned char *Header;
+     unsigned char *BgImage;
+     unsigned char *SmtpUser;
+     unsigned char *SmtpSubject;
+{
+
+    FILE *fp_in;
+    char buf[255];
+    char wbuf[255];
+    char Msg[255];
+    char *str;
+
+    if ((fp_in = fopen(ConfigFile, "r")) == NULL) {
+	sprintf(Msg, "%s %s", msg15, ConfigFile);
+	Hmsg(Msg);
+	exit(1);
+    }
+
+    while (fgets(buf, MAXLEN, fp_in) != NULL) {
+	if ((str = (char *) strstr(buf, "#")) != (char *) NULL)
+	    continue;
+
+	if (strstr(buf, "password_file") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdFile, buf, ' ');
+	    PwdFile[strlen(PwdFile) - 1] = '\0';
+	}
+
+	if (strstr(buf, "ip_auth") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(IpAuth, buf, ' ');
+	    IpAuth[strlen(IpAuth) - 1] = '\0';
 	}
 
-	while (fgets(buf, MAXLEN, fp_in) != NULL) {
-	   if((str=(char *) strstr(buf,"#")) != (char *) NULL) 
-	      continue;
-
- 	   if(strstr(buf,"password_file") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdFile,buf,' ');
-	      PwdFile[strlen(PwdFile)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"ip_auth") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(IpAuth,buf,' ');
-	      IpAuth[strlen(IpAuth)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"minimum_length") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdMinLen,buf,' ');
-	      PwdMinLen[strlen(PwdMinLen)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"maximum_length") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdMaxLen,buf,' ');
-	      PwdMaxLen[strlen(PwdMaxLen)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"minimum_char") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdMinChar,buf,' ');
-	      PwdMinChar[strlen(PwdMinChar)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"minimum_num") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdMinNum,buf,' ');
-	      PwdMinNum[strlen(PwdMinNum)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"minimum_spec") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdMinSpec,buf,' ');
-	      PwdMinSpec[strlen(PwdMinSpec)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"enable_log") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(PwdLogFile,buf,'\0');
-	      PwdLogFile[strlen(PwdLogFile)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"show_pwd") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(ShowPwd,buf,'\0');
-	      ShowPwd[strlen(ShowPwd)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"background_color") != 0) {
-	      getword(wbuf,buf,' ');
-              getword(BgColor,buf,'\0');
-	      BgColor[strlen(BgColor)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"text_color") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(TxColor,buf,'\0');
-	      TxColor[strlen(TxColor)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"title_color") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(TiColor,buf,'\0');
-	      TiColor[strlen(TiColor)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"rules_color") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(RuColor,buf,'\0');
-	      RuColor[strlen(RuColor)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"logo_image") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(Logo,buf,'\0');
-	      Logo[strlen(Logo)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"background_image") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(BgImage,buf,'\0');
-	      BgImage[strlen(BgImage)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"alert_mail_user") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(SmtpUser,buf,'\0');
-	      SmtpUser[strlen(SmtpUser)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"alert_mail_subject") != 0) {
-	      getword(wbuf,buf,'"');
-	      getword(SmtpSubject,buf,'"');
-	   }
-
- 	   if(strstr(buf,"image_size") != 0) {
-	      getword(wbuf,buf,' ');
-	      getword(Width,buf,' ');
-	      getword(Height,buf,'\0');
-	      Height[strlen(Height)-1]='\0';
-	   }
-
- 	   if(strstr(buf,"header") != 0) {
-	      getword(wbuf,buf,'"');
-	      getword(Header,buf,'"');
-	   }
+	if (strstr(buf, "minimum_length") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdMinLen, buf, ' ');
+	    PwdMinLen[strlen(PwdMinLen) - 1] = '\0';
+	}
 
+	if (strstr(buf, "maximum_length") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdMaxLen, buf, ' ');
+	    PwdMaxLen[strlen(PwdMaxLen) - 1] = '\0';
 	}
-	
-        fclose(fp_in);
-	return;
+
+	if (strstr(buf, "minimum_char") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdMinChar, buf, ' ');
+	    PwdMinChar[strlen(PwdMinChar) - 1] = '\0';
+	}
+
+	if (strstr(buf, "minimum_num") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdMinNum, buf, ' ');
+	    PwdMinNum[strlen(PwdMinNum) - 1] = '\0';
+	}
+
+	if (strstr(buf, "minimum_spec") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdMinSpec, buf, ' ');
+	    PwdMinSpec[strlen(PwdMinSpec) - 1] = '\0';
+	}
+
+	if (strstr(buf, "enable_log") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(PwdLogFile, buf, '\0');
+	    PwdLogFile[strlen(PwdLogFile) - 1] = '\0';
+	}
+
+	if (strstr(buf, "show_pwd") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(ShowPwd, buf, '\0');
+	    ShowPwd[strlen(ShowPwd) - 1] = '\0';
+	}
+
+	if (strstr(buf, "background_color") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(BgColor, buf, '\0');
+	    BgColor[strlen(BgColor) - 1] = '\0';
+	}
+
+	if (strstr(buf, "text_color") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(TxColor, buf, '\0');
+	    TxColor[strlen(TxColor) - 1] = '\0';
+	}
+
+	if (strstr(buf, "title_color") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(TiColor, buf, '\0');
+	    TiColor[strlen(TiColor) - 1] = '\0';
+	}
+
+	if (strstr(buf, "rules_color") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(RuColor, buf, '\0');
+	    RuColor[strlen(RuColor) - 1] = '\0';
+	}
+
+	if (strstr(buf, "logo_image") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(Logo, buf, '\0');
+	    Logo[strlen(Logo) - 1] = '\0';
+	}
+
+	if (strstr(buf, "background_image") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(BgImage, buf, '\0');
+	    BgImage[strlen(BgImage) - 1] = '\0';
+	}
+
+	if (strstr(buf, "alert_mail_user") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(SmtpUser, buf, '\0');
+	    SmtpUser[strlen(SmtpUser) - 1] = '\0';
+	}
+
+	if (strstr(buf, "alert_mail_subject") != 0) {
+	    getword(wbuf, buf, '"');
+	    getword(SmtpSubject, buf, '"');
+	}
+
+	if (strstr(buf, "image_size") != 0) {
+	    getword(wbuf, buf, ' ');
+	    getword(Width, buf, ' ');
+	    getword(Height, buf, '\0');
+	    Height[strlen(Height) - 1] = '\0';
+	}
+
+	if (strstr(buf, "header") != 0) {
+	    getword(wbuf, buf, '"');
+	    getword(Header, buf, '"');
+	}
+
+    }
+
+    fclose(fp_in);
+    return;
 }
 
 
-void Log(pwdlogfile, user, newpwd, showpwd, msg, pwdfile, smtpuser, smtpsubject)
-	unsigned char *pwdlogfile;
-	unsigned char *user;
-	unsigned char *newpwd;
-	unsigned char *showpwd;
-	unsigned char *msg;
-	unsigned char *pwdfile;
-	unsigned char *smtpuser;
-	unsigned char *smtpsubject;
-{
-	FILE *fp_ou;
-	char Msg[MAXLEN];
-	time_t tm;
-	struct tm *t;
-	char time_string[128];
-	char pwd[MAXLEN];
-	
-	tm = time(NULL);
-	t = localtime(&tm);
-	strftime(time_string, 127, "%Y/%m/%d %H:%M:%S", t);
-
-	if ((fp_ou = fopen(pwdlogfile, "a")) == NULL) {
-            sprintf(Msg, "%s %s",msg16, pwdlogfile);
-	    Hmsg(Msg);
-	    exit(1);
-        }
+void
+Log(pwdlogfile, user, newpwd, showpwd, msg, pwdfile, smtpuser, smtpsubject)
+     unsigned char *pwdlogfile;
+     unsigned char *user;
+     unsigned char *newpwd;
+     unsigned char *showpwd;
+     unsigned char *msg;
+     unsigned char *pwdfile;
+     unsigned char *smtpuser;
+     unsigned char *smtpsubject;
+{
+    FILE *fp_ou;
+    char Msg[MAXLEN];
+    time_t tm;
+    struct tm *t;
+    char time_string[128];
+    char pwd[MAXLEN];
+
+    tm = time(NULL);
+    t = localtime(&tm);
+    strftime(time_string, 127, "%Y/%m/%d %H:%M:%S", t);
+
+    if ((fp_ou = fopen(pwdlogfile, "a")) == NULL) {
+	sprintf(Msg, "%s %s", msg16, pwdlogfile);
+	Hmsg(Msg);
+	exit(1);
+    }
 
-        Msg[0]='\0';
-        strcpy(pwd,"-");
-	
-        if(strcmp(showpwd,"yes") == 0){
-           if(strlen(newpwd) > 0)
-	      strcpy(pwd,newpwd);
-	}
-
-        if(strlen(user) == 0)
-           strcpy(user,"-");
-
-        sprintf(Msg, "%s %s %s %s %s pwdfile=%s\n",getenv("REMOTE_ADDR"),time_string,user,pwd,msg,pwdfile);
-        Msg[strlen(Msg)-1]='\n';
-	strip_latin(Msg);
-	fputs(Msg,fp_ou);
-	fclose(fp_ou);
+    Msg[0] = '\0';
+    strcpy(pwd, "-");
 
-        if(strlen(smtpuser) > 0)
-           sendmail(smtpuser,smtpsubject,Msg);
+    if (strcmp(showpwd, "yes") == 0) {
+	if (strlen(newpwd) > 0)
+	    strcpy(pwd, newpwd);
+    }
 
-	return;
+    if (strlen(user) == 0)
+	strcpy(user, "-");
+
+    sprintf(Msg, "%s %s %s %s %s pwdfile=%s\n", getenv("REMOTE_ADDR"),
+	time_string, user, pwd, msg, pwdfile);
+    Msg[strlen(Msg) - 1] = '\n';
+    strip_latin(Msg);
+    fputs(Msg, fp_ou);
+    fclose(fp_ou);
+
+    if (strlen(smtpuser) > 0)
+	sendmail(smtpuser, smtpsubject, Msg);
+
+    return;
 
 }
 
 
-static void vrfyrule(unsigned char *str, unsigned char *minchar, unsigned char *minnum, unsigned char *minspec)
+static void
+vrfyrule(unsigned char *str, unsigned char *minchar, unsigned char *minnum,
+    unsigned char *minspec)
 {
-    int tnum=0, talfa=0, tspec=0;
+    int tnum = 0, talfa = 0, tspec = 0;
     char *ostr = str;
 
-    while(str[0]) {
-       if (str[0] == '%' && hhex(str[1]) && hhex(str[2])) {
-          tspec++;
-	  str=str+3;
-	  continue;
-       }
-       if (str[0] == '.') {
-          tspec++;
-	  str++;
-	  continue;
-       }
-       if ((str[0] >= 'a' && str[0] <= 'z') || (str[0] >='A' && str[0] <= 'Z')) 
-          talfa++;
-       if (str[0] >= '0' && str[0] <= '9')
-          tnum++;
-
-       str++;
+    while (str[0]) {
+	if (str[0] == '%' && hhex(str[1]) && hhex(str[2])) {
+	    tspec++;
+	    str = str + 3;
+	    continue;
+	}
+	if (str[0] == '.') {
+	    tspec++;
+	    str++;
+	    continue;
+	}
+	if ((str[0] >= 'a' && str[0] <= 'z') || (str[0] >= 'A'
+		&& str[0] <= 'Z')) talfa++;
+	if (str[0] >= '0' && str[0] <= '9')
+	    tnum++;
+
+	str++;
     }
 
-    if(talfa < atoi(minchar))
-       rulefail(minchar,minnum,minspec);
+    if (talfa < atoi(minchar))
+	rulefail(minchar, minnum, minspec);
 
-    if(tnum < atoi(minnum))
-       rulefail(minchar,minnum,minspec);
+    if (tnum < atoi(minnum))
+	rulefail(minchar, minnum, minspec);
 
-    if(tspec < atoi(minspec))
-       rulefail(minchar,minnum,minspec);
+    if (tspec < atoi(minspec))
+	rulefail(minchar, minnum, minspec);
 
     return;
 }
@@ -656,25 +679,35 @@
     puts("\n");
     printf("<html>\n");
     printf("<font color=red size=+2>");
-    sprintf(Msg,"%s</font><br><br>",msg17);
+    sprintf(Msg, "%s</font><br><br>", msg17);
     printf(Msg);
-    sprintf(Msg,"%s<br><br>\n",msg18);
+    sprintf(Msg, "%s<br><br>\n", msg18);
     printf(Msg);
 
-    if(strcmp(minchar,"0") != 0)
-       printf("<table><tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",msg19,minchar);
-      else
-       printf("<table><tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",msg19);
-
-    if(strcmp(minnum,"0") != 0)
-       printf("<tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",msg20,minnum);
-     else
-       printf("<tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",msg20);
-
-    if(strcmp(minspec,"0") != 0)
-       printf("<tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",msg21,minspec);
-     else
-       printf("<tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",msg21);
+    if (strcmp(minchar, "0") != 0)
+	printf
+	    ("<table><tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",
+	    msg19, minchar);
+    else
+	printf
+	    ("<table><tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",
+	    msg19);
+
+    if (strcmp(minnum, "0") != 0)
+	printf
+	    ("<tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",
+	    msg20, minnum);
+    else
+	printf("<tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",
+	    msg20);
+
+    if (strcmp(minspec, "0") != 0)
+	printf
+	    ("<tr><td align=right>%s</td><td align=left><b>%s</b></td></tr>\n",
+	    msg21, minspec);
+    else
+	printf("<tr><td align=right>%s</td><td align=left><b></b></td></tr>\n",
+	    msg21);
 
     printf("</table>\n");
 
@@ -682,153 +715,163 @@
 }
 
 
-static void strip_latin(char *line)
+static void
+strip_latin(char *line)
 {
-   char buf[255];
-   char warea[255];
+    char buf[255];
+    char warea[255];
+
+    while (strstr(line, "&") != 0) {
+	getword(warea, line, '&');
+	strncat(warea, line, 1);
+	getword(buf, line, ';');
+	strcat(warea, line);
+	strcpy(line, warea);
+    }
 
-   while(strstr(line,"&") != 0){
-      getword(warea,line,'&');
-      strncat(warea,line,1);
-      getword(buf,line,';');
-      strcat(warea,line);
-      strcpy(line,warea);
-   }
-   
-   return;
-
-}
-
-
-static void vrfyauth(char *authfile, char *PwdLogFile, char *PwdFile, char *SmtpUser, char *SmtpSubject)
-{
-
-   FILE *auth;
-   char IP[30];
-   char buf[MAXLEN];
-   int  authbit=0;
-   struct stat statb;
-
-   if(stat(authfile,&statb)) eperror(authfile);
-   if(statb.st_uid != 0) {
-      Hmsg(msg23);
-      if(strlen(PwdLogFile) > 0)
-         Log(PwdLogFile,"-","","no",msg23,PwdFile,SmtpUser,SmtpSubject);
-      exit(1);
-   }
-   if(statb.st_mode & 022) {
-      Hmsg(msg24);
-      if(strlen(PwdLogFile) > 0)
-         Log(PwdLogFile,"-","","no",msg24,PwdFile,SmtpUser,SmtpSubject);
-      exit(1);
-   }
-
-   if((auth=fopen(authfile,"r"))==NULL) {
-      Hmsg(msg25);
-      if(strlen(PwdLogFile) > 0)
-         Log(PwdLogFile,"-","","no",msg25,PwdFile,SmtpUser,SmtpSubject);
-      exit(1);
-   }
-
-   if(getenv("HTTP_X_FORWARDED_FOR"))
-      sprintf(IP,"%s",getenv("HTTP_X_FORWARDED_FOR"));
-    else sprintf(IP,"%s",getenv("REMOTE_ADDR"));
-
-   while(fgets(buf,MAXLEN,auth)!=NULL) {
-      if(!authbit) {
-         if(strstr(buf,"#") != 0)
-            continue;
-          else  authbit=vauth(buf,IP);
-      }
-   }
-
-   if(!authbit) {
-      Hmsg(msg26);
-      if(strlen(PwdLogFile) > 0)
-         Log(PwdLogFile,"-","","no",msg26,PwdFile,SmtpUser,SmtpSubject);
-      exit(1);
-   }
-   
-   return;
-
-}
-
-
-int vauth(char *buf, char *ip)
-{
-   char a1[4],a2[4],a3[4],a4[4];
-   char o1[4],o2[4],o3[4],o4[4];
-   char ip2[255];
-   int ok=1;
-
-   strcpy(ip2,ip);
-
-   buf[strlen(buf)-1]='\0';
-
-   if(strcmp(buf,"0.0.0.0") == 0)
-      return(1);
-   if(strcmp(buf,ip2) == 0)
-      return(1);
-
-   getword(a1,buf,'.');
-   getword(a2,buf,'.');
-   getword(a3,buf,'.');
-   getword(a4,buf,' ');
-
-   getword(o1,ip2,'.');
-   getword(o2,ip2,'.');
-   getword(o3,ip2,'.');
-   getword(o4,ip2,' ');
-
-   if(strcmp(a1,"0") != 0){
-      if(strcmp(a1,o1) != 0)
-         ok=0;
-   }
-   if(strcmp(a2,"0") != 0){
-      if(strcmp(a2,o2) != 0)
-         ok=0;
-   }
-   if(strcmp(a3,"0") != 0){
-      if(strcmp(a3,o3) != 0)
-         ok=0;
-   }
-   if(strcmp(a4,"0") != 0){
-      if(strcmp(a4,o4) != 0)
-         ok=0;
-   }
+    return;
 
-   return(ok);
 }
 
 
-eperror(s)
-register char *s;
+static void
+vrfyauth(char *authfile, char *PwdLogFile, char *PwdFile, char *SmtpUser,
+    char *SmtpSubject)
 {
-   perror("chpasswd.cgi");
-   exit(1);
 
+    FILE *auth;
+    char IP[30];
+    char buf[MAXLEN];
+    int authbit = 0;
+    struct stat statb;
+
+    if (stat(authfile, &statb))
+	eperror(authfile);
+    if (statb.st_uid != 0) {
+	Hmsg(msg23);
+	if (strlen(PwdLogFile) > 0)
+	    Log(PwdLogFile, "-", "", "no", msg23, PwdFile, SmtpUser,
+		SmtpSubject);
+	exit(1);
+    }
+    if (statb.st_mode & 022) {
+	Hmsg(msg24);
+	if (strlen(PwdLogFile) > 0)
+	    Log(PwdLogFile, "-", "", "no", msg24, PwdFile, SmtpUser,
+		SmtpSubject);
+	exit(1);
+    }
+
+    if ((auth = fopen(authfile, "r")) == NULL) {
+	Hmsg(msg25);
+	if (strlen(PwdLogFile) > 0)
+	    Log(PwdLogFile, "-", "", "no", msg25, PwdFile, SmtpUser,
+		SmtpSubject);
+	exit(1);
+    }
+
+    if (getenv("HTTP_X_FORWARDED_FOR"))
+	sprintf(IP, "%s", getenv("HTTP_X_FORWARDED_FOR"));
+    else
+	sprintf(IP, "%s", getenv("REMOTE_ADDR"));
+
+    while (fgets(buf, MAXLEN, auth) != NULL) {
+	if (!authbit) {
+	    if (strstr(buf, "#") != 0)
+		continue;
+	    else
+		authbit = vauth(buf, IP);
+	}
+    }
+
+    if (!authbit) {
+	Hmsg(msg26);
+	if (strlen(PwdLogFile) > 0)
+	    Log(PwdLogFile, "-", "", "no", msg26, PwdFile, SmtpUser,
+		SmtpSubject);
+	exit(1);
+    }
+
+    return;
+
+}
+
+
+int
+vauth(char *buf, char *ip)
+{
+    char a1[4], a2[4], a3[4], a4[4];
+    char o1[4], o2[4], o3[4], o4[4];
+    char ip2[255];
+    int ok = 1;
+
+    strcpy(ip2, ip);
+
+    buf[strlen(buf) - 1] = '\0';
+
+    if (strcmp(buf, "0.0.0.0") == 0)
+	return (1);
+    if (strcmp(buf, ip2) == 0)
+	return (1);
+
+    getword(a1, buf, '.');
+    getword(a2, buf, '.');
+    getword(a3, buf, '.');
+    getword(a4, buf, ' ');
+
+    getword(o1, ip2, '.');
+    getword(o2, ip2, '.');
+    getword(o3, ip2, '.');
+    getword(o4, ip2, ' ');
+
+    if (strcmp(a1, "0") != 0) {
+	if (strcmp(a1, o1) != 0)
+	    ok = 0;
+    }
+    if (strcmp(a2, "0") != 0) {
+	if (strcmp(a2, o2) != 0)
+	    ok = 0;
+    }
+    if (strcmp(a3, "0") != 0) {
+	if (strcmp(a3, o3) != 0)
+	    ok = 0;
+    }
+    if (strcmp(a4, "0") != 0) {
+	if (strcmp(a4, o4) != 0)
+	    ok = 0;
+    }
+
+    return (ok);
 }
 
 
-void sendmail(char *user, char *subj, char *msg)
+eperror(s)
+     register char *s;
 {
+    perror("chpasswd.cgi");
+    exit(1);
 
-   FILE *mail;
-   char cmd[MAXLEN];
+}
 
-   sprintf(cmd,"mailx -s '%s' %s",subj,user);
 
-   if (access("/bin/mailx", R_OK) == 0)
-      sprintf(cmd,"/bin/mailx -s '%s' %s",subj,user);
-   if (access("/usr/bin/mailx", R_OK) == 0)
-      sprintf(cmd,"/bin/mailx -s '%s' %s",subj,user);
+void
+sendmail(char *user, char *subj, char *msg)
+{
 
-   if((mail =popen(cmd, "w")) != NULL ) {
-      fputs(msg,mail);
-      pclose(mail);
-   }
+    FILE *mail;
+    char cmd[MAXLEN];
 
+    sprintf(cmd, "mailx -s '%s' %s", subj, user);
 
+    if (access("/bin/mailx", R_OK) == 0)
+	sprintf(cmd, "/bin/mailx -s '%s' %s", subj, user);
+    if (access("/usr/bin/mailx", R_OK) == 0)
+	sprintf(cmd, "/bin/mailx -s '%s' %s", subj, user);
+
+    if ((mail = popen(cmd, "w")) != NULL) {
+	fputs(msg, mail);
+	pclose(mail);
+    }
 //   FILE *mail = popen(MAILPROG " -s 'Test Message' root", "w");
 //   if (!mail) {
 //      perror("popen");
@@ -843,5 +886,5 @@
 //             exit(1);
 //         }
 //     }
-   return;
+    return;
 }
Index: squid/contrib/chpasswd/chpasswd.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/chpasswd.dsp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/contrib/chpasswd/chpasswd.dsp	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/contrib/chpasswd/chpasswd.dsp	27 Aug 2001 21:48:16 -0000	1.1.2.3.2.1
@@ -53,7 +53,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:console /machine:I386
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "chpasswd - Win32 Debug"
@@ -80,7 +80,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
Index: squid/contrib/chpasswd/chpasswd.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/chpasswd.mak,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/contrib/chpasswd/chpasswd.mak	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/contrib/chpasswd/chpasswd.mak	27 Aug 2001 21:48:16 -0000	1.1.2.3.2.1
@@ -58,7 +58,7 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\chpasswd.pdb" /machine:I386 /out:"$(OUTDIR)\chpasswd.exe" 
+LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\chpasswd.pdb" /machine:I386 /out:"$(OUTDIR)\chpasswd.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\chpasswd.obj" \
 	"$(INTDIR)\encrypt.obj" \
@@ -101,7 +101,7 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\chpasswd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\chpasswd.exe" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\chpasswd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\chpasswd.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\chpasswd.obj" \
 	"$(INTDIR)\encrypt.obj" \
Index: squid/contrib/chpasswd/chpasswd.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/chpasswd.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/chpasswd.rc	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/chpasswd.rc	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - CGI NCSA Password Manager\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "chpasswd\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
             VALUE "OriginalFilename", "chpasswd.exe\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/contrib/chpasswd/conf.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/conf.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/conf.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/conf.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -1,5 +1,4 @@
 #include "info.h"
-
 #if HAVE_CRYPT_H
 #ifdef WIN32
 #include "crypt.h"
@@ -57,7 +56,8 @@
 int vauth(char *, char *);
 void sendmail(char *, char *, char *);
 void to64(register char *, register long, register int);
-void Log(unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned char *);
+void Log(unsigned char *, unsigned char *, unsigned char *, unsigned char *,
+    unsigned char *, unsigned char *, unsigned char *, unsigned char *);
 
 
 
Index: squid/contrib/chpasswd/language.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/chpasswd/Attic/language.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/chpasswd/language.h	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/chpasswd/language.h	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -16,12 +16,12 @@
 #if defined(Dutch)
 #include "Dutch.h"
 #endif
-#if defined(French)             
-#include "French.h"         
+#if defined(French)
+#include "French.h"
 #endif
-#if defined(German)             
-#include "German.h"         
+#if defined(German)
+#include "German.h"
 #endif
-#if defined(Spanish)             
-#include "Spanish.h"         
+#if defined(Spanish)
+#include "Spanish.h"
 #endif
Index: squid/contrib/htpasswd/htpasswd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/htpasswd/Attic/htpasswd.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/htpasswd/htpasswd.c	6 Jan 2001 12:48:44 -0000	1.1.2.1
+++ squid/contrib/htpasswd/htpasswd.c	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -32,60 +32,72 @@
 
 char *tn;
 
-char *strd(char *s) {
+char *
+strd(char *s)
+{
     char *d;
 
-    d=(char *)malloc(strlen(s) + 1);
-    strcpy(d,s);
-    return(d);
+    d = (char *) malloc(strlen(s) + 1);
+    strcpy(d, s);
+    return (d);
 }
 
-void getword(char *word, char *line, char stop) {
-    int x = 0,y;
+void
+getword(char *word, char *line, char stop)
+{
+    int x = 0, y;
 
-    for(x=0;((line[x]) && (line[x] != stop));x++)
-        word[x] = line[x];
+    for (x = 0; ((line[x]) && (line[x] != stop)); x++)
+	word[x] = line[x];
 
     word[x] = '\0';
-    if(line[x]) ++x;
-    y=0;
+    if (line[x])
+	++x;
+    y = 0;
 
-    while((line[y++] = line[x++]));
+    while ((line[y++] = line[x++]));
 }
 
-int getline(char *s, int n, FILE *f) {
-    register int i=0;
+int
+getline(char *s, int n, FILE * f)
+{
+    register int i = 0;
 
-    while(1) {
-        s[i] = (char)fgetc(f);
+    while (1) {
+	s[i] = (char) fgetc(f);
 
-        if(s[i] == CR)
-            s[i] = fgetc(f);
+	if (s[i] == CR)
+	    s[i] = fgetc(f);
 
-        if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {
-            s[i] = '\0';
-            return (feof(f) ? 1 : 0);
-        }
-        ++i;
+	if ((s[i] == 0x4) || (s[i] == LF) || (i == (n - 1))) {
+	    s[i] = '\0';
+	    return (feof(f) ? 1 : 0);
+	}
+	++i;
     }
 }
 
-void putline(FILE *f,char *l) {
+void
+putline(FILE * f, char *l)
+{
     int x;
 
-    for(x=0;l[x];x++) fputc(l[x],f);
-    fputc('\n',f);
+    for (x = 0; l[x]; x++)
+	fputc(l[x], f);
+    fputc('\n', f);
 }
 
 
 /* From local_passwd.c (C) Regents of Univ. of California blah blah */
-static unsigned char itoa64[] =         /* 0 ... 63 => ascii - 64 */
-        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+static unsigned char itoa64[] =	/* 0 ... 63 => ascii - 64 */
+    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
-void to64(register char *s, register long v, register int n) {
+void
+to64(register char *s, register long v, register int n)
+{
     while (--n >= 0) {
-        *s++ = itoa64[v&0x3f];
-        v >>= 6;
+	*s++ = itoa64[v & 0x3f];
+	v >>= 6;
     }
 }
 
@@ -93,102 +105,108 @@
 /* MPE lacks getpass() and a way to suppress stdin echo.  So for now, just
 issue the prompt and read the results with echo.  (Ugh). */
 
-char *getpass(const char *prompt) {
+char *
+getpass(const char *prompt)
+{
 
-static char password[81];
+    static char password[81];
 
-fputs(prompt,stderr);
-gets((char *)&password);
+    fputs(prompt, stderr);
+    gets((char *) &password);
 
-if (strlen((char *)&password) > 8) {
-  password[8]='\0';
-}
+    if (strlen((char *) &password) > 8) {
+	password[8] = '\0';
+    }
 
-return (char *)&password;
+    return (char *) &password;
 }
 #endif
 
 #ifdef WIN32
 
-int get_password(char s[], int lim)
-
+int
+get_password(char s[], int lim)
 {
-	int     c,i;
+    int c, i;
 
-	i=0;
-	while (--lim > 0 && (c = getch()) != EOF && c != '\n' && c != '\r')
-	{
-		if (c < ' ')
-		{
-			lim++;
-			if (c == '\b' && i > 0)
-			{
-				i--;
-				printf("\b \b");
-			}
-		}
-		else
-		{
-			s[i++] = (char) c;
-			putchar('*');
-		}
+    i = 0;
+    while (--lim > 0 && (c = getch()) != EOF && c != '\n' && c != '\r') {
+	if (c < ' ') {
+	    lim++;
+	    if (c == '\b' && i > 0) {
+		i--;
+		printf("\b \b");
+	    }
+	} else {
+	    s[i++] = (char) c;
+	    putchar('*');
 	}
-	if (c == '\r' || c == '\n')
-		putchar('\n');
-	s[i] = '\0';
-	return i;
+    }
+    if (c == '\r' || c == '\n')
+	putchar('\n');
+    s[i] = '\0';
+    return i;
 }
 
 
-char *getpass(const char *prompt) 
+char *
+getpass(const char *prompt)
 {
 
-	static char password[81];
+    static char password[81];
 
-	fputs(prompt,stderr);
-	get_password((char *)&password, 80);
+    fputs(prompt, stderr);
+    get_password((char *) &password, 80);
 
-	if (strlen((char *)&password) > 8) 
-	{
-		password[8]='\0';
-	}
+    if (strlen((char *) &password) > 8) {
+	password[8] = '\0';
+    }
 
-	return (char *)&password;
+    return (char *) &password;
 }
 
 #endif
 
-void add_password(char *user, FILE *f) {
+void
+add_password(char *user, FILE * f)
+{
     char *pw, *cpw, salt[3];
 
     pw = strd((char *) getpass("New password:"));
-    if(strcmp(pw,(char *) getpass("Re-type new password:"))) {
-        fprintf(stderr,"They don't match, sorry.\n");
-        if(tn)
-            unlink(tn);
-        exit(1);
-    }
-    (void)srand((int)time((time_t *)NULL));
-    to64(&salt[0],rand(),2);
-    cpw = crypt(pw,salt);
+    if (strcmp(pw, (char *) getpass("Re-type new password:"))) {
+	fprintf(stderr, "They don't match, sorry.\n");
+	if (tn)
+	    unlink(tn);
+	exit(1);
+    }
+    (void) srand((int) time((time_t *) NULL));
+    to64(&salt[0], rand(), 2);
+    cpw = crypt(pw, salt);
     free(pw);
-    fprintf(f,"%s:%s\n",user,cpw);
+    fprintf(f, "%s:%s\n", user, cpw);
 }
 
-void usage() {
-    fprintf(stderr,"Usage: htpasswd [-c] passwordfile username\n");
-    fprintf(stderr,"The -c flag creates a new file.\n");
+void
+usage()
+{
+    fprintf(stderr, "Usage: htpasswd [-c] passwordfile username\n");
+    fprintf(stderr, "The -c flag creates a new file.\n");
     exit(1);
 }
 
-void interrupted() {
-    fprintf(stderr,"Interrupted.\n");
-    if(tn) unlink(tn);
+void
+interrupted()
+{
+    fprintf(stderr, "Interrupted.\n");
+    if (tn)
+	unlink(tn);
     exit(1);
 }
 
-void main(int argc, char *argv[]) {
-    FILE *tfp,*f;
+void
+main(int argc, char *argv[])
+{
+    FILE *tfp, *f;
     char user[MAX_STRING_LEN];
     char line[MAX_STRING_LEN];
     char l[MAX_STRING_LEN];
@@ -197,61 +215,61 @@
     int found;
 
     tn = NULL;
-    signal(SIGINT,(void (*)())interrupted);
-    if(argc == 4) {
-        if(strcmp(argv[1],"-c"))
-            usage();
-        if(!(tfp = fopen(argv[2],"w"))) {
-            fprintf(stderr,"Could not open passwd file %s for writing.\n",
-                    argv[2]);
-            perror("fopen");
-            exit(1);
-        }
-        printf("Adding password for %s.\n",argv[3]);
-        add_password(argv[3],tfp);
-        fclose(tfp);
-        exit(0);
-    } else if(argc != 3) usage();
+    signal(SIGINT, (void (*)()) interrupted);
+    if (argc == 4) {
+	if (strcmp(argv[1], "-c"))
+	    usage();
+	if (!(tfp = fopen(argv[2], "w"))) {
+	    fprintf(stderr, "Could not open passwd file %s for writing.\n",
+		argv[2]);
+	    perror("fopen");
+	    exit(1);
+	}
+	printf("Adding password for %s.\n", argv[3]);
+	add_password(argv[3], tfp);
+	fclose(tfp);
+	exit(0);
+    } else if (argc != 3)
+	usage();
 
     tn = tmpnam(NULL);
-    if(!(tfp = fopen(tn,"w"))) {
-        fprintf(stderr,"Could not open temp file.\n");
-        exit(1);
+    if (!(tfp = fopen(tn, "w"))) {
+	fprintf(stderr, "Could not open temp file.\n");
+	exit(1);
     }
 
-    if(!(f = fopen(argv[1],"r"))) {
-        fprintf(stderr,
-                "Could not open passwd file %s for reading.\n",argv[1]);
-        fprintf(stderr,"Use -c option to create new one.\n");
-        exit(1);
+    if (!(f = fopen(argv[1], "r"))) {
+	fprintf(stderr,
+	    "Could not open passwd file %s for reading.\n", argv[1]);
+	fprintf(stderr, "Use -c option to create new one.\n");
+	exit(1);
     }
-    strcpy(user,argv[2]);
+    strcpy(user, argv[2]);
 
     found = 0;
-    while(!(getline(line,MAX_STRING_LEN,f))) {
-        if(found || (line[0] == '#') || (!line[0])) {
-            putline(tfp,line);
-            continue;
-        }
-        strcpy(l,line);
-        getword(w,l,':');
-        if(strcmp(user,w)) {
-            putline(tfp,line);
-            continue;
-        }
-        else {
-            printf("Changing password for user %s\n",user);
-            add_password(user,tfp);
-            found = 1;
-        }
-    }
-    if(!found) {
-        printf("Adding user %s\n",user);
-        add_password(user,tfp);
+    while (!(getline(line, MAX_STRING_LEN, f))) {
+	if (found || (line[0] == '#') || (!line[0])) {
+	    putline(tfp, line);
+	    continue;
+	}
+	strcpy(l, line);
+	getword(w, l, ':');
+	if (strcmp(user, w)) {
+	    putline(tfp, line);
+	    continue;
+	} else {
+	    printf("Changing password for user %s\n", user);
+	    add_password(user, tfp);
+	    found = 1;
+	}
+    }
+    if (!found) {
+	printf("Adding user %s\n", user);
+	add_password(user, tfp);
     }
     fclose(f);
     fclose(tfp);
-    sprintf(command,"cmd /C copy %s %s > NUL",tn,argv[1]);
+    sprintf(command, "cmd /C copy %s %s > NUL", tn, argv[1]);
     system(command);
     unlink(tn);
 }
Index: squid/contrib/htpasswd/htpasswd.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/htpasswd/Attic/htpasswd.dsp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/contrib/htpasswd/htpasswd.dsp	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/contrib/htpasswd/htpasswd.dsp	27 Aug 2001 21:48:16 -0000	1.1.2.3.2.1
@@ -50,7 +50,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "htpasswd - Win32 Debug"
 
@@ -74,7 +74,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
Index: squid/contrib/htpasswd/htpasswd.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/htpasswd/Attic/htpasswd.mak,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/contrib/htpasswd/htpasswd.mak	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/contrib/htpasswd/htpasswd.mak	27 Aug 2001 21:48:16 -0000	1.1.2.3.2.1
@@ -56,7 +56,7 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htpasswd.pdb" /machine:I386 /out:"$(OUTDIR)\htpasswd.exe" 
+LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htpasswd.pdb" /machine:I386 /out:"$(OUTDIR)\htpasswd.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\encrypt.obj" \
 	"$(INTDIR)\htpasswd.obj" \
@@ -98,7 +98,7 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\htpasswd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\htpasswd.exe" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\htpasswd.pdb" /debug /machine:I386 /out:"$(OUTDIR)\htpasswd.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\encrypt.obj" \
 	"$(INTDIR)\htpasswd.obj" \
Index: squid/contrib/htpasswd/htpasswd.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/contrib/htpasswd/Attic/htpasswd.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/contrib/htpasswd/htpasswd.rc	6 Jan 2001 12:48:45 -0000	1.1.2.1
+++ squid/contrib/htpasswd/htpasswd.rc	27 Aug 2001 21:48:16 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - NCSA Password Manager\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "htpasswd\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
             VALUE "OriginalFilename", "htpasswd.exe\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/doc/Release-Notes-1.0.txt
===================================================================
RCS file: /cvsroot/squid-sf//squid/doc/Attic/Release-Notes-1.0.txt,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/doc/Release-Notes-1.0.txt	6 Jan 2001 12:40:09 -0000	1.1.1.1.44.1
+++ squid/doc/Release-Notes-1.0.txt	27 Aug 2001 21:48:16 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 
-$Id: Release-Notes-1.0.txt,v 1.1.1.1.44.1 2001/01/06 12:40:09 hno Exp $
+$Id: Release-Notes-1.0.txt,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:16 tolsty Exp $
 
 Release Notes for version 1.0 of the Squid cache.
 
Index: squid/doc/Release-Notes-1.1.txt
===================================================================
RCS file: /cvsroot/squid-sf//squid/doc/Attic/Release-Notes-1.1.txt,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/doc/Release-Notes-1.1.txt	6 Jan 2001 12:40:09 -0000	1.1.1.1.44.1
+++ squid/doc/Release-Notes-1.1.txt	27 Aug 2001 21:48:16 -0000	1.1.1.1.44.1.2.1
@@ -1,4 +1,4 @@
-$Id: Release-Notes-1.1.txt,v 1.1.1.1.44.1 2001/01/06 12:40:09 hno Exp $
+$Id: Release-Notes-1.1.txt,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:16 tolsty Exp $
 
 Release Notes for version 1.1 of the Squid cache.
 
Index: squid/doc/Programming-Guide/prog-guide.sgml
===================================================================
RCS file: /cvsroot/squid-sf//squid/doc/Programming-Guide/prog-guide.sgml,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/doc/Programming-Guide/prog-guide.sgml	6 Jan 2001 12:40:09 -0000	1.1.1.2.4.1.2.1
+++ squid/doc/Programming-Guide/prog-guide.sgml	27 Aug 2001 21:48:16 -0000	1.1.1.2.4.1.2.1.2.1
@@ -2,7 +2,7 @@
 <article>
 <title>Squid Programmers Guide</title>
 <author>Duane Wessels, Squid Developers
-<date>$Id: prog-guide.sgml,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:09 hno Exp $</date>
+<date>$Id: prog-guide.sgml,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:16 tolsty Exp $</date>
 
 <abstract>
 Squid is a WWW Cache application developed by the National Laboratory
Index: squid/errors/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Attic/Makefile.in,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.26.1
diff -u -r1.1.1.2 -r1.1.1.2.26.1
--- squid/errors/Makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/errors/Makefile.in	27 Aug 2001 21:48:16 -0000	1.1.1.2.26.1
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+# $Id: Makefile.in,v 1.1.1.2.26.1 2001/08/27 21:48:16 tolsty Exp $
 #
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
Index: squid/errors/Czech/ERR_SHUTTING_DOWN
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Czech/ERR_SHUTTING_DOWN,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.122.1
diff -u -r1.1.1.2 -r1.1.1.2.122.1
--- squid/errors/Czech/ERR_SHUTTING_DOWN	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/errors/Czech/ERR_SHUTTING_DOWN	27 Aug 2001 21:48:17 -0000	1.1.1.2.122.1
@@ -1,21 +1,21 @@
-<HTML><HEAD>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
-<TITLE>CHYBA: Pozadovany dokument je nedostupny</TITLE>
-</HEAD><BODY>
-<H1>CHYBA</H1>
-<H2>Po¾adovaný dokument je nedostupný</H2>
-<HR>
-<P>
-Pøi pokusu o pøístup k:
-<A HREF="%U">%U</A>
-<P>
-se objevila následující chyba:
-<P>
-<UL>
-<LI>
-<STRONG>
-Tento cache server je právì restartován a nemù¾e obslou¾it Vá¹ po¾adavek.
-Zkuste to za chvíli znova.
-</STRONG>
-</UL>
-</P>
+<HTML><HEAD>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<TITLE>CHYBA: Pozadovany dokument je nedostupny</TITLE>
+</HEAD><BODY>
+<H1>CHYBA</H1>
+<H2>Po¾adovaný dokument je nedostupný</H2>
+<HR>
+<P>
+Pøi pokusu o pøístup k:
+<A HREF="%U">%U</A>
+<P>
+se objevila následující chyba:
+<P>
+<UL>
+<LI>
+<STRONG>
+Tento cache server je právì restartován a nemù¾e obslou¾it Vá¹ po¾adavek.
+Zkuste to za chvíli znova.
+</STRONG>
+</UL>
+</P>
Index: squid/errors/Traditional_Chinese/ERR_ACCESS_DENIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_ACCESS_DENIED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_ACCESS_DENIED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_ACCESS_DENIED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,29 +1,29 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Access Denied.
-<LI>
-¦s¨ú³Q©Úµ´
-</STRONG>
-<P>
-Access control configuration prevents your request from
-being allowed at this time.  Please contact your service provider if
-you feel this is incorrect.
-</P>
-<P>
-±ý³sµ²¤§ºô¯¸ªº¦s¨ú±±¨î³]©w¥Ø«e¸T¤î¤F±zªº³s½u­n¨D¡A¦pªG±zÄ±±o±o¨ì³o¼Ëªº
-°T®§¨Ã¤£¥¿½T¡A½Ð»P´£¨Ñºô¸ôªA°ÈªººÞ²zªÌÁpÃ´¡C
-</UL>
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Access Denied.
+<LI>
+¦s¨ú³Q©Úµ´
+</STRONG>
+<P>
+Access control configuration prevents your request from
+being allowed at this time.  Please contact your service provider if
+you feel this is incorrect.
+</P>
+<P>
+±ý³sµ²¤§ºô¯¸ªº¦s¨ú±±¨î³]©w¥Ø«e¸T¤î¤F±zªº³s½u­n¨D¡A¦pªG±zÄ±±o±o¨ì³o¼Ëªº
+°T®§¨Ã¤£¥¿½T¡A½Ð»P´£¨Ñºô¸ôªA°ÈªººÞ²zªÌÁpÃ´¡C
+</UL>
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_CACHE_ACCESS_DENIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_CACHE_ACCESS_DENIED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.32.1
diff -u -r1.1.1.1 -r1.1.1.1.32.1
--- squid/errors/Traditional_Chinese/ERR_CACHE_ACCESS_DENIED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_CACHE_ACCESS_DENIED	27 Aug 2001 21:48:17 -0000	1.1.1.1.32.1
@@ -1,41 +1,41 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡Gºô¸ô§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´</TITLE>
-</HEAD>
-<BODY>
-<H1>¿ù»~</H1>
-<H2>ºô¸ô§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G 
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G 
-<UL>
-<LI>
-<STRONG>
-Cache Access Denied.
-<LI>
-§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´
-</STRONG>
-</UL>
-</P>
-
-<P>
-©êºp¡A±z¤£³Q¤¹³\³z¹L§Ú­Ì³o­Óºô¸ô§Ö¨ú¦øªA¾¹¶Ç¦^¤U¦C¦ì¸m¡G
-<BR>    %U<BR>
-°£«D±z³q¹L¤F§Ú­Ìªº¨­¥÷ÅçÃÒ¡C
-</P>
-
-<P>
-You need to use Netscape version 2.0 or greater, or Microsoft Internet
-Explorer 3.0, or an HTTP/1.1 compliant browser for this to work.  Please
-contact the <A HREF="mailto:%w">cache administrator</a> if you have
-difficulties authenticating yourself or 
-<A HREF="http://%h/cgi-bin/chpasswd.cgi\">change</a> your default password.
-</P>
-<P>
-±z»Ý­n¨Ï¥Î Netscape version 2.0 ©Î§ó·sªºª©¥»¡A©Î¬O¨Ï¥Î Microsoft Internet 
-Explorer 3.0¡A©Î¬O¤@­Ó¬Û®e HTTP/1.1 ªºÂsÄý¾¹¨Ó¶i¦æ¤u§@¡C¦pªG±z¦b¨­¥÷ÅçÃÒ¤W
-µo¥Í§xÃø¡A½Ð»P <A HREF="mailto:%w">ºÞ²zªÌ</a> ÁpÃ´¡C
-©Î¬O<A HREF="http://%h/cgi-bin/chpasswd.cgi\">§ó§ï</a>±zªº±K½X¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡Gºô¸ô§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´</TITLE>
+</HEAD>
+<BODY>
+<H1>¿ù»~</H1>
+<H2>ºô¸ô§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G 
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G 
+<UL>
+<LI>
+<STRONG>
+Cache Access Denied.
+<LI>
+§Ö¨ú¦øªA¾¹¦s¨ú³Q©Úµ´
+</STRONG>
+</UL>
+</P>
+
+<P>
+©êºp¡A±z¤£³Q¤¹³\³z¹L§Ú­Ì³o­Óºô¸ô§Ö¨ú¦øªA¾¹¶Ç¦^¤U¦C¦ì¸m¡G
+<BR>    %U<BR>
+°£«D±z³q¹L¤F§Ú­Ìªº¨­¥÷ÅçÃÒ¡C
+</P>
+
+<P>
+You need to use Netscape version 2.0 or greater, or Microsoft Internet
+Explorer 3.0, or an HTTP/1.1 compliant browser for this to work.  Please
+contact the <A HREF="mailto:%w">cache administrator</a> if you have
+difficulties authenticating yourself or 
+<A HREF="http://%h/cgi-bin/chpasswd.cgi\">change</a> your default password.
+</P>
+<P>
+±z»Ý­n¨Ï¥Î Netscape version 2.0 ©Î§ó·sªºª©¥»¡A©Î¬O¨Ï¥Î Microsoft Internet 
+Explorer 3.0¡A©Î¬O¤@­Ó¬Û®e HTTP/1.1 ªºÂsÄý¾¹¨Ó¶i¦æ¤u§@¡C¦pªG±z¦b¨­¥÷ÅçÃÒ¤W
+µo¥Í§xÃø¡A½Ð»P <A HREF="mailto:%w">ºÞ²zªÌ</a> ÁpÃ´¡C
+©Î¬O<A HREF="http://%h/cgi-bin/chpasswd.cgi\">§ó§ï</a>±zªº±K½X¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_CACHE_MGR_ACCESS_DENIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_CACHE_MGR_ACCESS_DENIED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_CACHE_MGR_ACCESS_DENIED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_CACHE_MGR_ACCESS_DENIED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,42 +1,42 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G¨Ï¥Î§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡³Q©Úµ´</TITLE>
-</HEAD>
-<BODY>
-<H1>¿ù»~</H1>
-<H2>¨Ï¥Î§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡³Q©Úµ´</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G 
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G 
-<UL>
-<LI>
-<STRONG>
-Cache Manager Access Denied.
-<LI>
-§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡¨Ï¥Î³Q©Ú
-</STRONG>
-</UL>
-</P>
-
-<P>
-©êºp¡A±z¤£³Q¤¹³\³z¹L§Ú­Ì³o­Ó§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡¶Ç¦^¤U¦C¦ì¸m¡G 
-<BR>    %U<BR>
-°£«D±z³q¹L§Ú­Ìªº¨­¥÷ÅçÃÒ¡C
-</P>
-
-<P> You need to use Netscape version 2.0 or greater, or Microsoft Internet
-Explorer 3.0, or an HTTP/1.1 compliant browser for this to work.  Please
-contact the <A HREF="mailto:%w">cache administrator</a> if you have
-difficulties authenticating yourself or, if you <em>are</em> the
-administrator, read Squid documentation on cache manager interface and check
-cache log for more detailed error messages.
-</P>
-<P>
-±z»Ý­n¨Ï¥Î Netscape version 2.0 ©Î³Ì·sªºª©¥»¡A©Î¬O¨Ï¥Î Microsoft Internet 
-Explorer¡A©Î¬O¤@­Ó¬Û®e HTTP/1.1 ªºÂsÄý¾¹¨Ó¶i¦æ¤u§@¡C¦pªG±z¬O¦b¨­¥÷ÅçÃÒ¤Wµo
-¥Í°ÝÃD¡A½Ð¥ý½T©w±z¦³Åv¹ï§Ö¨ú¦øªA¾¹¨Ï¥ÎºÞ²zµ{¦¡¡C
-©Î¬O»P<A HREF="mailto:%w">ºÞ²zªÌ</a>ÁpÃ´¡C¦pªG±z<em>´N¬O</em>ºÞ²zªÌ¡A½Ð¸Ô²Ó¾\Åª Squid ©Òªþ¤å¥ó¤¤»P
-cache manager ¦³Ãö³¡¥÷©ÎÀË¬d cache log ¥H«K±o¨ì§ó¸ÔºÉªº²Ó¸`¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G¨Ï¥Î§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡³Q©Úµ´</TITLE>
+</HEAD>
+<BODY>
+<H1>¿ù»~</H1>
+<H2>¨Ï¥Î§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡³Q©Úµ´</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G 
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G 
+<UL>
+<LI>
+<STRONG>
+Cache Manager Access Denied.
+<LI>
+§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡¨Ï¥Î³Q©Ú
+</STRONG>
+</UL>
+</P>
+
+<P>
+©êºp¡A±z¤£³Q¤¹³\³z¹L§Ú­Ì³o­Ó§Ö¨ú¦øªA¾¹ºÞ²zµ{¦¡¶Ç¦^¤U¦C¦ì¸m¡G 
+<BR>    %U<BR>
+°£«D±z³q¹L§Ú­Ìªº¨­¥÷ÅçÃÒ¡C
+</P>
+
+<P> You need to use Netscape version 2.0 or greater, or Microsoft Internet
+Explorer 3.0, or an HTTP/1.1 compliant browser for this to work.  Please
+contact the <A HREF="mailto:%w">cache administrator</a> if you have
+difficulties authenticating yourself or, if you <em>are</em> the
+administrator, read Squid documentation on cache manager interface and check
+cache log for more detailed error messages.
+</P>
+<P>
+±z»Ý­n¨Ï¥Î Netscape version 2.0 ©Î³Ì·sªºª©¥»¡A©Î¬O¨Ï¥Î Microsoft Internet 
+Explorer¡A©Î¬O¤@­Ó¬Û®e HTTP/1.1 ªºÂsÄý¾¹¨Ó¶i¦æ¤u§@¡C¦pªG±z¬O¦b¨­¥÷ÅçÃÒ¤Wµo
+¥Í°ÝÃD¡A½Ð¥ý½T©w±z¦³Åv¹ï§Ö¨ú¦øªA¾¹¨Ï¥ÎºÞ²zµ{¦¡¡C
+©Î¬O»P<A HREF="mailto:%w">ºÞ²zªÌ</a>ÁpÃ´¡C¦pªG±z<em>´N¬O</em>ºÞ²zªÌ¡A½Ð¸Ô²Ó¾\Åª Squid ©Òªþ¤å¥ó¤¤»P
+cache manager ¦³Ãö³¡¥÷©ÎÀË¬d cache log ¥H«K±o¨ì§ó¸ÔºÉªº²Ó¸`¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_CANNOT_FORWARD
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_CANNOT_FORWARD,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_CANNOT_FORWARD	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_CANNOT_FORWARD	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,36 +1,36 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡F±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Unable to forward this request at this time.
-<LI>
-¥Ø«eµLªk´À±zªººô¯¸³sµ²­n¨D¶i¦æÂà¦V°Ê§@
-</STRONG>
-</UL>
-
-<P>
-This request could not be forwarded to the origin server or to any
-parent caches.  The most likely cause for this error is that:
-<UL>
-<LI>The cache administrator does not allow this cache to make 
-    direct connections to origin servers, and
-<LI>All configured parent caches are currently unreachable.
-</UL>
-</P>
-<P>
-±zªº³sµ²­n¨DµLªk³QÂà¦V­ì©lºô¯¸¦øªA¾¹©Î¨ä¥Lªº¤W¼h§Ö¨ú¦øªA¾¹¡Aµo¥Í³o­Ó°ÝÃDªº³Ì¥i¯àªº­ì¦]¥i¯à¬O¡G
-<UL>
-<LI>ºô¸ô§Ö¨ú¦øªA¾¹ºÞ²zªÌ¤£¤¹³\¥»¦øªA¾¹³w¦æª½±µ³sµ²­ì©lªººô­¶¦ì¸m¡A©Î¬O
-<LI>©Ò¦³¥»¦øªA¾¹³]©wªº¤W¼h¦øªA¾¹¥Ø«e³£¼È®ÉµLªk³sµ²¤W¡C
-</UL>
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡F±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Unable to forward this request at this time.
+<LI>
+¥Ø«eµLªk´À±zªººô¯¸³sµ²­n¨D¶i¦æÂà¦V°Ê§@
+</STRONG>
+</UL>
+
+<P>
+This request could not be forwarded to the origin server or to any
+parent caches.  The most likely cause for this error is that:
+<UL>
+<LI>The cache administrator does not allow this cache to make 
+    direct connections to origin servers, and
+<LI>All configured parent caches are currently unreachable.
+</UL>
+</P>
+<P>
+±zªº³sµ²­n¨DµLªk³QÂà¦V­ì©lºô¯¸¦øªA¾¹©Î¨ä¥Lªº¤W¼h§Ö¨ú¦øªA¾¹¡Aµo¥Í³o­Ó°ÝÃDªº³Ì¥i¯àªº­ì¦]¥i¯à¬O¡G
+<UL>
+<LI>ºô¸ô§Ö¨ú¦øªA¾¹ºÞ²zªÌ¤£¤¹³\¥»¦øªA¾¹³w¦æª½±µ³sµ²­ì©lªººô­¶¦ì¸m¡A©Î¬O
+<LI>©Ò¦³¥»¦øªA¾¹³]©wªº¤W¼h¦øªA¾¹¥Ø«e³£¼È®ÉµLªk³sµ²¤W¡C
+</UL>
+</P>
Index: squid/errors/Traditional_Chinese/ERR_CONNECT_FAIL
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_CONNECT_FAIL,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_CONNECT_FAIL	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_CONNECT_FAIL	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,29 +1,29 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Connection Failed
-<LI>
-³s½u¥¢±Ñ
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¤F¤U¦C¿ù»~°T®§¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-The remote host or network may be down.  Please try the request again.
-</P><P>
-±z±ý³sµ²ªººô¯¸¦øªA¾¹©Î¬Oºô¸ô¥i¯àµo¥Í¬G»Ù¡C½Ðµy«á¦A¸Õ¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Connection Failed
+<LI>
+³s½u¥¢±Ñ
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¤F¤U¦C¿ù»~°T®§¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+The remote host or network may be down.  Please try the request again.
+</P><P>
+±z±ý³sµ²ªººô¯¸¦øªA¾¹©Î¬Oºô¸ô¥i¯àµo¥Í¬G»Ù¡C½Ðµy«á¦A¸Õ¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_DNS_FAIL
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_DNS_FAIL,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_DNS_FAIL	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_DNS_FAIL	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,33 +1,33 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<BLOCKQUOTE>
-µLªk±N±z¿é¤Jªººô¯¸¥D¾÷¦ì¸mÂàÄ¶¦¨¥¿½Tªº IP ¦ì¸m¡G
-<I>%H</I>
-</BLOCKQUOTE>
-</UL>
-
-<P>
-»â°ì¦WºÙ¦øªA¾¹¦^À³¤U¦C¿ù»~°T®§¡G
-<BLOCKQUOTE>
-%z
-</BLOCKQUOTE>
-
-<P>
-³oªí¥Ü¡G
-<PRE>
- The cache was not able to resolve the hostname presented in the URL. 
- Check if the address is correct. 
-</P><P>
- ºô¸ô§Ö¨ú¦øªA¾¹¨S¦³¿ìªk¥¿½TÂàÄ¶±z¿é¤Jªººô¯¸¥D¾÷¦WºÙ¡A½ÐÀË¬d±z¿é¤Jªººô
- §}¡]URL¡^¬O¥¿½Tªº¡C
-</PRE>
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<BLOCKQUOTE>
+µLªk±N±z¿é¤Jªººô¯¸¥D¾÷¦ì¸mÂàÄ¶¦¨¥¿½Tªº IP ¦ì¸m¡G
+<I>%H</I>
+</BLOCKQUOTE>
+</UL>
+
+<P>
+»â°ì¦WºÙ¦øªA¾¹¦^À³¤U¦C¿ù»~°T®§¡G
+<BLOCKQUOTE>
+%z
+</BLOCKQUOTE>
+
+<P>
+³oªí¥Ü¡G
+<PRE>
+ The cache was not able to resolve the hostname presented in the URL. 
+ Check if the address is correct. 
+</P><P>
+ ºô¸ô§Ö¨ú¦øªA¾¹¨S¦³¿ìªk¥¿½TÂàÄ¶±z¿é¤Jªººô¯¸¥D¾÷¦WºÙ¡A½ÐÀË¬d±z¿é¤Jªººô
+ §}¡]URL¡^¬O¥¿½Tªº¡C
+</PRE>
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_FORWARDING_DENIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FORWARDING_DENIED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FORWARDING_DENIED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FORWARDING_DENIED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,28 +1,28 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Forwarding Denied.
-<LI>
-Âà°e­n¨D³Q©Ú
-</STRONG>
-</UL>
-
-<P>
-This cache will not forward your request because it is trying to enforce a
-sibling relationship.  Perhaps the client at %i is a cache which has been
-misconfigured.
-</P><P>
-¥»§Ö¨ú¦øªA¾¹±NµLªk´À±zÂà¦V±zªº³s½u­n¨D¡A¤]³\¬O¦]¬°±z©Ò¨Ï¥Îªº§Ö¨ú¦øªA¾¹¡]%i¡^¨Ã¥¼³Q¥»§Ö¨ú¦øªA¾¹
-³]©w¬°­ã³\¶i¦æ¦s¨ú¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Forwarding Denied.
+<LI>
+Âà°e­n¨D³Q©Ú
+</STRONG>
+</UL>
+
+<P>
+This cache will not forward your request because it is trying to enforce a
+sibling relationship.  Perhaps the client at %i is a cache which has been
+misconfigured.
+</P><P>
+¥»§Ö¨ú¦øªA¾¹±NµLªk´À±zÂà¦V±zªº³s½u­n¨D¡A¤]³\¬O¦]¬°±z©Ò¨Ï¥Îªº§Ö¨ú¦øªA¾¹¡]%i¡^¨Ã¥¼³Q¥»§Ö¨ú¦øªA¾¹
+³]©w¬°­ã³\¶i¦æ¦s¨ú¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_FTP_DISABLED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FTP_DISABLED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FTP_DISABLED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FTP_DISABLED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,25 +1,25 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-FTP is Disabled
-<LI>
-¸T¤î¨Ï¥ÎÀÉ®×¶Ç¿é
-</STRONG>
-</UL>
-
-<P>
-This cache does not support FTP.
-</P><P>
-¥»§Ö¨ú¦øªA¾¹¨Ã¥¼¶}©ñ¤ä´©ÀÉ®×¶Ç¿éªA°È¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+FTP is Disabled
+<LI>
+¸T¤î¨Ï¥ÎÀÉ®×¶Ç¿é
+</STRONG>
+</UL>
+
+<P>
+This cache does not support FTP.
+</P><P>
+¥»§Ö¨ú¦øªA¾¹¨Ã¥¼¶}©ñ¤ä´©ÀÉ®×¶Ç¿éªA°È¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_FTP_FAILURE
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FTP_FAILURE,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FTP_FAILURE	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FTP_FAILURE	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,24 +1,24 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-¦b¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®Éµo¥ÍÀÉ®×¶Ç¿é³q°T¨ó©w¿ù»~¡G
-<A HREF="%U">%U</A>
-<P>
-PROXY ¦øªA¾¹´À±z°e¥X¤U¦CÀÉ®×¶Ç¿é©R¥O¡G
-<blockquote><strong><pre>%f</pre></strong></blockquote>
-ÀH«á¦¬¨ì³o¼Ëªº¦^À³¡G
-<blockquote><strong><pre>%F</pre></strong></blockquote>
-<blockquote><strong><pre>%g</pre></strong></blockquote>
-<P>
-This might be caused by an FTP URL with an absolute path (which does
-not comply with RFC 1738).  If this is the cause, then the file
-can be found at <A HREF="%B">%B</A>.
-</P><P>
-³o¥i¯à¬O¦]¬°¥]§t¤Fµ´¹ï¸ô®|ªº FTP ºô§}¡]URL¡^©Ò¾É­Pªº¡]¤£²Å¦X RFC 1738¡^¡C¦pªG¯uªº¬O¦]¬°
-³o­Ó­ì¦]¾É­P³o¼Ëªº¿ù»~¡AÀÉ®×¥i¯à¥i¥H¦b<A HREF="%B">%B</A>³Q§ä¨ì¡C
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+¦b¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®Éµo¥ÍÀÉ®×¶Ç¿é³q°T¨ó©w¿ù»~¡G
+<A HREF="%U">%U</A>
+<P>
+PROXY ¦øªA¾¹´À±z°e¥X¤U¦CÀÉ®×¶Ç¿é©R¥O¡G
+<blockquote><strong><pre>%f</pre></strong></blockquote>
+ÀH«á¦¬¨ì³o¼Ëªº¦^À³¡G
+<blockquote><strong><pre>%F</pre></strong></blockquote>
+<blockquote><strong><pre>%g</pre></strong></blockquote>
+<P>
+This might be caused by an FTP URL with an absolute path (which does
+not comply with RFC 1738).  If this is the cause, then the file
+can be found at <A HREF="%B">%B</A>.
+</P><P>
+³o¥i¯à¬O¦]¬°¥]§t¤Fµ´¹ï¸ô®|ªº FTP ºô§}¡]URL¡^©Ò¾É­Pªº¡]¤£²Å¦X RFC 1738¡^¡C¦pªG¯uªº¬O¦]¬°
+³o­Ó­ì¦]¾É­P³o¼Ëªº¿ù»~¡AÀÉ®×¥i¯à¥i¥H¦b<A HREF="%B">%B</A>³Q§ä¨ì¡C
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_FTP_PUT_CREATED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FTP_PUT_CREATED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FTP_PUT_CREATED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FTP_PUT_CREATED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,9 +1,9 @@
-<HTML><HEAD>
-<TITLE>ÀÉ®×¶Ç¿é PUT «ü¥O¦¨¥\§¹¦¨¡GÀÉ®×¤w³Q«Ø¥ß</TITLE>
-</HEAD><BODY>
-<H1>©Ò­n¨Dªº«ü¥O¦¨¥\¦a³Q§¹¦¨</H1>
-<H2>ÀÉ®×¤w³Q¦¨¥\¦a«Ø¥ß</H2>
-<HR>
-<P>
-</P>
-
+<HTML><HEAD>
+<TITLE>ÀÉ®×¶Ç¿é PUT «ü¥O¦¨¥\§¹¦¨¡GÀÉ®×¤w³Q«Ø¥ß</TITLE>
+</HEAD><BODY>
+<H1>©Ò­n¨Dªº«ü¥O¦¨¥\¦a³Q§¹¦¨</H1>
+<H2>ÀÉ®×¤w³Q¦¨¥\¦a«Ø¥ß</H2>
+<HR>
+<P>
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_FTP_PUT_ERROR
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FTP_PUT_ERROR,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FTP_PUT_ERROR	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FTP_PUT_ERROR	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,27 +1,27 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡GÀÉ®×¤W¶Ç¥¢±Ñ</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>ÀÉ®×¶Ç¿é¤W¶Ç¡]PUT¡^¥¢±Ñ</H2>
-<HR>
-<P>
-·í¹Á¸Õ¤W¶Ç¡]PUT¡^¤U¦C¦ì¸m®É¡G
-<A HREF="%U">%U</A>
-<P>
-§Ö¨ú¦øªA¾¹´À±zÂà°e¥X¤U¦CÀÉ®×¶Ç¿é©R¥O¡G
-<PRE><STRONG>
-        %f
-</STRONG></PRE>
-ÀH«á¦¬¨ì³o¼Ëªº°T®§
-<PRE><STRONG>
-        %F
-</STRONG></PRE>
-<P>
-³oªí¥Ü¡G
-<PRE>
-Check path, permissions, diskspace and try again.
-<BR>
-½Ð±zÀË¬d¤W¶Ç¸ô®|¡A¤W¶Ç¦ì¸mªºÅª¼gÅv­­¡A¥i¨Ï¥ÎªºªÅ¶¡¤§«á¦A¸Õ¤@¹M¡C
-</PRE>
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡GÀÉ®×¤W¶Ç¥¢±Ñ</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>ÀÉ®×¶Ç¿é¤W¶Ç¡]PUT¡^¥¢±Ñ</H2>
+<HR>
+<P>
+·í¹Á¸Õ¤W¶Ç¡]PUT¡^¤U¦C¦ì¸m®É¡G
+<A HREF="%U">%U</A>
+<P>
+§Ö¨ú¦øªA¾¹´À±zÂà°e¥X¤U¦CÀÉ®×¶Ç¿é©R¥O¡G
+<PRE><STRONG>
+        %f
+</STRONG></PRE>
+ÀH«á¦¬¨ì³o¼Ëªº°T®§
+<PRE><STRONG>
+        %F
+</STRONG></PRE>
+<P>
+³oªí¥Ü¡G
+<PRE>
+Check path, permissions, diskspace and try again.
+<BR>
+½Ð±zÀË¬d¤W¶Ç¸ô®|¡A¤W¶Ç¦ì¸mªºÅª¼gÅv­­¡A¥i¨Ï¥ÎªºªÅ¶¡¤§«á¦A¸Õ¤@¹M¡C
+</PRE>
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_FTP_PUT_MODIFIED
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_FTP_PUT_MODIFIED,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_FTP_PUT_MODIFIED	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_FTP_PUT_MODIFIED	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,9 +1,9 @@
-<HTML><HEAD>
-<TITLE>ÀÉ®×¶Ç¿é PUT «ü¥O¦¨¥\§¹¦¨¡GÀÉ®×¤w³Q§ó·s</TITLE>
-</HEAD><BODY>
-<H1>¦¨¥\§¹¦¨©Ò­n¨Dªº«ü¥O</H1>
-<H2>ÀÉ®×¤w³Q§ó·s¤F</H2>
-<HR>
-<P>
-</P>
-
+<HTML><HEAD>
+<TITLE>ÀÉ®×¶Ç¿é PUT «ü¥O¦¨¥\§¹¦¨¡GÀÉ®×¤w³Q§ó·s</TITLE>
+</HEAD><BODY>
+<H1>¦¨¥\§¹¦¨©Ò­n¨Dªº«ü¥O</H1>
+<H2>ÀÉ®×¤w³Q§ó·s¤F</H2>
+<HR>
+<P>
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_INVALID_REQ
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_INVALID_REQ,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_INVALID_REQ	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_INVALID_REQ	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,41 +1,41 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶i¦æ±z©Ò­n¨Dªº¤U¦Cµ{§Ç®É¡G
-<PRE>
-%R
-</PRE>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Invalid Request
-<LI>
-¤£¥¿½Tªº­n¨D
-</STRONG>
-</UL>
-
-<P>
-Some aspect of the HTTP Request is invalid.  Possible problems:
-<BR>
-µo¥Í¤F¤@¨Ç¤£¥¿½Tªº HTTP ­n¨D¡C¥i¯à¬O¤U¦Cªº°ÝÃD¡G
-<UL>
-<LI>Missing or unknown request method
-<BR>­n¨D¤è¦¡¿ò¥¢©Î¬O¥¼ª¾
-<LI>Missing URL
-<BR>ºô¯¸¦ì¸m¿ò¥¢
-<LI>Missing HTTP Identifier (HTTP/1.0)
-<BR>HTTP ¼Ð·Çªº«Å§i¿ò¥¢¡]HTTP/1.0¡^
-<LI>Request is too large
-<BR>­n¨D©R¥O¹Lªø
-<LI>Content-Length missing for POST or PUT requests
-<BR>¯Ê¤Ö POST ©Î PUT ­n¨D
-<LI>Illegal character in hostname; underscores are not allowed
-<BR>±ý³sµ²ªº¥D¾÷¦WºÙ¥]§t¤£¦Xªkªº¦r¤¸¡F©³½u³o­Ó¦r¤¸¬O¤£³Q¤¹³\¦s¦bªº¡C
-</UL>
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶i¦æ±z©Ò­n¨Dªº¤U¦Cµ{§Ç®É¡G
+<PRE>
+%R
+</PRE>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Invalid Request
+<LI>
+¤£¥¿½Tªº­n¨D
+</STRONG>
+</UL>
+
+<P>
+Some aspect of the HTTP Request is invalid.  Possible problems:
+<BR>
+µo¥Í¤F¤@¨Ç¤£¥¿½Tªº HTTP ­n¨D¡C¥i¯à¬O¤U¦Cªº°ÝÃD¡G
+<UL>
+<LI>Missing or unknown request method
+<BR>­n¨D¤è¦¡¿ò¥¢©Î¬O¥¼ª¾
+<LI>Missing URL
+<BR>ºô¯¸¦ì¸m¿ò¥¢
+<LI>Missing HTTP Identifier (HTTP/1.0)
+<BR>HTTP ¼Ð·Çªº«Å§i¿ò¥¢¡]HTTP/1.0¡^
+<LI>Request is too large
+<BR>­n¨D©R¥O¹Lªø
+<LI>Content-Length missing for POST or PUT requests
+<BR>¯Ê¤Ö POST ©Î PUT ­n¨D
+<LI>Illegal character in hostname; underscores are not allowed
+<BR>±ý³sµ²ªº¥D¾÷¦WºÙ¥]§t¤£¦Xªkªº¦r¤¸¡F©³½u³o­Ó¦r¤¸¬O¤£³Q¤¹³\¦s¦bªº¡C
+</UL>
+</P>
Index: squid/errors/Traditional_Chinese/ERR_INVALID_URL
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_INVALID_URL,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_INVALID_URL	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_INVALID_URL	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,35 +1,35 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Invalid URL
-<LI>
-¤£¥¿½Tªº¦ì¸m
-</STRONG>
-</UL>
-
-<P>
-Some aspect of the requested URL is incorrect.  Possible problems:
-<BR>
-±ý³sµ²ªº¦ì¸m¦³¤@¨Ç¤£¥¿½T¡C¥i¯à¬O¦]¬°¤U¦C°ÝÃD¡G
-<UL>
-<LI>Missing or incorrect access protocol (should be `http://'' or similar)
-<BR>¯Ê¤Ö©Î¤£¥¿½Tªº³q°T¨ó©w«Å§i¡]À³¸Ó¬O `http://''©Î¬OÃþ¦üªº¶}ÀY¡^
-<LI>Missing hostname
-<BR>¯Ê¤Ö±ý³sµ²ªº¥D¾÷¦WºÙ
-<LI>Illegal double-escape in the URL-Path
-<BR>¤£¦Xªkªººô¯¸³sµ²¸ô®|¡]¯Ê¤Ö `//''¡^
-<LI>Illegal character in hostname; underscores are not allowed
-<BR>¤£¦Xªkªº¦r¤¸¦s¦b©ó±ý³sµ²ªº¥D¾÷¦WºÙ¤¤¡F©³½u³o­Ó¦r¤¸¬O¤£³Q¤¹³\ªº
-</UL>
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Invalid URL
+<LI>
+¤£¥¿½Tªº¦ì¸m
+</STRONG>
+</UL>
+
+<P>
+Some aspect of the requested URL is incorrect.  Possible problems:
+<BR>
+±ý³sµ²ªº¦ì¸m¦³¤@¨Ç¤£¥¿½T¡C¥i¯à¬O¦]¬°¤U¦C°ÝÃD¡G
+<UL>
+<LI>Missing or incorrect access protocol (should be `http://'' or similar)
+<BR>¯Ê¤Ö©Î¤£¥¿½Tªº³q°T¨ó©w«Å§i¡]À³¸Ó¬O `http://''©Î¬OÃþ¦üªº¶}ÀY¡^
+<LI>Missing hostname
+<BR>¯Ê¤Ö±ý³sµ²ªº¥D¾÷¦WºÙ
+<LI>Illegal double-escape in the URL-Path
+<BR>¤£¦Xªkªººô¯¸³sµ²¸ô®|¡]¯Ê¤Ö `//''¡^
+<LI>Illegal character in hostname; underscores are not allowed
+<BR>¤£¦Xªkªº¦r¤¸¦s¦b©ó±ý³sµ²ªº¥D¾÷¦WºÙ¤¤¡F©³½u³o­Ó¦r¤¸¬O¤£³Q¤¹³\ªº
+</UL>
+</P>
Index: squid/errors/Traditional_Chinese/ERR_LIFETIME_EXP
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_LIFETIME_EXP,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_LIFETIME_EXP	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_LIFETIME_EXP	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,26 +1,26 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Connection Lifetime Expired
-<LI>
-¶W¹L³s½uµ¥«Ý®É­­
-</STRONG>
-</UL>
-
-<P>
-Squid has terminated the request because it has exceeded the maximum
-connection lifetime.
-</P><P>
-§Ö¨ú¦øªA¾¹¤w²×¤î±zªº³s½u­n¨D¡A¦]¬°¤w¸g¶W¹L³s½uµ¥«Ý®É­­¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Connection Lifetime Expired
+<LI>
+¶W¹L³s½uµ¥«Ý®É­­
+</STRONG>
+</UL>
+
+<P>
+Squid has terminated the request because it has exceeded the maximum
+connection lifetime.
+</P><P>
+§Ö¨ú¦øªA¾¹¤w²×¤î±zªº³s½u­n¨D¡A¦]¬°¤w¸g¶W¹L³s½uµ¥«Ý®É­­¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_NO_RELAY
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_NO_RELAY,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_NO_RELAY	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_NO_RELAY	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,25 +1,25 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-No Wais Relay
-<LI>
-¤£´£¨Ñ Wais¡]¼s°ì¸ê°T¦øªA¾¹¡^Âà±µ
-</STRONG>
-</UL>
-
-<P>
-There is no WAIS Relay host defined for this Cache!  Yell at the administrator.
-<BR>
-¥»§Ö¨ú¦øªA¾¹¥¼´£¨Ñ WAIS ¼s°ì¸ê°T¦øªA¾¹ªA°È¡I¦p¦³ºÃ°Ý½Ð¬¢§Ö¨ú¦øªA¾¹ºÞ²zªÌ¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+No Wais Relay
+<LI>
+¤£´£¨Ñ Wais¡]¼s°ì¸ê°T¦øªA¾¹¡^Âà±µ
+</STRONG>
+</UL>
+
+<P>
+There is no WAIS Relay host defined for this Cache!  Yell at the administrator.
+<BR>
+¥»§Ö¨ú¦øªA¾¹¥¼´£¨Ñ WAIS ¼s°ì¸ê°T¦øªA¾¹ªA°È¡I¦p¦³ºÃ°Ý½Ð¬¢§Ö¨ú¦øªA¾¹ºÞ²zªÌ¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_ONLY_IF_CACHED_MISS
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_ONLY_IF_CACHED_MISS,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_ONLY_IF_CACHED_MISS	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_ONLY_IF_CACHED_MISS	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,31 +1,31 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Valid document was not found in the cache and <code>only-if-cached</code>
-directive was specified.
-<LI>
-±z­n¨Dªº¤å¥ó¨Ã¥¼¦s¦b©ó¥»§Ö¨ú¦øªA¾¹¤W¡A¦Ó¥B±z³]©w¤F<code>only-if-cached</code>
-«ü¥O¡C
-</STRONG>
-</UL>
-
-<P>
-
-You have issued a request with a <code>only-if-cached</code> cache control
-directive. The document was not found in the cache, <em>or</em> it required
-revalidation prohibited by <code>only-if-cached</code> directive.
-<BR>
-±z°e¥X¤F¤@­Ó¥]§t <code>only-if-cached</code> §Ö¨ú±±¨î«ü¥Oªº³sµ²­n¨D¡C¦Ó¤å¥ó¨Ã¥¼¦s¦b§Ö¨ú¦øªA¾¹¤¤¡A<em>©ÎªÌ</em>
-³o­Ó³s½u­n¨D³Q <code>only-if-cached</code> «ü¥O»{©w¬O¸T¥Îªº¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Valid document was not found in the cache and <code>only-if-cached</code>
+directive was specified.
+<LI>
+±z­n¨Dªº¤å¥ó¨Ã¥¼¦s¦b©ó¥»§Ö¨ú¦øªA¾¹¤W¡A¦Ó¥B±z³]©w¤F<code>only-if-cached</code>
+«ü¥O¡C
+</STRONG>
+</UL>
+
+<P>
+
+You have issued a request with a <code>only-if-cached</code> cache control
+directive. The document was not found in the cache, <em>or</em> it required
+revalidation prohibited by <code>only-if-cached</code> directive.
+<BR>
+±z°e¥X¤F¤@­Ó¥]§t <code>only-if-cached</code> §Ö¨ú±±¨î«ü¥Oªº³sµ²­n¨D¡C¦Ó¤å¥ó¨Ã¥¼¦s¦b§Ö¨ú¦øªA¾¹¤¤¡A<em>©ÎªÌ</em>
+³o­Ó³s½u­n¨D³Q <code>only-if-cached</code> «ü¥O»{©w¬O¸T¥Îªº¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_READ_ERROR
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_READ_ERROR,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_READ_ERROR	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_READ_ERROR	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,30 +1,30 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Read Error
-<LI>
-Åª¨ú¿ù»~
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-An error condition occurred while reading data from the network.  Please
-retry your request.
-</P><P>
-¥¿¦b³z¹Lºô¸ôÅª¨ú¸ê®Æ®Éµo¥Í¤F¿ù»~ªº±¡ªp¡A½Ð¦A¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Read Error
+<LI>
+Åª¨ú¿ù»~
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+An error condition occurred while reading data from the network.  Please
+retry your request.
+</P><P>
+¥¿¦b³z¹Lºô¸ôÅª¨ú¸ê®Æ®Éµo¥Í¤F¿ù»~ªº±¡ªp¡A½Ð¦A¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_READ_TIMEOUT
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_READ_TIMEOUT,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_READ_TIMEOUT	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_READ_TIMEOUT	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,31 +1,31 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Read Timeout
-<LI>
-¶W¹LÅª¨ú®É­­
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-A Timeout occurred while waiting to read data from the network.  The network
-or server may be down or congested.  Please retry your request.
-<BR>
-·í³z¹Lºô¸ôÅª¨ú¸ê®Æ®É¡A¶W¹L¤Fµ¥«Ý®É­­¡C³o¥i¯à¬O¦]¬°ºô¸ô©Î¬O±ý³sµ²ªººô¯¸¦øªA¾¹µo¥Í¾Ã¶ë©Î·lÃa¡C
-½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Read Timeout
+<LI>
+¶W¹LÅª¨ú®É­­
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+A Timeout occurred while waiting to read data from the network.  The network
+or server may be down or congested.  Please retry your request.
+<BR>
+·í³z¹Lºô¸ôÅª¨ú¸ê®Æ®É¡A¶W¹L¤Fµ¥«Ý®É­­¡C³o¥i¯à¬O¦]¬°ºô¸ô©Î¬O±ý³sµ²ªººô¯¸¦øªA¾¹µo¥Í¾Ã¶ë©Î·lÃa¡C
+½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_SHUTTING_DOWN
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_SHUTTING_DOWN,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_SHUTTING_DOWN	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_SHUTTING_DOWN	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,20 +1,20 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<P>
-This cache is in the process of shutting down and can not
-service your request at this time.  Please retry your
-request again soon.
-<BR>
-¥»ºô¸ô§Ö¨ú¦øªA¾¹¥Ø«e¥¿¦b¶i¦æÃö³¬µ{§Ç¡A¼È®ÉµLªk¹ï±zªº³s½u­n¨D´£¨ÑªA°È¡C
-½Ðµy«Ý¤ù¨è­«·s¹Á¸Õ³s½u¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<P>
+This cache is in the process of shutting down and can not
+service your request at this time.  Please retry your
+request again soon.
+<BR>
+¥»ºô¸ô§Ö¨ú¦øªA¾¹¥Ø«e¥¿¦b¶i¦æÃö³¬µ{§Ç¡A¼È®ÉµLªk¹ï±zªº³s½u­n¨D´£¨ÑªA°È¡C
+½Ðµy«Ý¤ù¨è­«·s¹Á¸Õ³s½u¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_SOCKET_FAILURE
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_SOCKET_FAILURE,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_SOCKET_FAILURE	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_SOCKET_FAILURE	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,31 +1,31 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Socket Failure
-<LI>
-Socket «Ø¥ß¥¢±Ñ
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-Squid is unable to create a TCP socket, presumably due to excessive load.
-Please retry your request.
-<BR>
-Squid ¡]ºô¸ô§Ö¨úµ{¦¡¡^µLªk«Ø¥ß TCP socket¡A¥i¯à¬O¦]¬°¹L­«ªº­t²ü¾É­P³o­Ó°ÝÃD¡A
-½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Socket Failure
+<LI>
+Socket «Ø¥ß¥¢±Ñ
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+Squid is unable to create a TCP socket, presumably due to excessive load.
+Please retry your request.
+<BR>
+Squid ¡]ºô¸ô§Ö¨úµ{¦¡¡^µLªk«Ø¥ß TCP socket¡A¥i¯à¬O¦]¬°¹L­«ªº­t²ü¾É­P³o­Ó°ÝÃD¡A
+½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_UNSUP_REQ
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_UNSUP_REQ,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_UNSUP_REQ	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_UNSUP_REQ	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,28 +1,28 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Unsupported Request Method and Protocol
-<LI>
-©|¥¼¤ä´©ªº­n¨D¤è¦¡©Î³q°T¨ó©w
-</STRONG>
-</UL>
-
-<P>
-Squid does not support all request methods for all access protocols.
-For example, you can not POST a Gopher request.
-<BR>
-¦]¬° Squid ¡]ºô¸ô§Ö¨úµ{¦¡¡^¨Ã¥¼¤ä´©©Ò¦³ªº³sµ²­n¨D¤è¦¡¦b¦U¦¡³q°T¨ó©w¤W¡C
-¤ñ¦p»¡¡A§A¤£¯à­n¨D¤@­Ó GOPHER ªº POST ³sµ²­n¨D¡C
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Unsupported Request Method and Protocol
+<LI>
+©|¥¼¤ä´©ªº­n¨D¤è¦¡©Î³q°T¨ó©w
+</STRONG>
+</UL>
+
+<P>
+Squid does not support all request methods for all access protocols.
+For example, you can not POST a Gopher request.
+<BR>
+¦]¬° Squid ¡]ºô¸ô§Ö¨úµ{¦¡¡^¨Ã¥¼¤ä´©©Ò¦³ªº³sµ²­n¨D¤è¦¡¦b¦U¦¡³q°T¨ó©w¤W¡C
+¤ñ¦p»¡¡A§A¤£¯à­n¨D¤@­Ó GOPHER ªº POST ³sµ²­n¨D¡C
+</P>
+
Index: squid/errors/Traditional_Chinese/ERR_URN_RESOLVE
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_URN_RESOLVE,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_URN_RESOLVE	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_URN_RESOLVE	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,25 +1,25 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>URN ¤¤ªº¤@­Óºô§}¡]URL¡^µLªk³Q¶Ç¦^</H2>
-<HR>
-<P>
-·í¦b¹Á¸Õ¶Ç¦^¤U¦C URN ¦ì¸m®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Cannot Resolve URN
-<LI>
-µLªk¸ÑÄ¶ URN
-</STRONG>
-</UL>
-
-<P>
-Hey, don't expect too much from URNs on %T :)
-<BR>
-©êºp¡I±z¤£¯à¹ï URNs ¦b %T ¤W´Á«Ý¤Ó¦h :)
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>URN ¤¤ªº¤@­Óºô§}¡]URL¡^µLªk³Q¶Ç¦^</H2>
+<HR>
+<P>
+·í¦b¹Á¸Õ¶Ç¦^¤U¦C URN ¦ì¸m®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Cannot Resolve URN
+<LI>
+µLªk¸ÑÄ¶ URN
+</STRONG>
+</UL>
+
+<P>
+Hey, don't expect too much from URNs on %T :)
+<BR>
+©êºp¡I±z¤£¯à¹ï URNs ¦b %T ¤W´Á«Ý¤Ó¦h :)
+</P>
Index: squid/errors/Traditional_Chinese/ERR_WRITE_ERROR
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_WRITE_ERROR,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_WRITE_ERROR	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_WRITE_ERROR	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,30 +1,30 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Write Error
-<LI>
-¼g¤J¿ù»~
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-An error condition occurred while writing to the network.  Please retry your
-request.
-<BR>
-¥¿¦b³z¹Lºô¸ô¼g¤J¸ê®Æ®Éµo¥Í¤F¿ù»~ªº±¡ªp¡A½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Write Error
+<LI>
+¼g¤J¿ù»~
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+An error condition occurred while writing to the network.  Please retry your
+request.
+<BR>
+¥¿¦b³z¹Lºô¸ô¼g¤J¸ê®Æ®Éµo¥Í¤F¿ù»~ªº±¡ªp¡A½Ð­«·s¹Á¸Õ¤@¹M±zªº³sµ²­n¨D¡C
+</P>
Index: squid/errors/Traditional_Chinese/ERR_ZERO_SIZE_OBJECT
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/ERR_ZERO_SIZE_OBJECT,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/ERR_ZERO_SIZE_OBJECT	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/ERR_ZERO_SIZE_OBJECT	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,25 +1,25 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-Zero Sized Reply
-<LI>
-¤j¤p¬°¹sªº¸ê®Æ¦^À³
-</STRONG>
-</UL>
-
-<P>
-Squid did not receive any data for this request.
-<BR>
-±zªº¦¹¦¸³s½u­n¨D¡ASquid¡]ºô¸ô§Ö¨úµ{¦¡¡^¨Ã¥¼¦Û±ý³sµ²ªººô¯¸¦øªA¾¹±µ¦¬¨ì¥ô¦ó¸ê®Æ¡C
-</P>
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+Zero Sized Reply
+<LI>
+¤j¤p¬°¹sªº¸ê®Æ¦^À³
+</STRONG>
+</UL>
+
+<P>
+Squid did not receive any data for this request.
+<BR>
+±zªº¦¹¦¸³s½u­n¨D¡ASquid¡]ºô¸ô§Ö¨úµ{¦¡¡^¨Ã¥¼¦Û±ý³sµ²ªººô¯¸¦øªA¾¹±µ¦¬¨ì¥ô¦ó¸ê®Æ¡C
+</P>
Index: squid/errors/Traditional_Chinese/generic
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Traditional_Chinese/generic,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/errors/Traditional_Chinese/generic	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/errors/Traditional_Chinese/generic	27 Aug 2001 21:48:17 -0000	1.1.1.1.136.1
@@ -1,29 +1,29 @@
-<HTML><HEAD>
-<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
-</HEAD><BODY>
-<H1>¿ù»~</H1>
-<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
-<HR>
-<P>
-·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
-<A HREF="%U">%U</A>
-<P>
-µo¥Í¤F¤U¦Cªº¿ù»~¡G
-<UL>
-<LI>
-<STRONG>
-@SHORT_DESCRIPTION@
-</STRONG>
-</UL>
-
-<P>
-¨t²Î¦^À³¤U¦C°T®§¡G
-<PRE><I>    %E</I></PRE>
-
-<P>
-³oªí¥Ü¡G
-<PRE>
-    @LONG_DESCRIPTION@
-</PRE>
-</P>
-
+<HTML><HEAD>
+<TITLE>¿ù»~¡G±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</TITLE>
+</HEAD><BODY>
+<H1>¿ù»~</H1>
+<H2>±ý³sµ²¤§ºô§}¡]URL¡^µLªk¥¿½Tªº¶Ç¦^</H2>
+<HR>
+<P>
+·í¹Á¸Õ¶Ç¦^¤U­±ªººô§}¡]URL¡^®É¡G
+<A HREF="%U">%U</A>
+<P>
+µo¥Í¤F¤U¦Cªº¿ù»~¡G
+<UL>
+<LI>
+<STRONG>
+@SHORT_DESCRIPTION@
+</STRONG>
+</UL>
+
+<P>
+¨t²Î¦^À³¤U¦C°T®§¡G
+<PRE><I>    %E</I></PRE>
+
+<P>
+³oªí¥Ü¡G
+<PRE>
+    @LONG_DESCRIPTION@
+</PRE>
+</P>
+
Index: squid/icons/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/icons/Attic/Makefile.in,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.26.1
diff -u -r1.1.1.3 -r1.1.1.3.26.1
--- squid/icons/Makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/icons/Makefile.in	27 Aug 2001 21:48:17 -0000	1.1.1.3.26.1
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+# $Id: Makefile.in,v 1.1.1.3.26.1 2001/08/27 21:48:17 tolsty Exp $
 #
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
Index: squid/include/Array.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Array.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/Array.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/Array.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Array.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: Array.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -32,18 +32,20 @@
 
 /* see Array.c for more documentation */
 
-typedef struct {
+typedef struct
+{
     int capacity;
     int count;
     void **items;
-} Array;
+}
+Array;
 
 
 extern Array *arrayCreate();
 extern void arrayInit(Array * s);
 extern void arrayClean(Array * s);
-extern void arrayDestroy(Array *s);
-extern void arrayAppend(Array *s, void *obj);
+extern void arrayDestroy(Array * s);
+extern void arrayAppend(Array * s, void *obj);
 extern void arrayPreAppend(Array * s, int app_count);
 
 
Index: squid/include/GNUregex.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/GNUregex.h,v
retrieving revision 1.1.1.2.44.1
retrieving revision 1.1.1.2.44.1.2.1
diff -u -r1.1.1.2.44.1 -r1.1.1.2.44.1.2.1
--- squid/include/GNUregex.h	6 Jan 2001 12:40:10 -0000	1.1.1.2.44.1
+++ squid/include/GNUregex.h	27 Aug 2001 21:48:17 -0000	1.1.1.2.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: GNUregex.h,v 1.1.1.2.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: GNUregex.h,v 1.1.1.2.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 /* Definitions for data structures and routines for the regular
@@ -247,7 +247,8 @@
 
 /* If any error codes are removed, changed, or added, update the
  * `re_error_msg' table in regex.c.  */
-typedef enum {
+typedef enum
+{
     REG_NOERROR = 0,		/* Success.  */
     REG_NOMATCH,		/* Didn't find a match (for regexec).  */
 
@@ -270,7 +271,8 @@
     REG_EEND,			/* Premature end.  */
     REG_ESIZE,			/* Compiled pattern bigger than 2^16 bytes.  */
     REG_ERPAREN			/* Unmatched ) or \); not returned from regcomp.  */
-} reg_errcode_t;
+}
+reg_errcode_t;
 
 /* This data structure represents a compiled pattern.  Before calling
  * the pattern compiler, the fields `buffer', `allocated', `fastmap',
@@ -278,7 +280,8 @@
  * compiled, the `re_nsub' field is available.  All other fields are
  * private to the regex routines.  */
 
-struct re_pattern_buffer {
+struct re_pattern_buffer
+{
 /* [[[begin pattern_buffer]]] */
     /* Space that holds the compiled pattern.  It is declared as
      * `unsigned char *' because its elements are
@@ -358,7 +361,8 @@
 
 /* This is the structure we store register match data in.  See
  * regex.texinfo for a full description of what registers match.  */
-struct re_registers {
+struct re_registers
+{
     unsigned num_regs;
     regoff_t *start;
     regoff_t *end;
@@ -376,10 +380,12 @@
 /* POSIX specification for registers.  Aside from the different names than
  * `re_registers', POSIX uses an array of structures, instead of a
  * structure of arrays.  */
-typedef struct {
+typedef struct
+{
     regoff_t rm_so;		/* Byte offset from string's start to substring's start.  */
     regoff_t rm_eo;		/* Byte offset from string's start to substring's end.  */
-} regmatch_t;
+}
+regmatch_t;
 
 /* Declarations for routines.  */
 
@@ -407,8 +413,7 @@
  * and syntax given by the global `re_syntax_options', into the buffer
  * BUFFER.  Return NULL if successful, and an error string if not.  */
 extern const char *re_compile_pattern
-     _RE_ARGS((const char *pattern, int length,
-	struct re_pattern_buffer * buffer));
+_RE_ARGS((const char *pattern, int length, struct re_pattern_buffer * buffer));
 
 
 /* Compile a fastmap for the compiled pattern in BUFFER; used to
@@ -423,29 +428,29 @@
  * match, or -2 for an internal error.  Also return register
  * information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
 extern int re_search
-    _RE_ARGS((struct re_pattern_buffer * buffer, const char *string,
-	int length, int start, int range, struct re_registers * regs));
+_RE_ARGS((struct re_pattern_buffer * buffer, const char *string,
+int length, int start, int range, struct re_registers * regs));
 
 
 /* Like `re_search', but search in the concatenation of STRING1 and
  * STRING2.  Also, stop searching at index START + STOP.  */
 extern int re_search_2
-    _RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
-	int length1, const char *string2, int length2,
+_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
+int length1, const char *string2, int length2,
 	int start, int range, struct re_registers * regs, int stop));
 
 
 /* Like `re_search', but return how many characters in STRING the regexp
  * in BUFFER matched, starting at position START.  */
 extern int re_match
-    _RE_ARGS((struct re_pattern_buffer * buffer, const char *string,
-	int length, int start, struct re_registers * regs));
+_RE_ARGS((struct re_pattern_buffer * buffer, const char *string,
+int length, int start, struct re_registers * regs));
 
 
 /* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
 extern int re_match_2
-    _RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
-	int length1, const char *string2, int length2,
+_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1,
+int length1, const char *string2, int length2,
 	int start, struct re_registers * regs, int stop));
 
 
@@ -462,7 +467,7 @@
  * PATTERN_BUFFER will allocate its own register data, without
  * freeing the old data.  */
 extern void re_set_registers
-     _RE_ARGS((struct re_pattern_buffer * buffer, struct re_registers * regs,
+_RE_ARGS((struct re_pattern_buffer * buffer, struct re_registers * regs,
 	unsigned num_regs, regoff_t * starts, regoff_t * ends));
 
 /* 4.2 bsd compatibility.  */
@@ -472,11 +477,10 @@
 /* POSIX compatibility.  */
 extern int regcomp _RE_ARGS((regex_t * preg, const char *pattern, int cflags));
 extern int regexec
-    _RE_ARGS((const regex_t * preg, const char *string, size_t nmatch,
-	regmatch_t pmatch[], int eflags));
+_RE_ARGS((const regex_t * preg, const char *string, size_t nmatch,
+regmatch_t pmatch[], int eflags));
 extern size_t regerror
-       _RE_ARGS((int errcode, const regex_t * preg, char *errbuf,
-	size_t errbuf_size));
+_RE_ARGS((int errcode, const regex_t * preg, char *errbuf, size_t errbuf_size));
 extern void regfree _RE_ARGS((regex_t * preg));
 
 #endif /* not __REGEXP_LIBRARY_H__ */
Index: squid/include/PSAPI.H
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/PSAPI.H,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/include/PSAPI.H	6 Jan 2001 12:48:45 -0000	1.1.2.1
+++ squid/include/PSAPI.H	27 Aug 2001 21:48:17 -0000	1.1.2.1.2.1
@@ -1,7 +1,5 @@
 /*++ BUILD Version: 0001    // Increment this if a change has global effects
-
 Copyright (c) 1994  Microsoft Corporation
-
 Module Name:
 
     psapi.h
@@ -22,229 +20,162 @@
 #define _PSAPI_H_
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-BOOL
-WINAPI
-EnumProcesses(
-    DWORD * lpidProcess,
-    DWORD   cb,
-    DWORD * cbNeeded
-    );
-
-BOOL
-WINAPI
-EnumProcessModules(
-    HANDLE hProcess,
-    HMODULE *lphModule,
-    DWORD cb,
-    LPDWORD lpcbNeeded
-    );
-
-DWORD
-WINAPI
-GetModuleBaseNameA(
-    HANDLE hProcess,
-    HMODULE hModule,
-    LPSTR lpBaseName,
-    DWORD nSize
-    );
-
-DWORD
-WINAPI
-GetModuleBaseNameW(
-    HANDLE hProcess,
-    HMODULE hModule,
-    LPWSTR lpBaseName,
-    DWORD nSize
-    );
+    BOOL WINAPI EnumProcesses(DWORD * lpidProcess, DWORD cb, DWORD * cbNeeded);
+
+           BOOL
+	WINAPI
+	EnumProcessModules(HANDLE hProcess,
+	HMODULE * lphModule, DWORD cb, LPDWORD lpcbNeeded);
+
+           DWORD
+	WINAPI
+	GetModuleBaseNameA(HANDLE hProcess,
+	HMODULE hModule, LPSTR lpBaseName, DWORD nSize);
+
+           DWORD
+	WINAPI
+	GetModuleBaseNameW(HANDLE hProcess,
+	HMODULE hModule, LPWSTR lpBaseName, DWORD nSize);
 
 #ifdef UNICODE
 #define GetModuleBaseName  GetModuleBaseNameW
 #else
 #define GetModuleBaseName  GetModuleBaseNameA
-#endif // !UNICODE
+#endif				// !UNICODE
 
 
-DWORD
-WINAPI
-GetModuleFileNameExA(
-    HANDLE hProcess,
-    HMODULE hModule,
-    LPSTR lpFilename,
-    DWORD nSize
-    );
-
-DWORD
-WINAPI
-GetModuleFileNameExW(
-    HANDLE hProcess,
-    HMODULE hModule,
-    LPWSTR lpFilename,
-    DWORD nSize
-    );
+           DWORD
+	WINAPI
+	GetModuleFileNameExA(HANDLE hProcess,
+	HMODULE hModule, LPSTR lpFilename, DWORD nSize);
+
+           DWORD
+	WINAPI
+	GetModuleFileNameExW(HANDLE hProcess,
+	HMODULE hModule, LPWSTR lpFilename, DWORD nSize);
 
 #ifdef UNICODE
 #define GetModuleFileNameEx  GetModuleFileNameExW
 #else
 #define GetModuleFileNameEx  GetModuleFileNameExA
-#endif // !UNICODE
+#endif				// !UNICODE
+
+
+    typedef struct _MODULEINFO
+    {
+	LPVOID lpBaseOfDll;
+	DWORD SizeOfImage;
+	LPVOID EntryPoint;
+    }
+    MODULEINFO , *LPMODULEINFO;
+
+
+                BOOL
+	WINAPI
+	GetModuleInformation(HANDLE hProcess,
+	HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb);
+
+
+    BOOL WINAPI EmptyWorkingSet(HANDLE hProcess);
+
+
+    BOOL WINAPI QueryWorkingSet(HANDLE hProcess, PVOID pv, DWORD cb);
+
+    BOOL WINAPI InitializeProcessForWsWatch(HANDLE hProcess);
+
+
+    typedef struct _PSAPI_WS_WATCH_INFORMATION
+    {
+	LPVOID FaultingPc;
+	LPVOID FaultingVa;
+    }
+    PSAPI_WS_WATCH_INFORMATION , *PPSAPI_WS_WATCH_INFORMATION;
+
+                                BOOL
+	WINAPI
+	GetWsChanges(HANDLE hProcess,
+	PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, DWORD cb);
 
+                                DWORD
+	WINAPI
+	GetMappedFileNameW(HANDLE hProcess,
+	LPVOID lpv, LPWSTR lpFilename, DWORD nSize);
 
-typedef struct _MODULEINFO {
-    LPVOID lpBaseOfDll;
-    DWORD SizeOfImage;
-    LPVOID EntryPoint;
-} MODULEINFO, *LPMODULEINFO;
-
-
-BOOL
-WINAPI
-GetModuleInformation(
-    HANDLE hProcess,
-    HMODULE hModule,
-    LPMODULEINFO lpmodinfo,
-    DWORD cb
-    );
-
-
-BOOL
-WINAPI
-EmptyWorkingSet(
-    HANDLE hProcess
-    );
-
-
-BOOL
-WINAPI
-QueryWorkingSet(
-    HANDLE hProcess,
-    PVOID pv,
-    DWORD cb
-    );
-
-BOOL
-WINAPI
-InitializeProcessForWsWatch(
-    HANDLE hProcess
-    );
-
-
-typedef struct _PSAPI_WS_WATCH_INFORMATION {
-    LPVOID FaultingPc;
-    LPVOID FaultingVa;
-} PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
-
-BOOL
-WINAPI
-GetWsChanges(
-    HANDLE hProcess,
-    PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,
-    DWORD cb
-    );
-
-DWORD
-WINAPI
-GetMappedFileNameW(
-    HANDLE hProcess,
-    LPVOID lpv,
-    LPWSTR lpFilename,
-    DWORD nSize
-    );
-
-DWORD
-WINAPI
-GetMappedFileNameA(
-    HANDLE hProcess,
-    LPVOID lpv,
-    LPSTR lpFilename,
-    DWORD nSize
-    );
+                                DWORD
+	WINAPI
+	GetMappedFileNameA(HANDLE hProcess,
+	LPVOID lpv, LPSTR lpFilename, DWORD nSize);
 
 #ifdef UNICODE
 #define GetMappedFilenameEx  GetMappedFilenameExW
 #else
 #define GetMappedFilenameEx  GetMappedFilenameExA
-#endif // !UNICODE
+#endif				// !UNICODE
 
-BOOL
-WINAPI
-EnumDeviceDrivers(
-    LPVOID *lpImageBase,
-    DWORD cb,
-    LPDWORD lpcbNeeded
-    );
-
-
-DWORD
-WINAPI
-GetDeviceDriverBaseNameA(
-    LPVOID ImageBase,
-    LPSTR lpBaseName,
-    DWORD nSize
-    );
-
-DWORD
-WINAPI
-GetDeviceDriverBaseNameW(
-    LPVOID ImageBase,
-    LPWSTR lpBaseName,
-    DWORD nSize
-    );
+                                BOOL
+	WINAPI
+	EnumDeviceDrivers(LPVOID * lpImageBase, DWORD cb, LPDWORD lpcbNeeded);
+
+
+                                DWORD
+	WINAPI
+	GetDeviceDriverBaseNameA(LPVOID ImageBase,
+	LPSTR lpBaseName, DWORD nSize);
+
+                                DWORD
+	WINAPI
+	GetDeviceDriverBaseNameW(LPVOID ImageBase,
+	LPWSTR lpBaseName, DWORD nSize);
 
 #ifdef UNICODE
 #define GetDeviceDriverBaseName  GetDeviceDriverBaseNameW
 #else
 #define GetDeviceDriverBaseName  GetDeviceDriverBaseNameA
-#endif // !UNICODE
+#endif				// !UNICODE
 
 
-DWORD
-WINAPI
-GetDeviceDriverFileNameA(
-    LPVOID ImageBase,
-    LPSTR lpFilename,
-    DWORD nSize
-    );
-
-DWORD
-WINAPI
-GetDeviceDriverFileNameW(
-    LPVOID ImageBase,
-    LPWSTR lpFilename,
-    DWORD nSize
-    );
+                                DWORD
+	WINAPI
+	GetDeviceDriverFileNameA(LPVOID ImageBase,
+	LPSTR lpFilename, DWORD nSize);
+
+                                DWORD
+	WINAPI
+	GetDeviceDriverFileNameW(LPVOID ImageBase,
+	LPWSTR lpFilename, DWORD nSize);
 
 #ifdef UNICODE
 #define GetDeviceDriverFileName  GetDeviceDriverFileNameW
 #else
 #define GetDeviceDriverFileName  GetDeviceDriverFileNameA
-#endif // !UNICODE
+#endif				// !UNICODE
 
 // Structure for GetProcessMemoryInfo()
 
-typedef struct _PROCESS_MEMORY_COUNTERS {
-    DWORD cb;
-    DWORD PageFaultCount;
-    DWORD PeakWorkingSetSize;
-    DWORD WorkingSetSize;
-    DWORD QuotaPeakPagedPoolUsage;
-    DWORD QuotaPagedPoolUsage;
-    DWORD QuotaPeakNonPagedPoolUsage;
-    DWORD QuotaNonPagedPoolUsage;
-    DWORD PagefileUsage;
-    DWORD PeakPagefileUsage;
-} PROCESS_MEMORY_COUNTERS;
-typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
-
-BOOL
-WINAPI
-GetProcessMemoryInfo(
-    HANDLE Process,
-    PPROCESS_MEMORY_COUNTERS ppsmemCounters,
-    DWORD cb
-    );
+    typedef struct _PROCESS_MEMORY_COUNTERS
+    {
+	DWORD cb;
+	DWORD PageFaultCount;
+	DWORD PeakWorkingSetSize;
+	DWORD WorkingSetSize;
+	DWORD QuotaPeakPagedPoolUsage;
+	DWORD QuotaPagedPoolUsage;
+	DWORD QuotaPeakNonPagedPoolUsage;
+	DWORD QuotaNonPagedPoolUsage;
+	DWORD PagefileUsage;
+	DWORD PeakPagefileUsage;
+    }
+    PROCESS_MEMORY_COUNTERS;
+    typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
+
+                            BOOL
+	WINAPI
+	GetProcessMemoryInfo(HANDLE Process,
+	PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb);
 
 #ifdef __cplusplus
 }
Index: squid/include/READDIR.H
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/READDIR.H,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/include/READDIR.H	6 Jan 2001 12:48:45 -0000	1.1.2.1
+++ squid/include/READDIR.H	27 Aug 2001 21:48:17 -0000	1.1.2.1.2.1
@@ -6,29 +6,32 @@
 #include <io.h>
 //#include <stdio.h>
 #include <stdlib.h>
-#include <sys/types.h> 
+#include <sys/types.h>
 #define off_t _off_t
 
 
 /* struct dirent - same as Unix */
-struct dirent {
-    long d_ino;                    /* inode (always 1 in WIN32) */
-    off_t d_off;                /* offset to this dirent */
-    unsigned short d_reclen;    /* length of d_name */
-    char d_name[_MAX_FNAME+1];    /* filename (null terminated) */
+struct dirent
+{
+    long d_ino;			/* inode (always 1 in WIN32) */
+    off_t d_off;		/* offset to this dirent */
+    unsigned short d_reclen;	/* length of d_name */
+    char d_name[_MAX_FNAME + 1];	/* filename (null terminated) */
 };
 
 /* typedef DIR - not the same as Unix */
-typedef struct {
-    long handle;                /* _findfirst/_findnext handle */
-    short offset;                /* offset into directory */
-    short finished;             /* 1 if there are not more files */
-    struct _finddata_t fileinfo;  /* from _findfirst/_findnext */
-    char *dir;                  /* the dir we are reading */
-    struct dirent dent;         /* the dirent to return */
-} DIR;
+typedef struct
+{
+    long handle;		/* _findfirst/_findnext handle */
+    short offset;		/* offset into directory */
+    short finished;		/* 1 if there are not more files */
+    struct _finddata_t fileinfo;	/* from _findfirst/_findnext */
+    char *dir;			/* the dir we are reading */
+    struct dirent dent;		/* the dirent to return */
+}
+DIR;
 
 /* Function prototypes */
-DIR * opendir(const char *);
-struct dirent * readdir(DIR *);
+DIR *opendir(const char *);
+struct dirent *readdir(DIR *);
 int closedir(DIR *);
Index: squid/include/Stack.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Stack.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/Stack.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/Stack.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Stack.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: Stack.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -38,9 +38,9 @@
 #define stackInit arrayInit
 #define stackClean arrayClean
 #define stackDestroy arrayDestroy
-extern void *stackPop(Stack *s);
+extern void *stackPop(Stack * s);
 #define stackPush arrayAppend
 #define stackPrePush arrayPreAppend
-extern void *stackTop(Stack *s);
+extern void *stackTop(Stack * s);
 
 #endif /* ndef _STACK_H_ */
Index: squid/include/asn1.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/asn1.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/asn1.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/asn1.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,6 +1,5 @@
 #ifndef _SNMP_ASN1_H_
 #define _SNMP_ASN1_H_
-
 /*
  * Definitions for Abstract Syntax Notation One, ASN.1
  * As defined in ISO/IS 8824 and ISO/IS 8825
@@ -28,7 +27,7 @@
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  * 
- * $Id: asn1.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: asn1.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
@@ -67,7 +66,8 @@
 #define IS_EXTENSION_ID(byte)	(((byte) & ASN_EXTENSION_ID) == ASN_EXTENSION_ID)
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     u_char *asn_build_header(u_char *, int *, u_char, int);
Index: squid/include/autoconf.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/autoconf.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.6.2.1
diff -u -r1.1.2.6 -r1.1.2.6.2.1
--- squid/include/autoconf.h	28 Jul 2001 10:18:13 -0000	1.1.2.6
+++ squid/include/autoconf.h	27 Aug 2001 21:48:17 -0000	1.1.2.6.2.1
@@ -1,5 +1,4 @@
 /* include/autoconf.h.in.  Generated automatically from configure.in by autoheader.  */
-
 /* Define if using alloca.c.  */
 #undef C_ALLOCA
 
@@ -18,7 +17,7 @@
 #undef HAVE_ALLOCA_H
 
 /* Define to `int' if <sys/types.h> doesn't define.  */
-#undef mode_t 
+#undef mode_t
 #define mode_t int
 
 /* Define to `long' if <sys/types.h> doesn't define.  */
@@ -26,7 +25,7 @@
 
 /* Define to `int' if <sys/types.h> doesn't define.  */
 #undef pid_t
-#define pid_t int
+#define pid_t long
 
 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
 #undef size_t
@@ -88,6 +87,9 @@
  *           ICP_OP_MISS_NOFETCH for sites which it cannot ping.
  */
 #undef USE_ICMP
+#define USE_ICMP 1
+
+#define ALLOW_SOURCE_PING 1
 
 /*
  * Traffic management via "delay pools".
@@ -146,6 +148,7 @@
  * code is still semi-experimental. 
  */
 #undef USE_CACHE_DIGESTS
+#define USE_CACHE_DIGESTS 1
 
 /*
  * Cache Array Routing Protocol
@@ -233,7 +236,7 @@
  * should be defined to int.
  */
 #undef socklen_t
-#define socklen_t long  
+#define socklen_t int
 /*
  * By default (for now anyway) Squid includes options which allows
  * the cache administrator to violate the HTTP protocol specification
@@ -258,7 +261,7 @@
  * type of fd_set array
  */
 #undef fd_mask
-#define fd_mask long 
+#define fd_mask int
 /*
  * If _res structure has nsaddr_list member
  */
@@ -304,6 +307,7 @@
  * Use the heap-based replacement techniques
  */
 #undef HEAP_REPLACEMENT
+#define HEAP_REPLACEMENT 1
 
 /* The number of bytes in a int.  */
 #undef SIZEOF_INT
@@ -445,6 +449,7 @@
 /* Define if you have the strerror function.  */
 #undef HAVE_STRERROR
 #define HAVE_STRERROR 1
+
 /* Define if you have the sysconf function.  */
 #undef HAVE_SYSCONF
 
@@ -488,6 +493,7 @@
 
 /* Define if you have the <dirent.h> header file.  */
 #undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
 
 /* Define if you have the <errno.h> header file.  */
 #undef HAVE_ERRNO_H
Index: squid/include/cache_snmp.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/cache_snmp.h,v
retrieving revision 1.1.1.3.30.1
retrieving revision 1.1.1.3.30.1.2.1
diff -u -r1.1.1.3.30.1 -r1.1.1.3.30.1.2.1
--- squid/include/cache_snmp.h	6 Jan 2001 12:40:10 -0000	1.1.1.3.30.1
+++ squid/include/cache_snmp.h	27 Aug 2001 21:48:17 -0000	1.1.1.3.30.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_snmp.h,v 1.1.1.3.30.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: cache_snmp.h,v 1.1.1.3.30.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifdef SQUID_SNMP
@@ -56,7 +56,8 @@
  * cacheSystem group 
  */
 
-enum {
+enum
+{
     SYS_START,
     SYSVMSIZ,
     SYSSTOR,
@@ -71,7 +72,8 @@
  * cacheConfig group 
  */
 
-enum {
+enum
+{
     CONF_START,
     CONF_ADMIN,
     CONF_VERSION,
@@ -84,7 +86,8 @@
 #define LEN_CONF LEN_SQ_CONF + 1
 #define LEN_CONF_INST LEN_SQ_CONF + 2
 
-enum {
+enum
+{
     CONF_ST_START,
     CONF_ST_MMAXSZ,
     CONF_ST_SWMAXSZ,
@@ -100,14 +103,16 @@
  * cacheMesh group 
  */
 
-enum {
+enum
+{
     MESH_START,
     MESH_PTBL,
     MESH_CTBL,
     MESH_END
 };
 
-enum {				/* cachePeerTable */
+enum
+{				/* cachePeerTable */
     MESH_PTBL_START,
     MESH_PTBL_NAME,
     MESH_PTBL_IP,
@@ -125,7 +130,8 @@
     MESH_PTBL_END
 };
 
-enum {				/* cacheClientTable */
+enum
+{				/* cacheClientTable */
     MESH_CTBL_START,
     MESH_CTBL_ADDR,
     MESH_CTBL_HTREQ,
@@ -143,7 +149,8 @@
  * cacheNetwork group 
  */
 
-enum {
+enum
+{
     NET_START,
     NET_IP_CACHE,
     NET_FQDN_CACHE,
@@ -151,7 +158,8 @@
     NET_END
 };
 
-enum {
+enum
+{
     IP_START,
     IP_ENT,
     IP_REQ,
@@ -164,7 +172,8 @@
     IP_END
 };
 
-enum {
+enum
+{
     FQDN_START,
     FQDN_ENT,
     FQDN_REQ,
@@ -176,7 +185,8 @@
     FQDN_END
 };
 
-enum {
+enum
+{
     DNS_START,
     DNS_REQ,
     DNS_REP,
@@ -188,14 +198,16 @@
  * Cache Performance Group 
  */
 
-enum {
+enum
+{
     PERF_START,
     PERF_SYS,
     PERF_PROTO,
     PERF_END
 };
 
-enum {
+enum
+{
     PERF_SYS_START,
     PERF_SYS_PF,
     PERF_SYS_NUMR,
@@ -211,14 +223,16 @@
     PERF_SYS_END
 };
 
-enum {
+enum
+{
     PERF_PROTOSTAT_START,
     PERF_PROTOSTAT_AGGR,
     PERF_PROTOSTAT_MEDIAN,
     PERF_PROTOSTAT_END
 };
 
-enum {
+enum
+{
     PERF_PROTOSTAT_AGGR_START,
     PERF_PROTOSTAT_AGGR_HTTP_REQ,
     PERF_PROTOSTAT_AGGR_HTTP_HITS,
@@ -238,7 +252,8 @@
     PERF_PROTOSTAT_AGGR_END
 };
 
-enum {
+enum
+{
     PERF_MEDIAN_START,
     PERF_MEDIAN_TIME,
     PERF_MEDIAN_HTTP_ALL,
Index: squid/include/config.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/config.h,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.6.2.1
diff -u -r1.1.2.6 -r1.1.2.6.2.1
--- squid/include/config.h	15 Jul 2001 16:58:37 -0000	1.1.2.6
+++ squid/include/config.h	27 Aug 2001 21:48:17 -0000	1.1.2.6.2.1
@@ -104,6 +104,8 @@
 #define _SQUID_MSWIN_
 
 /* Some tricks for MS Compilers */
+#define __STDC__ 1
+#pragma include_alias(<dirent.h>, <direct.h>)
 #define alloca _alloca
 #define chdir _chdir
 #define getcwd _getcwd
@@ -120,14 +122,33 @@
 #define ushort unsigned short int
 #define uid_t int
 #define gid_t int
+#define timezone _timezone
+
+#define sleep(t) Sleep((t)*1000)
+
+#define	SIGHUP	1		/* hangup */
+#define	SIGKILL	9		/* kill (cannot be caught or ignored) */
+#define	SIGBUS	10		/* bus error */
+#define	SIGPIPE	13		/* write on a pipe with no one to read it */
+#define	SIGCHLD	20		/* to parent on child stop or exit */
+#define SIGUSR1 30		/* user defined signal 1 */
+#define SIGUSR2 31		/* user defined signal 2 */
 
 #define CHANGE_FD_SETSIZE 1
-#if CHANGE_FD_SETSIZE && SQUID_MAXFD > DEFAULT_FD_SETSIZE
+#if SQUID_MAXFD > DEFAULT_FD_SETSIZE
 #define FD_SETSIZE SQUID_MAXFD
 #endif
 
 #include <stddef.h>
+/* Hack to suppress compiler warnings on FD_SET() & FD_CLR() */
+#pragma warning (push)
+#pragma warning (disable:4142)
+typedef int SOCKET;
+/* prevent inclusion of wingdi.h */
+#define NOGDI
 #include <ws2spi.h>
+#undef OPTIONAL
+#pragma warning (pop)
 #include "readdir.h"
 
 typedef char *caddr_t;
@@ -140,20 +161,105 @@
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #define EALREADY WSAEALREADY
 #define ETIMEDOUT WSAETIMEDOUT
+#define ECONNREFUSED WSAECONNREFUSED
+#define ECONNRESET WSAECONNRESET
+#define ERESTART WSATRY_AGAIN
+
+#define O_RDONLY _O_RDONLY
+#define O_BINARY _O_BINARY
+#define O_WRONLY _O_WRONLY
+#define O_APPEND _O_APPEND
+#define O_TRUNC _O_TRUNC
+#define O_CREAT _O_CREAT
+
+#define read       _read
+#define write      _write
+#define close      _close
+#define fileno     _fileno
+#define fdopen     _fdopen
+#define open       _open
+#define strdup     _strdup
+#define unlink     _unlink
+#define dup        _dup
+#define dup2       _dup2
+#define lseek      _lseeki64
+#define stat       _stati64
+#define fstat      _fstati64
+#define memccpy    _memccpy
+#define putenv     _putenv
+#define umask      _umask
+#define mkdir(p,m) _mkdir(p)
+#define tempnam    _tempnam
+#define setuid(l)  100
+#define geteuid()  100
+#define setgid(g)  100
+
+struct passwd {
+	uid_t pw_uid;
+};
+
+struct group {
+	gid_t gr_gid;
+};
+
+#if defined(CLIENT_SIDE_C) || defined(COMM_C) || defined(COMM_SELECT_C) || \
+	defined (DNS_INTERNAL_C) || defined (FORWARD_C) || defined(FTP_C) || \
+	defined (GOPHER_C) || defined (HELPER_C) || defined (HTCP_C) || \
+	defined (HTTP_C) || defined(IDENT_C) || \
+	defined (PCONN_C) || defined (PUMP_C) || defined (SSL_C) || \
+	defined(WHOIS_C) || defined(WAIS_C)
+#undef read
+#undef write
+#define read(x,y,z) recv(x,y,z,0)
+#define write(x,y,z) send(x,y,z,0)
+#endif
+
+#if defined(COMM_C) || defined(SNMP_API_C) || defined(TOOLS_C)
+#undef close
+#define close(fd) closesocket(fd)
+#endif
+
+#if !defined(_etext) /* util.c actually */
+#define strerror(e) xbstrerror(e)
+#else
+#define NOT_NEEDED 1
+#endif
+
+/* internal to CRTLIB */
+/* used also in win32lib.c */
+extern void __cdecl _dosmaperr(unsigned long oserrno);
+
+#if defined(COMM_C)
+static __declspec(thread) SOCKET tmp_fd;
+#undef dup2
+#define dup2(fd1,fd2) \
+	(tmp_fd = (fd2), \
+	DuplicateHandle(GetCurrentProcess(), (HANDLE)(fd1), \
+		GetCurrentProcess(), (LPHANDLE)&(fd2), \
+		0, FALSE, DUPLICATE_SAME_ACCESS) ? \
+	(closesocket(tmp_fd), assert((fd2) < Squid_MaxFD), \
+	sd_table[(fd2)] = sd_table[tmp_fd], \
+	/* Dirty hack: try to see if */ \
+	/* cs->callback == fwdConnectDone */ \
+		(((FwdState*)cs->data)->server_fd == tmp_fd ?  \
+		((FwdState*)cs->data)->server_fd = (fd2) : 0 ), \
+	assert(sd_table[fd2].flags.open), \
+	sd_table[fd2].flags.open = 0, \
+	fd_close(tmp_fd), \
+	fd_open((fd2), sd_table[fd2].type, sd_table[fd2].desc), \
+	0) : \
+	(_dosmaperr(GetLastError()), -1))
+#endif
 
 #if defined (COMM_C) || defined (COMM_SELECT_C)
-#define recv(x,y,z) recv(x,y,z,0)
-#define send(x,y,z) send(x,y,z,0)
 #define fd_bytes(x,y,z) sd_bytes(x,y,z)
 #define fd_note(x,y) sd_note(x,y)
 #define fd_open(x,y,z) sd_open(x,y,z)
 #define fd_close(x) sd_close(x)
-#define ignoreErrno(x) WSAignoreErrno(x)
 #endif
 
 #if defined (ICP_V2_C)
 #define fd_note(x,y) sd_note(x,y)
-#define ignoreErrno(x) WSAignoreErrno(x)
 #define commSetSelect(x,y,z,u,v) commSetSelectS(x,y,z,u,v)
 #endif
 
@@ -163,10 +269,7 @@
 #endif
 
 #if defined(WHOIS_C) || defined(WAIS_C) 
-#define send(x,y,z) send(x,y,z,0)
-#define recv(x,y,z) recv(x,y,z,0)
 #define fd_bytes(x,y,z) sd_bytes(x,y,z)
-#define ignoreErrno(x) WSAignoreErrno(x)
 #define commSetSelect(x,y,z,u,v) commSetSelectS(x,y,z,u,v)
 #endif
 
@@ -174,14 +277,80 @@
 	defined (HTTP_C) || defined (HTCP_C) || defined (HELPER_C) || defined (CLIENT_SIDE_C) \
 	|| defined (FTP_C) || defined (GOPHER_C) || defined(IDENT_C) || \
 	defined (ICMP_C) || defined (FORWARD_C) || defined (DNS_INTERNAL_C)
-#define recv(x,y,z) recv(x,y,z,0)
-#define send(x,y,z) send(x,y,z,0)
 #define fd_bytes(x,y,z) sd_bytes(x,y,z)
 #define fd_note(x,y) sd_note(x,y)
-#define ignoreErrno(x) WSAignoreErrno(x)
 #define commSetSelect(x,y,z,u,v) commSetSelectS(x,y,z,u,v)
 #endif
 
+#define _PATH_RESOLV_CONF Config.pidFilename
+
+#undef h_errno
+#define h_errno errno /* we'll set it ourselves */
+
+extern __declspec(thread) int ws32_result;
+#define socket(f,t,p) \
+	(INVALID_SOCKET == ((SOCKET)ws32_result = socket(f,t,p)) ? \
+	((WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1), -1) : \
+	(SOCKET)ws32_result)
+#define accept(s,a,l) \
+	(INVALID_SOCKET == ((SOCKET)ws32_result = accept(s,a,l)) ? \
+	((WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1), -1) : \
+	(SOCKET)ws32_result)
+#define bind(s,n,l) \
+	(SOCKET_ERROR == bind(s,n,l) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define connect(s,n,l) \
+	(SOCKET_ERROR == connect(s,n,l) ? \
+	(WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1, -1) : 0)
+#define listen(s,b) \
+	(SOCKET_ERROR == listen(s,b) ? \
+	(WSAEMFILE == (errno = WSAGetLastError()) ? errno = EMFILE : -1, -1) : 0)
+#define shutdown(s,h) \
+	(SOCKET_ERROR == shutdown(s,h) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define closesocket(s) \
+	(SOCKET_ERROR == closesocket(s) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define select(n,r,w,e,t) \
+	(SOCKET_ERROR == (ws32_result = select(n,r,w,e,t)) ? \
+	((errno = WSAGetLastError()), -1) : ws32_result)
+#define recv(s,b,l,f) \
+	(SOCKET_ERROR == (ws32_result = recv(s,b,l,f)) ? \
+	((errno = WSAGetLastError()), -1) : ws32_result)
+#define recvfrom(s,b,l,f,fr,frl) \
+	(SOCKET_ERROR == (ws32_result = recvfrom(s,b,l,f,fr,frl)) ? \
+	((errno = WSAGetLastError()), -1) : ws32_result)
+#define send(s,b,l,f) \
+	(SOCKET_ERROR == (ws32_result = send(s,b,l,f)) ? \
+	((errno = WSAGetLastError()), -1) : ws32_result)
+#define sendto(s,b,l,f,t,tl) \
+	(SOCKET_ERROR == (ws32_result = sendto(s,b,l,f,t,tl)) ? \
+	((errno = WSAGetLastError()), -1) : ws32_result)
+#define getsockname(s,n,l) \
+	(SOCKET_ERROR == getsockname(s,n,l) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define getsockopt(s,l,o,v,n) \
+	(Sleep(1), SOCKET_ERROR == getsockopt(s,l,o,v,n) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define setsockopt(s,l,o,v,n) \
+	(SOCKET_ERROR == setsockopt(s,l,o,v,n) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define ioctlsocket(s,c,a) \
+	(SOCKET_ERROR == ioctlsocket(s,c,a) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define gethostname(n,l) \
+	(SOCKET_ERROR == gethostname(n,l) ? \
+	(errno = WSAGetLastError()), -1 : 0)
+#define gethostbyname(n) \
+	(NULL == ((HOSTENT FAR*)ws32_result = gethostbyname(n)) ? \
+	(errno = WSAGetLastError()), NULL : (HOSTENT FAR*)ws32_result)
+#define getservbyname(n,p) \
+	(NULL == ((SERVENT FAR*)ws32_result = getservbyname(n,p)) ? \
+	(errno = WSAGetLastError()), NULL : (SERVENT FAR*)ws32_result)
+#define gethostbyaddr(a,l,t) \
+	(NULL == ((HOSTENT FAR*)ws32_result = gethostbyaddr(a,l,t)) ? \
+	(errno = WSAGetLastError()), NULL : (HOSTENT FAR*)ws32_result)
+
 #elif defined(__APPLE__)
 #define _SQUID_APPLE_
 
Index: squid/include/config.h.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/config.h.in,v
retrieving revision 1.1.1.3.4.1.2.5
retrieving revision 1.1.1.3.4.1.2.5.2.1
diff -u -r1.1.1.3.4.1.2.5 -r1.1.1.3.4.1.2.5.2.1
--- squid/include/config.h.in	15 Jul 2001 16:58:37 -0000	1.1.1.3.4.1.2.5
+++ squid/include/config.h.in	27 Aug 2001 21:48:17 -0000	1.1.1.3.4.1.2.5.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h.in,v 1.1.1.3.4.1.2.5 2001/07/15 16:58:37 serassio Exp $
+ * $Id: config.h.in,v 1.1.1.3.4.1.2.5.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Duane Wessels
  *
Index: squid/include/crypt.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/crypt.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/include/crypt.h	6 Jan 2001 12:48:45 -0000	1.1.2.1
+++ squid/include/crypt.h	27 Aug 2001 21:48:17 -0000	1.1.2.1.2.1
@@ -26,20 +26,20 @@
 
 
 #ifdef WIN32
-void encrypt(char *block, int edflag);
-void setkey(char *key);
-char * crypt(const char *key, const char *salt);
+    void encrypt(char *block, int edflag);
+    void setkey(char *key);
+    char *crypt(const char *key, const char *salt);
 
 #else
 #include <_ansi.h>
 
-void _EXFUN(encrypt, (char *block, int edflag));
-void _EXFUN(setkey, (char *key));
-char * _EXFUN(crypt, (const char *key, const char *salt));
+    void _EXFUN(encrypt, (char *block, int edflag));
+    void _EXFUN(setkey, (char *key));
+    char *_EXFUN(crypt, (const char *key, const char *salt));
 #endif
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _ENCRYPT_H_ */
+#endif				/* _ENCRYPT_H_ */
Index: squid/include/getopt.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/getopt.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/include/getopt.h	14 Jun 2001 20:36:15 -0000	1.1.2.1
+++ squid/include/getopt.h	27 Aug 2001 21:48:17 -0000	1.1.2.1.2.1
@@ -66,8 +66,8 @@
 extern int optind;
 extern int opterr;
 extern int optopt;
-int getopt(int argc, char* const *argv, const char *optstr);
+int getopt(int argc, char *const *argv, const char *optstr);
 
 #endif /* WIN32 */
 
-#endif /* GETOPT_H */
\ No newline at end of file
+#endif /* GETOPT_H */
Index: squid/include/hash.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/hash.h,v
retrieving revision 1.1.1.1.42.1
retrieving revision 1.1.1.1.42.1.2.1
diff -u -r1.1.1.1.42.1 -r1.1.1.1.42.1.2.1
--- squid/include/hash.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.42.1
+++ squid/include/hash.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.42.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: hash.h,v 1.1.1.1.42.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: hash.h,v 1.1.1.1.42.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 typedef void HASHFREE(void *);
@@ -8,12 +8,14 @@
 typedef struct _hash_link hash_link;
 typedef struct _hash_table hash_table;
 
-struct _hash_link {
+struct _hash_link
+{
     char *key;
     hash_link *next;
 };
 
-struct _hash_table {
+struct _hash_table
+{
     hash_link **buckets;
     HASHCMP *cmp;
     HASHHASH *hash;
@@ -54,4 +56,4 @@
  *  HASH_SIZE 33493             // prime number < 32768
  *  HASH_SIZE 65357             // prime number < 65536
  */
-#define  DEFAULT_HASH_SIZE 7951 /* prime number < 8192 */
+#define  DEFAULT_HASH_SIZE 7951	/* prime number < 8192 */
Index: squid/include/heap.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/heap.h,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.1.2.1
diff -u -r1.1.1.1.2.1 -r1.1.1.1.2.1.2.1
--- squid/include/heap.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.2.1
+++ squid/include/heap.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: heap.h,v 1.1.1.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: heap.h,v 1.1.1.1.2.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
@@ -57,11 +57,13 @@
  * it can be quickly found in its heap, and a pointer to a data object that
  * key_func can generate a key from.
  */
-typedef struct _heap_node {
+typedef struct _heap_node
+{
     heap_key key;
     unsigned long id;
     heap_t data;
-} heap_node;
+}
+heap_node;
 
 
 /*
@@ -69,14 +71,16 @@
  * (array length), the index of the last heap element, and a key generation
  * function.  Also stores aging factor for this heap.
  */
-typedef struct _heap {
+typedef struct _heap
+{
     heap_mutex_t lock;
     unsigned long size;
     unsigned long last;
     heap_key_func *gen_key;	/* key generator for heap */
     heap_key age;		/* aging factor for heap */
     heap_node **nodes;
-} heap;
+}
+heap;
 
 /****************************************************************************
  * Public functions
Index: squid/include/md5.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/md5.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/md5.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/md5.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: md5.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: md5.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef MD5_H
@@ -30,11 +30,13 @@
  */
 
 /* MD5 context. */
-typedef struct {
+typedef struct
+{
     u_num32 state[4];		/* state (ABCD) */
     u_num32 count[2];		/* number of bits, modulo 2^64 (lsb first) */
     unsigned char buffer[64];	/* input buffer */
-} MD5_CTX;
+}
+MD5_CTX;
 
 void MD5Init(MD5_CTX *);
 void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
Index: squid/include/parse.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/parse.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/parse.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/parse.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: parse.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: parse.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef _HAVE_PARSE_H_
@@ -33,7 +33,8 @@
 /*
  * A linked list of tag-value pairs for enumerated integers.
  */
-struct enum_list {
+struct enum_list
+{
     struct enum_list *next;
     int value;
     char *label;
@@ -42,7 +43,8 @@
 /*
  * A tree in the format of the tree structure of the MIB.
  */
-struct snmp_mib_tree {
+struct snmp_mib_tree
+{
     struct snmp_mib_tree *child_list;	/* list of children of this node */
     struct snmp_mib_tree *next_peer;	/* Next node in list of peers */
     struct snmp_mib_tree *parent;
@@ -67,7 +69,8 @@
 #define TYPE_NULL	    10
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     void init_mib(char *);
Index: squid/include/radix.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/radix.h,v
retrieving revision 1.1.1.1.42.2
retrieving revision 1.1.1.1.42.2.2.1
diff -u -r1.1.1.1.42.2 -r1.1.1.1.42.2.2.1
--- squid/include/radix.h	25 Mar 2001 17:49:42 -0000	1.1.1.1.42.2
+++ squid/include/radix.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.42.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: radix.h,v 1.1.1.1.42.2 2001/03/25 17:49:42 serassio Exp $
+ * $Id: radix.h,v 1.1.1.1.42.2.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 /*
@@ -47,27 +47,34 @@
  * Radix search tree node layout.
  */
 
-struct radix_node {
+struct radix_node
+{
     struct radix_mask *rn_mklist;	/* list of masks contained in subtree */
     struct radix_node *rn_p;	/* parent */
     short rn_b;			/* bit offset; -1-index(netmask) */
     char rn_bmask;		/* node: mask for bit test */
-    unsigned char rn_flags;		/* enumerated next */
+    unsigned char rn_flags;	/* enumerated next */
 #define RNF_NORMAL	1	/* leaf contains normal route */
 #define RNF_ROOT	2	/* leaf is root leaf for tree */
 #define RNF_ACTIVE	4	/* This node is alive (for rtfree) */
-    union {
-	struct {		/* leaf only data: */
-	    char * rn_Key;	/* object of search */
-	    char * rn_Mask;	/* netmask, if present */
+    union
+    {
+	struct
+	{			/* leaf only data: */
+	    char *rn_Key;	/* object of search */
+	    char *rn_Mask;	/* netmask, if present */
 	    struct radix_node *rn_Dupedkey;
-	} rn_leaf;
-	struct {		/* node only data: */
+	}
+	rn_leaf;
+	struct
+	{			/* node only data: */
 	    int rn_Off;		/* where to start compare */
 	    struct radix_node *rn_L;	/* progeny */
 	    struct radix_node *rn_R;	/* progeny */
-	} rn_node;
-    } rn_u;
+	}
+	rn_node;
+    }
+    rn_u;
 #ifdef RN_DEBUG
     int rn_info;
     struct radix_node *rn_twin;
@@ -86,17 +93,21 @@
  * Annotations to tree concerning potential routes applying to subtrees.
  */
 
-extern struct radix_mask {
+extern struct radix_mask
+{
     short rm_b;			/* bit offset; -1-index(netmask) */
     char rm_unused;		/* cf. rn_bmask */
-    unsigned char rm_flags;		/* cf. rn_flags */
+    unsigned char rm_flags;	/* cf. rn_flags */
     struct radix_mask *rm_mklist;	/* more masks to try */
-    union {
-	char * rmu_mask;	/* the mask */
+    union
+    {
+	char *rmu_mask;		/* the mask */
 	struct radix_node *rmu_leaf;	/* for normal routes */
-    } rm_rmu;
+    }
+    rm_rmu;
     int rm_refs;		/* # of references to this struct */
-}         *rn_mkfreelist;
+}
+          *rn_mkfreelist;
 
 #define rm_mask rm_rmu.rmu_mask
 #define rm_leaf rm_rmu.rmu_leaf	/* extra field would make 32 bytes */
@@ -110,7 +121,8 @@
 
 #define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
 
-struct radix_node_head {
+struct radix_node_head
+{
     struct radix_node *rnh_treetop;
     int rnh_addrsize;		/* permit, but not require fixed keys */
     int rnh_pktsize;		/* permit, but not require fixed keys */
@@ -124,7 +136,7 @@
                __P((void *v, void *mask, struct radix_node_head * head));
     struct radix_node *(*rnh_delpkt)	/* remove based on packet hdr */
                __P((void *v, void *mask, struct radix_node_head * head));
-    struct radix_node *(*rnh_matchaddr)		/* locate based on sockaddr */
+    struct radix_node *(*rnh_matchaddr)	/* locate based on sockaddr */
                __P((void *v, struct radix_node_head * head));
     struct radix_node *(*rnh_lookup)	/* locate based on sockaddr */
                __P((void *v, void *mask, struct radix_node_head * head));
@@ -147,12 +159,14 @@
 int rn_refines __P((void *, void *));
 int rn_walktree __P((struct radix_node_head *, int (*)(), void *));
 struct radix_node
-          *rn_addmask __P((void *, int, int)), *rn_addroute __P((void *, void *, struct radix_node_head *,
-	struct radix_node[2])), *rn_delete __P((void *, void *, struct radix_node_head *)),
-          *rn_insert __P((void *, struct radix_node_head *, int *,
-	struct radix_node[2])), *rn_match __P((void *, struct radix_node_head *)),
-          *rn_newpair __P((void *, int, struct radix_node[2])), *rn_search __P((void *, struct radix_node *)),
-          *rn_search_m __P((void *, struct radix_node *, void *));
+    *rn_addmask __P((void *, int, int)), *rn_addroute __P((void *, void *,
+	struct radix_node_head *, struct radix_node[2])),
+    *rn_delete __P((void *, void *, struct radix_node_head *)),
+    *rn_insert __P((void *, struct radix_node_head *, int *,
+	struct radix_node[2])), *rn_match __P((void *,
+	struct radix_node_head *)), *rn_newpair __P((void *, int,
+	struct radix_node[2])), *rn_search __P((void *, struct radix_node *)),
+    *rn_search_m __P((void *, struct radix_node *, void *));
 
 #ifndef min
 #define min(x,y) ((x)<(y)? (x) : (y))
Index: squid/include/rfc1035.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/rfc1035.h,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/include/rfc1035.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.4.1.2.1
+++ squid/include/rfc1035.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1035.h,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: rfc1035.h,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Harvest Derived
  *
@@ -44,7 +44,8 @@
 /* rfc1035 - DNS */
 #define RFC1035_MAXHOSTNAMESZ 128
 typedef struct _rfc1035_rr rfc1035_rr;
-struct _rfc1035_rr {
+struct _rfc1035_rr
+{
     char name[RFC1035_MAXHOSTNAMESZ];
     unsigned short type;
     unsigned short class;
@@ -53,16 +54,12 @@
     char *rdata;
 };
 extern unsigned short rfc1035BuildAQuery(const char *hostname,
-    char *buf,
-    size_t * szp);
+    char *buf, size_t * szp);
 extern unsigned short rfc1035BuildPTRQuery(const struct in_addr,
-    char *buf,
-    size_t * szp);
+    char *buf, size_t * szp);
 extern unsigned short rfc1035RetryQuery(char *);
 extern int rfc1035AnswersUnpack(const char *buf,
-    size_t sz,
-    rfc1035_rr ** records,
-    unsigned short *id);
+    size_t sz, rfc1035_rr ** records, unsigned short *id);
 extern void rfc1035RRDestroy(rfc1035_rr * rr, int n);
 extern int rfc1035_errno;
 extern const char *rfc1035_error_message;
Index: squid/include/snmp.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,6 +1,5 @@
 #ifndef _SNMP_H_
 #define _SNMP_H_
-
 /*
  * Definitions for the Simple Network Management Protocol (RFC 1067).
  *
@@ -27,7 +26,7 @@
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  * 
- * $Id: snmp.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
Index: squid/include/snmp_api.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_api.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_api.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_api.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snmp_api.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_api.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef _SNMP_API_H_
@@ -52,21 +52,20 @@
 #define SNMP_DEFAULT_MACREPEATERS   0
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     /* Parse the buffer pointed to by arg3, of length arg4, into pdu arg2.
      *
      * Returns the community of the incoming PDU, or NULL
      */
-    u_char *snmp_parse(struct snmp_session *, struct snmp_pdu *,
-	u_char *, int);
+    u_char *snmp_parse(struct snmp_session *, struct snmp_pdu *, u_char *, int);
 
 /* Encode pdu arg2 into buffer arg3.  arg4 contains the size of
  * the buffer.
  */
-    int snmp_build(struct snmp_session *, struct snmp_pdu *,
-	u_char *, int *);
+    int snmp_build(struct snmp_session *, struct snmp_pdu *, u_char *, int *);
 
 /*
  * struct snmp_session *snmp_open(session)
Index: squid/include/snmp_api_error.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_api_error.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_api_error.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_api_error.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -26,7 +26,7 @@
  * 
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
  * 
- * $Id: snmp_api_error.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_api_error.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  ***************************************************************************/
 
@@ -52,7 +52,8 @@
 #define SNMPERR_LAST            -16	/* Last error message */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
 /* extern int snmp_errno */
Index: squid/include/snmp_api_util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_api_util.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_api_util.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_api_util.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snmp_api_util.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_api_util.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef _SNMP_API_UTIL_H_
@@ -37,7 +37,8 @@
 /*
  * A list of all the outstanding requests for a particular session.
  */
-struct request_list {
+struct request_list
+{
     struct request_list *next_request;
     int request_id;		/* request id */
     int retries;		/* Number of retries */
@@ -50,13 +51,15 @@
 /*
  * The list of active/open sessions.
  */
-struct session_list {
+struct session_list
+{
     struct session_list *next;
     struct snmp_session *session;
     struct snmp_internal_session *internal;
 };
 
-struct snmp_internal_session {
+struct snmp_internal_session
+{
     int sd;			/* socket descriptor for this connection */
     ipaddr addr;		/* address of connected peer */
     struct request_list *requests;	/* Info about outstanding requests */
@@ -83,11 +86,13 @@
 #endif /* HAVE_SRAND */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     int snmp_get_socket_session(struct snmp_session *session_);
-    int snmp_select_info_session(struct snmp_session *session_, struct timeval *timeout);
+    int snmp_select_info_session(struct snmp_session *session_,
+	struct timeval *timeout);
     int snmp_timeout_session(struct snmp_session *sp_);
 
 #ifdef __cplusplus
Index: squid/include/snmp_client.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_client.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_client.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_client.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snmp_client.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_client.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef _SNMP_CLIENT_H_
@@ -29,8 +29,9 @@
 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 SOFTWARE.
 ******************************************************************/
-struct synch_state {
-    int	waiting;
+struct synch_state
+{
+    int waiting;
     int status;
 /* status codes */
 #define STAT_SUCCESS	0
@@ -41,25 +42,25 @@
 };
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-extern struct synch_state snmp_synch_state;
+    extern struct synch_state snmp_synch_state;
 
 /* Synchronize Input with Agent */
-int  snmp_synch_input(int, struct snmp_session *, int,
-		     struct snmp_pdu *, void *);
+    int snmp_synch_input(int, struct snmp_session *, int,
+	struct snmp_pdu *, void *);
 
 /* Synchronize Response with Agent */
-int  snmp_synch_response(struct snmp_session *, struct snmp_pdu *, 
-			struct snmp_pdu **);
+    int snmp_synch_response(struct snmp_session *, struct snmp_pdu *,
+	struct snmp_pdu **);
 
 /* Synchronize Setup */
-void snmp_synch_setup(struct snmp_session *);
+    void snmp_synch_setup(struct snmp_session *);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _SNMP_CLIENT_H_ */
-
+#endif				/* _SNMP_CLIENT_H_ */
Index: squid/include/snmp_coexist.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_coexist.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_coexist.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_coexist.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -26,12 +26,13 @@
  * 
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
  * 
- * $Id: snmp_coexist.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_coexist.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     int snmp_coexist_V2toV1(struct snmp_pdu *);
Index: squid/include/snmp_debug.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_debug.h,v
retrieving revision 1.1.1.2.44.1
retrieving revision 1.1.1.2.44.1.2.1
diff -u -r1.1.1.2.44.1 -r1.1.1.2.44.1.2.1
--- squid/include/snmp_debug.h	6 Jan 2001 12:40:10 -0000	1.1.1.2.44.1
+++ squid/include/snmp_debug.h	27 Aug 2001 21:48:17 -0000	1.1.1.2.44.1.2.1
@@ -1,12 +1,12 @@
 /*
- * $Id: snmp_debug.h,v 1.1.1.2.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_debug.h,v 1.1.1.2.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef SNMP_DEBUG_H
 #define SNMP_DEBUG_H
 
 #if STDC_HEADERS
-extern void snmplib_debug(int, char *,...);
+extern void snmplib_debug(int, char *, ...);
 #else
 extern void snmplib_debug(va_alist);
 #endif
Index: squid/include/snmp_error.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_error.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_error.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_error.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -24,7 +24,7 @@
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  * 
- * $Id: snmp_error.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_error.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
@@ -56,7 +56,8 @@
 
 #ifdef __cplusplus
 
-extern "C" {
+extern "C"
+{
 #endif
 
     char *snmp_errstring(int);
Index: squid/include/snmp_impl.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_impl.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_impl.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_impl.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snmp_impl.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_impl.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef _SNMP_IMPL_H_
@@ -85,7 +85,8 @@
 #define NULLOBJ	    ASN_NULL
 #endif
 
-struct trapVar {
+struct trapVar
+{
     oid *varName;
     int varNameLen;
     u_char varType;
Index: squid/include/snmp_msg.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_msg.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_msg.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_msg.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -26,7 +26,7 @@
  * 
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
  * 
- * $Id: snmp_msg.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_msg.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
@@ -34,7 +34,8 @@
 #define SNMP_VERSION_2	    1	/* RFC 1901 */
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     u_char *snmp_msg_Encode(u_char *, int *, u_char *,
Index: squid/include/snmp_pdu.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_pdu.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_pdu.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_pdu.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,4 +1,3 @@
-
 /* -*- c++ -*- */
 #ifndef _SNMP_PDU_H_
 #define _SNMP_PDU_H_
@@ -27,14 +26,15 @@
  * 
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
  * 
- * $Id: snmp_pdu.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_pdu.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
 typedef struct sockaddr_in ipaddr;
 
 /* An SNMP PDU */
-struct snmp_pdu {
+struct snmp_pdu
+{
     int command;		/* Type of this PDU */
     ipaddr address;		/* Address of peer */
 
@@ -58,7 +58,8 @@
 };
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     struct snmp_pdu *snmp_pdu_create(int);
Index: squid/include/snmp_session.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_session.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_session.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_session.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -24,11 +24,12 @@
  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  * SOFTWARE.
  * 
- * $Id: snmp_session.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_session.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
-struct snmp_session {
+struct snmp_session
+{
     int Version;		/* SNMP Version for this session */
 
 
Index: squid/include/snmp_util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_util.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snmp_util.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snmp_util.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snmp_util.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_util.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #ifndef SNMP_UTIL_H
@@ -31,41 +31,35 @@
  * ** Function to safely copy a string, and ensure the last
  * ** character is always '\0'.
  */
-void
-     strcpy_safe(char *str, int str_len, char *val);
+void strcpy_safe(char *str, int str_len, char *val);
 
 
 /*
  * ** Function to get IP address of this agent
  * ** WARNING: this scans all interfaces (slow)
  */
-u_long
-Util_local_ip_address(void);
+u_long Util_local_ip_address(void);
 
 /*
  * ** Function to get the current time in seconds
  */
-long
-     Util_time_now(void);
+long Util_time_now(void);
 
 /*
  * ** Function to determine how long the agent has been running
  * *  (WARNING: this seems rather slow)
  */
-long
-     Util_time_running();
+long Util_time_running();
 
 /*
  * ** Read data from file
  */
-int
-    Util_file_read(char *file, int offset, char *data, int dataSz);
+int Util_file_read(char *file, int offset, char *data, int dataSz);
 
 /*
  * ** Write data into file
  */
-int
-    Util_file_write(char *file, int offset, char *data, int dataSz);
+int Util_file_write(char *file, int offset, char *data, int dataSz);
 
 
 /* ---------------------------------------------------------------------- */
Index: squid/include/snmp_vars.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snmp_vars.h,v
retrieving revision 1.1.1.2.30.1
retrieving revision 1.1.1.2.30.1.2.1
diff -u -r1.1.1.2.30.1 -r1.1.1.2.30.1.2.1
--- squid/include/snmp_vars.h	6 Jan 2001 12:40:10 -0000	1.1.1.2.30.1
+++ squid/include/snmp_vars.h	27 Aug 2001 21:48:17 -0000	1.1.1.2.30.1.2.1
@@ -26,25 +26,29 @@
  * 
  * Author: Ryan Troll <ryan+@andrew.cmu.edu>
  * 
- * $Id: snmp_vars.h,v 1.1.1.2.30.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snmp_vars.h,v 1.1.1.2.30.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  * 
  **********************************************************************/
 
-struct variable_list {
+struct variable_list
+{
     struct variable_list *next_variable;	/* NULL for last variable */
     oid *name;			/* Object identifier of variable */
     int name_length;		/* number of subid's in name */
     u_char type;		/* ASN type of variable */
-    union {			/* value of variable */
+    union
+    {				/* value of variable */
 	int *integer;
 	u_char *string;
 	oid *objid;
-    } val;
+    }
+    val;
     int val_len;
 };
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
     struct variable_list *snmp_var_new(oid *, int);
@@ -52,17 +56,17 @@
     struct variable_list *snmp_var_clone(struct variable_list *);
     void snmp_var_free(struct variable_list *);
 
-    u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int);
-    u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
+    u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *,
+	int);
+    u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **,
+	int);
 
 #ifdef __cplusplus
 }
 
 #endif
 #define MAX_NAME_LEN	64	/* number of subid's in a objid *//*      *RFC 1902:Structure of Management Information for SNMPv2      *
-      *Defined Types
-*
-      */
+      *Defined Types * */
 #define SMI_INTEGER     ASN_INTEGER
 #define SMI_STRING      ASN_OCTET_STR
 #define SMI_OBJID       ASN_OBJECT_ID
Index: squid/include/snprintf.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/snprintf.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/snprintf.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/snprintf.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snprintf.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snprintf.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 /* if you have configure you can use this */
@@ -29,12 +29,10 @@
 XX **NO VARARGS ** XX
 #endif
 #endif
-
 /* you can have ANSI C definitions */
-
 #if !HAVE_SNPRINTF
 #ifdef HAVE_STDARGS
-int snprintf(char *str, size_t count, const char *fmt,...);
+int snprintf(char *str, size_t count, const char *fmt, ...);
 #else
 int snprintf();
 #endif
Index: squid/include/splay.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/splay.h,v
retrieving revision 1.1.1.2.2.1
retrieving revision 1.1.1.2.2.1.2.1
diff -u -r1.1.1.2.2.1 -r1.1.1.2.2.1.2.1
--- squid/include/splay.h	6 Jan 2001 12:40:10 -0000	1.1.1.2.2.1
+++ squid/include/splay.h	27 Aug 2001 21:48:17 -0000	1.1.1.2.2.1.2.1
@@ -1,13 +1,15 @@
 /*
- * $Id: splay.h,v 1.1.1.2.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: splay.h,v 1.1.1.2.2.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 
-typedef struct _splay_node {
+typedef struct _splay_node
+{
     void *data;
     struct _splay_node *left;
     struct _splay_node *right;
-} splayNode;
+}
+splayNode;
 
 typedef int SPLAYCMP(const void *a, const void *b);
 typedef void SPLAYWALKEE(void *nodedata, void *state);
Index: squid/include/tree.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/tree.h,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/include/tree.h	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/include/tree.h	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.1.2.1
@@ -3,18 +3,20 @@
  * vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes]
  * vix 27jun86 [broken out of tree.c]
  *
- * $Id: tree.h,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: tree.h,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 
 #ifndef	_TREE_H_INCLUDED
 #define	_TREE_H_INCLUDED
 
-typedef struct tree_s {
+typedef struct tree_s
+{
     void *data;
     struct tree_s *left, *right;
     int bal;
-} tree;
+}
+tree;
 
 typedef int BTREE_CMP(void *, void *);
 typedef int BTREE_UAR(void *);
Index: squid/include/util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/util.h,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/include/util.h	29 Jul 2001 09:10:27 -0000	1.1.1.3.4.1.2.3
+++ squid/include/util.h	27 Aug 2001 21:48:17 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.1.1.3.4.1.2.3 2001/07/29 09:10:27 serassio Exp $
+ * $Id: util.h,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Harvest Derived
  *
@@ -41,7 +41,7 @@
 #endif
 
 #if !defined(SQUIDHOSTNAMELEN)
-#ifndef _SQUID_MSWIN_
+#if !defined(_SQUID_MSWIN_)
 #include <sys/param.h>
 #ifndef _SQUID_NETDB_H_		/* need protection on NEXTSTEP */
 #define _SQUID_NETDB_H_
@@ -124,15 +124,15 @@
 double drand48(void);
 #endif
 
-/* CygWin & Windows NT Port */ 
+/* CygWin & Windows NT Port */
 /* win32lib.c */
 #ifdef _SQUID_MSWIN_
-extern int chroot (const char *);
+extern int chroot(const char *);
 extern int kill(pid_t, int);
-extern void gettimeofday(struct timeval * ,void *);
-int statfs(const char *, struct statfs *);
-int mkdir(const char *, mode_t);
-const char * wsastrerror(int);
+extern int gettimeofday(struct timeval *, void *);
+extern int statfs(const char *, struct statfs *);
+extern const char *wsastrerror(int err);
+extern int getopt(int argc, char *const *argv, const char *optstr);
 #endif
 
 #endif /* ndef _UTIL_H_ */
Index: squid/include/version.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/version.h,v
retrieving revision 1.1.1.3.4.4.2.4
retrieving revision 1.1.1.3.4.4.2.4.2.1
diff -u -r1.1.1.3.4.4.2.4 -r1.1.1.3.4.4.2.4.2.1
--- squid/include/version.h	29 Jul 2001 09:10:27 -0000	1.1.1.3.4.4.2.4
+++ squid/include/version.h	27 Aug 2001 21:48:17 -0000	1.1.1.3.4.4.2.4.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: version.h,v 1.1.1.3.4.4.2.4 2001/07/29 09:10:27 serassio Exp $
+ * $Id: version.h,v 1.1.1.3.4.4.2.4.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  *  SQUID_VERSION - String for version id of this distribution
  */
@@ -8,5 +8,5 @@
 #endif
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 996091670
+#define SQUID_RELEASE_TIME 997316167
 #endif
Index: squid/lib/Array.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Array.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/lib/Array.c	6 Jan 2001 12:40:10 -0000	1.1.1.2.4.1.2.1
+++ squid/lib/Array.c	27 Aug 2001 21:48:17 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Array.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: Array.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -55,7 +55,7 @@
 Array *
 arrayCreate()
 {
-    Array *a =(Array *) xmalloc(sizeof(Array));
+    Array *a = (Array *) xmalloc(sizeof(Array));
     arrayInit(a);
     return a;
 }
@@ -118,8 +118,8 @@
     assert(delta > 0);
     a->capacity += delta;
     a->items = a->items ?
-	(void**)xrealloc(a->items, a->capacity * sizeof(void *)) :
-         (void**)xmalloc(a->capacity * sizeof(void *));
+	(void **) xrealloc(a->items, a->capacity * sizeof(void *)) :
+	(void **) xmalloc(a->capacity * sizeof(void *));
     /* reset, just in case */
     memset(a->items + a->count, 0, (a->capacity - a->count) * sizeof(void *));
 }
Index: squid/lib/GNUregex.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/GNUregex.c,v
retrieving revision 1.1.1.1.42.1
retrieving revision 1.1.1.1.42.1.2.1
diff -u -r1.1.1.1.42.1 -r1.1.1.1.42.1.2.1
--- squid/lib/GNUregex.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.42.1
+++ squid/lib/GNUregex.c	27 Aug 2001 21:48:17 -0000	1.1.1.1.42.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: GNUregex.c,v 1.1.1.1.42.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: GNUregex.c,v 1.1.1.1.42.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 /* Extended regular expression matching and search library,
@@ -242,7 +242,8 @@
  * So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of
  * `exactn' we use here must also be 1.  */
 
-typedef enum {
+typedef enum
+{
     no_op = 0,
 
     /* Followed by one byte giving n, then by n literal bytes.  */
@@ -357,9 +358,8 @@
 
     wordbound,			/* Succeeds if at a word boundary.  */
     notwordbound		/* Succeeds if not at a word boundary.  */
-
 #ifdef emacs
-    ,before_dot,		/* Succeeds if before point.  */
+	, before_dot,		/* Succeeds if before point.  */
     at_dot,			/* Succeeds if at point.  */
     after_dot,			/* Succeeds if after point.  */
 
@@ -370,7 +370,8 @@
     /* Matches any character whose syntax is not that specified.  */
     notsyntaxspec
 #endif				/* emacs */
-} re_opcode_t;
+}
+re_opcode_t;
 
 /* Common operations on the compiled pattern.  */
 
@@ -786,7 +787,7 @@
 
 reg_syntax_t
 re_set_syntax(syntax)
-     reg_syntax_t syntax;
+reg_syntax_t syntax;
 {
     reg_syntax_t ret = re_syntax_options;
 
@@ -797,8 +798,7 @@
 /* This table gives an error message for each of the error codes listed
  * in regex.h.  Obviously the order here has to be same as there.  */
 
-static const char *re_error_msg[] =
-{NULL,				/* REG_NOERROR */
+static const char *re_error_msg[] = { NULL,	/* REG_NOERROR */
     "No match",			/* REG_NOMATCH */
     "Invalid regular expression",	/* REG_BADPAT */
     "Invalid collation character",	/* REG_ECOLLATE */
@@ -960,20 +960,24 @@
  * be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1.  */
 typedef int pattern_offset_t;
 
-typedef struct {
+typedef struct
+{
     pattern_offset_t begalt_offset;
     pattern_offset_t fixup_alt_jump;
     pattern_offset_t inner_group_offset;
     pattern_offset_t laststart_offset;
     regnum_t regnum;
-} compile_stack_elt_t;
+}
+compile_stack_elt_t;
 
 
-typedef struct {
+typedef struct
+{
     compile_stack_elt_t *stack;
     unsigned size;
     unsigned avail;		/* Offset of next open position.  */
-} compile_stack_type;
+}
+compile_stack_type;
 
 
 #define INIT_COMPILE_STACK_SIZE 32
@@ -1153,9 +1157,9 @@
 	    {
 		if (		/* If at start of pattern, it's an operator.  */
 		    p == pattern + 1
-		/* If context independent, it's an operator.  */
+		    /* If context independent, it's an operator.  */
 		    || syntax & RE_CONTEXT_INDEP_ANCHORS
-		/* Otherwise, depends on what's come before.  */
+		    /* Otherwise, depends on what's come before.  */
 		    || at_begline_loc_p(pattern, p, syntax))
 		    BUF_PUSH(begline);
 		else
@@ -1168,9 +1172,9 @@
 	    {
 		if (		/* If at end of pattern, it's an operator.  */
 		    p == pend
-		/* If context independent, it's an operator.  */
+		    /* If context independent, it's an operator.  */
 		    || syntax & RE_CONTEXT_INDEP_ANCHORS
-		/* Otherwise, depends on what's next.  */
+		    /* Otherwise, depends on what's next.  */
 		    || at_endline_loc_p(p, pend, syntax))
 		    BUF_PUSH(endline);
 		else
@@ -1214,7 +1218,8 @@
 		    PATFETCH(c);
 
 		    if (c == '*'
-			|| (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')));
+			|| (!(syntax & RE_BK_PLUS_QM) && (c == '+'
+		       || c == '?')));
 
 		    else if (syntax & RE_BK_PLUS_QM && c == '\\') {
 			if (p == pend)
@@ -1279,8 +1284,7 @@
 		 * end of the buffer after this jump is inserted.  */
 		GET_BUFFER_SPACE(3);
 		INSERT_JUMP(keep_string_p ? on_failure_keep_string_jump
-		    : on_failure_jump,
-		    laststart, b + 3);
+		    : on_failure_jump, laststart, b + 3);
 		pending_exact = 0;
 		b += 3;
 
@@ -1334,8 +1338,7 @@
 
 		/* charset_not matches newline according to a syntax bit.  */
 		if ((re_opcode_t) b[-2] == charset_not
-		    && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
-		    SET_LIST_BIT('\n');
+		    && (syntax & RE_HAT_LISTS_NOT_NEWLINE)) SET_LIST_BIT('\n');
 
 		/* Read in characters and ranges, setting map bits.  */
 		for (;;) {
@@ -1368,12 +1371,11 @@
 		     * was a character: if this is a hyphen not at the
 		     * beginning or the end of a list, then it's the range
 		     * operator.  */
-		    if (c == '-'
-			&& !(p - 2 >= pattern && p[-2] == '[')
+		    if (c == '-' && !(p - 2 >= pattern && p[-2] == '[')
 			&& !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
 			&& *p != ']') {
 			reg_errcode_t ret
-			= compile_range(&p, pend, translate, syntax, b);
+			    = compile_range(&p, pend, translate, syntax, b);
 			if (ret != REG_NOERROR)
 			    return ret;
 		    } else if (p[0] == '-' && p[1] != ']') {	/* This handles ranges made up of characters only.  */
@@ -1402,8 +1404,7 @@
 			for (;;) {
 			    PATFETCH(c);
 			    if (c == ':' || c == ']' || p == pend
-				|| c1 == CHAR_CLASS_MAX_LENGTH)
-				break;
+				|| c1 == CHAR_CLASS_MAX_LENGTH) break;
 			    str[c1++] = c;
 			}
 			str[c1] = '\0';
@@ -1611,7 +1612,8 @@
 			= COMPILE_STACK_TOP.fixup_alt_jump
 			? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
 			: 0;
-		    laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
+		    laststart =
+			bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
 		    this_group_regnum = COMPILE_STACK_TOP.regnum;
 		    /* If we've reached MAX_REGNUM groups, then this open
 		     * won't actually generate any code, so we'll have to
@@ -1622,7 +1624,8 @@
 		     * groups were inside this one.  */
 		    if (this_group_regnum <= MAX_REGNUM) {
 			unsigned char *inner_group_loc
-			= bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
+			    =
+			    bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
 
 			*inner_group_loc = regnum - this_group_regnum;
 			BUF_PUSH_3(stop_memory, this_group_regnum,
@@ -1680,8 +1683,8 @@
 	    case '{':
 		/* If \{ is a literal.  */
 		if (!(syntax & RE_INTERVALS)
-		/* If we're at `\{' and it's not the open-interval 
-		 * operator.  */
+		    /* If we're at `\{' and it's not the open-interval 
+		     * operator.  */
 		    || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
 		    || (p - 2 == pattern && p == pend))
 		    goto normal_backslash;
@@ -1770,8 +1773,7 @@
 			 * because `re_compile_fastmap' needs to know.
 			 * Jump to the `jump_n' we might insert below.  */
 			INSERT_JUMP2(succeed_n, laststart,
-			    b + 5 + (upper_bound > 1) * 5,
-			    lower_bound);
+			    b + 5 + (upper_bound > 1) * 5, lower_bound);
 			b += 5;
 
 			/* Code to initialize the lower bound.  Insert 
@@ -1937,22 +1939,17 @@
 	  normal_char:
 	    /* If no exactn currently being built.  */
 	    if (!pending_exact
-
-	    /* If last exactn not at current position.  */
+		/* If last exactn not at current position.  */
 		|| pending_exact + *pending_exact + 1 != b
-
-	    /* We have only one byte following the exactn for the count.  */
+		/* We have only one byte following the exactn for the count.  */
 		|| *pending_exact == (1 << BYTEWIDTH) - 1
-
-	    /* If followed by a repetition operator.  */
-		|| *p == '*' || *p == '^'
-		|| ((syntax & RE_BK_PLUS_QM)
+		/* If followed by a repetition operator.  */
+		|| *p == '*' || *p == '^' || ((syntax & RE_BK_PLUS_QM)
 		    ? *p == '\\' && (p[1] == '+' || p[1] == '?')
 		    : (*p == '+' || *p == '?'))
 		|| ((syntax & RE_INTERVALS)
 		    && ((syntax & RE_NO_BK_BRACES)
-			? *p == '{'
-			: (p[0] == '\\' && p[1] == '{')))) {
+			? *p == '{' : (p[0] == '\\' && p[1] == '{')))) {
 		/* Start building a new exactn.  */
 
 		laststart = b;
@@ -2071,9 +2068,9 @@
     boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
 
     return
-    /* After a subexpression?  */
+	/* After a subexpression?  */
 	(*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
-    /* After an alternative?  */
+	/* After an alternative?  */
 	|| (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
 }
 
@@ -2091,10 +2088,10 @@
     const char *next_next = p + 1 < pend ? p + 1 : NULL;
 
     return
-    /* Before a subexpression?  */
+	/* Before a subexpression?  */
 	(syntax & RE_NO_BK_PARENS ? *next == ')'
 	: next_backslash && next_next && *next_next == ')')
-    /* Before an alternative?  */
+	/* Before an alternative?  */
 	|| (syntax & RE_NO_BK_VBAR ? *next == '|'
 	: next_backslash && next_next && *next_next == '|');
 }
@@ -2111,8 +2108,7 @@
     int this_element;
 
     for (this_element = compile_stack.avail - 1;
-	this_element >= 0;
-	this_element--)
+	this_element >= 0; this_element--)
 	if (compile_stack.stack[this_element].regnum == regnum)
 	    return true;
 
@@ -2195,11 +2191,13 @@
 
 typedef const unsigned char *fail_stack_elt_t;
 
-typedef struct {
+typedef struct
+{
     fail_stack_elt_t *stack;
     unsigned size;
     unsigned avail;		/* Offset of next open position.  */
-} fail_stack_type;
+}
+fail_stack_type;
 
 #define FAIL_STACK_EMPTY()     (fail_stack.avail == 0)
 #define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
@@ -2491,7 +2489,7 @@
     assert(fastmap != NULL && p != NULL);
 
     INIT_FAIL_STACK();
-    memset(fastmap, 0, 1 << BYTEWIDTH);		/* Assume nothing's valid.  */
+    memset(fastmap, 0, 1 << BYTEWIDTH);	/* Assume nothing's valid.  */
     bufp->fastmap_accurate = 1;	/* It will be when we're done.  */
     bufp->can_be_null = 0;
 
@@ -2640,8 +2638,7 @@
 	     * ordinary jump.  For a * loop, it has pushed its failure
 	     * point already; if so, discard that as redundant.  */
 	    if ((re_opcode_t) * p != on_failure_jump
-		&& (re_opcode_t) * p != succeed_n)
-		continue;
+		&& (re_opcode_t) * p != succeed_n) continue;
 
 	    p++;
 	    EXTRACT_NUMBER_AND_INCR(j, p);
@@ -2855,8 +2852,7 @@
 		/* Written out as an if-else to avoid testing `translate'
 		 * inside the loop.  */
 		if (translate)
-		    while (range > lim
-			&& !fastmap[(unsigned char)
+		    while (range > lim && !fastmap[(unsigned char)
 			    translate[(unsigned char) *d++]])
 			range--;
 		else
@@ -2875,8 +2871,7 @@
 	}
 	/* If can't match the null string, and that's all we have left, fail.  */
 	if (range >= 0 && startpos == total_size && fastmap
-	    && !bufp->can_be_null)
-	    return -1;
+	    && !bufp->can_be_null) return -1;
 
 	val = re_match_2(bufp, string1, size1, string2, size2,
 	    startpos, regs, stop);
@@ -2904,7 +2899,7 @@
 
 static int bcmp_translate();
 static boolean alt_match_null_string_p(), common_op_match_null_string_p(),
-        group_match_null_string_p();
+group_match_null_string_p();
 
 /* Structure for per-register (a.k.a. per-group) information.
  * This must not be longer than one word, because we push this value
@@ -2917,9 +2912,11 @@
  * the compiler will pack our bit fields into something that fits into
  * the type of `word', i.e., is something that fits into one item on the
  * failure stack.  */
-typedef union {
+typedef union
+{
     fail_stack_elt_t word;
-    struct {
+    struct
+    {
 	/* This field is one if this group can match the empty string,
 	 * zero if not.  If not yet determined,  `MATCH_NULL_UNSET_VALUE'.  */
 #define MATCH_NULL_UNSET_VALUE 3
@@ -2927,8 +2924,10 @@
 	unsigned is_active:1;
 	unsigned matched_something:1;
 	unsigned ever_matched_something:1;
-    } bits;
-} register_info_type;
+    }
+    bits;
+}
+register_info_type;
 
 #define REG_MATCH_NULL_STRING_P(R)  ((R).bits.match_null_string_p)
 #define IS_ACTIVE(R)  ((R).bits.is_active)
@@ -3282,8 +3281,7 @@
 			== MATCHING_IN_FIRST_STRING);
 
 		    /* If exceeds best match so far, save it.  */
-		    if (!best_regs_set
-			|| (same_str_p && d > match_end)
+		    if (!best_regs_set || (same_str_p && d > match_end)
 			|| (!same_str_p && !MATCHING_IN_FIRST_STRING)) {
 			best_regs_set = true;
 			match_end = d;
@@ -3322,9 +3320,9 @@
 	    /* If caller wants register contents data back, do it.  */
 	    if (regs && !bufp->no_sub) {
 		/* Have the register data arrays been allocated?  */
-		if (bufp->regs_allocated == REGS_UNALLOCATED) {		/* No.  So allocate them with malloc.  We need one
-									 * extra element beyond `num_regs' for the `-1' marker
-									 * GNU code uses.  */
+		if (bufp->regs_allocated == REGS_UNALLOCATED) {	/* No.  So allocate them with malloc.  We need one
+								 * extra element beyond `num_regs' for the `-1' marker
+								 * GNU code uses.  */
 		    regs->num_regs = MAX(RE_NREGS, num_regs + 1);
 		    regs->start = TALLOC(regs->num_regs, regoff_t);
 		    regs->end = TALLOC(regs->num_regs, regoff_t);
@@ -3378,8 +3376,7 @@
 	    DEBUG_PRINT2("%u registers pushed.\n", num_regs_pushed);
 
 	    mcnt = d - pos - (MATCHING_IN_FIRST_STRING
-		? string1
-		: string2 - size1);
+		? string1 : string2 - size1);
 
 	    DEBUG_PRINT2("Returning %d from re_match_2.\n", mcnt);
 
@@ -3691,8 +3688,7 @@
 
 		    /* Compare that many; failure if mismatch, else move
 		     * past them.  */
-		    if (translate
-			? bcmp_translate(d, d2, mcnt, translate)
+		    if (translate ? bcmp_translate(d, d2, mcnt, translate)
 			: memcmp(d, d2, mcnt))
 			goto fail;
 		    d += mcnt, d2 += mcnt;
@@ -3850,7 +3846,7 @@
 		/* Skip over open/close-group commands.  */
 		while (p2 + 2 < pend
 		    && ((re_opcode_t) * p2 == stop_memory
-			|| (re_opcode_t) * p2 == start_memory))
+       || (re_opcode_t) * p2 == start_memory))
 		    p2 += 3;	/* Skip over args, too.  */
 
 		/* If we're at the end of the pattern, we can change.  */
@@ -3864,7 +3860,7 @@
 		} else if ((re_opcode_t) * p2 == exactn
 		    || (bufp->newline_anchor && (re_opcode_t) * p2 == endline)) {
 		    register unsigned char c
-		    = *p2 == (unsigned char) endline ? '\n' : p2[2];
+			= *p2 == (unsigned char) endline ? '\n' : p2[2];
 		    p1 = p + mcnt;
 
 		    /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
@@ -3981,7 +3977,8 @@
 		STORE_NUMBER_AND_INCR(p, mcnt);
 		DEBUG_PRINT3("  Setting 0x%x to %d.\n", p, mcnt);
 	    } else if (mcnt == 0) {
-		DEBUG_PRINT2("  Setting two bytes from 0x%x to no_op.\n", p + 2);
+		DEBUG_PRINT2("  Setting two bytes from 0x%x to no_op.\n",
+		    p + 2);
 		p[2] = (unsigned char) no_op;
 		p[3] = (unsigned char) no_op;
 		goto on_failure;
@@ -4155,7 +4152,7 @@
 		    if ((is_a_jump_n && (re_opcode_t) * p1 == succeed_n)
 			|| (!is_a_jump_n
 			    && (re_opcode_t) * p1 == on_failure_jump))
-			goto fail;
+			    goto fail;
 		    break;
 		default:
 		    /* do nothing */ ;
@@ -4235,8 +4232,7 @@
 		     * is, including the ending `jump_past_alt' and
 		     * its number.  */
 
-		    if (!alt_match_null_string_p(p1, p1 + mcnt - 3,
-			    reg_info))
+		    if (!alt_match_null_string_p(p1, p1 + mcnt - 3, reg_info))
 			return false;
 
 		    /* Move to right after this alternative, including the
@@ -4562,8 +4558,8 @@
 {
     reg_errcode_t ret;
     unsigned syntax
-    = (cflags & REG_EXTENDED) ?
-    RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
+	= (cflags & REG_EXTENDED) ?
+	RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
 
     /* regex_compile will allocate the space for the compiled pattern.  */
     preg->buffer = 0;
@@ -4689,7 +4685,7 @@
      int errcode;
      const regex_t *preg;
      char *errbuf;
-     size_t errbuf_size;
+size_t errbuf_size;
 {
     const char *msg;
     size_t msg_size;
Index: squid/lib/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Attic/Makefile.in,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/lib/Makefile.in	6 Jan 2001 12:40:10 -0000	1.1.1.2.4.1.2.1
+++ squid/lib/Makefile.in	27 Aug 2001 21:48:17 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 #
-#  $Id: Makefile.in,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:17 tolsty Exp $
 #
 prefix		= @prefix@
 top_srcdir	= @top_srcdir@
Index: squid/lib/base64.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/base64.c,v
retrieving revision 1.1.1.1.40.1
retrieving revision 1.1.1.1.40.1.2.1
diff -u -r1.1.1.1.40.1 -r1.1.1.1.40.1.2.1
--- squid/lib/base64.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.40.1
+++ squid/lib/base64.c	27 Aug 2001 21:48:17 -0000	1.1.1.1.40.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: base64.c,v 1.1.1.1.40.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: base64.c,v 1.1.1.1.40.1.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 #include "config.h"
@@ -17,7 +17,8 @@
 #define BASE64_VALUE_SZ 256
 #define BASE64_RESULT_SZ 8192
 int base64_value[BASE64_VALUE_SZ];
-const char base64_code[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+const char base64_code[] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 
 static void
Index: squid/lib/dlmalloc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/dlmalloc.c,v
retrieving revision 1.1.1.1.44.2
retrieving revision 1.1.1.1.44.2.2.1
diff -u -r1.1.1.1.44.2 -r1.1.1.1.44.2.2.1
--- squid/lib/dlmalloc.c	14 Jun 2001 21:34:24 -0000	1.1.1.1.44.2
+++ squid/lib/dlmalloc.c	27 Aug 2001 21:48:17 -0000	1.1.1.1.44.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: dlmalloc.c,v 1.1.1.1.44.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: dlmalloc.c,v 1.1.1.1.44.2.2.1 2001/08/27 21:48:17 tolsty Exp $
  */
 
 /* ---------- To make a malloc.h, start cutting here ------------ */
@@ -214,10 +214,10 @@
 
 
 */
-
 
 
 
+
 /* Preliminaries */
 
 #ifndef __STD_C
@@ -238,19 +238,20 @@
 #else
 #define Void_t      char
 #endif
-#endif /*Void_t*/
+#endif /*Void_t */
 
 #if __STD_C
-#include <stddef.h>   /* for size_t */
+#include <stddef.h>		/* for size_t */
 #else
 #include <sys/types.h>
 #endif
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-#include <stdio.h>    /* needed for malloc_stats */
+#include <stdio.h>		/* needed for malloc_stats */
 
 
 /*
@@ -282,7 +283,7 @@
 
 */
 
-#if DEBUG 
+#if DEBUG
 #include <assert.h>
 #else
 #define assert(x) ((void)0)
@@ -338,7 +339,7 @@
 
 */
 
-#define HAVE_MEMCPY 
+#define HAVE_MEMCPY
 
 #ifndef USE_MEMCPY
 #ifdef HAVE_MEMCPY
@@ -348,14 +349,14 @@
 #endif
 #endif
 
-#if (__STD_C || defined(HAVE_MEMCPY)) 
+#if (__STD_C || defined(HAVE_MEMCPY))
 
 #if __STD_C
-void* memset(void*, int, size_t);
-void* memcpy(void*, const void*, size_t);
+    void *memset(void *, int, size_t);
+    void *memcpy(void *, const void *, size_t);
 #else
-Void_t* memset();
-Void_t* memcpy();
+    Void_t *memset();
+    Void_t *memcpy();
 #endif
 #endif
 
@@ -400,7 +401,7 @@
   } else memcpy(dest, src, mcsz);                                             \
 } while(0)
 
-#else /* !USE_MEMCPY */
+#else				/* !USE_MEMCPY */
 
 /* Use Duff's device for good zeroing/copying performance. */
 
@@ -476,7 +477,7 @@
 #define MAP_ANONYMOUS MAP_ANON
 #endif
 
-#endif /* HAVE_MMAP */
+#endif				/* HAVE_MMAP */
 
 /*
   Access to system page size. To the extent possible, this malloc
@@ -491,7 +492,7 @@
 #endif
 
 #ifndef malloc_getpagesize
-#  ifdef _SC_PAGESIZE         /* some SVR4 systems omit an underscore */
+#  ifdef _SC_PAGESIZE		/* some SVR4 systems omit an underscore */
 #    ifndef _SC_PAGE_SIZE
 #      define _SC_PAGE_SIZE _SC_PAGESIZE
 #    endif
@@ -500,7 +501,7 @@
 #    define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
 #  else
 #    if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
-       extern size_t getpagesize();
+    extern size_t getpagesize();
 #      define malloc_getpagesize getpagesize()
 #    else
 #      include <sys/param.h>
@@ -513,19 +514,19 @@
 #          else
 #            define malloc_getpagesize (NBPG * CLSIZE)
 #          endif
-#        else 
+#        else
 #          ifdef NBPC
 #            define malloc_getpagesize NBPC
 #          else
 #            ifdef PAGESIZE
 #              define malloc_getpagesize PAGESIZE
 #            else
-#              define malloc_getpagesize (4096) /* just guess */
+#              define malloc_getpagesize (4096)	/* just guess */
 #            endif
 #          endif
-#        endif 
+#        endif
 #      endif
-#    endif 
+#    endif
 #  endif
 #endif
 
@@ -564,25 +565,26 @@
 
 /* SVID2/XPG mallinfo structure */
 
-struct mallinfo {
-  int arena;    /* total space allocated from system */
-  int ordblks;  /* number of non-inuse chunks */
-  int smblks;   /* unused -- always zero */
-  int hblks;    /* number of mmapped regions */
-  int hblkhd;   /* total space in mmapped regions */
-  int usmblks;  /* unused -- always zero */
-  int fsmblks;  /* unused -- always zero */
-  int uordblks; /* total allocated space */
-  int fordblks; /* total non-inuse space */
-  int keepcost; /* top-most, releasable (via malloc_trim) space */
-};	
+    struct mallinfo
+    {
+	int arena;		/* total space allocated from system */
+	int ordblks;		/* number of non-inuse chunks */
+	int smblks;		/* unused -- always zero */
+	int hblks;		/* number of mmapped regions */
+	int hblkhd;		/* total space in mmapped regions */
+	int usmblks;		/* unused -- always zero */
+	int fsmblks;		/* unused -- always zero */
+	int uordblks;		/* total allocated space */
+	int fordblks;		/* total non-inuse space */
+	int keepcost;		/* top-most, releasable (via malloc_trim) space */
+    };
 
 /* SVID2/XPG mallopt options */
 
-#define M_MXFAST  1    /* UNUSED in this malloc */
-#define M_NLBLKS  2    /* UNUSED in this malloc */
-#define M_GRAIN   3    /* UNUSED in this malloc */
-#define M_KEEP    4    /* UNUSED in this malloc */
+#define M_MXFAST  1		/* UNUSED in this malloc */
+#define M_NLBLKS  2		/* UNUSED in this malloc */
+#define M_GRAIN   3		/* UNUSED in this malloc */
+#define M_KEEP    4		/* UNUSED in this malloc */
 
 #endif
 
@@ -776,26 +778,26 @@
 
 #if __STD_C
 
-Void_t * __default_morecore_init (ptrdiff_t);
-Void_t *(*__morecore)(ptrdiff_t) = __default_morecore_init;
+    Void_t *__default_morecore_init(ptrdiff_t);
+    Void_t *(*__morecore) (ptrdiff_t) = __default_morecore_init;
 
 #else
 
-Void_t * __default_morecore_init ();
-Void_t *(*__morecore)() = __default_morecore_init;
+    Void_t *__default_morecore_init();
+    Void_t *(*__morecore) () = __default_morecore_init;
 
 #endif
 
 #define MORECORE (*__morecore)
 #define MORECORE_FAILURE 0
-#define MORECORE_CLEARS 1 
+#define MORECORE_CLEARS 1
 
-#else /* INTERNAL_LINUX_C_LIB */
+#else				/* INTERNAL_LINUX_C_LIB */
 
 #if __STD_C
-extern Void_t*     sbrk(ptrdiff_t);
+    extern Void_t *sbrk(ptrdiff_t);
 #else
-extern Void_t*     sbrk();
+    extern Void_t *sbrk();
 #endif
 
 #ifndef MORECORE
@@ -810,7 +812,7 @@
 #define MORECORE_CLEARS 1
 #endif
 
-#endif /* INTERNAL_LINUX_C_LIB */
+#endif				/* INTERNAL_LINUX_C_LIB */
 
 #if defined(INTERNAL_LINUX_C_LIB) && defined(__ELF__)
 
@@ -854,38 +856,38 @@
 
 #if __STD_C
 
-Void_t* mALLOc(size_t);
-void    fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-Void_t* cALLOc(size_t, size_t);
-void    cfree(Void_t*);
-int     malloc_trim(size_t);
-size_t  malloc_usable_size(Void_t*);
-void    malloc_stats();
-int     mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-#else
-Void_t* mALLOc();
-void    fREe();
-Void_t* rEALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-Void_t* cALLOc();
-void    cfree();
-int     malloc_trim();
-size_t  malloc_usable_size();
-void    malloc_stats();
-int     mALLOPt();
-struct mallinfo mALLINFo();
+    Void_t *mALLOc(size_t);
+    void fREe(Void_t *);
+    Void_t *rEALLOc(Void_t *, size_t);
+    Void_t *mEMALIGn(size_t, size_t);
+    Void_t *vALLOc(size_t);
+    Void_t *pvALLOc(size_t);
+    Void_t *cALLOc(size_t, size_t);
+    void cfree(Void_t *);
+    int malloc_trim(size_t);
+    size_t malloc_usable_size(Void_t *);
+    void malloc_stats();
+    int mALLOPt(int, int);
+    struct mallinfo mALLINFo(void);
+#else
+    Void_t *mALLOc();
+    void fREe();
+    Void_t *rEALLOc();
+    Void_t *mEMALIGn();
+    Void_t *vALLOc();
+    Void_t *pvALLOc();
+    Void_t *cALLOc();
+    void cfree();
+    int malloc_trim();
+    size_t malloc_usable_size();
+    void malloc_stats();
+    int mALLOPt();
+    struct mallinfo mALLINFo();
 #endif
 
 
 #ifdef __cplusplus
-};  /* end of extern "C" */
+};				/* end of extern "C" */
 #endif
 
 /* ---------- To make a malloc.h, end cutting here ------------ */
@@ -900,164 +902,147 @@
 #ifdef WIN32
 
 #define AlignPage(add) (((add) + (malloc_getpagesize-1)) &
-~(malloc_getpagesize-1))
+~(malloc_getpagesize - 1))
 
-/* resrve 64MB to insure large contiguous space */ 
+/* resrve 64MB to insure large contiguous space */
 #define RESERVED_SIZE (1024*1024*64)
 #define NEXT_SIZE (2048*1024)
 #define TOP_MEMORY ((unsigned long)2*1024*1024*1024)
+     struct GmListElement;
+     typedef struct GmListElement GmListElement;
 
-struct GmListElement;
-typedef struct GmListElement GmListElement;
+     struct GmListElement
+     {
+	 GmListElement *next;
+	 void *base;
+     };
 
-struct GmListElement 
-{
-	GmListElement* next;
-	void* base;
-};
-
-static GmListElement* head = 0;
+static GmListElement *head = 0;
 static unsigned int gNextAddress = 0;
 static unsigned int gAddressBase = 0;
 static unsigned int gAllocatedSize = 0;
 
-static
-GmListElement* makeGmListElement (void* bas)
+static GmListElement *makeGmListElement(void *bas)
 {
-	GmListElement* this;
-	this = (GmListElement*)(void*)LocalAlloc (0, sizeof (GmListElement));
-	ASSERT (this);
-	if (this)
-	{
-		this->base = bas;
-		this->next = head;
-		head = this;
-	}
-	return this;
+    GmListElement *this;
+                  this = (GmListElement *) (void *) LocalAlloc(0, sizeof(GmListElement));
+                  ASSERT(this);
+    if            (this)
+    {
+	this->base = bas;
+	this->next = head;
+	head = this;
+    }
+    return this;
 }
 
-void gcleanup ()
+void gcleanup()
 {
-	BOOL rval;
-	ASSERT ( (head == NULL) || (head->base == (void*)gAddressBase));
-	if (gAddressBase && (gNextAddress - gAddressBase))
-	{
-		rval = VirtualFree ((void*)gAddressBase, 
-							gNextAddress - gAddressBase, 
-							MEM_DECOMMIT);
-        ASSERT (rval);
-	}
-	while (head)
-	{
-		GmListElement* next = head->next;
-		rval = VirtualFree (head->base, 0, MEM_RELEASE);
-		ASSERT (rval);
-		LocalFree (head);
-		head = next;
-	}
+    BOOL rval;
+    ASSERT((head == NULL) || (head->base == (void *) gAddressBase));
+    if (gAddressBase && (gNextAddress - gAddressBase)) {
+	rval = VirtualFree((void *) gAddressBase,
+	    gNextAddress - gAddressBase, MEM_DECOMMIT);
+	ASSERT(rval);
+    }
+    while (head) {
+	GmListElement *next = head->next;
+	rval = VirtualFree(head->base, 0, MEM_RELEASE);
+	ASSERT(rval);
+	LocalFree(head);
+	head = next;
+    }
 }
-		
-static
-void* findRegion (void* start_address, unsigned long size)
+
+static void *findRegion(void *start_address, unsigned long size)
 {
-	MEMORY_BASIC_INFORMATION info;
-	while ((unsigned long)start_address < TOP_MEMORY)
-	{
-		VirtualQuery (start_address, &info, sizeof (info));
-		if (info.State != MEM_FREE)
-			start_address = (char*)info.BaseAddress + info.RegionSize;
-		else if (info.RegionSize >= size)
-			return start_address;
-		else
-			start_address = (char*)info.BaseAddress + info.RegionSize; 
-	}
-	return NULL;
-	
+    MEMORY_BASIC_INFORMATION info;
+    while                    ((unsigned long) start_address < TOP_MEMORY)
+    {
+	VirtualQuery(start_address, &info, sizeof(info));
+	if (info.State != MEM_FREE)
+	    start_address = (char *) info.BaseAddress + info.RegionSize;
+	else if (info.RegionSize >= size)
+	    return start_address;
+	else
+	    start_address = (char *) info.BaseAddress + info.RegionSize;
+    }
+    return NULL;
+
 }
 
 
-void* wsbrk (long size)
+void *wsbrk(long size)
 {
-	void* tmp;
-	if (size > 0)
+    void *tmp;
+    if   (size > 0)
+    {
+	if (gAddressBase == 0) {
+	    gAllocatedSize = max(RESERVED_SIZE, AlignPage(size));
+	    gNextAddress = gAddressBase =
+		(unsigned int) VirtualAlloc(NULL, gAllocatedSize,
+		MEM_RESERVE, PAGE_NOACCESS);
+	} else if (AlignPage(gNextAddress + size) > (gAddressBase +
+		gAllocatedSize))
 	{
-		if (gAddressBase == 0)
-		{
-			gAllocatedSize = max (RESERVED_SIZE, AlignPage (size));
-			gNextAddress = gAddressBase = 
-				(unsigned int)VirtualAlloc (NULL, gAllocatedSize, 
-											MEM_RESERVE, PAGE_NOACCESS);
-		} else if (AlignPage (gNextAddress + size) > (gAddressBase +
-gAllocatedSize))
-		{
-			long new_size = max (NEXT_SIZE, AlignPage (size));
-			void* new_address = (void*)(gAddressBase+gAllocatedSize);
-			do 
-			{
-				new_address = findRegion (new_address, new_size);
-				
-				if (new_address == 0)
-					return (void*)-1;
-
-				gAddressBase = gNextAddress =
-					(unsigned int)VirtualAlloc (new_address, new_size,
-												MEM_RESERVE, PAGE_NOACCESS);
-				// repeat in case of race condition
-				// The region that we found has been snagged 
-				// by another thread
-			}
-			while (gAddressBase == 0);
+	    long new_size = max(NEXT_SIZE, AlignPage(size));
+	    void *new_address = (void *) (gAddressBase + gAllocatedSize);
+	    do {
+		new_address = findRegion(new_address, new_size);
+
+		if (new_address == 0)
+		    return (void *) -1;
+
+		gAddressBase = gNextAddress =
+		    (unsigned int) VirtualAlloc(new_address, new_size,
+		    MEM_RESERVE, PAGE_NOACCESS);
+		// repeat in case of race condition
+		// The region that we found has been snagged 
+		// by another thread
+	    }
+	    while (gAddressBase == 0);
 
-			ASSERT (new_address == (void*)gAddressBase);
+	    ASSERT(new_address == (void *) gAddressBase);
 
-			gAllocatedSize = new_size;
+	    gAllocatedSize = new_size;
 
-			if (!makeGmListElement ((void*)gAddressBase))
-				return (void*)-1;
-		}
-		if ((size + gNextAddress) > AlignPage (gNextAddress))
-		{
-			void* res;
-			res = VirtualAlloc ((void*)AlignPage (gNextAddress),
-								(size + gNextAddress - 
-								 AlignPage (gNextAddress)), 
-								MEM_COMMIT, PAGE_READWRITE);
-			if (res == 0)
-				return (void*)-1;
-		}
-		tmp = (void*)gNextAddress;
-		gNextAddress = (unsigned int)tmp + size;
-		return tmp;
+	    if (!makeGmListElement((void *) gAddressBase))
+		return (void *) -1;
 	}
-	else if (size < 0)
-	{
-		unsigned int alignedGoal = AlignPage (gNextAddress + size);
-		/* Trim by releasing the virtual memory */
-		if (alignedGoal >= gAddressBase)
-		{
-			VirtualFree ((void*)alignedGoal, gNextAddress - alignedGoal,  
-						 MEM_DECOMMIT);
-			gNextAddress = gNextAddress + size;
-			return (void*)gNextAddress;
-		}
-		else 
-		{
-			VirtualFree ((void*)gAddressBase, gNextAddress - gAddressBase,
-						 MEM_DECOMMIT);
-			gNextAddress = gAddressBase;
-			return (void*)-1;
-		}
+	if ((size + gNextAddress) > AlignPage(gNextAddress)) {
+	    void *res;
+	    res = VirtualAlloc((void *) AlignPage(gNextAddress),
+		(size + gNextAddress -
+		    AlignPage(gNextAddress)), MEM_COMMIT, PAGE_READWRITE);
+	    if (res == 0)
+		return (void *) -1;
 	}
-	else
-	{
-		return (void*)gNextAddress;
+	tmp = (void *) gNextAddress;
+	gNextAddress = (unsigned int) tmp + size;
+	return tmp;
+    } else if (size < 0) {
+	unsigned int alignedGoal = AlignPage(gNextAddress + size);
+	/* Trim by releasing the virtual memory */
+	if (alignedGoal >= gAddressBase) {
+	    VirtualFree((void *) alignedGoal, gNextAddress - alignedGoal,
+		MEM_DECOMMIT);
+	    gNextAddress = gNextAddress + size;
+	    return (void *) gNextAddress;
+	} else {
+	    VirtualFree((void *) gAddressBase, gNextAddress - gAddressBase,
+		MEM_DECOMMIT);
+	    gNextAddress = gAddressBase;
+	    return (void *) -1;
 	}
+    } else {
+	return (void *) gNextAddress;
+    }
 }
 
 #endif
-
 
 
+
 /*
   Type declarations
 */
@@ -1065,13 +1050,13 @@
 
 struct malloc_chunk
 {
-  INTERNAL_SIZE_T prev_size; /* Size of previous chunk (if free). */
-  INTERNAL_SIZE_T size;      /* Size in bytes, including overhead. */
-  struct malloc_chunk* fd;   /* double links -- used only if free. */
-  struct malloc_chunk* bk;
+    INTERNAL_SIZE_T prev_size;	/* Size of previous chunk (if free). */
+    INTERNAL_SIZE_T size;	/* Size in bytes, including overhead. */
+    struct malloc_chunk *fd;	/* double links -- used only if free. */
+    struct malloc_chunk *bk;
 };
 
-typedef struct malloc_chunk* mchunkptr;
+typedef struct malloc_chunk *mchunkptr;
 
 /*
 
@@ -1196,10 +1181,10 @@
        serviced via calls to mmap, and then later released via munmap.
 
 */
+
 
 
 
-
 
 
 /*  sizes, alignments */
@@ -1224,9 +1209,9 @@
 /* Check if m has acceptable alignment */
 
 #define aligned_OK(m)    (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0)
+
 
 
-
 
 /* 
   Physical chunk operations  
@@ -1235,7 +1220,7 @@
 
 /* size field is or'ed with PREV_INUSE when previous adjacent chunk in use */
 
-#define PREV_INUSE 0x1 
+#define PREV_INUSE 0x1
 
 /* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */
 
@@ -1259,9 +1244,9 @@
 /* Treat space at ptr + offset as a chunk */
 
 #define chunk_at_offset(p, s)  ((mchunkptr)(((char*)(p)) + (s)))
+
 
 
-
 
 /* 
   Dealing with use bits 
@@ -1298,9 +1283,9 @@
 
 #define clear_inuse_bit_at_offset(p, s)\
  (((mchunkptr)(((char*)(p)) + (s)))->size &= ~(PREV_INUSE))
+
 
 
-
 
 /* 
   Dealing with size fields 
@@ -1321,9 +1306,9 @@
 /* Set size at footer (only when chunk is not in use) */
 
 #define set_foot(p, s)   (((mchunkptr)((char*)(p) + (s)))->prev_size = (s))
+
 
 
-
 
 
 /*
@@ -1360,9 +1345,9 @@
 
 */
 
-#define NAV             128   /* number of bins */
+#define NAV             128	/* number of bins */
 
-typedef struct malloc_chunk* mbinptr;
+typedef struct malloc_chunk *mbinptr;
 
 /* access macros */
 
@@ -1376,8 +1361,8 @@
    indexing, maintain locality, and avoid some initialization tests.
 */
 
-#define top            (bin_at(0)->fd)   /* The topmost chunk */
-#define last_remainder (bin_at(1))       /* remainder from last split */
+#define top            (bin_at(0)->fd)	/* The topmost chunk */
+#define last_remainder (bin_at(1))	/* remainder from last split */
 
 
 /*
@@ -1393,28 +1378,30 @@
 
 #define IAV(i)  bin_at(i), bin_at(i)
 
-static mbinptr av_[NAV * 2 + 2] = {
- 0, 0,
- IAV(0),   IAV(1),   IAV(2),   IAV(3),   IAV(4),   IAV(5),   IAV(6),   IAV(7),
- IAV(8),   IAV(9),   IAV(10),  IAV(11),  IAV(12),  IAV(13),  IAV(14),  IAV(15),
- IAV(16),  IAV(17),  IAV(18),  IAV(19),  IAV(20),  IAV(21),  IAV(22),  IAV(23),
- IAV(24),  IAV(25),  IAV(26),  IAV(27),  IAV(28),  IAV(29),  IAV(30),  IAV(31),
- IAV(32),  IAV(33),  IAV(34),  IAV(35),  IAV(36),  IAV(37),  IAV(38),  IAV(39),
- IAV(40),  IAV(41),  IAV(42),  IAV(43),  IAV(44),  IAV(45),  IAV(46),  IAV(47),
- IAV(48),  IAV(49),  IAV(50),  IAV(51),  IAV(52),  IAV(53),  IAV(54),  IAV(55),
- IAV(56),  IAV(57),  IAV(58),  IAV(59),  IAV(60),  IAV(61),  IAV(62),  IAV(63),
- IAV(64),  IAV(65),  IAV(66),  IAV(67),  IAV(68),  IAV(69),  IAV(70),  IAV(71),
- IAV(72),  IAV(73),  IAV(74),  IAV(75),  IAV(76),  IAV(77),  IAV(78),  IAV(79),
- IAV(80),  IAV(81),  IAV(82),  IAV(83),  IAV(84),  IAV(85),  IAV(86),  IAV(87),
- IAV(88),  IAV(89),  IAV(90),  IAV(91),  IAV(92),  IAV(93),  IAV(94),  IAV(95),
- IAV(96),  IAV(97),  IAV(98),  IAV(99),  IAV(100), IAV(101), IAV(102), IAV(103),
- IAV(104), IAV(105), IAV(106), IAV(107), IAV(108), IAV(109), IAV(110), IAV(111),
- IAV(112), IAV(113), IAV(114), IAV(115), IAV(116), IAV(117), IAV(118), IAV(119),
- IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127)
+static mbinptr av_[NAV * 2 + 2] =
+{
+    0, 0,
+	IAV(0), IAV(1), IAV(2), IAV(3), IAV(4), IAV(5), IAV(6), IAV(7),
+	IAV(8), IAV(9), IAV(10), IAV(11), IAV(12), IAV(13), IAV(14), IAV(15),
+	IAV(16), IAV(17), IAV(18), IAV(19), IAV(20), IAV(21), IAV(22), IAV(23),
+	IAV(24), IAV(25), IAV(26), IAV(27), IAV(28), IAV(29), IAV(30), IAV(31),
+	IAV(32), IAV(33), IAV(34), IAV(35), IAV(36), IAV(37), IAV(38), IAV(39),
+	IAV(40), IAV(41), IAV(42), IAV(43), IAV(44), IAV(45), IAV(46), IAV(47),
+	IAV(48), IAV(49), IAV(50), IAV(51), IAV(52), IAV(53), IAV(54), IAV(55),
+	IAV(56), IAV(57), IAV(58), IAV(59), IAV(60), IAV(61), IAV(62), IAV(63),
+	IAV(64), IAV(65), IAV(66), IAV(67), IAV(68), IAV(69), IAV(70), IAV(71),
+	IAV(72), IAV(73), IAV(74), IAV(75), IAV(76), IAV(77), IAV(78), IAV(79),
+	IAV(80), IAV(81), IAV(82), IAV(83), IAV(84), IAV(85), IAV(86), IAV(87),
+	IAV(88), IAV(89), IAV(90), IAV(91), IAV(92), IAV(93), IAV(94), IAV(95),
+	IAV(96), IAV(97), IAV(98), IAV(99), IAV(100), IAV(101), IAV(102),
+	IAV(103), IAV(104), IAV(105), IAV(106), IAV(107), IAV(108), IAV(109),
+	IAV(110), IAV(111), IAV(112), IAV(113), IAV(114), IAV(115), IAV(116),
+	IAV(117), IAV(118), IAV(119), IAV(120), IAV(121), IAV(122), IAV(123),
+	IAV(124), IAV(125), IAV(126), IAV(127)
 };
-
 
 
+
 /* field-extraction macros */
 
 #define first(b) ((b)->fd)
@@ -1431,7 +1418,7 @@
  ((((unsigned long)(sz)) >> 9) <=   84) ? 110 + (((unsigned long)(sz)) >> 12): \
  ((((unsigned long)(sz)) >> 9) <=  340) ? 119 + (((unsigned long)(sz)) >> 15): \
  ((((unsigned long)(sz)) >> 9) <= 1364) ? 124 + (((unsigned long)(sz)) >> 18): \
-                                          126)                     
+                                          126)
 /* 
   bins for chunks < 512 are all spaced 8 bytes apart, and hold
   identically sized chunks. This is exploited in malloc.
@@ -1448,9 +1435,9 @@
 */
 
 #define is_small_request(nb) (nb < MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH)
-
 
 
+
 /*
     To help compensate for the large number of bins, a one-level index
     structure is used for bin-by-bin searching.  `binblocks' is a
@@ -1461,40 +1448,42 @@
     when all are noticed to be empty during traversal in malloc.
 */
 
-#define BINBLOCKWIDTH     4   /* bins per block */
+#define BINBLOCKWIDTH     4	/* bins per block */
 
-#define binblocks      (bin_at(0)->size) /* bitvector of nonempty blocks */
+#define binblocks      (bin_at(0)->size)	/* bitvector of nonempty blocks */
 
 /* bin<->block macros */
 
 #define idx2binblock(ix)    ((unsigned)1 << (ix / BINBLOCKWIDTH))
 #define mark_binblock(ii)   (binblocks |= idx2binblock(ii))
 #define clear_binblock(ii)  (binblocks &= ~(idx2binblock(ii)))
+
 
 
-
 
 
 /*  Other static bookkeeping data */
 
 /* variables holding tunable values */
 
-static unsigned long trim_threshold   = DEFAULT_TRIM_THRESHOLD;
-static unsigned long top_pad          = DEFAULT_TOP_PAD;
-static unsigned int  n_mmaps_max      = DEFAULT_MMAP_MAX;
-static unsigned long mmap_threshold   = DEFAULT_MMAP_THRESHOLD;
+static unsigned long trim_threshold = DEFAULT_TRIM_THRESHOLD;
+static unsigned long top_pad = DEFAULT_TOP_PAD;
+static unsigned int n_mmaps_max = DEFAULT_MMAP_MAX;
+static unsigned long mmap_threshold = DEFAULT_MMAP_THRESHOLD;
 
 /* The first value returned from sbrk */
-static char* sbrk_base = (char*)(-1);
+static char *sbrk_base = (char *) (-1);
 
 /* The maximum memory obtained from system via sbrk */
-static unsigned long max_sbrked_mem = 0; 
+static unsigned long max_sbrked_mem = 0;
 
 /* The maximum via either sbrk or mmap */
-static unsigned long max_total_mem = 0; 
+static unsigned long max_total_mem = 0;
 
 /* internal working copy of mallinfo */
-static struct mallinfo current_mallinfo = {  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static struct mallinfo current_mallinfo =
+{
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
 /* The total memory obtained from system via sbrk */
 #define sbrked_mem  (current_mallinfo.arena)
@@ -1505,9 +1494,9 @@
 static unsigned int max_n_mmaps = 0;
 static unsigned long mmapped_mem = 0;
 static unsigned long max_mmapped_mem = 0;
-
 
 
+
 /* 
   Debugging support 
 */
@@ -1524,114 +1513,114 @@
 */
 
 #if __STD_C
-static void do_check_chunk(mchunkptr p) 
+static void do_check_chunk(mchunkptr p)
 #else
-static void do_check_chunk(p) mchunkptr p;
+static void do_check_chunk(p)
+     mchunkptr p;
 #endif
-{ 
-  INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
+{
+    INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
 
-  /* No checkable chunk is mmapped */
-  assert(!chunk_is_mmapped(p));
+    /* No checkable chunk is mmapped */
+    assert(!chunk_is_mmapped(p));
 
-  /* Check for legal address ... */
-  assert((char*)p >= sbrk_base);
-  if (p != top) 
-    assert((char*)p + sz <= (char*)top);
-  else
-    assert((char*)p + sz <= sbrk_base + sbrked_mem);
+    /* Check for legal address ... */
+    assert((char *) p >= sbrk_base);
+    if (p != top)
+	assert((char *) p + sz <= (char *) top);
+    else
+	assert((char *) p + sz <= sbrk_base + sbrked_mem);
 
 }
 
 
 #if __STD_C
-static void do_check_free_chunk(mchunkptr p) 
+static void do_check_free_chunk(mchunkptr p)
 #else
-static void do_check_free_chunk(p) mchunkptr p;
+static void do_check_free_chunk(p)
+     mchunkptr p;
 #endif
-{ 
-  INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
-  mchunkptr next = chunk_at_offset(p, sz);
+{
+    INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
+    mchunkptr next = chunk_at_offset(p, sz);
 
-  do_check_chunk(p);
+    do_check_chunk(p);
 
-  /* Check whether it claims to be free ... */
-  assert(!inuse(p));
+    /* Check whether it claims to be free ... */
+    assert(!inuse(p));
 
-  /* Unless a special marker, must have OK fields */
-  if ((long)sz >= (long)MINSIZE)
-  {
-    assert((sz & MALLOC_ALIGN_MASK) == 0);
-    assert(aligned_OK(chunk2mem(p)));
-    /* ... matching footer field */
-    assert(next->prev_size == sz);
-    /* ... and is fully consolidated */
-    assert(prev_inuse(p));
-    assert (next == top || inuse(next));
-    
-    /* ... and has minimally sane links */
-    assert(p->fd->bk == p);
-    assert(p->bk->fd == p);
-  }
-  else /* markers are always of size SIZE_SZ */
-    assert(sz == SIZE_SZ); 
+    /* Unless a special marker, must have OK fields */
+    if ((long) sz >= (long) MINSIZE) {
+	assert((sz & MALLOC_ALIGN_MASK) == 0);
+	assert(aligned_OK(chunk2mem(p)));
+	/* ... matching footer field */
+	assert(next->prev_size == sz);
+	/* ... and is fully consolidated */
+	assert(prev_inuse(p));
+	assert(next == top || inuse(next));
+
+	/* ... and has minimally sane links */
+	assert(p->fd->bk == p);
+	assert(p->bk->fd == p);
+    } else			/* markers are always of size SIZE_SZ */
+	assert(sz == SIZE_SZ);
 }
 
 #if __STD_C
-static void do_check_inuse_chunk(mchunkptr p) 
+static void do_check_inuse_chunk(mchunkptr p)
 #else
-static void do_check_inuse_chunk(p) mchunkptr p;
+static void do_check_inuse_chunk(p)
+     mchunkptr p;
 #endif
-{ 
-  mchunkptr next = next_chunk(p);
-  do_check_chunk(p);
+{
+    mchunkptr next = next_chunk(p);
+    do_check_chunk(p);
 
-  /* Check whether it claims to be in use ... */
-  assert(inuse(p));
+    /* Check whether it claims to be in use ... */
+    assert(inuse(p));
 
-  /* ... and is surrounded by OK chunks.
-    Since more things can be checked with free chunks than inuse ones,
-    if an inuse chunk borders them and debug is on, it's worth doing them.
-  */
-  if (!prev_inuse(p)) 
-  {
-    mchunkptr prv = prev_chunk(p);
-    assert(next_chunk(prv) == p);
-    do_check_free_chunk(prv);
-  }
-  if (next == top)
-  {
-    assert(prev_inuse(next));
-    assert(chunksize(next) >= MINSIZE);
-  }
-  else if (!inuse(next))
-    do_check_free_chunk(next);
+    /* ... and is surrounded by OK chunks.
+     * Since more things can be checked with free chunks than inuse ones,
+     * if an inuse chunk borders them and debug is on, it's worth doing them.
+     */
+    if (!prev_inuse(p)) {
+	mchunkptr prv = prev_chunk(p);
+	assert(next_chunk(prv) == p);
+	do_check_free_chunk(prv);
+    }
+    if (next == top) {
+	assert(prev_inuse(next));
+	assert(chunksize(next) >= MINSIZE);
+    } else if (!inuse(next))
+	do_check_free_chunk(next);
 
 }
 
 #if __STD_C
-static void do_check_malloced_chunk(mchunkptr p, INTERNAL_SIZE_T s) 
+static void do_check_malloced_chunk(mchunkptr p, INTERNAL_SIZE_T s)
 #else
-static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
+static void do_check_malloced_chunk(p, s)
+     mchunkptr p;
+     INTERNAL_SIZE_T s;
 #endif
 {
-  INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
-  long room = sz - s;
+    INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
+    long room = sz - s;
 
-  do_check_inuse_chunk(p);
+    do_check_inuse_chunk(p);
 
-  /* Legal size ... */
-  assert((long)sz >= (long)MINSIZE);
-  assert((sz & MALLOC_ALIGN_MASK) == 0);
-  assert(room >= 0);
-  assert(room < (long)MINSIZE);
+    /* Legal size ... */
+    assert((long) sz >= (long) MINSIZE);
+    assert((sz & MALLOC_ALIGN_MASK) == 0);
+    assert(room >= 0);
+    assert(room < (long) MINSIZE);
 
-  /* ... and alignment */
-  assert(aligned_OK(chunk2mem(p)));
+    /* ... and alignment */
+    assert(aligned_OK(chunk2mem(p)));
 
 
-  /* ... and was allocated at front of an available chunk */
-  assert(prev_inuse(p));
+    /* ... and was allocated at front of an available chunk */
+    assert(prev_inuse(p));
 
 }
 
@@ -1641,14 +1630,14 @@
 #define check_chunk(P) do_check_chunk(P)
 #define check_malloced_chunk(P,N) do_check_malloced_chunk(P,N)
 #else
-#define check_free_chunk(P) 
+#define check_free_chunk(P)
 #define check_inuse_chunk(P)
 #define check_chunk(P)
 #define check_malloced_chunk(P,N)
 #endif
-
 
 
+
 /* 
   Macro-based internal utilities
 */
@@ -1717,10 +1706,10 @@
 
 #define clear_last_remainder \
   (last_remainder->fd = last_remainder->bk = last_remainder)
+
 
 
 
-
 
 
 /* Routines dealing with mmap(). */
@@ -1730,79 +1719,84 @@
 #if __STD_C
 static mchunkptr mmap_chunk(size_t size)
 #else
-static mchunkptr mmap_chunk(size) size_t size;
+static mchunkptr mmap_chunk(size)
+     size_t size;
 #endif
 {
-  size_t page_mask = malloc_getpagesize - 1;
-  mchunkptr p;
+    size_t page_mask = malloc_getpagesize - 1;
+    mchunkptr p;
 
 #ifndef MAP_ANONYMOUS
-  static int fd = -1;
+    static int fd = -1;
 #endif
 
-  if(n_mmaps >= n_mmaps_max) return 0; /* too many regions */
+    if (n_mmaps >= n_mmaps_max)
+	return 0;		/* too many regions */
 
-  /* For mmapped chunks, the overhead is one SIZE_SZ unit larger, because
-   * there is no following chunk whose prev_size field could be used.
-   */
-  size = (size + SIZE_SZ + page_mask) & ~page_mask;
+    /* For mmapped chunks, the overhead is one SIZE_SZ unit larger, because
+     * there is no following chunk whose prev_size field could be used.
+     */
+    size = (size + SIZE_SZ + page_mask) & ~page_mask;
 
 #ifdef MAP_ANONYMOUS
-  p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE,
-		      MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
+    p = (mchunkptr) mmap(0, size, PROT_READ | PROT_WRITE,
+	MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 #else /* !MAP_ANONYMOUS */
-  if (fd < 0) 
-  {
-    fd = open("/dev/zero", O_RDWR);
-    if(fd < 0) return 0;
-  }
-  p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
+    if (fd < 0) {
+	fd = open("/dev/zero", O_RDWR);
+	if (fd < 0)
+	    return 0;
+    }
+    p = (mchunkptr) mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
 #endif
 
-  if(p == (mchunkptr)-1) return 0;
+    if (p == (mchunkptr) - 1)
+	return 0;
 
-  n_mmaps++;
-  if (n_mmaps > max_n_mmaps) max_n_mmaps = n_mmaps;
-  
-  /* We demand that eight bytes into a page must be 8-byte aligned. */
-  assert(aligned_OK(chunk2mem(p)));
+    n_mmaps++;
+    if (n_mmaps > max_n_mmaps)
+	max_n_mmaps = n_mmaps;
 
-  /* The offset to the start of the mmapped region is stored
-   * in the prev_size field of the chunk; normally it is zero,
-   * but that can be changed in memalign().
-   */
-  p->prev_size = 0;
-  set_head(p, size|IS_MMAPPED);
-  
-  mmapped_mem += size;
-  if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem) 
-    max_mmapped_mem = mmapped_mem;
-  if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem) 
-    max_total_mem = mmapped_mem + sbrked_mem;
-  return p;
+    /* We demand that eight bytes into a page must be 8-byte aligned. */
+    assert(aligned_OK(chunk2mem(p)));
+
+    /* The offset to the start of the mmapped region is stored
+     * in the prev_size field of the chunk; normally it is zero,
+     * but that can be changed in memalign().
+     */
+    p->prev_size = 0;
+    set_head(p, size | IS_MMAPPED);
+
+    mmapped_mem += size;
+    if ((unsigned long) mmapped_mem > (unsigned long) max_mmapped_mem)
+	max_mmapped_mem = mmapped_mem;
+    if ((unsigned long) (mmapped_mem + sbrked_mem) >
+	(unsigned long) max_total_mem) max_total_mem = mmapped_mem + sbrked_mem;
+    return p;
 }
 
 #if __STD_C
 static void munmap_chunk(mchunkptr p)
 #else
-static void munmap_chunk(p) mchunkptr p;
+static void munmap_chunk(p)
+     mchunkptr p;
 #endif
 {
-  INTERNAL_SIZE_T size = chunksize(p);
-  int ret;
+    INTERNAL_SIZE_T size = chunksize(p);
+    int ret;
 
-  assert (chunk_is_mmapped(p));
-  assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
-  assert((n_mmaps > 0));
-  assert(((p->prev_size + size) & (malloc_getpagesize-1)) == 0);
+    assert(chunk_is_mmapped(p));
+    assert(!((char *) p >= sbrk_base && (char *) p < sbrk_base + sbrked_mem));
+    assert((n_mmaps > 0));
+    assert(((p->prev_size + size) & (malloc_getpagesize - 1)) == 0);
 
-  n_mmaps--;
-  mmapped_mem -= (size + p->prev_size);
+    n_mmaps--;
+    mmapped_mem -= (size + p->prev_size);
 
-  ret = munmap((char *)p - p->prev_size, size + p->prev_size);
+    ret = munmap((char *) p - p->prev_size, size + p->prev_size);
 
-  /* munmap returns non-zero on failure */
-  assert(ret == 0);
+    /* munmap returns non-zero on failure */
+    assert(ret == 0);
 }
 
 #if HAVE_MREMAP
@@ -1810,48 +1804,51 @@
 #if __STD_C
 static mchunkptr mremap_chunk(mchunkptr p, size_t new_size)
 #else
-static mchunkptr mremap_chunk(p, new_size) mchunkptr p; size_t new_size;
+static mchunkptr mremap_chunk(p, new_size)
+     mchunkptr p;
+     size_t new_size;
 #endif
 {
-  size_t page_mask = malloc_getpagesize - 1;
-  INTERNAL_SIZE_T offset = p->prev_size;
-  INTERNAL_SIZE_T size = chunksize(p);
-  char *cp;
+    size_t page_mask = malloc_getpagesize - 1;
+    INTERNAL_SIZE_T offset = p->prev_size;
+    INTERNAL_SIZE_T size = chunksize(p);
+    char *cp;
 
-  assert (chunk_is_mmapped(p));
-  assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
-  assert((n_mmaps > 0));
-  assert(((size + offset) & (malloc_getpagesize-1)) == 0);
+    assert(chunk_is_mmapped(p));
+    assert(!((char *) p >= sbrk_base && (char *) p < sbrk_base + sbrked_mem));
+    assert((n_mmaps > 0));
+    assert(((size + offset) & (malloc_getpagesize - 1)) == 0);
 
-  /* Note the extra SIZE_SZ overhead as in mmap_chunk(). */
-  new_size = (new_size + offset + SIZE_SZ + page_mask) & ~page_mask;
+    /* Note the extra SIZE_SZ overhead as in mmap_chunk(). */
+    new_size = (new_size + offset + SIZE_SZ + page_mask) & ~page_mask;
 
-  cp = (char *)mremap((char *)p - offset, size + offset, new_size, 1);
+    cp = (char *) mremap((char *) p - offset, size + offset, new_size, 1);
 
-  if (cp == (char *)-1) return 0;
+    if (cp == (char *) -1)
+	return 0;
 
-  p = (mchunkptr)(cp + offset);
+    p = (mchunkptr) (cp + offset);
 
-  assert(aligned_OK(chunk2mem(p)));
+    assert(aligned_OK(chunk2mem(p)));
 
-  assert((p->prev_size == offset));
-  set_head(p, (new_size - offset)|IS_MMAPPED);
+    assert((p->prev_size == offset));
+    set_head(p, (new_size - offset) | IS_MMAPPED);
 
-  mmapped_mem -= size + offset;
-  mmapped_mem += new_size;
-  if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem) 
-    max_mmapped_mem = mmapped_mem;
-  if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem)
-    max_total_mem = mmapped_mem + sbrked_mem;
-  return p;
+    mmapped_mem -= size + offset;
+    mmapped_mem += new_size;
+    if ((unsigned long) mmapped_mem > (unsigned long) max_mmapped_mem)
+	max_mmapped_mem = mmapped_mem;
+    if ((unsigned long) (mmapped_mem + sbrked_mem) >
+	(unsigned long) max_total_mem) max_total_mem = mmapped_mem + sbrked_mem;
+    return p;
 }
 
 #endif /* HAVE_MREMAP */
 
 #endif /* HAVE_MMAP */
+
 
 
-
 
 /* 
   Extend the top-most chunk by obtaining memory from system.
@@ -1861,112 +1858,106 @@
 #if __STD_C
 static void malloc_extend_top(INTERNAL_SIZE_T nb)
 #else
-static void malloc_extend_top(nb) INTERNAL_SIZE_T nb;
+static void malloc_extend_top(nb)
+     INTERNAL_SIZE_T nb;
 #endif
 {
-  char*     brk;                  /* return value from sbrk */
-  INTERNAL_SIZE_T front_misalign; /* unusable bytes at front of sbrked space */
-  INTERNAL_SIZE_T correction;     /* bytes for 2nd sbrk call */
-  char*     new_brk;              /* return of 2nd sbrk call */
-  INTERNAL_SIZE_T top_size;       /* new size of top chunk */
-
-  mchunkptr old_top     = top;  /* Record state of old top */
-  INTERNAL_SIZE_T old_top_size = chunksize(old_top);
-  char*     old_end      = (char*)(chunk_at_offset(old_top, old_top_size));
-
-  /* Pad request with top_pad plus minimal overhead */
-  
-  INTERNAL_SIZE_T    sbrk_size     = nb + top_pad + MINSIZE;
-  unsigned long pagesz    = malloc_getpagesize;
-
-  /* If not the first time through, round to preserve page boundary */
-  /* Otherwise, we need to correct to a page size below anyway. */
-  /* (We also correct below if an intervening foreign sbrk call.) */
-
-  if (sbrk_base != (char*)(-1))
-    sbrk_size = (sbrk_size + (pagesz - 1)) & ~(pagesz - 1);
-
-  brk = (char*)(MORECORE (sbrk_size));
-
-  /* Fail if sbrk failed or if a foreign sbrk call killed our space */
-  if (brk == (char*)(MORECORE_FAILURE) || 
-      (brk < old_end && old_top != initial_top))
-    return;     
-
-  sbrked_mem += sbrk_size;
-
-  if (brk == old_end) /* can just add bytes to current top */
-  {
-    top_size = sbrk_size + old_top_size;
-    set_head(top, top_size | PREV_INUSE);
-  }
-  else
-  {
-    if (sbrk_base == (char*)(-1))  /* First time through. Record base */
-      sbrk_base = brk;
-    else  /* Someone else called sbrk().  Count those bytes as sbrked_mem. */
-      sbrked_mem += brk - (char*)old_end;
-
-    /* Guarantee alignment of first new chunk made from this space */
-    front_misalign = (unsigned long)chunk2mem(brk) & MALLOC_ALIGN_MASK;
-    if (front_misalign > 0) 
-    {
-      correction = (MALLOC_ALIGNMENT) - front_misalign;
-      brk += correction;
+    char *brk;			/* return value from sbrk */
+    INTERNAL_SIZE_T front_misalign;	/* unusable bytes at front of sbrked space */
+    INTERNAL_SIZE_T correction;	/* bytes for 2nd sbrk call */
+    char *new_brk;		/* return of 2nd sbrk call */
+    INTERNAL_SIZE_T top_size;	/* new size of top chunk */
+
+    mchunkptr old_top = top;	/* Record state of old top */
+    INTERNAL_SIZE_T old_top_size = chunksize(old_top);
+    char *old_end = (char *) (chunk_at_offset(old_top, old_top_size));
+
+    /* Pad request with top_pad plus minimal overhead */
+
+    INTERNAL_SIZE_T sbrk_size = nb + top_pad + MINSIZE;
+    unsigned long pagesz = malloc_getpagesize;
+
+    /* If not the first time through, round to preserve page boundary */
+    /* Otherwise, we need to correct to a page size below anyway. */
+    /* (We also correct below if an intervening foreign sbrk call.) */
+
+    if (sbrk_base != (char *) (-1))
+	sbrk_size = (sbrk_size + (pagesz - 1)) & ~(pagesz - 1);
+
+    brk = (char *) (MORECORE(sbrk_size));
+
+    /* Fail if sbrk failed or if a foreign sbrk call killed our space */
+    if (brk == (char *) (MORECORE_FAILURE) ||
+	(brk < old_end && old_top != initial_top)) return;
+
+    sbrked_mem += sbrk_size;
+
+    if (brk == old_end) {	/* can just add bytes to current top */
+	top_size = sbrk_size + old_top_size;
+	set_head(top, top_size | PREV_INUSE);
+    } else {
+	if (sbrk_base == (char *) (-1))	/* First time through. Record base */
+	    sbrk_base = brk;
+	else			/* Someone else called sbrk().  Count those bytes as sbrked_mem. */
+	    sbrked_mem += brk - (char *) old_end;
+
+	/* Guarantee alignment of first new chunk made from this space */
+	front_misalign = (unsigned long) chunk2mem(brk) & MALLOC_ALIGN_MASK;
+	if (front_misalign > 0) {
+	    correction = (MALLOC_ALIGNMENT) - front_misalign;
+	    brk += correction;
+	} else
+	    correction = 0;
+
+	/* Guarantee the next brk will be at a page boundary */
+	correction +=
+	    pagesz - ((unsigned long) (brk + sbrk_size) & (pagesz - 1));
+
+	/* Allocate correction */
+	new_brk = (char *) (MORECORE(correction));
+	if (new_brk == (char *) (MORECORE_FAILURE))
+	    return;
+
+	sbrked_mem += correction;
+
+	top = (mchunkptr) brk;
+	top_size = new_brk - brk + correction;
+	set_head(top, top_size | PREV_INUSE);
+
+	if (old_top != initial_top) {
+
+	    /* There must have been an intervening foreign sbrk call. */
+	    /* A double fencepost is necessary to prevent consolidation */
+
+	    /* If not enough space to do this, then user did something very wrong */
+	    if (old_top_size < MINSIZE) {
+		set_head(top, PREV_INUSE);	/* will force null return from malloc */
+		return;
+	    }
+
+	    /* Also keep size a multiple of MALLOC_ALIGNMENT */
+	    old_top_size = (old_top_size - 3 * SIZE_SZ) & ~MALLOC_ALIGN_MASK;
+	    chunk_at_offset(old_top, old_top_size)->size = SIZE_SZ | PREV_INUSE;
+	    chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size =
+		SIZE_SZ | PREV_INUSE;
+	    set_head_size(old_top, old_top_size);
+	    /* If possible, release the rest. */
+	    if (old_top_size >= MINSIZE)
+		fREe(chunk2mem(old_top));
+	}
     }
-    else
-      correction = 0;
-
-    /* Guarantee the next brk will be at a page boundary */
-    correction += pagesz - ((unsigned long)(brk + sbrk_size) & (pagesz - 1));
 
-    /* Allocate correction */
-    new_brk = (char*)(MORECORE (correction));
-    if (new_brk == (char*)(MORECORE_FAILURE)) return; 
-
-    sbrked_mem += correction;
-
-    top = (mchunkptr)brk;
-    top_size = new_brk - brk + correction;
-    set_head(top, top_size | PREV_INUSE);
-
-    if (old_top != initial_top)
-    {
+    if ((unsigned long) sbrked_mem > (unsigned long) max_sbrked_mem)
+	max_sbrked_mem = sbrked_mem;
+    if ((unsigned long) (mmapped_mem + sbrked_mem) >
+	(unsigned long) max_total_mem) max_total_mem = mmapped_mem + sbrked_mem;
 
-      /* There must have been an intervening foreign sbrk call. */
-      /* A double fencepost is necessary to prevent consolidation */
-
-      /* If not enough space to do this, then user did something very wrong */
-      if (old_top_size < MINSIZE) 
-      {
-        set_head(top, PREV_INUSE); /* will force null return from malloc */
-        return;
-      }
-
-      /* Also keep size a multiple of MALLOC_ALIGNMENT */
-      old_top_size = (old_top_size - 3*SIZE_SZ) & ~MALLOC_ALIGN_MASK;
-      chunk_at_offset(old_top, old_top_size          )->size =
-        SIZE_SZ|PREV_INUSE;
-      chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size =
-        SIZE_SZ|PREV_INUSE;
-      set_head_size(old_top, old_top_size);
-      /* If possible, release the rest. */
-      if (old_top_size >= MINSIZE) 
-        fREe(chunk2mem(old_top));
-    }
-  }
-
-  if ((unsigned long)sbrked_mem > (unsigned long)max_sbrked_mem) 
-    max_sbrked_mem = sbrked_mem;
-  if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem) 
-    max_total_mem = mmapped_mem + sbrked_mem;
-
-  /* We always land on a page boundary */
-  assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0);
+    /* We always land on a page boundary */
+    assert(((unsigned long) ((char *) top + top_size) & (pagesz - 1)) == 0);
 }
+
 
 
-
 
 /* Main public routines */
 
@@ -2031,240 +2022,216 @@
 */
 
 #if __STD_C
-Void_t* mALLOc(size_t bytes)
+Void_t *mALLOc(size_t bytes)
 #else
-Void_t* mALLOc(bytes) size_t bytes;
+Void_t *mALLOc(bytes)
+     size_t bytes;
 #endif
 {
-  mchunkptr victim;                  /* inspected/selected chunk */
-  INTERNAL_SIZE_T victim_size;       /* its size */
-  int       idx;                     /* index for bin traversal */
-  mbinptr   bin;                     /* associated bin */
-  mchunkptr remainder;               /* remainder from a split */
-  long      remainder_size;          /* its size */
-  int       remainder_index;         /* its bin index */
-  unsigned long block;               /* block traverser bit */
-  int       startidx;                /* first bin of a traversed block */
-  mchunkptr fwd;                     /* misc temp for linking */
-  mchunkptr bck;                     /* misc temp for linking */
-  mbinptr q;                         /* misc temp */
+    mchunkptr victim;		/* inspected/selected chunk */
+    INTERNAL_SIZE_T victim_size;	/* its size */
+    int idx;			/* index for bin traversal */
+    mbinptr bin;		/* associated bin */
+    mchunkptr remainder;	/* remainder from a split */
+    long remainder_size;	/* its size */
+    int remainder_index;	/* its bin index */
+    unsigned long block;	/* block traverser bit */
+    int startidx;		/* first bin of a traversed block */
+    mchunkptr fwd;		/* misc temp for linking */
+    mchunkptr bck;		/* misc temp for linking */
+    mbinptr q;			/* misc temp */
 
-  INTERNAL_SIZE_T nb  = request2size(bytes);  /* padded request size; */
+    INTERNAL_SIZE_T nb = request2size(bytes);	/* padded request size; */
 
-  /* Check for exact match in a bin */
+    /* Check for exact match in a bin */
 
-  if (is_small_request(nb))  /* Faster version for small requests */
-  {
-    idx = smallbin_index(nb); 
+    if (is_small_request(nb)) {	/* Faster version for small requests */
+	idx = smallbin_index(nb);
 
-    /* No traversal or size check necessary for small bins.  */
+	/* No traversal or size check necessary for small bins.  */
 
-    q = bin_at(idx);
-    victim = last(q);
+	q = bin_at(idx);
+	victim = last(q);
 
-    /* Also scan the next one, since it would have a remainder < MINSIZE */
-    if (victim == q)
-    {
-      q = next_bin(q);
-      victim = last(q);
-    }
-    if (victim != q)
-    {
-      victim_size = chunksize(victim);
-      unlink(victim, bck, fwd);
-      set_inuse_bit_at_offset(victim, victim_size);
-      check_malloced_chunk(victim, nb);
-      return chunk2mem(victim);
-    }
-
-    idx += 2; /* Set for bin scan below. We've already scanned 2 bins. */
-
-  }
-  else
-  {
-    idx = bin_index(nb);
-    bin = bin_at(idx);
+	/* Also scan the next one, since it would have a remainder < MINSIZE */
+	if (victim == q) {
+	    q = next_bin(q);
+	    victim = last(q);
+	}
+	if (victim != q) {
+	    victim_size = chunksize(victim);
+	    unlink(victim, bck, fwd);
+	    set_inuse_bit_at_offset(victim, victim_size);
+	    check_malloced_chunk(victim, nb);
+	    return chunk2mem(victim);
+	}
 
-    for (victim = last(bin); victim != bin; victim = victim->bk)
-    {
-      victim_size = chunksize(victim);
-      remainder_size = victim_size - nb;
-      
-      if (remainder_size >= (long)MINSIZE) /* too big */
-      {
-        --idx; /* adjust to rescan below after checking last remainder */
-        break;   
-      }
-
-      else if (remainder_size >= 0) /* exact fit */
-      {
-        unlink(victim, bck, fwd);
-        set_inuse_bit_at_offset(victim, victim_size);
-        check_malloced_chunk(victim, nb);
-        return chunk2mem(victim);
-      }
-    }
-
-    ++idx; 
-
-  }
-
-  /* Try to use the last split-off remainder */
-
-  if ( (victim = last_remainder->fd) != last_remainder)
-  {
-    victim_size = chunksize(victim);
-    remainder_size = victim_size - nb;
+	idx += 2;		/* Set for bin scan below. We've already scanned 2 bins. */
+
+    } else {
+	idx = bin_index(nb);
+	bin = bin_at(idx);
+
+	for (victim = last(bin); victim != bin; victim = victim->bk) {
+	    victim_size = chunksize(victim);
+	    remainder_size = victim_size - nb;
+
+	    if (remainder_size >= (long) MINSIZE) {	/* too big */
+		--idx;		/* adjust to rescan below after checking last remainder */
+		break;
+	    }
+
+	    else if (remainder_size >= 0) {	/* exact fit */
+		unlink(victim, bck, fwd);
+		set_inuse_bit_at_offset(victim, victim_size);
+		check_malloced_chunk(victim, nb);
+		return chunk2mem(victim);
+	    }
+	}
+
+	++idx;
 
-    if (remainder_size >= (long)MINSIZE) /* re-split */
-    {
-      remainder = chunk_at_offset(victim, nb);
-      set_head(victim, nb | PREV_INUSE);
-      link_last_remainder(remainder);
-      set_head(remainder, remainder_size | PREV_INUSE);
-      set_foot(remainder, remainder_size);
-      check_malloced_chunk(victim, nb);
-      return chunk2mem(victim);
     }
 
-    clear_last_remainder;
+    /* Try to use the last split-off remainder */
 
-    if (remainder_size >= 0)  /* exhaust */
-    {
-      set_inuse_bit_at_offset(victim, victim_size);
-      check_malloced_chunk(victim, nb);
-      return chunk2mem(victim);
+    if ((victim = last_remainder->fd) != last_remainder) {
+	victim_size = chunksize(victim);
+	remainder_size = victim_size - nb;
+
+	if (remainder_size >= (long) MINSIZE) {	/* re-split */
+	    remainder = chunk_at_offset(victim, nb);
+	    set_head(victim, nb | PREV_INUSE);
+	    link_last_remainder(remainder);
+	    set_head(remainder, remainder_size | PREV_INUSE);
+	    set_foot(remainder, remainder_size);
+	    check_malloced_chunk(victim, nb);
+	    return chunk2mem(victim);
+	}
+
+	clear_last_remainder;
+
+	if (remainder_size >= 0) {	/* exhaust */
+	    set_inuse_bit_at_offset(victim, victim_size);
+	    check_malloced_chunk(victim, nb);
+	    return chunk2mem(victim);
+	}
+
+	/* Else place in bin */
+
+	frontlink(victim, victim_size, remainder_index, bck, fwd);
     }
 
-    /* Else place in bin */
+    /* 
+     * If there are any possibly nonempty big-enough blocks, 
+     * search for best fitting chunk by scanning bins in blockwidth units.
+     */
+
+    if ((block = idx2binblock(idx)) <= binblocks) {
+
+	/* Get to the first marked block */
+
+	if ((block & binblocks) == 0) {
+	    /* force to an even block boundary */
+	    idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH;
+	    block <<= 1;
+	    while ((block & binblocks) == 0) {
+		idx += BINBLOCKWIDTH;
+		block <<= 1;
+	    }
+	}
 
-    frontlink(victim, victim_size, remainder_index, bck, fwd);
-  }
+	/* For each possibly nonempty block ... */
+	for (;;) {
+	    startidx = idx;	/* (track incomplete blocks) */
+	    q = bin = bin_at(idx);
+
+	    /* For each bin in this block ... */
+	    do {
+		/* Find and use first big enough chunk ... */
+
+		for (victim = last(bin); victim != bin; victim = victim->bk) {
+		    victim_size = chunksize(victim);
+		    remainder_size = victim_size - nb;
+
+		    if (remainder_size >= (long) MINSIZE) {	/* split */
+			remainder = chunk_at_offset(victim, nb);
+			set_head(victim, nb | PREV_INUSE);
+			unlink(victim, bck, fwd);
+			link_last_remainder(remainder);
+			set_head(remainder, remainder_size | PREV_INUSE);
+			set_foot(remainder, remainder_size);
+			check_malloced_chunk(victim, nb);
+			return chunk2mem(victim);
+		    }
+
+		    else if (remainder_size >= 0) {	/* take */
+			set_inuse_bit_at_offset(victim, victim_size);
+			unlink(victim, bck, fwd);
+			check_malloced_chunk(victim, nb);
+			return chunk2mem(victim);
+		    }
 
-  /* 
-     If there are any possibly nonempty big-enough blocks, 
-     search for best fitting chunk by scanning bins in blockwidth units.
-  */
+		}
 
-  if ( (block = idx2binblock(idx)) <= binblocks)  
-  {
+		bin = next_bin(bin);
 
-    /* Get to the first marked block */
+	    } while ((++idx & (BINBLOCKWIDTH - 1)) != 0);
 
-    if ( (block & binblocks) == 0) 
-    {
-      /* force to an even block boundary */
-      idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH;
-      block <<= 1;
-      while ((block & binblocks) == 0)
-      {
-        idx += BINBLOCKWIDTH;
-        block <<= 1;
-      }
-    }
-      
-    /* For each possibly nonempty block ... */
-    for (;;)  
-    {
-      startidx = idx;          /* (track incomplete blocks) */
-      q = bin = bin_at(idx);
+	    /* Clear out the block bit. */
 
-      /* For each bin in this block ... */
-      do
-      {
-        /* Find and use first big enough chunk ... */
-
-        for (victim = last(bin); victim != bin; victim = victim->bk)
-        {
-          victim_size = chunksize(victim);
-          remainder_size = victim_size - nb;
-
-          if (remainder_size >= (long)MINSIZE) /* split */
-          {
-            remainder = chunk_at_offset(victim, nb);
-            set_head(victim, nb | PREV_INUSE);
-            unlink(victim, bck, fwd);
-            link_last_remainder(remainder);
-            set_head(remainder, remainder_size | PREV_INUSE);
-            set_foot(remainder, remainder_size);
-            check_malloced_chunk(victim, nb);
-            return chunk2mem(victim);
-          }
-
-          else if (remainder_size >= 0)  /* take */
-          {
-            set_inuse_bit_at_offset(victim, victim_size);
-            unlink(victim, bck, fwd);
-            check_malloced_chunk(victim, nb);
-            return chunk2mem(victim);
-          }
-
-        }
-
-       bin = next_bin(bin);
-
-      } while ((++idx & (BINBLOCKWIDTH - 1)) != 0);
-
-      /* Clear out the block bit. */
-
-      do   /* Possibly backtrack to try to clear a partial block */
-      {
-        if ((startidx & (BINBLOCKWIDTH - 1)) == 0)
-        {
-          binblocks &= ~block;
-          break;
-        }
-        --startidx;
-       q = prev_bin(q);
-      } while (first(q) == q);
-
-      /* Get to the next possibly nonempty block */
-
-      if ( (block <<= 1) <= binblocks && (block != 0) ) 
-      {
-        while ((block & binblocks) == 0)
-        {
-          idx += BINBLOCKWIDTH;
-          block <<= 1;
-        }
-      }
-      else
-        break;
-    }
-  }
-
-
-  /* Try to use top chunk */
-
-  /* Require that there be a remainder, ensuring top always exists  */
-  if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
-  {
+	    do {		/* Possibly backtrack to try to clear a partial block */
+		if ((startidx & (BINBLOCKWIDTH - 1)) == 0) {
+		    binblocks &= ~block;
+		    break;
+		}
+		--startidx;
+		q = prev_bin(q);
+	    } while (first(q) == q);
+
+	    /* Get to the next possibly nonempty block */
+
+	    if ((block <<= 1) <= binblocks && (block != 0)) {
+		while ((block & binblocks) == 0) {
+		    idx += BINBLOCKWIDTH;
+		    block <<= 1;
+		}
+	    } else
+		break;
+	}
+    }
+
+
+    /* Try to use top chunk */
+
+    /* Require that there be a remainder, ensuring top always exists  */
+    if ((remainder_size = chunksize(top) - nb) < (long) MINSIZE) {
 
 #if HAVE_MMAP
-    /* If big and would otherwise need to extend, try to use mmap instead */
-    if ((unsigned long)nb >= (unsigned long)mmap_threshold &&
-        (victim = mmap_chunk(nb)) != 0)
-      return chunk2mem(victim);
-#endif
-
-    /* Try to extend */
-    malloc_extend_top(nb);
-    if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
-      return 0; /* propagate failure */
-  }
-
-  victim = top;
-  set_head(victim, nb | PREV_INUSE);
-  top = chunk_at_offset(victim, nb);
-  set_head(top, remainder_size | PREV_INUSE);
-  check_malloced_chunk(victim, nb);
-  return chunk2mem(victim);
+	/* If big and would otherwise need to extend, try to use mmap instead */
+	if ((unsigned long) nb >= (unsigned long) mmap_threshold &&
+	    (victim = mmap_chunk(nb)) != 0)
+	    return chunk2mem(victim);
+#endif
 
-}
+	/* Try to extend */
+	malloc_extend_top(nb);
+	if ((remainder_size = chunksize(top) - nb) < (long) MINSIZE)
+	    return 0;		/* propagate failure */
+    }
 
+    victim = top;
+    set_head(victim, nb | PREV_INUSE);
+    top = chunk_at_offset(victim, nb);
+    set_head(top, remainder_size | PREV_INUSE);
+    check_malloced_chunk(victim, nb);
+    return chunk2mem(victim);
 
+}
 
 
+
+
 /*
 
   free() algorithm :
@@ -2288,101 +2255,95 @@
 
 
 #if __STD_C
-void fREe(Void_t* mem)
+void fREe(Void_t * mem)
 #else
-void fREe(mem) Void_t* mem;
+void fREe(mem)
+     Void_t *mem;
 #endif
 {
-  mchunkptr p;         /* chunk corresponding to mem */
-  INTERNAL_SIZE_T hd;  /* its head field */
-  INTERNAL_SIZE_T sz;  /* its size */
-  int       idx;       /* its bin index */
-  mchunkptr next;      /* next contiguous chunk */
-  INTERNAL_SIZE_T nextsz; /* its size */
-  INTERNAL_SIZE_T prevsz; /* size of previous contiguous chunk */
-  mchunkptr bck;       /* misc temp for linking */
-  mchunkptr fwd;       /* misc temp for linking */
-  int       islr;      /* track whether merging with last_remainder */
+    mchunkptr p;		/* chunk corresponding to mem */
+    INTERNAL_SIZE_T hd;		/* its head field */
+    INTERNAL_SIZE_T sz;		/* its size */
+    int idx;			/* its bin index */
+    mchunkptr next;		/* next contiguous chunk */
+    INTERNAL_SIZE_T nextsz;	/* its size */
+    INTERNAL_SIZE_T prevsz;	/* size of previous contiguous chunk */
+    mchunkptr bck;		/* misc temp for linking */
+    mchunkptr fwd;		/* misc temp for linking */
+    int islr;			/* track whether merging with last_remainder */
 
-  if (mem == 0)                              /* free(0) has no effect */
-    return;
+    if (mem == 0)		/* free(0) has no effect */
+	return;
 
-  p = mem2chunk(mem);
-  hd = p->size;
+    p = mem2chunk(mem);
+    hd = p->size;
 
 #if HAVE_MMAP
-  if (hd & IS_MMAPPED)                       /* release mmapped memory. */
-  {
-    munmap_chunk(p);
-    return;
-  }
+    if (hd & IS_MMAPPED) {	/* release mmapped memory. */
+	munmap_chunk(p);
+	return;
+    }
 #endif
-  
-  check_inuse_chunk(p);
-  
-  sz = hd & ~PREV_INUSE;
-  next = chunk_at_offset(p, sz);
-  nextsz = chunksize(next);
-  
-  if (next == top)                            /* merge with top */
-  {
-    sz += nextsz;
 
-    if (!(hd & PREV_INUSE))                    /* consolidate backward */
-    {
-      prevsz = p->prev_size;
-      p = chunk_at_offset(p, -prevsz);
-      sz += prevsz;
-      unlink(p, bck, fwd);
+    check_inuse_chunk(p);
+
+    sz = hd & ~PREV_INUSE;
+    next = chunk_at_offset(p, sz);
+    nextsz = chunksize(next);
+
+    if (next == top) {		/* merge with top */
+	sz += nextsz;
+
+	if (!(hd & PREV_INUSE)) {	/* consolidate backward */
+	    prevsz = p->prev_size;
+	    p = chunk_at_offset(p, -prevsz);
+	    sz += prevsz;
+	    unlink(p, bck, fwd);
+	}
+
+	set_head(p, sz | PREV_INUSE);
+	top = p;
+	if ((unsigned long) (sz) >= (unsigned long) trim_threshold)
+	    malloc_trim(top_pad);
+	return;
     }
 
-    set_head(p, sz | PREV_INUSE);
-    top = p;
-    if ((unsigned long)(sz) >= (unsigned long)trim_threshold) 
-      malloc_trim(top_pad); 
-    return;
-  }
-
-  set_head(next, nextsz);                    /* clear inuse bit */
-
-  islr = 0;
-
-  if (!(hd & PREV_INUSE))                    /* consolidate backward */
-  {
-    prevsz = p->prev_size;
-    p = chunk_at_offset(p, -prevsz);
-    sz += prevsz;
-    
-    if (p->fd == last_remainder)             /* keep as last_remainder */
-      islr = 1;
-    else
-      unlink(p, bck, fwd);
-  }
-  
-  if (!(inuse_bit_at_offset(next, nextsz)))   /* consolidate forward */
-  {
-    sz += nextsz;
-    
-    if (!islr && next->fd == last_remainder)  /* re-insert last_remainder */
-    {
-      islr = 1;
-      link_last_remainder(p);   
+    set_head(next, nextsz);	/* clear inuse bit */
+
+    islr = 0;
+
+    if (!(hd & PREV_INUSE)) {	/* consolidate backward */
+	prevsz = p->prev_size;
+	p = chunk_at_offset(p, -prevsz);
+	sz += prevsz;
+
+	if (p->fd == last_remainder)	/* keep as last_remainder */
+	    islr = 1;
+	else
+	    unlink(p, bck, fwd);
     }
-    else
-      unlink(next, bck, fwd);
-  }
 
+    if (!(inuse_bit_at_offset(next, nextsz))) {	/* consolidate forward */
+	sz += nextsz;
 
-  set_head(p, sz | PREV_INUSE);
-  set_foot(p, sz);
-  if (!islr)
-    frontlink(p, sz, idx, bck, fwd);  
-}
+	if (!islr && next->fd == last_remainder) {	/* re-insert last_remainder */
+	    islr = 1;
+	    link_last_remainder(p);
+	} else
+	    unlink(next, bck, fwd);
+    }
 
 
+    set_head(p, sz | PREV_INUSE);
+    set_foot(p, sz);
+    if (!islr)
+	frontlink(p, sz, idx, bck, fwd);
+}
 
 
 
+
+
 /*
 
   Realloc algorithm:
@@ -2420,204 +2381,197 @@
 
 
 #if __STD_C
-Void_t* rEALLOc(Void_t* oldmem, size_t bytes)
+Void_t *rEALLOc(Void_t * oldmem, size_t bytes)
 #else
-Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
+Void_t *rEALLOc(oldmem, bytes)
+     Void_t *oldmem;
+     size_t bytes;
 #endif
 {
-  INTERNAL_SIZE_T    nb;      /* padded request size */
+    INTERNAL_SIZE_T nb;		/* padded request size */
 
-  mchunkptr oldp;             /* chunk corresponding to oldmem */
-  INTERNAL_SIZE_T    oldsize; /* its size */
+    mchunkptr oldp;		/* chunk corresponding to oldmem */
+    INTERNAL_SIZE_T oldsize;	/* its size */
 
-  mchunkptr newp;             /* chunk to return */
-  INTERNAL_SIZE_T    newsize; /* its size */
-  Void_t*   newmem;           /* corresponding user mem */
+    mchunkptr newp;		/* chunk to return */
+    INTERNAL_SIZE_T newsize;	/* its size */
+    Void_t *newmem;		/* corresponding user mem */
 
-  mchunkptr next;             /* next contiguous chunk after oldp */
-  INTERNAL_SIZE_T  nextsize;  /* its size */
+    mchunkptr next;		/* next contiguous chunk after oldp */
+    INTERNAL_SIZE_T nextsize;	/* its size */
 
-  mchunkptr prev;             /* previous contiguous chunk before oldp */
-  INTERNAL_SIZE_T  prevsize;  /* its size */
+    mchunkptr prev;		/* previous contiguous chunk before oldp */
+    INTERNAL_SIZE_T prevsize;	/* its size */
 
-  mchunkptr remainder;        /* holds split off extra space from newp */
-  INTERNAL_SIZE_T  remainder_size;   /* its size */
+    mchunkptr remainder;	/* holds split off extra space from newp */
+    INTERNAL_SIZE_T remainder_size;	/* its size */
 
-  mchunkptr bck;              /* misc temp for linking */
-  mchunkptr fwd;              /* misc temp for linking */
+    mchunkptr bck;		/* misc temp for linking */
+    mchunkptr fwd;		/* misc temp for linking */
 
 #ifdef REALLOC_ZERO_BYTES_FREES
-  if (bytes == 0) { fREe(oldmem); return 0; }
+    if (bytes == 0) {
+	fREe(oldmem);
+	return 0;
+    }
 #endif
 
 
-  /* realloc of null is supposed to be same as malloc */
-  if (oldmem == 0) return mALLOc(bytes);
+    /* realloc of null is supposed to be same as malloc */
+    if (oldmem == 0)
+	return mALLOc(bytes);
 
-  newp    = oldp    = mem2chunk(oldmem);
-  newsize = oldsize = chunksize(oldp);
+    newp = oldp = mem2chunk(oldmem);
+    newsize = oldsize = chunksize(oldp);
 
 
-  nb = request2size(bytes);
+    nb = request2size(bytes);
 
 #if HAVE_MMAP
-  if (chunk_is_mmapped(oldp)) 
-  {
+    if (chunk_is_mmapped(oldp)) {
 #if HAVE_MREMAP
-    newp = mremap_chunk(oldp, nb);
-    if(newp) return chunk2mem(newp);
-#endif
-    /* Note the extra SIZE_SZ overhead. */
-    if(oldsize - SIZE_SZ >= nb) return oldmem; /* do nothing */
-    /* Must alloc, copy, free. */
-    newmem = mALLOc(bytes);
-    if (newmem == 0) return 0; /* propagate failure */
-    MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ);
-    munmap_chunk(oldp);
-    return newmem;
-  }
+	newp = mremap_chunk(oldp, nb);
+	if (newp)
+	    return chunk2mem(newp);
+#endif
+	/* Note the extra SIZE_SZ overhead. */
+	if (oldsize - SIZE_SZ >= nb)
+	    return oldmem;	/* do nothing */
+	/* Must alloc, copy, free. */
+	newmem = mALLOc(bytes);
+	if (newmem == 0)
+	    return 0;		/* propagate failure */
+	MALLOC_COPY(newmem, oldmem, oldsize - 2 * SIZE_SZ);
+	munmap_chunk(oldp);
+	return newmem;
+    }
 #endif
 
-  check_inuse_chunk(oldp);
+    check_inuse_chunk(oldp);
 
-  if ((long)(oldsize) < (long)(nb))  
-  {
+    if ((long) (oldsize) < (long) (nb)) {
 
-    /* Try expanding forward */
+	/* Try expanding forward */
 
-    next = chunk_at_offset(oldp, oldsize);
-    if (next == top || !inuse(next)) 
-    {
-      nextsize = chunksize(next);
+	next = chunk_at_offset(oldp, oldsize);
+	if (next == top || !inuse(next)) {
+	    nextsize = chunksize(next);
+
+	    /* Forward into top only if a remainder */
+	    if (next == top) {
+		if ((long) (nextsize + newsize) >= (long) (nb + MINSIZE)) {
+		    newsize += nextsize;
+		    top = chunk_at_offset(oldp, nb);
+		    set_head(top, (newsize - nb) | PREV_INUSE);
+		    set_head_size(oldp, nb);
+		    return chunk2mem(oldp);
+		}
+	    }
 
-      /* Forward into top only if a remainder */
-      if (next == top)
-      {
-        if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE))
-        {
-          newsize += nextsize;
-          top = chunk_at_offset(oldp, nb);
-          set_head(top, (newsize - nb) | PREV_INUSE);
-          set_head_size(oldp, nb);
-          return chunk2mem(oldp);
-        }
-      }
-
-      /* Forward into next chunk */
-      else if (((long)(nextsize + newsize) >= (long)(nb)))
-      { 
-        unlink(next, bck, fwd);
-        newsize  += nextsize;
-        goto split;
-      }
-    }
-    else
-    {
-      next = 0;
-      nextsize = 0;
-    }
+	    /* Forward into next chunk */
+	    else if (((long) (nextsize + newsize) >= (long) (nb))) {
+		unlink(next, bck, fwd);
+		newsize += nextsize;
+		goto split;
+	    }
+	} else {
+	    next = 0;
+	    nextsize = 0;
+	}
 
-    /* Try shifting backwards. */
+	/* Try shifting backwards. */
 
-    if (!prev_inuse(oldp))
-    {
-      prev = prev_chunk(oldp);
-      prevsize = chunksize(prev);
+	if (!prev_inuse(oldp)) {
+	    prev = prev_chunk(oldp);
+	    prevsize = chunksize(prev);
+
+	    /* try forward + backward first to save a later consolidation */
+
+	    if (next != 0) {
+		/* into top */
+		if (next == top) {
+		    if ((long) (nextsize + prevsize + newsize) >=
+			(long) (nb + MINSIZE)) {
+			unlink(prev, bck, fwd);
+			newp = prev;
+			newsize += prevsize + nextsize;
+			newmem = chunk2mem(newp);
+			MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
+			top = chunk_at_offset(newp, nb);
+			set_head(top, (newsize - nb) | PREV_INUSE);
+			set_head_size(newp, nb);
+			return newmem;
+		    }
+		}
 
-      /* try forward + backward first to save a later consolidation */
+		/* into next chunk */
+		else if (((long) (nextsize + prevsize + newsize) >=
+			(long) (nb))) {
+		    unlink(next, bck, fwd);
+		    unlink(prev, bck, fwd);
+		    newp = prev;
+		    newsize += nextsize + prevsize;
+		    newmem = chunk2mem(newp);
+		    MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
+		    goto split;
+		}
+	    }
 
-      if (next != 0)
-      {
-        /* into top */
-        if (next == top)
-        {
-          if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE))
-          {
-            unlink(prev, bck, fwd);
-            newp = prev;
-            newsize += prevsize + nextsize;
-            newmem = chunk2mem(newp);
-            MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
-            top = chunk_at_offset(newp, nb);
-            set_head(top, (newsize - nb) | PREV_INUSE);
-            set_head_size(newp, nb);
-            return newmem;
-          }
-        }
-
-        /* into next chunk */
-        else if (((long)(nextsize + prevsize + newsize) >= (long)(nb)))
-        {
-          unlink(next, bck, fwd);
-          unlink(prev, bck, fwd);
-          newp = prev;
-          newsize += nextsize + prevsize;
-          newmem = chunk2mem(newp);
-          MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
-          goto split;
-        }
-      }
-      
-      /* backward only */
-      if (prev != 0 && (long)(prevsize + newsize) >= (long)nb)  
-      {
-        unlink(prev, bck, fwd);
-        newp = prev;
-        newsize += prevsize;
-        newmem = chunk2mem(newp);
-        MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
-        goto split;
-      }
-    }
-
-    /* Must allocate */
-
-    newmem = mALLOc (bytes);
+	    /* backward only */
+	    if (prev != 0 && (long) (prevsize + newsize) >= (long) nb) {
+		unlink(prev, bck, fwd);
+		newp = prev;
+		newsize += prevsize;
+		newmem = chunk2mem(newp);
+		MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
+		goto split;
+	    }
+	}
 
-    if (newmem == 0)  /* propagate failure */
-      return 0; 
+	/* Must allocate */
 
-    /* Avoid copy if newp is next chunk after oldp. */
-    /* (This can only happen when new chunk is sbrk'ed.) */
+	newmem = mALLOc(bytes);
 
-    if ( (newp = mem2chunk(newmem)) == next_chunk(oldp)) 
-    {
-      newsize += chunksize(newp);
-      newp = oldp;
-      goto split;
-    }
-
-    /* Otherwise copy, free, and exit */
-    MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
-    fREe(oldmem);
-    return newmem;
-  }
-
-
- split:  /* split off extra room in old or expanded chunk */
-
-  if (newsize - nb >= MINSIZE) /* split off remainder */
-  {
-    remainder = chunk_at_offset(newp, nb);
-    remainder_size = newsize - nb;
-    set_head_size(newp, nb);
-    set_head(remainder, remainder_size | PREV_INUSE);
-    set_inuse_bit_at_offset(remainder, remainder_size);
-    fREe(chunk2mem(remainder)); /* let free() deal with it */
-  }
-  else
-  {
-    set_head_size(newp, newsize);
-    set_inuse_bit_at_offset(newp, newsize);
-  }
+	if (newmem == 0)	/* propagate failure */
+	    return 0;
 
-  check_inuse_chunk(newp);
-  return chunk2mem(newp);
-}
+	/* Avoid copy if newp is next chunk after oldp. */
+	/* (This can only happen when new chunk is sbrk'ed.) */
+
+	if ((newp = mem2chunk(newmem)) == next_chunk(oldp)) {
+	    newsize += chunksize(newp);
+	    newp = oldp;
+	    goto split;
+	}
+
+	/* Otherwise copy, free, and exit */
+	MALLOC_COPY(newmem, oldmem, oldsize - SIZE_SZ);
+	fREe(oldmem);
+	return newmem;
+    }
 
 
+  split:			/* split off extra room in old or expanded chunk */
+
+    if (newsize - nb >= MINSIZE) {	/* split off remainder */
+	remainder = chunk_at_offset(newp, nb);
+	remainder_size = newsize - nb;
+	set_head_size(newp, nb);
+	set_head(remainder, remainder_size | PREV_INUSE);
+	set_inuse_bit_at_offset(remainder, remainder_size);
+	fREe(chunk2mem(remainder));	/* let free() deal with it */
+    } else {
+	set_head_size(newp, newsize);
+	set_inuse_bit_at_offset(newp, newsize);
+    }
+
+    check_inuse_chunk(newp);
+    return chunk2mem(newp);
+}
 
 
+
+
 /*
 
   memalign algorithm:
@@ -2638,103 +2592,108 @@
 
 
 #if __STD_C
-Void_t* mEMALIGn(size_t alignment, size_t bytes)
+Void_t *mEMALIGn(size_t alignment, size_t bytes)
 #else
-Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
+Void_t *mEMALIGn(alignment, bytes)
+     size_t alignment;
+     size_t bytes;
 #endif
 {
-  INTERNAL_SIZE_T    nb;      /* padded  request size */
-  char*     m;                /* memory returned by malloc call */
-  mchunkptr p;                /* corresponding chunk */
-  char*     brk;              /* alignment point within p */
-  mchunkptr newp;             /* chunk to return */
-  INTERNAL_SIZE_T  newsize;   /* its size */
-  INTERNAL_SIZE_T  leadsize;  /* leading space befor alignment point */
-  mchunkptr remainder;        /* spare room at end to split off */
-  long      remainder_size;   /* its size */
+    INTERNAL_SIZE_T nb;		/* padded  request size */
+    char *m;			/* memory returned by malloc call */
+    mchunkptr p;		/* corresponding chunk */
+    char *brk;			/* alignment point within p */
+    mchunkptr newp;		/* chunk to return */
+    INTERNAL_SIZE_T newsize;	/* its size */
+    INTERNAL_SIZE_T leadsize;	/* leading space befor alignment point */
+    mchunkptr remainder;	/* spare room at end to split off */
+    long remainder_size;	/* its size */
 
-  /* If need less alignment than we give anyway, just relay to malloc */
+    /* If need less alignment than we give anyway, just relay to malloc */
 
-  if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);
+    if (alignment <= MALLOC_ALIGNMENT)
+	return mALLOc(bytes);
 
-  /* Otherwise, ensure that it is at least a minimum chunk size */
-  
-  if (alignment <  MINSIZE) alignment = MINSIZE;
+    /* Otherwise, ensure that it is at least a minimum chunk size */
+
+    if (alignment < MINSIZE)
+	alignment = MINSIZE;
 
-  /* Call malloc with worst case padding to hit alignment. */
+    /* Call malloc with worst case padding to hit alignment. */
 
-  nb = request2size(bytes);
-  m  = (char*)(mALLOc(nb + alignment + MINSIZE));
+    nb = request2size(bytes);
+    m = (char *) (mALLOc(nb + alignment + MINSIZE));
 
-  if (m == 0) return 0; /* propagate failure */
+    if (m == 0)
+	return 0;		/* propagate failure */
 
-  p = mem2chunk(m);
+    p = mem2chunk(m);
 
-  if ((((unsigned long)(m)) % alignment) == 0) /* aligned */
-  {
+    if ((((unsigned long) (m)) % alignment) == 0) {	/* aligned */
 #if HAVE_MMAP
-    if(chunk_is_mmapped(p))
-      return chunk2mem(p); /* nothing more to do */
+	if (chunk_is_mmapped(p))
+	    return chunk2mem(p);	/* nothing more to do */
 #endif
-  }
-  else /* misaligned */
-  {
-    /* 
-      Find an aligned spot inside chunk.
-      Since we need to give back leading space in a chunk of at 
-      least MINSIZE, if the first calculation places us at
-      a spot with less than MINSIZE leader, we can move to the
-      next aligned spot -- we've allocated enough total room so that
-      this is always possible.
-    */
-
-    brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) & -alignment);
-    if ((long)(brk - (char*)(p)) < MINSIZE) brk = brk + alignment;
-
-    newp = (mchunkptr)brk;
-    leadsize = brk - (char*)(p);
-    newsize = chunksize(p) - leadsize;
+    } else {			/* misaligned */
+
+	/* 
+	 * Find an aligned spot inside chunk.
+	 * Since we need to give back leading space in a chunk of at 
+	 * least MINSIZE, if the first calculation places us at
+	 * a spot with less than MINSIZE leader, we can move to the
+	 * next aligned spot -- we've allocated enough total room so that
+	 * this is always possible.
+	 */
+
+	brk =
+	    (char *) mem2chunk(((unsigned long) (m + alignment -
+		  1)) & -alignment);
+	if ((long) (brk - (char *) (p)) < MINSIZE)
+	    brk = brk + alignment;
+
+	newp = (mchunkptr) brk;
+	leadsize = brk - (char *) (p);
+	newsize = chunksize(p) - leadsize;
 
 #if HAVE_MMAP
-    if(chunk_is_mmapped(p)) 
-    {
-      newp->prev_size = p->prev_size + leadsize;
-      set_head(newp, newsize|IS_MMAPPED);
-      return chunk2mem(newp);
-    }
+	if (chunk_is_mmapped(p)) {
+	    newp->prev_size = p->prev_size + leadsize;
+	    set_head(newp, newsize | IS_MMAPPED);
+	    return chunk2mem(newp);
+	}
 #endif
 
-    /* give back leader, use the rest */
+	/* give back leader, use the rest */
 
-    set_head(newp, newsize | PREV_INUSE);
-    set_inuse_bit_at_offset(newp, newsize);
-    set_head_size(p, leadsize);
-    fREe(chunk2mem(p));
-    p = newp;
+	set_head(newp, newsize | PREV_INUSE);
+	set_inuse_bit_at_offset(newp, newsize);
+	set_head_size(p, leadsize);
+	fREe(chunk2mem(p));
+	p = newp;
 
-    assert (newsize >= nb && (((unsigned long)(chunk2mem(p))) % alignment) == 0);
-  }
+	assert(newsize >= nb
+	    && (((unsigned long) (chunk2mem(p))) % alignment) == 0);
+    }
 
-  /* Also give back spare room at the end */
+    /* Also give back spare room at the end */
 
-  remainder_size = chunksize(p) - nb;
+    remainder_size = chunksize(p) - nb;
 
-  if (remainder_size >= (long)MINSIZE)
-  {
-    remainder = chunk_at_offset(p, nb);
-    set_head(remainder, remainder_size | PREV_INUSE);
-    set_head_size(p, nb);
-    fREe(chunk2mem(remainder));
-  }
+    if (remainder_size >= (long) MINSIZE) {
+	remainder = chunk_at_offset(p, nb);
+	set_head(remainder, remainder_size | PREV_INUSE);
+	set_head_size(p, nb);
+	fREe(chunk2mem(remainder));
+    }
 
-  check_inuse_chunk(p);
-  return chunk2mem(p);
+    check_inuse_chunk(p);
+    return chunk2mem(p);
 
 }
-
 
 
 
+
 /*
     valloc just invokes memalign with alignment argument equal
     to the page size of the system (or as near to this as can
@@ -2742,12 +2701,13 @@
 */
 
 #if __STD_C
-Void_t* vALLOc(size_t bytes)
+Void_t *vALLOc(size_t bytes)
 #else
-Void_t* vALLOc(bytes) size_t bytes;
+Void_t *vALLOc(bytes)
+     size_t bytes;
 #endif
 {
-  return mEMALIGn (malloc_getpagesize, bytes);
+    return mEMALIGn(malloc_getpagesize, bytes);
 }
 
 /* 
@@ -2757,13 +2717,14 @@
 
 
 #if __STD_C
-Void_t* pvALLOc(size_t bytes)
+Void_t *pvALLOc(size_t bytes)
 #else
-Void_t* pvALLOc(bytes) size_t bytes;
+Void_t *pvALLOc(bytes)
+     size_t bytes;
 #endif
 {
-  size_t pagesize = malloc_getpagesize;
-  return mEMALIGn (pagesize, (bytes + pagesize - 1) & ~(pagesize - 1));
+    size_t pagesize = malloc_getpagesize;
+    return mEMALIGn(pagesize, (bytes + pagesize - 1) & ~(pagesize - 1));
 }
 
 /*
@@ -2773,49 +2734,50 @@
 */
 
 #if __STD_C
-Void_t* cALLOc(size_t n, size_t elem_size)
+Void_t *cALLOc(size_t n, size_t elem_size)
 #else
-Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
+Void_t *cALLOc(n, elem_size)
+     size_t n;
+     size_t elem_size;
 #endif
 {
-  mchunkptr p;
-  INTERNAL_SIZE_T csz;
+    mchunkptr p;
+    INTERNAL_SIZE_T csz;
 
-  INTERNAL_SIZE_T sz = n * elem_size;
+    INTERNAL_SIZE_T sz = n * elem_size;
 
-  /* check if expand_top called, in which case don't need to clear */
+    /* check if expand_top called, in which case don't need to clear */
 #if MORECORE_CLEARS
-  mchunkptr oldtop = top;
-  INTERNAL_SIZE_T oldtopsize = chunksize(top);
+    mchunkptr oldtop = top;
+    INTERNAL_SIZE_T oldtopsize = chunksize(top);
 #endif
-  Void_t* mem = mALLOc (sz);
+    Void_t *mem = mALLOc(sz);
 
-  if (mem == 0) 
-    return 0;
-  else
-  {
-    p = mem2chunk(mem);
+    if (mem == 0)
+	return 0;
+    else {
+	p = mem2chunk(mem);
 
-    /* Two optional cases in which clearing not necessary */
+	/* Two optional cases in which clearing not necessary */
 
 
 #if HAVE_MMAP
-    if (chunk_is_mmapped(p)) return mem;
+	if (chunk_is_mmapped(p))
+	    return mem;
 #endif
 
-    csz = chunksize(p);
+	csz = chunksize(p);
 
 #if MORECORE_CLEARS
-    if (p == oldtop && csz > oldtopsize) 
-    {
-      /* clear only the bytes from non-freshly-sbrked memory */
-      csz = oldtopsize;
-    }
+	if (p == oldtop && csz > oldtopsize) {
+	    /* clear only the bytes from non-freshly-sbrked memory */
+	    csz = oldtopsize;
+	}
 #endif
 
-    MALLOC_ZERO(mem, csz - SIZE_SZ);
-    return mem;
-  }
+	MALLOC_ZERO(mem, csz - SIZE_SZ);
+	return mem;
+    }
 }
 
 /*
@@ -2827,17 +2789,18 @@
 
 #if !defined(INTERNAL_LINUX_C_LIB) || !defined(__ELF__)
 #if __STD_C
-void cfree(Void_t *mem)
+void cfree(Void_t * mem)
 #else
-void cfree(mem) Void_t *mem;
+void cfree(mem)
+     Void_t *mem;
 #endif
 {
-  free(mem);
+    free(mem);
 }
 #endif
-
 
 
+
 /*
 
     Malloc_trim gives memory back to the system (via negative
@@ -2864,61 +2827,57 @@
 #if __STD_C
 int malloc_trim(size_t pad)
 #else
-int malloc_trim(pad) size_t pad;
+int malloc_trim(pad)
+     size_t pad;
 #endif
 {
-  long  top_size;        /* Amount of top-most memory */
-  long  extra;           /* Amount to release */
-  char* current_brk;     /* address returned by pre-check sbrk call */
-  char* new_brk;         /* address returned by negative sbrk call */
-
-  unsigned long pagesz = malloc_getpagesize;
-
-  top_size = chunksize(top);
-  extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
-
-  if (extra < (long)pagesz)  /* Not enough memory to release */
-    return 0;
-
-  else
-  {
-    /* Test to make sure no one else called sbrk */
-    current_brk = (char*)(MORECORE (0));
-    if (current_brk != (char*)(top) + top_size)
-      return 0;     /* Apparently we don't own memory; must fail */
-
-    else
-    {
-      new_brk = (char*)(MORECORE (-extra));
-      
-      if (new_brk == (char*)(MORECORE_FAILURE)) /* sbrk failed? */
-      {
-        /* Try to figure out what we have */
-        current_brk = (char*)(MORECORE (0));
-        top_size = current_brk - (char*)top;
-        if (top_size >= (long)MINSIZE) /* if not, we are very very dead! */
-        {
-          sbrked_mem = current_brk - sbrk_base;
-          set_head(top, top_size | PREV_INUSE);
-        }
-        check_chunk(top);
-        return 0; 
-      }
-
-      else
-      {
-        /* Success. Adjust top accordingly. */
-        set_head(top, (top_size - extra) | PREV_INUSE);
-        sbrked_mem -= extra;
-        check_chunk(top);
-        return 1;
-      }
+    long top_size;		/* Amount of top-most memory */
+    long extra;			/* Amount to release */
+    char *current_brk;		/* address returned by pre-check sbrk call */
+    char *new_brk;		/* address returned by negative sbrk call */
+
+    unsigned long pagesz = malloc_getpagesize;
+
+    top_size = chunksize(top);
+    extra = ((top_size - pad - MINSIZE + (pagesz - 1)) / pagesz - 1) * pagesz;
+
+    if (extra < (long) pagesz)	/* Not enough memory to release */
+	return 0;
+
+    else {
+	/* Test to make sure no one else called sbrk */
+	current_brk = (char *) (MORECORE(0));
+	if (current_brk != (char *) (top) + top_size)
+	    return 0;		/* Apparently we don't own memory; must fail */
+
+	else {
+	    new_brk = (char *) (MORECORE(-extra));
+
+	    if (new_brk == (char *) (MORECORE_FAILURE)) {	/* sbrk failed? */
+		/* Try to figure out what we have */
+		current_brk = (char *) (MORECORE(0));
+		top_size = current_brk - (char *) top;
+		if (top_size >= (long) MINSIZE) {	/* if not, we are very very dead! */
+		    sbrked_mem = current_brk - sbrk_base;
+		    set_head(top, top_size | PREV_INUSE);
+		}
+		check_chunk(top);
+		return 0;
+	    }
+
+	    else {
+		/* Success. Adjust top accordingly. */
+		set_head(top, (top_size - extra) | PREV_INUSE);
+		sbrked_mem -= extra;
+		check_chunk(top);
+		return 1;
+	    }
+	}
     }
-  }
 }
-
 
 
+
 /*
   malloc_usable_size:
 
@@ -2931,72 +2890,70 @@
 */
 
 #if __STD_C
-size_t malloc_usable_size(Void_t* mem)
+size_t malloc_usable_size(Void_t * mem)
 #else
-size_t malloc_usable_size(mem) Void_t* mem;
+size_t malloc_usable_size(mem)
+     Void_t *mem;
 #endif
 {
-  mchunkptr p;
-  if (mem == 0)
-    return 0;
-  else
-  {
-    p = mem2chunk(mem);
-    if(!chunk_is_mmapped(p))
-    {
-      if (!inuse(p)) return 0;
-      check_inuse_chunk(p);
-      return chunksize(p) - SIZE_SZ;
+    mchunkptr p;
+    if (mem == 0)
+	return 0;
+    else {
+	p = mem2chunk(mem);
+	if (!chunk_is_mmapped(p)) {
+	    if (!inuse(p))
+		return 0;
+	    check_inuse_chunk(p);
+	    return chunksize(p) - SIZE_SZ;
+	}
+	return chunksize(p) - 2 * SIZE_SZ;
     }
-    return chunksize(p) - 2*SIZE_SZ;
-  }
 }
+
 
 
-
 
 /* Utility to update current_mallinfo for malloc_stats and mallinfo() */
 
-static void malloc_update_mallinfo() 
+static void malloc_update_mallinfo()
 {
-  int i;
-  mbinptr b;
-  mchunkptr p;
+    int i;
+    mbinptr b;
+    mchunkptr p;
 #if DEBUG
-  mchunkptr q;
+    mchunkptr q;
 #endif
 
-  INTERNAL_SIZE_T avail = chunksize(top);
-  int   navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0;
+    INTERNAL_SIZE_T avail = chunksize(top);
+    int navail = ((long) (avail) >= (long) MINSIZE) ? 1 : 0;
 
-  for (i = 1; i < NAV; ++i)
-  {
-    b = bin_at(i);
-    for (p = last(b); p != b; p = p->bk) 
-    {
+    for (i = 1; i < NAV; ++i) {
+	b = bin_at(i);
+	for (p = last(b); p != b; p = p->bk) {
 #if DEBUG
-      check_free_chunk(p);
-      for (q = next_chunk(p); 
-           q < top && inuse(q) && (long)(chunksize(q)) >= (long)MINSIZE; 
-           q = next_chunk(q))
-        check_inuse_chunk(q);
-#endif
-      avail += chunksize(p);
-      navail++;
-    }
-  }
-
-  current_mallinfo.ordblks = navail;
-  current_mallinfo.uordblks = sbrked_mem - avail;
-  current_mallinfo.fordblks = avail;
-  current_mallinfo.hblks = n_mmaps;
-  current_mallinfo.hblkhd = mmapped_mem;
-  current_mallinfo.keepcost = chunksize(top);
+	    check_free_chunk(p);
+	    for (q = next_chunk(p);
+		q < top && inuse(q) && (long) (chunksize(q)) >= (long) MINSIZE;
+		q = next_chunk(q))
+		check_inuse_chunk(q);
+#endif
+	    avail += chunksize(p);
+	    navail++;
+	}
+    }
 
-}
+    current_mallinfo.ordblks = navail;
+    current_mallinfo.uordblks = sbrked_mem - avail;
+    current_mallinfo.fordblks = avail;
+    current_mallinfo.hblks = n_mmaps;
+    current_mallinfo.hblkhd = mmapped_mem;
+    current_mallinfo.keepcost = chunksize(top);
 
+}
 
 
+
 /*
 
   malloc_stats:
@@ -3014,16 +2971,15 @@
 
 void malloc_stats()
 {
-  malloc_update_mallinfo();
-  fprintf(stderr, "max system bytes = %10u\n", 
-          (unsigned int)(max_total_mem));
-  fprintf(stderr, "system bytes     = %10u\n", 
-          (unsigned int)(sbrked_mem + mmapped_mem));
-  fprintf(stderr, "in use bytes     = %10u\n", 
-          (unsigned int)(current_mallinfo.uordblks + mmapped_mem));
+    malloc_update_mallinfo();
+    fprintf(stderr, "max system bytes = %10u\n",
+	(unsigned int) (max_total_mem));
+    fprintf(stderr, "system bytes     = %10u\n",
+	(unsigned int) (sbrked_mem + mmapped_mem));
+    fprintf(stderr, "in use bytes     = %10u\n",
+	(unsigned int) (current_mallinfo.uordblks + mmapped_mem));
 #if HAVE_MMAP
-  fprintf(stderr, "max mmap regions = %10u\n", 
-          (unsigned int)max_n_mmaps);
+    fprintf(stderr, "max mmap regions = %10u\n", (unsigned int) max_n_mmaps);
 #endif
 }
 
@@ -3033,12 +2989,12 @@
 
 struct mallinfo mALLINFo()
 {
-  malloc_update_mallinfo();
-  return current_mallinfo;
+    malloc_update_mallinfo();
+    return current_mallinfo;
 }
+
 
 
-
 
 /*
   mallopt:
@@ -3056,27 +3012,36 @@
 #if __STD_C
 int mALLOPt(int param_number, int value)
 #else
-int mALLOPt(param_number, value) int param_number; int value;
+int mALLOPt(param_number, value)
+     int param_number;
+     int value;
 #endif
 {
-  switch(param_number) 
-  {
+    switch (param_number) {
     case M_TRIM_THRESHOLD:
-      trim_threshold = value; return 1; 
+	trim_threshold = value;
+	return 1;
     case M_TOP_PAD:
-      top_pad = value; return 1; 
+	top_pad = value;
+	return 1;
     case M_MMAP_THRESHOLD:
-      mmap_threshold = value; return 1;
+	mmap_threshold = value;
+	return 1;
     case M_MMAP_MAX:
 #if HAVE_MMAP
-      n_mmaps_max = value; return 1;
+	n_mmaps_max = value;
+	return 1;
 #else
-      if (value != 0) return 0; else  n_mmaps_max = value; return 1;
+	if (value != 0)
+	    return 0;
+	else
+	    n_mmaps_max = value;
+	return 1;
 #endif
 
     default:
-      return 0;
-  }
+	return 0;
+    }
 }
 
 /*
@@ -3166,5 +3131,3 @@
          structure of old version,  but most details differ.)
 
 */
-
-
Index: squid/lib/drand48.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/drand48.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.122.1
diff -u -r1.1.1.2 -r1.1.1.2.122.1
--- squid/lib/drand48.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/drand48.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.122.1
@@ -1,5 +1,3 @@
-
-
 /* borrowed from libc/misc/drand48.c in Linux libc-5.4.46 this quick
  * hack by Martin Hamilton <martinh@gnu.org> to make Squid build on
  * Win32 with GNU-Win32 - sorry, folks! */
@@ -23,9 +21,11 @@
 #define C	0xB
 
 static void next(void);
-static unsigned x[3] =
-{X0, X1, X2}, a[3] =
-{A0, A1, A2}, c = C;
+static unsigned x[3] = { X0, X1, X2 }, a[3] =
+
+{
+A0, A1, A2}
+, c = C;
 
 double drand48(void);
 
Index: squid/lib/encrypt.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Attic/encrypt.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/lib/encrypt.c	6 Jan 2001 12:48:45 -0000	1.1.2.1
+++ squid/lib/encrypt.c	27 Aug 2001 21:48:18 -0000	1.1.2.1.2.1
@@ -1,6 +1,5 @@
 /* encrypt.c - providing 56 bit DES encryption
    Copyright (C) 1991 Jochen Obalek
-
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
@@ -29,295 +28,266 @@
 static char schluessel[16][KS];
 
 
-static char PC1[] =
-{
-  56, 48, 40, 32, 24, 16,  8,  0,
-  57, 49, 41, 33, 25, 17,  9,  1,
-  58, 50, 42, 34, 26, 18, 10,  2,
-  59, 51, 43, 35,
-  62, 54, 46, 38, 30, 22, 14,  6,
-  61, 53, 45, 37, 29, 21, 13,  5,
-  60, 52, 44, 36, 28, 20, 12,  4,
-  27, 19, 11,  3
+static char PC1[] = {
+    56, 48, 40, 32, 24, 16, 8, 0,
+    57, 49, 41, 33, 25, 17, 9, 1,
+    58, 50, 42, 34, 26, 18, 10, 2,
+    59, 51, 43, 35,
+    62, 54, 46, 38, 30, 22, 14, 6,
+    61, 53, 45, 37, 29, 21, 13, 5,
+    60, 52, 44, 36, 28, 20, 12, 4,
+    27, 19, 11, 3
 };
 
 
-static char PC2[] =
-{
-  13, 16, 10, 23,  0,  4,  2, 27,
-  14,  5, 20,  9, 22, 18, 11,  3,
-  25,  7, 15,  6, 26, 19, 12,  1,
-  40, 51, 30, 36, 46, 54, 29, 39,
-  50, 44, 32, 47, 43, 48, 38, 55,
-  33, 52, 45, 41, 49, 35, 28, 31
+static char PC2[] = {
+    13, 16, 10, 23, 0, 4, 2, 27,
+    14, 5, 20, 9, 22, 18, 11, 3,
+    25, 7, 15, 6, 26, 19, 12, 1,
+    40, 51, 30, 36, 46, 54, 29, 39,
+    50, 44, 32, 47, 43, 48, 38, 55,
+    33, 52, 45, 41, 49, 35, 28, 31
 };
 
 
-static char IP[] =
-{
-  57, 49, 41, 33, 25, 17,  9,  1,
-  59, 51, 43, 35, 27, 19, 11,  3,
-  61, 53, 45, 37, 29, 21, 13,  5,
-  63, 55, 47, 39, 31, 23, 15,  7,
-  56, 48, 40, 32, 24, 16,  8,  0,
-  58, 50, 42, 34, 26, 18, 10,  2,
-  60, 52, 44, 36, 28, 20, 12,  4,
-  62, 54, 46, 38, 30, 22, 14,  6
+static char IP[] = {
+    57, 49, 41, 33, 25, 17, 9, 1,
+    59, 51, 43, 35, 27, 19, 11, 3,
+    61, 53, 45, 37, 29, 21, 13, 5,
+    63, 55, 47, 39, 31, 23, 15, 7,
+    56, 48, 40, 32, 24, 16, 8, 0,
+    58, 50, 42, 34, 26, 18, 10, 2,
+    60, 52, 44, 36, 28, 20, 12, 4,
+    62, 54, 46, 38, 30, 22, 14, 6
 };
 
 
-static char EP[] =
-{
-   7, 39, 15, 47, 23, 55, 31, 63,
-   6, 38, 14, 46, 22, 54, 30, 62,
-   5, 37, 13, 45, 21, 53, 29, 61,
-   4, 36, 12, 44, 20, 52, 28, 60,
-   3, 35, 11, 43, 19, 51, 27, 59,
-   2, 34, 10, 42, 18, 50, 26, 58,
-   1, 33,  9, 41, 17, 49, 25, 57,
-   0, 32,  8, 40, 16, 48, 24, 56
+static char EP[] = {
+    7, 39, 15, 47, 23, 55, 31, 63,
+    6, 38, 14, 46, 22, 54, 30, 62,
+    5, 37, 13, 45, 21, 53, 29, 61,
+    4, 36, 12, 44, 20, 52, 28, 60,
+    3, 35, 11, 43, 19, 51, 27, 59,
+    2, 34, 10, 42, 18, 50, 26, 58,
+    1, 33, 9, 41, 17, 49, 25, 57,
+    0, 32, 8, 40, 16, 48, 24, 56
 };
 
 
-static char E0[] =
-{
-  31,  0,  1,  2,  3,  4,  3,  4,
-   5,  6,  7,  8,  7,  8,  9, 10,
-  11, 12, 11, 12, 13, 14, 15, 16,
-  15, 16, 17, 18, 19, 20, 19, 20,
-  21, 22, 23, 24, 23, 24, 25, 26,
-  27, 28, 27, 28, 29, 30, 31,  0
+static char E0[] = {
+    31, 0, 1, 2, 3, 4, 3, 4,
+    5, 6, 7, 8, 7, 8, 9, 10,
+    11, 12, 11, 12, 13, 14, 15, 16,
+    15, 16, 17, 18, 19, 20, 19, 20,
+    21, 22, 23, 24, 23, 24, 25, 26,
+    27, 28, 27, 28, 29, 30, 31, 0
 };
 
 
 static char E[KS];
 
 
-static char PERM[] =
-{
-  15,  6, 19, 20, 28, 11, 27, 16,
-   0, 14, 22, 25,  4, 17, 30,  9,
-   1,  7, 23, 13, 31, 26,  2,  8,
-  18, 12, 29,  5, 21, 10,  3, 24
+static char PERM[] = {
+    15, 6, 19, 20, 28, 11, 27, 16,
+    0, 14, 22, 25, 4, 17, 30, 9,
+    1, 7, 23, 13, 31, 26, 2, 8,
+    18, 12, 29, 5, 21, 10, 3, 24
 };
 
 
-static char S_BOX[][64] =
-{
-  {
-    14,  0,  4, 15, 13,  7,  1,  4,  2, 14, 15,  2, 11, 13,  8,  1,
-     3, 10, 10,  6,  6, 12, 12, 11,  5,  9,  9,  5,  0,  3,  7,  8,
-     4, 15,  1, 12, 14,  8,  8,  2, 13,  4,  6,  9,  2,  1, 11,  7,
-    15,  5, 12, 11,  9,  3,  7, 14,  3, 10, 10,  0,  5,  6,  0, 13
-  },
-  {
-    15,  3,  1, 13,  8,  4, 14,  7,  6, 15, 11,  2,  3,  8,  4, 14,
-     9, 12,  7,  0,  2,  1, 13, 10, 12,  6,  0,  9,  5, 11, 10,  5,
-     0, 13, 14,  8,  7, 10, 11,  1, 10,  3,  4, 15, 13,  4,  1,  2,
-     5, 11,  8,  6, 12,  7,  6, 12,  9,  0,  3,  5,  2, 14, 15,  9
-  },
-  {
-    10, 13,  0,  7,  9,  0, 14,  9,  6,  3,  3,  4, 15,  6,  5, 10,
-     1,  2, 13,  8, 12,  5,  7, 14, 11, 12,  4, 11,  2, 15,  8,  1,
-    13,  1,  6, 10,  4, 13,  9,  0,  8,  6, 15,  9,  3,  8,  0,  7,
-    11,  4,  1, 15,  2, 14, 12,  3,  5, 11, 10,  5, 14,  2,  7, 12
-  },
-  {
-     7, 13, 13,  8, 14, 11,  3,  5,  0,  6,  6, 15,  9,  0, 10,  3,
-     1,  4,  2,  7,  8,  2,  5, 12, 11,  1, 12, 10,  4, 14, 15,  9,
-    10,  3,  6, 15,  9,  0,  0,  6, 12, 10, 11,  1,  7, 13, 13,  8,
-    15,  9,  1,  4,  3,  5, 14, 11,  5, 12,  2,  7,  8,  2,  4, 14
-  },
-  {
-     2, 14, 12, 11,  4,  2,  1, 12,  7,  4, 10,  7, 11, 13,  6,  1,
-     8,  5,  5,  0,  3, 15, 15, 10, 13,  3,  0,  9, 14,  8,  9,  6,
-     4, 11,  2,  8,  1, 12, 11,  7, 10,  1, 13, 14,  7,  2,  8, 13,
-    15,  6,  9, 15, 12,  0,  5,  9,  6, 10,  3,  4,  0,  5, 14,  3
-  },
-  {
-    12, 10,  1, 15, 10,  4, 15,  2,  9,  7,  2, 12,  6,  9,  8,  5,
-     0,  6, 13,  1,  3, 13,  4, 14, 14,  0,  7, 11,  5,  3, 11,  8,
-     9,  4, 14,  3, 15,  2,  5, 12,  2,  9,  8,  5, 12, 15,  3, 10,
-     7, 11,  0, 14,  4,  1, 10,  7,  1,  6, 13,  0, 11,  8,  6, 13
-  },
-  {
-     4, 13, 11,  0,  2, 11, 14,  7, 15,  4,  0,  9,  8,  1, 13, 10,
-     3, 14, 12,  3,  9,  5,  7, 12,  5,  2, 10, 15,  6,  8,  1,  6,
-     1,  6,  4, 11, 11, 13, 13,  8, 12,  1,  3,  4,  7, 10, 14,  7,
-    10,  9, 15,  5,  6,  0,  8, 15,  0, 14,  5,  2,  9,  3,  2, 12
-  },
-  {
-    13,  1,  2, 15,  8, 13,  4,  8,  6, 10, 15,  3, 11,  7,  1,  4,
-    10, 12,  9,  5,  3,  6, 14, 11,  5,  0,  0, 14, 12,  9,  7,  2,
-     7,  2, 11,  1,  4, 14,  1,  7,  9,  4, 12, 10, 14,  8,  2, 13,
-     0, 15,  6, 12, 10,  9, 13,  0, 15,  3,  3,  5,  5,  6,  8, 11
-  }
+static char S_BOX[][64] = {
+    {
+	    14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,
+	    3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,
+	    4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,
+	15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13},
+    {
+	    15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
+	    9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,
+	    0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,
+	5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9},
+    {
+	    10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,
+	    1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,
+	    13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,
+	11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12},
+    {
+	    7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,
+	    1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,
+	    10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,
+	15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14},
+    {
+	    2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,
+	    8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,
+	    4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,
+	15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3},
+    {
+	    12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,
+	    0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,
+	    9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,
+	7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13},
+    {
+	    4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,
+	    3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,
+	    1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,
+	10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12},
+    {
+	    13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,
+	    10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,
+	    7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,
+	0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11}
 };
 
-static void 
-perm (a, e, pc, n)
+static void
+perm(a, e, pc, n)
      register char *a, *e;
      register char *pc;
      int n;
 {
-  for (; n--; pc++, a++)
-    *a = e[*pc];
+    for (; n--; pc++, a++)
+	*a = e[*pc];
 }
 
-static void 
-crypt_main (nachr_l, nachr_r, schl)
+static void
+crypt_main(nachr_l, nachr_r, schl)
      register char *nachr_l, *nachr_r;
      register char *schl;
 {
-  char tmp[KS];
-  register int sbval;
-  register char *tp = tmp;
-  register char *e = E;
-  register int i, j;
-
-  for (i = 0; i < 8; i++)
-    {
-      for (j = 0, sbval = 0; j < 6; j++)
-	sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++);
-      sbval = S_BOX[i][sbval];
-      for (tp += 4, j = 4; j--; sbval >>= 1)
-	*--tp = sbval & 1;
-      tp += 4;
+    char tmp[KS];
+    register int sbval;
+    register char *tp = tmp;
+    register char *e = E;
+    register int i, j;
+
+    for (i = 0; i < 8; i++) {
+	for (j = 0, sbval = 0; j < 6; j++)
+	    sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++);
+	sbval = S_BOX[i][sbval];
+	for (tp += 4, j = 4; j--; sbval >>= 1)
+	    *--tp = sbval & 1;
+	tp += 4;
     }
 
-  e = PERM;
-  for (i = 0; i < BS2; i++)
-    *nachr_l++ ^= tmp[*e++];
+    e = PERM;
+    for (i = 0; i < BS2; i++)
+	*nachr_l++ ^= tmp[*e++];
 }
 
-void 
-encrypt (char *nachr, int decr)
+void
+encrypt(char *nachr, int decr)
 {
-  char (*schl)[KS] = decr ? schluessel + 15 : schluessel;
-  char tmp[BS];
-  int i;
-
-  perm (tmp, nachr, IP, BS);
-
-  for (i = 8; i--;)
-    {
-      crypt_main (tmp, tmp + BS2, *schl);
-      if (decr)
-	schl--;
-      else
-	schl++;
-      crypt_main (tmp + BS2, tmp, *schl);
-      if (decr)
-	schl--;
-      else
-	schl++;
+    char (*schl)[KS] = decr ? schluessel + 15 : schluessel;
+    char tmp[BS];
+    int i;
+
+    perm(tmp, nachr, IP, BS);
+
+    for (i = 8; i--;) {
+	crypt_main(tmp, tmp + BS2, *schl);
+	if (decr)
+	    schl--;
+	else
+	    schl++;
+	crypt_main(tmp + BS2, tmp, *schl);
+	if (decr)
+	    schl--;
+	else
+	    schl++;
     }
 
-  perm (nachr, tmp, EP, BS);
+    perm(nachr, tmp, EP, BS);
 }
 
-void 
-setkey (char *schl)
+void
+setkey(char *schl)
 {
-  char tmp1[IS];
-  register unsigned int ls = 0x7efc;
-  register int i, j, k;
-  register int shval = 0;
-  register char *akt_schl;
-
-  memcpy (E, E0, KS);
-  perm (tmp1, schl, PC1, IS);
-
-  for (i = 0; i < 16; i++)
-    {
-      shval += 1 + (ls & 1);
-      akt_schl = schluessel[i];
-      for (j = 0; j < KS; j++)
-	{
-	  if ((k = PC2[j]) >= IS2)
-	    {
-	      if ((k += shval) >= IS)
-		k = (k - IS2) % IS2 + IS2;
-	    }
-	  else if ((k += shval) >= IS2)
-	    k %= IS2;
-	  *akt_schl++ = tmp1[k];
+    char tmp1[IS];
+    register unsigned int ls = 0x7efc;
+    register int i, j, k;
+    register int shval = 0;
+    register char *akt_schl;
+
+    memcpy(E, E0, KS);
+    perm(tmp1, schl, PC1, IS);
+
+    for (i = 0; i < 16; i++) {
+	shval += 1 + (ls & 1);
+	akt_schl = schluessel[i];
+	for (j = 0; j < KS; j++) {
+	    if ((k = PC2[j]) >= IS2) {
+		if ((k += shval) >= IS)
+		    k = (k - IS2) % IS2 + IS2;
+	    } else if ((k += shval) >= IS2)
+		k %= IS2;
+	    *akt_schl++ = tmp1[k];
 	}
-      ls >>= 1;
+	ls >>= 1;
     }
 }
 
 char *
-crypt (const char *wort, const char *salt)
+crypt(const char *wort, const char *salt)
 {
-  static char retkey[14];
-  char key[BS + 2];
-  char *k;
-  int tmp, keybyte;
-  int i, j;
-
-  memset (key, 0, BS + 2);
-
-  for (k = key, i = 0; i < BS; i++)
-    {
-      if (!(keybyte = *wort++))
-	break;
-      k += 7;
-      for (j = 0; j < 7; j++, i++)
-	{
-	  *--k = keybyte & 1;
-	  keybyte >>= 1;
+    static char retkey[14];
+    char key[BS + 2];
+    char *k;
+    int tmp, keybyte;
+    int i, j;
+
+    memset(key, 0, BS + 2);
+
+    for (k = key, i = 0; i < BS; i++) {
+	if (!(keybyte = *wort++))
+	    break;
+	k += 7;
+	for (j = 0; j < 7; j++, i++) {
+	    *--k = keybyte & 1;
+	    keybyte >>= 1;
 	}
-      k += 8;
+	k += 8;
     }
 
-  setkey (key);
-  memset (key, 0, BS + 2);
+    setkey(key);
+    memset(key, 0, BS + 2);
 
-  for (k = E, i = 0; i < 2; i++)
-    {
-      retkey[i] = keybyte = *salt++;
-      if (keybyte > 'Z')
-	keybyte -= 'a' - 'Z' - 1;
-      if (keybyte > '9')
-	keybyte -= 'A' - '9' - 1;
-      keybyte -= '.';
-
-      for (j = 0; j < 6; j++, keybyte >>= 1, k++)
-	{
-	  if (!(keybyte & 1))
-	    continue;
-	  tmp = *k;
-	  *k = k[24];
-	  k[24] = tmp;
+    for (k = E, i = 0; i < 2; i++) {
+	retkey[i] = keybyte = *salt++;
+	if (keybyte > 'Z')
+	    keybyte -= 'a' - 'Z' - 1;
+	if (keybyte > '9')
+	    keybyte -= 'A' - '9' - 1;
+	keybyte -= '.';
+
+	for (j = 0; j < 6; j++, keybyte >>= 1, k++) {
+	    if (!(keybyte & 1))
+		continue;
+	    tmp = *k;
+	    *k = k[24];
+	    k[24] = tmp;
 	}
     }
 
-  for (i = 0; i < 25; i++)
-    encrypt (key, 0);
+    for (i = 0; i < 25; i++)
+	encrypt(key, 0);
 
-  for (k = key, i = 0; i < 11; i++)
-    {
-      for (j = keybyte = 0; j < 6; j++)
-	{
-	  keybyte <<= 1;
-	  keybyte |= *k++;
+    for (k = key, i = 0; i < 11; i++) {
+	for (j = keybyte = 0; j < 6; j++) {
+	    keybyte <<= 1;
+	    keybyte |= *k++;
 	}
 
-      keybyte += '.';
-      if (keybyte > '9')
-	keybyte += 'A' - '9' - 1;
-      if (keybyte > 'Z')
-	keybyte += 'a' - 'Z' - 1;
-      retkey[i + 2] = keybyte;
+	keybyte += '.';
+	if (keybyte > '9')
+	    keybyte += 'A' - '9' - 1;
+	if (keybyte > 'Z')
+	    keybyte += 'a' - 'Z' - 1;
+	retkey[i + 2] = keybyte;
     }
 
-  retkey[i + 2] = 0;
+    retkey[i + 2] = 0;
 
-  if (!retkey[1])
-    retkey[1] = *retkey;
+    if (!retkey[1])
+	retkey[1] = *retkey;
 
-  return retkey;
+    return retkey;
 }
-
-
Index: squid/lib/getfullhostname.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/getfullhostname.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/lib/getfullhostname.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.4.1.2.1
+++ squid/lib/getfullhostname.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: getfullhostname.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: getfullhostname.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
Index: squid/lib/hash.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/hash.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/lib/hash.c	6 Jan 2001 12:40:10 -0000	1.1.1.3.4.1.2.1
+++ squid/lib/hash.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: hash.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: hash.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -313,8 +312,7 @@
     xfree(hid);
 }
 
-static int hash_primes[] =
-{
+static int hash_primes[] = {
     103,
     229,
     467,
@@ -375,8 +373,7 @@
 
     while (fgets(buf, BUFSIZ, stdin)) {
 	buf[strlen(buf) - 1] = '\0';
-	printf("Inserting '%s' for item %p to hash table: %d\n",
-	    buf, buf, hid);
+	printf("Inserting '%s' for item %p to hash table: %d\n", buf, buf, hid);
 	hash_insert(hid, xstrdup(buf), (void *) 0x12345678);
 	if (random() % 17 == 0)
 	    strcpy(todelete, buf);
Index: squid/lib/heap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/heap.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/lib/heap.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.4.1.2.1
+++ squid/lib/heap.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: heap.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: heap.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
@@ -185,7 +184,7 @@
 	(void) 0;
     } else if (hp->last > 0) {
 	if (lastNode->key < hp->nodes[Parent(lastNode->id)]->key)
-	    _heap_ify_up(hp, lastNode);		/* COOL! */
+	    _heap_ify_up(hp, lastNode);	/* COOL! */
 	_heap_ify_down(hp, lastNode);
     }
     return data;
Index: squid/lib/html_quote.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/html_quote.c,v
retrieving revision 1.1.30.1.2.1
retrieving revision 1.1.30.1.2.1.2.1
diff -u -r1.1.30.1.2.1 -r1.1.30.1.2.1.2.1
--- squid/lib/html_quote.c	6 Jan 2001 12:40:10 -0000	1.1.30.1.2.1
+++ squid/lib/html_quote.c	27 Aug 2001 21:48:18 -0000	1.1.30.1.2.1.2.1
@@ -47,33 +47,28 @@
 /*  
  *  HTML defines these characters as special entities that should be quoted.
  */
-static struct {
+static struct
+{
     unsigned char code;
     char *quote;
-} htmlstandardentities[] =
-
+}
+htmlstandardentities[] =
 {
     /* NOTE: The quoted form MUST not be larger than 6 character.
      * see close to the MemPool commend below
      */
     {
-	'<', "&lt;"
-    },
-    {
-	'>', "&gt;"
-    },
-    {
-	'"', "&quot;"
-    },
-    {
-	'&', "&amp;"
-    },
-    {
-	'\'', "&#39;"
-    },
-    {
-	0, NULL
-    }
+    '<', "&lt;"}
+    , {
+    '>', "&gt;"}
+    , {
+    '"', "&quot;"}
+    , {
+    '&', "&amp;"}
+    , {
+    '\'', "&#39;"}
+    , {
+    0, NULL}
 };
 
 /*
@@ -114,7 +109,8 @@
 	 * sure all 8-bit characters are encoded to protect from buggy
 	 * clients
 	 */
-	if (!escape && (ch <= 0x1F || ch >= 0x7f) && ch != '\n' && ch != '\r' && ch != '\t') {
+	if (!escape && (ch <= 0x1F || ch >= 0x7f) && ch != '\n' && ch != '\r'
+	    && ch != '\t') {
 	    static char dec_encoded[7];
 	    snprintf(dec_encoded, sizeof dec_encoded, "&#%3d;", (int) ch);
 	    escape = dec_encoded;
Index: squid/lib/md5-test.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/md5-test.c,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/lib/md5-test.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.44.1
+++ squid/lib/md5-test.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: md5-test.c,v 1.1.1.1.44.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: md5-test.c,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 /*
@@ -45,10 +45,8 @@
     MDString("abc");
     MDString("message digest");
     MDString("abcdefghijklmnopqrstuvwxyz");
-    MDString
-	("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
-    MDString
-	("1234567890123456789012345678901234567890\
+    MDString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
+    MDString("1234567890123456789012345678901234567890\
 1234567890123456789012345678901234567890");
     return 0;
 }
Index: squid/lib/md5.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/md5.c,v
retrieving revision 1.1.1.2.30.1
retrieving revision 1.1.1.2.30.1.2.1
diff -u -r1.1.1.2.30.1 -r1.1.1.2.30.1.2.1
--- squid/lib/md5.c	6 Jan 2001 12:40:10 -0000	1.1.1.2.30.1
+++ squid/lib/md5.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.30.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: md5.c,v 1.1.1.2.30.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: md5.c,v 1.1.1.2.30.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 /* taken from RFC-1321/Appendix A.3 */
@@ -79,8 +79,7 @@
 static void MD5_memset(char *, int, unsigned int);
 #endif
 
-static unsigned char PADDING[64] =
-{
+static unsigned char PADDING[64] = {
     0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Index: squid/lib/radix.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/radix.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/lib/radix.c	6 Jan 2001 12:40:10 -0000	1.1.1.2.4.1.2.1
+++ squid/lib/radix.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: radix.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: radix.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 53     Radix tree data structure implementation
  * AUTHOR: NetBSD Derived
@@ -118,7 +118,7 @@
 struct radix_node_head *mask_rnhead;
 static char *addmask_key;
 static unsigned char normal_chars[] =
-{0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF};
+    { 0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF };
 static char *rn_zeros, *rn_ones;
 
 #define rn_masktop (mask_rnhead->rnh_treetop)
@@ -184,8 +184,7 @@
     register caddr_t v = v_arg, m = m_arg;
 
     for (x = head; x->rn_b >= 0;) {
-	if ((x->rn_bmask & m[x->rn_off]) &&
-	    (x->rn_bmask & v[x->rn_off]))
+	if ((x->rn_bmask & m[x->rn_off]) && (x->rn_bmask & v[x->rn_off]))
 	    x = x->rn_r;
 	else
 	    x = x->rn_l;
@@ -241,8 +240,7 @@
     return x;
 }
 
-static
-int
+static int
 rn_satsifies_leaf(trial, leaf, skip)
      char *trial;
      register struct radix_node *leaf;
@@ -618,9 +616,7 @@
 	for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) {
 	    if (tt->rn_mask == netmask)
 		return (0);
-	    if (netmask == 0 ||
-		(tt->rn_mask &&
-		    ((b_leaf < tt->rn_b) ||	/* index(netmask) > node */
+	    if (netmask == 0 || (tt->rn_mask && ((b_leaf < tt->rn_b) ||	/* index(netmask) > node */
 			rn_refines(netmask, tt->rn_mask) ||
 			rn_lexobetter(netmask, tt->rn_mask))))
 		break;
@@ -719,8 +715,7 @@
 	if (m->rm_flags & RNF_NORMAL) {
 	    mmask = m->rm_leaf->rn_mask;
 	    if (tt->rn_flags & RNF_NORMAL) {
-		fprintf(stderr,
-		    "Non-unique normal route, mask not entered");
+		fprintf(stderr, "Non-unique normal route, mask not entered");
 		return tt;
 	    }
 	} else
@@ -756,8 +751,7 @@
     vlen = *(u_char *) v;
     saved_tt = tt;
     top = x;
-    if (tt == 0 ||
-	memcmp(v + head_off, tt->rn_key + head_off, vlen - head_off))
+    if (tt == 0 || memcmp(v + head_off, tt->rn_key + head_off, vlen - head_off))
 	return (0);
     /*
      * Delete our route from mask lists.
@@ -1002,8 +996,7 @@
 	    max_keylen = dom->dom_maxrtkey;
 #endif
     if (max_keylen == 0) {
-	fprintf(stderr,
-	    "rn_init: radix functions require max_keylen be set\n");
+	fprintf(stderr, "rn_init: radix functions require max_keylen be set\n");
 	return;
     }
     R_Malloc(rn_zeros, char *, 3 * max_keylen);
Index: squid/lib/readdir.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Attic/readdir.c,v
retrieving revision 1.1.78.1
retrieving revision 1.1.78.1.2.1
diff -u -r1.1.78.1 -r1.1.78.1.2.1
--- squid/lib/readdir.c	8 Jul 2001 10:31:59 -0000	1.1.78.1
+++ squid/lib/readdir.c	27 Aug 2001 21:48:18 -0000	1.1.78.1.2.1
@@ -1,4 +1,3 @@
-
 #include <malloc.h>
 #include <string.h>
 #include <errno.h>
@@ -18,7 +17,8 @@
  * The DIR typedef is not compatible with Unix.
  **********************************************************************/
 
-DIR * opendir(const char *dir)
+DIR *
+opendir(const char *dir)
 {
     DIR *dp;
     char *filespec;
@@ -29,19 +29,19 @@
     strcpy(filespec, dir);
     index = strlen(filespec) - 1;
     if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\'))
-        filespec[index] = '\0';
+	filespec[index] = '\0';
     strcat(filespec, "/*");
 
-    dp = (DIR *)malloc(sizeof(DIR));
+    dp = (DIR *) malloc(sizeof(DIR));
     dp->offset = 0;
     dp->finished = 0;
     dp->dir = strdup(dir);
 
     if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0) {
-        if (errno == ENOENT)
-            dp->finished = 1;
-        else
-        return NULL;
+	if (errno == ENOENT)
+	    dp->finished = 1;
+	else
+	    return NULL;
     }
 
     dp->handle = handle;
@@ -50,15 +50,17 @@
     return dp;
 }
 
-struct dirent * readdir(DIR *dp)
+struct dirent *
+readdir(DIR * dp)
 {
-    if (!dp || dp->finished) return NULL;
+    if (!dp || dp->finished)
+	return NULL;
 
     if (dp->offset != 0) {
-        if (_findnext(dp->handle, &(dp->fileinfo)) < 0) {
-            dp->finished = 1;
-            return NULL;
-        }
+	if (_findnext(dp->handle, &(dp->fileinfo)) < 0) {
+	    dp->finished = 1;
+	    return NULL;
+	}
     }
     dp->offset++;
 
@@ -70,12 +72,16 @@
     return &(dp->dent);
 }
 
-int closedir(DIR *dp)
+int
+closedir(DIR * dp)
 {
-    if (!dp) return 0;
+    if (!dp)
+	return 0;
     _findclose(dp->handle);
-    if (dp->dir) free(dp->dir);
-    if (dp) free(dp);
+    if (dp->dir)
+	free(dp->dir);
+    if (dp)
+	free(dp);
 
     return 0;
 }
Index: squid/lib/rfc1035.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1035.c,v
retrieving revision 1.1.1.1.4.3.2.1
retrieving revision 1.1.1.1.4.3.2.1.2.1
diff -u -r1.1.1.1.4.3.2.1 -r1.1.1.1.4.3.2.1.2.1
--- squid/lib/rfc1035.c	6 Jan 2001 12:40:10 -0000	1.1.1.1.4.3.2.1
+++ squid/lib/rfc1035.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.3.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: rfc1035.c,v 1.1.1.1.4.3.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: rfc1035.c,v 1.1.1.1.4.3.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
@@ -78,7 +77,8 @@
 
 int rfc1035_errno;
 const char *rfc1035_error_message;
-struct _rfc1035_header {
+struct _rfc1035_header
+{
     unsigned short id;
     unsigned int qr:1;
     unsigned int opcode:4;
@@ -191,10 +191,7 @@
  */
 static off_t
 rfc1035QuestionPack(char *buf,
-    size_t sz,
-    const char *name,
-    unsigned short type,
-    unsigned short class)
+    size_t sz, const char *name, unsigned short type, unsigned short class)
 {
     off_t off = 0;
     unsigned short s;
@@ -377,9 +374,7 @@
 
 int
 rfc1035AnswersUnpack(const char *buf,
-    size_t sz,
-    rfc1035_rr ** records,
-    unsigned short *id)
+    size_t sz, rfc1035_rr ** records, unsigned short *id)
 {
     off_t off = 0;
     int l;
@@ -478,10 +473,7 @@
     h.qdcount = (unsigned int) 1;
     offset += rfc1035HeaderPack(buf + offset, sz - offset, &h);
     offset += rfc1035QuestionPack(buf + offset,
-	sz - offset,
-	hostname,
-	RFC1035_TYPE_A,
-	RFC1035_CLASS_IN);
+	sz - offset, hostname, RFC1035_TYPE_A, RFC1035_CLASS_IN);
     assert(offset <= sz);
     *szp = (size_t) offset;
     return h.id;
@@ -508,10 +500,7 @@
     memset(&h, '\0', sizeof(h));
     i = (unsigned int) ntohl(addr.s_addr);
     snprintf(rev, 32, "%u.%u.%u.%u.in-addr.arpa.",
-	i & 255,
-	(i >> 8) & 255,
-	(i >> 16) & 255,
-	(i >> 24) & 255);
+	i & 255, (i >> 8) & 255, (i >> 16) & 255, (i >> 24) & 255);
     h.id = rfc1035Qid();
     h.qr = 0;
     h.rd = 1;
@@ -519,10 +508,7 @@
     h.qdcount = (unsigned int) 1;
     offset += rfc1035HeaderPack(buf + offset, sz - offset, &h);
     offset += rfc1035QuestionPack(buf + offset,
-	sz - offset,
-	rev,
-	RFC1035_TYPE_PTR,
-	RFC1035_CLASS_IN);
+	sz - offset, rev, RFC1035_TYPE_PTR, RFC1035_CLASS_IN);
     assert(offset <= sz);
     *szp = (size_t) offset;
     return h.id;
@@ -598,10 +584,7 @@
 	    int i;
 	    int n;
 	    rfc1035_rr *answers = NULL;
-	    n = rfc1035AnswersUnpack(rbuf,
-		rl,
-		&answers,
-		&rid);
+	    n = rfc1035AnswersUnpack(rbuf, rl, &answers, &rid);
 	    if (rid != sid) {
 		printf("ERROR, ID mismatch (%#hx, %#hx)\n", sid, rid);
 	    } else if (n < 0) {
Index: squid/lib/rfc1123.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1123.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/lib/rfc1123.c	8 Jul 2001 10:31:59 -0000	1.1.1.3.4.1.2.3
+++ squid/lib/rfc1123.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: rfc1123.c,v 1.1.1.3.4.1.2.3 2001/07/08 10:31:59 serassio Exp $
+ * $Id: rfc1123.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -74,8 +73,7 @@
 static int make_month(const char *s);
 static int make_num(const char *s);
 
-static char *month_names[12] =
-{
+static char *month_names[12] = {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
@@ -119,7 +117,7 @@
 	return 0;
     if (tm->tm_mon < 0 || tm->tm_mon > 11)
 	return 0;
-    if (tm->tm_year < 70 || tm->tm_year > 120)
+    if (tm->tm_year < 70 || tm->tm_year > 130)
 	return 0;
     return 1;
 }
@@ -148,13 +146,15 @@
     memset(&tm, '\0', sizeof(tm));
     tm.tm_mday = make_num(s);
     tm.tm_mon = make_month(s + 3);
-    tm.tm_year = make_num(s + 7);
+    tm.tm_year = atoi(s + 7);
     /*
      * Y2K: Arjan de Vet <Arjan.deVet@adv.IAEhv.nl>
      * if tm.tm_year < 70, assume it's after the year 2000.
      */
     if (tm.tm_year < 70)
 	tm.tm_year += 100;
+    else if (tm.tm_year > 1900)
+	tm.tm_year -= 1900;
     tm.tm_hour = make_num(s + 10);
     tm.tm_min = make_num(s + 13);
     tm.tm_sec = make_num(s + 16);
@@ -257,10 +257,11 @@
     {
 	time_t dst = 0;
 #if defined (_TIMEZONE)
+#error defined
 #elif defined (_timezone)
+#error defined
 #elif defined(_SQUID_AIX_)
 #elif defined(_SQUID_CYGWIN_)
-#elif defined(_SQUID_MSWIN_)
 #else
 	extern time_t timezone;
 #endif
@@ -270,7 +271,8 @@
 	 */
 	if (tm->tm_isdst > 0)
 	    dst = -3600;
-#if defined ( _timezone) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+#if defined ( _timezone) || defined(_SQUID_CYGWIN_)
+#error defined
 	t -= (_timezone + dst);
 #else
 	t -= (timezone + dst);
@@ -324,8 +326,7 @@
 
     len = strftime(buf, 127 - 5, "%d/%b/%Y:%H:%M:%S ", lt);
     snprintf(buf + len, 128 - len, "%+03d%02d",
-	(min_offset / 60) % 24,
-	min_offset % 60);
+	(min_offset / 60) % 24, min_offset % 60);
 #else /* USE_GMT */
     buf[0] = '\0';
     strftime(buf, 127, "%d/%b/%Y:%H:%M:%S -000", gmt);
Index: squid/lib/rfc1738.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1738.c,v
retrieving revision 1.1.1.2.4.1.2.2
retrieving revision 1.1.1.2.4.1.2.2.2.1
diff -u -r1.1.1.2.4.1.2.2 -r1.1.1.2.4.1.2.2.2.1
--- squid/lib/rfc1738.c	25 Mar 2001 17:49:42 -0000	1.1.1.2.4.1.2.2
+++ squid/lib/rfc1738.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.4.1.2.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1738.c,v 1.1.1.2.4.1.2.2 2001/03/25 17:49:42 serassio Exp $
+ * $Id: rfc1738.c,v 1.1.1.2.4.1.2.2.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -48,8 +48,7 @@
  *  RFC 1738 defines that these characters should be escaped, as well
  *  any non-US-ASCII character or anything between 0x00 - 0x1F.
  */
-static char rfc1738_unsafe_chars[] =
-{
+static char rfc1738_unsafe_chars[] = {
     (char) 0x3C,		/* < */
     (char) 0x3E,		/* > */
     (char) 0x22,		/* " */
@@ -70,8 +69,7 @@
     (char) 0x20			/* space */
 };
 
-static char rfc1738_reserved_chars[] =
-{
+static char rfc1738_reserved_chars[] = {
     (char) 0x3b,		/* ; */
     (char) 0x2f,		/* / */
     (char) 0x3f,		/* ? */
@@ -113,7 +111,8 @@
 	if (encode_reserved >= 0 && *p == '%')
 	    do_escape = 1;
 	/* RFC 1738 defines these chars as reserved */
-	for (i = 0; i < sizeof(rfc1738_reserved_chars) && encode_reserved > 0; i++) {
+	for (i = 0; i < sizeof(rfc1738_reserved_chars) && encode_reserved > 0;
+	    i++) {
 	    if (*p == rfc1738_reserved_chars[i]) {
 		do_escape = 1;
 		break;
Index: squid/lib/safe_inet_addr.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/safe_inet_addr.c,v
retrieving revision 1.1.1.3.30.1
retrieving revision 1.1.1.3.30.1.2.1
diff -u -r1.1.1.3.30.1 -r1.1.1.3.30.1.2.1
--- squid/lib/safe_inet_addr.c	6 Jan 2001 12:40:10 -0000	1.1.1.3.30.1
+++ squid/lib/safe_inet_addr.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.30.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: safe_inet_addr.c,v 1.1.1.3.30.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: safe_inet_addr.c,v 1.1.1.3.30.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 #include "config.h"
Index: squid/lib/snprintf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/snprintf.c,v
retrieving revision 1.1.1.3.30.1
retrieving revision 1.1.1.3.30.1.2.1
diff -u -r1.1.1.3.30.1 -r1.1.1.3.30.1.2.1
--- squid/lib/snprintf.c	6 Jan 2001 12:40:10 -0000	1.1.1.3.30.1
+++ squid/lib/snprintf.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.30.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: snprintf.c,v 1.1.1.3.30.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: snprintf.c,v 1.1.1.3.30.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 /* ====================================================================
@@ -196,7 +196,7 @@
     for (i = ndigit - 1; i > 0 && p1[i] == '0'; i--)
 	ndigit--;
     if ((decpt >= 0 && decpt - ndigit > 4)
-	|| (decpt < 0 && decpt < -3)) {		/* use E-style */
+	|| (decpt < 0 && decpt < -3)) {	/* use E-style */
 	decpt--;
 	*p2++ = *p1++;
 	*p2++ = '.';
@@ -241,9 +241,11 @@
 
 #endif /* HAVE_CVT */
 
-typedef enum {
+typedef enum
+{
     NO = 0, YES = 1
-} boolean_e;
+}
+boolean_e;
 
 #define FALSE			0
 #define TRUE			1
@@ -272,7 +274,8 @@
 /*
  * Descriptor for buffer area
  */
-struct buf_area {
+struct buf_area
+{
     char *buf_end;
     char *nextb;		/* pointer to next byte to read/write   */
 };
@@ -408,7 +411,8 @@
  */
 static char *
 conv_fp(register char format, register double num,
-    boolean_e add_dp, int precision, bool_int * is_negative, char *buf, int *len)
+    boolean_e add_dp, int precision, bool_int * is_negative, char *buf,
+    int *len)
 {
     register char *s = buf;
     register char *p;
@@ -519,8 +523,7 @@
  * Do format conversion placing the output in buffer
  */
 static int
-format_converter(register buffy * odp, const char *fmt,
-    va_list ap)
+format_converter(register buffy * odp, const char *fmt, va_list ap)
 {
     register char *sp;
     register char *bep;
@@ -533,9 +536,11 @@
 
     register int min_width = 0;
     int precision = 0;
-    enum {
+    enum
+    {
 	LEFT, RIGHT
-    } adjust;
+    }
+    adjust;
     char pad_char;
     char prefix_char;
 
@@ -698,8 +703,7 @@
 		    ui_num = va_arg(ap, u_wide_int);
 		else
 		    ui_num = (u_wide_int) va_arg(ap, unsigned int);
-		s = conv_p2(ui_num, 3, *fmt,
-		    &num_buf[NUM_BUF_SIZE], &s_len);
+		s = conv_p2(ui_num, 3, *fmt, &num_buf[NUM_BUF_SIZE], &s_len);
 		FIX_PRECISION(adjust_precision, precision, s, s_len);
 		if (alternate_form && *s != '0') {
 		    *--s = '0';
@@ -714,8 +718,7 @@
 		    ui_num = (u_wide_int) va_arg(ap, u_wide_int);
 		else
 		    ui_num = (u_wide_int) va_arg(ap, unsigned int);
-		s = conv_p2(ui_num, 4, *fmt,
-		    &num_buf[NUM_BUF_SIZE], &s_len);
+		s = conv_p2(ui_num, 4, *fmt, &num_buf[NUM_BUF_SIZE], &s_len);
 		FIX_PRECISION(adjust_precision, precision, s, s_len);
 		if (alternate_form && i_num != 0) {
 		    *--s = *fmt;	/* 'x' or 'X' */
@@ -814,8 +817,7 @@
 		ui_num = (u_wide_int) va_arg(ap, char *);
 
 		if (sizeof(char *) <= sizeof(u_wide_int))
-		         s = conv_p2(ui_num, 4, 'x',
-			&num_buf[NUM_BUF_SIZE], &s_len);
+		    s = conv_p2(ui_num, 4, 'x', &num_buf[NUM_BUF_SIZE], &s_len);
 		else {
 		    s = "%p";
 		    s_len = 2;
@@ -888,8 +890,7 @@
  * because size_t is unsigned on some platforms
  */
 static void
-strx_printv(int *ccp, char *buf, size_t len, const char *format,
-    va_list ap)
+strx_printv(int *ccp, char *buf, size_t len, const char *format, va_list ap)
 {
     buffy od;
     int cc;
@@ -922,7 +923,7 @@
  * if len == 0, silently return
  */
 int
-snprintf(char *buf, size_t len, const char *format,...)
+snprintf(char *buf, size_t len, const char *format, ...)
 {
     int cc = 0;
     va_list ap;
Index: squid/lib/splay.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/splay.c,v
retrieving revision 1.1.1.2.2.1
retrieving revision 1.1.1.2.2.1.2.1
diff -u -r1.1.1.2.2.1 -r1.1.1.2.2.1.2.1
--- squid/lib/splay.c	6 Jan 2001 12:40:10 -0000	1.1.1.2.2.1
+++ squid/lib/splay.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.c,v 1.1.1.2.2.1 2001/01/06 12:40:10 hno Exp $
+ * $Id: splay.c,v 1.1.1.2.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 #include "config.h"
@@ -148,9 +148,11 @@
 
 #ifdef DRIVER
 
-typedef struct {
+typedef struct
+{
     int i;
-} intnode;
+}
+intnode;
 
 int
 compareint(void *a, splayNode * n)
Index: squid/lib/tempnam.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/tempnam.c,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/lib/tempnam.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/lib/tempnam.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: tempnam.c,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: tempnam.c,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 /* A reasonably functional tmpnam. */
@@ -61,10 +61,10 @@
 {
     static const char digits[] =
 #if (L_tmpnam >= L_tmpmin + LONG_BIT / 4)
-    "0123456789abcdef";
+	"0123456789abcdef";
 #define TMP_BASE	16
 #else
-    "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
+	"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
 #define TMP_BASE	64
 #endif
     static unsigned long lastcount = 0;
Index: squid/lib/util.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/util.c,v
retrieving revision 1.1.1.3.4.2.2.2
retrieving revision 1.1.1.3.4.2.2.2.2.1
diff -u -r1.1.1.3.4.2.2.2 -r1.1.1.3.4.2.2.2.2.1
--- squid/lib/util.c	28 Jul 2001 10:18:13 -0000	1.1.1.3.4.2.2.2
+++ squid/lib/util.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.2.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: util.c,v 1.1.1.3.4.2.2.2 2001/07/28 10:18:13 serassio Exp $
+ * $Id: util.c,v 1.1.1.3.4.2.2.2.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -76,15 +75,16 @@
 #if !defined(__CYGWIN__)
 extern int sys_nerr;
 #else
-extern __declspec(dllimport) int sys_nerr;
+extern
+__declspec(dllimport)
+     int sys_nerr;
 #endif
 
 #if MEM_GEN_TRACE
 
-static FILE *tracefp = NULL;
+     static FILE *tracefp = NULL;
 
-void
-log_trace_init(char *fn)
+     void log_trace_init(char *fn)
 {
     tracefp = fopen(fn, "a+");
     if (!tracefp) {
@@ -317,7 +317,8 @@
 	    (int) mi - last_mallinfo, (int) mi,
 	    xmalloc_file, xmalloc_line, xmalloc_func);
 	if (sign < 0)
-	    fprintf(stderr, " (%d %s:%d)\n", malloc_number(p), malloc_file_name(p), malloc_line_number(p));
+	    fprintf(stderr, " (%d %s:%d)\n", malloc_number(p),
+		malloc_file_name(p), malloc_line_number(p));
 	else
 	    fprintf(stderr, " %d\n", xmalloc_count);
     }
@@ -349,7 +350,8 @@
 			    malloc_line[B][I], malloc_size[B][I],
 			    malloc_count[B][I]);
 			sum += malloc_size[B][I];
-			xmalloc_scan_region(malloc_ptrs[B][I], malloc_size[B][I], depth + 1);
+			xmalloc_scan_region(malloc_ptrs[B][I],
+			    malloc_size[B][I], depth + 1);
 			if (depth == 0) {
 			    if (sum != malloc_size[B][I])
 				fprintf(stderr, "=== %d bytes\n", sum);
@@ -358,9 +360,9 @@
 #if XMALLOC_SHOW_ALL_REFERENCES
 		    } else {
 			/* We have already scanned this pointer... */
-			fprintf(stderr, "%*s%p %s:%d size %d allocation %d ... (%d)\n",
-			    depth * 2, "",
-			    malloc_ptrs[B][I], malloc_file[B][I],
+			fprintf(stderr,
+			    "%*s%p %s:%d size %d allocation %d ... (%d)\n",
+			    depth * 2, "", malloc_ptrs[B][I], malloc_file[B][I],
 			    malloc_line[B][I], malloc_size[B][I],
 			    malloc_count[B][I], malloc_refs[B][I]);
 #endif
@@ -539,8 +541,9 @@
 	sz = 1;
     if ((p = calloc(n, sz)) == NULL) {
 	if (failure_notify) {
-	    snprintf(msg, 128, "xcalloc: Unable to allocate %d blocks of %d bytes!\n",
-		(int) n, (int) sz);
+	    snprintf(msg, 128,
+		"xcalloc: Unable to allocate %d blocks of %d bytes!\n", (int) n,
+		(int) sz);
 	    (*failure_notify) (msg);
 	} else {
 	    perror("xcalloc");
@@ -581,7 +584,7 @@
     }
     /* copy string, including terminating character */
     sz = strlen(s) + 1;
-    return (char *)memcpy(xmalloc(sz), s, sz);
+    return (char *) memcpy(xmalloc(sz), s, sz);
 }
 
 /*
@@ -596,7 +599,7 @@
     sz = strlen(s) + 1;
     if (sz > n)
 	sz = n;
-    return (char *)xstrncpy((char *)xmalloc(sz), s, sz);
+    return (char *) xstrncpy((char *) xmalloc(sz), s, sz);
 }
 
 /*
@@ -607,7 +610,11 @@
 {
     static char xstrerror_buf[BUFSIZ];
     if (errno < 0 || errno >= sys_nerr)
+#ifdef _SQUID_MSWIN_
+	strncpy(xstrerror_buf, wsastrerror(errno), BUFSIZ);
+#else
 	snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno);
+#endif
     else
 	snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno));
     return xstrerror_buf;
@@ -620,12 +627,16 @@
 const char *
 xbstrerror(int err)
 {
-    static char xbstrerror_buf[BUFSIZ];
+    static char xstrerror_buf[BUFSIZ];
     if (err < 0 || err >= sys_nerr)
-	snprintf(xbstrerror_buf, BUFSIZ, "(%d) Unknown", errno);
+#ifdef _SQUID_MSWIN_
+	strncpy(xstrerror_buf, wsastrerror(err), BUFSIZ);
+#else
+	snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", err);
+#endif
     else
-	snprintf(xbstrerror_buf, BUFSIZ, "(%d) %s", err, strerror(err));
-    return xbstrerror_buf;
+	snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", err, strerror(err));
+    return xstrerror_buf;
 }
 #endif
 
@@ -642,15 +653,13 @@
 int
 tvSubMsec(struct timeval t1, struct timeval t2)
 {
-    return (t2.tv_sec - t1.tv_sec) * 1000 +
-	(t2.tv_usec - t1.tv_usec) / 1000;
+    return (t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000;
 }
 
 int
 tvSubUsec(struct timeval t1, struct timeval t2)
 {
-    return (t2.tv_sec - t1.tv_sec) * 1000000 +
-	(t2.tv_usec - t1.tv_usec);
+    return (t2.tv_sec - t1.tv_sec) * 1000000 + (t2.tv_usec - t1.tv_usec);
 }
 
 double
Index: squid/lib/uudecode.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/uudecode.c,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/lib/uudecode.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/lib/uudecode.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: uudecode.c,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: uudecode.c,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  */
 
 #include "config.h"
@@ -8,18 +8,27 @@
 extern char **environ;
 
 /* aaaack but it's fast and const should make it shared text page. */
-const int pr2six[256] =
-{
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
-    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
-    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 26, 27,
-    28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+const int pr2six[256] = {
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    62, 64, 64, 64, 63,
+    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2,
+    3, 4, 5, 6, 7, 8, 9,
+    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64,
+    64, 64, 64, 26, 27,
+    28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+    47, 48, 49, 50, 51,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+    64, 64, 64, 64, 64,
     64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
 };
 
@@ -45,7 +54,7 @@
     nprbytes = (char *) bufin - bufcoded - 1;
     nbytesdecoded = ((nprbytes + 3) / 4) * 3;
 
-    bufplain = (char*)xmalloc(nbytesdecoded + 1);
+    bufplain = (char *) xmalloc(nbytesdecoded + 1);
     bufout = (unsigned char *) bufplain;
     bufin = (const unsigned char *) bufcoded;
 
Index: squid/lib/win32lib.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/win32lib.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.4.2.1
diff -u -r1.1.2.4 -r1.1.2.4.2.1
--- squid/lib/win32lib.c	28 Jul 2001 10:18:13 -0000	1.1.2.4
+++ squid/lib/win32lib.c	27 Aug 2001 21:48:18 -0000	1.1.2.4.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: win32lib.c,v 1.1.2.4 2001/07/28 10:18:13 serassio Exp $
+ * $Id: win32lib.c,v 1.1.2.4.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * * * * * * * * Legal stuff * * * * * * *
  *
@@ -26,6 +26,9 @@
 /* The following code section is part of an EXPERIMENTAL native */
 /* Windows NT/2000 Squid port - Compiles only on MS Visual C++  */
 #if defined(_SQUID_MSWIN_)
+#undef assert
+#include <assert.h>
+
 #include <stdio.h>
 #include <windows.h>
 #include <process.h>
@@ -36,72 +39,201 @@
 #define OPTERRNF (2)
 #define OPTERRARG (3)
 
+__declspec(thread) int ws32_result;
+
 char *optarg;
 int optreset = 0;
 int optind = 1;
 int opterr = 1;
 int optopt;
 
-int chroot (const char *dirname)
+int
+chroot(const char *dirname)
 {
-	if (SetCurrentDirectory(dirname))
-		return 0;
-	else
-		return GetLastError();
+    if (SetCurrentDirectory(dirname))
+	return 0;
+    else
+	return GetLastError();
+}
+
+static void
+EnableDebugPrivileges(void)
+{
+    HANDLE hToken;
+    LUID sedebugnameValue;
+    TOKEN_PRIVILEGES tkp;
+
+    if (!OpenProcessToken(GetCurrentProcess(),
+	    TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
+	return;
+
+    if (!LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &sedebugnameValue)) {
+	CloseHandle(hToken);
+	return;
+    }
+
+    tkp.PrivilegeCount = 1;
+    tkp.Privileges[0].Luid = sedebugnameValue;
+    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+
+    AdjustTokenPrivileges(hToken, FALSE, &tkp, sizeof tkp, NULL, NULL);
+
+    CloseHandle(hToken);
+}
+
+typedef struct kill_params
+{
+    BOOL retval;
+    int sig;
+        FARPROC(WINAPI * GetProcAddress) (HMODULE hModule, LPCSTR lpProcName);
+        HMODULE(WINAPI * GetModuleHandle) (LPCTSTR lpModuleName);
+    char procname[64];
 }
+kill_params;
 
-int kill(pid_t pid, int sig)
+static DWORD WINAPI
+signalSquid(kill_params * params)
 {
-   	HANDLE hProcess;
+    int (WINAPI * _WIN32_sendSignal) (int WIN32_signal);
+    HANDLE hModule;
+
+    params->retval = FALSE;
+    hModule = params->GetModuleHandle(NULL);
+    if (hModule) {
+	(FARPROC) _WIN32_sendSignal = params->GetProcAddress(hModule, params->procname);
+	if (_WIN32_sendSignal)
+	    params->retval = _WIN32_sendSignal(params->sig);
+    }
+    return 0;
+}
 
-	if (sig == 0) {
-		if ((hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
-		    PROCESS_VM_READ,
-		    FALSE, pid)) == NULL)
-				return -1;
-		else {
-        	CloseHandle(hProcess);
-			return 0;
-		}
+int
+kill(pid_t pid, int sig)
+{
+    HANDLE hProcess;
+    HANDLE hThread = NULL;
+    HMODULE hLib = NULL;
+    int retval = -1;
+    kill_params *rparams = NULL, lparams;
+    LPVOID code = NULL, params = NULL;
+    DWORD rc;
+
+    EnableDebugPrivileges();
+
+    if (NULL == (hProcess =
+	    OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION |
+		PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ,
+		FALSE, pid))) {
+	goto cleanup;
+    }
+
+    if (sig == 0) {
+	retval = 0;
+	goto cleanup;
+    }
+
+    if (!(rparams =
+	    VirtualAllocEx(hProcess, 0, 512, MEM_COMMIT,
+	PAGE_EXECUTE_READWRITE))) goto cleanup;
+
+    code = (char *) rparams + sizeof(kill_params);
+
+    if (!WriteProcessMemory(hProcess, code, &signalSquid,
+	    512 - sizeof(kill_params), 0))
+	goto cleanup;
+
+    lparams.retval = FALSE;
+    lparams.sig = sig;
+    strcpy(lparams.procname, "WIN32_sendSignal");
+
+    if (!(hLib = LoadLibrary("kernel32.dll")))
+	goto cleanup;
+    if (!((FARPROC) lparams.GetModuleHandle =
+	    GetProcAddress(hLib, "GetModuleHandleA")))
+	goto cleanup;
+    if (!((FARPROC) lparams.GetProcAddress =
+	    GetProcAddress(hLib, "GetProcAddress")))
+	goto cleanup;
+
+    if (!WriteProcessMemory(hProcess, rparams, &lparams, sizeof(lparams), 0))
+	goto cleanup;
+
+    if (!(hThread =
+	    CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) code,
+		rparams, 0, &rc)))
+	goto cleanup;
+
+    rc = WaitForSingleObject(hThread, 3000);
+    switch (rc) {
+    case WAIT_OBJECT_0:
+	if (!ReadProcessMemory(hProcess, rparams, &lparams, sizeof(lparams),
+		&rc)) {
+	    goto cleanup;
 	}
-	else return 0;
+	if (lparams.retval) {
+	    retval = 0;
+	    printf("Signal %d sent to process %ld\n", sig, pid);
+	}
+	break;
+    case WAIT_TIMEOUT:
+    case WAIT_FAILED:
+    default:
+	break;
+    }
+
+  cleanup:
+    rc = GetLastError();
+    if (retval && sig)
+	fprintf(stderr, "GetLastError(): %ld ", rc);
+    _dosmaperr(rc);
+
+    if (hLib)
+	FreeLibrary(hLib);
+    if (hThread)
+	CloseHandle(hThread);
+    if (rparams)
+	VirtualFreeEx(hProcess, rparams, 0, MEM_RELEASE);
+    CloseHandle(hProcess);
+
+    return retval;
 }
 
-void gettimeofday( struct timeval * pcur_time,void * tz){
-	struct _timeb current;
-	_ftime(&current);
-	pcur_time->tv_sec=current.time;
-	pcur_time->tv_usec=current.millitm * 1000;
+int
+gettimeofday(struct timeval *pcur_time, void *tz)
+{
+    struct _timeb current;
+    _ftime(&current);
+    pcur_time->tv_sec = current.time;
+    pcur_time->tv_usec = current.millitm * 1000;
+    return 0;
 }
 
-int statfs(const char *path, struct statfs *sfs)
+int
+statfs(const char *path, struct statfs *sfs)
 {
     char drive[4];
     DWORD spc, bps, freec, totalc;
     DWORD vsn, maxlen, flags;
 
-    if (!sfs)
-    {
-		errno=EINVAL;
-		return -1;
-    }
-
-    strncpy(drive,path,2);
-	drive[2]='\0';
-	strcat(drive,"\\");
-
-	if (!GetDiskFreeSpace(drive, &spc, &bps, &freec, &totalc))
-    {
-      errno=ENOENT;
-      return -1;
-    }
-    if (!GetVolumeInformation(drive, NULL, 0, &vsn, &maxlen, &flags, NULL, 0))
-    {
-      errno=ENOENT;
-      return -1;
+    if (!sfs) {
+	errno = EINVAL;
+	return -1;
+    }
+
+    strncpy(drive, path, 2);
+    drive[2] = '\0';
+    strcat(drive, "\\");
+
+    if (!GetDiskFreeSpace(drive, &spc, &bps, &freec, &totalc)) {
+	errno = ENOENT;
+	return -1;
+    }
+    if (!GetVolumeInformation(drive, NULL, 0, &vsn, &maxlen, &flags, NULL, 0)) {
+	errno = ENOENT;
+	return -1;
     }
     sfs->f_type = flags;
-    sfs->f_bsize = spc*bps;
+    sfs->f_bsize = spc * bps;
     sfs->f_blocks = totalc;
     sfs->f_bfree = sfs->f_bavail = freec;
     sfs->f_files = -1;
@@ -111,214 +243,190 @@
     return 0;
 }
 
-int mkdir(const char * path, mode_t mode)
-
-{
-    if (CreateDirectory(path, NULL) != 0)
-	return 0;
-    else
-	return -1;
-}
-
-
-
 static int
-optiserr(int argc, char * const *argv, int oint, const char *optstr,
-         int optchr, int err)
+optiserr(int argc, char *const *argv, int oint, const char *optstr,
+    int optchr, int err)
 {
-    if(opterr)
-    {
-        fprintf(stderr, "Error in argument %d, char %d: ", oint, optchr+1);
-        switch(err)
-        {
-        case OPTERRCOLON:
-            fprintf(stderr, ": in flags\n");
-            break;
-        case OPTERRNF:
-            fprintf(stderr, "option not found %c\n", argv[oint][optchr]);
-            break;
-        case OPTERRARG:
-            fprintf(stderr, "no argument for option %c\n", argv[oint][optchr]);
-            break;
-        default:
-            fprintf(stderr, "unknown\n");
-            break;
-        }
+    if (opterr) {
+	fprintf(stderr, "Error in argument %d, char %d: ", oint, optchr + 1);
+	switch (err) {
+	case OPTERRCOLON:
+	    fprintf(stderr, ": in flags\n");
+	    break;
+	case OPTERRNF:
+	    fprintf(stderr, "option not found %c\n", argv[oint][optchr]);
+	    break;
+	case OPTERRARG:
+	    fprintf(stderr, "no argument for option %c\n", argv[oint][optchr]);
+	    break;
+	default:
+	    fprintf(stderr, "unknown\n");
+	    break;
+	}
     }
     optopt = argv[oint][optchr];
-    return('?');
+    return ('?');
 }
-    
 
 int
-getopt(int argc, char* const *argv, const char *optstr)
+getopt(int argc, char *const *argv, const char *optstr)
 {
     static int optchr = 0;
-    static int dash = 0; /* have already seen the - */
+    static int dash = 0;	/* have already seen the - */
 
     char *cp;
 
     if (optreset)
-        optreset = optchr = dash = 0;
-    if(optind >= argc)
-        return(EOF);
-    if(!dash && (argv[optind][0] !=  '-'))
-        return(EOF);
-    if(!dash && (argv[optind][0] ==  '-') && !argv[optind][1])
-    {
-        /*
-         * use to specify stdin. Need to let pgm process this and
-         * the following args
-         */
-        return(EOF);
-    }
-    if((argv[optind][0] == '-') && (argv[optind][1] == '-'))
-    {
-        /* -- indicates end of args */
-        optind++;
-        return(EOF);
-    }
-    if(!dash)
-    {
-        assert((argv[optind][0] == '-') && argv[optind][1]);
-        dash = 1;
-        optchr = 1;
+	optreset = optchr = dash = 0;
+    if (optind >= argc)
+	return (EOF);
+    if (!dash && (argv[optind][0] != '-'))
+	return (EOF);
+    if (!dash && (argv[optind][0] == '-') && !argv[optind][1]) {
+	/*
+	 * use to specify stdin. Need to let pgm process this and
+	 * the following args
+	 */
+	return (EOF);
+    }
+    if ((argv[optind][0] == '-') && (argv[optind][1] == '-')) {
+	/* -- indicates end of args */
+	optind++;
+	return (EOF);
+    }
+    if (!dash) {
+	assert((argv[optind][0] == '-') && argv[optind][1]);
+	dash = 1;
+	optchr = 1;
     }
 
     /* Check if the guy tries to do a -: kind of flag */
     assert(dash);
-    if(argv[optind][optchr] == ':')
-    {
-        dash = 0;
-        optind++;
-        return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRCOLON));
-    }
-    if(!(cp = strchr(optstr, argv[optind][optchr])))
-    {
-        int errind = optind;
-        int errchr = optchr;
-
-        if(!argv[optind][optchr+1])
-        {
-            dash = 0;
-            optind++;
-        }
-        else
-            optchr++;
-        return(optiserr(argc, argv, errind, optstr, errchr, OPTERRNF));
-    }
-    if(cp[1] == ':')
-    {
-        dash = 0;
-        optind++;
-        if(optind == argc)
-            return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRARG));
-        optarg = argv[optind++];
-        return(*cp);
-    }
-    else
-    {
-        if(!argv[optind][optchr+1])
-        {
-            dash = 0;
-            optind++;
-        }
-        else
-            optchr++;
-        return(*cp);
+    if (argv[optind][optchr] == ':') {
+	dash = 0;
+	optind++;
+	return (optiserr(argc, argv, optind - 1, optstr, optchr, OPTERRCOLON));
+    }
+    if (!(cp = strchr(optstr, argv[optind][optchr]))) {
+	int errind = optind;
+	int errchr = optchr;
+
+	if (!argv[optind][optchr + 1]) {
+	    dash = 0;
+	    optind++;
+	} else
+	    optchr++;
+	return (optiserr(argc, argv, errind, optstr, errchr, OPTERRNF));
+    }
+    if (cp[1] == ':') {
+	dash = 0;
+	optind++;
+	if (optind == argc)
+	    return (optiserr(argc, argv, optind - 1, optstr, optchr,
+		    OPTERRARG));
+	optarg = argv[optind++];
+	return (*cp);
+    } else {
+	if (!argv[optind][optchr + 1]) {
+	    dash = 0;
+	    optind++;
+	} else
+	    optchr++;
+	return (*cp);
     }
     assert(0);
-    return(0);
+    return (0);
 }
 
 #ifdef TESTGETOPT
 int
- main (int argc, char **argv)
- {
-      int c;
-      extern char *optarg;
-      extern int optind;
-      int aflg = 0;
-      int bflg = 0;
-      int errflg = 0;
-      char *ofile = NULL;
-
-      while ((c = getopt(argc, argv, "abo:")) != EOF)
-           switch (c) {
-           case 'a':
-                if (bflg)
-                     errflg++;
-                else
-                     aflg++;
-                break;
-           case 'b':
-                if (aflg)
-                     errflg++;
-                else
-                     bflg++;
-                break;
-           case 'o':
-                ofile = optarg;
-                (void)printf("ofile = %s\n", ofile);
-                break;
-           case '?':
-                errflg++;
-           }
-      if (errflg) {
-           (void)fprintf(stderr,
-                "usage: cmd [-a|-b] [-o <filename>] files...\n");
-           exit (2);
-      }
-      for ( ; optind < argc; optind++)
-           (void)printf("%s\n", argv[optind]);
-      return 0;
- }
+main(int argc, char **argv)
+{
+    int c;
+    extern char *optarg;
+    extern int optind;
+    int aflg = 0;
+    int bflg = 0;
+    int errflg = 0;
+    char *ofile = NULL;
+
+    while ((c = getopt(argc, argv, "abo:")) != EOF)
+	switch (c) {
+	case 'a':
+	    if (bflg)
+		errflg++;
+	    else
+		aflg++;
+	    break;
+	case 'b':
+	    if (aflg)
+		errflg++;
+	    else
+		bflg++;
+	    break;
+	case 'o':
+	    ofile = optarg;
+	    (void) printf("ofile = %s\n", ofile);
+	    break;
+	case '?':
+	    errflg++;
+	}
+    if (errflg) {
+	(void) fprintf(stderr, "usage: cmd [-a|-b] [-o <filename>] files...\n");
+	exit(2);
+    }
+    for (; optind < argc; optind++)
+	(void) printf("%s\n", argv[optind]);
+    return 0;
+}
 
 #endif /* TESTGETOPT */
 
-static struct _wsaerrtext {
-	int err;
-	const char *errconst;
-	const char *errdesc;
-} _wsaerrtext[] = {
-WSAEACCES,"WSAEACCES","Permission denied.",
-WSAEADDRINUSE,"WSAEADDRINUSE","Address already in use.",
-WSAEADDRNOTAVAIL,"WSAEADDRNOTAVAIL","Cannot assign requested address.",
-WSAEAFNOSUPPORT,"WSAEAFNOSUPPORT","Address family not supported by protocol family.",
-WSAEALREADY,"WSAEALREADY","Operation already in progress.",
-WSAECONNABORTED,"WSAECONNABORTED","Software caused connection abort.",
-WSAECONNREFUSED,"WSAECONNREFUSED","Connection refused.",
-WSAECONNRESET,"WSAECONNRESET","Connection reset by peer.",
-WSAEDESTADDRREQ,"WSAEDESTADDRREQ","Destination address required.",
-WSAEFAULT,"WSAEFAULT","Bad address.",
-WSAEHOSTDOWN,"WSAEHOSTDOWN","Host is down.",
-WSAEHOSTUNREACH,"WSAEHOSTUNREACH","No route to host.",
-WSAEINPROGRESS,"WSAEINPROGRESS","Operation now in progress.",
-WSAEINTR,"WSAEINTR","Interrupted function call.",
-WSAEINVAL,"WSAEINVAL","Invalid argument.",
-WSAEISCONN,"WSAEISCONN","Socket is already connected.",
-WSAEMFILE,"WSAEMFILE","Too many open files.",
-WSAEMSGSIZE,"WSAEMSGSIZE","Message too long.",
-WSAENETDOWN,"WSAENETDOWN","Network is down.",
-WSAENETRESET,"WSAENETRESET","Network dropped connection on reset.",
-WSAENETUNREACH,"WSAENETUNREACH","Network is unreachable.",
-WSAENOBUFS,"WSAENOBUFS","No buffer space available.",
-WSAENOPROTOOPT,"WSAENOPROTOOPT","Bad protocol option.",
-WSAENOTCONN,"WSAENOTCONN","Socket is not connected.",
-WSAENOTSOCK,"WSAENOTSOCK","Socket operation on nonsocket.",
-WSAEOPNOTSUPP,"WSAEOPNOTSUPP","Operation not supported.",
-WSAEPFNOSUPPORT,"WSAEPFNOSUPPORT","Protocol family not supported.",
-WSAEPROCLIM,"WSAEPROCLIM","Too many processes.",
-WSAEPROTONOSUPPORT,"WSAEPROTONOSUPPORT","Protocol not supported.",
-WSAEPROTOTYPE,"WSAEPROTOTYPE","Protocol wrong type for socket.",
-WSAESHUTDOWN,"WSAESHUTDOWN","Cannot send after socket shutdown.",
-WSAESOCKTNOSUPPORT,"WSAESOCKTNOSUPPORT","Socket type not supported.",
-WSAETIMEDOUT,"WSAETIMEDOUT","Connection timed out.",
-WSAEWOULDBLOCK,"WSAEWOULDBLOCK","Resource temporarily unavailable.",
-WSANOTINITIALISED,"WSANOTINITIALISED","Successful WSAStartup not yet performed.",
-WSASYSNOTREADY,"WSASYSNOTREADY","Network subsystem is unavailable.",
-WSAVERNOTSUPPORTED,"WSAVERNOTSUPPORTED","Winsock.dll version out of range.",
-WSAEDISCON,"WSAEDISCON","Graceful shutdown in progress."
+static struct _wsaerrtext 
+{
+    int err;
+    const char *errconst;
+    const char *errdesc;
+} 
+_wsaerrtext[] = {
+    WSAEACCES, "WSAEACCES", "Permission denied.",
+	WSAEADDRINUSE, "WSAEADDRINUSE", "Address already in use.",
+	WSAEADDRNOTAVAIL, "WSAEADDRNOTAVAIL", "Cannot assign requested address.", 
+	WSAEAFNOSUPPORT, "WSAEAFNOSUPPORT", "Address family not supported by protocol family.", 
+	WSAEALREADY, "WSAEALREADY", "Operation already in progress.", 
+	WSAECONNABORTED, "WSAECONNABORTED", "Software caused connection abort.", 
+	WSAECONNREFUSED, "WSAECONNREFUSED", "Connection refused.", 
+	WSAECONNRESET, "WSAECONNRESET", "Connection reset by peer.", 
+	WSAEDESTADDRREQ, "WSAEDESTADDRREQ", "Destination address required.", 
+	WSAEFAULT, "WSAEFAULT", "Bad address.", 
+	WSAEHOSTDOWN, "WSAEHOSTDOWN", "Host is down.", 
+	WSAEHOSTUNREACH, "WSAEHOSTUNREACH",	"No route to host.", 
+	WSAEINPROGRESS, "WSAEINPROGRESS", "Operation now in progress.", 
+	WSAEINTR, "WSAEINTR", "Interrupted function call.", 
+	WSAEINVAL, "WSAEINVAL",	"Invalid argument.", 
+	WSAEISCONN, "WSAEISCONN", "Socket is already connected.", 
+	WSAEMFILE, "WSAEMFILE",	"Too many open files.", 
+	WSAEMSGSIZE, "WSAEMSGSIZE", "Message too long.",
+	WSAENETDOWN, "WSAENETDOWN", "Network is down.", 
+	WSAENETRESET, "WSAENETRESET", "Network dropped connection on reset.", 
+	WSAENETUNREACH,	"WSAENETUNREACH", "Network is unreachable.", 
+	WSAENOBUFS, "WSAENOBUFS", "No buffer space available.", 
+	WSAENOPROTOOPT, "WSAENOPROTOOPT", "Bad protocol option.", 
+	WSAENOTCONN, "WSAENOTCONN",	"Socket is not connected.", 
+	WSAENOTSOCK, "WSAENOTSOCK",	"Socket operation on nonsocket.", 
+	WSAEOPNOTSUPP, "WSAEOPNOTSUPP",	"Operation not supported.", 
+	WSAEPFNOSUPPORT, "WSAEPFNOSUPPORT",	"Protocol family not supported.", 
+	WSAEPROCLIM, "WSAEPROCLIM",	"Too many processes.", 
+	WSAEPROTONOSUPPORT, "WSAEPROTONOSUPPORT", "Protocol not supported.", 
+	WSAEPROTOTYPE, "WSAEPROTOTYPE",	"Protocol wrong type for socket.", 
+	WSAESHUTDOWN, "WSAESHUTDOWN", "Cannot send after socket shutdown.", 
+	WSAESOCKTNOSUPPORT,	"WSAESOCKTNOSUPPORT", "Socket type not supported.", 
+	WSAETIMEDOUT, "WSAETIMEDOUT", "Connection timed out.", 
+	WSAEWOULDBLOCK,	"WSAEWOULDBLOCK", "Resource temporarily unavailable.",
+	WSANOTINITIALISED, "WSANOTINITIALISED",	"Successful WSAStartup not yet performed.", 
+	WSASYSNOTREADY,	"WSASYSNOTREADY", "Network subsystem is unavailable.",
+	WSAVERNOTSUPPORTED, "WSAVERNOTSUPPORTED", "Winsock.dll version out of range.", 
+	WSAEDISCON, "WSAEDISCON", "Graceful shutdown in progress."
 };
 
 /*
@@ -328,22 +436,34 @@
 wsastrerror(int err)
 {
     static char xwsaerror_buf[BUFSIZ];
-/*	int err = WSAGetLastError();*/
-	int i, errind = -1;
+    int i, errind = -1;
 
-	if ( err == 0 )
-		return "(0) No error.";
-	for ( i = 0; i < sizeof(_wsaerrtext)/sizeof(struct _wsaerrtext); i++ ) {
-		if ( _wsaerrtext[i].err != err )
-			continue;
-		errind = i;
-		break;
-	}
+    if (err == 0)
+	return "(0) No error";
+    for (i = 0; i < sizeof(_wsaerrtext) / sizeof(struct _wsaerrtext); i++) {
+	if (_wsaerrtext[i].err != err)
+	    continue;
+	errind = i;
+	break;
+    }
     if (errind == -1)
-	return ("Unknown");
-	assert(err == _wsaerrtext[errind].err);
-    snprintf(xwsaerror_buf, BUFSIZ, "(%d) %s, %s", err, _wsaerrtext[errind].errconst, _wsaerrtext[errind].errdesc);
+		snprintf(xwsaerror_buf, BUFSIZ, "(%d) Unknown", err);
+	else
+		snprintf(xwsaerror_buf, BUFSIZ, "(%d) %s, %s", err,
+			_wsaerrtext[errind].errconst, _wsaerrtext[errind].errdesc);
     return xwsaerror_buf;
 }
 
+struct passwd *getpwnam(char * unused)
+{
+	static struct passwd pwd = {100};
+	return &pwd;
+}
+
+struct group *getgrnam(char * unused)
+{
+	static struct group grp = {100};
+	return &grp;
+}
+
 #endif
Index: squid/scripts/RunAccel.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/Attic/RunAccel.in,v
retrieving revision 1.1.1.2.44.1
retrieving revision 1.1.1.2.44.1.2.1
diff -u -r1.1.1.2.44.1 -r1.1.1.2.44.1.2.1
--- squid/scripts/RunAccel.in	6 Jan 2001 12:40:11 -0000	1.1.1.2.44.1
+++ squid/scripts/RunAccel.in	27 Aug 2001 21:48:18 -0000	1.1.1.2.44.1.2.1
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#  $Id: RunAccel.in,v 1.1.1.2.44.1 2001/01/06 12:40:11 hno Exp $
+#  $Id: RunAccel.in,v 1.1.1.2.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 
 # enable HTTP requests on port 80
 port="-a 80"
Index: squid/scripts/RunCache.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/RunCache.in,v
retrieving revision 1.1.1.2.44.1
retrieving revision 1.1.1.2.44.1.2.1
diff -u -r1.1.1.2.44.1 -r1.1.1.2.44.1.2.1
--- squid/scripts/RunCache.in	6 Jan 2001 12:40:11 -0000	1.1.1.2.44.1
+++ squid/scripts/RunCache.in	27 Aug 2001 21:48:18 -0000	1.1.1.2.44.1.2.1
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#  $Id: RunCache.in,v 1.1.1.2.44.1 2001/01/06 12:40:11 hno Exp $
+#  $Id: RunCache.in,v 1.1.1.2.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
Index: squid/scripts/check_cache.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/check_cache.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/scripts/check_cache.pl	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/scripts/check_cache.pl	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -8,7 +8,7 @@
 # Check the Squid-1.1.x cache directory for stale objects - i.e. those
 # which exist on disk but aren't listed in cached's log file.
 
-# $Id: check_cache.pl,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+# $Id: check_cache.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 
 require "getopts.pl";
 &Getopts("c:drt:vh");
Index: squid/scripts/fileno-to-pathname.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/fileno-to-pathname.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/scripts/fileno-to-pathname.pl	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/scripts/fileno-to-pathname.pl	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -1,6 +1,6 @@
 #!/usr/local/bin/perl
 
-# $Id: fileno-to-pathname.pl,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+# $Id: fileno-to-pathname.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 # Convert hexadecimal cache file numbers (from swap log) into full pathnames.  
 # Duane Wessels 6/30/97
 
Index: squid/scripts/flag_truncs.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/flag_truncs.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/scripts/flag_truncs.pl	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/scripts/flag_truncs.pl	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -6,7 +6,7 @@
 # - i.e. those for which there is a "Content-length:" HTTP header,
 #   and this does not match the size of the cached object
 
-# $Id: flag_truncs.pl,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+# $Id: flag_truncs.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 
 require "getopts.pl";
 require "stat.pl";
Index: squid/scripts/upgrade-1.0-store.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/scripts/upgrade-1.0-store.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/scripts/upgrade-1.0-store.pl	6 Jan 2001 12:40:11 -0000	1.1.1.1.44.1
+++ squid/scripts/upgrade-1.0-store.pl	27 Aug 2001 21:48:18 -0000	1.1.1.1.44.1.2.1
@@ -1,6 +1,6 @@
 #!/usr/local/bin/perl
 
-# $Id: upgrade-1.0-store.pl,v 1.1.1.1.44.1 2001/01/06 12:40:11 hno Exp $
+# $Id: upgrade-1.0-store.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:18 tolsty Exp $
 
 select(STDERR); $|=1;
 select(STDOUT); $|=1;
Index: squid/snmplib/asn1.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/asn1.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/snmplib/asn1.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/asn1.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.136.1
@@ -87,7 +87,7 @@
 u_char *
 asn_build_header(u_char * data,	/* IN - ptr to start of object */
     int *datalength,		/* IN/OUT - # of valid bytes */
-					     /*          left in buffer */
+    /*          left in buffer */
     u_char type,		/* IN - ASN type of object */
     int length)
 {				/* IN - length of object */
@@ -539,8 +539,7 @@
  *  Returns NULL on any error.
  */
 u_char *
-asn_build_sequence(u_char * data, int *datalength,
-    u_char type, int length)
+asn_build_sequence(u_char * data, int *datalength, u_char type, int length)
   /*    u_char *data;       IN - pointer to start of object */
   /*    int    *datalength; IN/OUT - # of valid bytes left in buffer */
   /*    u_char  type;       IN - ASN type of object */
@@ -601,8 +600,7 @@
 
 
 u_char *
-asn_build_length(u_char * data, int *datalength,
-    int length, int truth)
+asn_build_length(u_char * data, int *datalength, int length, int truth)
   /*   u_char *data;       IN - pointer to start of object */
   /*   int    *datalength; IN/OUT - # of valid bytes left in buf */
   /*   int     length;     IN - length of object */
@@ -794,7 +792,7 @@
 	    /* testmask *MUST* !!!! be of an unsigned type */
 	    for (testmask = 0x7F, testbits = 0; testmask != 0;
 		testmask <<= 7, testbits += 7) {
-		if (subid & testmask) {		/* if any bits set */
+		if (subid & testmask) {	/* if any bits set */
 		    mask = testmask;
 		    bits = testbits;
 		}
Index: squid/snmplib/coexistance.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/coexistance.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/coexistance.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/coexistance.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -100,7 +100,7 @@
  * valid V1 responses.  (I think. XXXXX)
  *
  */
-int 
+int
 snmp_coexist_V2toV1(struct snmp_pdu *PDU)
 {
     /* Per 3.1.1:
@@ -121,7 +121,8 @@
 	break;
 
     default:
-	snmplib_debug(2, "Unable to translate PDU %d to SNMPv1!\n", PDU->command);
+	snmplib_debug(2, "Unable to translate PDU %d to SNMPv1!\n",
+	    PDU->command);
 	snmp_set_api_error(SNMPERR_PDU_TRANSLATION);
 	return (0);
     }
Index: squid/snmplib/mib.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/mib.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/mib.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/mib.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -1,7 +1,5 @@
-
 /***********************************************************
 	Copyright 1988, 1989 by Carnegie Mellon University
-
                       All Rights Reserved
 
 Permission to use, copy, modify, and distribute this software and its 
@@ -107,14 +105,16 @@
     if (days == 0) {
 	snprintf(buf, 32, "%d:%02d:%02d", hours, minutes, seconds);
     } else if (days == 1) {
-	snprintf(buf, 32, "%d day, %d:%02d:%02d", days, hours, minutes, seconds);
+	snprintf(buf, 32, "%d day, %d:%02d:%02d", days, hours, minutes,
+	    seconds);
     } else {
-	snprintf(buf, 32, "%d days, %d:%02d:%02d", days, hours, minutes, seconds);
+	snprintf(buf, 32, "%d days, %d:%02d:%02d", days, hours, minutes,
+	    seconds);
     }
     return buf;
 }
 
-static void 
+static void
 sprint_hexstring(buf, cp, len)
      char *buf;
      u_char *cp;
@@ -122,10 +122,12 @@
 {
 
     for (; len >= 16; len -= 16) {
-	snprintf(buf, 26, "%02X %02X %02X %02X %02X %02X %02X %02X ", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
+	snprintf(buf, 26, "%02X %02X %02X %02X %02X %02X %02X %02X ", cp[0],
+	    cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
 	buf += strlen(buf);
 	cp += 8;
-	snprintf(buf, 26, "%02X %02X %02X %02X %02X %02X %02X %02X\n", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
+	snprintf(buf, 26, "%02X %02X %02X %02X %02X %02X %02X %02X\n", cp[0],
+	    cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
 	buf += strlen(buf);
 	cp += 8;
     }
@@ -136,7 +138,7 @@
     *buf = '\0';
 }
 
-static void 
+static void
 sprint_asciistring(buf, cp, len)
      char *buf;
      u_char *cp;
@@ -256,8 +258,7 @@
 	buf += strlen(buf);
     }
     sprintf(buf, "(%u) %s",
-	*(var->val.integer),
-	uptimeString(*(var->val.integer), timebuf));
+	*(var->val.integer), uptimeString(*(var->val.integer), timebuf));
 }
 
 static void
@@ -479,8 +480,7 @@
 
 static struct snmp_mib_tree *get_symbol();
 
-oid RFC1066_MIB[] =
-{1, 3, 6, 1, 2, 1};
+oid RFC1066_MIB[] = { 1, 3, 6, 1, 2, 1 };
 unsigned char RFC1066_MIB_text[] = ".iso.org.dod.internet.mgmt.mib";
 struct snmp_mib_tree *Mib;
 
@@ -531,7 +531,7 @@
 }
 #endif
 
-void 
+void
 init_mib(char *file)
 {
     if (Mib != NULL)
@@ -609,8 +609,7 @@
      * No empty strings.  Can happen if there is a trailing '.' or two '.'s
      * in a row, i.e. "..".
      */
-    if ((*input == '\0') ||
-	(*input == '.'))
+    if ((*input == '\0') || (*input == '.'))
 	return (0);
 
     if (isdigit(*input)) {
@@ -630,8 +629,7 @@
 	/*
 	 * Read the name into a buffer.
 	 */
-	while ((*input != '\0') &&
-	    (*input != '.')) {
+	while ((*input != '\0') && (*input != '.')) {
 	    *to++ = *input++;
 	}
 	*to = '\0';
@@ -669,12 +667,13 @@
     if (*input != '.')
 	return (1);
     if ((*out_len =
-	    parse_subtree(tp ? tp->child_list : NULL, ++input, output, out_len)) == 0)
+	    parse_subtree(tp ? tp->child_list : NULL, ++input, output,
+	out_len)) == 0)
 	return (0);
     return (++*out_len);
 }
 
-int 
+int
 read_objid(input, output, out_len)
      char *input;
      oid *output;
@@ -709,7 +708,7 @@
     return (1);
 }
 
-void 
+void
 print_objid(objid, objidlen)
      oid *objid;
      int objidlen;		/* number of subidentifiers */
@@ -723,7 +722,7 @@
 
 }
 
-void 
+void
 sprint_objid(buf, objid, objidlen)
      char *buf;
      oid *objid;
@@ -736,7 +735,7 @@
 }
 
 #if 0
-void 
+void
 print_variable(objid, objidlen, pvariable)
      oid *objid;
      int objidlen;
@@ -748,7 +747,8 @@
     *buf = '.';			/* this is a fully qualified name */
     subtree = get_symbol(objid, objidlen, subtree, buf + 1);
     cp = buf;
-    if ((strlen(buf) >= strlen((char *) RFC1066_MIB_text)) && !memcmp(buf, (char *) RFC1066_MIB_text,
+    if ((strlen(buf) >= strlen((char *) RFC1066_MIB_text))
+	&& !memcmp(buf, (char *) RFC1066_MIB_text,
 	    strlen((char *) RFC1066_MIB_text))) {
 	cp += sizeof(RFC1066_MIB_text);
     }
@@ -763,7 +763,7 @@
 }
 
 
-void 
+void
 sprint_variable(buf, objid, objidlen, pvariable)
      char *buf;
      oid *objid;
@@ -776,7 +776,8 @@
     *tempbuf = '.';		/* this is a fully qualified name */
     subtree = get_symbol(objid, objidlen, subtree, tempbuf + 1);
     cp = tempbuf;
-    if ((strlen(buf) >= strlen((char *) RFC1066_MIB_text)) && !memcmp(buf, (char *) RFC1066_MIB_text,
+    if ((strlen(buf) >= strlen((char *) RFC1066_MIB_text))
+	&& !memcmp(buf, (char *) RFC1066_MIB_text,
 	    strlen((char *) RFC1066_MIB_text))) {
 	cp += sizeof(RFC1066_MIB_text);
     }
@@ -790,7 +791,7 @@
     strcat(buf, "\n");
 }
 
-void 
+void
 sprint_value(buf, objid, objidlen, pvariable)
      char *buf;
      oid *objid;
@@ -808,7 +809,7 @@
     }
 }
 
-void 
+void
 print_value(objid, objidlen, pvariable)
      oid *objid;
      int objidlen;
@@ -858,7 +859,8 @@
 	    buf++;
 	*buf++ = '.';
 	*buf = '\0';
-	return_tree = get_symbol(objid + 1, objidlen - 1, subtree->child_list, buf);
+	return_tree =
+	    get_symbol(objid + 1, objidlen - 1, subtree->child_list, buf);
     }
     if (return_tree != NULL)
 	return return_tree;
@@ -870,20 +872,21 @@
 
 
 #if 0
-void 
+void
 print_variable_list(variable_list * V)
 {
     print_variable(V->name, V->name_length, V);
 }
 
-void 
+void
 print_variable_list_value(variable_list * pvariable)
 {
     char buf[512];
     struct snmp_mib_tree *subtree = Mib;
 
     *buf = '.';			/* this is a fully qualified name */
-    subtree = get_symbol(pvariable->name, pvariable->name_length, subtree, buf + 1);
+    subtree =
+	get_symbol(pvariable->name, pvariable->name_length, subtree, buf + 1);
     *buf = '\0';
 
     if (subtree->printer)
@@ -895,7 +898,7 @@
 }
 #endif
 
-void 
+void
 print_type(variable_list * var)
 {
     switch (var->type) {
@@ -932,7 +935,7 @@
     }
 }
 
-void 
+void
 print_oid_nums(oid * O, int len)
 {
     int x;
Index: squid/snmplib/parse.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/parse.c,v
retrieving revision 1.1.1.2.70.1
retrieving revision 1.1.1.2.70.1.2.1
diff -u -r1.1.1.2.70.1 -r1.1.1.2.70.1.2.1
--- squid/snmplib/parse.c	15 Jul 2001 08:49:37 -0000	1.1.1.2.70.1
+++ squid/snmplib/parse.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.70.1.2.1
@@ -1,6 +1,5 @@
 /***********************************************************
 	Copyright 1989 by Carnegie Mellon University
-
                       All Rights Reserved
 
 Permission to use, copy, modify, and distribute this software and its 
@@ -75,7 +74,6 @@
 #include <assert.h>
 #endif
 
-
 #include "asn1.h"
 #include "snmp_vars.h"
 #include "parse.h"
@@ -89,7 +87,8 @@
  * or a textual string label, or both.
  * The subid is -1 if not present, and label is NULL if not present.
  */
-struct subid {
+struct subid
+{
     int subid;
     char *label;
 };
@@ -97,7 +96,8 @@
 /*
  * A linked list of nodes.
  */
-struct node {
+struct node
+{
     struct node *next;
     char label[64];		/* This node's (unique) textual name */
     u_int subid;		/* This node's integer subidentifier */
@@ -108,11 +108,6 @@
 
 int Line = 1;
 
-#ifdef _SQUID_MSWIN_
-#undef OPAQUE
-#undef OPTIONAL
-#endif
-
 /* types of tokens */
 #define	CONTINUE    -1
 #define ENDOFFILE   0
@@ -158,7 +153,8 @@
 #define INDEX       36
 #define QUOTE       37
 
-struct tok {
+struct tok
+{
     char *name;			/* token name */
     int len;			/* length not counting nul */
     int token;			/* value */
@@ -167,52 +163,90 @@
 };
 
 
-struct tok tokens[] =
-{
-    {"obsolete", sizeof("obsolete") - 1, OBSOLETE},
-    {"Opaque", sizeof("Opaque") - 1, OPAQUE},
-    {"recommended", sizeof("recommended") - 1, RECOMMENDED},
-    {"optional", sizeof("optional") - 1, OPTIONAL},
-    {"mandatory", sizeof("mandatory") - 1, MANDATORY},
-    {"current", sizeof("current") - 1, MANDATORY},
-    {"not-accessible", sizeof("not-accessible") - 1, NOACCESS},
-    {"write-only", sizeof("write-only") - 1, WRITEONLY},
-    {"read-write", sizeof("read-write") - 1, READWRITE},
-    {"TimeTicks", sizeof("TimeTicks") - 1, TIMETICKS},
-    {"OBJECTIDENTIFIER", sizeof("OBJECTIDENTIFIER") - 1, OBJID},
-	/*
-	 * This CONTINUE appends the next word onto OBJECT,
-	 * hopefully matching OBJECTIDENTIFIER above.
-	 */
-    {"OBJECT", sizeof("OBJECT") - 1, CONTINUE},
-    {"NetworkAddress", sizeof("NetworkAddress") - 1, NETADDR},
-    {"Gauge", sizeof("Gauge") - 1, GAUGE},
-    {"OCTETSTRING", sizeof("OCTETSTRING") - 1, OCTETSTR},
-    {"OCTET", sizeof("OCTET") - 1, -1},
-    {"OF", sizeof("OF") - 1, OF},
-    {"SEQUENCE", sizeof("SEQUENCE") - 1, SEQUENCE},
-    {"NULL", sizeof("NULL") - 1, NUL},
-    {"IpAddress", sizeof("IpAddress") - 1, IPADDR},
-    {"INTEGER", sizeof("INTEGER") - 1, INTEGER},
-    {"Counter", sizeof("Counter") - 1, COUNTER},
-    {"read-only", sizeof("read-only") - 1, READONLY},
-    {"ACCESS", sizeof("ACCESS") - 1, ACCESS},
-    {"MAX-ACCESS", sizeof("MAX-ACCESS") - 1, ACCESS},
-    {"STATUS", sizeof("STATUS") - 1, STATUS},
-    {"SYNTAX", sizeof("SYNTAX") - 1, SYNTAX},
-    {"OBJECT-TYPE", sizeof("OBJECT-TYPE") - 1, OBJTYPE},
-    {"{", sizeof("{") - 1, LEFTBRACKET},
-    {"}", sizeof("}") - 1, RIGHTBRACKET},
-    {"::=", sizeof("::=") - 1, EQUALS},
-    {"(", sizeof("(") - 1, LEFTPAREN},
-    {")", sizeof(")") - 1, RIGHTPAREN},
-    {",", sizeof(",") - 1, COMMA},
-    {"DESCRIPTION", sizeof("DESCRIPTION") - 1, DESCRIPTION},
-    {"INDEX", sizeof("INDEX") - 1, INDEX},
-    {"\"", sizeof("\"") - 1, QUOTE},
-    {"END", sizeof("END") - 1, ENDOFFILE},
+struct tok tokens[] = {
+    {"obsolete", sizeof("obsolete") - 1, OBSOLETE}
+    ,
+    {"Opaque", sizeof("Opaque") - 1, OPAQUE}
+    ,
+    {"recommended", sizeof("recommended") - 1, RECOMMENDED}
+    ,
+    {"optional", sizeof("optional") - 1, OPTIONAL}
+    ,
+    {"mandatory", sizeof("mandatory") - 1, MANDATORY}
+    ,
+    {"current", sizeof("current") - 1, MANDATORY}
+    ,
+    {"not-accessible", sizeof("not-accessible") - 1, NOACCESS}
+    ,
+    {"write-only", sizeof("write-only") - 1, WRITEONLY}
+    ,
+    {"read-write", sizeof("read-write") - 1, READWRITE}
+    ,
+    {"TimeTicks", sizeof("TimeTicks") - 1, TIMETICKS}
+    ,
+    {"OBJECTIDENTIFIER", sizeof("OBJECTIDENTIFIER") - 1, OBJID}
+    ,
+    /*
+     * This CONTINUE appends the next word onto OBJECT,
+     * hopefully matching OBJECTIDENTIFIER above.
+     */
+    {"OBJECT", sizeof("OBJECT") - 1, CONTINUE}
+    ,
+    {"NetworkAddress", sizeof("NetworkAddress") - 1, NETADDR}
+    ,
+    {"Gauge", sizeof("Gauge") - 1, GAUGE}
+    ,
+    {"OCTETSTRING", sizeof("OCTETSTRING") - 1, OCTETSTR}
+    ,
+    {"OCTET", sizeof("OCTET") - 1, -1}
+    ,
+    {"OF", sizeof("OF") - 1, OF}
+    ,
+    {"SEQUENCE", sizeof("SEQUENCE") - 1, SEQUENCE}
+    ,
+    {"NULL", sizeof("NULL") - 1, NUL}
+    ,
+    {"IpAddress", sizeof("IpAddress") - 1, IPADDR}
+    ,
+    {"INTEGER", sizeof("INTEGER") - 1, INTEGER}
+    ,
+    {"Counter", sizeof("Counter") - 1, COUNTER}
+    ,
+    {"read-only", sizeof("read-only") - 1, READONLY}
+    ,
+    {"ACCESS", sizeof("ACCESS") - 1, ACCESS}
+    ,
+    {"MAX-ACCESS", sizeof("MAX-ACCESS") - 1, ACCESS}
+    ,
+    {"STATUS", sizeof("STATUS") - 1, STATUS}
+    ,
+    {"SYNTAX", sizeof("SYNTAX") - 1, SYNTAX}
+    ,
+    {"OBJECT-TYPE", sizeof("OBJECT-TYPE") - 1, OBJTYPE}
+    ,
+    {"{", sizeof("{") - 1, LEFTBRACKET}
+    ,
+    {"}", sizeof("}") - 1, RIGHTBRACKET}
+    ,
+    {"::=", sizeof("::=") - 1, EQUALS}
+    ,
+    {"(", sizeof("(") - 1, LEFTPAREN}
+    ,
+    {")", sizeof(")") - 1, RIGHTPAREN}
+    ,
+    {",", sizeof(",") - 1, COMMA}
+    ,
+    {"DESCRIPTION", sizeof("DESCRIPTION") - 1, DESCRIPTION}
+    ,
+    {"INDEX", sizeof("INDEX") - 1, INDEX}
+    ,
+    {"\"", sizeof("\"") - 1, QUOTE}
+    ,
+    {"END", sizeof("END") - 1, ENDOFFILE}
+    ,
 /* Hacks for easier MIBFILE coercing */
-    {"read-create", sizeof("read-create") - 1, READWRITE},
+    {"read-create", sizeof("read-create") - 1, READWRITE}
+    ,
     {NULL}
 };
 
@@ -397,7 +431,7 @@
 	    if (oldnp == NULL) {
 		*headp = np->next;	/* fix root of node list */
 	    } else {
-		oldnp->next = np->next;		/* link around this node */
+		oldnp->next = np->next;	/* link around this node */
 	    }
 	}
     }
@@ -472,13 +506,15 @@
 	}
     }
     if (nodes_left) {
-	snmplib_debug(0, "The mib description doesn't seem to be consistent.\n");
-	snmplib_debug(0, "Some nodes couldn't be linked under the \"iso\" tree.\n");
+	snmplib_debug(0,
+	    "The mib description doesn't seem to be consistent.\n");
+	snmplib_debug(0,
+	    "Some nodes couldn't be linked under the \"iso\" tree.\n");
 	snmplib_debug(0, "these nodes are left:\n");
 	for (bucket = 0; bucket < NHASHSIZE; bucket++) {
 	    for (np = nbuckets[bucket]; np; np = np->next)
-		snmplib_debug(5, "%s ::= { %s %d } (%d)\n", np->label, np->parent, np->subid,
-		    np->type);
+		snmplib_debug(5, "%s ::= { %s %d } (%d)\n", np->label,
+		    np->parent, np->subid, np->type);
 	}
     }
     return tp;
@@ -521,8 +557,7 @@
 	if (ch == '\n')
 	    Line++;
 	if (isspace(ch) || ch == '(' || ch == ')' ||
-	    ch == '{' || ch == '}' || ch == ',' ||
-	    ch == '"') {
+	    ch == '{' || ch == '}' || ch == ',' || ch == '"') {
 	    if (!isspace(ch) && *token == 0) {
 		hash += ch;
 		*cp++ = ch;
@@ -610,7 +645,8 @@
 		if (type == NUMBER) {
 		    SubOid->subid = atoi(token);
 		    if ((type = get_token(fp, token)) != RIGHTPAREN) {
-			print_error("Unexpected a closing parenthesis", token, type);
+			print_error("Unexpected a closing parenthesis", token,
+			    type);
 			return 0;
 		    }
 		} else {
@@ -677,8 +713,8 @@
 	 * For each parent-child subid pair in the subid array,
 	 * create a node and link it into the node list.
 	 */
-	for (count = 0, op = SubOid, nop = SubOid + 1; count < (length - 2); count++,
-	    op++, nop++) {
+	for (count = 0, op = SubOid, nop = SubOid + 1; count < (length - 2);
+	    count++, op++, nop++) {
 	    /* every node must have parent's name and child's name or number */
 	    if (op->label && (nop->label || (nop->subid != -1))) {
 		strcpy(np->parent, op->label);
@@ -709,7 +745,8 @@
 		if (nop->subid != -1)
 		    np->subid = nop->subid;
 		else
-		    print_error("Warning: This entry is pretty silly", np->label, type);
+		    print_error("Warning: This entry is pretty silly",
+			np->label, type);
 	    } else {
 		free_node(np);
 		if (oldnp)
@@ -894,7 +931,8 @@
 	return 0;
     }
     type = get_token(fp, token);
-    if (type != MANDATORY && type != OPTIONAL && type != OBSOLETE && type != RECOMMENDED) {
+    if (type != MANDATORY && type != OPTIONAL && type != OBSOLETE
+	&& type != RECOMMENDED) {
 	print_error("Bad status", token, type);
 	free_node(np);
 	return 0;
@@ -1029,7 +1067,8 @@
 		/* first link in chain */
 		np = root = parse_objecttype(fp, name);
 		if (np == NULL) {
-		    print_error("Bad parse of object type", (char *) NULL, type);
+		    print_error("Bad parse of object type", (char *) NULL,
+			type);
 		    return NULL;
 		}
 	    } else {
@@ -1053,7 +1092,8 @@
 	    } else {
 		np->next = parse_objectid(fp, name);
 		if (np->next == NULL) {
-		    print_error("Bad parse of object type", (char *) NULL, type);
+		    print_error("Bad parse of object type", (char *) NULL,
+			type);
 		    return NULL;
 		}
 	    }
Index: squid/snmplib/snmp_api.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_api.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/snmp_api.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/snmp_api.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -1,5 +1,3 @@
-
-
 /**********************************************************************
  *
  *           Copyright 1997 by Carnegie Mellon University
@@ -24,6 +22,7 @@
  * 
  **********************************************************************/
 
+#define SNMP_API_C
 #include "config.h"
 
 #include <stdio.h>
@@ -107,8 +106,7 @@
  */
 
 
-oid default_enterprise[] =
-{1, 3, 6, 1, 4, 1, 3, 1, 1};	/* enterprises.cmu.systems.cmuSNMP */
+oid default_enterprise[] = { 1, 3, 6, 1, 4, 1, 3, 1, 1 };	/* enterprises.cmu.systems.cmuSNMP */
 
 #define DEFAULT_COMMUNITY   "public"
 #define DEFAULT_RETRIES	    4
@@ -128,7 +126,7 @@
  */
 static int Reqid = 0;
 
-static void 
+static void
 init_snmp(void)
 {
     struct timeval tv;
@@ -142,7 +140,7 @@
 /*
  * Free each element in the input request list.
  */
-static void 
+static void
 free_request_list(rp)
      struct request_list *rp;
 {
@@ -191,7 +189,9 @@
 	return (NULL);
     }
     /* Internal session */
-    isp = (struct snmp_internal_session *) xmalloc(sizeof(struct snmp_internal_session));
+    isp =
+	(struct snmp_internal_session *) xmalloc(sizeof(struct
+	  snmp_internal_session));
     if (isp == NULL) {
 	xfree(slp);
 	snmp_set_api_error(SNMPERR_OS_ERR);
@@ -209,7 +209,8 @@
 	snmp_set_api_error(SNMPERR_OS_ERR);
 	return (NULL);
     }
-    xmemcpy((char *) slp->session, (char *) session, sizeof(struct snmp_session));
+    xmemcpy((char *) slp->session, (char *) session,
+	sizeof(struct snmp_session));
     session = slp->session;
     /* now link it in. */
     slp->next = Sessions;
@@ -237,7 +238,8 @@
     if (session->community_len != SNMP_DEFAULT_COMMUNITY_LEN) {
 	cp = (u_char *) xmalloc((unsigned) session->community_len);
 	if (cp)
-	    xmemcpy((char *) cp, (char *) session->community, session->community_len);
+	    xmemcpy((char *) cp, (char *) session->community,
+		session->community_len);
     } else {
 	session->community_len = strlen(DEFAULT_COMMUNITY);
 	cp = (u_char *) xmalloc((unsigned) session->community_len);
@@ -344,12 +346,12 @@
  * dequeues any pending requests, and closes any sockets allocated for
  * the session.  Returns 0 on error, 1 otherwise.
  */
-int 
+int
 snmp_close(struct snmp_session *session)
 {
     struct session_list *slp = NULL, *oslp = NULL;
 
-    if (Sessions->session == session) {		/* If first entry */
+    if (Sessions->session == session) {	/* If first entry */
 	slp = Sessions;
 	Sessions = slp->next;
     } else {
@@ -399,9 +401,7 @@
     u_char *bufp;
 
     bufp = snmp_msg_Encode(packet, out_length,
-	session->community, session->community_len,
-	session->Version,
-	pdu);
+	session->community, session->community_len, session->Version, pdu);
     snmplib_debug(8, "LIBSNMP: snmp_build():  Packet len %d (requid %d)\n",
 	*out_length, pdu->reqid);
 
@@ -418,9 +418,7 @@
  */
 u_char *
 snmp_parse(struct snmp_session * session,
-    struct snmp_pdu * pdu,
-    u_char * data,
-    int length)
+    struct snmp_pdu * pdu, u_char * data, int length)
 {
     u_char Community[128];
     u_char *bufp;
@@ -428,8 +426,7 @@
 
     /* Decode the entire message. */
     data = snmp_msg_Decode(data, &length,
-	Community, &CommunityLen,
-	&session->Version, pdu);
+	Community, &CommunityLen, &session->Version, pdu);
     if (data == NULL)
 	return (NULL);
 
@@ -451,7 +448,7 @@
  * The pdu is freed by snmp_send() unless a failure occured.
  */
 #if 0
-int 
+int
 snmp_send(struct snmp_session *session, struct snmp_pdu *pdu)
 {
     struct session_list *slp;
@@ -476,8 +473,7 @@
     }
     if (pdu->command == SNMP_PDU_GET ||
 	pdu->command == SNMP_PDU_GETNEXT ||
-	pdu->command == SNMP_PDU_RESPONSE ||
-	pdu->command == SNMP_PDU_SET) {
+	pdu->command == SNMP_PDU_RESPONSE || pdu->command == SNMP_PDU_SET) {
 
 	if (pdu->reqid == SNMP_DEFAULT_REQID)
 	    pdu->reqid = ++Reqid;
@@ -487,8 +483,7 @@
 	    pdu->errindex = 0;
 
     } else if (pdu->command == SNMP_PDU_INFORM ||
-	    pdu->command == SNMP_PDU_GETBULK ||
-	pdu->command == SNMP_PDU_V2TRAP) {
+	pdu->command == SNMP_PDU_GETBULK || pdu->command == SNMP_PDU_V2TRAP) {
 
 	if (session->Version != SNMP_VERSION_2) {
 	    snmplib_debug(3, "Cant send SNMPv2 PDU's in SNMP message.\n");
@@ -545,10 +540,10 @@
     if (pdu->command == SNMP_PDU_GET ||
 	pdu->command == SNMP_PDU_GETNEXT ||
 	pdu->command == SNMP_PDU_SET ||
-	pdu->command == SNMP_PDU_GETBULK ||
-	pdu->command == SNMP_PDU_INFORM) {
+	pdu->command == SNMP_PDU_GETBULK || pdu->command == SNMP_PDU_INFORM) {
 
-	snmplib_debug(6, "LIBSNMP:  Setting up to recieve a response for reqid %d\n",
+	snmplib_debug(6,
+	    "LIBSNMP:  Setting up to recieve a response for reqid %d\n",
 	    pdu->reqid);
 
 	/* set up to expect a response */
@@ -597,8 +592,7 @@
 	    isp = slp->internal;
 	    fromlength = sizeof from;
 	    length = recvfrom(isp->sd, (char *) packet,
-		PACKET_LENGTH, 0, (struct sockaddr *) &from,
-		&fromlength);
+		PACKET_LENGTH, 0, (struct sockaddr *) &from, &fromlength);
 	    if (length == -1)
 		perror("recvfrom");
 
@@ -620,23 +614,28 @@
 	    sp->community = bufp;
 	    sp->community_len = strlen((char *) bufp);
 
-	    snmplib_debug(6, "LIBSNMP:  Read PDU %s, ReqId %d\n", snmp_pdu_type(pdu), pdu->reqid);
+	    snmplib_debug(6, "LIBSNMP:  Read PDU %s, ReqId %d\n",
+		snmp_pdu_type(pdu), pdu->reqid);
 
 	    if (pdu->command == SNMP_PDU_RESPONSE) {
 		for (rp = isp->requests; rp; rp = rp->next_request) {
 		    if (rp->request_id == pdu->reqid) {
-			snmplib_debug(6, "LIBSNMP:  ReqId %d:  Calling callback\n", pdu->reqid);
-			if (sp->callback(RECEIVED_MESSAGE, sp,
-				pdu->reqid, pdu,
+			snmplib_debug(6,
+			    "LIBSNMP:  ReqId %d:  Calling callback\n",
+			    pdu->reqid);
+			if (sp->callback(RECEIVED_MESSAGE, sp, pdu->reqid, pdu,
 				sp->callback_magic) == 1) {
 			    /* successful, so delete request */
-			    snmplib_debug(6, "LIBSNMP:  ReqId %d:  Success.  Removing ReqId.\n", pdu->reqid);
+			    snmplib_debug(6,
+				"LIBSNMP:  ReqId %d:  Success.  Removing ReqId.\n",
+				pdu->reqid);
 			    orp = rp;
 			    if (isp->requests == orp) {
 				/* first in list */
 				isp->requests = orp->next_request;
 			    } else {
-				for (rp = isp->requests; rp; rp = rp->next_request) {
+				for (rp = isp->requests; rp;
+				    rp = rp->next_request) {
 				    if (rp->next_request == orp) {
 					/* link around it */
 					rp->next_request = orp->next_request;
@@ -652,11 +651,11 @@
 		    }
 		}
 	    } else if (pdu->command == SNMP_PDU_GET ||
-		    pdu->command == SNMP_PDU_GETNEXT ||
-		    pdu->command == TRP_REQ_MSG ||
-		    pdu->command == SNMP_PDU_SET ||
-		    pdu->command == SNMP_PDU_GETBULK ||
-		    pdu->command == SNMP_PDU_INFORM ||
+		pdu->command == SNMP_PDU_GETNEXT ||
+		pdu->command == TRP_REQ_MSG ||
+		pdu->command == SNMP_PDU_SET ||
+		pdu->command == SNMP_PDU_GETBULK ||
+		pdu->command == SNMP_PDU_INFORM ||
 		pdu->command == SNMP_PDU_V2TRAP) {
 		sp->callback(RECEIVED_MESSAGE, sp, pdu->reqid,
 		    pdu, sp->callback_magic);
@@ -717,13 +716,13 @@
 	    requests++;
 	    for (rp = isp->requests; rp; rp = rp->next_request) {
 		if (!timerisset(&earliest) ||
-		    timercmp(&rp->expire, &earliest, <))
-		    earliest = rp->expire;
+		    timercmp(&rp->expire, &earliest, <))earliest = rp->expire;
 	    }
 	}
     }
-    snmplib_debug(6, "LIBSNMP:  Select Info:  %d active, %d requests pending.\n",
-	active, requests);
+    snmplib_debug(6,
+	"LIBSNMP:  Select Info:  %d active, %d requests pending.\n", active,
+	requests);
 
     if (requests == 0)		/* if none are active, skip arithmetic */
 	return active;
@@ -763,7 +762,7 @@
  * from the pdu and is resent.  If there are no more retries available, the 
  * callback for the session is used to alert the user of the timeout.
  */
-void 
+void
 snmp_timeout(void)
 {
     struct session_list *slp;
@@ -784,7 +783,8 @@
 	snmplib_debug(6, "LIBSNMP:  Checking session %s\n",
 	    (sp->peername != NULL) ? sp->peername : "<NULL>");
 	for (rp = isp->requests; rp; rp = rp->next_request) {
-	    snmplib_debug(6, "LIBSNMP:  Checking session request %d, expire at %u, Retry %d/%d\n",
+	    snmplib_debug(6,
+		"LIBSNMP:  Checking session request %d, expire at %u, Retry %d/%d\n",
 		rp->request_id, rp->expire.tv_sec, rp->retries, sp->retries);
 
 	    if (freeme != NULL) {
@@ -825,7 +825,9 @@
 			"sending", rp->pdu->address.sin_addr);
 
 		    gettimeofday(&tv, (struct timezone *) 0);
-		    if (sendto(isp->sd, (char *) packet, length, 0, (struct sockaddr *) &rp->pdu->address, sizeof(rp->pdu->address)) < 0) {
+		    if (sendto(isp->sd, (char *) packet, length, 0,
+			    (struct sockaddr *) &rp->pdu->address,
+			    sizeof(rp->pdu->address)) < 0) {
 			perror("sendto");
 		    }
 		    rp->time = tv;
@@ -846,7 +848,7 @@
 
 
 /* Print some API stats */
-void 
+void
 snmp_api_stats(void *outP)
 {
     struct session_list *slp;
@@ -887,7 +889,8 @@
 	}
 	fprintf(out, "LIBSNMP: ----------------------------------------\n");
     }
-    fprintf(out, "LIBSNMP: Session List: %d active, %d have requests pending.\n",
-	active, requests);
+    fprintf(out,
+	"LIBSNMP: Session List: %d active, %d have requests pending.\n", active,
+	requests);
 }
 #endif
Index: squid/snmplib/snmp_api_error.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_api_error.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/snmp_api_error.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/snmp_api_error.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -44,8 +44,7 @@
 
 int snmp_errno = 0;
 
-static char *api_errors[17] =
-{
+static char *api_errors[17] = {
     "Unknown Error",
     "Generic Error",
     "Invalid local port",
@@ -69,7 +68,7 @@
     "Unknown Error"
 };
 
-void 
+void
 snmp_set_api_error(int x)
 {
     snmp_errno = x;
@@ -79,14 +78,13 @@
 snmp_api_error(int err)
 {
     int foo = (err * -1);
-    if ((foo < SNMPERR_GENERR) ||
-	(foo > SNMPERR_LAST))
+    if ((foo < SNMPERR_GENERR) || (foo > SNMPERR_LAST))
 	foo = 0;
 
     return (api_errors[foo]);
 }
 
-int 
+int
 snmp_api_errno(void)
 {
     return (snmp_errno);
Index: squid/snmplib/snmp_error.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_error.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.136.1
diff -u -r1.1.1.1 -r1.1.1.1.136.1
--- squid/snmplib/snmp_error.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/snmp_error.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.136.1
@@ -33,8 +33,7 @@
 #include "snmp_error.h"
 
 
-static char *error_string[19] =
-{
+static char *error_string[19] = {
     "No Error",
     "Response message would have been too large.",
     "There is no such variable name in this MIB.",
@@ -42,7 +41,7 @@
     "This variable is read only",
     "A general failure occured",
 
-  /* SNMPv2 Errors */
+    /* SNMPv2 Errors */
     "NOACCESS",
     "WRONGTYPE",
     "WRONGLENGTH",
Index: squid/snmplib/snmp_msg.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_msg.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/snmp_msg.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/snmp_msg.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -126,9 +126,7 @@
 
 u_char *
 snmp_msg_Encode(u_char * Buffer, int *BufLenP,
-    u_char * Community, int CommLen,
-    int Version,
-    struct snmp_pdu * PDU)
+    u_char * Community, int CommLen, int Version, struct snmp_pdu *PDU)
 {
     u_char *bufp, *tmp;
     u_char *PDUHeaderPtr, *VARHeaderPtr;
@@ -140,11 +138,10 @@
 	*BufLenP);
     /* Header for the entire thing, with a false, large length */
     bufp = asn_build_header(Buffer, BufLenP,
-	(u_char) (ASN_SEQUENCE |
-	    ASN_CONSTRUCTOR),
-	(*BufLenP));
+	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), (*BufLenP));
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Encode:Error encoding SNMP Message Header (Header)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Encode:Error encoding SNMP Message Header (Header)!\n");
 	return (NULL);
     }
     MsgPtr = bufp;
@@ -152,23 +149,22 @@
     /* Version */
     bufp = asn_build_int(bufp, BufLenP,
 	(u_char) (ASN_UNIVERSAL |
-	    ASN_PRIMITIVE |
-	    ASN_INTEGER),
-	(int *) (&Version), sizeof(Version));
+ASN_PRIMITIVE | ASN_INTEGER), (int *) (&Version), sizeof(Version));
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Encode:Error encoding SNMP Message Header (Version)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Encode:Error encoding SNMP Message Header (Version)!\n");
 	return (NULL);
     }
-    snmplib_debug(8, "snmp_msg_Encode: Encoding community (%s) (%d)\n", Community, CommLen);
+    snmplib_debug(8, "snmp_msg_Encode: Encoding community (%s) (%d)\n",
+	Community, CommLen);
 
     /* Community */
     bufp = asn_build_string(bufp, BufLenP,
 	(u_char) (ASN_UNIVERSAL |
-	    ASN_PRIMITIVE |
-	    ASN_OCTET_STR),
-	Community, CommLen);
+ASN_PRIMITIVE | ASN_OCTET_STR), Community, CommLen);
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Encode:Error encoding SNMP Message Header (Community)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Encode:Error encoding SNMP Message Header (Community)!\n");
 	return (NULL);
     }
     /* Encode the rest. */
@@ -176,12 +172,12 @@
     /* A nice header for this PDU. 
      * Encoded with the wrong length.  We'll fix it later.
      */
-    snmplib_debug(8, "snmp_msg_Encode:Encoding PDU Header at 0x%x (fake len %d) (%d bytes so far)\n",
+    snmplib_debug(8,
+	"snmp_msg_Encode:Encoding PDU Header at 0x%x (fake len %d) (%d bytes so far)\n",
 	bufp, *BufLenP, *BufLenP);
     PDUHeaderPtr = bufp;
     bufp = asn_build_header(bufp, BufLenP,
-	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	(*BufLenP));
+	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), (*BufLenP));
     if (bufp == NULL)
 	return (NULL);
 
@@ -193,8 +189,7 @@
 
     VARHeaderPtr = bufp;
     bufp = asn_build_header(bufp, BufLenP,
-	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	FakeArg);
+	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), FakeArg);
     if (bufp == NULL)
 	return (NULL);
     VARDataStart = bufp;
@@ -213,8 +208,7 @@
 	(int) (bufp - PDUDataStart), PDUHeaderPtr, bufp);
 #endif
     tmp = asn_build_header(PDUHeaderPtr, &FakeArg,
-	(u_char) PDU->command,
-	(int) (bufp - PDUDataStart));
+	(u_char) PDU->command, (int) (bufp - PDUDataStart));
     /* Length of the PDU and Vars */
     if (tmp == NULL)
 	return (NULL);
@@ -224,16 +218,12 @@
 	(int) (bufp - MsgPtr), MsgPtr, bufp);
 #endif
     tmp = asn_build_header(Buffer,
-	&FakeArg,
-	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	(bufp - MsgPtr));	/* Length of everything */
+	&FakeArg, (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), (bufp - MsgPtr));	/* Length of everything */
     if (tmp == NULL)
 	return (NULL);
 
     tmp = asn_build_header(VARHeaderPtr,
-	&FakeArg,
-	(u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	(bufp - VARDataStart));	/* Length of everything */
+	&FakeArg, (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), (bufp - VARDataStart));	/* Length of everything */
     if (tmp == NULL)
 	return (NULL);
 
@@ -245,40 +235,42 @@
 
 u_char *
 snmp_msg_Decode(u_char * Packet, int *PacketLenP,
-    u_char * Community, int *CommLenP,
-    int *Version, struct snmp_pdu * PDU)
+    u_char * Community, int *CommLenP, int *Version, struct snmp_pdu * PDU)
 {
     u_char *bufp;
     u_char type;
 
     bufp = asn_parse_header(Packet, PacketLenP, &type);
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Decode:Error decoding SNMP Messsage Header (Header)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Decode:Error decoding SNMP Messsage Header (Header)!\n");
 	ASN_PARSE_ERROR(NULL);
     }
     if (type != (ASN_SEQUENCE | ASN_CONSTRUCTOR)) {
-	snmplib_debug(4, "snmp_msg_Decode:Error decoding SNMP Messsage Header (Header)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Decode:Error decoding SNMP Messsage Header (Header)!\n");
 	ASN_PARSE_ERROR(NULL);
     }
     bufp = asn_parse_int(bufp, PacketLenP,
-	&type,
-	(int *) Version, sizeof(*Version));
+	&type, (int *) Version, sizeof(*Version));
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Decode:Error decoding SNMP Messsage Header (Version)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Decode:Error decoding SNMP Messsage Header (Version)!\n");
 	ASN_PARSE_ERROR(NULL);
     }
     bufp = asn_parse_string(bufp, PacketLenP, &type, Community, CommLenP);
     if (bufp == NULL) {
-	snmplib_debug(4, "snmp_msg_Decode:Error decoding SNMP Messsage Header (Community)!\n");
+	snmplib_debug(4,
+	    "snmp_msg_Decode:Error decoding SNMP Messsage Header (Community)!\n");
 	ASN_PARSE_ERROR(NULL);
     }
     Community[*CommLenP] = '\0';
 
-    if ((*Version != SNMP_VERSION_1) &&
-	(*Version != SNMP_VERSION_2)) {
+    if ((*Version != SNMP_VERSION_1) && (*Version != SNMP_VERSION_2)) {
 
 	/* Don't know how to handle this one. */
-	snmplib_debug(4, "snmp_msg_Decode:Unable to parse Version %u\n", *Version);
+	snmplib_debug(4, "snmp_msg_Decode:Unable to parse Version %u\n",
+	    *Version);
 	snmplib_debug(4, "snmp_msg_Decode:Continuing anyway\n");
     }
     /* Now that we know the header, decode the PDU */
@@ -289,7 +281,8 @@
 	/* snmp_pdu_decode registered failure */
 	return (NULL);
 
-    bufp = snmp_var_DecodeVarBind(bufp, PacketLenP, &(PDU->variables), *Version);
+    bufp =
+	snmp_var_DecodeVarBind(bufp, PacketLenP, &(PDU->variables), *Version);
     if (bufp == NULL)
 	/* snmp_var_DecodeVarBind registered failure */
 	return (NULL);
Index: squid/snmplib/snmp_pdu.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_pdu.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/snmplib/snmp_pdu.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/snmplib/snmp_pdu.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.76.1
@@ -155,7 +155,8 @@
     xmemcpy((char *) Dest, (char *) Src, sizeof(struct snmp_pdu));
 
 #ifdef DEBUG_PDU
-    snmplib_debug(8, "PDU %x:  Created %x\n", (unsigned int) Src, (unsigned int) Dest);
+    snmplib_debug(8, "PDU %x:  Created %x\n", (unsigned int) Src,
+	(unsigned int) Dest);
 #endif
     return (Dest);
 }
@@ -193,8 +194,7 @@
 #endif
 
     if (pdu->command != SNMP_PDU_RESPONSE ||
-	pdu->errstat == SNMP_ERR_NOERROR ||
-	pdu->errindex <= 0) {
+	pdu->errstat == SNMP_ERR_NOERROR || pdu->errindex <= 0) {
 	snmp_set_api_error(SNMPERR_UNABLE_TO_FIX);
 	return (NULL);
     }
@@ -270,7 +270,7 @@
 
 /**********************************************************************/
 
-void 
+void
 snmp_pdu_free(struct snmp_pdu *pdu)
 {
     snmp_free_pdu(pdu);
@@ -279,7 +279,7 @@
 /*
  * Frees the pdu and any xmalloc'd data associated with it.
  */
-void 
+void
 snmp_free_pdu(struct snmp_pdu *pdu)
 {
     struct variable_list *vp, *ovp;
@@ -346,8 +346,7 @@
  */
 
 u_char *
-snmp_pdu_encode(u_char * DestBuf, int *DestBufLen,
-    struct snmp_pdu *PDU)
+snmp_pdu_encode(u_char * DestBuf, int *DestBufLen, struct snmp_pdu *PDU)
 {
     u_char *bufp;
 
@@ -389,8 +388,7 @@
 	/* specific trap */
 	bufp = asn_build_int(bufp, DestBufLen,
 	    (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-	    (int *) &PDU->specific_type,
-	    sizeof(PDU->specific_type));
+	    (int *) &PDU->specific_type, sizeof(PDU->specific_type));
 	if (bufp == NULL)
 	    return (NULL);
 
@@ -418,16 +416,14 @@
 	/* non-repeaters */
 	bufp = asn_build_int(bufp, DestBufLen,
 	    (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-	    &PDU->non_repeaters,
-	    sizeof(PDU->non_repeaters));
+	    &PDU->non_repeaters, sizeof(PDU->non_repeaters));
 	if (bufp == NULL)
 	    return (NULL);
 
 	/* max-repetitions */
 	bufp = asn_build_int(bufp, DestBufLen,
 	    (u_char) (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
-	    &PDU->max_repetitions,
-	    sizeof(PDU->max_repetitions));
+	    &PDU->max_repetitions, sizeof(PDU->max_repetitions));
 	if (bufp == NULL)
 	    return (NULL);
 	break;
@@ -524,32 +520,25 @@
 	/* Agent-addr */
 	four = 4;
 	bufp = asn_parse_string(bufp, Length,
-	    &ASNType,
-	    (u_char *) & PDU->agent_addr.sin_addr.s_addr,
-	    &four);
+	    &ASNType, (u_char *) & PDU->agent_addr.sin_addr.s_addr, &four);
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
 	/* Generic trap */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    (int *) &PDU->trap_type,
-	    sizeof(PDU->trap_type));
+	    &ASNType, (int *) &PDU->trap_type, sizeof(PDU->trap_type));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
 	/* Specific Trap */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    (int *) &PDU->specific_type,
-	    sizeof(PDU->specific_type));
+	    &ASNType, (int *) &PDU->specific_type, sizeof(PDU->specific_type));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
 	/* Timestamp */
 	bufp = asn_parse_unsigned_int(bufp, Length,
-	    &ASNType,
-	    &PDU->time, sizeof(PDU->time));
+	    &ASNType, &PDU->time, sizeof(PDU->time));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 	break;
@@ -562,22 +551,19 @@
 
 	/* request id */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->reqid, sizeof(PDU->reqid));
+	    &ASNType, &PDU->reqid, sizeof(PDU->reqid));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
 	/* non-repeaters */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->non_repeaters, sizeof(PDU->non_repeaters));
+	    &ASNType, &PDU->non_repeaters, sizeof(PDU->non_repeaters));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
 	/* max-repetitions */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->max_repetitions, sizeof(PDU->max_repetitions));
+	    &ASNType, &PDU->max_repetitions, sizeof(PDU->max_repetitions));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
@@ -590,8 +576,7 @@
 
 	/* request id */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->reqid, sizeof(PDU->reqid));
+	    &ASNType, &PDU->reqid, sizeof(PDU->reqid));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
@@ -601,8 +586,7 @@
 
 	/* error status */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->errstat, sizeof(PDU->errstat));
+	    &ASNType, &PDU->errstat, sizeof(PDU->errstat));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
@@ -612,8 +596,7 @@
 
 	/* error index */
 	bufp = asn_parse_int(bufp, Length,
-	    &ASNType,
-	    &PDU->errindex, sizeof(PDU->errindex));
+	    &ASNType, &PDU->errindex, sizeof(PDU->errindex));
 	if (bufp == NULL)
 	    ASN_PARSE_ERROR(NULL);
 
@@ -670,7 +653,7 @@
  * Add a null variable with the requested name to the end of the list of
  * variables for this pdu.
  */
-void 
+void
 snmp_add_null_var(struct snmp_pdu *pdu, oid * name, int name_length)
 {
     struct variable_list *vars;
@@ -686,9 +669,7 @@
     } else {
 
 	/* Insert at the end */
-	for (ptr = pdu->variables;
-	    ptr->next_variable;
-	    ptr = ptr->next_variable)
+	for (ptr = pdu->variables; ptr->next_variable; ptr = ptr->next_variable)
 	    /*EXIT */ ;
 	ptr->next_variable = vars;
     }
Index: squid/snmplib/snmp_vars.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_vars.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.122.1
diff -u -r1.1.1.2 -r1.1.1.2.122.1
--- squid/snmplib/snmp_vars.c	26 Jan 2000 03:25:01 -0000	1.1.1.2
+++ squid/snmplib/snmp_vars.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.122.1
@@ -1,4 +1,3 @@
-
 /*
  * SNMP Variable Binding.  Complies with:
  *
@@ -200,8 +199,7 @@
 	    Src->name_length * sizeof(oid));
     }
     /* CISCO Catalyst 2900 returns NULL strings as data of length 0. */
-    if ((Src->val.string != NULL) &&
-	(Src->val_len)) {
+    if ((Src->val.string != NULL) && (Src->val_len)) {
 	Dest->val.string = (u_char *) xmalloc(Src->val_len);
 	if (Dest->val.string == NULL) {
 	    snmp_set_api_error(SNMPERR_OS_ERR);
@@ -212,7 +210,8 @@
 #ifdef DEBUG_VARS
 	printf("VARS: Copying value (Size %d)\n", Src->val_len);
 #endif
-	xmemcpy((char *) Dest->val.string, (char *) Src->val.string, Src->val_len);
+	xmemcpy((char *) Dest->val.string, (char *) Src->val.string,
+	    Src->val_len);
     }
 #ifdef DEBUG_VARS
     printf("VARS: Cloned %x.\n", (unsigned int) Dest);
@@ -261,8 +260,7 @@
  */
 u_char *
 snmp_var_EncodeVarBind(u_char * Buffer, int *BufLenP,
-    variable_list * VarList,
-    int Version)
+    variable_list * VarList, int Version)
 {
     struct variable_list *Vars;
     u_char *bufp;
@@ -280,17 +278,14 @@
 	 */
 	HeaderStart = bufp;
 	HeaderEnd = asn_build_header(HeaderStart, BufLenP,
-	    (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	    FakeArg);
+	    (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), FakeArg);
 	if (HeaderEnd == NULL)
 	    return (NULL);
 
 	/* Now, let's put the Object Identifier into the buffer */
 	bufp = asn_build_objid(HeaderEnd, BufLenP,
 	    (u_char) (ASN_UNIVERSAL |
-		ASN_PRIMITIVE |
-		ASN_OBJECT_ID),
-	    Vars->name, Vars->name_length);
+ASN_PRIMITIVE | ASN_OBJECT_ID), Vars->name, Vars->name_length);
 	if (bufp == NULL)
 	    return (NULL);
 
@@ -299,8 +294,7 @@
 
 	case ASN_INTEGER:
 	    bufp = asn_build_int(bufp,
-		BufLenP, Vars->type,
-		(int *) Vars->val.integer, Vars->val_len);
+		BufLenP, Vars->type, (int *) Vars->val.integer, Vars->val_len);
 	    break;
 
 	case SMI_COUNTER32:
@@ -308,8 +302,7 @@
 	    /*  case SMI_UNSIGNED32: */
 	case SMI_TIMETICKS:
 	    bufp = asn_build_unsigned_int(bufp, BufLenP,
-		Vars->type,
-		(u_int *) Vars->val.integer, Vars->val_len);
+		Vars->type, (u_int *) Vars->val.integer, Vars->val_len);
 	    break;
 
 	case ASN_OCTET_STR:
@@ -354,8 +347,7 @@
 
 	/* Rebuild the header with the appropriate length */
 	HeaderEnd = asn_build_header(HeaderStart, &FakeArg,
-	    (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR),
-	    (bufp - HeaderEnd));
+	    (u_char) (ASN_SEQUENCE | ASN_CONSTRUCTOR), (bufp - HeaderEnd));
 
 	/* Returns NULL */
 	if (HeaderEnd == NULL)
@@ -373,8 +365,7 @@
 /* Parse all Vars from the buffer */
 u_char *
 snmp_var_DecodeVarBind(u_char * Buffer, int *BufLen,
-    struct variable_list ** VarP,
-    int Version)
+    struct variable_list ** VarP, int Version)
 {
     struct variable_list *Var, **VarLastP;
     u_char *bufp, *tmp;
@@ -430,7 +421,8 @@
 	    ASN_PARSE_ERROR(NULL);
 	}
 #ifdef DEBUG_VARS_DECODE
-	printf("VARS: Header type 0x%x (%d bytes left)\n", VarBindType, ThisVarLen);
+	printf("VARS: Header type 0x%x (%d bytes left)\n", VarBindType,
+	    ThisVarLen);
 #endif
 
 	/* Parse the OBJID */
@@ -440,8 +432,7 @@
 	    ASN_PARSE_ERROR(NULL);
 
 	if (VarBindType != (u_char) (ASN_UNIVERSAL |
-		ASN_PRIMITIVE |
-		ASN_OBJECT_ID)) {
+		ASN_PRIMITIVE | ASN_OBJECT_ID)) {
 	    snmp_set_api_error(SNMPERR_PDU_PARSE);
 	    ASN_PARSE_ERROR(NULL);
 	}
@@ -476,8 +467,7 @@
 	    }
 	    Var->val_len = sizeof(int);
 	    bufp = asn_parse_int(DataPtr, &ThisVarLen,
-		&Var->type, (int *) Var->val.integer,
-		Var->val_len);
+		&Var->type, (int *) Var->val.integer, Var->val_len);
 #ifdef DEBUG_VARS_DECODE
 	    printf("VARS: Decoded integer '%d' (%d bytes left)\n",
 		*(Var->val.integer), ThisVarLen);
@@ -495,8 +485,7 @@
 	    }
 	    Var->val_len = sizeof(u_int);
 	    bufp = asn_parse_unsigned_int(DataPtr, &ThisVarLen,
-		&Var->type, (u_int *) Var->val.integer,
-		Var->val_len);
+		&Var->type, (u_int *) Var->val.integer, Var->val_len);
 #ifdef DEBUG_VARS_DECODE
 	    printf("VARS: Decoded timeticks '%d' (%d bytes left)\n",
 		*(Var->val.integer), ThisVarLen);
@@ -513,8 +502,7 @@
 		return (NULL);
 	    }
 	    bufp = asn_parse_string(DataPtr, &ThisVarLen,
-		&Var->type, Var->val.string,
-		&Var->val_len);
+		&Var->type, Var->val.string, &Var->val_len);
 #ifdef DEBUG_VARS_DECODE
 	    printf("VARS: Decoded string '%s' (length %d) (%d bytes left)\n",
 		(Var->val.string), Var->val_len, ThisVarLen);
Index: squid/snmplib/snmplib_debug.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/snmplib/snmplib_debug.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.126.1
diff -u -r1.1.1.2 -r1.1.1.2.126.1
--- squid/snmplib/snmplib_debug.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/snmplib/snmplib_debug.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.126.1
@@ -16,14 +16,14 @@
 #endif
 
 #if STDC_HEADERS
-void (*snmplib_debug_hook) (int, char *,...) = NULL;
+void (*snmplib_debug_hook) (int, char *, ...) = NULL;
 #else
 void (*snmplib_debug_hook) (va_alist) = NULL;
 #endif
 
 extern void
 #if STDC_HEADERS
-snmplib_debug(int lvl, char *fmt,...)
+snmplib_debug(int lvl, char *fmt, ...)
 {
     char buf[BUFSIZ];
     va_list args;
Index: squid/src/CacheDigest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/CacheDigest.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/CacheDigest.c	6 Jan 2001 12:40:11 -0000	1.1.1.2.4.1.2.1
+++ squid/src/CacheDigest.c	27 Aug 2001 21:48:18 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: CacheDigest.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: CacheDigest.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 70    Cache Digest
  * AUTHOR: Alex Rousskov
@@ -38,12 +37,14 @@
 #if USE_CACHE_DIGESTS
 
 /* local types */
-typedef struct {
+typedef struct
+{
     int bit_count;		/* total number of bits */
     int bit_on_count;		/* #bits turned on */
     int bseq_len_sum;		/* sum of all bit seq length */
     int bseq_count;		/* number of bit seqs */
-} CacheDigestStats;
+}
+CacheDigestStats;
 
 /* local functions */
 static void cacheDigestHashKey(const CacheDigest * cd, const cache_key * key);
@@ -62,7 +63,8 @@
     cd->bits_per_entry = bpe;
     cd->mask_size = mask_size;
     cd->mask = xcalloc(cd->mask_size, 1);
-    debug(70, 2) ("cacheDigestInit: capacity: %d entries, bpe: %d; size: %d bytes\n",
+    debug(70,
+	2) ("cacheDigestInit: capacity: %d entries, bpe: %d; size: %d bytes\n",
 	cd->capacity, cd->bits_per_entry, cd->mask_size);
 }
 
@@ -238,7 +240,8 @@
 }
 
 void
-cacheDigestGuessStatsReport(const cd_guess_stats * stats, StoreEntry * sentry, const char *label)
+cacheDigestGuessStatsReport(const cd_guess_stats * stats, StoreEntry * sentry,
+    const char *label)
 {
     const int true_count = stats->true_hits + stats->true_misses;
     const int false_count = stats->false_hits + stats->false_misses;
@@ -268,7 +271,8 @@
 	hit_count, xpercent(hit_count, tot_count),
 	miss_count, xpercent(miss_count, tot_count),
 	tot_count, xpercent(tot_count, tot_count));
-    storeAppendPrintf(sentry, "\tclose_hits: %d ( %d%%) /* cd said hit, doc was in the peer cache, but we got a miss */\n",
+    storeAppendPrintf(sentry,
+	"\tclose_hits: %d ( %d%%) /* cd said hit, doc was in the peer cache, but we got a miss */\n",
 	stats->close_hits, xpercentInt(stats->close_hits, stats->false_hits));
 }
 
@@ -279,29 +283,22 @@
     assert(cd && e);
     cacheDigestStats(cd, &stats);
     storeAppendPrintf(e, "%s digest: size: %d bytes\n",
-	label ? label : "", stats.bit_count / 8
-	);
+	label ? label : "", stats.bit_count / 8);
     storeAppendPrintf(e, "\t entries: count: %d capacity: %d util: %d%%\n",
-	cd->count,
-	cd->capacity,
-	xpercentInt(cd->count, cd->capacity)
-	);
-    storeAppendPrintf(e, "\t deletion attempts: %d\n",
-	cd->del_count
+	cd->count, cd->capacity, xpercentInt(cd->count, cd->capacity)
 	);
-    storeAppendPrintf(e, "\t bits: per entry: %d on: %d capacity: %d util: %d%%\n",
-	cd->bits_per_entry,
-	stats.bit_on_count, stats.bit_count,
+    storeAppendPrintf(e, "\t deletion attempts: %d\n", cd->del_count);
+    storeAppendPrintf(e,
+	"\t bits: per entry: %d on: %d capacity: %d util: %d%%\n",
+	cd->bits_per_entry, stats.bit_on_count, stats.bit_count,
 	xpercentInt(stats.bit_on_count, stats.bit_count)
 	);
     storeAppendPrintf(e, "\t bit-seq: count: %d avg.len: %.2f\n",
-	stats.bseq_count,
-	xdiv(stats.bseq_len_sum, stats.bseq_count)
+	stats.bseq_count, xdiv(stats.bseq_len_sum, stats.bseq_count)
 	);
 }
 
-size_t
-cacheDigestCalcMaskSize(int cap, int bpe)
+size_t cacheDigestCalcMaskSize(int cap, int bpe)
 {
     return (size_t) (cap * bpe + 7) / 8;
 }
Index: squid/src/ETag.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/ETag.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/ETag.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.4.1.2.1
+++ squid/src/ETag.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ETag.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: ETag.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -62,6 +61,6 @@
 etagIsEqual(const ETag * tag1, const ETag * tag2)
 {
     assert(tag1 && tag2);
-    assert(!tag1->weak && !tag2->weak);		/* weak comparison not implemented yet */
+    assert(!tag1->weak && !tag2->weak);	/* weak comparison not implemented yet */
     return !strcmp(tag1->str, tag2->str);
 }
Index: squid/src/HttpBody.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpBody.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/HttpBody.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.4.1.2.1
+++ squid/src/HttpBody.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,8 +1,5 @@
-
-
-
 /*
- * $Id: HttpBody.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpBody.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
Index: squid/src/HttpHdrCc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrCc.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpHdrCc.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpHdrCc.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHdrCc.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHdrCc.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 65    HTTP Cache Control Header
  * AUTHOR: Alex Rousskov
@@ -36,8 +35,7 @@
 #include "squid.h"
 
 /* this table is used for parsing cache control header */
-static const HttpHeaderFieldAttrs CcAttrs[CC_ENUM_END] =
-{
+static const HttpHeaderFieldAttrs CcAttrs[CC_ENUM_END] = {
     {"public", CC_PUBLIC},
     {"private", CC_PRIVATE},
     {"no-cache", CC_NO_CACHE},
@@ -110,15 +108,20 @@
 	if ((p = strchr(item, '=')) && (p - item < ilen))
 	    ilen = p++ - item;
 	/* find type */
-	type = httpHeaderIdByName(item, ilen,
-	    CcFieldsInfo, CC_ENUM_END);
+	type = httpHeaderIdByName(item, ilen, CcFieldsInfo, CC_ENUM_END);
 	if (type < 0) {
-	    debug(65, 2) ("hdr cc: unknown cache-directive: near '%s' in '%s'\n", item, strBuf(*str));
+	    debug(65,
+		2) ("hdr cc: unknown cache-directive: near '%s' in '%s'\n",
+		item, strBuf(*str));
 	    type = CC_OTHER;
 	}
 	if (EBIT_TEST(cc->mask, type)) {
 	    if (type != CC_OTHER)
-		debug(65, 2) ("hdr cc: ignoring duplicate cache-directive: near '%s' in '%s'\n", item, strBuf(*str));
+		debug(65, 2)
+
+		    
+		    ("hdr cc: ignoring duplicate cache-directive: near '%s' in '%s'\n",
+		    item, strBuf(*str));
 	    CcFieldsInfo[type].stat.repCount++;
 	    continue;
 	}
@@ -177,7 +180,8 @@
 	if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
 
 	    /* print option name */
-	    packerPrintf(p, (pcount ? ", %s" : "%s"), strBuf(CcFieldsInfo[flag].name));
+	    packerPrintf(p, (pcount ? ", %s" : "%s"),
+		strBuf(CcFieldsInfo[flag].name));
 
 	    /* handle options with values */
 	    if (flag == CC_MAX_AGE)
@@ -237,7 +241,8 @@
 }
 
 void
-httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size,
+    int count)
 {
     extern const HttpHeaderStat *dump_stat;	/* argh! */
     const int id = (int) val;
Index: squid/src/HttpHdrContRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrContRange.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpHdrContRange.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpHdrContRange.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHdrContRange.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHdrContRange.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 68    HTTP Content-Range Header
  * AUTHOR: Alex Rousskov
@@ -60,7 +59,8 @@
 
 /* parses range-resp-spec and inits spec, returns true on success */
 static int
-httpHdrRangeRespSpecParseInit(HttpHdrRangeSpec * spec, const char *field, int flen)
+httpHdrRangeRespSpecParseInit(HttpHdrRangeSpec * spec, const char *field,
+    int flen)
 {
     const char *p;
     assert(spec);
@@ -88,7 +88,8 @@
     }
     /* we managed to parse, check if the result makes sence */
     if (known_spec(spec->length) && !spec->length) {
-	debug(68, 2) ("invalid range (%d += %d) in resp-range-spec near: '%s'\n",
+	debug(68,
+	    2) ("invalid range (%d += %d) in resp-range-spec near: '%s'\n",
 	    spec->offset, spec->length, field);
 	return 0;
     }
@@ -187,7 +188,8 @@
 }
 
 void
-httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, ssize_t ent_len)
+httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec,
+    ssize_t ent_len)
 {
     assert(cr && ent_len >= 0);
     cr->spec = spec;
Index: squid/src/HttpHdrExtField.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrExtField.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpHdrExtField.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpHdrExtField.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHdrExtField.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHdrExtField.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 69    HTTP Header: Extension Field
  * AUTHOR: Alex Rousskov
@@ -36,7 +35,8 @@
 #include "squid.h"
 
 /* local prototypes */
-static HttpHdrExtField *httpHdrExtFieldDoCreate(const char *name, int name_len, const char *value, int val_len);
+static HttpHdrExtField *httpHdrExtFieldDoCreate(const char *name, int name_len,
+    const char *value, int val_len);
 
 
 /* implementation */
@@ -54,9 +54,7 @@
 HttpHdrExtField *
 httpHdrExtFieldCreate(const char *name, const char *value)
 {
-    return httpHdrExtFieldDoCreate(
-	name, strlen(name),
-	value, strlen(value));
+    return httpHdrExtFieldDoCreate(name, strlen(name), value, strlen(value));
 }
 
 /* parses ext field; returns fresh ext field on success and NULL on failure */
@@ -76,8 +74,7 @@
     while (value_start < field_end && xisspace(*value_start))
 	value_start++;
 
-    return httpHdrExtFieldDoCreate(
-	field_start, name_end - field_start,
+    return httpHdrExtFieldDoCreate(field_start, name_end - field_start,
 	value_start, field_end - value_start);
 }
 
@@ -94,7 +91,6 @@
 httpHdrExtFieldDup(HttpHdrExtField * f)
 {
     assert(f);
-    return httpHdrExtFieldDoCreate(
-	strBuf(f->name), strLen(f->name),
+    return httpHdrExtFieldDoCreate(strBuf(f->name), strLen(f->name),
 	strBuf(f->value), strLen(f->value));
 }
Index: squid/src/HttpHdrRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrRange.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpHdrRange.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpHdrRange.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHdrRange.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHdrRange.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -82,8 +81,7 @@
 static HttpHdrRangeSpec *
 httpHdrRangeSpecParseCreate(const char *field, int flen)
 {
-    HttpHdrRangeSpec spec =
-    {range_spec_unknown, range_spec_unknown};
+    HttpHdrRangeSpec spec = { range_spec_unknown, range_spec_unknown };
     const char *p;
     if (flen < 2)
 	return NULL;
@@ -94,7 +92,8 @@
     } else
 	/* must have a '-' somewhere in _this_ field */
     if (!((p = strchr(field, '-')) || (p - field >= flen))) {
-	debug(64, 2) ("ignoring invalid (missing '-') range-spec near: '%s'\n", field);
+	debug(64, 2) ("ignoring invalid (missing '-') range-spec near: '%s'\n",
+	    field);
 	return NULL;
     } else {
 	if (!httpHeaderParseSize(field, &spec.offset))
@@ -110,7 +109,8 @@
     }
     /* we managed to parse, check if the result makes sence */
     if (known_spec(spec.length) && !spec.length) {
-	debug(64, 2) ("ignoring invalid (zero length) range-spec near: '%s'\n", field);
+	debug(64, 2) ("ignoring invalid (zero length) range-spec near: '%s'\n",
+	    field);
 	return NULL;
     }
     return httpHdrRangeSpecDup(&spec);
@@ -137,11 +137,10 @@
 {
     if (!known_spec(spec->offset))	/* suffix */
 	packerPrintf(p, "-%d", spec->length);
-    else if (!known_spec(spec->length))		/* trailer */
+    else if (!known_spec(spec->length))	/* trailer */
 	packerPrintf(p, "%d-", spec->offset);
     else			/* range */
-	packerPrintf(p, "%d-%d",
-	    spec->offset, spec->offset + spec->length - 1);
+	packerPrintf(p, "%d-%d", spec->offset, spec->offset + spec->length - 1);
 }
 
 /* fills "absent" positions in range specification based on response body size 
@@ -155,7 +154,7 @@
 	spec->offset, spec->offset + spec->length, spec->length);
     if (!known_spec(spec->offset))	/* suffix */
 	spec->offset = size_diff(clen, spec->length);
-    else if (!known_spec(spec->length))		/* trailer */
+    else if (!known_spec(spec->length))	/* trailer */
 	spec->length = size_diff(clen, spec->offset);
     /* we have a "range" now, adjust length if needed */
     assert(known_spec(spec->length));
@@ -170,12 +169,13 @@
 /* merges recepient with donor if possible; returns true on success 
  * both specs must be canonized prior to merger, of course */
 static int
-httpHdrRangeSpecMergeWith(HttpHdrRangeSpec * recep, const HttpHdrRangeSpec * donor)
+httpHdrRangeSpecMergeWith(HttpHdrRangeSpec * recep,
+    const HttpHdrRangeSpec * donor)
 {
     int merged = 0;
 #if MERGING_BREAKS_NOTHING
     /* Note: this code works, but some clients may not like its effects */
-    size_t rhs = recep->offset + recep->length;		/* no -1 ! */
+    size_t rhs = recep->offset + recep->length;	/* no -1 ! */
     const size_t donor_rhs = donor->offset + donor->length;	/* no -1 ! */
     assert(known_spec(recep->offset));
     assert(known_spec(donor->offset));
@@ -197,8 +197,7 @@
 	recep->length = rhs - recep->offset;
     } else {
 	/* does recepient contain donor? */
-	merged =
-	    recep->offset <= donor->offset && donor->offset < rhs;
+	merged = recep->offset <= donor->offset && donor->offset < rhs;
     }
 #endif
     return merged;
@@ -312,7 +311,8 @@
     assert(range);
     assert(clen >= 0);
     stackInit(&goods);
-    debug(64, 3) ("httpHdrRangeCanonize: started with %d specs, clen: %d\n", range->specs.count, clen);
+    debug(64, 3) ("httpHdrRangeCanonize: started with %d specs, clen: %d\n",
+	range->specs.count, clen);
 
     /* canonize each entry and destroy bad ones if any */
     while ((spec = httpHdrRangeGetSpec(range, &pos))) {
@@ -415,8 +415,7 @@
  * Returns lowest known offset in range spec(s), or range_spec_unknown
  * this is used for size limiting
  */
-ssize_t
-httpHdrRangeFirstOffset(const HttpHdrRange * range)
+ssize_t httpHdrRangeFirstOffset(const HttpHdrRange * range)
 {
     ssize_t offset = range_spec_unknown;
     HttpHdrRangePos pos = HttpHdrRangeInitPos;
@@ -435,8 +434,7 @@
  * ranges are combined into one, for example FTP REST.
  * Use 0 for size if unknown
  */
-ssize_t
-httpHdrRangeLowestOffset(const HttpHdrRange * range, ssize_t size)
+ssize_t httpHdrRangeLowestOffset(const HttpHdrRange * range, ssize_t size)
 {
     ssize_t offset = range_spec_unknown;
     ssize_t current;
@@ -459,8 +457,7 @@
 
 /* generates a "unique" boundary string for multipart responses
  * the caller is responsible for cleaning the string */
-String
-httpHdrRangeBoundaryStr(clientHttpRequest * http)
+String httpHdrRangeBoundaryStr(clientHttpRequest * http)
 {
     const char *key;
     String b = StringNull;
Index: squid/src/HttpHeader.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/HttpHeader.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.2.2.1
+++ squid/src/HttpHeader.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHeader.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHeader.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -64,8 +63,7 @@
  * We calculate name lengths and reorganize this array on start up. 
  * After reorganization, field id can be used as an index to the table.
  */
-static const HttpHeaderFieldAttrs HeadersAttrs[] =
-{
+static const HttpHeaderFieldAttrs HeadersAttrs[] = {
     {"Accept", HDR_ACCEPT, ftStr},
     {"Accept-Charset", HDR_ACCEPT_CHARSET, ftStr},
     {"Accept-Encoding", HDR_ACCEPT_ENCODING, ftStr},
@@ -131,8 +129,7 @@
  * Headers that are currently not recognized, are commented out.
  */
 static HttpHeaderMask ListHeadersMask;	/* set run-time using  ListHeadersArr */
-static http_hdr_type ListHeadersArr[] =
-{
+static http_hdr_type ListHeadersArr[] = {
     HDR_ACCEPT,
     HDR_ACCEPT_CHARSET, HDR_ACCEPT_ENCODING, HDR_ACCEPT_LANGUAGE,
     HDR_ACCEPT_RANGES, HDR_ALLOW,
@@ -154,8 +151,7 @@
 };
 
 /* general-headers */
-static http_hdr_type GeneralHeadersArr[] =
-{
+static http_hdr_type GeneralHeadersArr[] = {
     HDR_CACHE_CONTROL, HDR_CONNECTION, HDR_DATE, HDR_PRAGMA,
     /* HDR_TRANSFER_ENCODING, */
     HDR_UPGRADE,
@@ -164,17 +160,16 @@
 };
 
 /* entity-headers */
-static http_hdr_type EntityHeadersArr[] =
-{
+static http_hdr_type EntityHeadersArr[] = {
     HDR_ALLOW, HDR_CONTENT_BASE, HDR_CONTENT_ENCODING, HDR_CONTENT_LANGUAGE,
     HDR_CONTENT_LENGTH, HDR_CONTENT_LOCATION, HDR_CONTENT_MD5,
-    HDR_CONTENT_RANGE, HDR_CONTENT_TYPE, HDR_ETAG, HDR_EXPIRES, HDR_LAST_MODIFIED, HDR_LINK,
+    HDR_CONTENT_RANGE, HDR_CONTENT_TYPE, HDR_ETAG, HDR_EXPIRES,
+    HDR_LAST_MODIFIED, HDR_LINK,
     HDR_OTHER
 };
 
-static HttpHeaderMask ReplyHeadersMask;		/* set run-time using ReplyHeaders */
-static http_hdr_type ReplyHeadersArr[] =
-{
+static HttpHeaderMask ReplyHeadersMask;	/* set run-time using ReplyHeaders */
+static http_hdr_type ReplyHeadersArr[] = {
     HDR_ACCEPT, HDR_ACCEPT_CHARSET, HDR_ACCEPT_ENCODING, HDR_ACCEPT_LANGUAGE,
     HDR_ACCEPT_RANGES, HDR_AGE,
     HDR_LOCATION, HDR_MAX_FORWARDS,
@@ -187,8 +182,7 @@
 };
 
 static HttpHeaderMask RequestHeadersMask;	/* set run-time using RequestHeaders */
-static http_hdr_type RequestHeadersArr[] =
-{
+static http_hdr_type RequestHeadersArr[] = {
     HDR_AUTHORIZATION, HDR_FROM, HDR_HOST,
     HDR_IF_MATCH, HDR_IF_MODIFIED_SINCE, HDR_IF_NONE_MATCH,
     HDR_IF_RANGE, HDR_MAX_FORWARDS, HDR_PROXY_CONNECTION,
@@ -197,8 +191,7 @@
 };
 
 /* header accounting */
-static HttpHeaderStat HttpHeaderStats[] =
-{
+static HttpHeaderStat HttpHeaderStats[] = {
     {"all"},
 #if USE_HTCP
     {"HTCP reply"},
@@ -216,10 +209,13 @@
 
 #define assert_eid(id) assert((id) >= 0 && (id) < HDR_ENUM_END)
 
-static HttpHeaderEntry *httpHeaderEntryCreate(http_hdr_type id, const char *name, const char *value);
+static HttpHeaderEntry *httpHeaderEntryCreate(http_hdr_type id,
+    const char *name, const char *value);
 static void httpHeaderEntryDestroy(HttpHeaderEntry * e);
-static HttpHeaderEntry *httpHeaderEntryParseCreate(const char *field_start, const char *field_end);
-static void httpHeaderNoteParsedEntry(http_hdr_type id, String value, int error);
+static HttpHeaderEntry *httpHeaderEntryParseCreate(const char *field_start,
+    const char *field_end);
+static void httpHeaderNoteParsedEntry(http_hdr_type id, String value,
+    int error);
 
 static void httpHeaderStatInit(HttpHeaderStat * hs, const char *label);
 static void httpHeaderStatDump(const HttpHeaderStat * hs, StoreEntry * e);
@@ -240,15 +236,22 @@
 	Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
     /* create masks */
     httpHeaderMaskInit(&ListHeadersMask, 0);
-    httpHeaderCalcMask(&ListHeadersMask, (const int *) ListHeadersArr, countof(ListHeadersArr));
+    httpHeaderCalcMask(&ListHeadersMask, (const int *) ListHeadersArr,
+	countof(ListHeadersArr));
     httpHeaderMaskInit(&ReplyHeadersMask, 0);
-    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) ReplyHeadersArr, countof(ReplyHeadersArr));
-    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) GeneralHeadersArr, countof(GeneralHeadersArr));
-    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) EntityHeadersArr, countof(EntityHeadersArr));
+    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) ReplyHeadersArr,
+	countof(ReplyHeadersArr));
+    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) GeneralHeadersArr,
+	countof(GeneralHeadersArr));
+    httpHeaderCalcMask(&ReplyHeadersMask, (const int *) EntityHeadersArr,
+	countof(EntityHeadersArr));
     httpHeaderMaskInit(&RequestHeadersMask, 0);
-    httpHeaderCalcMask(&RequestHeadersMask, (const int *) RequestHeadersArr, countof(RequestHeadersArr));
-    httpHeaderCalcMask(&RequestHeadersMask, (const int *) GeneralHeadersArr, countof(GeneralHeadersArr));
-    httpHeaderCalcMask(&RequestHeadersMask, (const int *) EntityHeadersArr, countof(EntityHeadersArr));
+    httpHeaderCalcMask(&RequestHeadersMask, (const int *) RequestHeadersArr,
+	countof(RequestHeadersArr));
+    httpHeaderCalcMask(&RequestHeadersMask, (const int *) GeneralHeadersArr,
+	countof(GeneralHeadersArr));
+    httpHeaderCalcMask(&RequestHeadersMask, (const int *) EntityHeadersArr,
+	countof(EntityHeadersArr));
     /* init header stats */
     assert(HttpHeaderStatCount == hoReply + 1);
     for (i = 0; i < HttpHeaderStatCount; i++)
@@ -310,13 +313,15 @@
     assert(hdr->owner > hoNone && hdr->owner <= hoReply);
     debug(55, 7) ("cleaning hdr: %p owner: %d\n", hdr, hdr->owner);
 
-    statHistCount(&HttpHeaderStats[hdr->owner].hdrUCountDistr, hdr->entries.count);
+    statHistCount(&HttpHeaderStats[hdr->owner].hdrUCountDistr,
+	hdr->entries.count);
     HttpHeaderStats[hdr->owner].destroyedCount++;
     HttpHeaderStats[hdr->owner].busyDestroyedCount += hdr->entries.count > 0;
     while ((e = httpHeaderGetEntry(hdr, &pos))) {
 	/* tmp hack to try to avoid coredumps */
 	if (e->id < 0 || e->id >= HDR_ENUM_END) {
-	    debug(55, 0) ("httpHeaderClean BUG: entry[%d] is invalid (%d). Ignored.\n",
+	    debug(55, 0)
+		("httpHeaderClean BUG: entry[%d] is invalid (%d). Ignored.\n",
 		pos, e->id);
 	} else {
 	    statHistCount(&HttpHeaderStats[hdr->owner].fieldTypeDistr, e->id);
@@ -344,7 +349,8 @@
 
 /* use fresh entries to replace old ones */
 void
-httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask)
+httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh,
+    const HttpHeaderMask * denied_mask)
 {
     const HttpHeaderEntry *e;
     HttpHeaderPos pos = HttpHeaderInitPos;
@@ -374,14 +380,16 @@
 }
 
 int
-httpHeaderParse(HttpHeader * hdr, const char *header_start, const char *header_end)
+httpHeaderParse(HttpHeader * hdr, const char *header_start,
+    const char *header_end)
 {
     const char *field_start = header_start;
     HttpHeaderEntry *e;
 
     assert(hdr);
     assert(header_start && header_end);
-    debug(55, 7) ("parsing hdr: (%p)\n%s\n", hdr, getStringPrefix(header_start, header_end));
+    debug(55, 7) ("parsing hdr: (%p)\n%s\n", hdr, getStringPrefix(header_start,
+	    header_end));
     HttpHeaderStats[hdr->owner].parsedCount++;
     /* commonn format headers are "<name>:[ws]<value>" lines delimited by <CRLF> */
     while (field_start < header_end) {
@@ -401,7 +409,8 @@
 	if (e != NULL)
 	    httpHeaderAddEntry(hdr, e);
 	else
-	    debug(55, 2) ("warning: ignoring unparseable http header field near '%s'\n",
+	    debug(55, 2)
+		("warning: ignoring unparseable http header field near '%s'\n",
 		getStringPrefix(field_start, field_end));
 	field_start = field_end;
 	/* skip CRLF */
@@ -575,8 +584,7 @@
 }
 
 /* return a list of entries with the same id separated by ',' and ws */
-String
-httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id)
+String httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id)
 {
     String s = StringNull;
     HttpHeaderEntry *e;
@@ -597,7 +605,8 @@
     assert(strBuf(s));
     /* temporary warning: remove it! @?@ @?@ @?@ */
     if (!strLen(s))
-	debug(55, 3) ("empty list header: %s (%d)\n", strBuf(Headers[id].name), id);
+	debug(55, 3) ("empty list header: %s (%d)\n", strBuf(Headers[id].name),
+	    id);
     debug(55, 6) ("%p: joined for id %d: %s\n", hdr, id, strBuf(s));
     return s;
 }
@@ -645,7 +654,8 @@
 httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme, const char *realm)
 {
     assert(hdr && authScheme && realm);
-    httpHeaderPutStrf(hdr, HDR_WWW_AUTHENTICATE, "%s realm=\"%s\"", authScheme, realm);
+    httpHeaderPutStrf(hdr, HDR_WWW_AUTHENTICATE, "%s realm=\"%s\"", authScheme,
+	realm);
 }
 
 void
@@ -661,7 +671,8 @@
     packerToMemInit(&p, &mb);
     httpHdrCcPackInto(cc, &p);
     /* put */
-    httpHeaderAddEntry(hdr, httpHeaderEntryCreate(HDR_CACHE_CONTROL, NULL, mb.buf));
+    httpHeaderAddEntry(hdr, httpHeaderEntryCreate(HDR_CACHE_CONTROL, NULL,
+	    mb.buf));
     /* cleanup */
     packerClean(&p);
     memBufClean(&mb);
@@ -680,7 +691,8 @@
     packerToMemInit(&p, &mb);
     httpHdrContRangePackInto(cr, &p);
     /* put */
-    httpHeaderAddEntry(hdr, httpHeaderEntryCreate(HDR_CONTENT_RANGE, NULL, mb.buf));
+    httpHeaderAddEntry(hdr, httpHeaderEntryCreate(HDR_CONTENT_RANGE, NULL,
+	    mb.buf));
     /* cleanup */
     packerClean(&p);
     memBufClean(&mb);
@@ -729,8 +741,7 @@
     return value;
 }
 
-time_t
-httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id)
+time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id)
 {
     HttpHeaderEntry *e;
     time_t value = -1;
@@ -818,7 +829,8 @@
 }
 
 const char *
-httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *authScheme)
+httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id,
+    const char *authScheme)
 {
     const char *field;
     int l;
@@ -839,20 +851,17 @@
     return base64_decode(field);
 }
 
-ETag
-httpHeaderGetETag(const HttpHeader * hdr, http_hdr_type id)
+ETag httpHeaderGetETag(const HttpHeader * hdr, http_hdr_type id)
 {
-    ETag etag =
-    {NULL, -1};
+    ETag etag = { NULL, -1 };
     HttpHeaderEntry *e;
-    assert(Headers[id].type == ftETag);		/* must be of an appropriate type */
+    assert(Headers[id].type == ftETag);	/* must be of an appropriate type */
     if ((e = httpHeaderFindEntry(hdr, id)))
 	etagParseInit(&etag, strBuf(e->value));
     return etag;
 }
 
-TimeOrTag
-httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id)
+TimeOrTag httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id)
 {
     TimeOrTag tot;
     HttpHeaderEntry *e;
@@ -892,7 +901,8 @@
 	stringInit(&e->name, name);
     stringInit(&e->value, value);
     Headers[id].stat.aliveCount++;
-    debug(55, 9) ("created entry %p: '%s: %s'\n", e, strBuf(e->name), strBuf(e->value));
+    debug(55, 9) ("created entry %p: '%s: %s'\n", e, strBuf(e->name),
+	strBuf(e->value));
     return e;
 }
 
@@ -901,7 +911,8 @@
 {
     assert(e);
     assert_eid(e->id);
-    debug(55, 9) ("destroying entry %p: '%s: %s'\n", e, strBuf(e->name), strBuf(e->value));
+    debug(55, 9) ("destroying entry %p: '%s: %s'\n", e, strBuf(e->name),
+	strBuf(e->value));
     /* clean name if needed */
     if (e->id == HDR_OTHER)
 	stringClean(&e->name);
@@ -936,7 +947,8 @@
     }
     /* now we know we can parse it */
     e = memAllocate(MEM_HTTP_HDR_ENTRY);
-    debug(55, 9) ("creating entry %p: near '%s'\n", e, getStringPrefix(field_start, field_end));
+    debug(55, 9) ("creating entry %p: near '%s'\n", e,
+	getStringPrefix(field_start, field_end));
     /* is it a "known" field? */
     id = httpHeaderIdByName(field_start, name_len, Headers, HDR_ENUM_END);
     if (id < 0)
@@ -964,7 +976,8 @@
     stringLimitInit(&e->value, value_start, field_end - value_start);
     Headers[id].stat.seenCount++;
     Headers[id].stat.aliveCount++;
-    debug(55, 9) ("created entry %p: '%s: %s'\n", e, strBuf(e->name), strBuf(e->value));
+    debug(55, 9) ("created entry %p: '%s: %s'\n", e, strBuf(e->name),
+	strBuf(e->value));
     return e;
 }
 
@@ -1000,11 +1013,12 @@
  */
 
 /* tmp variable used to pass stat info to dumpers */
-extern const HttpHeaderStat *dump_stat;		/* argh! */
+extern const HttpHeaderStat *dump_stat;	/* argh! */
 const HttpHeaderStat *dump_stat = NULL;
 
 static void
-httpHeaderFieldStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHeaderFieldStatDumper(StoreEntry * sentry, int idx, double val, double size,
+    int count)
 {
     const int id = (int) val;
     const int valid_id = id >= 0 && id < HDR_ENUM_END;
@@ -1019,12 +1033,12 @@
 }
 
 static void
-httpHeaderFldsPerHdrDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+httpHeaderFldsPerHdrDumper(StoreEntry * sentry, int idx, double val,
+    double size, int count)
 {
     if (count)
 	storeAppendPrintf(sentry, "%2d\t %5d\t %5d\t %6.2f\n",
-	    idx, (int) val, count,
-	    xpercent(count, dump_stat->destroyedCount));
+	    idx, (int) val, count, xpercent(count, dump_stat->destroyedCount));
 }
 
 
@@ -1058,13 +1072,17 @@
     assert(e);
 
     HttpHeaderStats[0].parsedCount =
-	HttpHeaderStats[hoRequest].parsedCount + HttpHeaderStats[hoReply].parsedCount;
+	HttpHeaderStats[hoRequest].parsedCount +
+	HttpHeaderStats[hoReply].parsedCount;
     HttpHeaderStats[0].ccParsedCount =
-	HttpHeaderStats[hoRequest].ccParsedCount + HttpHeaderStats[hoReply].ccParsedCount;
+	HttpHeaderStats[hoRequest].ccParsedCount +
+	HttpHeaderStats[hoReply].ccParsedCount;
     HttpHeaderStats[0].destroyedCount =
-	HttpHeaderStats[hoRequest].destroyedCount + HttpHeaderStats[hoReply].destroyedCount;
+	HttpHeaderStats[hoRequest].destroyedCount +
+	HttpHeaderStats[hoReply].destroyedCount;
     HttpHeaderStats[0].busyDestroyedCount =
-	HttpHeaderStats[hoRequest].busyDestroyedCount + HttpHeaderStats[hoReply].busyDestroyedCount;
+	HttpHeaderStats[hoRequest].busyDestroyedCount +
+	HttpHeaderStats[hoReply].busyDestroyedCount;
 
     for (i = 1; i < HttpHeaderStatCount; i++) {
 	httpHeaderStatDump(HttpHeaderStats + i, e);
@@ -1083,13 +1101,13 @@
     }
     storeAppendPrintf(e, "Headers Parsed: %d + %d = %d\n",
 	HttpHeaderStats[hoRequest].parsedCount,
-	HttpHeaderStats[hoReply].parsedCount,
-	HttpHeaderStats[0].parsedCount);
+	HttpHeaderStats[hoReply].parsedCount, HttpHeaderStats[0].parsedCount);
     storeAppendPrintf(e, "Hdr Fields Parsed: %d\n", HeaderEntryParsedCount);
 }
 
 int
-httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * info, int end)
+httpHeaderIdByName(const char *name, int name_len,
+    const HttpHeaderFieldInfo * info, int end)
 {
     int i;
     for (i = 0; i < end; ++i) {
Index: squid/src/HttpHeaderTools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeaderTools.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpHeaderTools.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpHeaderTools.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpHeaderTools.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpHeaderTools.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 66    HTTP Header Tools
  * AUTHOR: Alex Rousskov
@@ -36,7 +35,8 @@
 #include "squid.h"
 
 static int httpHeaderStrCmp(const char *h1, const char *h2, int len);
-static void httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list vargs);
+static void httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id,
+    const char *fmt, va_list vargs);
 
 
 HttpHeaderFieldInfo *
@@ -99,7 +99,7 @@
 /* same as httpHeaderPutStr, but formats the string using snprintf first */
 void
 #if STDC_HEADERS
-httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...)
+httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt, ...)
 #else
 httpHeaderPutStrf(va_alist)
      va_dcl
@@ -124,7 +124,8 @@
 
 /* used by httpHeaderPutStrf */
 static void
-httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt, va_list vargs)
+httpHeaderPutStrvf(HttpHeader * hdr, http_hdr_type id, const char *fmt,
+    va_list vargs)
 {
     MemBuf mb;
     memBufDefInit(&mb);
@@ -239,7 +240,8 @@
  * init pos with NULL to start iteration.
  */
 int
-strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
+strListGetItem(const String * str, char del, const char **item, int *ilen,
+    const char **pos)
 {
     size_t len;
     assert(str && item && pos);
@@ -346,7 +348,8 @@
     parse_success = httpHeaderParse(&hdr, hstr, hstr + hstr_len);
     /* debugLevels[55] = 2; */
     if (!parse_success) {
-	debug(66, 2) ("TEST (%d): failed to parsed a header: {\n%s}\n", bug_count, hstr);
+	debug(66, 2) ("TEST (%d): failed to parsed a header: {\n%s}\n",
+	    bug_count, hstr);
 	return;
     }
     /* we think that we parsed it, veryfy */
@@ -355,7 +358,10 @@
     httpHeaderPackInto(&hdr, &p);
     if ((pos = abs(httpHeaderStrCmp(hstr, mb.buf, hstr_len)))) {
 	bug_count++;
-	debug(66, 2) ("TEST (%d): hdr parsing bug (pos: %d near '%s'): expected: {\n%s} got: {\n%s}\n",
+	debug(66, 2)
+
+	    
+	    ("TEST (%d): hdr parsing bug (pos: %d near '%s'): expected: {\n%s} got: {\n%s}\n",
 	    bug_count, pos, hstr + pos, hstr, mb.buf);
     }
     httpHeaderClean(&hdr);
Index: squid/src/HttpMsg.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpMsg.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/HttpMsg.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.4.1.2.1
+++ squid/src/HttpMsg.c	27 Aug 2001 21:48:18 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpMsg.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpMsg.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 74    HTTP Message
  * AUTHOR: Alex Rousskov
@@ -38,7 +37,8 @@
 
 /* find end of headers */
 int
-httpMsgIsolateHeaders(const char **parse_start, const char **blk_start, const char **blk_end)
+httpMsgIsolateHeaders(const char **parse_start, const char **blk_start,
+    const char **blk_end)
 {
     /*
      * parse_start points to the first line of HTTP message *headers*,
Index: squid/src/HttpReply.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpReply.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpReply.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpReply.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpReply.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpReply.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -40,8 +39,7 @@
 
 /* these entity-headers must be ignored if a bogus server sends them in 304 */
 static HttpHeaderMask Denied304HeadersMask;
-static http_hdr_type Denied304HeadersArr[] =
-{
+static http_hdr_type Denied304HeadersArr[] = {
     HDR_ALLOW, HDR_CONTENT_ENCODING, HDR_CONTENT_LANGUAGE, HDR_CONTENT_LENGTH,
     HDR_CONTENT_LOCATION, HDR_CONTENT_RANGE, HDR_LAST_MODIFIED, HDR_LINK,
     HDR_OTHER
@@ -53,9 +51,11 @@
 static void httpReplyDoDestroy(HttpReply * rep);
 static void httpReplyHdrCacheInit(HttpReply * rep);
 static void httpReplyHdrCacheClean(HttpReply * rep);
-static int httpReplyParseStep(HttpReply * rep, const char *parse_start, int atEnd);
+static int httpReplyParseStep(HttpReply * rep, const char *parse_start,
+    int atEnd);
 static int httpReplyParseError(HttpReply * rep);
-static int httpReplyIsolateStart(const char **parse_start, const char **blk_start, const char **blk_end);
+static int httpReplyIsolateStart(const char **parse_start,
+    const char **blk_start, const char **blk_end);
 static time_t httpReplyHdrExpirationTime(const HttpReply * rep);
 
 
@@ -64,7 +64,8 @@
 httpReplyInitModule(void)
 {
     httpHeaderMaskInit(&Denied304HeadersMask, 0);
-    httpHeaderCalcMask(&Denied304HeadersMask, (const int *) Denied304HeadersArr, countof(Denied304HeadersArr));
+    httpHeaderCalcMask(&Denied304HeadersMask, (const int *) Denied304HeadersArr,
+	countof(Denied304HeadersArr));
 }
 
 
@@ -167,8 +168,7 @@
 }
 
 /* create memBuf, create mem-based packer,  pack, destroy packer, return MemBuf */
-MemBuf
-httpReplyPack(const HttpReply * rep)
+MemBuf httpReplyPack(const HttpReply * rep)
 {
     MemBuf mb;
     Packer p;
@@ -195,7 +195,7 @@
 
 MemBuf
 httpPackedReply(double ver, http_status status, const char *ctype,
-    int clen, time_t lmt, time_t expires)
+int clen, time_t lmt, time_t expires)
 {
     HttpReply *rep = httpReplyCreate();
     MemBuf mb;
@@ -205,11 +205,12 @@
     return mb;
 }
 
-MemBuf
-httpPacked304Reply(const HttpReply * rep)
+MemBuf httpPacked304Reply(const HttpReply * rep)
 {
     static const http_hdr_type ImsEntries[] =
-    {HDR_DATE, HDR_CONTENT_TYPE, HDR_EXPIRES, HDR_LAST_MODIFIED, /* eof */ HDR_OTHER};
+	{ HDR_DATE, HDR_CONTENT_TYPE, HDR_EXPIRES, HDR_LAST_MODIFIED,	/* eof */
+	HDR_OTHER
+    };
     int t;
     MemBuf mb;
     Packer p;
@@ -228,8 +229,8 @@
 }
 
 void
-httpReplySetHeaders(HttpReply * reply, double ver, http_status status, const char *reason,
-    const char *ctype, int clen, time_t lmt, time_t expires)
+httpReplySetHeaders(HttpReply * reply, double ver, http_status status,
+    const char *reason, const char *ctype, int clen, time_t lmt, time_t expires)
 {
     HttpHeader *hdr;
     assert(reply);
@@ -389,7 +390,8 @@
     if (rep->pstate == psReadyToParseHeaders) {
 	if (!httpMsgIsolateHeaders(&parse_start, &blk_start, &blk_end)) {
 	    if (atEnd)
-		blk_start = parse_start, blk_end = blk_start + strlen(blk_start);
+		blk_start = parse_start, blk_end =
+		    blk_start + strlen(blk_start);
 	    else
 		return 0;
 	}
@@ -419,7 +421,8 @@
 
 /* find first CRLF */
 static int
-httpReplyIsolateStart(const char **parse_start, const char **blk_start, const char **blk_end)
+httpReplyIsolateStart(const char **parse_start, const char **blk_start,
+    const char **blk_end)
 {
     int slen = strcspn(*parse_start, "\r\n");
     if (!(*parse_start)[slen])	/* no CRLF found */
Index: squid/src/HttpRequest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpRequest.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpRequest.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpRequest.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpRequest.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpRequest.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -121,7 +120,8 @@
 
 #if UNUSED_CODE
 void
-httpRequestSetHeaders(request_t * req, method_t method, const char *uri, const char *header_str)
+httpRequestSetHeaders(request_t * req, method_t method, const char *uri,
+    const char *header_str)
 {
     assert(req && uri && header_str);
     assert(!req->header.len);
@@ -136,9 +136,7 @@
 {
     assert(req);
     return strlen(RequestMethodStr[req->method]) + 1 +
-	strLen(req->urlpath) + 1 +
-	4 + 1 + 3 + 2 +
-	req->header.len + 2;
+	strLen(req->urlpath) + 1 + 4 + 1 + 3 + 2 + req->header.len + 2;
 }
 
 /* returns true if header is allowed to be passed on */
Index: squid/src/HttpStatusLine.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpStatusLine.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/HttpStatusLine.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/HttpStatusLine.c	27 Aug 2001 21:48:18 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: HttpStatusLine.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: HttpStatusLine.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:18 tolsty Exp $
  *
  * DEBUG: section 57    HTTP Status-line
  * AUTHOR: Alex Rousskov
@@ -53,7 +52,8 @@
 
 /* set values */
 void
-httpStatusLineSet(HttpStatusLine * sline, double version, http_status status, const char *reason)
+httpStatusLineSet(HttpStatusLine * sline, double version, http_status status,
+    const char *reason)
 {
     assert(sline);
     sline->version = version;
Index: squid/src/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v
retrieving revision 1.1.1.3.14.2
retrieving revision 1.1.1.3.14.2.2.1
diff -u -r1.1.1.3.14.2 -r1.1.1.3.14.2.2.1
--- squid/src/Makefile.in	16 Jun 2001 20:58:30 -0000	1.1.1.3.14.2
+++ squid/src/Makefile.in	27 Aug 2001 21:48:18 -0000	1.1.1.3.14.2.2.1
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.3.14.2 2001/06/16 20:58:30 serassio Exp $
+#  $Id: Makefile.in,v 1.1.1.3.14.2.2.1 2001/08/27 21:48:18 tolsty Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
Index: squid/src/MemBuf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemBuf.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/MemBuf.c	6 Jan 2001 12:40:11 -0000	1.1.1.2.4.1.2.1
+++ squid/src/MemBuf.c	27 Aug 2001 21:48:19 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: MemBuf.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: MemBuf.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Alex Rousskov
@@ -201,7 +201,7 @@
 /* calls memBufVPrintf */
 #if STDC_HEADERS
 void
-memBufPrintf(MemBuf * mb, const char *fmt,...)
+memBufPrintf(MemBuf * mb, const char *fmt, ...)
 {
     va_list args;
     va_start(args, fmt);
Index: squid/src/MemPool.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/MemPool.c	6 Jan 2001 12:40:11 -0000	1.1.1.3.4.1.2.1
+++ squid/src/MemPool.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: MemPool.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: MemPool.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 63    Low Level Memory Pool Management
  * AUTHOR: Alex Rousskov
@@ -50,8 +49,7 @@
 
 /* memory pool accounting */
 static MemPoolMeter TheMeter;
-static gb_t mem_traffic_volume =
-{0, 0};
+static gb_t mem_traffic_volume = { 0, 0 };
 static Stack Pools;
 
 /* local prototypes */
@@ -93,7 +91,8 @@
 	new_pool_limit = mem_unlimited_size;
     /* shrink memory pools if needed */
     if (TheMeter.idle.level > new_pool_limit) {
-	debug(63, 1) ("Shrinking idle mem pools to %.2f MB\n", toMB(new_pool_limit));
+	debug(63, 1) ("Shrinking idle mem pools to %.2f MB\n",
+	    toMB(new_pool_limit));
 	memShrink(new_pool_limit);
     }
     assert(TheMeter.idle.level <= new_pool_limit);
@@ -142,14 +141,18 @@
     /* first phase: cut proportionally to the pool idle size */
     for (i = 0; i < Pools.count && TheMeter.idle.level > new_limit; ++i) {
 	MemPool *pool = Pools.items[i];
-	const ssize_t target_pool_size = (size_t) ((double) pool->meter.idle.level * new_limit) / start_limit;
+	const ssize_t target_pool_size =
+	    (size_t) ((double) pool->meter.idle.level * new_limit) /
+	    start_limit;
 	memPoolShrink(pool, target_pool_size);
     }
-    debug(63, 1) ("memShrink: 1st phase done with %d KB left\n", toKB(TheMeter.idle.level));
+    debug(63, 1) ("memShrink: 1st phase done with %d KB left\n",
+	toKB(TheMeter.idle.level));
     /* second phase: cut to 0 */
     for (i = 0; i < Pools.count && TheMeter.idle.level > new_limit; ++i)
 	memPoolShrink(Pools.items[i], 0);
-    debug(63, 1) ("memShrink: 2nd phase done with %d KB left\n", toKB(TheMeter.idle.level));
+    debug(63, 1) ("memShrink: 2nd phase done with %d KB left\n",
+	toKB(TheMeter.idle.level));
     assert(TheMeter.idle.level <= new_limit);	/* paranoid */
 }
 
@@ -160,27 +163,28 @@
     int alloc_count, int inuse_count, int idle_count, StoreEntry * e)
 {
     assert(pm);
-    storeAppendPrintf(e, "%d\t %d\t %d\t %.2f\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\n",
-    /* alloc */
+    storeAppendPrintf(e,
+	"%d\t %d\t %d\t %.2f\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\n",
+	/* alloc */
 	alloc_count,
 	toKB(obj_size * pm->alloc.level),
 	toKB(obj_size * pm->alloc.hwater_level),
 	(double) ((squid_curtime - pm->alloc.hwater_stamp) / 3600.),
 	xpercentInt(obj_size * pm->alloc.level, TheMeter.alloc.level),
-    /* in use */
+	/* in use */
 	inuse_count,
 	toKB(obj_size * pm->inuse.level),
 	toKB(obj_size * pm->inuse.hwater_level),
 	xpercentInt(pm->inuse.level, pm->alloc.level),
-    /* idle */
+	/* idle */
 	idle_count,
-	toKB(obj_size * pm->idle.level),
-	toKB(obj_size * pm->idle.hwater_level),
-    /* (int)rint(xpercent(pm->idle.level, pm->alloc.level)), */
-    /* saved */
+	toKB(obj_size * pm->idle.level), toKB(obj_size * pm->idle.hwater_level),
+	/* (int)rint(xpercent(pm->idle.level, pm->alloc.level)), */
+	/* saved */
 	xpercentInt(pm->saved.count, mem_traffic_volume.count),
-	xpercentInt(obj_size * gb_to_double(&pm->saved), gb_to_double(&mem_traffic_volume)),
-	xpercentInt(pm->saved.count, pm->total.count));
+	xpercentInt(obj_size * gb_to_double(&pm->saved),
+	    gb_to_double(&mem_traffic_volume)), xpercentInt(pm->saved.count,
+	    pm->total.count));
 }
 
 /* MemMeter */
@@ -294,8 +298,7 @@
     return pool->meter.inuse.level;
 }
 
-size_t
-memPoolInUseSize(const MemPool * pool)
+size_t memPoolInUseSize(const MemPool * pool)
 {
     assert(pool);
     return pool->obj_size * pool->meter.inuse.level;
@@ -311,8 +314,7 @@
 	toKB(memPoolInUseSize(pool)));
 }
 
-size_t
-memTotalAllocated(void)
+size_t memTotalAllocated(void)
 {
     return TheMeter.alloc.level;
 }
@@ -321,11 +323,10 @@
 memPoolReport(const MemPool * pool, StoreEntry * e)
 {
     assert(pool);
-    storeAppendPrintf(e, "%-20s\t %4d\t ",
-	pool->label, pool->obj_size);
+    storeAppendPrintf(e, "%-20s\t %4d\t ", pool->label, pool->obj_size);
     memPoolMeterReport(&pool->meter, pool->obj_size,
-	pool->meter.alloc.level, pool->meter.inuse.level, pool->meter.idle.level,
-	e);
+	pool->meter.alloc.level, pool->meter.inuse.level,
+	pool->meter.idle.level, e);
 }
 
 void
@@ -345,9 +346,7 @@
 	"(#)\t (KB)\t high (KB)\t high (hrs)\t impact (%%total)\t"
 	"(#)\t (KB)\t high (KB)\t portion (%%alloc)\t"
 	"(#)\t (KB)\t high (KB)\t"
-	"(%%number)\t (%%volume)\t"
-	"(%%number)"
-	"\n");
+	"(%%number)\t (%%volume)\t" "(%%number)" "\n");
     /* main table */
     for (i = 0; i < Pools.count; i++) {
 	const MemPool *pool = Pools.items[i];
@@ -358,14 +357,14 @@
 	    idle_count += pool->meter.idle.level;
 	}
 	overhd_size += sizeof(MemPool) + sizeof(MemPool *) +
-	    strlen(pool->label) + 1 +
-	    pool->pstack.capacity * sizeof(void *);
+	    strlen(pool->label) + 1 + pool->pstack.capacity * sizeof(void *);
     }
     overhd_size += sizeof(Pools) + Pools.capacity * sizeof(MemPool *);
     /* totals */
     storeAppendPrintf(e, "%-20s\t %-4s\t ", "Total", "-");
     memPoolMeterReport(&TheMeter, 1, alloc_count, inuse_count, idle_count, e);
-    storeAppendPrintf(e, "Cumulative allocated volume: %s\n", gb_to_str(&mem_traffic_volume));
+    storeAppendPrintf(e, "Cumulative allocated volume: %s\n",
+	gb_to_str(&mem_traffic_volume));
     /* overhead */
     storeAppendPrintf(e, "Current overhead: %d bytes (%.3f%%)\n",
 	overhd_size, xpercent(overhd_size, TheMeter.inuse.level));
Index: squid/src/Packer.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Packer.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/Packer.c	6 Jan 2001 12:40:11 -0000	1.1.1.2.4.1.2.1
+++ squid/src/Packer.c	27 Aug 2001 21:48:19 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: Packer.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: Packer.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 60    Packer: A uniform interface to store-like modules
  * AUTHOR: Alex Rousskov
@@ -92,12 +91,16 @@
  */
 
 /* append()'s */
-static void (*const store_append) (StoreEntry *, const char *, int) = &storeAppend;
-static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = &memBufAppend;
+static void (*const store_append) (StoreEntry *, const char *, int) =
+    &storeAppend;
+static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) =
+    &memBufAppend;
 
 /* vprintf()'s */
-static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) = &storeAppendVPrintf;
-static void (*const memBuf_vprintf) (MemBuf *, const char *, va_list ap) = &memBufVPrintf;
+static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) =
+    &storeAppendVPrintf;
+static void (*const memBuf_vprintf) (MemBuf *, const char *, va_list ap) =
+    &memBufVPrintf;
 
 
 /* init/clean */
@@ -143,7 +146,7 @@
 
 #if STDC_HEADERS
 void
-packerPrintf(Packer * p, const char *fmt,...)
+packerPrintf(Packer * p, const char *fmt, ...)
 {
     va_list args;
     va_start(args, fmt);
Index: squid/src/StatHist.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/StatHist.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/StatHist.c	6 Jan 2001 12:40:11 -0000	1.1.1.2.4.1.2.1
+++ squid/src/StatHist.c	27 Aug 2001 21:48:19 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: StatHist.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: StatHist.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -48,7 +47,8 @@
 #include "squid.h"
 
 /* Local functions */
-static void statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max);
+static void statHistInit(StatHist * H, int capacity, hbase_f * val_in,
+    hbase_f * val_out, double min, double max);
 static int statHistBin(const StatHist * H, double v);
 static double statHistVal(const StatHist * H, int bin);
 static StatHistBinDumper statHistBinDumper;
@@ -64,7 +64,8 @@
 
 /* low level init, higher level functions has less params */
 static void
-statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max)
+statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * val_out,
+    double min, double max)
 {
     assert(H);
     assert(capacity > 0);
@@ -122,9 +123,7 @@
     assert(Dest->val_out == Orig->val_out);
     /* actual copy */
     debug(62, 3) ("statHistCopy: copying %d bytes to %p from %p\n",
-	Dest->capacity * sizeof(*Dest->bins),
-	Dest->bins,
-	Orig->bins);
+	Dest->capacity * sizeof(*Dest->bins), Dest->bins, Orig->bins);
     xmemcpy(Dest->bins, Orig->bins, Dest->capacity * sizeof(*Dest->bins));
 }
 
@@ -220,7 +219,8 @@
 }
 
 static void
-statHistBinDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistBinDumper(StoreEntry * sentry, int idx, double val, double size,
+    int count)
 {
     if (count)
 	storeAppendPrintf(sentry, "\t%3d/%f\t%d\t%f\n",
@@ -246,7 +246,7 @@
 #if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
 static
 #endif
-double
+    double
 Log(double x)
 {
     assert((x + 1.0) >= 0.0);
@@ -256,7 +256,7 @@
 #if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
 static
 #endif
-double
+    double
 Exp(double x)
 {
     return exp(x) - 1.0;
@@ -273,7 +273,7 @@
 #if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
 static
 #endif
-double
+    double
 Null(double x)
 {
     return x;
@@ -282,15 +282,16 @@
 void
 statHistEnumInit(StatHist * H, int last_enum)
 {
-    statHistInit(H, last_enum + 3, Null, Null, (double) -1, (double) (last_enum + 1 + 1));
+    statHistInit(H, last_enum + 3, Null, Null, (double) -1,
+	(double) (last_enum + 1 + 1));
 }
 
 void
-statHistEnumDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistEnumDumper(StoreEntry * sentry, int idx, double val, double size,
+    int count)
 {
     if (count)
-	storeAppendPrintf(sentry, "%2d\t %5d\t %5d\n",
-	    idx, (int) val, count);
+	storeAppendPrintf(sentry, "%2d\t %5d\t %5d\n", idx, (int) val, count);
 }
 
 void
@@ -300,7 +301,8 @@
 }
 
 void
-statHistIntDumper(StoreEntry * sentry, int idx, double val, double size, int count)
+statHistIntDumper(StoreEntry * sentry, int idx, double val, double size,
+    int count)
 {
     if (count)
 	storeAppendPrintf(sentry, "%9d\t%9d\n", (int) val, count);
Index: squid/src/String.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/String.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/String.c	6 Jan 2001 12:40:11 -0000	1.1.1.1.4.1.2.1
+++ squid/src/String.c	27 Aug 2001 21:48:19 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: String.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:11 hno Exp $
+ * $Id: String.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
@@ -63,8 +62,7 @@
     s->buf[len] = '\0';
 }
 
-String
-stringDup(const String * s)
+String stringDup(const String * s)
 {
     String dup;
     assert(s);
Index: squid/src/access_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/access_log.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/access_log.c	15 Jul 2001 16:58:38 -0000	1.1.1.3.4.1.2.3
+++ squid/src/access_log.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,7 +1,5 @@
-
-
 /*
- * $Id: access_log.c,v 1.1.1.3.4.1.2.3 2001/07/15 16:58:38 serassio Exp $
+ * $Id: access_log.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 46    Access Log
  * AUTHOR: Duane Wessels
@@ -48,8 +46,7 @@
 static void mcast_encode(unsigned int *, size_t, const unsigned int *);
 #endif
 
-const char *log_tags[] =
-{
+const char *log_tags[] = {
     "NONE",
     "TCP_HIT",
     "TCP_MISS",
@@ -76,11 +73,13 @@
 };
 
 #if FORW_VIA_DB
-typedef struct {
+typedef struct
+{
     char *key;
     void *next;
     int n;
-} fvdb_entry;
+}
+fvdb_entry;
 static hash_table *via_table = NULL;
 static hash_table *forw_table = NULL;
 static void fvdbInit(void);
@@ -98,22 +97,21 @@
 #define LOG_BUF_SZ (MAX_URL<<2)
 
 static const char c2x[] =
-"000102030405060708090a0b0c0d0e0f"
-"101112131415161718191a1b1c1d1e1f"
-"202122232425262728292a2b2c2d2e2f"
-"303132333435363738393a3b3c3d3e3f"
-"404142434445464748494a4b4c4d4e4f"
-"505152535455565758595a5b5c5d5e5f"
-"606162636465666768696a6b6c6d6e6f"
-"707172737475767778797a7b7c7d7e7f"
-"808182838485868788898a8b8c8d8e8f"
-"909192939495969798999a9b9c9d9e9f"
-"a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
-"b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
-"c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
-"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
-"e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
-"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
+    "000102030405060708090a0b0c0d0e0f"
+    "101112131415161718191a1b1c1d1e1f"
+    "202122232425262728292a2b2c2d2e2f"
+    "303132333435363738393a3b3c3d3e3f"
+    "404142434445464748494a4b4c4d4e4f"
+    "505152535455565758595a5b5c5d5e5f"
+    "606162636465666768696a6b6c6d6e6f"
+    "707172737475767778797a7b7c7d7e7f"
+    "808182838485868788898a8b8c8d8e8f"
+    "909192939495969798999a9b9c9d9e9f"
+    "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
+    "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
+    "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
+    "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
+    "e0e1e2e3e4e5e6e7e8e9eaebecedeeef" "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
 
 /* log_quote -- URL-style encoding on MIME headers. */
 
@@ -147,26 +145,20 @@
 	    *buf_cursor++ = 'n';
 	} else
 #endif
-	    if (c <= 0x1F
-		|| c >= 0x7F
+	    if (c <= 0x1F || c >= 0x7F
 #if OLD_LOG_MIME
-		|| c == '"'
-		|| c == '#'
-		|| c == '%'
-		|| c == ';'
-		|| c == '<'
-		|| c == '>'
-		|| c == '?'
-		|| c == '{'
-		|| c == '}'
-		|| c == '|'
-		|| c == '\\'
-		|| c == '^'
-		|| c == '~'
-		|| c == '`'
+	    || c == '"'
+	    || c == '#'
+	    || c == '%'
+	    || c == ';'
+	    || c == '<'
+	    || c == '>'
+	    || c == '?'
+	    || c == '{'
+	    || c == '}'
+	    || c == '|' || c == '\\' || c == '^' || c == '~' || c == '`'
 #endif
-		|| c == '['
-	    || c == ']') {
+	    || c == '[' || c == ']') {
 	    *buf_cursor++ = '%';
 	    i = c * 2;
 	    *buf_cursor++ = c2x[i];
@@ -204,9 +196,7 @@
 	al->url,
 	al->cache.ident,
 	al->hier.ping.timedout ? "TIMEOUT_" : "",
-	hier_strings[al->hier.code],
-	al->hier.host,
-	al->http.content_type);
+	hier_strings[al->hier.code], al->hier.host, al->http.content_type);
 }
 
 static void
@@ -225,9 +215,7 @@
 	al->url,
 	al->http.version,
 	al->http.code,
-	al->cache.size,
-	log_tags[al->cache.code],
-	hier_strings[al->hier.code]);
+	al->cache.size, log_tags[al->cache.code], hier_strings[al->hier.code]);
 }
 
 static void
@@ -290,19 +278,11 @@
     if (Config.onoff.log_mime_hdrs) {
 	char *ereq = log_quote(al->headers.request);
 	char *erep = log_quote(al->headers.reply);
-#ifdef _SQUID_MSWIN_
-	memBufPrintf(&mb, " [%s] [%s]\r\n", ereq, erep);
-#else
 	memBufPrintf(&mb, " [%s] [%s]\n", ereq, erep);
-#endif
 	safe_free(ereq);
 	safe_free(erep);
     } else {
-#ifdef _SQUID_MSWIN_
-	memBufPrintf(&mb, "\r\n");
-#else
 	memBufPrintf(&mb, "\n");
-#endif
     }
     file_write_mbuf(LogfileFD, -1, mb, NULL, NULL);
 #if MULTICAST_MISS_STREAM
@@ -322,8 +302,7 @@
 	mcast_encode((unsigned int *) ibuf, isize,
 	    (const unsigned int *) Config.mcast_miss.encode_key);
 	comm_udp_sendto(mcast_miss_fd,
-	    &mcast_miss_to, sizeof(mcast_miss_to),
-	    ibuf, isize * sizeof(int));
+	    &mcast_miss_to, sizeof(mcast_miss_to), ibuf, isize * sizeof(int));
     }
 #endif
 }
@@ -378,9 +357,7 @@
 }
 
 void
-hierarchyNote(HierarchyLogEntry * hl,
-    hier_code code,
-    const char *cache_peer)
+hierarchyNote(HierarchyLogEntry * hl, hier_code code, const char *cache_peer)
 {
     assert(hl != NULL);
     hl->code = code;
@@ -401,16 +378,8 @@
 	mcast_miss_to.sin_family = AF_INET;
 	mcast_miss_to.sin_port = htons(Config.mcast_miss.port);
 	mcast_miss_to.sin_addr.s_addr = Config.mcast_miss.addr.s_addr;
-	mcast_miss_fd = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-		IPPROTO_UDP,
-#else
-		0,
-#endif
-	    Config.Addrs.udp_incoming,
-	    Config.mcast_miss.port,
-	    COMM_NONBLOCKING,
-	    "Multicast Miss Stream");
+	mcast_miss_fd = comm_open(SOCK_DGRAM, 0, Config.Addrs.udp_incoming,
+	    Config.mcast_miss.port, COMM_NONBLOCKING, "Multicast Miss Stream");
 	if (mcast_miss_fd < 0)
 	    fatal("Cannot open Multicast Miss Stream Socket");
 	debug(46, 1) ("Multicast Miss Stream Socket opened on FD %d\n",
@@ -502,8 +471,7 @@
     fvdbDumpTable(e, forw_table);
 }
 
-static
-void
+static void
 fvdbFreeEntry(void *data)
 {
     fvdb_entry *fv = data;
Index: squid/src/acl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/acl.c,v
retrieving revision 1.1.1.3.4.3.2.3
retrieving revision 1.1.1.3.4.3.2.3.2.1
diff -u -r1.1.1.3.4.3.2.3 -r1.1.1.3.4.3.2.3.2.1
--- squid/src/acl.c	17 Jun 2001 12:39:53 -0000	1.1.1.3.4.3.2.3
+++ squid/src/acl.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.3.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: acl.c,v 1.1.1.3.4.3.2.3 2001/06/17 12:39:53 serassio Exp $
+ * $Id: acl.c,v 1.1.1.3.4.3.2.3.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -120,9 +119,6 @@
 		debug(28, 0) ("strtokFile: %s not found\n", fn);
 		return (NULL);
 	    }
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-	    setmode(fileno(aclFile), O_TEXT);
-#endif
 	    aclFromFile = 1;
 	} else {
 	    return t;
@@ -456,7 +452,11 @@
     if (!decode_addr(addr1, &q->addr1, &q->mask)) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseIpData: Ignoring invalid IP acl entry: unknown first address '%s'\n", addr1);
+	debug(28, 0)
+
+	    
+	    ("aclParseIpData: Ignoring invalid IP acl entry: unknown first address '%s'\n",
+	    addr1);
 	safe_free(q);
 	return NULL;
     }
@@ -464,7 +464,11 @@
     if (*addr2 && !decode_addr(addr2, &q->addr2, &q->mask)) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseIpData: Ignoring invalid IP acl entry: unknown second address '%s'\n", addr2);
+	debug(28, 0)
+
+	    
+	    ("aclParseIpData: Ignoring invalid IP acl entry: unknown second address '%s'\n",
+	    addr2);
 	safe_free(q);
 	return NULL;
     }
@@ -472,7 +476,11 @@
     if (*mask && !decode_addr(mask, &q->mask, NULL)) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseIpData: Ignoring invalid IP acl entry: unknown netmask '%s'\n", mask);
+	debug(28, 0)
+
+	    
+	    ("aclParseIpData: Ignoring invalid IP acl entry: unknown netmask '%s'\n",
+	    mask);
 	safe_free(q);
 	return NULL;
     }
@@ -545,8 +553,7 @@
 		default:
 		    debug(28, 0) ("%s line %d: %s\n",
 			cfg_filename, config_lineno, config_input_line);
-		    debug(28, 0) ("aclParseTimeSpec: Bad Day '%c'\n",
-			*t);
+		    debug(28, 0) ("aclParseTimeSpec: Bad Day '%c'\n", *t);
 		    break;
 		}
 	    }
@@ -564,7 +571,8 @@
 	    if (q->start > q->stop) {
 		debug(28, 0) ("%s line %d: %s\n",
 		    cfg_filename, config_lineno, config_input_line);
-		debug(28, 0) ("aclParseTimeSpec: IGNORING Reversed time range\n");
+		debug(28,
+		    0) ("aclParseTimeSpec: IGNORING Reversed time range\n");
 		xfree(q);
 		return;
 	    }
@@ -602,7 +610,8 @@
 	    regerror(errcode, &comp, errbuf, sizeof errbuf);
 	    debug(28, 0) ("%s line %d: %s\n",
 		cfg_filename, config_lineno, config_input_line);
-	    debug(28, 0) ("aclParseRegexList: Invalid regular expression '%s': %s\n",
+	    debug(28,
+		0) ("aclParseRegexList: Invalid regular expression '%s': %s\n",
 		t, errbuf);
 	    continue;
 	}
@@ -677,7 +686,11 @@
 	new_acl = 1;
     } else {
 	if (acltype != A->type) {
-	    debug(28, 0) ("aclParseAclLine: ACL '%s' already exists with different type, skipping.\n", A->name);
+	    debug(28, 0)
+
+		
+		("aclParseAclLine: ACL '%s' already exists with different type, skipping.\n",
+		A->name);
 	    return;
 	}
 	debug(28, 3) ("aclParseAclLine: Appending to '%s'\n", aclname);
@@ -733,7 +746,8 @@
 	aclParseWordList(&A->data);
 	if (!proxy_auth_cache) {
 	    /* First time around, 7921 should be big enough */
-	    proxy_auth_cache = hash_create((HASHCMP *) strcmp, 7921, hash_string);
+	    proxy_auth_cache =
+		hash_create((HASHCMP *) strcmp, 7921, hash_string);
 	    assert(proxy_auth_cache);
 	}
 	break;
@@ -828,7 +842,8 @@
     if ((t = strtok(NULL, w_space)) == NULL) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseDenyInfoLine: missing 'error page' parameter.\n");
+	debug(28,
+	    0) ("aclParseDenyInfoLine: missing 'error page' parameter.\n");
 	return;
     }
     A = xcalloc(1, sizeof(acl_deny_info_list));
@@ -846,7 +861,10 @@
     if (A->acl_list == NULL) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseDenyInfoLine: deny_info line contains no ACL's, skipping\n");
+	debug(28, 0)
+
+	    
+	    ("aclParseDenyInfoLine: deny_info line contains no ACL's, skipping\n");
 	xfree(A);
 	return;
     }
@@ -881,7 +899,9 @@
     else {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseAccessLine: expecting 'allow' or 'deny', got '%s'.\n", t);
+	debug(28,
+	    0) ("aclParseAccessLine: expecting 'allow' or 'deny', got '%s'.\n",
+	    t);
 	xfree(A);
 	return;
     }
@@ -913,7 +933,8 @@
     if (A->acl_list == NULL) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseAccessLine: Access line contains no ACL's, skipping\n");
+	debug(28, 0)
+	    ("aclParseAccessLine: Access line contains no ACL's, skipping\n");
 	xfree(A);
 	return;
     }
@@ -991,7 +1012,8 @@
     debug(28, 3) ("aclMatchUser: checking '%s'\n", user);
     while (data) {
 	debug(28, 3) ("aclMatchUser: looking for '%s'\n", data->key);
-	if (strcmp(data->key, "REQUIRED") == 0 && *user != '\0' && strcmp(user, "-") != 0)
+	if (strcmp(data->key, "REQUIRED") == 0 && *user != '\0'
+	    && strcmp(user, "-") != 0)
 	    return 1;
 	if (strcmp(data->key, user) == 0)
 	    return 1;
@@ -1001,7 +1023,8 @@
 }
 
 static int
-aclDecodeProxyAuth(const char *proxy_auth, char **user, char **password, char *buf, size_t bufsize)
+aclDecodeProxyAuth(const char *proxy_auth, char **user, char **password,
+    char *buf, size_t bufsize)
 {
     char *sent_auth;
     char *cleartext;
@@ -1009,7 +1032,9 @@
 	return 0;
     debug(28, 6) ("aclDecodeProxyAuth: header = '%s'\n", proxy_auth);
     if (strncasecmp(proxy_auth, "Basic ", 6) != 0) {
-	debug(28, 1) ("aclDecodeProxyAuth: Unsupported proxy-auth scheme, '%s'\n", proxy_auth);
+	debug(28,
+	    1) ("aclDecodeProxyAuth: Unsupported proxy-auth scheme, '%s'\n",
+	    proxy_auth);
 	return 0;
     }
     proxy_auth += 6;		/* "Basic " */
@@ -1033,7 +1058,11 @@
     if ((*password = strchr(*user, ':')) != NULL)
 	*(*password)++ = '\0';
     if (*password == NULL) {
-	debug(28, 1) ("aclDecodeProxyAuth: no password in proxy authorization header '%s'\n", proxy_auth);
+	debug(28, 1)
+
+	    
+	    ("aclDecodeProxyAuth: no password in proxy authorization header '%s'\n",
+	    proxy_auth);
 	return 0;
     }
     if (**password == '\0') {
@@ -1053,13 +1082,15 @@
  */
 
 static int
-aclMatchProxyAuth(wordlist * data, const char *proxy_auth, acl_proxy_auth_user * auth_user, aclCheck_t * checklist)
+aclMatchProxyAuth(wordlist * data, const char *proxy_auth,
+    acl_proxy_auth_user * auth_user, aclCheck_t * checklist)
 {
     /* checklist is used to register user name when identified, nothing else */
     LOCAL_ARRAY(char, login_buf, USER_IDENT_SZ);
     char *user, *password;
 
-    if (!aclDecodeProxyAuth(proxy_auth, &user, &password, login_buf, sizeof(login_buf)))
+    if (!aclDecodeProxyAuth(proxy_auth, &user, &password, login_buf,
+	    sizeof(login_buf)))
 	/* No or invalid Proxy-Auth header */
 	return -2;
 
@@ -1078,7 +1109,8 @@
 	if (auth_user->passwd_ok != 1) {
 	    /* password was checked but did not match */
 	    assert(auth_user->passwd_ok == 0);
-	    debug(28, 4) ("aclMatchProxyAuth: authentication failed for user '%s'\n",
+	    debug(28,
+		4) ("aclMatchProxyAuth: authentication failed for user '%s'\n",
 		user);
 	    aclFreeProxyAuthUser(auth_user);
 	    /*
@@ -1094,7 +1126,8 @@
 	    debug(28, 4) ("aclMatchProxyAuth: user '%s' validated OK\n", user);
 	    /* store validated user in hash, after filling in expiretime */
 	    xstrncpy(checklist->request->user_ident, user, USER_IDENT_SZ);
-	    auth_user->expiretime = current_time.tv_sec + Config.authenticateTTL;
+	    auth_user->expiretime =
+		current_time.tv_sec + Config.authenticateTTL;
 	    auth_user->ip_expiretime = squid_curtime + Config.authenticateIpTTL;
 	    auth_user->ipaddr = checklist->src_addr;
 	    hash_join(proxy_auth_cache, (hash_link *) auth_user);
@@ -1123,7 +1156,9 @@
 	    return aclMatchUser(data, user);
 	} else {
 	    /* user has switched to another IP addr */
-	    debug(28, 1) ("aclMatchProxyAuth: user '%s' has changed IP address\n", user);
+	    debug(28,
+		1) ("aclMatchProxyAuth: user '%s' has changed IP address\n",
+		user);
 	    /* remove this user from the hash, making him unknown */
 	    hash_remove_link(proxy_auth_cache, (hash_link *) auth_user);
 	    aclFreeProxyAuthUser(auth_user);
@@ -1132,7 +1167,8 @@
 	}
     } else {
 	/* password mismatch/timeout */
-	debug(28, 4) ("aclMatchProxyAuth: user '%s' password mismatch/timeout\n",
+	debug(28,
+	    4) ("aclMatchProxyAuth: user '%s' password mismatch/timeout\n",
 	    user);
 	/* remove this user from the hash, making him unknown */
 	hash_remove_link(proxy_auth_cache, (hash_link *) auth_user);
@@ -1170,7 +1206,8 @@
      * in aclMatchProxyAuth, and we should never get this far.
      */
     assert(ok);
-    debug(28, 4) ("aclLookupProxyAuthStart: going to ask authenticator on %s\n", user);
+    debug(28, 4) ("aclLookupProxyAuthStart: going to ask authenticator on %s\n",
+	user);
     /* we must still check this user's password */
     auth_user = memAllocate(MEM_ACL_PROXY_AUTH_USER);
     auth_user->user = xstrdup(user);
@@ -1178,8 +1215,7 @@
     auth_user->passwd_ok = -1;
     auth_user->expiretime = -1;
     checklist->auth_user = auth_user;
-    authenticateStart(checklist->auth_user, aclLookupProxyAuthDone,
-	checklist);
+    authenticateStart(checklist->auth_user, aclLookupProxyAuthDone, checklist);
 }
 
 static int
@@ -1320,7 +1356,8 @@
 	return aclMatchDomainList(&ae->data, "none");
 	/* NOTREACHED */
     case ACL_SRC_DOMAIN:
-	fqdn = fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
+	fqdn =
+	    fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
 	if (fqdn) {
 	    return aclMatchDomainList(&ae->data, fqdn);
 	} else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NONE) {
@@ -1346,7 +1383,8 @@
 	return aclMatchRegex(ae->data, "none");
 	/* NOTREACHED */
     case ACL_SRC_DOM_REGEX:
-	fqdn = fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
+	fqdn =
+	    fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
 	if (fqdn) {
 	    return aclMatchRegex(ae->data, fqdn);
 	} else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NONE) {
@@ -1423,7 +1461,11 @@
 	    header = httpHeaderGetStr(&checklist->request->header,
 		HDR_AUTHORIZATION);
 #else
-	    debug(28, 1) ("aclMatchAcl: proxy_auth %s not applicable on accelerated requests.\n", ae->name);
+	    debug(28, 1)
+
+		
+		("aclMatchAcl: proxy_auth %s not applicable on accelerated requests.\n",
+		ae->name);
 	    return -1;
 #endif
 	}
@@ -1434,9 +1476,7 @@
 	r->flags.used_proxy_auth = 1;
 	/* Check the password */
 	switch (aclMatchProxyAuth(ae->data,
-		header,
-		checklist->auth_user,
-		checklist)) {
+		header, checklist->auth_user, checklist)) {
 	case 0:
 	    /* Correct password, but was not allowed in this ACL */
 	    return 0;
@@ -1549,20 +1589,17 @@
 	if (checklist->state[ACL_DST_IP] == ACL_LOOKUP_NEEDED) {
 	    checklist->state[ACL_DST_IP] = ACL_LOOKUP_PENDING;
 	    ipcache_nbgethostbyname(checklist->request->host,
-		aclLookupDstIPDone,
-		checklist);
+		aclLookupDstIPDone, checklist);
 	    return;
 	} else if (checklist->state[ACL_DST_ASN] == ACL_LOOKUP_NEEDED) {
 	    checklist->state[ACL_DST_ASN] = ACL_LOOKUP_PENDING;
 	    ipcache_nbgethostbyname(checklist->request->host,
-		aclLookupDstIPforASNDone,
-		checklist);
+		aclLookupDstIPforASNDone, checklist);
 	    return;
 	} else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NEEDED) {
 	    checklist->state[ACL_SRC_DOMAIN] = ACL_LOOKUP_PENDING;
 	    fqdncache_nbgethostbyaddr(checklist->src_addr,
-		aclLookupSrcFQDNDone,
-		checklist);
+		aclLookupSrcFQDNDone, checklist);
 	    return;
 	} else if (checklist->state[ACL_DST_DOMAIN] == ACL_LOOKUP_NEEDED) {
 	    ia = ipcacheCheckNumeric(checklist->request->host);
@@ -1573,8 +1610,7 @@
 	    checklist->dst_addr = ia->in_addrs[0];
 	    checklist->state[ACL_DST_DOMAIN] = ACL_LOOKUP_PENDING;
 	    fqdncache_nbgethostbyaddr(checklist->dst_addr,
-		aclLookupDstFQDNDone,
-		checklist);
+		aclLookupDstFQDNDone, checklist);
 	    return;
 	} else if (checklist->state[ACL_PROXY_AUTH] == ACL_LOOKUP_NEEDED) {
 	    debug(28, 3) ("aclCheck: checking password via authenticator\n");
@@ -1597,7 +1633,10 @@
 		checklist->state[ACL_IDENT] = ACL_LOOKUP_PENDING;
 		return;
 	    } else {
-		debug(28, 1) ("aclCheck: Can't start ident lookup. No client connection\n");
+		debug(28, 1)
+
+		    
+		    ("aclCheck: Can't start ident lookup. No client connection\n");
 		cbdataUnlock(checklist->conn);
 		checklist->conn = NULL;
 		allow = 0;
@@ -1667,7 +1706,8 @@
     aclCheck_t *checklist = data;
     if (ident) {
 	xstrncpy(checklist->ident, ident, sizeof(checklist->ident));
-	xstrncpy(checklist->request->user_ident, ident, sizeof(checklist->request->user_ident));
+	xstrncpy(checklist->request->user_ident, ident,
+	    sizeof(checklist->request->user_ident));
     } else {
 	xstrncpy(checklist->ident, "-", sizeof(checklist->ident));
     }
@@ -1676,7 +1716,8 @@
      * over and over on persistent connections
      */
     if (cbdataValid(checklist->conn) && !checklist->conn->ident[0])
-	xstrncpy(checklist->conn->ident, checklist->ident, sizeof(checklist->conn->ident));
+	xstrncpy(checklist->conn->ident, checklist->ident,
+	    sizeof(checklist->conn->ident));
     aclCheck(checklist);
 }
 #endif
@@ -1728,9 +1769,7 @@
 }
 
 aclCheck_t *
-aclChecklistCreate(const acl_access * A,
-    request_t * request,
-    const char *ident)
+aclChecklistCreate(const acl_access * A, request_t * request, const char *ident)
 {
     int i;
     aclCheck_t *checklist = memAllocate(MEM_ACLCHECK_T);
@@ -1758,7 +1797,7 @@
 }
 
 void
-aclNBCheck(aclCheck_t * checklist, PF callback, void *callback_data)
+aclNBCheck(aclCheck_t * checklist, PF * callback, void *callback_data)
 {
     checklist->callback = callback;
     checklist->callback_data = callback_data;
@@ -1955,8 +1994,16 @@
     }
     if (ret == 0) {
 	debug(28, 0) ("WARNING: '%s' is a subdomain of '%s'\n", d1, d2);
-	debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", a);
-	debug(28, 0) ("WARNING: You should probably remove '%s' from the ACL named '%s'\n", d1, AclMatchedName);
+	debug(28, 0)
+
+	    
+	    ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n",
+	    a);
+	debug(28, 0)
+
+	    
+	    ("WARNING: You should probably remove '%s' from the ACL named '%s'\n",
+	    d1, AclMatchedName);
     }
     return ret;
 }
@@ -2064,10 +2111,7 @@
 	    t->weekbits & ACL_THURSDAY ? 'H' : '-',
 	    t->weekbits & ACL_FRIDAY ? 'F' : '-',
 	    t->weekbits & ACL_SATURDAY ? 'A' : '-',
-	    t->start / 60,
-	    t->start % 60,
-	    t->stop / 60,
-	    t->stop % 60);
+	    t->start / 60, t->start % 60, t->stop / 60, t->stop % 60);
 	wordlistAdd(&W, buf);
 	t = t->next;
     }
@@ -2293,7 +2337,11 @@
     if (!decode_eth(eth, q->eth)) {
 	debug(28, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(28, 0) ("aclParseArpData: Ignoring invalid ARP acl entry: can't parse '%s'\n", eth);
+	debug(28, 0)
+
+	    
+	    ("aclParseArpData: Ignoring invalid ARP acl entry: can't parse '%s'\n",
+	    eth);
 	safe_free(q);
 	return NULL;
     }
@@ -2422,8 +2470,7 @@
 	    arpReq.arp_ha.sa_data[2] & 0xff,
 	    arpReq.arp_ha.sa_data[3] & 0xff,
 	    arpReq.arp_ha.sa_data[4] & 0xff,
-	    arpReq.arp_ha.sa_data[5] & 0xff,
-	    ifr->ifr_name);
+	    arpReq.arp_ha.sa_data[5] & 0xff, ifr->ifr_name);
 	/* Do lookup */
 	*Top = splay_splay(&arpReq.arp_ha.sa_data, *Top, aclArpCompare);
 	/* Return if match, otherwise continue to other interfaces */
Index: squid/src/aiops.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/aiops.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/aiops.c	6 Jan 2001 12:40:12 -0000	1.1.1.3.4.2.2.1
+++ squid/src/aiops.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: aiops.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:12 hno Exp $
+ * $Id: aiops.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 43    AIOPS
  * AUTHOR: Stewart Forster <slf@connect.com.au>
@@ -34,11 +34,24 @@
 
 #include "squid.h"
 
+#if USE_ASYNC_IO
+
+#ifdef _SQUID_MSWIN_
+#include <process.h>
+
+#define pthread_t HANDLE
+#define pthread_mutex_t HANDLE
+#define pthread_cond_t HANDLE
+#define AIO_PROPER_MUTEX 1
+#endif
+
 #include	<stdio.h>
 #include	<sys/types.h>
 #include	<sys/stat.h>
 #include	<fcntl.h>
+#ifndef _SQUID_MSWIN_
 #include	<pthread.h>
+#endif
 #include	<errno.h>
 #include	<dirent.h>
 #include	<signal.h>
@@ -48,14 +61,15 @@
 
 #define RIDICULOUS_LENGTH	4096
 
-#if defined(_SQUID_LINUX_)
+#if defined(_SQUID_LINUX_) || defined(_SQUID_MSWIN_)
 /* Linux requires proper use of mutexes or it will segfault deep in the
  * thread libraries. Observed on Alpha SMP Linux 2.2.10-ac12.
  */
 #define USE_PROPER_MUTEX 1
 #endif
 
-enum _aio_thread_status {
+enum _aio_thread_status
+{
     _THREAD_STARTING = 0,
     _THREAD_WAITING,
     _THREAD_BUSY,
@@ -63,7 +77,8 @@
     _THREAD_DONE
 };
 
-enum _aio_request_type {
+enum _aio_request_type
+{
     _AIO_OP_NONE = 0,
     _AIO_OP_OPEN,
     _AIO_OP_READ,
@@ -74,7 +89,8 @@
     _AIO_OP_STAT
 };
 
-typedef struct aio_request_t {
+typedef struct aio_request_t
+{
     enum _aio_request_type request_type;
     int cancelled;
     char *path;
@@ -92,18 +108,24 @@
     struct stat *statp;
     aio_result_t *resultp;
     struct aio_request_t *next;
-} aio_request_t;
+}
+aio_request_t;
 
 
-typedef struct aio_thread_t {
+typedef struct aio_thread_t
+{
     pthread_t thread;
     enum _aio_thread_status status;
     pthread_mutex_t mutex;	/* Mutex for testing condition variable */
     pthread_cond_t cond;	/* Condition variable */
-    struct aio_request_t *volatile req;		/* set by main, cleared by thread */
+    struct aio_request_t *volatile req;	/* set by main, cleared by thread */
     struct aio_request_t *processed_req;	/* reminder to main */
     struct aio_thread_t *next;
-} aio_thread_t;
+#ifdef _SQUID_MSWIN_
+    int volatile exit;
+#endif
+}
+aio_thread_t;
 
 
 int aio_cancel(aio_result_t *);
@@ -120,7 +142,11 @@
 static void aio_queue_request(aio_request_t *);
 static void aio_process_request_queue(void);
 static void aio_cleanup_request(aio_request_t *);
+#ifdef _SQUID_MSWIN_
+static DWORD WINAPI aio_thread_loop(void *);
+#else
 static void *aio_thread_loop(void *);
+#endif
 static void aio_do_open(aio_request_t *);
 static void aio_do_read(aio_request_t *);
 static void aio_do_write(aio_request_t *);
@@ -145,10 +171,75 @@
 static aio_thread_t *wait_threads = NULL;
 static aio_thread_t *busy_threads_head = NULL;
 static aio_thread_t *busy_threads_tail = NULL;
+#ifndef _SQUID_MSWIN_
 static pthread_attr_t globattr;
 static struct sched_param globsched;
+#endif
 static pthread_t main_thread;
 
+#ifdef _SQUID_MSWIN_
+int
+pthread_mutex_init(pthread_mutex_t * pmutex, void *unused)
+{
+    *pmutex = CreateMutex(NULL, FALSE, NULL);
+    return !(*pmutex);
+}
+
+int
+pthread_mutex_lock(pthread_mutex_t * mutex)
+{
+    DWORD r;
+    r = WaitForSingleObject(*mutex, INFINITE);
+    return (r == WAIT_OBJECT_0) ? 0 : EINVAL;
+}
+
+int
+pthread_mutex_trylock(pthread_mutex_t * mutex)
+{
+    DWORD r;
+    r = WaitForSingleObject(*mutex, 0);
+    return (r == WAIT_OBJECT_0) ? 0 : (r == WAIT_TIMEOUT) ? EBUSY : EINVAL;
+}
+
+int
+pthread_mutex_unlock(pthread_mutex_t * mutex)
+{
+    DWORD r;
+
+    r = ReleaseMutex(*mutex);
+    assert(r);
+    Sleep(0);
+    return !r;
+}
+
+int
+pthread_cond_init(pthread_cond_t * pcond, void *unused)
+{
+    *pcond = CreateSemaphore(NULL, 0, 1, NULL);
+    return !(*pcond);
+}
+
+int
+pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)
+{
+    DWORD r;
+
+    pthread_mutex_unlock(mutex);
+    r = WaitForSingleObject(*cond, INFINITE);
+    assert(r == WAIT_OBJECT_0);
+    assert(!pthread_mutex_lock(mutex));
+    return 0;
+}
+
+int
+pthread_cond_signal(pthread_cond_t * cond)
+{
+    assert(ReleaseSemaphore(*cond, 1, NULL));
+    Sleep(0);
+    return 0;
+}
+#endif
+
 static void
 aio_init(void)
 {
@@ -158,7 +249,9 @@
     if (aio_initialised)
 	return;
 
+#ifndef _SQUID_MSWIN_
     pthread_attr_init(&globattr);
+#endif
 #if HAVE_PTHREAD_ATTR_SETSCOPE
 #if defined(_SQUID_SGI_)
     /* 
@@ -170,12 +263,20 @@
     pthread_attr_setscope(&globattr, PTHREAD_SCOPE_SYSTEM);
 #endif
 #endif
+#ifndef _SQUID_MSWIN_
     globsched.sched_priority = 1;
     main_thread = pthread_self();
+#else
+    DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
+	GetCurrentProcess(), &main_thread, 0, FALSE, DUPLICATE_SAME_ACCESS);
+    assert(main_thread);
+#endif
 #if HAVE_PTHREAD_SETSCHEDPARAM
     pthread_setschedparam(main_thread, SCHED_OTHER, &globsched);
 #endif
+#ifndef _SQUID_MSWIN_
     globsched.sched_priority = 2;
+#endif
 #if HAVE_PTHREAD_ATTR_SETSCHEDPARAM
     pthread_attr_setschedparam(&globattr, &globsched);
 #endif
@@ -199,7 +300,14 @@
 	}
 	threadp->req = NULL;
 	threadp->processed_req = NULL;
-	if (pthread_create(&threadp->thread, &globattr, aio_thread_loop, threadp)) {
+#ifdef _SQUID_MSWIN_
+	if (!(threadp->thread =
+		(HANDLE) _beginthreadex(NULL, 0, aio_thread_loop, threadp,
+		    CREATE_SUSPENDED, NULL))) {
+#else
+	if (pthread_create(&threadp->thread, &globattr, aio_thread_loop,
+		threadp)) {
+#endif
 	    fprintf(stderr, "Thread creation failed\n");
 	    threadp->status = _THREAD_FAILED;
 	    continue;
@@ -209,6 +317,9 @@
 #if AIO_PROPER_MUTEX
 	pthread_mutex_lock(&threadp->mutex);
 #endif
+#ifdef _SQUID_MSWIN_
+	ResumeThread(threadp->thread);
+#endif
     }
 
     /* Create request pool */
@@ -217,13 +328,46 @@
     aio_initialised = 1;
 }
 
+#ifdef _SQUID_MSWIN_
+void
+aio_shutdown(void)
+{
+    aio_thread_t *threadp;
+    int i;
+    HANDLE hthreads[NUMTHREADS];
+
+    if (!aio_initialised)
+	return;
+
+    for (i = 0; i < NUMTHREADS; i++) {
+	threadp = &threads[i];
+	threadp->exit = 1;
+	hthreads[i] = threadp->thread;
+	pthread_cond_signal(&threadp->cond);
+	pthread_mutex_unlock(&threadp->mutex);
+    }
+    CloseHandle(main_thread);
+    {
+	DWORD r = WaitForMultipleObjects(NUMTHREADS, hthreads, TRUE, INFINITE);
+	assert(r >= WAIT_OBJECT_0 && r < WAIT_OBJECT_0 + NUMTHREADS);
+    }
+    for (i = 0; i < NUMTHREADS; i++) {
+	CloseHandle(hthreads[i]);
+    }
+    aio_initialised = 0;
+}
 
+DWORD WINAPI
+#else
 static void *
+#endif				/* _SQUID_MSWIN_ */
 aio_thread_loop(void *ptr)
 {
     aio_thread_t *threadp = ptr;
     aio_request_t *request;
+#ifndef _SQUID_MSWIN_
     sigset_t new;
+#endif
 #if !AIO_PROPER_MUTEX
     struct timespec wait_time;
 #endif
@@ -233,7 +377,7 @@
      * the parent squid thread.  Causes havoc with mutex's and
      * condition waits otherwise
      */
-
+#ifndef _SQUID_MSWIN_
     sigemptyset(&new);
     sigaddset(&new, SIGPIPE);
     sigaddset(&new, SIGCHLD);
@@ -251,6 +395,7 @@
 #if HAVE_PTHREAD_SIGMASK
     pthread_sigmask(SIG_BLOCK, &new, NULL);
 #else
+#endif
     /*
      * Some versions of AIX, 4.2 at least, do not have pthread_sigmask
      * in the pthreads library.  They still use the older sigthreadmask
@@ -264,6 +409,13 @@
 #if AIO_PROPER_MUTEX
 	while (threadp->req == NULL) {
 	    threadp->status = _THREAD_WAITING;
+#ifdef _SQUID_MSWIN_
+	    if (threadp->exit) {
+		CloseHandle(threadp->mutex);
+		CloseHandle(threadp->cond);
+		return 0;
+	    }
+#endif
 	    pthread_cond_wait(&threadp->cond, &threadp->mutex);
 	}
 #else
@@ -319,7 +471,11 @@
 	}
 	threadp->req = NULL;	/* tells main thread that we are done */
     }				/* while */
+#ifdef _SQUID_MSWIN_
+    return 0;
+#else
     return NULL;
+#endif
 }				/* aio_thread_loop */
 
 static void
@@ -373,35 +529,51 @@
 	    queue_low = request_queue_len;
 	if (squid_curtime >= (last_warn + 15) &&
 	    squid_curtime >= (high_start + 3)) {
-	    debug(43, 1) ("aio_queue_request: WARNING - Running out of I/O threads\n");
-	    debug(43, 2) ("aio_queue_request: Queue Length: current=%d, high=%d, low=%d, duration=%d\n",
-		request_queue_len, queue_high, queue_low, squid_curtime - high_start);
-	    debug(43, 1) ("aio_queue_request: Perhaps you should increase NUMTHREADS\n");
-	    debug(43, 1) ("aio_queue_request: Or install more disks to share the load\n");
-	    debug(43, 3) ("aio_queue_request: First %d items on request queue\n", NUMTHREADS);
+	    debug(43, 1)
+		("aio_queue_request: WARNING - Running out of I/O threads\n");
+	    debug(43, 2)
+		
+		("aio_queue_request: Queue Length: current=%d, high=%d, low=%d, duration=%d\n",
+		request_queue_len, queue_high, queue_low,
+		squid_curtime - high_start);
+	    debug(43, 1)
+		("aio_queue_request: Perhaps you should increase NUMTHREADS\n");
+	    debug(43, 1)
+		("aio_queue_request: Or install more disks to share the load\n");
+	    debug(43, 3)
+		("aio_queue_request: First %d items on request queue\n", NUMTHREADS);
 	    rp = request_queue_head;
 	    for (i = 1; i <= NUMTHREADS; i++) {
 		switch (rp->request_type) {
 		case _AIO_OP_OPEN:
-		    debug(43, 3) ("aio_queue_request: %d : open -> %s\n", i, rp->path);
+		    debug(43, 3) ("aio_queue_request: %d : open -> %s\n",
+			i, rp->path);
 		    break;
 		case _AIO_OP_READ:
-		    debug(43, 3) ("aio_queue_request: %d : read -> FD = %d\n", i, rp->fd);
+		    debug(43, 3) ("aio_queue_request: %d : read -> FD = %d\n",
+			i, rp->fd);
 		    break;
 		case _AIO_OP_WRITE:
-		    debug(43, 3) ("aio_queue_request: %d : write -> FD = %d\n", i, rp->fd);
+		    debug(43, 3) ("aio_queue_request: %d : write -> FD = %d\n",
+			i, rp->fd);
 		    break;
 		case _AIO_OP_CLOSE:
-		    debug(43, 3) ("aio_queue_request: %d : close -> FD = %d\n", i, rp->fd);
+		    debug(43, 3) ("aio_queue_request: %d : close -> FD = %d\n",
+			i, rp->fd);
 		    break;
 		case _AIO_OP_UNLINK:
-		    debug(43, 3) ("aio_queue_request: %d : unlink -> %s\n", i, rp->path);
+		    debug(43, 3) ("aio_queue_request: %d : unlink -> %s\n",
+			i, rp->path);
 		    break;
 		case _AIO_OP_STAT:
-		    debug(43, 3) ("aio_queue_request: %d : stat -> %s\n", i, rp->path);
+		    debug(43, 3) ("aio_queue_request: %d : stat -> %s\n",
+			i, rp->path);
 		    break;
 		default:
-		    debug(43, 1) ("aio_queue_request: %d : Unimplemented request type: %d\n", i, rp->request_type);
+		    debug(43, 1)
+			
+			("aio_queue_request: %d : Unimplemented request type: %d\n",
+			i, rp->request_type);
 		    break;
 		}
 		if ((rp = rp->next) == NULL)
@@ -413,8 +585,10 @@
 	high_start = 0;
     }
     if (request_queue_len > RIDICULOUS_LENGTH) {
-	debug(43, 0) ("aio_queue_request: Async request queue growing uncontrollably!\n");
-	debug(43, 0) ("aio_queue_request: Syncing pending I/O operations.. (blocking)\n");
+	debug(43, 0)
+	    ("aio_queue_request: Async request queue growing uncontrollably!\n");
+	debug(43, 0)
+	    ("aio_queue_request: Syncing pending I/O operations.. (blocking)\n");
 	aio_sync();
 	debug(43, 0) ("aio_queue_request: Synced\n");
     }
@@ -518,14 +692,14 @@
 	    threadp->processed_req->resultp = NULL;
 	    return 0;
 	}
-    for (requestp = request_queue_head; requestp != NULL; requestp = requestp->next)
-	if (requestp->resultp == resultp) {
+    for (requestp = request_queue_head; requestp != NULL;
+	requestp = requestp->next) if (requestp->resultp == resultp) {
 	    requestp->cancelled = 1;
 	    requestp->resultp = NULL;
 	    return 0;
 	}
-    for (requestp = request_done_head; requestp != NULL; requestp = requestp->next)
-	if (requestp->resultp == resultp) {
+    for (requestp = request_done_head; requestp != NULL;
+	requestp = requestp->next) if (requestp->resultp == resultp) {
 	    requestp->cancelled = 1;
 	    requestp->resultp = NULL;
 	    return 0;
@@ -571,9 +745,9 @@
     requestp->err = errno;
 }
 
-
 int
-aio_read(int fd, char *bufp, int bufs, off_t offset, int whence, aio_result_t * resultp)
+aio_read(int fd, char *bufp, int bufs, off_t offset, int whence,
+    aio_result_t * resultp)
 {
     aio_request_t *requestp;
 
@@ -612,7 +786,8 @@
 
 
 int
-aio_write(int fd, char *bufp, int bufs, off_t offset, int whence, aio_result_t * resultp)
+aio_write(int fd, char *bufp, int bufs, off_t offset, int whence,
+    aio_result_t * resultp)
 {
     aio_request_t *requestp;
 
@@ -640,7 +815,6 @@
     return 0;
 }
 
-
 static void
 aio_do_write(aio_request_t * requestp)
 {
@@ -648,7 +822,6 @@
     requestp->err = errno;
 }
 
-
 int
 aio_close(int fd, aio_result_t * resultp)
 {
@@ -669,7 +842,6 @@
     return 0;
 }
 
-
 static void
 aio_do_close(aio_request_t * requestp)
 {
@@ -677,7 +849,6 @@
     requestp->err = errno;
 }
 
-
 int
 aio_stat(const char *path, struct stat *sb, aio_result_t * resultp)
 {
@@ -698,7 +869,8 @@
     }
     strncpy(requestp->path, path, len);
     requestp->statp = sb;
-    if ((requestp->tmpstatp = (struct stat *) xmalloc(sizeof(struct stat))) == NULL) {
+    if ((requestp->tmpstatp =
+	    (struct stat *) xmalloc(sizeof(struct stat))) == NULL) {
 	xfree(requestp->path);
 	memPoolFree(aio_request_pool, requestp);
 	errno = ENOMEM;
@@ -712,7 +884,6 @@
     return 0;
 }
 
-
 static void
 aio_do_stat(aio_request_t * requestp)
 {
@@ -720,7 +891,6 @@
     requestp->err = errno;
 }
 
-
 int
 aio_unlink(const char *path, aio_result_t * resultp)
 {
@@ -748,7 +918,6 @@
     return 0;
 }
 
-
 static void
 aio_do_unlink(aio_request_t * requestp)
 {
@@ -797,10 +966,9 @@
 	prev = NULL;
 	threadp = busy_threads_head;
 	while (threadp) {
-	    debug(43, 9) ("aio_poll_threads: %p: request type %d -> status %d\n",
-		threadp,
-		threadp->processed_req->request_type,
-		threadp->status);
+	    debug(43, 9)
+		("aio_poll_threads: %p: request type %d -> status %d\n",
+		threadp, threadp->processed_req->request_type, threadp->status);
 #if AIO_PROPER_MUTEX
 	    if (threadp->req == NULL)
 		if (pthread_mutex_trylock(&threadp->mutex) == 0)
@@ -859,7 +1027,8 @@
     resultp = requestp->resultp;
     cancelled = requestp->cancelled;
     aio_debug(requestp);
-    debug(43, 5) ("DONE: %d -> %d\n", requestp->ret, requestp->err);
+    errno = requestp->err;
+    debug(43, 5) ("--> DONE: %d -> %s\n", requestp->ret, xstrerror());
     aio_cleanup_request(requestp);
     if (cancelled)
 	goto AIO_REPOLL;
@@ -869,7 +1038,8 @@
 int
 aio_operations_pending(void)
 {
-    return request_queue_len + (request_done_head != NULL) + (busy_threads_head != NULL);
+    return request_queue_len + (request_done_head !=
+	NULL) + (busy_threads_head != NULL);
 }
 
 int
@@ -926,3 +1096,4 @@
 	break;
     }
 }
+#endif /*USE_ASYNC_IO */
Index: squid/src/asn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/asn.c,v
retrieving revision 1.1.1.3.4.2.2.3
retrieving revision 1.1.1.3.4.2.2.3.2.1
diff -u -r1.1.1.3.4.2.2.3 -r1.1.1.3.4.2.2.3.2.1
--- squid/src/asn.c	18 Jun 2001 19:30:39 -0000	1.1.1.3.4.2.2.3
+++ squid/src/asn.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.2.2.3.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.c,v 1.1.1.3.4.2.2.3 2001/06/18 19:30:39 serassio Exp $
+ * $Id: asn.c,v 1.1.1.3.4.2.2.3.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -55,12 +55,14 @@
  * an intlist but it's coded as a structure for future
  * enhancements (e.g. expires)
  */
-struct _as_info {
+struct _as_info
+{
     intlist *as_number;
     time_t expires;		/* NOTUSED */
 };
 
-struct _ASState {
+struct _ASState
+{
     StoreEntry *entry;
     request_t *request;
     int as_number;
@@ -72,7 +74,8 @@
 typedef struct _as_info as_info;
 
 /* entry into the radix tree */
-struct _rtentry {
+struct _rtentry
+{
     struct radix_node e_nodes[2];
     as_info *e_info;
     m_int e_addr;
@@ -206,11 +209,7 @@
     asState->offset = 0;
     storeClientCopy(e,
 	asState->seen,
-	asState->offset,
-	4096,
-	memAllocate(MEM_4K_BUF),
-	asHandleReply,
-	asState);
+	asState->offset, 4096, memAllocate(MEM_4K_BUF), asHandleReply, asState);
 }
 
 static void
@@ -264,23 +263,16 @@
     debug(53, 3) ("asState->seen = %d, asState->offset = %d\n",
 	asState->seen, asState->offset);
     if (e->store_status == STORE_PENDING) {
-	debug(53, 3) ("asHandleReply: store_status == STORE_PENDING: %s\n", storeUrl(e));
-	storeClientCopy(e,
-	    asState->seen,
-	    asState->offset,
-	    SM_PAGE_SIZE,
-	    buf,
-	    asHandleReply,
-	    asState);
+	debug(53, 3) ("asHandleReply: store_status == STORE_PENDING: %s\n",
+	    storeUrl(e));
+	storeClientCopy(e, asState->seen, asState->offset, SM_PAGE_SIZE, buf,
+	    asHandleReply, asState);
     } else if (asState->seen < e->mem_obj->inmem_hi) {
-	debug(53, 3) ("asHandleReply: asState->seen < e->mem_obj->inmem_hi %s\n", storeUrl(e));
-	storeClientCopy(e,
-	    asState->seen,
-	    asState->offset,
-	    SM_PAGE_SIZE,
-	    buf,
-	    asHandleReply,
-	    asState);
+	debug(53,
+	    3) ("asHandleReply: asState->seen < e->mem_obj->inmem_hi %s\n",
+	    storeUrl(e));
+	storeClientCopy(e, asState->seen, asState->offset, SM_PAGE_SIZE, buf,
+	    asHandleReply, asState);
     } else {
 	debug(53, 3) ("asHandleReply: Done: %s\n", storeUrl(e));
 	memFree(buf, MEM_4K_BUF);
@@ -319,7 +311,8 @@
 
     t = strchr(as_string, '/');
     if (t == NULL) {
-	debug(53, 3) ("asnAddNet: failed, invalid response from whois server.\n");
+	debug(53,
+	    3) ("asnAddNet: failed, invalid response from whois server.\n");
 	return 0;
     }
     *t = '\0';
@@ -345,10 +338,14 @@
     if (rn != NULL) {
 	asinfo = ((rtentry *) rn)->e_info;
 	if (intlistFind(asinfo->as_number, as_number)) {
-	    debug(53, 3) ("asnAddNet: Ignoring repeated network '%s/%d' for AS %d\n",
+	    debug(53,
+		3) ("asnAddNet: Ignoring repeated network '%s/%d' for AS %d\n",
 		dbg1, bitl, as_number);
 	} else {
-	    debug(53, 3) ("asnAddNet: Warning: Found a network with multiple AS numbers!\n");
+	    debug(53, 3)
+
+		
+		("asnAddNet: Warning: Found a network with multiple AS numbers!\n");
 	    for (Tail = &asinfo->as_number; *Tail; Tail = &(*Tail)->next);
 	    q = xcalloc(1, sizeof(intlist));
 	    q->i = as_number;
Index: squid/src/async_io.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/async_io.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/async_io.c	6 Jan 2001 12:40:12 -0000	1.1.1.3.4.2.2.1
+++ squid/src/async_io.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: async_io.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:12 hno Exp $
+ * $Id: async_io.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 32    Asynchronous Disk I/O
  * AUTHOR: Pete Bentley <pete@demon.net>
@@ -46,16 +45,19 @@
 #define _AIO_OPENDIR	5
 #define _AIO_STAT	6
 
-typedef struct aio_ctrl_t {
+typedef struct aio_ctrl_t
+{
     struct aio_ctrl_t *next;
     int fd;
     int operation;
     AIOCB *done_handler;
     void *done_handler_data;
     aio_result_t result;
-} aio_ctrl_t;
+}
+aio_ctrl_t;
 
-struct {
+struct
+{
     int open;
     int close;
     int cancel;
@@ -64,12 +66,15 @@
     int stat;
     int unlink;
     int check_callback;
-} aio_counts;
+}
+aio_counts;
 
-typedef struct aio_unlinkq_t {
+typedef struct aio_unlinkq_t
+{
     char *path;
     struct aio_unlinkq_t *next;
-} aio_unlinkq_t;
+}
+aio_unlinkq_t;
 
 static aio_ctrl_t *used_list = NULL;
 static int initialised = 0;
@@ -95,8 +100,21 @@
     initialised = 1;
 }
 
+#ifdef _SQUID_MSWIN_
+extern void aio_shutdown(void);
+void
+aioShutdown(void)
+{
+    if (!initialised)
+	return;
+    aio_shutdown();
+    initialised = 0;
+}
+#endif
+
 void
-aioOpen(const char *path, int oflag, mode_t mode, AIOCB * callback, void *callback_data)
+aioOpen(const char *path, int oflag, mode_t mode, AIOCB * callback,
+    void *callback_data)
 {
     aio_ctrl_t *ctrlp;
     int ret;
@@ -192,7 +210,8 @@
 
 
 void
-aioWrite(int fd, int offset, char *bufp, int len, AIOCB * callback, void *callback_data, FREE * free_func)
+aioWrite(int fd, int offset, char *bufp, int len, AIOCB * callback,
+    void *callback_data, FREE * free_func)
 {
     aio_ctrl_t *ctrlp;
     int seekmode;
@@ -241,7 +260,8 @@
 
 
 void
-aioRead(int fd, int offset, char *bufp, int len, AIOCB * callback, void *callback_data)
+aioRead(int fd, int offset, char *bufp, int len, AIOCB * callback,
+    void *callback_data)
 {
     aio_ctrl_t *ctrlp;
     int seekmode;
@@ -353,8 +373,8 @@
 	if ((resultp = aio_poll_done()) == NULL)
 	    break;
 	prev = NULL;
-	for (ctrlp = used_list; ctrlp != NULL; prev = ctrlp, ctrlp = ctrlp->next)
-	    if (&ctrlp->result == resultp)
+	for (ctrlp = used_list; ctrlp != NULL;
+	    prev = ctrlp, ctrlp = ctrlp->next) if (&ctrlp->result == resultp)
 		break;
 	if (ctrlp == NULL)
 	    continue;
@@ -388,7 +408,8 @@
     storeAppendPrintf(sentry, "read\t%d\n", aio_counts.read);
     storeAppendPrintf(sentry, "stat\t%d\n", aio_counts.stat);
     storeAppendPrintf(sentry, "unlink\t%d\n", aio_counts.unlink);
-    storeAppendPrintf(sentry, "check_callback\t%d\n", aio_counts.check_callback);
+    storeAppendPrintf(sentry, "check_callback\t%d\n",
+	aio_counts.check_callback);
     storeAppendPrintf(sentry, "queue\t%d\n", aio_get_queue_len());
 }
 
Index: squid/src/authenticate.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/authenticate.c	3 Jun 2001 19:41:47 -0000	1.1.1.3.4.1.2.3
+++ squid/src/authenticate.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: authenticate.c,v 1.1.1.3.4.1.2.3 2001/06/03 19:41:47 serassio Exp $
+ * $Id: authenticate.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -35,33 +34,39 @@
 
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     void *data;
     acl_proxy_auth_user *auth_user;
     RH *handler;
-} authenticateStateData;
+}
+authenticateStateData;
 
 static HLPCB authenticateHandleReply;
 static void authenticateStateFree(authenticateStateData * r);
-#ifdef _SQUID_MSWIN_
-	typedef int ( * PFAuthenticate)(char *, char *, authenticateStateData *, HLPCB);
-	typedef int ( * PFInit)(char *);
-
-	typedef struct {
-		HINSTANCE hnd;
-		PFAuthenticate Authenticate;
-		PFInit Init;
-		struct {
-			int requests;
-			int replies;
-			int queue_size;
-			int avg_svc_time;
-		} stats;
-	} AuthPlugin;
+#ifdef _SQUID_MSW		/*IN_ */
+typedef int (*PFAuthenticate) (char *, char *, authenticateStateData *, HLPCB);
+typedef int (*PFInit) (char *);
+
+typedef struct
+{
+    HINSTANCE hnd;
+    PFAuthenticate Authenticate;
+    PFInit Init;
+    struct
+    {
+	int requests;
+	int replies;
+	int queue_size;
+	int avg_svc_time;
+    }
+    stats;
+}
+AuthPlugin;
 
-	static AuthPlugin *authenticators = NULL;
+static AuthPlugin *authenticators = NULL;
 #else
-	static helper *authenticators = NULL;
+static helper *authenticators = NULL;
 #endif
 
 static void
@@ -94,7 +99,7 @@
 authenticateStats(StoreEntry * sentry)
 {
     storeAppendPrintf(sentry, "Authenticator Statistics:\n");
-#ifdef _SQUID_MSWIN_
+#ifdef _SQUID_MSW		/*IN_ */
     storeAppendPrintf(sentry, "requests sent: %d\n",
 	authenticators->stats.requests);
     storeAppendPrintf(sentry, "replies received: %d\n",
@@ -111,7 +116,7 @@
 authenticateStart(acl_proxy_auth_user * auth_user, RH * handler, void *data)
 {
     authenticateStateData *r = NULL;
-#ifndef _SQUID_MSWIN_
+#ifndef _SQUID_MSW		/*IN_ */
     char buf[8192];
 #endif
     assert(auth_user);
@@ -128,10 +133,11 @@
     cbdataLock(data);
     r->data = data;
     r->auth_user = auth_user;
-#ifdef _SQUID_MSWIN_
-	authenticators->stats.requests++;
-    authenticators->Authenticate(r->auth_user->user, r->auth_user->passwd, r, authenticateHandleReply);
-	authenticators->stats.replies++;
+#ifdef _SQUID_MSW		/*IN_ */
+    authenticators->stats.requests++;
+    authenticators->Authenticate(r->auth_user->user, r->auth_user->passwd, r,
+	authenticateHandleReply);
+    authenticators->stats.replies++;
 #else
     snprintf(buf, 8192, "%s %s\n", r->auth_user->user, r->auth_user->passwd);
     helperSubmit(authenticators, buf, authenticateHandleReply, r);
@@ -144,47 +150,52 @@
     static int init = 0;
     if (!Config.Program.authenticate)
 	return;
-#ifdef _SQUID_MSWIN_
-	if (authenticators == NULL)
-		authenticators = xmalloc(sizeof(AuthPlugin));
-   	debug(29, 0) ("authenticateInit: Loading %s\n", Config.Program.authenticate->key);
-	authenticators->hnd = LoadLibrary(Config.Program.authenticate->key);
-	if (authenticators->hnd == NULL) {
-    	debug(29, 0) ("authenticateInit: Unable to load %s\n", Config.Program.authenticate->key);
-		xfree(authenticators);
-		Config.Program.authenticate = NULL;
-		return;
-	}
-	authenticators->Authenticate = (PFAuthenticate)GetProcAddress(authenticators->hnd,"Authenticate");
-	if (authenticators->Authenticate == NULL) {
-    	debug(29, 0) ("authenticateInit: Invalid auth plugin %s\n", Config.Program.authenticate->key);
-		FreeLibrary(authenticators->hnd);
-		xfree(authenticators);
-		Config.Program.authenticate = NULL;
-		return;
-	}		
-	authenticators->Init = (PFInit)GetProcAddress(authenticators->hnd,"Init");
-	if (authenticators->Init == NULL) {
-    	debug(29, 0) ("authenticateInit: Invalid auth plugin %s\n", Config.Program.authenticate->key);
-		FreeLibrary(authenticators->hnd);
-		xfree(authenticators);
-		Config.Program.authenticate = NULL;
-		return;
-	}
-	if (Config.Program.authenticate->next) {
-    	debug(29, 0) ("authenticateInit: Initializing with group %s\n", Config.Program.authenticate->next->key);
-		authenticators->Init(Config.Program.authenticate->next->key);		
-	} 
-	else
-	{
-		debug(29, 0) ("authenticateInit: Missing auth plugin %s Parameter\n", Config.Program.authenticate->key);
-		FreeLibrary(authenticators->hnd);
-		xfree(authenticators);
-		Config.Program.authenticate = NULL;
-		return;
-	}
-	authenticators->stats.requests=0;
-	authenticators->stats.replies=0;
+#ifdef _SQUID_MSW		/*IN_ */
+    if (authenticators == NULL)
+	authenticators = xmalloc(sizeof(AuthPlugin));
+    debug(29, 0) ("authenticateInit: Loading %s\n",
+	Config.Program.authenticate->key);
+    authenticators->hnd = LoadLibrary(Config.Program.authenticate->key);
+    if (authenticators->hnd == NULL) {
+	debug(29, 0) ("authenticateInit: Unable to load %s\n",
+	    Config.Program.authenticate->key);
+	xfree(authenticators);
+	Config.Program.authenticate = NULL;
+	return;
+    }
+    authenticators->Authenticate =
+	(PFAuthenticate) GetProcAddress(authenticators->hnd, "Authenticate");
+    if (authenticators->Authenticate == NULL) {
+	debug(29, 0) ("authenticateInit: Invalid auth plugin %s\n",
+	    Config.Program.authenticate->key);
+	FreeLibrary(authenticators->hnd);
+	xfree(authenticators);
+	Config.Program.authenticate = NULL;
+	return;
+    }
+    authenticators->Init = (PFInit) GetProcAddress(authenticators->hnd, "Init");
+    if (authenticators->Init == NULL) {
+	debug(29, 0) ("authenticateInit: Invalid auth plugin %s\n",
+	    Config.Program.authenticate->key);
+	FreeLibrary(authenticators->hnd);
+	xfree(authenticators);
+	Config.Program.authenticate = NULL;
+	return;
+    }
+    if (Config.Program.authenticate->next) {
+	debug(29, 0) ("authenticateInit: Initializing with group %s\n",
+	    Config.Program.authenticate->next->key);
+	authenticators->Init(Config.Program.authenticate->next->key);
+    } else {
+	debug(29, 0) ("authenticateInit: Missing auth plugin %s Parameter\n",
+	    Config.Program.authenticate->key);
+	FreeLibrary(authenticators->hnd);
+	xfree(authenticators);
+	Config.Program.authenticate = NULL;
+	return;
+    }
+    authenticators->stats.requests = 0;
+    authenticators->stats.replies = 0;
 #else
     if (authenticators == NULL)
 	authenticators = helperCreate("authenticator");
@@ -195,8 +206,7 @@
 #endif
     if (!init) {
 	cachemgrRegister("authenticator",
-	    "User Authenticator Stats",
-	    authenticateStats, 0, 1);
+	    "User Authenticator Stats", authenticateStats, 0, 1);
 	init++;
     }
 }
@@ -205,10 +215,10 @@
 authenticateShutdown(void)
 {
     if (!authenticators)
-		return;
-#ifdef _SQUID_MSWIN_
-	FreeLibrary(authenticators->hnd);
-	xfree(authenticators);
+	return;
+#ifdef _SQUID_MSW		/*IN_ */
+    FreeLibrary(authenticators->hnd);
+    xfree(authenticators);
 #else
     helperShutdown(authenticators);
     if (!shutting_down)
Index: squid/src/cache_cf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v
retrieving revision 1.1.1.3.4.4.2.3
retrieving revision 1.1.1.3.4.4.2.3.2.1
diff -u -r1.1.1.3.4.4.2.3 -r1.1.1.3.4.4.2.3.2.1
--- squid/src/cache_cf.c	14 Jun 2001 20:36:15 -0000	1.1.1.3.4.4.2.3
+++ squid/src/cache_cf.c	27 Aug 2001 21:48:19 -0000	1.1.1.3.4.4.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: cache_cf.c,v 1.1.1.3.4.4.2.3 2001/06/14 20:36:15 serassio Exp $
+ * $Id: cache_cf.c,v 1.1.1.3.4.4.2.3.2.1 2001/08/27 21:48:19 tolsty Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -73,11 +72,13 @@
 static void free_all(void);
 static void requirePathnameExists(const char *name, const char *path);
 static OBJH dump_config;
-static void dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header);
+static void dump_http_header(StoreEntry * entry, const char *name,
+    HttpHeaderMask header);
 static void parse_http_header(HttpHeaderMask * header);
 static void free_http_header(HttpHeaderMask * header);
 static void parse_sockaddr_in_list(sockaddr_in_list **);
-static void dump_sockaddr_in_list(StoreEntry *, const char *, const sockaddr_in_list *);
+static void dump_sockaddr_in_list(StoreEntry *, const char *,
+    const sockaddr_in_list *);
 static void free_sockaddr_in_list(sockaddr_in_list **);
 static int check_null_sockaddr_in_list(const sockaddr_in_list *);
 
@@ -183,9 +184,6 @@
     if ((fp = fopen(file_name, "r")) == NULL)
 	fatalf("Unable to open configuration file: %s: %s",
 	    file_name, xstrerror());
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-    setmode(fileno(fp), O_TEXT);
-#endif
     cfg_filename = file_name;
     if ((token = strrchr(cfg_filename, '/')))
 	cfg_filename = token + 1;
@@ -204,8 +202,7 @@
 	tmp_line = xstrdup(config_input_line);
 	if (!parse_line(tmp_line)) {
 	    debug(3, 0) ("parseConfigFile: line %d unrecognized: '%s'\n",
-		config_lineno,
-		config_input_line);
+		config_lineno, config_input_line);
 	    err_count++;
 	}
 	safe_free(tmp_line);
@@ -214,9 +211,7 @@
     defaults_if_none();
     configDoConfigure();
     cachemgrRegister("config",
-	"Current Squid Configuration",
-	dump_config,
-	1, 1);
+	"Current Squid Configuration", dump_config, 1, 1);
     return err_count;
 }
 
@@ -256,9 +251,11 @@
 	    Config.redirectChildren = 0;
 	    wordlistDestroy(&Config.Program.redirect);
 	} else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
-	    debug(3, 0) ("WARNING: redirect_children was set to a bad value: %d\n",
+	    debug(3,
+		0) ("WARNING: redirect_children was set to a bad value: %d\n",
 		Config.redirectChildren);
-	    debug(3, 0) ("Setting it to the maximum (%d).\n", DefaultRedirectChildrenMax);
+	    debug(3, 0) ("Setting it to the maximum (%d).\n",
+		DefaultRedirectChildrenMax);
 	    Config.redirectChildren = DefaultRedirectChildrenMax;
 	}
     }
@@ -267,14 +264,17 @@
 	    Config.authenticateChildren = 0;
 	    wordlistDestroy(&Config.Program.authenticate);
 	} else if (Config.authenticateChildren > DefaultAuthenticateChildrenMax) {
-	    debug(3, 0) ("WARNING: authenticate_children was set to a bad value: %d\n",
+	    debug(3, 0)
+		("WARNING: authenticate_children was set to a bad value: %d\n",
 		Config.authenticateChildren);
-	    debug(3, 0) ("Setting it to the maximum (%d).\n", DefaultAuthenticateChildrenMax);
+	    debug(3, 0) ("Setting it to the maximum (%d).\n",
+		DefaultAuthenticateChildrenMax);
 	    Config.authenticateChildren = DefaultAuthenticateChildrenMax;
 	}
     }
     if (Config.Accel.host) {
-	snprintf(buf, BUFSIZ, "http://%s:%d", Config.Accel.host, Config.Accel.port);
+	snprintf(buf, BUFSIZ, "http://%s:%d", Config.Accel.host,
+	    Config.Accel.port);
 	Config2.Accel.prefix = xstrdup(buf);
 	Config2.Accel.on = 1;
     }
@@ -293,16 +293,14 @@
 	fatal("No http_port specified!");
     snprintf(ThisCache, sizeof(ThisCache), "%s:%d (%s)",
 	uniqueHostname(),
-	(int) ntohs(Config.Sockaddr.http->s.sin_port),
-	full_appname_string);
+	(int) ntohs(Config.Sockaddr.http->s.sin_port), full_appname_string);
     /*
      * the extra space is for loop detection in client_side.c -- we search
      * for substrings in the Via header.
      */
     snprintf(ThisCache2, sizeof(ThisCache), " %s:%d (%s)",
 	uniqueHostname(),
-	(int) ntohs(Config.Sockaddr.http->s.sin_port),
-	full_appname_string);
+	(int) ntohs(Config.Sockaddr.http->s.sin_port), full_appname_string);
     if (!Config.udpMaxHitObjsz || Config.udpMaxHitObjsz > SQUID_UDP_SO_SNDBUF)
 	Config.udpMaxHitObjsz = SQUID_UDP_SO_SNDBUF;
     if (Config.appendDomain)
@@ -331,13 +329,12 @@
 #if USE_DNSSERVERS
     requirePathnameExists("cache_dns_program", Config.Program.dnsserver);
 #endif
-#ifndef _SQUID_MSWIN_
     requirePathnameExists("unlinkd_program", Config.Program.unlinkd);
     if (Config.Program.redirect)
 	requirePathnameExists("redirect_program", Config.Program.redirect->key);
-#endif
     if (Config.Program.authenticate)
-	requirePathnameExists("authenticate_program", Config.Program.authenticate->key);
+	requirePathnameExists("authenticate_program",
+	    Config.Program.authenticate->key);
     requirePathnameExists("Icon Directory", Config.icons.directory);
     requirePathnameExists("Error Directory", Config.errorDirectory);
 #if HTTP_VIOLATIONS
@@ -346,13 +343,19 @@
 	for (R = Config.Refresh; R; R = R->next) {
 	    if (!R->flags.override_expire)
 		continue;
-	    debug(22, 1) ("WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP\n");
+	    debug(22, 1)
+
+		
+		("WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP\n");
 	    break;
 	}
 	for (R = Config.Refresh; R; R = R->next) {
 	    if (!R->flags.override_lastmod)
 		continue;
-	    debug(22, 1) ("WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP\n");
+	    debug(22, 1)
+
+		
+		("WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP\n");
 	    break;
 	}
     }
@@ -367,7 +370,6 @@
     }
     if (aclPurgeMethodInUse(Config.accessList.http))
 	Config2.onoff.enable_purge = 1;
-#ifndef _SQUID_MSWIN_
     if (NULL != Config.effectiveUser) {
 	struct passwd *pwd = getpwnam(Config.effectiveUser);
 	if (NULL == pwd)
@@ -381,19 +383,16 @@
 	     * during reconfigure.
 	     */
 	    fatalf("getpwnam failed to find userid for effective user '%s'",
-		Config.effectiveUser,
-		xstrerror());
+		Config.effectiveUser, xstrerror());
 	Config2.effectiveUserID = pwd->pw_uid;
     }
     if (NULL != Config.effectiveGroup) {
 	struct group *grp = getgrnam(Config.effectiveGroup);
 	if (NULL == grp)
 	    fatalf("getgrnam failed to find groupid for effective group '%s'",
-		Config.effectiveGroup,
-		xstrerror());
+		Config.effectiveGroup, xstrerror());
 	Config2.effectiveGroupID = grp->gr_gid;
     }
-#endif
 }
 
 /* Parse a time specification from the config file.  Store the
@@ -499,10 +498,7 @@
 	while (v != NULL) {
 	    debug(3, 3) ("dump_acl: %s %s %s\n", name, ae->name, v->key);
 	    storeAppendPrintf(entry, "%s %s %s %s\n",
-		name,
-		ae->name,
-		aclTypeToStr(ae->type),
-		v->key);
+		name, ae->name, aclTypeToStr(ae->type), v->key);
 	    v = v->next;
 	}
 	wordlistDestroy(&w);
@@ -527,13 +523,10 @@
 {
     acl_list *l;
     while (head != NULL) {
-	storeAppendPrintf(entry, "%s %s",
-	    name,
-	    head->allow ? "Allow" : "Deny");
+	storeAppendPrintf(entry, "%s %s", name, head->allow ? "Allow" : "Deny");
 	for (l = head->acl_list; l != NULL; l = l->next) {
 	    storeAppendPrintf(entry, " %s%s",
-		l->op ? null_string : "!",
-		l->acl->name);
+		l->op ? null_string : "!", l->acl->name);
 	}
 	storeAppendPrintf(entry, "\n");
 	head = head->next;
@@ -649,7 +642,10 @@
 parse_delay_pool_count(delayConfig * cfg)
 {
     if (cfg->pools) {
-	debug(3, 0) ("parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config\n");
+	debug(3, 0)
+
+	    
+	    ("parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config\n");
 	free_delay_pool_count(cfg);
     }
     parse_ushort(&cfg->pools);
@@ -666,12 +662,16 @@
 
     parse_ushort(&pool);
     if (pool < 1 || pool > cfg->pools) {
-	debug(3, 0) ("parse_delay_pool_class: Ignoring pool %d not in 1 .. %d\n", pool, cfg->pools);
+	debug(3,
+	    0) ("parse_delay_pool_class: Ignoring pool %d not in 1 .. %d\n",
+	    pool, cfg->pools);
 	return;
     }
     parse_ushort(&class);
     if (class < 1 || class > 3) {
-	debug(3, 0) ("parse_delay_pool_class: Ignoring pool %d class %d not in 1 .. 3\n", pool, class);
+	debug(3, 0)
+	    ("parse_delay_pool_class: Ignoring pool %d class %d not in 1 .. 3\n",
+	    pool, class);
 	return;
     }
     pool--;
@@ -681,11 +681,14 @@
     }
     cfg->rates[pool] = xmalloc(class * sizeof(delaySpec));
     cfg->class[pool] = class;
-    cfg->rates[pool]->aggregate.restore_bps = cfg->rates[pool]->aggregate.max_bytes = -1;
+    cfg->rates[pool]->aggregate.restore_bps =
+	cfg->rates[pool]->aggregate.max_bytes = -1;
     if (cfg->class[pool] >= 3)
-	cfg->rates[pool]->network.restore_bps = cfg->rates[pool]->network.max_bytes = -1;
+	cfg->rates[pool]->network.restore_bps =
+	    cfg->rates[pool]->network.max_bytes = -1;
     if (cfg->class[pool] >= 2)
-	cfg->rates[pool]->individual.restore_bps = cfg->rates[pool]->individual.max_bytes = -1;
+	cfg->rates[pool]->individual.restore_bps =
+	    cfg->rates[pool]->individual.max_bytes = -1;
     delayCreateDelayPool(pool, class);
 }
 
@@ -699,13 +702,19 @@
 
     parse_ushort(&pool);
     if (pool < 1 || pool > cfg->pools) {
-	debug(3, 0) ("parse_delay_pool_rates: Ignoring pool %d not in 1 .. %d\n", pool, cfg->pools);
+	debug(3,
+	    0) ("parse_delay_pool_rates: Ignoring pool %d not in 1 .. %d\n",
+	    pool, cfg->pools);
 	return;
     }
     pool--;
     class = cfg->class[pool];
     if (class == 0) {
-	debug(3, 0) ("parse_delay_pool_rates: Ignoring pool %d attempt to set rates with class not set\n", pool + 1);
+	debug(3, 0)
+
+	    
+	    ("parse_delay_pool_rates: Ignoring pool %d attempt to set rates with class not set\n",
+	    pool + 1);
 	return;
     }
     ptr = (delaySpec *) cfg->rates[pool];
@@ -741,7 +750,9 @@
 
     parse_ushort(&pool);
     if (pool < 1 || pool > cfg->pools) {
-	debug(3, 0) ("parse_delay_pool_rates: Ignoring pool %d not in 1 .. %d\n", pool, cfg->pools);
+	debug(3,
+	    0) ("parse_delay_pool_rates: Ignoring pool %d not in 1 .. %d\n",
+	    pool, cfg->pools);
 	return;
     }
     aclParseAccessLine(&cfg->access[pool - 1]);
@@ -754,9 +765,11 @@
     int i;
     for (i = 0; i < HDR_OTHER; i++) {
 	if (http_header_allowed && !CBIT_TEST(header, i))
-	    storeAppendPrintf(entry, "%s allow %s\n", name, httpHeaderNameById(i));
+	    storeAppendPrintf(entry, "%s allow %s\n", name,
+		httpHeaderNameById(i));
 	else if (!http_header_allowed && CBIT_TEST(header, i))
-	    storeAppendPrintf(entry, "%s deny %s\n", name, httpHeaderNameById(i));
+	    storeAppendPrintf(entry, "%s deny %s\n", name,
+		httpHeaderNameById(i));
     }
 }
 
@@ -778,7 +791,9 @@
     else {
 	debug(3, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
-	debug(3, 0) ("parse_http_header: expecting 'allow' or 'deny', got '%s'.\n", t);
+	debug(3,
+	    0) ("parse_http_header: expecting 'allow' or 'deny', got '%s'.\n",
+	    t);
 	return;
     }
     if (!http_header_first) {
@@ -793,7 +808,8 @@
     }
     while ((t = strtok(NULL, w_space))) {
 	if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1)
-	    debug(3, 0) ("parse_http_header: Ignoring unknown header '%s'\n", t);
+	    debug(3, 0) ("parse_http_header: Ignoring unknown header '%s'\n",
+		t);
 	else if (allowed)
 	    CBIT_CLR(*header, id);
 	else
@@ -930,17 +946,11 @@
     LOCAL_ARRAY(char, xname, 128);
     while (p != NULL) {
 	storeAppendPrintf(entry, "%s %s %s %d %d",
-	    name,
-	    p->host,
-	    neighborTypeStr(p),
-	    p->http_port,
-	    p->icp.port);
+	    name, p->host, neighborTypeStr(p), p->http_port, p->icp.port);
 	dump_peer_options(entry, p);
 	for (d = p->peer_domain; d; d = d->next) {
 	    storeAppendPrintf(entry, "cache_peer_domain %s %s%s\n",
-		p->host,
-		d->do_ping ? null_string : "!",
-		d->domain);
+		p->host, d->do_ping ? null_string : "!", d->domain);
 	}
 	if ((a = p->access)) {
 	    snprintf(xname, 128, "cache_peer_access %s", p->host);
@@ -948,9 +958,7 @@
 	}
 	for (t = p->typelist; t; t = t->next) {
 	    storeAppendPrintf(entry, "neighbor_type_domain %s %s %s\n",
-		p->host,
-		peer_type_str(t->type),
-		t->domain);
+		p->host, peer_type_str(t->type), t->domain);
 	}
 	p = p->next;
     }
@@ -1020,7 +1028,11 @@
 #if USE_CARP
 	} else if (!strncasecmp(token, "carp-load-factor=", 17)) {
 	    if (p->type != PEER_PARENT)
-		debug(3, 0) ("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n", p->host, p->http_port);
+		debug(3, 0)
+
+		    
+		    ("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n",
+		    p->host, p->http_port);
 	    else
 		p->carp.load_factor = atof(token + 17);
 #endif
@@ -1087,7 +1099,8 @@
 }
 
 static void
-dump_cachemgrpasswd(StoreEntry * entry, const char *name, cachemgr_passwd * list)
+dump_cachemgrpasswd(StoreEntry * entry, const char *name,
+    cachemgr_passwd * list)
 {
     wordlist *w;
     while (list != NULL) {
@@ -1336,8 +1349,7 @@
 	    head->flags.icase ? " -i" : null_string,
 	    head->pattern,
 	    (int) head->min / 60,
-	    (int) (100.0 * head->pct + 0.5),
-	    (int) head->max / 60);
+	    (int) (100.0 * head->pct + 0.5), (int) head->max / 60);
 #if HTTP_VIOLATIONS
 	if (head->flags.override_expire)
 	    storeAppendPrintf(entry, " override-expire");
@@ -1654,8 +1666,7 @@
 
 #include "cf_parser.c"
 
-peer_t
-parseNeighborType(const char *s)
+peer_t parseNeighborType(const char *s)
 {
     if (!strcasecmp(s, "parent"))
 	return PEER_PARENT;
@@ -1716,9 +1727,7 @@
 {
     while (s) {
 	storeAppendPrintf(e, "%s %s:%d\n",
-	    n,
-	    inet_ntoa(s->s.sin_addr),
-	    ntohs(s->s.sin_port));
+	    n, inet_ntoa(s->s.sin_addr), ntohs(s->s.sin_port));
 	s = s->next;
     }
 }
Index: squid/src/cache_diff.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_diff.c,v
retrieving revision 1.1.1.1.4.1.2.2
retrieving revision 1.1.1.1.4.1.2.2.2.1
diff -u -r1.1.1.1.4.1.2.2 -r1.1.1.1.4.1.2.2.2.1
--- squid/src/cache_diff.c	3 Jun 2001 19:41:48 -0000	1.1.1.1.4.1.2.2
+++ squid/src/cache_diff.c	27 Aug 2001 21:48:20 -0000	1.1.1.1.4.1.2.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_diff.c,v 1.1.1.1.4.1.2.2 2001/06/03 19:41:48 serassio Exp $
+ * $Id: cache_diff.c,v 1.1.1.1.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -39,27 +39,30 @@
 
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     const char *name;
     hash_table *hash;
     int count;			/* #currently cached entries */
     int scanned_count;		/* #scanned entries */
     int bad_add_count;		/* #duplicate adds */
     int bad_del_count;		/* #dels with no prior add */
-} CacheIndex;
+}
+CacheIndex;
 
 
-typedef struct _CacheEntry {
+typedef struct _CacheEntry
+{
     const cache_key *key;
     struct _CacheEntry *next;
     /* storeSwapLogData s; */
     unsigned char key_arr[MD5_DIGEST_CHARS];
-} CacheEntry;
+}
+CacheEntry;
 
 
 /* copied from url.c */
-const char *RequestMethodStr[] =
-{
+const char *RequestMethodStr[] = {
     "NONE",
     "GET",
     "POST",
@@ -149,12 +152,9 @@
 cacheIndexInitReport(CacheIndex * idx)
 {
     assert(idx);
-    fprintf(stderr, "%s: bad swap_add:  %d\n",
-	idx->name, idx->bad_add_count);
-    fprintf(stderr, "%s: bad swap_del:  %d\n",
-	idx->name, idx->bad_del_count);
-    fprintf(stderr, "%s: scanned lines: %d\n",
-	idx->name, idx->scanned_count);
+    fprintf(stderr, "%s: bad swap_add:  %d\n", idx->name, idx->bad_add_count);
+    fprintf(stderr, "%s: bad swap_del:  %d\n", idx->name, idx->bad_del_count);
+    fprintf(stderr, "%s: scanned lines: %d\n", idx->name, idx->scanned_count);
 }
 
 static int
@@ -243,7 +243,8 @@
 static int
 usage(const char *prg_name)
 {
-    fprintf(stderr, "usage: %s <label1>: <swap_state>... <label2>: <swap_state>...\n",
+    fprintf(stderr,
+	"usage: %s <label1>: <swap_state>... <label2>: <swap_state>...\n",
 	prg_name);
     return -1;
 }
Index: squid/src/cache_manager.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_manager.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/cache_manager.c	6 Jan 2001 12:40:12 -0000	1.1.1.2.4.1.2.1
+++ squid/src/cache_manager.c	27 Aug 2001 21:48:20 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: cache_manager.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:12 hno Exp $
+ * $Id: cache_manager.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 16    Cache Manager Objects
  * AUTHOR: Duane Wessels
@@ -37,27 +36,34 @@
 
 #define MGR_PASSWD_SZ 128
 
-typedef struct {
+typedef struct
+{
     StoreEntry *entry;
     char *action;
     char *user_name;
     char *passwd;
-} cachemgrStateData;
+}
+cachemgrStateData;
 
-typedef struct _action_table {
+typedef struct _action_table
+{
     char *action;
     char *desc;
     OBJH *handler;
-    struct {
+    struct
+    {
 	int pw_req:1;
 	int atomic:1;
-    } flags;
+    }
+    flags;
     struct _action_table *next;
-} action_table;
+}
+action_table;
 
 static action_table *cachemgrFindAction(const char *action);
 static cachemgrStateData *cachemgrParseUrl(const char *url);
-static void cachemgrParseHeaders(cachemgrStateData * mgr, const request_t * request);
+static void cachemgrParseHeaders(cachemgrStateData * mgr,
+    const request_t * request);
 static int cachemgrCheckPassword(cachemgrStateData *);
 static void cachemgrStateFree(cachemgrStateData * mgr);
 static char *cachemgrPasswdGet(cachemgr_passwd *, const char *);
@@ -69,7 +75,8 @@
 action_table *ActionTable = NULL;
 
 void
-cachemgrRegister(const char *action, const char *desc, OBJH * handler, int pw_req_flag, int atomic)
+cachemgrRegister(const char *action, const char *desc, OBJH * handler,
+    int pw_req_flag, int atomic)
 {
     action_table *a;
     action_table **A;
@@ -126,7 +133,8 @@
     } else {
 	prot = cachemgrActionProtection(a);
 	if (!strcmp(prot, "disabled") || !strcmp(prot, "hidden")) {
-	    debug(16, 1) ("cachemgrParseUrl: action '%s' is %s\n", request, prot);
+	    debug(16, 1) ("cachemgrParseUrl: action '%s' is %s\n", request,
+		prot);
 	    return NULL;
 	}
     }
@@ -144,11 +152,14 @@
     const char *basic_cookie;	/* base 64 _decoded_ user:passwd pair */
     const char *passwd_del;
     assert(mgr && request);
-    basic_cookie = httpHeaderGetAuth(&request->header, HDR_AUTHORIZATION, "Basic");
+    basic_cookie =
+	httpHeaderGetAuth(&request->header, HDR_AUTHORIZATION, "Basic");
     if (!basic_cookie)
 	return;
     if (!(passwd_del = strchr(basic_cookie, ':'))) {
-	debug(16, 1) ("cachemgrParseHeaders: unknown basic_cookie format '%s'\n", basic_cookie);
+	debug(16,
+	    1) ("cachemgrParseHeaders: unknown basic_cookie format '%s'\n",
+	    basic_cookie);
 	return;
     }
     /* found user:password pair, reset old values */
@@ -158,7 +169,8 @@
     mgr->user_name[passwd_del - basic_cookie] = '\0';
     mgr->passwd = xstrdup(passwd_del + 1);
     /* warning: this prints decoded password which maybe not what you want to do @?@ @?@ */
-    debug(16, 9) ("cachemgrParseHeaders: got user: '%s' passwd: '%s'\n", mgr->user_name, mgr->passwd);
+    debug(16, 9) ("cachemgrParseHeaders: got user: '%s' passwd: '%s'\n",
+	mgr->user_name, mgr->passwd);
 }
 
 /*
@@ -256,12 +268,7 @@
 	HttpReply *rep = entry->mem_obj->reply;
 	/* prove there are no previous reply headers around */
 	assert(0 == rep->sline.status);
-	httpReplySetHeaders(rep,
-	    (double) 1.0,
-	    HTTP_OK,
-	    NULL,
-	    "text/plain",
-	    -1,			/* C-Len */
+	httpReplySetHeaders(rep, (double) 1.0, HTTP_OK, NULL, "text/plain", -1,	/* C-Len */
 	    squid_curtime,	/* LMT */
 	    squid_curtime);
 	httpReplySwapOut(rep, entry);
@@ -335,13 +342,9 @@
 void
 cachemgrInit(void)
 {
-    cachemgrRegister("menu",
-	"This Cachemanager Menu",
-	cachemgrMenu, 0, 1);
+    cachemgrRegister("menu", "This Cachemanager Menu", cachemgrMenu, 0, 1);
     cachemgrRegister("shutdown",
-	"Shut Down the Squid Process",
-	cachemgrShutdown, 1, 1);
+	"Shut Down the Squid Process", cachemgrShutdown, 1, 1);
     cachemgrRegister("offline_toggle",
-	"Toggle offline_mode setting",
-	cachemgrOfflineToggle, 1, 1);
+	"Toggle offline_mode setting", cachemgrOfflineToggle, 1, 1);
 }
Index: squid/src/cachemgr.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/cachemgr.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/cachemgr.c	29 Jul 2001 16:06:05 -0000	1.1.1.3.4.1.2.3
+++ squid/src/cachemgr.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: cachemgr.c,v 1.1.1.3.4.1.2.3 2001/07/29 16:06:05 serassio Exp $
+ * $Id: cachemgr.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
@@ -131,7 +130,8 @@
 
 #ifdef _SQUID_MSWIN_
 static int s_iInitCount = 0;
-int Win32SockInit(void)
+int
+Win32SockInit(void)
 {
     int iVersionRequested;
     WSADATA wsaData;
@@ -140,8 +140,7 @@
     if (s_iInitCount > 0) {
 	s_iInitCount++;
 	return (0);
-    }
-    else if (s_iInitCount < 0)
+    } else if (s_iInitCount < 0)
 	return (s_iInitCount);
 
     /* s_iInitCount == 0. Do the initailization */
@@ -151,8 +150,7 @@
 	s_iInitCount = -1;
 	return (s_iInitCount);
     }
-    if (LOBYTE(wsaData.wVersion) != 2 ||
-	HIBYTE(wsaData.wVersion) != 0) {
+    if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) {
 	s_iInitCount = -2;
 	WSACleanup();
 	return (s_iInitCount);
@@ -162,7 +160,8 @@
 }
 
 
-void Win32SockCleanup(void)
+void
+Win32SockCleanup(void)
 {
     if (--s_iInitCount == 0)
 	WSACleanup();
@@ -171,14 +170,16 @@
 
 #endif
 
-typedef struct {
+typedef struct
+{
     char *hostname;
     int port;
     char *action;
     char *user_name;
     char *passwd;
     char *pub_auth;
-} cachemgr_request;
+}
+cachemgr_request;
 
 /*
  * Debugging macros (info goes to error_log on your web server)
@@ -290,9 +291,11 @@
     printf("SIZE=30 VALUE=\"%s\"></TD></TR>\n", host);
     printf("<TR><TH ALIGN=\"left\">Cache Port:</TH><TD><INPUT NAME=\"port\" ");
     printf("SIZE=30 VALUE=\"%d\"></TD></TR>\n", port);
-    printf("<TR><TH ALIGN=\"left\">Manager name:</TH><TD><INPUT NAME=\"user_name\" ");
+    printf
+	("<TR><TH ALIGN=\"left\">Manager name:</TH><TD><INPUT NAME=\"user_name\" ");
     printf("SIZE=30 VALUE=\"%s\"></TD></TR>\n", user_name);
-    printf("<TR><TH ALIGN=\"left\">Password:</TH><TD><INPUT TYPE=\"password\" NAME=\"passwd\" ");
+    printf
+	("<TR><TH ALIGN=\"left\">Password:</TH><TD><INPUT TYPE=\"password\" NAME=\"passwd\" ");
     printf("SIZE=30 VALUE=\"\"></TD></TR>\n");
     printf("</TABLE><BR CLEAR=\"all\">\n");
     printf("<INPUT TYPE=\"submit\" VALUE=\"Continue...\">\n");
@@ -331,12 +334,9 @@
 menu_url(cachemgr_request * req, const char *action)
 {
     static char url[1024];
-    snprintf(url, sizeof(url), "%s?host=%s&port=%d&user_name=%s&operation=%s&auth=%s",
-	script_name,
-	req->hostname,
-	req->port,
-	safe_str(req->user_name),
-	action,
+    snprintf(url, sizeof(url),
+	"%s?host=%s&port=%d&user_name=%s&operation=%s&auth=%s", script_name,
+	req->hostname, req->port, safe_str(req->user_name), action,
 	safe_str(req->pub_auth));
     return url;
 }
@@ -362,24 +362,30 @@
     a_url = xstrdup(menu_url(req, a));
     /* no reason to give a url for a disabled action */
     if (!strcmp(p, "disabled"))
-	snprintf(html, sizeof(html), "<LI type=\"circle\">%s (disabled)<A HREF=\"%s\">.</A>\n", d, a_url);
+	snprintf(html, sizeof(html),
+	    "<LI type=\"circle\">%s (disabled)<A HREF=\"%s\">.</A>\n", d,
+	    a_url);
     else
 	/* disable a hidden action (requires a password, but password is not in squid.conf) */
     if (!strcmp(p, "hidden"))
-	snprintf(html, sizeof(html), "<LI type=\"circle\">%s (hidden)<A HREF=\"%s\">.</A>\n", d, a_url);
+	snprintf(html, sizeof(html),
+	    "<LI type=\"circle\">%s (hidden)<A HREF=\"%s\">.</A>\n", d, a_url);
     else
 	/* disable link if authentication is required and we have no password */
     if (!strcmp(p, "protected") && !req->passwd)
-	snprintf(html, sizeof(html), "<LI type=\"circle\">%s (requires <a href=\"%s\">authentication</a>)<A HREF=\"%s\">.</A>\n",
+	snprintf(html, sizeof(html),
+	    "<LI type=\"circle\">%s (requires <a href=\"%s\">authentication</a>)<A HREF=\"%s\">.</A>\n",
 	    d, menu_url(req, "authenticate"), a_url);
     else
 	/* highlight protected but probably available entries */
     if (!strcmp(p, "protected"))
-	snprintf(html, sizeof(html), "<LI type=\"square\"><A HREF=\"%s\"><font color=\"#FF0000\">%s</font></A>\n",
+	snprintf(html, sizeof(html),
+	    "<LI type=\"square\"><A HREF=\"%s\"><font color=\"#FF0000\">%s</font></A>\n",
 	    a_url, d);
     /* public entry or unknown type of protection */
     else
-	snprintf(html, sizeof(html), "<LI type=\"disk\"><A HREF=\"%s\">%s</A>\n", a_url, d);
+	snprintf(html, sizeof(html),
+	    "<LI type=\"disk\"><A HREF=\"%s\">%s</A>\n", a_url, d);
     xfree(a_url);
     xfree(buf_copy);
     return html;
@@ -388,8 +394,7 @@
 static const char *
 munge_other_line(const char *buf, cachemgr_request * req)
 {
-    static const char *ttags[] =
-    {"td", "th"};
+    static const char *ttags[] = { "td", "th" };
     static char html[4096];
     static int table_line_num = 0;
     static int next_is_header = 0;
@@ -408,11 +413,14 @@
     }
     /* start html table */
     if (!table_line_num) {
-	l += snprintf(html + l, sizeof(html) - l, "</pre><table border=1 cellpadding=2 cellspacing=1>\n");
+	l +=
+	    snprintf(html + l, sizeof(html) - l,
+	    "</pre><table border=1 cellpadding=2 cellspacing=1>\n");
 	next_is_header = 0;
     }
     /* remove '\n' */
-    is_header = (!table_line_num || next_is_header) && !strchr(buf, ':') && !is_number(buf);
+    is_header = (!table_line_num || next_is_header) && !strchr(buf, ':')
+	&& !is_number(buf);
     ttag = ttags[is_header];
     /* record starts */
     l += snprintf(html + l, sizeof(html) - l, "<tr>");
@@ -427,10 +435,11 @@
 	    column_span++;
 	    x++;
 	}
-	l += snprintf(html + l, sizeof(html) - l, "<%s colspan=%d align=\"%s\">%s</%s>",
-	    ttag, column_span,
-	    is_header ? "center" : is_number(cell) ? "right" : "left",
-	    cell, ttag);
+	l +=
+	    snprintf(html + l, sizeof(html) - l,
+	    "<%s colspan=%d align=\"%s\">%s</%s>", ttag, column_span,
+	    is_header ? "center" : is_number(cell) ? "right" : "left", cell,
+	    ttag);
     }
     xfree(buf_copy);
     /* record ends */
@@ -451,9 +460,12 @@
     FILE *fp = fdopen(s, "r");
 #endif
     /* interpretation states */
-    enum {
-	isStatusLine, isHeaders, isBodyStart, isBody, isForward, isEof, isForwardEof, isSuccess, isError
-    } istate = isStatusLine;
+    enum
+    {
+	isStatusLine, isHeaders, isBodyStart, isBody, isForward, isEof,
+	isForwardEof, isSuccess, isError
+    }
+    istate = isStatusLine;
     int parse_menu = 0;
     const char *action = req->action;
     const char *statusStr = NULL;
@@ -467,11 +479,11 @@
 	return 1;
     }
 #ifdef _SQUID_MSWIN_
-    while ((reply=recv(s,buf,sizeof(buf),0))>0)
-	fwrite(buf,1,reply,fp);
+    while ((reply = recv(s, buf, sizeof(buf), 0)) > 0)
+	fwrite(buf, 1, reply, fp);
     rewind(fp);
 #endif
-   if (parse_menu)
+    if (parse_menu)
 	action = "menu";
     /* read reply interpreting one line at a time depending on state */
     while (istate < isEof) {
@@ -495,7 +507,7 @@
 	    break;
 	case isHeaders:
 	    /* forward header field */
-	    if (!strcmp(buf, "\r\n")) {		/* end of headers */
+	    if (!strcmp(buf, "\r\n")) {	/* end of headers */
 		fputs("Content-Type: text/html\r\n", stdout);	/* add our type */
 		istate = isBodyStart;
 	    }
@@ -530,7 +542,8 @@
 	     * 401 to .cgi because web server filters out all auth info. Thus we
 	     * disable authentication headers for now.
 	     */
-	    if (!strncasecmp(buf, "WWW-Authenticate:", 17) || !strncasecmp(buf, "Proxy-Authenticate:", 19));	/* skip */
+	    if (!strncasecmp(buf, "WWW-Authenticate:", 17)
+		|| !strncasecmp(buf, "Proxy-Authenticate:", 19));	/* skip */
 	    else
 		fputs(buf, stdout);
 	    break;
@@ -548,7 +561,8 @@
 	    istate = isError;
 	    break;
 	default:
-	    printf("%s: internal bug: invalid state reached: %d", script_name, istate);
+	    printf("%s: internal bug: invalid state reached: %d", script_name,
+		istate);
 	    istate = isError;
 	}
     }
@@ -607,23 +621,18 @@
 	return 1;
     }
     l = snprintf(buf, sizeof(buf),
-	"GET cache_object://%s/%s HTTP/1.0\r\n"
-	"Accept: */*\r\n"
-	"%s"			/* Authentication info or nothing */
-	"\r\n",
-	req->hostname,
-	req->action,
-	make_auth_header(req));
+	"GET cache_object://%s/%s HTTP/1.0\r\n" "Accept: */*\r\n" "%s"	/* Authentication info or nothing */
+	"\r\n", req->hostname, req->action, make_auth_header(req));
 #ifdef _SQUID_MSWIN_
-    send(s, buf, l,0);
+    send(s, buf, l, 0);
 #else
     write(s, buf, l);
 #endif
     debug(1) fprintf(stderr, "wrote request: '%s'\n", buf);
 #ifdef _SQUID_MSWIN_
-    answer=read_reply(s, req);
+    answer = read_reply(s, req);
     closesocket(s);
-	return answer;
+    return answer;
 #else
     return read_reply(s, req);
 #endif
@@ -652,7 +661,7 @@
 	script_name = xstrdup(s);
 #ifdef _SQUID_MSWIN_
     req = read_request(NULL);
-    answer=process_request(req);
+    answer = process_request(req);
     Win32SockCleanup();
     return answer;
 #else
@@ -692,7 +701,7 @@
 
 #ifdef _SQUID_MSWIN_
 static cachemgr_request *
-read_request(char* buf)
+read_request(char *buf)
 {
 #else
 static cachemgr_request *
@@ -736,8 +745,10 @@
 	    req->action = xstrdup(q);
     }
     make_pub_auth(req);
-    debug(1) fprintf(stderr, "cmgr: got req: host: '%s' port: %d uname: '%s' passwd: '%s' auth: '%s' oper: '%s'\n",
-	safe_str(req->hostname), req->port, safe_str(req->user_name), safe_str(req->passwd), safe_str(req->pub_auth), safe_str(req->action));
+    debug(1) fprintf(stderr,
+	"cmgr: got req: host: '%s' port: %d uname: '%s' passwd: '%s' auth: '%s' oper: '%s'\n",
+	safe_str(req->hostname), req->port, safe_str(req->user_name),
+	safe_str(req->passwd), safe_str(req->pub_auth), safe_str(req->action));
     return req;
 }
 
@@ -759,9 +770,7 @@
     /* host | time | user | passwd */
     snprintf(buf, sizeof(buf), "%s|%d|%s|%s",
 	req->hostname,
-	(int) now,
-	req->user_name ? req->user_name : "",
-	req->passwd);
+	(int) now, req->user_name ? req->user_name : "", req->passwd);
     debug(3) fprintf(stderr, "cmgr: pre-encoded for pub: %s\n", buf);
     debug(3) fprintf(stderr, "cmgr: encoded: '%s'\n", base64_encode(buf));
     req->pub_auth = xstrdup(base64_encode(buf));
@@ -776,10 +785,11 @@
     const char *user_name;
     const char *passwd;
 
-    debug(2) fprintf(stderr, "cmgr: decoding pub: '%s'\n", safe_str(req->pub_auth));
+    debug(2) fprintf(stderr, "cmgr: decoding pub: '%s'\n",
+	safe_str(req->pub_auth));
     safe_free(req->passwd);
-    if (!req->pub_auth || strlen(req->pub_auth) < 4 + strlen(safe_str(req->hostname)))
-	return;
+    if (!req->pub_auth
+	|| strlen(req->pub_auth) < 4 + strlen(safe_str(req->hostname))) return;
     buf = xstrdup(base64_decode(req->pub_auth));
     debug(3) fprintf(stderr, "cmgr: length ok\n");
     /* parse ( a lot of memory leaks, but that is cachemgr style :) */
@@ -788,7 +798,8 @@
     debug(3) fprintf(stderr, "cmgr: decoded host: '%s'\n", host_name);
     if ((time_str = strtok(NULL, "|")) == NULL)
 	return;
-    debug(3) fprintf(stderr, "cmgr: decoded time: '%s' (now: %d)\n", time_str, (int) now);
+    debug(3) fprintf(stderr, "cmgr: decoded time: '%s' (now: %d)\n", time_str,
+	(int) now);
     if ((user_name = strtok(NULL, "|")) == NULL)
 	return;
     debug(3) fprintf(stderr, "cmgr: decoded uname: '%s'\n", user_name);
@@ -825,8 +836,7 @@
 	return "";
 
     snprintf(buf, sizeof(buf), "%s:%s",
-	req->user_name ? req->user_name : "",
-	req->passwd);
+	req->user_name ? req->user_name : "", req->passwd);
 
     str64 = base64_encode(buf);
     l += snprintf(buf, sizeof(buf), "Authorization: Basic %s\r\n", str64);
@@ -834,4 +844,3 @@
 	"Proxy-Authorization: Basic %s\r\n", str64);
     return buf;
 }
-
Index: squid/src/carp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/carp.c,v
retrieving revision 1.1.1.1.4.4.2.2
retrieving revision 1.1.1.1.4.4.2.2.2.1
diff -u -r1.1.1.1.4.4.2.2 -r1.1.1.1.4.4.2.2.2.1
--- squid/src/carp.c	3 Jun 2001 19:41:48 -0000	1.1.1.1.4.4.2.2
+++ squid/src/carp.c	27 Aug 2001 21:48:20 -0000	1.1.1.1.4.4.2.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: carp.c,v 1.1.1.1.4.4.2.2 2001/06/03 19:41:48 serassio Exp $
+ * $Id: carp.c,v 1.1.1.1.4.4.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 39    Cache Array Routing Protocol
  * AUTHOR: Eric Stern
@@ -71,7 +71,8 @@
     if (!p->next)
 	return;
     for (p = p->next; p; p = p->next) {
-	p->carp.load_multiplier = ((K - k + 1) * (p->carp.load_factor - P_last)) / Xn;
+	p->carp.load_multiplier =
+	    ((K - k + 1) * (p->carp.load_factor - P_last)) / Xn;
 	p->carp.load_multiplier += pow(X_last, K - k + 1);
 	p->carp.load_multiplier = pow(p->carp.load_multiplier, 1 / (K - k + 1));
 	Xn *= p->carp.load_multiplier;
Index: squid/src/cbdata.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cbdata.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/cbdata.c	6 Jan 2001 12:40:12 -0000	1.1.1.2.4.1.2.1
+++ squid/src/cbdata.c	27 Aug 2001 21:48:20 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: cbdata.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:12 hno Exp $
+ * $Id: cbdata.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -70,7 +69,8 @@
 
 static int cbdataCount = 0;
 
-typedef struct _cbdata {
+typedef struct _cbdata
+{
     const void *key;
     struct _cbdata *next;
     int valid;
@@ -81,7 +81,8 @@
     const char *file;
     int line;
 #endif
-} cbdata;
+}
+cbdata;
 
 static HASHCMP cbdata_cmp;
 static HASHHASH cbdata_hash;
@@ -107,13 +108,13 @@
     debug(45, 3) ("cbdataInit\n");
     htable = hash_create(cbdata_cmp, 1 << 8, cbdata_hash);
     cachemgrRegister("cbdata",
-	"Callback Data Registry Contents",
-	cbdataDump, 0, 1);
+	"Callback Data Registry Contents", cbdataDump, 0, 1);
 }
 
 void
 #if CBDATA_DEBUG
-cbdataAddDbg(const void *p, CBDUNL * unlock_func, int id, const char *file, int line)
+cbdataAddDbg(const void *p, CBDUNL * unlock_func, int id, const char *file,
+    int line)
 #else
 cbdataAdd(const void *p, CBDUNL * unlock_func, int id)
 #endif
@@ -227,14 +228,10 @@
 #if CBDATA_DEBUG
 	storeAppendPrintf(sentry, "%20p %10s %d locks %s:%d\n",
 	    c->key,
-	    c->valid ? "VALID" : "NOT VALID",
-	    c->locks,
-	    c->file, c->line);
+	    c->valid ? "VALID" : "NOT VALID", c->locks, c->file, c->line);
 #else
 	storeAppendPrintf(sentry, "%20p %10s %d locks\n",
-	    c->key,
-	    c->valid ? "VALID" : "NOT VALID",
-	    c->locks);
+	    c->key, c->valid ? "VALID" : "NOT VALID", c->locks);
 #endif
     }
 }
Index: squid/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v
retrieving revision 1.1.1.3.4.3.2.2
retrieving revision 1.1.1.3.4.3.2.2.2.1
diff -u -r1.1.1.3.4.3.2.2 -r1.1.1.3.4.3.2.2.2.1
--- squid/src/cf.data.pre	3 Jun 2001 19:41:48 -0000	1.1.1.3.4.3.2.2
+++ squid/src/cf.data.pre	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.3.2.2.2.1
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.1.1.3.4.3.2.2 2001/06/03 19:41:48 serassio Exp $
+# $Id: cf.data.pre,v 1.1.1.3.4.3.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -788,6 +788,21 @@
 DOC_END
 
 
+NAME: log_redirected_url
+COMMENT: on|off
+TYPE: onoff
+LOC: Config.onoff.log_redirected_url
+DEFAULT: off
+DOC_START
+	The Cache logs original URL requested by clients to access_log.
+	This options allows to log URL like it looks after redirector 
+	processed it. May be usable when you are concerned about traffic
+	volumes. By default this is off.
+
+log_redirected_url off
+DOC_END
+
+
 NAME: pid_filename
 TYPE: string
 DEFAULT: @DEFAULT_PID_FILE@
@@ -963,7 +978,7 @@
 
 
 NAME: pinger_program
-TYPE: string
+TYPE: eol
 DEFAULT: @DEFAULT_PINGER@
 LOC: Config.Program.pinger
 DOC_START
@@ -2253,6 +2268,18 @@
 minimum_direct_hops 4
 DOC_END
 
+NAME: source_ping
+COMMENT: on|off
+TYPE: onoff
+DEFAULT: off
+LOC: Config.onoff.source_ping
+DOC_START
+	If using the ICMP pinging stuff, ping source server each time
+	url is retrieved from it.
+
+source_ping off
+DOC_END
+
 
 NAME: cachemgr_passwd
 TYPE: cachemgrpasswd
Index: squid/src/cf_gen.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf_gen.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/cf_gen.c	3 Jun 2001 19:41:48 -0000	1.1.1.3.4.1.2.2
+++ squid/src/cf_gen.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: cf_gen.c,v 1.1.1.3.4.1.2.2 2001/06/03 19:41:48 serassio Exp $
+ * $Id: cf_gen.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: none
  * AUTHOR: Max Okumoto
@@ -64,18 +64,14 @@
 #if HAVE_ASSERT_H
 #include <assert.h>
 #endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-#include <io.h>
-#include <fcntl.h>
-#endif
-
 #include "util.h"
 
 #define MAX_LINE	1024	/* longest configuration line */
 #define _PATH_PARSER		"cf_parser.c"
 #define _PATH_SQUID_CONF	"squid.conf"
 
-enum State {
+enum State
+{
     sSTART,
     s1,
     sDOC,
@@ -83,12 +79,15 @@
     sEXIT
 };
 
-typedef struct Line {
+typedef struct Line
+{
     char *data;
     struct Line *next;
-} Line;
+}
+Line;
 
-typedef struct Entry {
+typedef struct Entry
+{
     char *name;
     char *type;
     char *loc;
@@ -99,7 +98,8 @@
     Line *doc;
     Line *nocomment;
     struct Entry *next;
-} Entry;
+}
+Entry;
 
 
 static const char WS[] = " \t";
@@ -138,9 +138,6 @@
 	perror(input_filename);
 	exit(1);
     }
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-    setmode(fileno(fp), O_TEXT);
-#endif
     state = sSTART;
     while (feof(fp) == 0 && state != sEXIT) {
 	char buff[MAX_LINE];
@@ -314,18 +311,13 @@
 	perror(output_filename);
 	exit(1);
     }
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-    setmode(fileno(fp), O_TEXT);
-#endif
     fprintf(fp,
 	"/*\n"
 	" * Generated automatically from %s by %s\n"
 	" *\n"
 	" * Abstract: This file contains routines used to configure the\n"
 	" *           variables in the squid server.\n"
-	" */\n"
-	"\n",
-	input_filename, argv[0]
+	" */\n" "\n", input_filename, argv[0]
 	);
     rc = gen_default(entries, fp);
     gen_default_if_none(entries, fp);
@@ -339,9 +331,6 @@
 	perror(conf_filename);
 	exit(1);
     }
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-    setmode(fileno(fp), O_TEXT);
-#endif
     gen_conf(entries, fp);
     fclose(fp);
 
@@ -360,17 +349,13 @@
 	"\tLOCAL_ARRAY(char, tmp_line, BUFSIZ);\n"
 	"\txstrncpy(tmp_line, s, BUFSIZ);\n"
 	"\txstrncpy(config_input_line, s, BUFSIZ);\n"
-	"\tconfig_lineno++;\n"
-	"\tparse_line(tmp_line);\n"
-	"}\n"
-	);
+	"\tconfig_lineno++;\n" "\tparse_line(tmp_line);\n" "}\n");
     fprintf(fp,
 	"static void\n"
 	"default_all(void)\n"
 	"{\n"
 	"\tcfg_filename = \"Default Configuration\";\n"
-	"\tconfig_lineno = 0;\n"
-	);
+	"\tconfig_lineno = 0;\n");
     for (entry = head; entry != NULL; entry = entry->next) {
 	assert(entry->name);
 	assert(entry != entry->next);
@@ -394,8 +379,7 @@
 	    fprintf(fp, "\t/* No default for %s */\n", entry->name);
 	} else {
 	    fprintf(fp, "\tdefault_line(\"%s %s\");\n",
-		entry->name,
-		entry->default_value);
+		entry->name, entry->default_value);
 	}
 	if (entry->ifdef)
 	    fprintf(fp, "#endif\n");
@@ -409,11 +393,7 @@
 gen_default_if_none(Entry * head, FILE * fp)
 {
     Entry *entry;
-    fprintf(fp,
-	"static void\n"
-	"defaults_if_none(void)\n"
-	"{\n"
-	);
+    fprintf(fp, "static void\n" "defaults_if_none(void)\n" "{\n");
     for (entry = head; entry != NULL; entry = entry->next) {
 	assert(entry->name);
 	assert(entry->loc);
@@ -424,10 +404,7 @@
 	fprintf(fp,
 	    "\tif (check_null_%s(%s))\n"
 	    "\t\tdefault_line(\"%s %s\");\n",
-	    entry->type,
-	    entry->loc,
-	    entry->name,
-	    entry->default_if_none);
+	    entry->type, entry->loc, entry->name, entry->default_if_none);
 	if (entry->ifdef)
 	    fprintf(fp, "#endif\n");
     }
@@ -447,28 +424,19 @@
 	"\tchar\t*token;\n"
 	"\tdebug(0,10)(\"parse_line: %%s\\n\", buff);\n"
 	"\tif ((token = strtok(buff, w_space)) == NULL)\n"
-	"\t\t(void) 0;\t/* ignore empty lines */\n"
-	);
+	"\t\t(void) 0;\t/* ignore empty lines */\n");
 
     for (entry = head; entry != NULL; entry = entry->next) {
 	if (strcmp(entry->name, "comment") == 0)
 	    continue;
 	if (entry->ifdef)
 	    fprintf(fp, "#if %s\n", entry->ifdef);
-	fprintf(fp, "\telse if (!strcmp(token, \"%s\"))\n",
-	    entry->name
-	    );
+	fprintf(fp, "\telse if (!strcmp(token, \"%s\"))\n", entry->name);
 	assert(entry->loc);
 	if (strcmp(entry->loc, "none") == 0) {
-	    fprintf(fp,
-		"\t\tparse_%s();\n",
-		entry->type
-		);
+	    fprintf(fp, "\t\tparse_%s();\n", entry->type);
 	} else {
-	    fprintf(fp,
-		"\t\tparse_%s(&%s);\n",
-		entry->type, entry->loc
-		);
+	    fprintf(fp, "\t\tparse_%s(&%s);\n", entry->type, entry->loc);
 	}
 	if (entry->ifdef)
 	    fprintf(fp, "#endif\n");
@@ -476,21 +444,14 @@
 
     fprintf(fp,
 	"\telse\n"
-	"\t\tresult = 0; /* failure */\n"
-	"\treturn(result);\n"
-	"}\n\n"
-	);
+	"\t\tresult = 0; /* failure */\n" "\treturn(result);\n" "}\n\n");
 }
 
 static void
 gen_dump(Entry * head, FILE * fp)
 {
     Entry *entry;
-    fprintf(fp,
-	"static void\n"
-	"dump_config(StoreEntry *entry)\n"
-	"{\n"
-	);
+    fprintf(fp, "static void\n" "dump_config(StoreEntry *entry)\n" "{\n");
     for (entry = head; entry != NULL; entry = entry->next) {
 	assert(entry->loc);
 	if (strcmp(entry->loc, "none") == 0)
@@ -500,9 +461,7 @@
 	if (entry->ifdef)
 	    fprintf(fp, "#if %s\n", entry->ifdef);
 	fprintf(fp, "\tdump_%s(entry, \"%s\", %s);\n",
-	    entry->type,
-	    entry->name,
-	    entry->loc);
+	    entry->type, entry->name, entry->loc);
 	if (entry->ifdef)
 	    fprintf(fp, "#endif\n");
     }
@@ -513,11 +472,7 @@
 gen_free(Entry * head, FILE * fp)
 {
     Entry *entry;
-    fprintf(fp,
-	"static void\n"
-	"free_all(void)\n"
-	"{\n"
-	);
+    fprintf(fp, "static void\n" "free_all(void)\n" "{\n");
     for (entry = head; entry != NULL; entry = entry->next) {
 	assert(entry->loc);
 	if (strcmp(entry->loc, "none") == 0)
Index: squid/src/client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/client.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/client.c	3 Jun 2001 19:41:48 -0000	1.1.1.3.4.1.2.2
+++ squid/src/client.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: client.c,v 1.1.1.3.4.1.2.2 2001/06/03 19:41:48 serassio Exp $
+ * $Id: client.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
@@ -183,6 +182,12 @@
 		break;
 	    }
     }
+#ifdef _SQUID_MSWIN_
+    {
+	WSADATA wsaData;
+	WSAStartup(2, &wsaData);
+    }
+#endif
     /* Build the HTTP request */
     if (strncmp(url, "mgr:", 4) == 0) {
 	char *t = xstrdup(url + 4);
@@ -195,8 +200,7 @@
 	put_fd = open(put_file, O_RDONLY);
 	set_our_signal();
 	if (put_fd < 0) {
-	    fprintf(stderr, "%s: can't open file (%s)\n", argv[0],
-		xstrerror());
+	    fprintf(stderr, "%s: can't open file (%s)\n", argv[0], xstrerror());
 	    exit(-1);
 	}
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
@@ -249,7 +253,7 @@
 	    (void) sigaction(SIGINT, &sa, NULL);
 	}
 #else
-	void (*osig) ();
+	void (*osig) (int);
 	if ((osig = signal(SIGINT, catch)) != SIG_DFL)
 	    (void) signal(SIGINT, osig);
 #endif
@@ -268,7 +272,9 @@
 	}
 	if (client_comm_connect(conn, hostname, port, ping ? &tv1 : NULL) < 0) {
 	    if (errno == 0) {
-		fprintf(stderr, "client: ERROR: Cannot connect to %s:%d: Host unknown.\n", hostname, port);
+		fprintf(stderr,
+		    "client: ERROR: Cannot connect to %s:%d: Host unknown.\n",
+		    hostname, port);
 	    } else {
 		char tbuf[BUFSIZ];
 		snprintf(tbuf, BUFSIZ, "client: ERROR: Cannot connect to %s:%d",
@@ -278,7 +284,11 @@
 	    exit(1);
 	}
 	/* Send the HTTP request */
+#ifdef _SQUID_MSWIN_
+	bytesWritten = send(conn, msg, strlen(msg), 0);
+#else
 	bytesWritten = write(conn, msg, strlen(msg));
+#endif
 	if (bytesWritten < 0) {
 	    perror("client: ERROR: write");
 	    exit(1);
@@ -300,12 +310,22 @@
 	}
 	/* Read the data */
 
+#ifdef _SQUID_MSWIN_
+	setmode(1, O_BINARY);
+	while ((len = recv(conn, buf, sizeof(buf), 0)) > 0) {
+#else
 	while ((len = read(conn, buf, sizeof(buf))) > 0) {
+#endif
 	    fsize += len;
 	    if (to_stdout)
 		fwrite(buf, len, 1, stdout);
 	}
+#ifdef _SQUID_MSWIN_
+	(void) closesocket(conn);	/* done with socket */
+	setmode(1, O_TEXT);
+#else
 	(void) close(conn);	/* done with socket */
+#endif
 
 	if (interrupted)
 	    break;
@@ -319,7 +339,8 @@
 	    elapsed_msec = tvSubMsec(tv1, tv2);
 	    t2s = tv2.tv_sec;
 	    tmp = localtime(&t2s);
-	    fprintf(stderr, "%d-%02d-%02d %02d:%02d:%02d [%d]: %ld.%03ld secs, %f KB/s\n",
+	    fprintf(stderr,
+		"%d-%02d-%02d %02d:%02d:%02d [%d]: %ld.%03ld secs, %f KB/s\n",
 		tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
 		tmp->tm_hour, tmp->tm_min, tmp->tm_sec, i + 1,
 		elapsed_msec / 1000, elapsed_msec % 1000,
@@ -345,8 +366,8 @@
 	ping_mean = ping_sum / i;
 	fprintf(stderr, "%d requests, round-trip (secs) min/avg/max = "
 	    "%ld.%03ld/%ld.%03ld/%ld.%03ld\n", i,
-	    ping_min / 1000, ping_min % 1000, ping_mean / 1000, ping_mean % 1000,
-	    ping_max / 1000, ping_max % 1000);
+	    ping_min / 1000, ping_min % 1000, ping_mean / 1000,
+	    ping_mean % 1000, ping_max / 1000, ping_max % 1000);
     }
     exit(0);
     /*NOTREACHED */
@@ -369,11 +390,13 @@
 	xmemcpy(&from_addr.sin_addr, hp->h_addr, hp->h_length);
 	from_addr.sin_port = 0;
     }
-    return bind(sock, (struct sockaddr *) &from_addr, sizeof(struct sockaddr_in));
+    return bind(sock, (struct sockaddr *) &from_addr,
+	sizeof(struct sockaddr_in));
 }
 
 static int
-client_comm_connect(int sock, char *dest_host, u_short dest_port, struct timeval *tvp)
+client_comm_connect(int sock, char *dest_host, u_short dest_port,
+    struct timeval *tvp)
 {
     static const struct hostent *hp = NULL;
     static struct sockaddr_in to_addr;
@@ -390,7 +413,8 @@
     }
     if (tvp)
 	(void) Now(tvp);
-    return connect(sock, (struct sockaddr *) &to_addr, sizeof(struct sockaddr_in));
+    return connect(sock, (struct sockaddr *) &to_addr,
+	sizeof(struct sockaddr_in));
 }
 
 static int
Index: squid/src/client_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_db.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/client_db.c	6 Jan 2001 12:40:12 -0000	1.1.1.3.4.1.2.1
+++ squid/src/client_db.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: client_db.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:12 hno Exp $
+ * $Id: client_db.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 0     Client Database
  * AUTHOR: Duane Wessels
@@ -57,10 +56,7 @@
     if (client_table)
 	return;
     client_table = hash_create((HASHCMP *) strcmp, 467, hash_string);
-    cachemgrRegister("client_list",
-	"Cache Client List",
-	clientdbDump,
-	0, 1);
+    cachemgrRegister("client_list", "Cache Client List", clientdbDump, 0, 1);
 }
 
 void
@@ -173,8 +169,7 @@
 	storeAppendPrintf(sentry, "Name: %s\n", fqdnFromAddr(c->addr));
 	storeAppendPrintf(sentry, "Currently established connections: %d\n",
 	    c->n_established);
-	storeAppendPrintf(sentry, "    ICP Requests %d\n",
-	    c->Icp.n_requests);
+	storeAppendPrintf(sentry, "    ICP Requests %d\n", c->Icp.n_requests);
 	for (l = LOG_TAG_NONE; l < LOG_TYPE_MAX; l++) {
 	    if (c->Icp.result_hist[l] == 0)
 		continue;
@@ -187,8 +182,7 @@
 		c->Icp.result_hist[l],
 		percent(c->Icp.result_hist[l], c->Icp.n_requests));
 	}
-	storeAppendPrintf(sentry, "    HTTP Requests %d\n",
-	    c->Http.n_requests);
+	storeAppendPrintf(sentry, "    HTTP Requests %d\n", c->Http.n_requests);
 	for (l = LOG_TAG_NONE; l < LOG_TYPE_MAX; l++) {
 	    if (c->Http.result_hist[l] == 0)
 		continue;
@@ -263,8 +257,9 @@
     *ErrP = SNMP_ERR_NOERROR;
     debug(49, 6) ("snmp_meshCtblFn: Current : \n");
     snmpDebugOid(6, Var->name, Var->name_length);
-    snprintf(key, sizeof(key), "%d.%d.%d.%d", Var->name[LEN_SQ_NET + 3], Var->name[LEN_SQ_NET + 4],
-	Var->name[LEN_SQ_NET + 5], Var->name[LEN_SQ_NET + 6]);
+    snprintf(key, sizeof(key), "%d.%d.%d.%d", Var->name[LEN_SQ_NET + 3],
+	Var->name[LEN_SQ_NET + 4], Var->name[LEN_SQ_NET + 5],
+	Var->name[LEN_SQ_NET + 6]);
     debug(49, 5) ("snmp_meshCtblFn: [%s] requested!\n", key);
     c = (ClientInfo *) hash_lookup(client_table, key);
     if (c == NULL) {
@@ -275,18 +270,15 @@
     switch (Var->name[LEN_SQ_NET + 2]) {
     case MESH_CTBL_ADDR:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->addr.s_addr,
-	    SMI_IPADDRESS);
+	    (snint) c->addr.s_addr, SMI_IPADDRESS);
 	break;
     case MESH_CTBL_HTBYTES:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Http.kbytes_out.kb,
-	    SMI_COUNTER32);
+	    (snint) c->Http.kbytes_out.kb, SMI_COUNTER32);
 	break;
     case MESH_CTBL_HTREQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Http.n_requests,
-	    SMI_COUNTER32);
+	    (snint) c->Http.n_requests, SMI_COUNTER32);
 	break;
     case MESH_CTBL_HTHITS:
 	aggr = 0;
@@ -295,34 +287,28 @@
 		aggr += c->Http.result_hist[l];
 	}
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) aggr,
-	    SMI_COUNTER32);
+	    (snint) aggr, SMI_COUNTER32);
 	break;
     case MESH_CTBL_HTHITBYTES:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Http.hit_kbytes_out.kb,
-	    SMI_COUNTER32);
+	    (snint) c->Http.hit_kbytes_out.kb, SMI_COUNTER32);
 	break;
     case MESH_CTBL_ICPBYTES:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Icp.kbytes_out.kb,
-	    SMI_COUNTER32);
+	    (snint) c->Icp.kbytes_out.kb, SMI_COUNTER32);
 	break;
     case MESH_CTBL_ICPREQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Icp.n_requests,
-	    SMI_COUNTER32);
+	    (snint) c->Icp.n_requests, SMI_COUNTER32);
 	break;
     case MESH_CTBL_ICPHITS:
 	aggr = c->Icp.result_hist[LOG_UDP_HIT];
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) aggr,
-	    SMI_COUNTER32);
+	    (snint) aggr, SMI_COUNTER32);
 	break;
     case MESH_CTBL_ICPHITBYTES:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) c->Icp.hit_kbytes_out.kb,
-	    SMI_COUNTER32);
+	    (snint) c->Icp.hit_kbytes_out.kb, SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v
retrieving revision 1.1.1.3.4.6.2.4
retrieving revision 1.1.1.3.4.6.2.4.2.1
diff -u -r1.1.1.3.4.6.2.4 -r1.1.1.3.4.6.2.4.2.1
--- squid/src/client_side.c	10 Jul 2001 19:42:13 -0000	1.1.1.3.4.6.2.4
+++ squid/src/client_side.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.6.2.4.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: client_side.c,v 1.1.1.3.4.6.2.4 2001/07/10 19:42:13 serassio Exp $
+ * $Id: client_side.c,v 1.1.1.3.4.6.2.4.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -63,8 +62,6 @@
 #endif
 #endif
 
-
-
 #if LINGERING_CLOSE
 #define comm_close comm_lingering_close
 #endif
@@ -85,11 +82,14 @@
 static void checkFailureRatio(err_type, hier_code);
 static void clientProcessMiss(clientHttpRequest *);
 static void clientBuildReplyHeader(clientHttpRequest * http, HttpReply * rep);
-static clientHttpRequest *parseHttpRequestAbort(ConnStateData * conn, const char *uri);
-static clientHttpRequest *parseHttpRequest(ConnStateData *, method_t *, int *, char **, size_t *);
+static clientHttpRequest *parseHttpRequestAbort(ConnStateData * conn,
+    const char *uri);
+static clientHttpRequest *parseHttpRequest(ConnStateData *, method_t *, int *,
+    char **, size_t *);
 static RH clientRedirectDone;
 static STCB clientHandleIMSReply;
-static int clientGetsOldEntry(StoreEntry * new, StoreEntry * old, request_t * request);
+static int clientGetsOldEntry(StoreEntry * new, StoreEntry * old,
+    request_t * request);
 static int checkAccelOnly(clientHttpRequest *);
 #if USE_IDENT
 static IDCB clientIdentDone;
@@ -98,7 +98,8 @@
 static STCB clientSendMoreData;
 static STCB clientCacheHit;
 static void clientSetKeepaliveFlag(clientHttpRequest *);
-static void clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb);
+static void clientPackRangeHdr(const HttpReply * rep,
+    const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb);
 static void clientPackTermBound(String boundary, MemBuf * mb);
 static void clientInterpretRequestHeaders(clientHttpRequest *);
 static void clientProcessRequest(clientHttpRequest *);
@@ -151,8 +152,7 @@
 	return;
     }
     http->acl_checklist = aclChecklistCreate(Config.accessList.http,
-	http->request,
-	conn->ident);
+	http->request, conn->ident);
 #if USE_IDENT
     /*
      * hack for ident ACL. It needs to get full addresses, and a
@@ -327,9 +327,7 @@
      */
     assert(storeClientListSearch(http->old_entry->mem_obj, http));
     entry = storeCreateEntry(url,
-	http->log_uri,
-	http->request->flags,
-	http->request->method);
+	http->log_uri, http->request->flags, http->request->method);
     /* NOTE, don't call storeLockObject(), storeCreateEntry() does it */
     storeClientListAdd(entry, http);
 #if DELAY_POOLS
@@ -348,13 +346,12 @@
 	http->out.offset,
 	http->out.offset,
 	CLIENT_SOCK_SZ,
-	memAllocate(MEM_CLIENT_SOCK_BUF),
-	clientHandleIMSReply,
-	http);
+	memAllocate(MEM_CLIENT_SOCK_BUF), clientHandleIMSReply, http);
 }
 
 static int
-clientGetsOldEntry(StoreEntry * new_entry, StoreEntry * old_entry, request_t * request)
+clientGetsOldEntry(StoreEntry * new_entry, StoreEntry * old_entry,
+    request_t * request)
 {
     const http_status status = new_entry->mem_obj->reply->sline.status;
     if (0 == status) {
@@ -390,7 +387,6 @@
     return 0;
 }
 
-
 static void
 clientHandleIMSReply(void *data, char *buf, ssize_t size)
 {
@@ -422,10 +418,14 @@
 	storeUnlockObject(entry);
 	entry = http->entry = http->old_entry;
     } else if (STORE_PENDING == entry->store_status && 0 == status) {
-	debug(33, 3) ("clientHandleIMSReply: Incomplete headers for '%s'\n", url);
+	debug(33, 3) ("clientHandleIMSReply: Incomplete headers for '%s'\n",
+	    url);
 	if (size >= CLIENT_SOCK_SZ) {
 	    /* will not get any bigger than that */
-	    debug(33, 3) ("clientHandleIMSReply: Reply is too large '%s', using old entry\n", url);
+	    debug(33,
+		3)
+		("clientHandleIMSReply: Reply is too large '%s', using old entry\n",
+		url);
 	    /* use old entry, this repeats the code abovez */
 	    http->log_type = LOG_TCP_REFRESH_FAIL_HIT;
 	    storeUnregister(entry, http);
@@ -436,10 +436,7 @@
 	    storeClientCopy(entry,
 		http->out.offset + size,
 		http->out.offset,
-		CLIENT_SOCK_SZ,
-		buf,
-		clientHandleIMSReply,
-		http);
+		CLIENT_SOCK_SZ, buf, clientHandleIMSReply, http);
 	    return;
 	}
     } else if (clientGetsOldEntry(entry, http->old_entry, http->request)) {
@@ -484,11 +481,7 @@
     if (recopy) {
 	storeClientCopy(entry,
 	    http->out.offset,
-	    http->out.offset,
-	    CLIENT_SOCK_SZ,
-	    buf,
-	    clientSendMoreData,
-	    http);
+	    http->out.offset, CLIENT_SOCK_SZ, buf, clientSendMoreData, http);
     } else {
 	clientSendMoreData(data, buf, size);
     }
@@ -534,13 +527,16 @@
     StoreEntry *entry;
     ErrorState *err = NULL;
     HttpReply *r;
-    debug(33, 3) ("Config2.onoff.enable_purge = %d\n", Config2.onoff.enable_purge);
+    debug(33, 3) ("Config2.onoff.enable_purge = %d\n",
+	Config2.onoff.enable_purge);
     if (!Config2.onoff.enable_purge) {
 	http->log_type = LOG_TCP_DENIED;
 	err = errorCon(ERR_ACCESS_DENIED, HTTP_FORBIDDEN);
 	err->request = requestLink(http->request);
 	err->src_addr = http->conn->peer.sin_addr;
-	http->entry = clientCreateStoreEntry(http, http->request->method, null_request_flags);
+	http->entry =
+	    clientCreateStoreEntry(http, http->request->method,
+	    null_request_flags);
 	errorAppendEntry(http->entry, err);
 	return;
     }
@@ -551,13 +547,13 @@
 	storeRelease(entry);
 	http->http_code = HTTP_OK;
     }
-    debug(33, 4) ("clientPurgeRequest: Not modified '%s'\n",
-	storeUrl(entry));
+    debug(33, 4) ("clientPurgeRequest: Not modified '%s'\n", storeUrl(entry));
     /*
      * Make a new entry to hold the reply to be written
      * to the client.
      */
-    http->entry = clientCreateStoreEntry(http, http->request->method, null_request_flags);
+    http->entry =
+	clientCreateStoreEntry(http, http->request->method, null_request_flags);
     httpReplyReset(r = http->entry->mem_obj->reply);
     httpReplySetHeaders(r, 1.0, http->http_code, NULL, NULL, 0, 0, -1);
     httpReplySwapOut(r, http->entry);
@@ -661,6 +657,8 @@
     if (http->out.size || http->log_type) {
 	http->al.icp.opcode = ICP_INVALID;
 	http->al.url = http->log_uri;
+	if (Config.onoff.log_redirected_url)
+	    http->al.url = http->uri;
 	debug(33, 9) ("httpRequestFree: al.url='%s'\n", http->al.url);
 	if (mem) {
 	    http->al.http.code = mem->reply->sline.status;
@@ -689,7 +687,8 @@
 	}
 	accessLogLog(&http->al);
 	clientUpdateCounters(http);
-	clientdbUpdate(conn->peer.sin_addr, http->log_type, PROTO_HTTP, http->out.size);
+	clientdbUpdate(conn->peer.sin_addr, http->log_type, PROTO_HTTP,
+	    http->out.size);
     }
     if (http->acl_checklist)
 	aclChecklistFree(http->acl_checklist);
@@ -783,20 +782,20 @@
      * Now knows about IE 5.5 fix (is actually only fixed in SP1, 
      * but we can't tell whether we are talking to SP1 or not so 
      * all 5.5 versions are treated 'normally').
-    */
+     */
     if (Config.onoff.ie_refresh) {
-        if (http->flags.accel && request->flags.ims) {
-           if ( (str = httpHeaderGetStr(req_hdr, HDR_USER_AGENT)) ) {
-               if (strstr(str, "MSIE 5.01") != NULL)
-                   no_cache++;
-               else if (strstr(str, "MSIE 5.0") != NULL)
-                   no_cache++;
-               else if (strstr(str, "MSIE 4.") != NULL)
-                   no_cache++;
-               else if (strstr(str, "MSIE 3.") != NULL)
-                   no_cache++;
-            }
-        }
+	if (http->flags.accel && request->flags.ims) {
+	    if ((str = httpHeaderGetStr(req_hdr, HDR_USER_AGENT))) {
+		if (strstr(str, "MSIE 5.01") != NULL)
+		    no_cache++;
+		else if (strstr(str, "MSIE 5.0") != NULL)
+		    no_cache++;
+		else if (strstr(str, "MSIE 4.") != NULL)
+		    no_cache++;
+		else if (strstr(str, "MSIE 3.") != NULL)
+		    no_cache++;
+	    }
+	}
     }
     if (no_cache) {
 #if HTTP_VIOLATIONS
@@ -1008,7 +1007,8 @@
 static int
 clientIfRangeMatch(clientHttpRequest * http, HttpReply * rep)
 {
-    const TimeOrTag spec = httpHeaderGetTimeOrTag(&http->request->header, HDR_IF_RANGE);
+    const TimeOrTag spec =
+	httpHeaderGetTimeOrTag(&http->request->header, HDR_IF_RANGE);
     /* check for parsing falure */
     if (!spec.valid)
 	return 0;
@@ -1020,7 +1020,9 @@
 	if (!rep_tag.str)
 	    return 0;		/* entity has no etag to compare with! */
 	if (spec.tag.weak || rep_tag.weak) {
-	    debug(33, 1) ("clientIfRangeMatch: Weak ETags are not allowed in If-Range: %s ? %s\n",
+	    debug(33, 1)
+		
+		("clientIfRangeMatch: Weak ETags are not allowed in If-Range: %s ? %s\n",
 		spec.tag.str, rep_tag.str);
 	    return 0;		/* must use strong validator for sub-range requests */
 	}
@@ -1091,7 +1093,8 @@
 	range_err = "unknown length";
     else if (rep->content_length != http->entry->mem_obj->reply->content_length)
 	range_err = "INCONSISTENT length";	/* a bug? */
-    else if (httpHeaderHas(&http->request->header, HDR_IF_RANGE) && !clientIfRangeMatch(http, rep))
+    else if (httpHeaderHas(&http->request->header, HDR_IF_RANGE)
+	&& !clientIfRangeMatch(http, rep))
 	range_err = "If-Range match failed";
     else if (!httpHdrRangeCanonize(http->request->range, rep->content_length))
 	range_err = "canonization failed";
@@ -1099,14 +1102,16 @@
 	range_err = "too complex range header";
     /* get rid of our range specs on error */
     if (range_err) {
-	debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err);
+	debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n",
+	    range_err);
 	httpHdrRangeDestroy(http->request->range);
 	http->request->range = NULL;
     } else {
 	const int spec_count = http->request->range->specs.count;
 	int actual_clen = -1;
 
-	debug(33, 3) ("clientBuildRangeHeader: range spec count: %d virgin clen: %d\n",
+	debug(33, 3)
+	    ("clientBuildRangeHeader: range spec count: %d virgin clen: %d\n",
 	    spec_count, rep->content_length);
 	assert(spec_count > 0);
 	/* ETags should not be returned with Partial Content replies? */
@@ -1114,7 +1119,8 @@
 	/* append appropriate header(s) */
 	if (spec_count == 1) {
 	    HttpHdrRangePos pos = HttpHdrRangeInitPos;
-	    const HttpHdrRangeSpec *spec = httpHdrRangeGetSpec(http->request->range, &pos);
+	    const HttpHdrRangeSpec *spec =
+		httpHdrRangeGetSpec(http->request->range, &pos);
 	    assert(spec);
 	    /* append Content-Range */
 	    httpHeaderAddContRange(hdr, *spec, rep->content_length);
@@ -1139,7 +1145,8 @@
 	assert(actual_clen >= 0);
 	httpHeaderDelById(hdr, HDR_CONTENT_LENGTH);
 	httpHeaderPutInt(hdr, HDR_CONTENT_LENGTH, actual_clen);
-	debug(33, 3) ("clientBuildRangeHeader: actual content length: %d\n", actual_clen);
+	debug(33, 3) ("clientBuildRangeHeader: actual content length: %d\n",
+	    actual_clen);
     }
 }
 
@@ -1225,7 +1232,8 @@
 	getMyHostname(), ntohs(Config.Sockaddr.http->s.sin_port));
 #endif
     if (httpReplyBodySize(request->method, rep) < 0) {
-	debug(33, 3) ("clientBuildReplyHeader: can't keep-alive, unknown body size\n");
+	debug(33, 3)
+	    ("clientBuildReplyHeader: can't keep-alive, unknown body size\n");
 	request->flags.proxy_keepalive = 0;
     }
     /* Signal keep-alive if needed */
@@ -1321,11 +1329,7 @@
 	    debug(33, 3) ("clientCacheHit: waiting for HTTP reply headers\n");
 	    storeClientCopy(e,
 		http->out.offset + size,
-		http->out.offset,
-		CLIENT_SOCK_SZ,
-		buf,
-		clientCacheHit,
-		http);
+		http->out.offset, CLIENT_SOCK_SZ, buf, clientCacheHit, http);
 	}
 	return;
     }
@@ -1408,7 +1412,9 @@
 	    memFree(buf, MEM_CLIENT_SOCK_BUF);
 	    storeUnregister(e, http);
 	    storeUnlockObject(e);
-	    e = clientCreateStoreEntry(http, http->request->method, null_request_flags);
+	    e =
+		clientCreateStoreEntry(http, http->request->method,
+		null_request_flags);
 	    /*
 	     * Copy timestamp from the original entry so the 304
 	     * reply has a meaningful Age: header.
@@ -1442,7 +1448,8 @@
 
 /* appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */
 static void
-clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb)
+clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec,
+    String boundary, MemBuf * mb)
 {
     HttpHeader hdr;
     Packer p;
@@ -1450,14 +1457,16 @@
     assert(spec);
 
     /* put boundary */
-    debug(33, 5) ("clientPackRangeHdr: appending boundary: %s\n", strBuf(boundary));
+    debug(33, 5) ("clientPackRangeHdr: appending boundary: %s\n",
+	strBuf(boundary));
     /* rfc2046 requires to _prepend_ boundary with <crlf>! */
     memBufPrintf(mb, "\r\n--%s\r\n", strBuf(boundary));
 
     /* stuff the header with required entries and pack it */
     httpHeaderInit(&hdr, hoReply);
     if (httpHeaderHas(&rep->header, HDR_CONTENT_TYPE))
-	httpHeaderPutStr(&hdr, HDR_CONTENT_TYPE, httpHeaderGetStr(&rep->header, HDR_CONTENT_TYPE));
+	httpHeaderPutStr(&hdr, HDR_CONTENT_TYPE, httpHeaderGetStr(&rep->header,
+		HDR_CONTENT_TYPE));
     httpHeaderAddContRange(&hdr, *spec, rep->content_length);
     packerToMemInit(&p, mb);
     httpHeaderPackInto(&hdr, &p);
@@ -1474,10 +1483,7 @@
  */
 static void
 clientPackRange(clientHttpRequest * http,
-    HttpHdrRangeIter * i,
-    const char **buf,
-    ssize_t * size,
-    MemBuf * mb)
+    HttpHdrRangeIter * i, const char **buf, ssize_t * size, MemBuf * mb)
 {
     const ssize_t copy_sz = i->debt_size <= *size ? i->debt_size : *size;
     off_t body_off = http->out.offset - i->prefix_size;
@@ -1492,14 +1498,13 @@
      * put boundary and headers at the beginning of a range in a
      * multi-range
      */
-    if (http->request->range->specs.count > 1 && i->debt_size == i->spec->length) {
+    if (http->request->range->specs.count > 1
+	&& i->debt_size == i->spec->length) {
 	assert(http->entry->mem_obj);
-	clientPackRangeHdr(
-	    http->entry->mem_obj->reply,	/* original reply */
+	clientPackRangeHdr(http->entry->mem_obj->reply,	/* original reply */
 	    i->spec,		/* current range */
 	    i->boundary,	/* boundary, the same for all */
-	    mb
-	    );
+	    mb);
     }
     /*
      * append content
@@ -1524,7 +1529,8 @@
  * increments iterator "i"
  * used by clientPackMoreRanges */
 static int
-clientCanPackMoreRanges(const clientHttpRequest * http, HttpHdrRangeIter * i, ssize_t size)
+clientCanPackMoreRanges(const clientHttpRequest * http, HttpHdrRangeIter * i,
+    ssize_t size)
 {
     /* first update "i" if needed */
     if (!i->debt_size) {
@@ -1539,7 +1545,8 @@
 /* extracts "ranges" from buf and appends them to mb, updating all offsets and such */
 /* returns true if we need more data */
 static int
-clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, MemBuf * mb)
+clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size,
+    MemBuf * mb)
 {
     HttpHdrRangeIter *i = &http->range_iter;
     /* offset in range specs does not count the prefix of an http msg */
@@ -1554,8 +1561,12 @@
 	start = i->spec->offset + i->spec->length - i->debt_size;
 	debug(33, 3) ("clientPackMoreRanges: in:  offset: %d size: %d\n",
 	    (int) body_off, size);
-	debug(33, 3) ("clientPackMoreRanges: out: start: %d spec[%d]: [%d, %d), len: %d debt: %d\n",
-	    (int) start, (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length, i->debt_size);
+	debug(33, 3)
+	    
+	    ("clientPackMoreRanges: out: start: %d spec[%d]: [%d, %d), len: %d debt: %d\n",
+	    (int) start, (int) i->pos, i->spec->offset,
+	    (int) (i->spec->offset + i->spec->length), i->spec->length,
+	    i->debt_size);
 	assert(body_off <= start);	/* we did not miss it */
 	/* skip up to start */
 	if (body_off + size > start) {
@@ -1577,16 +1588,22 @@
 	}
     }
     assert(!i->debt_size == !i->spec);	/* paranoid sync condition */
-    debug(33, 3) ("clientPackMoreRanges: buf exhausted: in:  offset: %d size: %d need_more: %d\n",
+    debug(33, 3)
+
+	
+	("clientPackMoreRanges: buf exhausted: in:  offset: %d size: %d need_more: %d\n",
 	(int) body_off, size, i->debt_size);
     if (i->debt_size) {
-	debug(33, 3) ("clientPackMoreRanges: need more: spec[%d]: [%d, %d), len: %d\n",
-	    (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length);
+	debug(33, 3)
+	    ("clientPackMoreRanges: need more: spec[%d]: [%d, %d), len: %d\n",
+	    (int) i->pos, i->spec->offset,
+	    (int) (i->spec->offset + i->spec->length), i->spec->length);
 	/* skip the data we do not need if possible */
 	if (i->debt_size == i->spec->length)	/* at the start of the cur. spec */
 	    body_off = i->spec->offset;
 	else
-	    assert(body_off == i->spec->offset + i->spec->length - i->debt_size);
+	    assert(body_off ==
+		i->spec->offset + i->spec->length - i->debt_size);
     } else if (http->request->range->specs.count > 1) {
 	/* put terminating boundary for multiparts */
 	clientPackTermBound(i->boundary, mb);
@@ -1688,17 +1705,17 @@
 	    assert(body_size >= 0);
 	    body_buf = buf + rep->hdr_sz;
 	    http->range_iter.prefix_size = rep->hdr_sz;
-	    debug(33, 3) ("clientSendMoreData: Appending %d bytes after %d bytes of headers\n",
+	    debug(33, 3)
+		
+		("clientSendMoreData: Appending %d bytes after %d bytes of headers\n",
 		body_size, rep->hdr_sz);
-	} else if (size < CLIENT_SOCK_SZ && entry->store_status == STORE_PENDING) {
+	} else if (size < CLIENT_SOCK_SZ
+	    && entry->store_status == STORE_PENDING) {
 	    /* wait for more to arrive */
 	    storeClientCopy(entry,
 		http->out.offset + size,
 		http->out.offset,
-		CLIENT_SOCK_SZ,
-		buf,
-		clientSendMoreData,
-		http);
+		CLIENT_SOCK_SZ, buf, clientSendMoreData, http);
 	    return;
 	}
 	/* reset range iterator */
@@ -1776,7 +1793,7 @@
 	 * This hack may hit performance a little, but it's better than 
 	 * blocking!.
 	 */
-#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_)
+#if defined (_SQUID_CYGWIN_)
 	commSetSelect(conn->fd, COMM_SELECT_READ, clientReadRequest, conn, 0);
 #else
 	clientReadRequest(conn->fd, conn);	/* Read next request */
@@ -1800,22 +1817,22 @@
 		http->out.offset,
 		http->out.offset,
 		CLIENT_SOCK_SZ,
-		memAllocate(MEM_CLIENT_SOCK_BUF),
-		clientSendMoreData,
-		http);
+		memAllocate(MEM_CLIENT_SOCK_BUF), clientSendMoreData, http);
 	}
     }
 }
 
 static void
-clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *data)
+clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     clientHttpRequest *http = data;
     StoreEntry *entry = http->entry;
     int done;
     http->out.size += size;
     debug(33, 5) ("clientWriteComplete: FD %d, sz %d, err %d, off %d, len %d\n",
-	fd, size, errflag, (int) http->out.offset, entry ? objectLen(entry) : 0);
+	fd, size, errflag, (int) http->out.offset,
+	entry ? objectLen(entry) : 0);
     if (size > 0) {
 	kb_incr(&Counter.client_http.kbytes_out, size);
 	if (isTcpHit(http->log_type))
@@ -1840,7 +1857,8 @@
 	    debug(33, 5) ("clientWriteComplete: closing, !done\n");
 	    comm_close(fd);
 	} else if (clientGotNotEnough(http)) {
-	    debug(33, 5) ("clientWriteComplete: client didn't get all it expected\n");
+	    debug(33,
+		5) ("clientWriteComplete: client didn't get all it expected\n");
 	    comm_close(fd);
 	} else if (http->request->flags.proxy_keepalive) {
 	    debug(33, 5) ("clientWriteComplete: FD %d Keeping Alive\n", fd);
@@ -1859,9 +1877,7 @@
 	    http->out.offset,
 	    http->out.offset,
 	    CLIENT_SOCK_SZ,
-	    memAllocate(MEM_CLIENT_SOCK_BUF),
-	    clientSendMoreData,
-	    http);
+	    memAllocate(MEM_CLIENT_SOCK_BUF), clientSendMoreData, http);
     }
 }
 
@@ -1971,8 +1987,7 @@
     int fd = http->conn->fd;
     HttpReply *rep;
     debug(33, 4) ("clientProcessRequest: %s '%s'\n",
-	RequestMethodStr[r->method],
-	url);
+	RequestMethodStr[r->method], url);
     if (r->method == METHOD_CONNECT) {
 	http->log_type = LOG_TCP_MISS;
 	sslStart(fd, url, r, &http->out.size);
@@ -1982,7 +1997,8 @@
 	return;
     } else if (r->method == METHOD_TRACE) {
 	if (r->max_forwards == 0) {
-	    http->entry = clientCreateStoreEntry(http, r->method, null_request_flags);
+	    http->entry =
+		clientCreateStoreEntry(http, r->method, null_request_flags);
 	    storeReleaseRequest(http->entry);
 	    storeBuffer(http->entry);
 	    rep = httpReplyCreate();
@@ -2004,8 +2020,7 @@
 	http->log_type = clientProcessRequest2(http);
     }
     debug(33, 4) ("clientProcessRequest: %s for '%s'\n",
-	log_tags[http->log_type],
-	http->uri);
+	log_tags[http->log_type], http->uri);
     http->out.offset = 0;
     if (NULL != http->entry) {
 	storeLockObject(http->entry);
@@ -2019,9 +2034,7 @@
 	    http->out.offset,
 	    http->out.offset,
 	    CLIENT_SOCK_SZ,
-	    memAllocate(MEM_CLIENT_SOCK_BUF),
-	    clientCacheHit,
-	    http);
+	    memAllocate(MEM_CLIENT_SOCK_BUF), clientCacheHit, http);
     } else {
 	/* MISS CASE */
 	clientProcessMiss(http);
@@ -2045,7 +2058,8 @@
      */
     if (http->entry) {
 	if (EBIT_TEST(http->entry->flags, ENTRY_SPECIAL)) {
-	    debug(33, 0) ("clientProcessMiss: miss on a special object (%s).\n", url);
+	    debug(33, 0) ("clientProcessMiss: miss on a special object (%s).\n",
+		url);
 	    debug(33, 0) ("\tlog_type = %s\n", log_tags[http->log_type]);
 	    storeEntryDump(http->entry, 1);
 	}
@@ -2065,7 +2079,8 @@
 	err = errorCon(ERR_ACCESS_DENIED, HTTP_FORBIDDEN);
 	err->request = requestLink(r);
 	err->src_addr = http->conn->peer.sin_addr;
-	http->entry = clientCreateStoreEntry(http, r->method, null_request_flags);
+	http->entry =
+	    clientCreateStoreEntry(http, r->method, null_request_flags);
 	errorAppendEntry(http->entry, err);
 	return;
     }
@@ -2154,7 +2169,8 @@
 
     /* Barf on NULL characters in the headers */
     if (strlen(inbuf) != req_sz) {
-	debug(33, 1) ("parseHttpRequest: Requestheader contains NULL characters\n");
+	debug(33,
+	    1) ("parseHttpRequest: Requestheader contains NULL characters\n");
 	return parseHttpRequestAbort(conn, "error:invalid-request");
     }
     /* Look for request method */
@@ -2235,7 +2251,8 @@
     *(*prefix_p + prefix_sz) = '\0';
     dlinkAdd(http, &http->active, &ClientActiveRequests);
 
-    debug(33, 5) ("parseHttpRequest: Request Header is\n%s\n", (*prefix_p) + *req_line_sz_p);
+    debug(33, 5) ("parseHttpRequest: Request Header is\n%s\n",
+	(*prefix_p) + *req_line_sz_p);
     if ((t = strchr(url, '#')))	/* remove HTML anchors */
 	*t = '\0';
 
@@ -2266,11 +2283,9 @@
 		*q++ = '\0';
 		vport = atoi(q);
 	    }
-	    url_sz = strlen(url) + 32 + Config.appendDomainLen +
-		strlen(t);
+	    url_sz = strlen(url) + 32 + Config.appendDomainLen + strlen(t);
 	    http->uri = xcalloc(url_sz, 1);
-	    snprintf(http->uri, url_sz, "http://%s:%d%s",
-		t, vport, url);
+	    snprintf(http->uri, url_sz, "http://%s:%d%s", t, vport, url);
 	} else if (vhost_mode) {
 	    int vport;
 	    /* Put the local socket IP address as the hostname */
@@ -2295,22 +2310,22 @@
 	    }
 	    if (ioctl(natfd, SIOCGNATL, &natLookup) < 0) {
 		if (errno != ESRCH) {
-		    debug(50, 1) ("parseHttpRequest: NAT lookup failed: ioctl(SIOCGNATL)\n");
+		    debug(50, 1)
+			
+			("parseHttpRequest: NAT lookup failed: ioctl(SIOCGNATL)\n");
 		    close(natfd);
 		    natfd = -1;
-		    return parseHttpRequestAbort(conn, "error:nat-lookup-failed");
+		    return parseHttpRequestAbort(conn,
+			"error:nat-lookup-failed");
 		} else
 		    snprintf(http->uri, url_sz, "http://%s:%d%s",
-			inet_ntoa(http->conn->me.sin_addr),
-			vport, url);
+			inet_ntoa(http->conn->me.sin_addr), vport, url);
 	    } else
 		snprintf(http->uri, url_sz, "http://%s:%d%s",
-		    inet_ntoa(natLookup.nl_realip),
-		    vport, url);
+		    inet_ntoa(natLookup.nl_realip), vport, url);
 #else
 	    snprintf(http->uri, url_sz, "http://%s:%d%s",
-		inet_ntoa(http->conn->me.sin_addr),
-		vport, url);
+		inet_ntoa(http->conn->me.sin_addr), vport, url);
 #endif
 	    debug(33, 5) ("VHOST REWRITE: '%s'\n", http->uri);
 	} else {
@@ -2367,11 +2382,7 @@
     int len = conn->in.size - conn->in.offset - 1;
     debug(33, 4) ("clientReadRequest: FD %d: reading request...\n", fd);
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    size = recv(fd, conn->in.buf + conn->in.offset, len);
-#else
     size = read(fd, conn->in.buf + conn->in.offset, len);
-#endif
     if (size > 0) {
 	fd_bytes(fd, size, FD_READ);
 	kb_incr(&Counter.client_http.kbytes_in, size);
@@ -2401,17 +2412,14 @@
 	conn->defer.n++;
 	fd_note(fd, "half-closed");
 	return;
-#ifdef _SQUID_MSWIN_
-    } else if (size ==SOCKET_ERROR) {
-#else
     } else if (size < 0) {
-#endif
 	if (!ignoreErrno(errno)) {
 	    debug(50, 2) ("clientReadRequest: FD %d: %s\n", fd, xstrerror());
 	    comm_close(fd);
 	    return;
 	} else if (conn->in.offset == 0) {
-	    debug(50, 2) ("clientReadRequest: FD %d: no data to process (%s)\n", fd, xstrerror());
+	    debug(50, 2) ("clientReadRequest: FD %d: no data to process: %s\n",
+		fd, xstrerror());
 	    return;
 	}
 	/* Continue to process previously read data */
@@ -2432,17 +2440,18 @@
 	/* Limit the number of concurrent requests to 2 */
 	for (H = &conn->chr, nrequests = 0; *H; H = &(*H)->next, nrequests++);
 	if (nrequests >= 2) {
-	    debug(33, 3) ("clientReadRequest: FD %d max concurrent requests reached\n", fd);
-	    debug(33, 5) ("clientReadRequest: FD %d defering new request until one is done\n", fd);
+	    debug(33, 3)
+		("clientReadRequest: FD %d max concurrent requests reached\n", fd);
+	    debug(33, 5)
+		
+		("clientReadRequest: FD %d defering new request until one is done\n",
+		fd);
 	    conn->defer.until = squid_curtime + 100;	/* Reset when a request is complete */
 	    break;
 	}
 	/* Process request */
 	http = parseHttpRequest(conn,
-	    &method,
-	    &parser_return_code,
-	    &prefix,
-	    &req_line_sz);
+	    &method, &parser_return_code, &prefix, &req_line_sz);
 	if (!http)
 	    safe_free(prefix);
 	if (http) {
@@ -2455,7 +2464,8 @@
 	     * data to the beginning
 	     */
 	    if (conn->in.offset > 0)
-		xmemmove(conn->in.buf, conn->in.buf + http->req_sz, conn->in.offset);
+		xmemmove(conn->in.buf, conn->in.buf + http->req_sz,
+		    conn->in.offset);
 	    /* add to the client request queue */
 	    for (H = &conn->chr; *H; H = &(*H)->next);
 	    *H = http;
@@ -2465,7 +2475,8 @@
 		debug(33, 1) ("clientReadRequest: FD %d Invalid Request\n", fd);
 		err = errorCon(ERR_INVALID_REQ, HTTP_BAD_REQUEST);
 		err->request_hdrs = xstrdup(conn->in.buf);
-		http->entry = clientCreateStoreEntry(http, method, null_request_flags);
+		http->entry =
+		    clientCreateStoreEntry(http, method, null_request_flags);
 		errorAppendEntry(http->entry, err);
 		safe_free(prefix);
 		break;
@@ -2476,7 +2487,8 @@
 		err->src_addr = conn->peer.sin_addr;
 		err->url = xstrdup(http->uri);
 		http->al.http.code = err->http_status;
-		http->entry = clientCreateStoreEntry(http, method, null_request_flags);
+		http->entry =
+		    clientCreateStoreEntry(http, method, null_request_flags);
 		errorAppendEntry(http->entry, err);
 		safe_free(prefix);
 		break;
@@ -2492,10 +2504,12 @@
 	    if (!http->flags.internal) {
 		if (internalCheck(strBuf(request->urlpath))) {
 		    if (internalHostnameIs(request->host) &&
-			request->port == ntohs(Config.Sockaddr.http->s.sin_port)) {
+			request->port ==
+			ntohs(Config.Sockaddr.http->s.sin_port)) {
 			http->flags.internal = 1;
 		    } else if (internalStaticCheck(strBuf(request->urlpath))) {
-			xstrncpy(request->host, internalHostname(), SQUIDHOSTNAMELEN);
+			xstrncpy(request->host, internalHostname(),
+			    SQUIDHOSTNAMELEN);
 			request->port = ntohs(Config.Sockaddr.http->s.sin_port);
 			http->flags.internal = 1;
 		    }
@@ -2520,7 +2534,9 @@
 		err->request = requestLink(request);
 		request->flags.proxy_keepalive = 0;
 		http->al.http.code = err->http_status;
-		http->entry = clientCreateStoreEntry(http, request->method, null_request_flags);
+		http->entry =
+		    clientCreateStoreEntry(http, request->method,
+		    null_request_flags);
 		errorAppendEntry(http->entry, err);
 		break;
 	    }
@@ -2529,7 +2545,9 @@
 		err->src_addr = conn->peer.sin_addr;
 		err->request = requestLink(request);
 		http->al.http.code = err->http_status;
-		http->entry = clientCreateStoreEntry(http, request->method, null_request_flags);
+		http->entry =
+		    clientCreateStoreEntry(http, request->method,
+		    null_request_flags);
 		errorAppendEntry(http->entry, err);
 		break;
 	    }
@@ -2554,7 +2572,8 @@
 		    xmemcpy(request->body, conn->in.buf, request->body_sz);
 		    conn->in.offset -= copy_len;
 		    if (conn->in.offset)
-			xmemmove(conn->in.buf, conn->in.buf + copy_len, conn->in.offset);
+			xmemmove(conn->in.buf, conn->in.buf + copy_len,
+			    conn->in.offset);
 		}
 		/*
 		 * if we didn't get the full body now, then more will
@@ -2587,14 +2606,18 @@
 		    /* The request is too large to handle */
 		    debug(33, 1) ("Request header is too large (%d bytes)\n",
 			(int) conn->in.offset);
-		    debug(33, 1) ("Config 'request_header_max_size'= %d bytes.\n",
+		    debug(33,
+			1) ("Config 'request_header_max_size'= %d bytes.\n",
 			Config.maxRequestHeaderSize);
 		    err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE);
-		    http = parseHttpRequestAbort(conn, "error:request-too-large");
+		    http =
+			parseHttpRequestAbort(conn, "error:request-too-large");
 		    /* add to the client request queue */
 		    for (H = &conn->chr; *H; H = &(*H)->next);
 		    *H = http;
-		    http->entry = clientCreateStoreEntry(http, METHOD_NONE, null_request_flags);
+		    http->entry =
+			clientCreateStoreEntry(http, METHOD_NONE,
+			null_request_flags);
 		    errorAppendEntry(http->entry, err);
 		    return;
 		}
@@ -2602,7 +2625,8 @@
 		conn->in.size += REQUEST_BUF_SIZE;
 		conn->in.buf = xrealloc(conn->in.buf, conn->in.size);
 		/* XXX account conn->in.buf */
-		debug(33, 3) ("Handling a large request, offset=%d inbufsize=%d\n",
+		debug(33,
+		    3) ("Handling a large request, offset=%d inbufsize=%d\n",
 		    (int) conn->in.offset, conn->in.size);
 		k = conn->in.size - 1 - conn->in.offset;
 	    }
@@ -2660,7 +2684,8 @@
     if (fdNFree() >= RESERVED_FD)
 	return 0;
     if (last_warn + 15 < squid_curtime) {
-	debug(33, 0) ("WARNING! Your cache is running out of filedescriptors\n");
+	debug(33,
+	    0) ("WARNING! Your cache is running out of filedescriptors\n");
 	last_warn = squid_curtime;
     }
     return 1;
@@ -2683,11 +2708,7 @@
     while (max-- && !httpAcceptDefer(sock, NULL)) {
 	memset(&peer, '\0', sizeof(struct sockaddr_in));
 	memset(&me, '\0', sizeof(struct sockaddr_in));
-#ifdef _SQUID_MSWIN_
-	if ((fd = comm_accept(sock, &peer, &me)) ==INVALID_SOCKET ) {
-#else
 	if ((fd = comm_accept(sock, &peer, &me)) < 0) {
-#endif
 	    if (!ignoreErrno(errno))
 		debug(50, 1) ("httpAccept: FD %d: accept failure: %s\n",
 		    sock, xstrerror());
@@ -2794,7 +2815,8 @@
 static int
 clientGotNotEnough(clientHttpRequest * http)
 {
-    int cl = httpReplyBodySize(http->request->method, http->entry->mem_obj->reply);
+    int cl =
+	httpReplyBodySize(http->request->method, http->entry->mem_obj->reply);
     int hs = http->entry->mem_obj->reply->hdr_sz;
     assert(cl >= 0);
     if (http->out.offset < cl + hs)
@@ -2858,16 +2880,8 @@
 	    continue;
 	}
 	enter_suid();
-	fd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_TCP,
-#else
-	    0,
-#endif
-	    s->s.sin_addr,
-	    ntohs(s->s.sin_port),
-	    COMM_NONBLOCKING,
-	    "HTTP Socket");
+	fd = comm_open(SOCK_STREAM, 0, s->s.sin_addr,
+	    ntohs(s->s.sin_port), COMM_NONBLOCKING, "HTTP Socket");
 	leave_suid();
 	if (fd < 0)
 	    continue;
@@ -2879,9 +2893,7 @@
 	 */
 	commSetDefer(fd, httpAcceptDefer, NULL);
 	debug(1, 1) ("Accepting HTTP connections at %s, port %d, FD %d.\n",
-	    inet_ntoa(s->s.sin_addr),
-	    (int) ntohs(s->s.sin_port),
-	    fd);
+	    inet_ntoa(s->s.sin_addr), (int) ntohs(s->s.sin_port), fd);
 	HttpSockets[NHttpSockets++] = fd;
     }
     if (NHttpSockets < 1)
Index: squid/src/comm.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm.c,v
retrieving revision 1.1.1.3.4.1.2.5
retrieving revision 1.1.1.3.4.1.2.5.2.1
diff -u -r1.1.1.3.4.1.2.5 -r1.1.1.3.4.1.2.5.2.1
--- squid/src/comm.c	29 Jul 2001 16:06:05 -0000	1.1.1.3.4.1.2.5
+++ squid/src/comm.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.5.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: comm.c,v 1.1.1.3.4.1.2.5 2001/07/29 16:06:05 serassio Exp $
+ * $Id: comm.c,v 1.1.1.3.4.1.2.5.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -40,7 +39,8 @@
 #include <netinet/tcp.h>
 #endif
 
-typedef struct {
+typedef struct
+{
     char *host;
     u_short port;
     struct sockaddr_in S;
@@ -52,7 +52,8 @@
     int tries;
     int addrcount;
     int connstart;
-} ConnectStateData;
+}
+ConnectStateData;
 
 /* STATIC */
 static int commBind(int s, struct in_addr, u_short port);
@@ -73,7 +74,8 @@
 
 #ifdef _SQUID_MSWIN_
 void
-commSetSelectS(int sd, unsigned int type, PF * handler, void *client_data, time_t timeout)
+commSetSelectS(int sd, unsigned int type, PF * handler, void *client_data,
+    time_t timeout)
 {
     sde *F = &sd_table[sd];
     assert(sd >= 0);
@@ -125,8 +127,7 @@
 }
 
 /* Return the local port associated with fd. */
-u_short
-comm_local_port(int fd)
+u_short comm_local_port(int fd)
 {
     struct sockaddr_in addr;
     socklen_t addr_len = 0;
@@ -145,7 +146,10 @@
 	return F->local_port;
     addr_len = sizeof(addr);
     if (getsockname(fd, (struct sockaddr *) &addr, &addr_len)) {
-	debug(50, 1) ("comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD %d: %s\n", fd, xstrerror());
+	debug(50, 1)
+	    
+	    ("comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD %d: %s\n",
+	    fd, xstrerror());
 	return 0;
     }
     F->local_port = ntohs(addr.sin_port);
@@ -168,8 +172,7 @@
     debug(50, 0) ("commBind: Cannot bind socket FD %d to %s:%d: %s\n",
 	s,
 	S.sin_addr.s_addr == INADDR_ANY ? "*" : inet_ntoa(S.sin_addr),
-	(int) port,
-	xstrerror());
+	(int) port, xstrerror());
     return COMM_ERROR;
 }
 
@@ -177,31 +180,17 @@
  * is OR of flags specified in comm.h. */
 int
 comm_open(int sock_type,
-    int proto,
-    struct in_addr addr,
-    u_short port,
-    int flags,
-    const char *note)
+    int proto, struct in_addr addr, u_short port, int flags, const char *note)
 {
     int new_socket;
 #ifdef _SQUID_MSWIN_
     sde *F = NULL;
-    int err;
 #else
     fde *F = NULL;
 #endif
 
     /* Create socket for accepting new connections. */
     Counter.syscalls.sock.sockets++;
-#ifdef _SQUID_MSWIN_
-    if ((new_socket = socket(AF_INET, sock_type, proto)) == INVALID_SOCKET) {
-	/* Increase the number of reserved fd's if calls to socket()
-	 * are failing because the open file table is full.  This
-	 * limits the number of simultaneous clients */
-	err=WSAGetLastError();
-	switch (err) {
-	case WSAEMFILE:
-#else
     if ((new_socket = socket(AF_INET, sock_type, proto)) < 0) {
 	/* Increase the number of reserved fd's if calls to socket()
 	 * are failing because the open file table is full.  This
@@ -209,7 +198,6 @@
 	switch (errno) {
 	case ENFILE:
 	case EMFILE:
-#endif
 	    debug(50, 1) ("comm_open: socket failure: %s\n", xstrerror());
 	    fdAdjustReserved();
 	    break;
@@ -232,9 +220,9 @@
 	commSetReuseAddr(new_socket);
     if (port > (u_short) 0) {
 #ifdef _SQUID_MSWIN_
-	if ( sock_type != SOCK_DGRAM && proto != IPPROTO_UDP )
+	if (sock_type != SOCK_DGRAM)
 #endif
-	commSetNoLinger(new_socket);
+	    commSetNoLinger(new_socket);
 	if (opt_reuseaddr)
 	    commSetReuseAddr(new_socket);
     }
@@ -271,15 +259,15 @@
     int x;
     if ((x = listen(sock, Squid_MaxFD >> 2)) < 0) {
 	debug(50, 0) ("comm_listen: listen(%d, %d): %s\n",
-	    Squid_MaxFD >> 2,
-	    sock, xstrerror());
+	    Squid_MaxFD >> 2, sock, xstrerror());
 	return x;
     }
     return sock;
 }
 
 void
-commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
+commConnectStart(int fd, const char *host, u_short port, CNCB * callback,
+    void *data)
 {
     ConnectStateData *cs = xcalloc(1, sizeof(ConnectStateData));
     debug(5, 3) ("commConnectStart: FD %d, %s:%d\n", fd, host, (int) port);
@@ -352,50 +340,28 @@
 static int
 commResetFD(ConnectStateData * cs)
 {
-#ifdef _SQUID_MSWIN_
-    int err;
-#endif
     int fd2;
     if (!cbdataValid(cs->data))
 	return 0;
-#ifdef _SQUID_MSWIN_
-    closesocket(cs->fd);
-    return 0;
-#endif
     Counter.syscalls.sock.sockets++;
     fd2 = socket(AF_INET, SOCK_STREAM, 0);
     Counter.syscalls.sock.sockets++;
     if (fd2 < 0) {
-#ifdef _SQUID_MSWIN_
-	err=WSAGetLastError();
-#endif
 	debug(5, 0) ("commResetFD: socket: %s\n", xstrerror());
-#ifdef _SQUID_MSWIN_
-	if (WSAEMFILE == h_errno)
-#else
 	if (ENFILE == errno || EMFILE == errno)
-#endif
 	    fdAdjustReserved();
 	return 0;
     }
     if (dup2(fd2, cs->fd) < 0) {
-#ifdef _SQUID_MSWIN_
-	err=WSAGetLastError();
-#endif
 	debug(5, 0) ("commResetFD: dup2: %s\n", xstrerror());
-#ifdef _SQUID_MSWIN_
-	if (WSAEMFILE == err)
-#else
 	if (ENFILE == errno || EMFILE == errno)
-#endif
 	    fdAdjustReserved();
 	return 0;
     }
+    close(fd2);
 #ifdef _SQUID_MSWIN_
-    closesocket(fd2);
     sd_table[cs->fd].flags.called_connect = 0;
 #else
-    close(fd2);
     fd_table[cs->fd].flags.called_connect = 0;
 #endif
     /*
@@ -420,6 +386,7 @@
 static int
 commRetryConnect(ConnectStateData * cs)
 {
+//#error What's with tries & timeout?
     assert(cs->addrcount > 0);
     if (cs->addrcount == 1) {
 	if (cs->tries >= Config.retry.maxtries)
@@ -485,9 +452,9 @@
     assert(fd >= 0);
     assert(fd < Squid_MaxFD);
 #ifdef _SQUID_MSWIN_
-	F = &sd_table[fd];
+    F = &sd_table[fd];
 #else
-	F = &fd_table[fd];
+    F = &fd_table[fd];
 #endif
     assert(F->flags.open);
     if (timeout < 0) {
@@ -523,14 +490,7 @@
 	Counter.syscalls.sock.connects++;
 	x = connect(sock, (struct sockaddr *) address, sizeof(*address));
 	if (x < 0)
-#ifdef _SQUID_MSWIN_
-	{
-	    err=WSAGetLastError();
-	    debug(5, 9) ("connect FD %d: %s\n", sock, wsastrerror(err));
-	}
-#else
 	    debug(5, 9) ("connect FD %d: %s\n", sock, xstrerror());
-#endif
     } else {
 #if defined(_SQUID_NEWSOS6_)
 	/* Makoto MATSUSHITA <matusita@ics.es.osaka-u.ac.jp> */
@@ -543,11 +503,7 @@
 	}
 #else
 	errlen = sizeof(err);
-#ifdef _SQUID_MSWIN_
-	x = getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*)&err,(int*) &errlen);
-#else
-	x = getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &errlen);
-#endif
+	x = getsockopt(sock, SOL_SOCKET, SO_ERROR, (char *) &err, &errlen);
 	if (x == 0)
 	    errno = err;
 #if defined(_SQUID_SOLARIS_)
@@ -562,15 +518,9 @@
 #endif
 #endif
     }
-#ifdef _SQUID_MSWIN_
-    if (err == 0 || err == WSAEISCONN)
-	status = COMM_OK;
-    else if (WSASetLastError(err), ignoreErrno(err))
-#else
     if (errno == 0 || errno == EISCONN)
 	status = COMM_OK;
     else if (ignoreErrno(errno))
-#endif
 	status = COMM_INPROGRESS;
     else
 	return COMM_ERROR;
@@ -601,20 +551,11 @@
 #endif
     Slen = sizeof(P);
     Counter.syscalls.sock.accepts++;
-#ifdef _SQUID_MSWIN_
-    if ((sock = WSAAccept(fd, (struct sockaddr *) &P,(int*) &Slen,NULL,0)) ==INVALID_SOCKET ) {
-	if (ignoreErrno(h_errno)) {
-#else
     if ((sock = accept(fd, (struct sockaddr *) &P, &Slen)) < 0) {
 	if (ignoreErrno(errno)) {
-#endif
 	    debug(50, 5) ("comm_accept: FD %d: %s\n", fd, xstrerror());
 	    return COMM_NOMESSAGE;
-#ifdef _SQUID_MSWIN_
-	} else if (WSAEMFILE == WSAGetLastError()) {
-#else
 	} else if (ENFILE == errno || EMFILE == errno) {
-#endif
 	    debug(50, 3) ("comm_accept: FD %d: %s\n", fd, xstrerror());
 	    return COMM_ERROR;
 	} else {
@@ -633,9 +574,9 @@
     /* fdstat update */
     fd_open(sock, FD_SOCKET, "HTTP Request");
 #ifdef _SQUID_MSWIN_
-	F = &sd_table[sock];
+    F = &sd_table[sock];
 #else
-	F = &fd_table[sock];
+    F = &fd_table[sock];
 #endif
     xstrncpy(F->ipaddr, inet_ntoa(P.sin_addr), 16);
     F->remote_port = htons(P.sin_port);
@@ -670,11 +611,7 @@
 {
     LOCAL_ARRAY(char, buf, 1024);
     int n;
-#ifdef _SQUID_MSWIN_
-    n = recv(fd, buf, 1024);
-#else
     n = read(fd, buf, 1024);
-#endif
     if (n < 0)
 	debug(5, 3) ("commLingerClose: FD %d read: %s\n", fd, xstrerror());
     comm_close(fd);
@@ -719,9 +656,9 @@
     assert(fd >= 0);
     assert(fd < Squid_MaxFD);
 #ifdef _SQUID_MSWIN_
-	F = &sd_table[fd];
+    F = &sd_table[fd];
 #else
-	F = &fd_table[fd];
+    F = &fd_table[fd];
 #endif
     if (F->flags.closing)
 	return;
@@ -735,21 +672,14 @@
     if (F->uses)		/* assume persistent connect count */
 	pconnHistCount(1, F->uses);
     fd_close(fd);		/* update fdstat */
-#ifdef _SQUID_MSWIN_
-    closesocket(fd);
-#else
     close(fd);
-#endif
     Counter.syscalls.sock.closes++;
 }
 
 /* Send a udp datagram to specified TO_ADDR. */
 int
 comm_udp_sendto(int fd,
-    const struct sockaddr_in *to_addr,
-    int addr_len,
-    const void *buf,
-    int len)
+    const struct sockaddr_in *to_addr, int addr_len, const void *buf, int len)
 {
     int x;
     Counter.syscalls.sock.sendtos++;
@@ -758,18 +688,9 @@
 #ifdef _SQUID_LINUX_
 	if (ECONNREFUSED != errno)
 #endif
-#ifdef _SQUID_MSWIN_
-	errno = WSAGetLastError();
-#endif
 	    debug(50, 1) ("comm_udp_sendto: FD %d, %s, port %d: %s\n",
-		fd,
-		inet_ntoa(to_addr->sin_addr),
-		(int) htons(to_addr->sin_port),
-#ifdef _SQUID_MSWIN_
-		wsastrerror(errno));
-#else
-		xstrerror());
-#endif
+		fd, inet_ntoa(to_addr->sin_addr),
+		(int) htons(to_addr->sin_port), xstrerror());
 	return COMM_ERROR;
     }
     return x;
@@ -788,7 +709,8 @@
 }
 
 void
-commSetSelect(int fd, unsigned int type, PF * handler, void *client_data, time_t timeout)
+commSetSelect(int fd, unsigned int type, PF * handler, void *client_data,
+    time_t timeout)
 {
     fde *F = &fd_table[fd];
     assert(fd >= 0);
@@ -816,7 +738,7 @@
     debug(5, 5) ("comm_add_close_handler: FD %d, handler=%p, data=%p\n",
 	fd, handler, data);
 #ifdef _SQUID_MSWIN_
-	for (c = sd_table[fd].close_handler; c; c = c->next)
+    for (c = sd_table[fd].close_handler; c; c = c->next)
 	assert(c->handler != handler || c->data != data);
     new->handler = handler;
     new->data = data;
@@ -842,9 +764,9 @@
     debug(5, 5) ("comm_remove_close_handler: FD %d, handler=%p, data=%p\n",
 	fd, handler, data);
 #ifdef _SQUID_MSWIN_
-	for (p = sd_table[fd].close_handler; p != NULL; last = p, p = p->next)
+    for (p = sd_table[fd].close_handler; p != NULL; last = p, p = p->next)
 #else
-	for (p = fd_table[fd].close_handler; p != NULL; last = p, p = p->next)
+    for (p = fd_table[fd].close_handler; p != NULL; last = p, p = p->next)
 #endif
 	if (p->handler == handler && p->data == data)
 	    break;		/* This is our handler */
@@ -869,11 +791,10 @@
     L.l_onoff = 0;		/* off */
     L.l_linger = 0;
     if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0)
+	debug(50, 0) ("commSetNoLinger: FD %d: %s\n", fd, xstrerror());
 #ifdef _SQUID_MSWIN_
-	debug(50, 0) ("commSetNoLinger: FD %d: %s\n", fd, wsastrerror(WSAGetLastError()));
     sd_table[fd].flags.nolinger = 1;
 #else
-	debug(50, 0) ("commSetNoLinger: FD %d: %s\n", fd, xstrerror());
     fd_table[fd].flags.nolinger = 1;
 #endif
 }
@@ -900,9 +821,9 @@
     int flags;
     int dummy = 0;
 #ifdef _SQUID_MSWIN_
-    int nonblocking = TRUE;
-    if (ioctlsocket(fd, FIONBIO, (unsigned long*)&nonblocking) ==SOCKET_ERROR) {
-	debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, wsastrerror(WSAGetLastError()));
+    int nonblocking = 1;
+    if (ioctlsocket(fd, FIONBIO, (unsigned long *) &nonblocking) < 0) {
+	debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, xstrerror());
 	return COMM_ERROR;
     }
     sd_table[fd].flags.nonblocking = 1;
@@ -926,9 +847,9 @@
     int flags;
     int dummy = 0;
 #ifdef _SQUID_MSWIN_
-	int nonblocking=0;
-    if (ioctlsocket(fd, FIONBIO, (unsigned long*)&nonblocking) ==SOCKET_ERROR) {
-	debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, wsastrerror(WSAGetLastError()));
+    int nonblocking = 0;
+    if (ioctlsocket(fd, FIONBIO, (unsigned long *) &nonblocking) < 0) {
+	debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, xstrerror());
 	return COMM_ERROR;
     }
     sd_table[fd].flags.nonblocking = 0;
@@ -971,12 +892,11 @@
 }
 #endif
 
-
 void
 comm_init(void)
 {
 #ifdef _SQUID_MSWIN_
-    sd_table =(sde*) xcalloc(Squid_MaxFD, sizeof(sde));
+    sd_table = (sde *) xcalloc(Squid_MaxFD, sizeof(sde));
 #endif
     fd_table = xcalloc(Squid_MaxFD, sizeof(fde));
     /* XXX account fd_table */
@@ -998,11 +918,7 @@
 	fd, (int) state->offset, state->size);
 
     nleft = state->size - state->offset;
-#ifdef _SQUID_MSWIN_
-    len = send(fd, state->buf + state->offset, nleft);
-#else
     len = write(fd, state->buf + state->offset, nleft);
-#endif
     debug(5, 5) ("commHandleWrite: write() returns %d\n", len);
     fd_bytes(fd, len, FD_WRITE);
     Counter.syscalls.sock.writes++;
@@ -1011,58 +927,45 @@
 	/* Note we even call write if nleft == 0 */
 	/* We're done */
 	if (nleft != 0)
-	    debug(5, 1) ("commHandleWrite: FD %d: write failure: connection closed with %d bytes remaining.\n", fd, nleft);
+	    debug(5, 1)
+		
+		("commHandleWrite: FD %d: write failure: connection closed with %d bytes remaining.\n",
+		fd, nleft);
 	CommWriteStateCallbackAndFree(fd, nleft ? COMM_ERROR : COMM_OK);
     } else if (len < 0) {
 	/* An error */
 #ifdef _SQUID_MSWIN_
-	    if (sd_table[fd].flags.socket_eof) {
-	    debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n",
-		fd, wsastrerror(WSAGetLastError()));
+	if (sd_table[fd].flags.socket_eof) {
 #else
-	    if (fd_table[fd].flags.socket_eof) {
+	if (fd_table[fd].flags.socket_eof) {
+#endif
 	    debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n",
 		fd, xstrerror());
-#endif
 	    CommWriteStateCallbackAndFree(fd, COMM_ERROR);
-#ifdef _SQUID_MSWIN_
 	} else if (ignoreErrno(errno)) {
+#ifdef _SQUID_MSWIN_
 	    debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n",
-		fd, wsastrerror(WSAGetLastError()));
-		commSetSelectS(fd,COMM_SELECT_WRITE, commHandleWrite,state, 0);
-	} else {
-	    debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n",
-		fd, wsastrerror(WSAGetLastError()));
-	    CommWriteStateCallbackAndFree(fd, COMM_ERROR);
-	}
+		fd, xstrerror());
+	    commSetSelectS(fd, COMM_SELECT_WRITE, commHandleWrite, state, 0);
 #else
-	} else if (ignoreErrno(errno)) {
 	    debug(50, 10) ("commHandleWrite: FD %d: write failure: %s.\n",
 		fd, xstrerror());
-	    commSetSelect(fd,
-		COMM_SELECT_WRITE,
-		commHandleWrite,
-		state,
-		0);
+	    commSetSelect(fd, COMM_SELECT_WRITE, commHandleWrite, state, 0);
+#endif
 	} else {
 	    debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n",
 		fd, xstrerror());
 	    CommWriteStateCallbackAndFree(fd, COMM_ERROR);
 	}
-#endif
     } else {
 	/* A successful write, continue */
 	state->offset += len;
 	if (state->offset < state->size) {
 	    /* Not done, reinstall the write handler and write some more */
 #ifdef _SQUID_MSWIN_
-	    commSetSelectS(fd,COMM_SELECT_WRITE, commHandleWrite,state,0);
+	    commSetSelectS(fd, COMM_SELECT_WRITE, commHandleWrite, state, 0);
 #else
-	    commSetSelect(fd,
-		COMM_SELECT_WRITE,
-		commHandleWrite,
-		state,
-		0);
+	    commSetSelect(fd, COMM_SELECT_WRITE, commHandleWrite, state, 0);
 #endif
 	} else {
 	    CommWriteStateCallbackAndFree(fd, COMM_OK);
@@ -1075,12 +978,13 @@
 /* Select for Writing on FD, until SIZE bytes are sent.  Call
  * * HANDLER when complete. */
 void
-comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func)
+comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data,
+    FREE * free_func)
 {
 #ifdef _SQUID_MSWIN_
-	CommWriteStateData *state = sd_table[fd].rwstate;
+    CommWriteStateData *state = sd_table[fd].rwstate;
 #else
-	CommWriteStateData *state = fd_table[fd].rwstate;
+    CommWriteStateData *state = fd_table[fd].rwstate;
 #endif
     debug(5, 5) ("comm_write: FD %d: sz %d: hndl %p: data %p.\n",
 	fd, size, handler, handler_data);
@@ -1095,9 +999,9 @@
     }
     assert(state == NULL);
 #ifdef _SQUID_MSWIN_
-	sd_table[fd].rwstate = state = (CommWriteStateData*)xcalloc(1, sizeof(CommWriteStateData));
+    sd_table[fd].rwstate = state = xcalloc(1, sizeof(CommWriteStateData));
 #else
-	fd_table[fd].rwstate = state = xcalloc(1, sizeof(CommWriteStateData));
+    fd_table[fd].rwstate = state = xcalloc(1, sizeof(CommWriteStateData));
 #endif
     state->buf = buf;
     state->size = size;
@@ -1124,26 +1028,6 @@
  * hm, this might be too general-purpose for all the places we'd
  * like to use it.
  */
-#ifdef _SQUID_MSWIN_
-int
-WSAignoreErrno(int err)
-{
-    err=WSAGetLastError();
-    errno = err;
-    switch (err) {
-    case WSAEINPROGRESS:
-    case WSAEWOULDBLOCK:
-    case WSAEALREADY:
-	case WSATRY_AGAIN:
-	return 1;
-    default:
-	return 0;
-    }
-    /* NOTREACHED */
-}
-
-#else
-
 int
 ignoreErrno(int ierrno)
 {
@@ -1164,7 +1048,6 @@
     }
     /* NOTREACHED */
 }
-#endif
 
 void
 commCloseAllSockets(void)
@@ -1176,10 +1059,11 @@
     fde *F = NULL;
 #endif
     PF *callback;
-    for (fd = 0; fd <= Biggest_FD; fd++) {
 #ifdef _SQUID_MSWIN_
+    for (fd = 0; fd <= Biggest_SD; fd++) {
 	F = &sd_table[fd];
 #else
+    for (fd = 0; fd <= Biggest_FD; fd++) {
 	F = &fd_table[fd];
 #endif
 	if (!F->flags.open)
@@ -1189,13 +1073,15 @@
 	if (F->flags.ipc)	/* don't close inter-process sockets */
 	    continue;
 	if (F->timeout_handler) {
-	    debug(5, 5) ("commCloseAllSockets: FD %d: Calling timeout handler\n",
+	    debug(5,
+		5) ("commCloseAllSockets: FD %d: Calling timeout handler\n",
 		fd);
 	    callback = F->timeout_handler;
 	    F->timeout_handler = NULL;
 	    callback(fd, F->timeout_data);
 	} else {
-	    debug(5, 5) ("commCloseAllSockets: FD %d: calling comm_close()\n", fd);
+	    debug(5, 5) ("commCloseAllSockets: FD %d: calling comm_close()\n",
+		fd);
 	    comm_close(fd);
 	}
     }
Index: squid/src/comm_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm_select.c,v
retrieving revision 1.1.1.3.4.2.2.3
retrieving revision 1.1.1.3.4.2.2.3.2.1
diff -u -r1.1.1.3.4.2.2.3 -r1.1.1.3.4.2.2.3.2.1
--- squid/src/comm_select.c	28 Jul 2001 10:18:13 -0000	1.1.1.3.4.2.2.3
+++ squid/src/comm_select.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.2.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: comm_select.c,v 1.1.1.3.4.2.2.3 2001/07/28 10:18:13 serassio Exp $
+ * $Id: comm_select.c,v 1.1.1.3.4.2.2.3.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -475,13 +474,12 @@
 	    }
 	    if (revents & POLLNVAL) {
 		close_handler *ch;
-		debug(5, 0) ("WARNING: FD %d has handlers, but it's invalid.\n", fd);
+		debug(5, 0) ("WARNING: FD %d has handlers, but it's invalid.\n",
+		    fd);
 		debug(5, 0) ("FD %d is a %s\n", fd, fdTypeStr[F->type]);
 		debug(5, 0) ("--> %s\n", F->desc);
 		debug(5, 0) ("tmout:%p read:%p write:%p\n",
-		    F->timeout_handler,
-		    F->read_handler,
-		    F->write_handler);
+		    F->timeout_handler, F->read_handler, F->write_handler);
 		for (ch = F->close_handler; ch; ch = ch->next)
 		    debug(5, 0) (" close handler: %p\n", ch->handler);
 		if (F->close_handler) {
@@ -550,21 +548,19 @@
 	fd = fds[i];
 #ifdef _SQUID_MSWIN_
 	if (sd_table[fd].read_handler) {
-	    FD_SET((SOCKET) fd, &read_mask);
 #else
 	if (fd_table[fd].read_handler) {
-	    FD_SET(fd, &read_mask);
 #endif
+	    FD_SET(fd, &read_mask);
 	    if (fd > maxfd)
 		maxfd = fd;
 	}
 #ifdef _SQUID_MSWIN_
 	if (sd_table[fd].write_handler) {
-	    FD_SET((SOCKET) fd, &write_mask);
 #else
 	if (fd_table[fd].write_handler) {
-	    FD_SET(fd, &write_mask);
 #endif
+	    FD_SET(fd, &write_mask);
 	    if (fd > maxfd)
 		maxfd = fd;
 	}
@@ -720,11 +716,11 @@
 	FD_ZERO(&readsds);
 	FD_ZERO(&writesds);
 	FD_ZERO(&errsds);
-	xmemcpy(&readsds, &global_readsds,sizeof(global_readsds));
-	xmemcpy(&writesds, &global_writesds,sizeof(global_writesds));
-	xmemcpy(&errsds, &global_writesds,sizeof(global_writesds));
+	xmemcpy(&readsds, &global_readsds, sizeof(global_readsds));
+	xmemcpy(&writesds, &global_writesds, sizeof(global_writesds));
+	xmemcpy(&errsds, &global_writesds, sizeof(global_writesds));
 	for (j = 0; j < (int) readsds.fd_count; j++) {
-	    fd=readsds.fd_array[j];
+	    fd = readsds.fd_array[j];
 	    switch (commDeferRead(fd)) {
 	    case 0:
 		break;
@@ -798,7 +794,7 @@
 	}
 	if (msec > MAX_POLL_TIME)
 	    msec = MAX_POLL_TIME;
-#if defined(_SQUID_OS2_) || defined(_SQUID_MSWIN_)
+#if defined(_SQUID_OS2_)
 	if (msec < 0)
 	    msec = MAX_POLL_TIME;
 #endif
@@ -811,13 +807,12 @@
 #else
 	    num = select(maxfd, &readfds, &writefds, NULL, &poll_time);
 #endif
-		Counter.select_loops++;
+	    Counter.select_loops++;
 	    if (num >= 0)
 		break;
 	    if (ignoreErrno(errno))
 		break;
-	    debug(50, 0) ("comm_select: select failure: %s\n",
-		xstrerror());
+	    debug(50, 0) ("comm_select: select failure: %s\n", xstrerror());
 #ifdef _SQUID_MSWIN_
 	    examine_select(&readsds, &writesds);
 #else
@@ -842,7 +837,7 @@
 	/* Scan return fd masks for ready descriptors */
 #ifdef _SQUID_MSWIN_
 	for (j = 0; j < (int) readsds.fd_count; j++) {
-		fd=readsds.fd_array[j];
+	    fd = readsds.fd_array[j];
 #else
 	fdsp = (fd_mask *) & readfds;
 	maxindex = howmany(maxfd, FD_MASK_BITS);
@@ -902,20 +897,20 @@
 		    if (commCheckHTTPIncoming)
 			comm_select_http_incoming();
 		}
-	}
+	    }
 #ifdef _SQUID_MSWIN_
-	for (j = 0; j < (int) errsds.fd_count; j++) {
-		fd=errsds.fd_array[j];
+	    for (j = 0; j < (int) errsds.fd_count; j++) {
+		fd = errsds.fd_array[j];
 		F = &sd_table[fd];
 		if ((hdl = F->write_handler)) {
-			F->write_handler = NULL;
-			commUpdateWriteBitsS(fd, NULL);
-			hdl(fd, F->write_data);
-			Counter.select_fds++;
+		    F->write_handler = NULL;
+		    commUpdateWriteBitsS(fd, NULL);
+		    hdl(fd, F->write_data);
+		    Counter.select_fds++;
 		}
-	}
-	for (j = 0; j < (int) writesds.fd_count; j++) {
-		fd=writesds.fd_array[j];
+	    }
+	    for (j = 0; j < (int) writesds.fd_count; j++) {
+		fd = writesds.fd_array[j];
 #else
 	}
 	fdsp = (fd_mask *) & writefds;
@@ -969,9 +964,9 @@
 		    if (commCheckHTTPIncoming)
 			comm_select_http_incoming();
 #ifndef _SQUID_MSWIN_
-	    }
-#endif
 		}
+#endif
+	    }
 	}
 	if (callicp)
 	    comm_select_icp_incoming();
@@ -982,9 +977,9 @@
 #if DELAY_POOLS
 	while ((fd = commGetSlowFd()) != -1) {
 #ifdef _SQUID_MSWIN_
-		F = &sd_table[fd];
+	    F = &sd_table[fd];
 #else
-		F = &fd_table[fd];
+	    F = &fd_table[fd];
 #endif
 	    debug(5, 6) ("comm_select: slow FD %d selected for reading\n", fd);
 	    if ((hdl = F->read_handler)) {
@@ -1046,8 +1041,7 @@
     zero_tv.tv_sec = 0;
     zero_tv.tv_usec = 0;
     cachemgrRegister("comm_incoming",
-	"comm_incoming() stats",
-	commIncomingStats, 0, 1);
+	"comm_incoming() stats", commIncomingStats, 0, 1);
     FD_ZERO(&global_readfds);
     FD_ZERO(&global_writefds);
     nreadfds = nwritefds = 0;
@@ -1095,13 +1089,9 @@
 	debug(5, 0) ("FD %d: %s\n", fd, xstrerror());
 	debug(5, 0) ("WARNING: FD %d has handlers, but it's invalid.\n", fd);
 	debug(5, 0) ("FD %d is a %s called '%s'\n",
-	    fd,
-	    fdTypeStr[F->type],
-	    F->desc);
+	    fd, fdTypeStr[F->type], F->desc);
 	debug(5, 0) ("tmout:%p read:%p write:%p\n",
-	    F->timeout_handler,
-	    F->read_handler,
-	    F->write_handler);
+	    F->timeout_handler, F->read_handler, F->write_handler);
 	for (ch = F->close_handler; ch; ch = ch->next)
 	    debug(5, 0) (" close handler: %p\n", ch->handler);
 	if (F->close_handler) {
@@ -1127,14 +1117,14 @@
     int fd;
 #ifdef _SQUID_MSWIN_
     sde *F = NULL;
-    int	j;
+    int j;
 #else
     fde *F = NULL;
 #endif
     PF *callback;
 #ifdef _SQUID_MSWIN_
     for (j = 0; j < (int) readsds.fd_count; j++) {
-	fd=readsds.fd_array[j];
+	fd = readsds.fd_array[j];
 	F = &sd_table[fd];
 #else
     for (fd = 0; fd <= Biggest_FD; fd++) {
@@ -1159,7 +1149,7 @@
     }
 #ifdef _SQUID_MSWIN_
     for (j = 0; j < (int) writesds.fd_count; j++) {
-	fd=writesds.fd_array[j];
+	fd = writesds.fd_array[j];
 	F = &sd_table[fd];
 	if (!F->flags.open)
 	    continue;
@@ -1194,21 +1184,27 @@
     storeAppendPrintf(sentry, "\n");
     storeAppendPrintf(sentry, "Histogram of events per incoming socket type\n");
 #ifdef HAVE_POLL
-    storeAppendPrintf(sentry, "ICP Messages handled per comm_poll_icp_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"ICP Messages handled per comm_poll_icp_incoming() call:\n");
 #else
-    storeAppendPrintf(sentry, "ICP Messages handled per comm_select_icp_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"ICP Messages handled per comm_select_icp_incoming() call:\n");
 #endif
     statHistDump(&f->comm_icp_incoming, sentry, statHistIntDumper);
 #ifdef HAVE_POLL
-    storeAppendPrintf(sentry, "DNS Messages handled per comm_poll_dns_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"DNS Messages handled per comm_poll_dns_incoming() call:\n");
 #else
-    storeAppendPrintf(sentry, "DNS Messages handled per comm_select_dns_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"DNS Messages handled per comm_select_dns_incoming() call:\n");
 #endif
     statHistDump(&f->comm_dns_incoming, sentry, statHistIntDumper);
 #ifdef HAVE_POLL
-    storeAppendPrintf(sentry, "HTTP Messages handled per comm_poll_http_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"HTTP Messages handled per comm_poll_http_incoming() call:\n");
 #else
-    storeAppendPrintf(sentry, "HTTP Messages handled per comm_select_http_incoming() call:\n");
+    storeAppendPrintf(sentry,
+	"HTTP Messages handled per comm_select_http_incoming() call:\n");
 #endif
     statHistDump(&f->comm_http_incoming, sentry, statHistIntDumper);
 }
@@ -1262,4 +1258,4 @@
 	nwritefds--;
     }
 }
-#endif COMM_SELECT_C
+#endif /* COMM_SELECT_C */
Index: squid/src/debug.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/debug.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/debug.c	30 Jun 2001 18:42:07 -0000	1.1.1.3.4.1.2.3
+++ squid/src/debug.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: debug.c,v 1.1.1.3.4.1.2.3 2001/06/30 18:42:07 serassio Exp $
+ * $Id: debug.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -40,9 +39,13 @@
 static const char *debugLogTime(time_t);
 static void ctx_print();
 
+#ifdef _SQUID_MSWIN_
+extern LPCRITICAL_SECTION dbg_mutex;
+#endif
+
 #if STDC_HEADERS
 void
-_db_print(const char *format,...)
+_db_print(const char *format, ...)
 {
 #if defined(__QNX__)
     va_list eargs;
@@ -73,12 +76,55 @@
 
     if (debug_log == NULL)
 	return;
+
+#ifdef _SQUID_MSWIN_
+#if !defined(UNLINK_DAEMON) && !defined(PINGER)
+    /* multiple threads may call this simultaneously */
+    if (!dbg_mutex) {
+	HMODULE krnl_lib = LoadLibrary("Kernel32.dll");
+	BOOL(FAR WINAPI *
+	    InitializeCriticalSectionAndSpinCount) (LPCRITICAL_SECTION, DWORD)
+	    = NULL;
+
+	if (krnl_lib)
+	    (FARPROC) InitializeCriticalSectionAndSpinCount =
+		GetProcAddress(krnl_lib,
+		"InitializeCriticalSectionAndSpinCount");
+	dbg_mutex = xcalloc(1, sizeof(CRITICAL_SECTION));
+
+	__try {
+	    if (InitializeCriticalSectionAndSpinCount) {
+		/* let multiprocessor systems EnterCriticalSection() fast */
+		if (!InitializeCriticalSectionAndSpinCount(dbg_mutex, 4000))
+		    RaiseException(STATUS_NO_MEMORY, 0, 0, NULL);
+	    } else
+		InitializeCriticalSection(dbg_mutex);
+	}
+	__except(STATUS_NO_MEMORY ==
+	    GetExceptionCode()? EXCEPTION_EXECUTE_HANDLER :
+	    EXCEPTION_CONTINUE_SEARCH) {
+	    if (debug_log) {
+		fprintf(debug_log,
+		    "FATAL: _db_print: can't initialize critical section\n");
+		fflush(debug_log);
+	    }
+	    fprintf(stderr,
+		"FATAL: _db_print: can't initialize critical section\n");
+	    if (krnl_lib)
+		FreeLibrary(krnl_lib);
+	    abort();
+	}
+	if (krnl_lib)
+	    FreeLibrary(krnl_lib);
+    }
+    EnterCriticalSection(dbg_mutex);
+#endif
+#endif
+
     /* give a chance to context-based debugging to print current context */
     if (!Ctx_Lock)
 	ctx_print();
-    snprintf(f, BUFSIZ, "%s| %s",
-	debugLogTime(squid_curtime),
-	format);
+    snprintf(f, BUFSIZ, "%s| %s", debugLogTime(squid_curtime), format);
 #if HAVE_SYSLOG
     /* level 0,1 go to syslog */
     if (_db_level <= 1 && opt_syslog_enable) {
@@ -103,6 +149,11 @@
 	vfprintf(stderr, f, args);
 #endif
     }
+#ifdef _SQUID_MSWIN_
+#if !defined(UNLINK_DAEMON) && !defined(PINGER)
+    LeaveCriticalSection(dbg_mutex);
+#endif
+#endif
 #if defined(__QNX__)
     va_end(eargs);
 #endif
@@ -216,7 +267,7 @@
 	i--;
 	snprintf(from, MAXPATHLEN, "%s.%d", debug_log_file, i - 1);
 	snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, i);
-	xrename(from, to);
+	rename(from, to);
     }
     /*
      * You can't rename open files on Microsoft "operating systems"
@@ -224,12 +275,12 @@
      */
 #ifdef _SQUID_MSWIN_
     if (debug_log != stderr)
-		fclose(debug_log);
+	fclose(debug_log);
 #endif
     /* Rotate the current log to .0 */
     if (Config.Log.rotateNumber > 0) {
 	snprintf(to, MAXPATHLEN, "%s.%d", debug_log_file, 0);
-	xrename(debug_log_file, to);
+	rename(debug_log_file, to);
     }
     /* Close and reopen the log.  It may have been renamed "manually"
      * before HUP'ing us. */
@@ -353,8 +404,7 @@
 static const char *ctx_get_descr(Ctx ctx);
 
 
-Ctx
-ctx_enter(const char *descr)
+Ctx ctx_enter(const char *descr)
 {
     Ctx_Current_Level++;
 
@@ -362,7 +412,8 @@
 	Ctx_Descrs[Ctx_Current_Level] = descr;
 
     if (Ctx_Current_Level == Ctx_Warn_Level) {
-	debug(0, 0) ("# ctx: suspiciously deep (%d) nesting:\n", Ctx_Warn_Level);
+	debug(0, 0) ("# ctx: suspiciously deep (%d) nesting:\n",
+	    Ctx_Warn_Level);
 	Ctx_Warn_Level *= 2;
     }
     return Ctx_Current_Level;
Index: squid/src/defines.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/defines.h,v
retrieving revision 1.1.1.3.4.2.2.2
retrieving revision 1.1.1.3.4.2.2.2.2.1
diff -u -r1.1.1.3.4.2.2.2 -r1.1.1.3.4.2.2.2.2.1
--- squid/src/defines.h	14 Jun 2001 20:36:15 -0000	1.1.1.3.4.2.2.2
+++ squid/src/defines.h	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.2.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: defines.h,v 1.1.1.3.4.2.2.2 2001/06/14 20:36:15 serassio Exp $
+ * $Id: defines.h,v 1.1.1.3.4.2.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -240,28 +239,18 @@
 /*
  * Max number of ICP messages to receive per call to icpHandleUdp
  */
-#ifdef _SQUID_MSWIN_
-#define INCOMING_ICP_MAX 1
-#else
 #define INCOMING_ICP_MAX 15
-#endif
+
 /*
  * Max number of DNS messages to receive per call to DNS read handler
  */
-#ifdef _SQUID_MSWIN_
-#define INCOMING_DNS_MAX 1
-#else
 #define INCOMING_DNS_MAX 15
-#endif
+
 /*
  * Max number of HTTP connections to accept per call to httpAccept
  * and PER HTTP PORT
  */
-#ifdef _SQUID_MSWIN_
-#define INCOMING_HTTP_MAX 1
-#else
 #define INCOMING_HTTP_MAX 10
-#endif
 #define INCOMING_TOTAL_MAX (INCOMING_ICP_MAX+INCOMING_HTTP_MAX)
 
 /*
@@ -307,13 +296,4 @@
 #define _WIN_SQUID_SERVICE_OPTION		"--ntservice"
 #define _WIN_SQUID_RUN_MODE_INTERACTIVE		0
 #define _WIN_SQUID_RUN_MODE_SERVICE		1
-#ifdef _SQUID_MSWIN_
-#define	SIGHUP	1	/* hangup */
-#define	SIGKILL	9	/* kill (cannot be caught or ignored) */
-#define	SIGBUS	10	/* bus error */
-#define	SIGPIPE	13	/* write on a pipe with no one to read it */
-#define	SIGCHLD	20	/* to parent on child stop or exit */
-#define SIGUSR1 30	/* user defined signal 1 */
-#define SIGUSR2 31	/* user defined signal 2 */
-#endif
 #endif
Index: squid/src/delay_pools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/delay_pools.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/delay_pools.c	6 Jan 2001 12:40:13 -0000	1.1.1.3.4.2.2.1
+++ squid/src/delay_pools.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: delay_pools.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:13 hno Exp $
+ * $Id: delay_pools.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
@@ -38,14 +37,16 @@
 #if DELAY_POOLS
 #include "squid.h"
 
-struct _class1DelayPool {
+struct _class1DelayPool
+{
     int class;
     int aggregate;
 };
 
 #define IND_MAP_SZ 256
 
-struct _class2DelayPool {
+struct _class2DelayPool
+{
     int class;
     int aggregate;
     /* OK: -1 is terminator.  individual[255] is always host 255. */
@@ -59,7 +60,8 @@
 #define NET_MAP_SZ 256
 #define C3_IND_SZ (NET_MAP_SZ*IND_MAP_SZ)
 
-struct _class3DelayPool {
+struct _class3DelayPool
+{
     int class;
     int aggregate;
     /* OK: -1 is terminator.  network[255] is always host 255. */
@@ -80,7 +82,8 @@
 typedef struct _class2DelayPool class2DelayPool;
 typedef struct _class3DelayPool class3DelayPool;
 
-union _delayPool {
+union _delayPool
+{
     class1DelayPool *class1;
     class2DelayPool *class2;
     class3DelayPool *class3;
@@ -304,8 +307,7 @@
     return (pool << 16) | position;
 }
 
-delay_id
-delayClient(request_t * r)
+delay_id delayClient(request_t * r)
 {
     aclCheck_t ch;
     int i;
@@ -320,7 +322,8 @@
     ch.my_port = r->my_port;
     ch.request = r;
     if (r->client_addr.s_addr == INADDR_BROADCAST) {
-	debug(77, 2) ("delayClient: WARNING: Called with 'allones' address, ignoring\n");
+	debug(77, 2)
+	    ("delayClient: WARNING: Called with 'allones' address, ignoring\n");
 	return delayId(0, 0);
     }
     for (pool = 0; pool < Config.Delay.pools; pool++) {
@@ -391,8 +394,10 @@
     position = i << 8;
     if (host == 255) {
 	position |= 255;
-	if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) {
-	    delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8));
+	if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i %
+			8)))) {
+	    delay_data[pool].class3->individual_255_used[i / 8] |=
+		(1 << (i % 8));
 	    assert(position < C3_IND_SZ);
 	    delay_data[pool].class3->individual[position] =
 		(Config.Delay.rates[pool]->individual.max_bytes *
@@ -430,7 +435,7 @@
     if (rates->aggregate.restore_bps != -1 &&
 	(class1->aggregate += rates->aggregate.restore_bps * incr) >
 	rates->aggregate.max_bytes)
-	class1->aggregate = rates->aggregate.max_bytes;
+	    class1->aggregate = rates->aggregate.max_bytes;
 }
 
 static void
@@ -444,7 +449,7 @@
     if (rates->aggregate.restore_bps != -1 &&
 	(class2->aggregate += rates->aggregate.restore_bps * incr) >
 	rates->aggregate.max_bytes)
-	class2->aggregate = rates->aggregate.max_bytes;
+	    class2->aggregate = rates->aggregate.max_bytes;
     if ((restore_bytes = rates->individual.restore_bps) == -1)
 	return;
     restore_bytes *= incr;
@@ -457,8 +462,10 @@
 	if (i != 255 && class2->individual_map[i] == 255)
 	    return;
 	if (class2->individual[i] != rates->individual.max_bytes &&
-	    (class2->individual[i] += restore_bytes) > rates->individual.max_bytes)
-	    class2->individual[i] = rates->individual.max_bytes;
+	    (class2->individual[i] +=
+		restore_bytes) >
+	    rates->individual.max_bytes) class2->individual[i] =
+		rates->individual.max_bytes;
 	if (++i == (IND_MAP_SZ - 1))
 	    return;
     }
@@ -477,7 +484,7 @@
     if (rates->aggregate.restore_bps != -1 &&
 	(class3->aggregate += rates->aggregate.restore_bps * incr) >
 	rates->aggregate.max_bytes)
-	class3->aggregate = rates->aggregate.max_bytes;
+	    class3->aggregate = rates->aggregate.max_bytes;
     /* the following line deliberately uses &, not &&, in an if statement
      * to avoid conditional execution
      */
@@ -486,14 +493,18 @@
 	return;
     individual_restore_bytes *= incr;
     network_restore_bytes *= incr;
-    for (i = 0; i < ((class3->network_255_used) ? NET_MAP_SZ : NET_MAP_SZ - 1); ++i) {
+    for (i = 0; i < ((class3->network_255_used) ? NET_MAP_SZ : NET_MAP_SZ - 1);
+	++i) {
 	assert(i < NET_MAP_SZ);
 	if (i != 255 && class3->network_map[i] == 255)
 	    return;
 	if (individual_restore_bytes != -incr) {
 	    mpos = i << 8;
-	    individual_255_used = class3->individual_255_used[i / 8] & (1 << (i % 8));
-	    for (j = 0; j < ((individual_255_used) ? IND_MAP_SZ : IND_MAP_SZ - 1); ++j, ++mpos) {
+	    individual_255_used =
+		class3->individual_255_used[i / 8] & (1 << (i % 8));
+	    for (j = 0;
+		j < ((individual_255_used) ? IND_MAP_SZ : IND_MAP_SZ - 1);
+		++j, ++mpos) {
 		assert(i < NET_MAP_SZ);
 		assert(j < IND_MAP_SZ);
 		if (j != 255 && class3->individual_map[i][j] == 255)
@@ -502,14 +513,14 @@
 		if (class3->individual[mpos] != rates->individual.max_bytes &&
 		    (class3->individual[mpos] += individual_restore_bytes) >
 		    rates->individual.max_bytes)
-		    class3->individual[mpos] = rates->individual.max_bytes;
+			class3->individual[mpos] = rates->individual.max_bytes;
 	    }
 	}
 	if (network_restore_bytes != -incr &&
 	    class3->network[i] != rates->network.max_bytes &&
 	    (class3->network[i] += network_restore_bytes) >
 	    rates->network.max_bytes)
-	    class3->network[i] = rates->network.max_bytes;
+		class3->network[i] = rates->network.max_bytes;
     }
 }
 
@@ -531,13 +542,16 @@
 	    continue;
 	switch (class) {
 	case 1:
-	    delayUpdateClass1(delay_data[i].class1, Config.Delay.rates[i], incr);
+	    delayUpdateClass1(delay_data[i].class1, Config.Delay.rates[i],
+		incr);
 	    break;
 	case 2:
-	    delayUpdateClass2(delay_data[i].class2, Config.Delay.rates[i], incr);
+	    delayUpdateClass2(delay_data[i].class2, Config.Delay.rates[i],
+		incr);
 	    break;
 	case 3:
-	    delayUpdateClass3(delay_data[i].class3, Config.Delay.rates[i], incr);
+	    delayUpdateClass3(delay_data[i].class3, Config.Delay.rates[i],
+		incr);
 	    break;
 	default:
 	    assert(0);
@@ -570,16 +584,19 @@
 	if (Config.Delay.rates[pool]->aggregate.restore_bps != -1)
 	    nbytes = XMIN(nbytes, delay_data[pool].class2->aggregate);
 	if (Config.Delay.rates[pool]->individual.restore_bps != -1)
-	    nbytes = XMIN(nbytes, delay_data[pool].class2->individual[position]);
+	    nbytes =
+		XMIN(nbytes, delay_data[pool].class2->individual[position]);
 	break;
 
     case 3:
 	if (Config.Delay.rates[pool]->aggregate.restore_bps != -1)
 	    nbytes = XMIN(nbytes, delay_data[pool].class3->aggregate);
 	if (Config.Delay.rates[pool]->individual.restore_bps != -1)
-	    nbytes = XMIN(nbytes, delay_data[pool].class3->individual[position]);
+	    nbytes =
+		XMIN(nbytes, delay_data[pool].class3->individual[position]);
 	if (Config.Delay.rates[pool]->network.restore_bps != -1)
-	    nbytes = XMIN(nbytes, delay_data[pool].class3->network[position >> 8]);
+	    nbytes =
+		XMIN(nbytes, delay_data[pool].class3->network[position >> 8]);
 	break;
 
     default:
@@ -640,8 +657,7 @@
     return found ? i : max;
 }
 
-delay_id
-delayMostBytesAllowed(const MemObject * mem)
+delay_id delayMostBytesAllowed(const MemObject * mem)
 {
     int j;
     int jmax = -1;
@@ -774,7 +790,8 @@
     for (i = 0; i < NET_MAP_SZ; i++) {
 	if (class3->network_map[i] == 255)
 	    break;
-	storeAppendPrintf(sentry, "\t\tCurrent [Network %d]: ", class3->network_map[i]);
+	storeAppendPrintf(sentry, "\t\tCurrent [Network %d]: ",
+	    class3->network_map[i]);
 	shown = 1;
 	for (j = 0; j < IND_MAP_SZ; j++) {
 	    if (class3->individual_map[i][j] == 255)
@@ -783,7 +800,8 @@
 		class3->individual[(i << 8) | j]);
 	}
 	if (class3->individual_255_used[i / 8] & (1 << (i % 8))) {
-	    storeAppendPrintf(sentry, "%d:%d ", 255, class3->individual[(i << 8) | 255]);
+	    storeAppendPrintf(sentry, "%d:%d ", 255,
+		class3->individual[(i << 8) | 255]);
 	}
 	storeAppendPrintf(sentry, "\n");
     }
@@ -797,12 +815,14 @@
 		class3->individual[(255 << 8) | j]);
 	}
 	if (class3->individual_255_used[255 / 8] & (1 << (255 % 8))) {
-	    storeAppendPrintf(sentry, "%d:%d ", 255, class3->individual[(255 << 8) | 255]);
+	    storeAppendPrintf(sentry, "%d:%d ", 255,
+		class3->individual[(255 << 8) | 255]);
 	}
 	storeAppendPrintf(sentry, "\n");
     }
     if (!shown)
-	storeAppendPrintf(sentry, "\t\tCurrent [All networks]: Not used yet.\n");
+	storeAppendPrintf(sentry,
+	    "\t\tCurrent [All networks]: Not used yet.\n");
     storeAppendPrintf(sentry, "\n");
 }
 
@@ -811,7 +831,8 @@
 {
     unsigned short i;
 
-    storeAppendPrintf(sentry, "Delay pools configured: %d\n\n", Config.Delay.pools);
+    storeAppendPrintf(sentry, "Delay pools configured: %d\n\n",
+	Config.Delay.pools);
     for (i = 0; i < Config.Delay.pools; i++) {
 	switch (Config.Delay.class[i]) {
 	case 0:
Index: squid/src/disk.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/disk.c,v
retrieving revision 1.1.1.3.4.1.2.6
retrieving revision 1.1.1.3.4.1.2.6.2.1
diff -u -r1.1.1.3.4.1.2.6 -r1.1.1.3.4.1.2.6.2.1
--- squid/src/disk.c	28 Jul 2001 10:18:13 -0000	1.1.1.3.4.1.2.6
+++ squid/src/disk.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.6.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: disk.c,v 1.1.1.3.4.1.2.6 2001/07/28 10:18:13 serassio Exp $
+ * $Id: disk.c,v 1.1.1.3.4.1.2.6.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -60,25 +59,24 @@
 file_open(const char *path, int mode)
 {
     int fd;
-#ifdef _SQUID_MSWIN_ 
-	char fmode[4]="";
-	FILE * fbuf;
+#ifdef _SQUID_MSWIN_
+    char fmode[4] = "";
+    FILE *fbuf;
 #endif
 
     if (mode & O_WRONLY)
 	mode |= O_APPEND;
-#ifdef _SQUID_MSWIN_ 
+#ifdef _SQUID_MSWIN_
     mode |= _O_BINARY;
     errno = 0;
     if (mode & O_WRONLY) {
 	if (mode & O_TRUNC)
-	    strcpy(fmode,"wb");
+	    strcpy(fmode, "wb");
 	else
-    	    strcpy(fmode,"a+b");
-	}
-	else
-	    strcpy(fmode,"rb");
-	fbuf=fopen(path,fmode);
+	    strcpy(fmode, "a+b");
+    } else
+	strcpy(fmode, "rb");
+    fbuf = fopen(path, fmode);
     fd = (fbuf != NULL) ? fileno(fbuf) : -1;
 #else
     mode |= SQUID_NONBLOCK;
@@ -91,8 +89,8 @@
 	    xstrerror());
 	fd = DISK_ERROR;
     } else {
-#ifdef _SQUID_MSWIN_ 
-	fd_table[fd].fbuf=fbuf;
+#ifdef _SQUID_MSWIN_
+	fd_table[fd].fbuf = fbuf;
 #endif
 	debug(6, 5) ("file_open: FD %d\n", fd);
 	commSetCloseOnExec(fd);
@@ -141,9 +139,11 @@
     fsync(fd);
 #endif
 #ifdef _SQUID_MSWIN_
-    fbuf=fd_table[fd].fbuf;
-    if (fbuf==NULL) close(fd);
-	else fclose(fbuf);
+    fbuf = fd_table[fd].fbuf;
+    if (fbuf == NULL)
+	close(fd);
+    else
+	fclose(fbuf);
 #else
     close(fd);
 #endif
@@ -220,8 +220,8 @@
 	fd, (int) (fdd->write_q->len - fdd->write_q->buf_offset));
     errno = 0;
 #ifdef _SQUID_MSWIN_
-    len = fwrite(fdd->write_q->buf + fdd->write_q->buf_offset,1,
-	fdd->write_q->len - fdd->write_q->buf_offset,fd_table[fd].fbuf);
+    len = fwrite(fdd->write_q->buf + fdd->write_q->buf_offset, 1,
+	fdd->write_q->len - fdd->write_q->buf_offset, fd_table[fd].fbuf);
 #else
     len = write(fd,
 	fdd->write_q->buf + fdd->write_q->buf_offset,
@@ -268,7 +268,10 @@
 	/* q might become NULL from write failure above */
 	q->buf_offset += len;
 	if (q->buf_offset > q->len)
-	    debug(50, 1) ("diskHandleWriteComplete: q->buf_offset > q->len (%p,%d, %d, %d FD %d)\n",
+	    debug(50, 1)
+
+		
+		("diskHandleWriteComplete: q->buf_offset > q->len (%p,%d, %d, %d FD %d)\n",
 		q, (int) q->buf_offset, q->len, len, fd);
 	assert(q->buf_offset <= q->len);
 	if (q->buf_offset == q->len) {
@@ -320,10 +323,7 @@
 file_write(int fd,
     off_t file_offset,
     void *ptr_to_buf,
-    int len,
-    DWCB * handle,
-    void *handle_data,
-    FREE * free_func)
+    int len, DWCB * handle, void *handle_data, FREE * free_func)
 {
     dwrite_q *wq = NULL;
     fde *F = &fd_table[fd];
@@ -358,9 +358,11 @@
  * in a snap
  */
 void
-file_write_mbuf(int fd, off_t off, MemBuf mb, DWCB * handler, void *handler_data)
+file_write_mbuf(int fd, off_t off, MemBuf mb, DWCB * handler,
+    void *handler_data)
 {
-    file_write(fd, off, mb.buf, mb.size, handler, handler_data, memBufFreeFunc(&mb));
+    file_write(fd, off, mb.buf, mb.size, handler, handler_data,
+	memBufFreeFunc(&mb));
 }
 
 /* Read from FD */
@@ -419,7 +421,8 @@
  * It must have at least req_len space in there. 
  * call handler when a reading is complete. */
 void
-file_read(int fd, char *buf, int req_len, off_t offset, DRCB * handler, void *client_data)
+file_read(int fd, char *buf, int req_len, off_t offset, DRCB * handler,
+    void *client_data)
 {
     dread_ctrl *ctrl_dat;
     assert(fd >= 0);
@@ -434,26 +437,3 @@
     cbdataLock(client_data);
     diskHandleRead(fd, ctrl_dat);
 }
-
-#ifdef _SQUID_MSWIN_
-int
-ignoreErrno(int ierrno)
-{
-    switch (ierrno) {
-    case EINPROGRESS:
-    case EWOULDBLOCK:
-#if EAGAIN != EWOULDBLOCK
-    case EAGAIN:
-#endif
-    case EALREADY:
-    case EINTR:
-#ifdef ERESTART
-    case ERESTART:
-#endif
-	return 1;
-    default:
-	return 0;
-    }
-    /* NOTREACHED */
-}
-#endif
Index: squid/src/dns.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/dns.c	14 Jun 2001 21:34:24 -0000	1.1.1.3.4.1.2.2
+++ squid/src/dns.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: dns.c,v 1.1.1.3.4.1.2.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: dns.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -35,40 +34,14 @@
 
 #include "squid.h"
 
-#ifdef _SQUID_MSWIN_
-typedef int ( * PFDNSLookup)(const char *, void *, HLPCB);
-typedef int ( * PFInit)();
-
-typedef struct {
-	HINSTANCE hnd;
-	PFDNSLookup DNSLookup;
-	PFInit Init;
-	struct {
-		int requests;
-		int replies;
-		int queue_size;
-		int avg_svc_time;
-	} stats;
-} DNSPlugin;
-
-static DNSPlugin *dnsservers = NULL;
-#else
 static helper *dnsservers = NULL;
-#endif
 #if USE_DNSSERVERS
 
 static void
 dnsStats(StoreEntry * sentry)
 {
     storeAppendPrintf(sentry, "Dnsserver Statistics:\n");
-#ifdef _SQUID_MSWIN_
-    storeAppendPrintf(sentry, "requests sent: %d\n",
-	dnsservers->stats.requests);
-    storeAppendPrintf(sentry, "replies received: %d\n",
-	dnsservers->stats.replies);
-#else
     helperStats(sentry, dnsservers);
-#endif
 }
 
 #endif
@@ -78,44 +51,10 @@
 {
 #if USE_DNSSERVERS
     static int init = 0;
-#ifndef _SQUID_MSWIN_
     wordlist *w;
-#endif
 
     if (!Config.Program.dnsserver)
 	return;
-#ifdef _SQUID_MSWIN_
-    if (dnsservers == NULL)
-	dnsservers = xmalloc(sizeof(DNSPlugin));
-    debug(34, 0) ("dnsInit: Loading %s\n", Config.Program.dnsserver);
-    dnsservers->hnd = LoadLibrary(Config.Program.dnsserver);
-    if (dnsservers->hnd == NULL) {
-	debug(34, 0) ("dnsInit: Unable to load %s\n", Config.Program.dnsserver);
-	xfree(dnsservers);
-	Config.Program.dnsserver = 0;
-	return;
-    }
-    dnsservers->DNSLookup = (PFDNSLookup)GetProcAddress(dnsservers->hnd,"DNSLookup");
-    if (dnsservers->DNSLookup == NULL) {
-	debug(34, 0) ("dnsInit: Invalid DNS plugin %s\n", Config.Program.dnsserver);
-	FreeLibrary(dnsservers->hnd);
-	xfree(dnsservers);
-	Config.Program.dnsserver = NULL;
-	return;
-    }
-    dnsservers->Init = (PFInit)GetProcAddress(dnsservers->hnd,"Init");
-    if (dnsservers->Init == NULL) {
-	debug(34, 0) ("dnsInit: Invalid DNS plugin %s\n", Config.Program.dnsserver);
-		FreeLibrary(dnsservers->hnd);
-		xfree(dnsservers);
-		Config.Program.dnsserver = NULL;
-		return;
-	}
-    debug(34, 0) ("dnsInit: Initializing DNS plugin\n");
-    dnsservers->Init();		
-    dnsservers->stats.requests=0;
-    dnsservers->stats.replies=0;
-#else
     if (dnsservers == NULL)
 	dnsservers = helperCreate("dnsserver");
     dnsservers->n_to_start = Config.dnsChildren;
@@ -129,11 +68,8 @@
 	wordlistAdd(&dnsservers->cmdline, w->key);
     }
     helperOpenServers(dnsservers);
-#endif
     if (!init) {
-	cachemgrRegister("dns",
-	    "Dnsserver Statistics",
-	    dnsStats, 0, 1);
+	cachemgrRegister("dns", "Dnsserver Statistics", dnsStats, 0, 1);
 	init = 1;
     }
 #endif
@@ -144,31 +80,20 @@
 {
     if (!dnsservers)
 	return;
-#ifdef _SQUID_MSWIN_
-    FreeLibrary(dnsservers->hnd);
-    xfree(dnsservers);
-#else
     helperShutdown(dnsservers);
     wordlistDestroy(&dnsservers->cmdline);
     if (!shutting_down)
 	return;
     helperFree(dnsservers);
-#endif
     dnsservers = NULL;
 }
 
 void
 dnsSubmit(const char *lookup, HLPCB * callback, void *data)
 {
-#ifdef _SQUID_MSWIN_
-	dnsservers->stats.requests++;
-	dnsservers->DNSLookup(lookup, data, callback);
-	dnsservers->stats.replies++;
-#else
     char buf[256];
     snprintf(buf, 256, "%s\n", lookup);
     helperSubmit(dnsservers, buf, callback, data);
-#endif
 }
 
 #ifdef SQUID_SNMP
@@ -179,25 +104,23 @@
 snmp_netDnsFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netDnsFn: Processing request:\n",
+	Var->name[LEN_SQ_NET + 1]);
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
 #if USE_DNSSERVERS
     switch (Var->name[LEN_SQ_NET + 1]) {
     case DNS_REQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    dnsservers->stats.requests,
-	    SMI_COUNTER32);
+	    dnsservers->stats.requests, SMI_COUNTER32);
 	break;
     case DNS_REP:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    dnsservers->stats.replies,
-	    SMI_COUNTER32);
+	    dnsservers->stats.replies, SMI_COUNTER32);
 	break;
     case DNS_SERVERS:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    dnsservers->n_running,
-	    SMI_COUNTER32);
+	    dnsservers->n_running, SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
@@ -205,8 +128,7 @@
     }
 #else
     Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	0,
-	SMI_COUNTER32);
+	0, SMI_COUNTER32);
 #endif
     return Answer;
 }
Index: squid/src/dns_internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v
retrieving revision 1.1.1.1.4.6.2.3
retrieving revision 1.1.1.1.4.6.2.3.2.1
diff -u -r1.1.1.1.4.6.2.3 -r1.1.1.1.4.6.2.3.2.1
--- squid/src/dns_internal.c	29 Jul 2001 09:10:28 -0000	1.1.1.1.4.6.2.3
+++ squid/src/dns_internal.c	27 Aug 2001 21:48:20 -0000	1.1.1.1.4.6.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: dns_internal.c,v 1.1.1.1.4.6.2.3 2001/07/29 09:10:28 serassio Exp $
+ * $Id: dns_internal.c,v 1.1.1.1.4.6.2.3.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -58,7 +57,8 @@
 typedef struct _idns_query idns_query;
 typedef struct _ns ns;
 
-struct _idns_query {
+struct _idns_query
+{
     char buf[512];
     size_t sz;
     unsigned short id;
@@ -71,7 +71,8 @@
     int attempt;
 };
 
-struct _ns {
+struct _ns
+{
     struct sockaddr_in S;
     int nqueries;
     int nreplies;
@@ -105,7 +106,11 @@
 {
     struct in_addr A;
     if (!safe_inet_addr(buf, &A)) {
-	debug(78, 0) ("WARNING: rejecting '%s' as a name server, because it is not a numeric IP address\n", buf);
+	debug(78, 0)
+
+	    
+	    ("WARNING: rejecting '%s' as a name server, because it is not a numeric IP address\n",
+	    buf);
 	return;
     }
     if (nns == nns_alloc) {
@@ -340,8 +345,7 @@
     for (i = 0; i < nns; i++) {
 	storeAppendPrintf(sentry, "%-15s %9d %9d\n",
 	    inet_ntoa(nameservers[i].S.sin_addr),
-	    nameservers[i].nqueries,
-	    nameservers[i].nreplies);
+	    nameservers[i].nqueries, nameservers[i].nreplies);
     }
     storeAppendPrintf(sentry, "\nRcode Matrix:\n");
     storeAppendPrintf(sentry, "RCODE");
@@ -382,17 +386,10 @@
     assert(q->lru.prev == NULL);
     ns = q->nsends % nns;
     x = comm_udp_sendto(DnsSocket,
-	&nameservers[ns].S,
-	sizeof(nameservers[ns].S),
-	q->buf,
-	q->sz);
+	&nameservers[ns].S, sizeof(nameservers[ns].S), q->buf, q->sz);
     if (x < 0) {
 	debug(50, 1) ("idnsSendQuery: FD %d: sendto: %s\n",
-#ifdef _SQUID_MSWIN_
-	    DnsSocket, wsastrerror(errno));
-#else
 	    DnsSocket, xstrerror());
-#endif
     } else {
 	fd_bytes(DnsSocket, x, FD_WRITE);
 	commSetSelect(DnsSocket, COMM_SELECT_READ, idnsRead, NULL, 0);
@@ -439,10 +436,7 @@
     rfc1035_rr *answers = NULL;
     unsigned short rid = 0xFFFF;
     idns_query *q;
-    n = rfc1035AnswersUnpack(buf,
-	sz,
-	&answers,
-	&rid);
+    n = rfc1035AnswersUnpack(buf, sz, &answers, &rid);
     debug(78, 3) ("idnsGrokReply: ID %#hx, %d answers\n", rid, n);
     if (rid == 0xFFFF) {
 	debug(78, 1) ("idnsGrokReply: Unknown error\n");
@@ -508,19 +502,13 @@
 	    if (errno != ECONNREFUSED && errno != EHOSTUNREACH)
 #endif
 		debug(50, 1) ("idnsRead: FD %d recvfrom: %s\n",
-#ifdef _SQUID_MSWIN_
-		    fd, wsastrerror(WSAGetLastError()));
-#else
 		    fd, xstrerror());
-#endif
 	    break;
 	}
 	fd_bytes(DnsSocket, len, FD_READ);
 	(*N)++;
 	debug(78, 3) ("idnsRead: FD %d: received %d bytes from %s.\n",
-	    fd,
-	    len,
-	    inet_ntoa(from.sin_addr));
+	    fd, len, inet_ntoa(from.sin_addr));
 	ns = idnsFromKnownNameserver(&from);
 	if (ns >= 0) {
 	    nameservers[ns].nreplies++;
@@ -550,17 +538,18 @@
 	q = n->data;
 	if (tvSubDsec(q->sent_t, current_time) < 5.0)
 	    break;
-	debug(78, 3) ("idnsCheckQueue: ID %#04x timeout\n",
-	    q->id);
+	debug(78, 3) ("idnsCheckQueue: ID %#04x timeout\n", q->id);
 	p = n->prev;
 	dlinkDelete(&q->lru, &lru_list);
 	if (q->nsends < IDNS_MAX_TRIES) {
 	    idnsSendQuery(q);
 	} else {
 	    int v = cbdataValid(q->callback_data);
-	    debug(78, 1) ("idnsCheckQueue: ID %x: giving up after %d tries and %5.1f seconds\n",
-		(int) q->id, q->nsends,
-		tvSubDsec(q->start_t, current_time));
+	    debug(78, 1)
+
+		
+		("idnsCheckQueue: ID %x: giving up after %d tries and %5.1f seconds\n",
+		(int) q->id, q->nsends, tvSubDsec(q->start_t, current_time));
 	    cbdataUnlock(q->callback_data);
 	    if (v)
 		q->callback(q->callback_data, NULL, 0);
@@ -592,31 +581,21 @@
 {
     static int init = 0;
     if (DnsSocket < 0) {
-	DnsSocket = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
-#else
-	    0,
-#endif
-	    Config.Addrs.udp_outgoing,
-	    0,
-	    COMM_NONBLOCKING,
-	    "DNS Socket");
+	DnsSocket = comm_open(SOCK_DGRAM, 0,
+	    Config.Addrs.udp_outgoing, 0, COMM_NONBLOCKING, "DNS Socket");
 	if (DnsSocket < 0)
 	    fatal("Could not create a DNS socket");
 	debug(78, 1) ("DNS Socket created on FD %d\n", DnsSocket);
     }
     assert(0 == nns);
     idnsParseNameservers();
-#ifndef _SQUID_MSWIN_
-    if (0 == nns)
-	idnsParseResolvConf();
-#endif
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
     if (0 == nns)
 	idnsParseWIN32Registry();
 #endif
     if (0 == nns)
+	idnsParseResolvConf();
+    if (0 == nns)
 	fatal("Could not find any nameservers.\n"
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
 	    "       Please check your TCP-IP settings or /etc/resolv.conf file\n"
@@ -626,9 +605,7 @@
 	    "       or use the 'dns_nameservers' option in squid.conf.");
     if (!init) {
 	memDataInit(MEM_IDNS_QUERY, "idns_query", sizeof(idns_query), 0);
-	cachemgrRegister("idns",
-	    "Internal DNS Statistics",
-	    idnsStats, 0, 1);
+	cachemgrRegister("idns", "Internal DNS Statistics", idnsStats, 0, 1);
 	memset(RcodeMatrix, '\0', sizeof(RcodeMatrix));
 	init++;
     }
@@ -675,4 +652,4 @@
 }
 
 #endif /* !USE_DNSSERVERS */
-#endif /* !DNS_INTERNAL_C */
\ No newline at end of file
+#endif /* !DNS_INTERNAL_C */
Index: squid/src/dnsserver.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dnsserver.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/dnsserver.c	14 Jun 2001 21:34:24 -0000	1.1.1.3.4.1.2.3
+++ squid/src/dnsserver.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: dnsserver.c,v 1.1.1.3.4.1.2.3 2001/06/14 21:34:24 serassio Exp $
+ * $Id: dnsserver.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -139,11 +138,9 @@
 #include "util.h"
 #include "snprintf.h"
 
-#if !defined(_SQUID_AIX_)
-#if !defined(_SQUID_MSWIN_)
+#if !defined(_SQUID_AIX_) && !defined(_SQUID_MSWIN_)
 extern int h_errno;
 #endif
-#endif
 
 #if LIBRESOLV_DNS_TTL_HACK
 extern int _dns_ttl_;		/* this is a really *dirty* hack - bne */
@@ -161,8 +158,7 @@
 static struct in_addr no_addr;
 
 #ifdef _SQUID_OS2_
-struct state _res =
-{0};				/* it's not in any of the libraries */
+struct state _res = { 0 };	/* it's not in any of the libraries */
 #endif
 
 /* error messages from gethostbyname() */
@@ -183,20 +179,9 @@
 
 #define REQ_SZ 512
 
-#ifdef _SQUID_MSWIN_
-
-typedef void HLPCB(void *, char *buf);
-
-__declspec (dllexport) int
-DNSLookup(const char *buf, void *data, HLPCB callback)
-{
-static char reply[20*sizeof(buf)],tail[20*sizeof(buf)];
-int charcount;
-#else
 static void
 lookup(const char *buf)
 {
-#endif
     const struct hostent *result = NULL;
     int reverse = 0;
     int ttl = 0;
@@ -204,19 +189,11 @@
     int i;
     struct in_addr addr;
 
-#ifndef _SQUID_MSWIN_
     if (0 == strcmp(buf, "$shutdown"))
 	exit(0);
-#endif
     if (0 == strcmp(buf, "$hello")) {
-#ifdef _SQUID_MSWIN_
-	snprintf(reply,sizeof(reply),"$alive\n");
-	(callback)(data,reply);
-	return 0;
-#else
 	printf("$alive\n");
-    return;
-#endif
+	return;
     }
     /* check if it's already an IP address in text form. */
     for (;;) {
@@ -232,34 +209,16 @@
 	    break;
 	if (++retry == 3)
 	    break;
-#ifdef _SQUID_MSWIN_
-	Sleep(1000);
-#else
 	sleep(1);
-#endif
     }
     if (NULL == result) {
 	if (h_errno == TRY_AGAIN) {
-#ifdef _SQUID_MSWIN_
-	    snprintf(reply,sizeof(reply),"$fail Name Server for domain '%s' is unavailable.\n", buf);
-#else
 	    printf("$fail Name Server for domain '%s' is unavailable.\n", buf);
-#endif
 	} else {
-#ifdef _SQUID_MSWIN_
-	    snprintf(reply,sizeof(reply),"$fail DNS Domain '%s' is invalid: %s.\n",
-#else
 	    printf("$fail DNS Domain '%s' is invalid: %s.\n",
-#endif
 		buf, my_h_msgs(h_errno));
 	}
-#ifdef _SQUID_MSWIN_
-
-	(callback)(data,reply);
-	return 0;
-#else
 	return;
-#endif
     }
 #if LIBRESOLV_DNS_TTL_HACK
     /* DNS TTL handling - bne@CareNet.hu
@@ -269,39 +228,19 @@
 	ttl = _dns_ttl_;
 #endif
     if (reverse) {
-#ifdef _SQUID_MSWIN_
-	snprintf(reply,sizeof(reply),"$name %d %s\n", ttl, result->h_name);
-	(callback)(data,reply);
-	return 0;
-    }
-    snprintf(reply,sizeof(reply),"$addr %d", ttl);
-#else
 	printf("$name %d %s\n", ttl, result->h_name);
 	return;
     }
     printf("$addr %d", ttl);
-#endif
     for (i = 0; NULL != result->h_addr_list[i]; i++) {
 	if (32 == i)
 	    break;
 	xmemcpy(&addr, result->h_addr_list[i], sizeof(addr));
-#ifdef _SQUID_MSWIN_
-	snprintf(tail,sizeof(tail)," %s", inet_ntoa(addr));
-	strcat(reply,tail);
-	(callback)(data,reply);
-	return 0;
-    }
-    snprintf(reply,sizeof(reply),"\n");
-    (callback)(data,reply);
-    return 0;
-#else
 	printf(" %s", inet_ntoa(addr));
     }
     printf("\n");
-#endif
 }
 
-#ifndef _SQUID_MSWIN_
 static void
 usage(void)
 {
@@ -393,6 +332,14 @@
 	}
     }
 
+#ifdef _SQUID_MSWIN_
+    {
+	WSADATA wsaData;
+
+	WSAStartup(2, &wsaData);
+    }
+#endif
+    fflush(stderr);
     for (;;) {
 	memset(request, '\0', REQ_SZ);
 	if (fgets(request, REQ_SZ, stdin) == NULL)
@@ -409,37 +356,3 @@
     /* NOTREACHED */
     return 0;
 }
-
-#else
-
-__declspec (dllexport) int Init()
-{
-    safe_inet_addr("255.255.255.255", &no_addr);
-	return 0;
-}
-
-BOOL APIENTRY
-DllMain (
-	 HINSTANCE hInst /* Library instance handle. */ ,
-	 DWORD reason /* Reason this function is being called. */ ,
-	 LPVOID reserved /* Not used. */ )
-{
-
-	switch (reason)
-    {
-    	case DLL_PROCESS_ATTACH:
-    	  	break;
-
-		case DLL_PROCESS_DETACH:
-			break;
-
-    	case DLL_THREAD_ATTACH:
-      		break;
-
-		case DLL_THREAD_DETACH:
-      		break;
-    }
-  	return TRUE;
-}
-
-#endif
\ No newline at end of file
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/enums.h,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/enums.h	6 Jan 2001 12:40:13 -0000	1.1.1.3.4.2.2.1
+++ squid/src/enums.h	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: enums.h,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:13 hno Exp $
+ * $Id: enums.h,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
Index: squid/src/errorpage.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/errorpage.c,v
retrieving revision 1.1.1.3.4.3.2.2
retrieving revision 1.1.1.3.4.3.2.2.2.1
diff -u -r1.1.1.3.4.3.2.2 -r1.1.1.3.4.3.2.2.2.1
--- squid/src/errorpage.c	29 Jul 2001 09:10:28 -0000	1.1.1.3.4.3.2.2
+++ squid/src/errorpage.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.3.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: errorpage.c,v 1.1.1.3.4.3.2.2 2001/07/29 09:10:28 serassio Exp $
+ * $Id: errorpage.c,v 1.1.1.3.4.3.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -45,10 +44,12 @@
 
 /* local types */
 
-typedef struct {
+typedef struct
+{
     int id;
     char *page_name;
-} ErrorDynamicPageInfo;
+}
+ErrorDynamicPageInfo;
 
 /* local constant and vars */
 
@@ -58,32 +59,35 @@
  * note: hard coded error messages are not appended with %S automagically
  * to give you more control on the format
  */
-static const struct {
+static const struct
+{
     int type;			/* and page_id */
     const char *text;
-} error_hard_text[] = {
+}
+error_hard_text[] =
+{
 
     {
 	ERR_SQUID_SIGNATURE,
 	    "\n<br clear=\"all\">\n"
 	    "<hr noshade size=1>\n"
-	    "Generated %T by %h (%s)\n"
-	    "</BODY></HTML>\n"
-    }
+	    "Generated %T by %h (%s)\n" "</BODY></HTML>\n"}
 };
 
 static Stack ErrorDynamicPages;
 
 /* local prototypes */
 
-static const int error_hard_text_count = sizeof(error_hard_text) / sizeof(*error_hard_text);
+static const int error_hard_text_count =
+    sizeof(error_hard_text) / sizeof(*error_hard_text);
 static char **error_text = NULL;
 static int error_page_count = 0;
 
 static char *errorTryLoadText(const char *page_name, const char *dir);
 static char *errorLoadText(const char *page_name);
 static const char *errorFindHardText(err_type type);
-static ErrorDynamicPageInfo *errorDynamicPageInfoCreate(int id, const char *page_name);
+static ErrorDynamicPageInfo *errorDynamicPageInfoCreate(int id,
+    const char *page_name);
 static void errorDynamicPageInfoDestroy(ErrorDynamicPageInfo * info);
 static MemBuf errorBuildContent(ErrorState * err);
 static const char *errorConvert(char token, ErrorState * err);
@@ -212,7 +216,8 @@
 errorReservePageId(const char *page_name)
 {
     ErrorDynamicPageInfo *info =
-    errorDynamicPageInfoCreate(ERR_MAX + ErrorDynamicPages.count, page_name);
+	errorDynamicPageInfoCreate(ERR_MAX + ErrorDynamicPages.count,
+	page_name);
     stackPush(&ErrorDynamicPages, info);
     return info->id;
 }
@@ -220,11 +225,11 @@
 static const char *
 errorPageName(int pageId)
 {
-    if (pageId >= ERR_NONE && pageId < ERR_MAX)		/* common case */
+    if (pageId >= ERR_NONE && pageId < ERR_MAX)	/* common case */
 	return err_type_str[pageId];
     if (pageId >= ERR_MAX && pageId - ERR_MAX < ErrorDynamicPages.count)
-	return ((ErrorDynamicPageInfo *) ErrorDynamicPages.
-	    items[pageId - ERR_MAX])->page_name;
+	return ((ErrorDynamicPageInfo *) ErrorDynamicPages.items[pageId -
+		ERR_MAX])->page_name;
     return "ERR_UNKNOWN";	/* should not happen */
 }
 
@@ -356,7 +361,8 @@
  *            closeing the FD, otherwise we do it ourseves.
  */
 static void
-errorSendComplete(int fd, char *bufnotused, size_t size, int errflag, void *data)
+errorSendComplete(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     ErrorState *err = data;
     debug(4, 3) ("errorSendComplete: FD %d, size=%d\n", fd, size);
@@ -440,11 +446,7 @@
 	break;
     case 'E':
 	if (err->xerrno)
-#ifdef _SQUID_MSWIN_
-	    memBufPrintf(&mb, "%s", wsastrerror(err->xerrno));
-#else
 	    memBufPrintf(&mb, "(%d) %s", err->xerrno, strerror(err->xerrno));
-#endif
 	else
 	    memBufPrintf(&mb, "[No Error]");
 	break;
@@ -579,7 +581,8 @@
     HttpReply *rep = httpReplyCreate();
     MemBuf content = errorBuildContent(err);
     /* no LMT for error pages; error pages expire immediately */
-    httpReplySetHeaders(rep, 1.0, err->http_status, NULL, "text/html", content.size, 0, squid_curtime);
+    httpReplySetHeaders(rep, 1.0, err->http_status, NULL, "text/html",
+	content.size, 0, squid_curtime);
     /*
      * include some information for downstream caches. Implicit
      * replaceable content. This isn't quite sufficient. xerrno is not
Index: squid/src/event.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/event.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/event.c	6 Jan 2001 12:40:13 -0000	1.1.1.3.4.1.2.1
+++ squid/src/event.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: event.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:13 hno Exp $
+ * $Id: event.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 41    Event Processing
  * AUTHOR: Henrik Nordstrom
@@ -36,7 +35,8 @@
 #include "squid.h"
 
 /* The list of event processes */
-struct ev_entry {
+struct ev_entry
+{
     EVH *func;
     void *arg;
     const char *name;
@@ -76,7 +76,8 @@
 
 /* same as eventAdd but adds a random offset within +-1/3 of delta_ish */
 void
-eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int weight)
+eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish,
+    int weight)
 {
     if (delta_ish >= 3.0) {
 	const double two_third = (2.0 * delta_ish) / 3.0;
@@ -150,8 +151,7 @@
     }
 }
 
-time_t
-eventNextTime(void)
+time_t eventNextTime(void)
 {
     if (!tasks)
 	return (time_t) 10;
@@ -162,9 +162,7 @@
 eventInit(void)
 {
     memDataInit(MEM_EVENT, "event", sizeof(struct ev_entry), 0);
-    cachemgrRegister("events",
-	"Event Queue",
-	eventDump, 0, 1);
+    cachemgrRegister("events", "Event Queue", eventDump, 0, 1);
 }
 
 static void
@@ -174,10 +172,7 @@
     if (last_event_ran)
 	storeAppendPrintf(sentry, "Last event to run: %s\n\n", last_event_ran);
     storeAppendPrintf(sentry, "%s\t%s\t%s\t%s\n",
-	"Operation",
-	"Next Execution",
-	"Weight",
-	"Callback Valid?");
+	"Operation", "Next Execution", "Weight", "Callback Valid?");
     while (e != NULL) {
 	storeAppendPrintf(sentry, "%s\t%f seconds\t%d\t%s\n",
 	    e->name, e->when - current_dtime, e->weight,
Index: squid/src/fd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fd.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/fd.c	29 Jul 2001 09:10:28 -0000	1.1.1.3.4.1.2.2
+++ squid/src/fd.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: fd.c,v 1.1.1.3.4.1.2.2 2001/07/29 09:10:28 serassio Exp $
+ * $Id: fd.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 51    Filedescriptor Functions
  * AUTHOR: Duane Wessels
@@ -35,8 +34,7 @@
 
 #include "squid.h"
 
-const char *fdTypeStr[] =
-{
+const char *fdTypeStr[] = {
     "None",
     "Log",
     "File",
@@ -47,7 +45,7 @@
 
 #ifdef _SQUID_MSWIN_
 static void
-sdUpdateBiggest(int fd,  int opening)
+sdUpdateBiggest(int fd, int opening)
 {
     if (fd < Biggest_SD)
 	return;
@@ -69,7 +67,7 @@
     assert(!opening);
     while (!sd_table[Biggest_SD].flags.open && Biggest_SD)
 	Biggest_SD--;
-	debug(51, 2) ("sdUpdateBiggest: %d\n",Biggest_SD);
+    debug(51, 2) ("sdUpdateBiggest: %d\n", Biggest_SD);
 }
 
 void
@@ -178,9 +176,6 @@
     }
     debug(51, 3) ("fd_close FD %d %s\n", fd, F->desc);
     F->flags.open = 0;
-//#ifdef _SQUID_MSWIN_
-//    F->fbuf = NULL;
-//#endif
     fdUpdateBiggest(fd, 0);
     Number_FD--;
     commUpdateReadBits(fd, NULL);
@@ -257,8 +252,7 @@
 	debug(51, 1) ("Open FD %-10s %4d %s\n",
 	    F->bytes_read && F->bytes_written ? "READ/WRITE" :
 	    F->bytes_read ? "READING" :
-	    F->bytes_written ? "WRITING" : null_string,
-	    i, F->desc);
+	    F->bytes_written ? "WRITING" : null_string, i, F->desc);
     }
 }
 
@@ -289,7 +283,9 @@
     x = Squid_MaxFD - 20 - XMIN(25, Squid_MaxFD / 16);
     if (new > x) {
 	/* perhaps this should be fatal()? -DW */
-	debug(51, 0) ("WARNING: This machine has a serious shortage of filedescriptors.\n");
+	debug(51, 0)
+	    
+	    ("WARNING: This machine has a serious shortage of filedescriptors.\n");
 	new = x;
     }
     debug(51, 0) ("Reserved FD adjusted from %d to %d due to failures\n",
Index: squid/src/filemap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/filemap.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/filemap.c	6 Jan 2001 12:40:13 -0000	1.1.1.2.4.1.2.1
+++ squid/src/filemap.c	27 Aug 2001 21:48:20 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: filemap.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:13 hno Exp $
+ * $Id: filemap.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 8     Swap File Bitmap
  * AUTHOR: Harvest Derived
@@ -61,9 +60,10 @@
     fileMap *fm = xcalloc(1, sizeof(fileMap));
     fm->max_n_files = FM_INITIAL_NUMBER;
     fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT;
-    debug(8, 3) ("file_map_create: creating space for %d files\n", fm->max_n_files);
-    debug(8, 5) ("--> %d words of %d bytes each\n",
-	fm->nwords, sizeof(*fm->file_map));
+    debug(8, 3) ("file_map_create: creating space for %d files\n",
+	fm->max_n_files);
+    debug(8, 5) ("--> %d words of %d bytes each\n", fm->nwords,
+	sizeof(*fm->file_map));
     fm->file_map = xcalloc(fm->nwords, sizeof(*fm->file_map));
     /* XXX account fm->file_map */
     return fm;
@@ -77,7 +77,8 @@
     fm->max_n_files <<= 1;
     assert(fm->max_n_files <= (1 << 30));
     fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT;
-    debug(8, 3) ("file_map_grow: creating space for %d files\n", fm->max_n_files);
+    debug(8, 3) ("file_map_grow: creating space for %d files\n",
+	fm->max_n_files);
     fm->file_map = xcalloc(fm->nwords, sizeof(*fm->file_map));
     debug(8, 3) ("copying %d old bytes\n", old_sz);
     xmemcpy(fm->file_map, old_map, old_sz);
Index: squid/src/forward.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/forward.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/forward.c	14 Jun 2001 21:34:24 -0000	1.1.1.3.4.1.2.2
+++ squid/src/forward.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: forward.c,v 1.1.1.3.4.1.2.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: forward.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -127,8 +126,7 @@
     fwdState->server_fd = -1;
     if (fwdCheckRetry(fwdState)) {
 	debug(17, 3) ("fwdServerClosed: re-forwarding (%d tries, %d secs)\n",
-	    fwdState->n_tries,
-	    (int) (squid_curtime - fwdState->start));
+	    fwdState->n_tries, (int) (squid_curtime - fwdState->start));
 	if (fwdState->servers->next) {
 	    /* cycle */
 	    FwdServer *fs = fwdState->servers;
@@ -158,8 +156,7 @@
     assert(fwdState->server_fd == server_fd);
     if (status == COMM_ERR_DNS) {
 	fwdState->flags.dont_retry = 1;
-	debug(17, 4) ("fwdConnectDone: Unknown host: %s\n",
-	    request->host);
+	debug(17, 4) ("fwdConnectDone: Unknown host: %s\n", request->host);
 	err = errorCon(ERR_DNS_FAIL, HTTP_SERVICE_UNAVAILABLE);
 	err->dnsserver_msg = xstrdup(dns_error_message);
 	err->request = requestLink(request);
@@ -182,7 +179,8 @@
 	    peerCheckConnectStart(fs->peer);
 	comm_close(server_fd);
     } else {
-	debug(17, 3) ("fwdConnectDone: FD %d: '%s'\n", server_fd, storeUrl(fwdState->entry));
+	debug(17, 3) ("fwdConnectDone: FD %d: '%s'\n", server_fd,
+	    storeUrl(fwdState->entry));
 	fd_note(server_fd, storeUrl(fwdState->entry));
 	fd_table[server_fd].uses++;
 	fwdDispatch(fwdState);
@@ -246,16 +244,8 @@
 	fwdConnectDone(fd, COMM_OK, fwdState);
 	return;
     }
-    fd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-       IPPROTO_TCP,
-#else
-       0,
-#endif
-	Config.Addrs.tcp_outgoing,
-	0,
-	COMM_NONBLOCKING,
-	url);
+    fd = comm_open(SOCK_STREAM, 0, Config.Addrs.tcp_outgoing, 0,
+	COMM_NONBLOCKING, url);
     if (fd < 0) {
 	debug(50, 4) ("fwdConnectStart: %s\n", xstrerror());
 	err = errorCon(ERR_SOCKET_FAILURE, HTTP_INTERNAL_SERVER_ERROR);
@@ -268,10 +258,7 @@
     fwdState->server_fd = fd;
     fwdState->n_tries++;
     comm_add_close_handler(fd, fwdServerClosed, fwdState);
-    commSetTimeout(fd,
-	ctimeout,
-	fwdConnectTimeout,
-	fwdState);
+    commSetTimeout(fd, ctimeout, fwdConnectTimeout, fwdState);
     commConnectStart(fd, host, port, fwdConnectDone, fwdState);
 }
 
@@ -309,8 +296,7 @@
     ErrorState *err;
     debug(17, 3) ("fwdDispatch: FD %d: Fetching '%s %s'\n",
 	fwdState->client_fd,
-	RequestMethodStr[request->method],
-	storeUrl(entry));
+	RequestMethodStr[request->method], storeUrl(entry));
     /*assert(!EBIT_TEST(entry->flags, ENTRY_DISPATCHED)); */
     assert(entry->ping_status != PING_WAITING);
     assert(entry->lock_count);
@@ -519,8 +505,7 @@
     assert(EBIT_TEST(fwdState->entry->flags, ENTRY_FWD_HDR_WAIT));
     debug(17, 3) ("fwdFail: %s \"%s\"\n\t%s\n",
 	err_type_str[errorState->type],
-	httpStatusString(errorState->http_status),
-	storeUrl(fwdState->entry));
+	httpStatusString(errorState->http_status), storeUrl(fwdState->entry));
     if (fwdState->err)
 	errorStateFree(fwdState->err);
     fwdState->err = errorState;
@@ -566,8 +551,7 @@
     fwdLogReplyStatus(fwdState->n_tries, e->mem_obj->reply->sline.status);
     if (fwdReforward(fwdState)) {
 	debug(17, 3) ("fwdComplete: re-forwarding %d %s\n",
-	    e->mem_obj->reply->sline.status,
-	    storeUrl(e));
+	    e->mem_obj->reply->sline.status, storeUrl(e));
 	if (fwdState->server_fd > -1)
 	    fwdUnregister(fwdState->server_fd, fwdState);
 	storeEntryReset(e);
@@ -590,8 +574,7 @@
 fwdInit(void)
 {
     cachemgrRegister("forward",
-	"Request Forwarding Statistics",
-	fwdStats, 0, 1);
+	"Request Forwarding Statistics", fwdStats, 0, 1);
 }
 
 static void
Index: squid/src/fqdncache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fqdncache.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/fqdncache.c	6 Jan 2001 12:40:13 -0000	1.1.1.3.4.1.2.1
+++ squid/src/fqdncache.c	27 Aug 2001 21:48:20 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,7 +1,5 @@
-
-
 /*
- * $Id: fqdncache.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:13 hno Exp $
+ * $Id: fqdncache.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:20 tolsty Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -39,7 +37,8 @@
 #define FQDN_LOW_WATER       90
 #define FQDN_HIGH_WATER      95
 
-static struct {
+static struct
+{
     int requests;
     int replies;
     int hits;
@@ -48,7 +47,8 @@
     int negative_hits;
     int errors;
     int ghba_calls;		/* # calls to blocking gethostbyaddr() */
-} FqdncacheStats;
+}
+FqdncacheStats;
 
 static dlink_list lru_list;
 
@@ -74,8 +74,7 @@
 
 static hash_table *fqdn_table = NULL;
 
-static char fqdncache_status_char[] =
-{
+static char fqdncache_status_char[] = {
     'C',
     'N',
     'P',
@@ -186,13 +185,13 @@
 }
 
 static fqdncache_entry *
-fqdncacheAddNew(const char *name, const struct hostent *hp, fqdncache_status_t status)
+fqdncacheAddNew(const char *name, const struct hostent *hp,
+    fqdncache_status_t status)
 {
     fqdncache_entry *f;
     assert(fqdncache_get(name) == NULL);
     debug(35, 10) ("fqdncacheAddNew: Adding '%s', status=%c\n",
-	name,
-	fqdncache_status_char[status]);
+	name, fqdncache_status_char[status]);
     f = fqdncache_create(name);
     if (hp)
 	fqdncacheAddHostent(f, hp);
@@ -365,7 +364,8 @@
 }
 
 void
-fqdncache_nbgethostbyaddr(struct in_addr addr, FQDNH * handler, void *handlerData)
+fqdncache_nbgethostbyaddr(struct in_addr addr, FQDNH * handler,
+    void *handlerData)
 {
     fqdncache_entry *f = NULL;
     char *name = inet_ntoa(addr);
@@ -406,7 +406,11 @@
 	FqdncacheStats.pending_hits++;
 	fqdncacheAddPending(f, handler, handlerData);
 	if (squid_curtime - f->expires > 600) {
-	    debug(35, 0) ("fqdncache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n", name,
+	    debug(35, 0)
+
+		
+		("fqdncache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n",
+		name,
 		(int) (squid_curtime + Config.negativeDnsTtl - f->expires));
 	    fqdncacheChangeKey(f);
 	    fqdncache_call_pending(f);
@@ -447,8 +451,7 @@
     n = hashPrime(fqdncache_high / 4);
     fqdn_table = hash_create((HASHCMP *) strcmp, n, hash4);
     cachemgrRegister("fqdncache",
-	"FQDN Cache Stats and Contents",
-	fqdnStats, 0, 1);
+	"FQDN Cache Stats and Contents", fqdnStats, 0, 1);
 }
 
 /* clean up the pending entries in dnsserver */
@@ -526,14 +529,12 @@
 	memInUse(MEM_FQDNCACHE_ENTRY));
     storeAppendPrintf(sentry, "FQDNcache Requests: %d\n",
 	FqdncacheStats.requests);
-    storeAppendPrintf(sentry, "FQDNcache Hits: %d\n",
-	FqdncacheStats.hits);
+    storeAppendPrintf(sentry, "FQDNcache Hits: %d\n", FqdncacheStats.hits);
     storeAppendPrintf(sentry, "FQDNcache Pending Hits: %d\n",
 	FqdncacheStats.pending_hits);
     storeAppendPrintf(sentry, "FQDNcache Negative Hits: %d\n",
 	FqdncacheStats.negative_hits);
-    storeAppendPrintf(sentry, "FQDNcache Misses: %d\n",
-	FqdncacheStats.misses);
+    storeAppendPrintf(sentry, "FQDNcache Misses: %d\n", FqdncacheStats.misses);
     storeAppendPrintf(sentry, "Blocking calls to gethostbyaddr(): %d\n",
 	FqdncacheStats.ghba_calls);
     storeAppendPrintf(sentry, "FQDN Cache Contents:\n\n");
@@ -546,9 +547,7 @@
 	    ttl = (f->expires - squid_curtime);
 	storeAppendPrintf(sentry, " %-32.32s %c %6d %d",
 	    f->name,
-	    fqdncache_status_char[f->status],
-	    ttl,
-	    (int) f->name_count);
+	    fqdncache_status_char[f->status], ttl, (int) f->name_count);
 	for (k = 0; k < (int) f->name_count; k++)
 	    storeAppendPrintf(sentry, " %s", f->names[k]);
 	storeAppendPrintf(sentry, "\n");
@@ -671,44 +670,38 @@
 snmp_netFqdnFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netFqdnFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netFqdnFn: Processing request:\n",
+	Var->name[LEN_SQ_NET + 1]);
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_NET + 1]) {
     case FQDN_ENT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    memInUse(MEM_FQDNCACHE_ENTRY),
-	    SMI_GAUGE32);
+	    memInUse(MEM_FQDNCACHE_ENTRY), SMI_GAUGE32);
 	break;
     case FQDN_REQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.requests,
-	    SMI_COUNTER32);
+	    FqdncacheStats.requests, SMI_COUNTER32);
 	break;
     case FQDN_HITS:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.hits,
-	    SMI_COUNTER32);
+	    FqdncacheStats.hits, SMI_COUNTER32);
 	break;
     case FQDN_PENDHIT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.pending_hits,
-	    SMI_GAUGE32);
+	    FqdncacheStats.pending_hits, SMI_GAUGE32);
 	break;
     case FQDN_NEGHIT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.negative_hits,
-	    SMI_COUNTER32);
+	    FqdncacheStats.negative_hits, SMI_COUNTER32);
 	break;
     case FQDN_MISS:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.misses,
-	    SMI_COUNTER32);
+	    FqdncacheStats.misses, SMI_COUNTER32);
 	break;
     case FQDN_GHBN:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    FqdncacheStats.ghba_calls,
-	    SMI_COUNTER32);
+	    FqdncacheStats.ghba_calls, SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
Index: squid/src/ftp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v
retrieving revision 1.1.1.3.4.3.2.1
retrieving revision 1.1.1.3.4.3.2.1.2.1
diff -u -r1.1.1.3.4.3.2.1 -r1.1.1.3.4.3.2.1.2.1
--- squid/src/ftp.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.3.2.1
+++ squid/src/ftp.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.3.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ftp.c,v 1.1.1.3.4.3.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: ftp.c,v 1.1.1.3.4.3.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -39,7 +38,8 @@
 static const char *const crlf = "\r\n";
 static char cbuf[1024];
 
-typedef enum {
+typedef enum
+{
     BEGIN,
     SENT_USER,
     SENT_PASS,
@@ -58,9 +58,11 @@
     READING_DATA,
     WRITING_DATA,
     SENT_MKDIR
-} ftp_state_t;
+}
+ftp_state_t;
 
-struct _ftp_flags {
+struct _ftp_flags
+{
     unsigned int isdir:1;
     unsigned int pasv_supported:1;
     unsigned int skip_whitespace:1;
@@ -81,7 +83,8 @@
     unsigned int datachannel_hack:1;
 };
 
-typedef struct _Ftpdata {
+typedef struct _Ftpdata
+{
     StoreEntry *entry;
     request_t *request;
     char user[MAX_URL];
@@ -108,7 +111,8 @@
     char *old_reply;
     char *old_filepath;
     char typecode;
-    struct {
+    struct
+    {
 	int fd;
 	char *buf;
 	size_t size;
@@ -118,8 +122,10 @@
 	char *last_command;
 	char *last_reply;
 	int replycode;
-    } ctrl;
-    struct {
+    }
+    ctrl;
+    struct
+    {
 	int fd;
 	char *buf;
 	size_t size;
@@ -127,19 +133,23 @@
 	FREE *freefunc;
 	char *host;
 	u_short port;
-    } data;
+    }
+    data;
     struct _ftp_flags flags;
     FwdState *fwd;
-} FtpStateData;
+}
+FtpStateData;
 
-typedef struct {
+typedef struct
+{
     char type;
     int size;
     char *date;
     char *name;
     char *showname;
     char *link;
-} ftpListParts;
+}
+ftpListParts;
 
 typedef void (FTPSM) (FtpStateData *);
 
@@ -158,7 +168,8 @@
 static wordlist *ftpParseControlReply(char *, size_t, int *, int *);
 static int ftpRestartable(FtpStateData * ftpState);
 static void ftpAppendSuccessHeader(FtpStateData * ftpState);
-static void ftpAuthRequired(HttpReply * reply, request_t * request, const char *realm);
+static void ftpAuthRequired(HttpReply * reply, request_t * request,
+    const char *realm);
 static void ftpHackShortcut(FtpStateData * ftpState, FTPSM * nextState);
 static void ftpPutStart(FtpStateData *);
 static CWCB ftpPutTransferDone;
@@ -238,8 +249,7 @@
 Quit			-
 ************************************************/
 
-FTPSM *FTP_SM_FUNCS[] =
-{
+FTPSM *FTP_SM_FUNCS[] = {
     ftpReadWelcome,		/* BEGIN */
     ftpReadUser,		/* SENT_USER */
     ftpReadPass,		/* SENT_PASS */
@@ -419,22 +429,20 @@
     storeBuffer(e);
     storeAppendPrintf(e, "</PRE>\n");
     if (ftpState->flags.listformat_unknown && !ftpState->flags.tried_nlst) {
-	storeAppendPrintf(e, "<A HREF=\"./;type=d\">[As plain directory]</A>\n");
+	storeAppendPrintf(e,
+	    "<A HREF=\"./;type=d\">[As plain directory]</A>\n");
     } else if (ftpState->typecode == 'D') {
 	storeAppendPrintf(e, "<A HREF=\"./\">[As extended directory]</A>\n");
     }
     storeAppendPrintf(e, "<HR>\n");
     storeAppendPrintf(e, "<ADDRESS>\n");
     storeAppendPrintf(e, "Generated %s by %s (%s)\n",
-	mkrfc1123(squid_curtime),
-	getMyHostname(),
-	full_appname_string);
+	mkrfc1123(squid_curtime), getMyHostname(), full_appname_string);
     storeAppendPrintf(e, "</ADDRESS></BODY></HTML>\n");
     storeBufferFlush(e);
 }
 
-static const char *Month[] =
-{
+static const char *Month[] = {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
@@ -493,8 +501,8 @@
 	p->type = '\0';
 	return p;
     }
-    for (t = strtok(xbuf, w_space); t && n_tokens < MAX_TOKENS; t = strtok(NULL, w_space))
-	tokens[n_tokens++] = xstrdup(t);
+    for (t = strtok(xbuf, w_space); t && n_tokens < MAX_TOKENS;
+	t = strtok(NULL, w_space)) tokens[n_tokens++] = xstrdup(t);
     xfree(xbuf);
     /* locate the Month field */
     for (i = 3; i < n_tokens - 2; i++) {
@@ -536,7 +544,7 @@
     /* try it as a DOS listing */
     if (n_tokens > 3 && p->name == NULL &&
 	sscanf(tokens[0], SCAN_FTP3, sbuf, sbuf, sbuf) == 3 &&
-    /* 04-05-70 */
+	/* 04-05-70 */
 	sscanf(tokens[1], SCAN_FTP4, sbuf, sbuf, sbuf, sbuf) == 4) {
 	/* 09:33PM */
 	if (!strcasecmp(tokens[2], "<dir>")) {
@@ -645,7 +653,8 @@
     LOCAL_ARRAY(char, html, 8192);
     size_t width = Config.Ftp.list_width;
     ftpListParts *parts;
-    *icon = *href = *text = *size = *chdir = *view = *download = *link = *html = '\0';
+    *icon = *href = *text = *size = *chdir = *view = *download = *link = *html =
+	'\0';
     if ((int) strlen(line) > 1024) {
 	snprintf(html, 8192, "%s\n", line);
 	return html;
@@ -654,8 +663,7 @@
     if (strcmp(line, "<internal-dirup>") == 0) {
 	/* <A HREF="{href}">{icon}</A> <A HREF="{href}">{text}</A> {link} */
 	snprintf(icon, 2048, "<IMG BORDER=0 SRC=\"%s\" ALT=\"%-6s\">",
-	    mimeGetIconURL("internal-dirup"),
-	    "[DIRUP]");
+	    mimeGetIconURL("internal-dirup"), "[DIRUP]");
 	if (!ftpState->flags.no_dotdot && !ftpState->flags.root_dir) {
 	    /* Normal directory */
 	    strcpy(href, "../");
@@ -665,15 +673,12 @@
 	    strcpy(href, "%2e%2e/");
 	    strcpy(text, "Parent Directory");
 	    snprintf(link, 2048, "(<A HREF=\"%s\">%s</A>)",
-		"%2f/",
-		"Root Directory");
+		"%2f/", "Root Directory");
 	} else if (ftpState->flags.no_dotdot && !ftpState->flags.root_dir) {
 	    /* Normal directory where last component is / or ..  */
 	    strcpy(href, "%2e%2e/");
 	    strcpy(text, "Parent Directory");
-	    snprintf(link, 2048, "(<A HREF=\"%s\">%s</A>)",
-		"../",
-		"Back");
+	    snprintf(link, 2048, "(<A HREF=\"%s\">%s</A>)", "../", "Back");
 	} else {		/* NO_DOTDOT && ROOT_DIR */
 	    /* "UNIX Root" directory */
 	    strcpy(href, "../");
@@ -711,50 +716,46 @@
     switch (parts->type) {
     case 'd':
 	snprintf(icon, 2048, "<IMG BORDER=0 SRC=\"%s\" ALT=\"%-6s\">",
-	    mimeGetIconURL("internal-dir"),
-	    "[DIR]");
+	    mimeGetIconURL("internal-dir"), "[DIR]");
 	strncat(href, "/", 2048);
 	break;
     case 'l':
 	snprintf(icon, 2048, "<IMG BORDER=0 SRC=\"%s\" ALT=\"%-6s\">",
-	    mimeGetIconURL("internal-link"),
-	    "[LINK]");
+	    mimeGetIconURL("internal-link"), "[LINK]");
 	/* sometimes there is an 'l' flag, but no "->" link */
 	if (parts->link) {
 	    char *link2 = xstrdup(html_quote(rfc1738_escape(parts->link)));
 	    snprintf(link, 2048, " -> <A HREF=\"%s\">%s</A>",
-		link2,
-		html_quote(parts->link));
+		link2, html_quote(parts->link));
 	    safe_free(link2);
 	}
 	break;
     case '\0':
 	snprintf(icon, 2048, "<IMG BORDER=0 SRC=\"%s\" ALT=\"%-6s\">",
-	    mimeGetIconURL(parts->name),
-	    "[UNKNOWN]");
-	snprintf(chdir, 2048, " <A HREF=\"%s/;type=d\"><IMG BORDER=0 SRC=\"%s\" "
-	    "ALT=\"[DIR]\"></A>",
-	    rfc1738_escape_part(parts->name),
+	    mimeGetIconURL(parts->name), "[UNKNOWN]");
+	snprintf(chdir, 2048,
+	    " <A HREF=\"%s/;type=d\"><IMG BORDER=0 SRC=\"%s\" "
+	    "ALT=\"[DIR]\"></A>", rfc1738_escape_part(parts->name),
 	    mimeGetIconURL("internal-dir"));
 	break;
     case '-':
     default:
 	snprintf(icon, 2048, "<IMG BORDER=0 SRC=\"%s\" ALT=\"%-6s\">",
-	    mimeGetIconURL(parts->name),
-	    "[FILE]");
+	    mimeGetIconURL(parts->name), "[FILE]");
 	snprintf(size, 2048, " %6dk", parts->size);
 	break;
     }
     if (parts->type != 'd') {
 	if (mimeGetViewOption(parts->name)) {
-	    snprintf(view, 2048, " <A HREF=\"%s;type=a\"><IMG BORDER=0 SRC=\"%s\" "
-		"ALT=\"[VIEW]\"></A>",
-		href, mimeGetIconURL("internal-view"));
+	    snprintf(view, 2048,
+		" <A HREF=\"%s;type=a\"><IMG BORDER=0 SRC=\"%s\" "
+		"ALT=\"[VIEW]\"></A>", href, mimeGetIconURL("internal-view"));
 	}
 	if (mimeGetDownloadOption(parts->name)) {
-	    snprintf(download, 2048, " <A HREF=\"%s;type=i\"><IMG BORDER=0 SRC=\"%s\" "
-		"ALT=\"[DOWNLOAD]\"></A>",
-		href, mimeGetIconURL("internal-download"));
+	    snprintf(download, 2048,
+		" <A HREF=\"%s;type=i\"><IMG BORDER=0 SRC=\"%s\" "
+		"ALT=\"[DOWNLOAD]\"></A>", href,
+		mimeGetIconURL("internal-download"));
 	}
     }
     /* <A HREF="{href}">{icon}</A> <A HREF="{href}">{text}</A> . . . {date}{size}{chdir}{view}{download}{link}\n  */
@@ -880,11 +881,7 @@
 #endif
     memset(ftpState->data.buf + ftpState->data.offset, '\0', read_sz);
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, ftpState->data.buf + ftpState->data.offset, read_sz);
-#else
     len = read(fd, ftpState->data.buf + ftpState->data.offset, read_sz);
-#endif
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
 #if DELAY_POOLS
@@ -908,10 +905,7 @@
 	debug(50, 1) ("ftpDataRead: read error: %s\n", xstrerror());
 	if (ignoreErrno(errno)) {
 	    commSetSelect(fd,
-		COMM_SELECT_READ,
-		ftpDataRead,
-		data,
-		Config.Timeout.read);
+		COMM_SELECT_READ, ftpDataRead, data, Config.Timeout.read);
 	} else {
 	    ftpFailed(ftpState, ERR_READ_ERROR);
 	    /* ftpFailed closes ctrl.fd and frees ftpState */
@@ -926,13 +920,11 @@
 	    storeAppend(entry, ftpState->data.buf, len);
 	    ftpState->data.offset = 0;
 	}
-	if (ftpState->size > 0 && mem->inmem_hi >= ftpState->size + mem->reply->hdr_sz)
-	    ftpReadComplete(ftpState);
+	if (ftpState->size > 0
+	    && mem->inmem_hi >=
+	    ftpState->size + mem->reply->hdr_sz) ftpReadComplete(ftpState);
 	else
-	    commSetSelect(fd,
-		COMM_SELECT_READ,
-		ftpDataRead,
-		data,
+	    commSetSelect(fd, COMM_SELECT_READ, ftpDataRead, data,
 		Config.Timeout.read);
     }
 }
@@ -1006,8 +998,7 @@
     request_t *request = ftpState->request;
     size_t len;
     char *t;
-    len = 64
-	+ strlen(ftpState->user)
+    len = 64 + strlen(ftpState->user)
 	+ strlen(ftpState->password)
 	+ strlen(request->host)
 	+ strLen(request->urlpath);
@@ -1121,16 +1112,13 @@
     safe_free(ftpState->ctrl.last_reply);
     ftpState->ctrl.last_command = xstrdup(buf);
     comm_write(ftpState->ctrl.fd,
-	xstrdup(buf),
-	strlen(buf),
-	ftpWriteCommandCallback,
-	ftpState,
-	xfree);
+	xstrdup(buf), strlen(buf), ftpWriteCommandCallback, ftpState, xfree);
     ftpScheduleReadControlReply(ftpState, 0);
 }
 
 static void
-ftpWriteCommandCallback(int fd, char *bufnotused, size_t size, int errflag, void *data)
+ftpWriteCommandCallback(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     FtpStateData *ftpState = data;
     debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", size);
@@ -1224,9 +1212,7 @@
     } else {
 	commSetSelect(ftpState->ctrl.fd,
 	    COMM_SELECT_READ,
-	    ftpReadControlReply,
-	    ftpState,
-	    Config.Timeout.read);
+	    ftpReadControlReply, ftpState, Config.Timeout.read);
 	/*
 	 * Cancel the timeout on the Data socket (if any) and
 	 * establish one on the control socket.
@@ -1251,15 +1237,9 @@
     }
     assert(ftpState->ctrl.offset < ftpState->ctrl.size);
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd,
-	ftpState->ctrl.buf + ftpState->ctrl.offset,
-	ftpState->ctrl.size - ftpState->ctrl.offset);
-#else
     len = read(fd,
 	ftpState->ctrl.buf + ftpState->ctrl.offset,
 	ftpState->ctrl.size - ftpState->ctrl.offset);
-#endif
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
 	kb_incr(&Counter.server.all.kbytes_in, len);
@@ -1369,8 +1349,7 @@
 {
     if (ftpState->proxy_host != NULL)
 	snprintf(cbuf, 1024, "USER %s@%s\r\n",
-	    ftpState->user,
-	    ftpState->request->host);
+	    ftpState->user, ftpState->request->host);
     else
 	snprintf(cbuf, 1024, "USER %s\r\n", ftpState->user);
     ftpWriteCommand(cbuf, ftpState);
@@ -1649,8 +1628,7 @@
 	ftpState->size = atoi(ftpState->ctrl.last_reply);
 	if (ftpState->size == 0) {
 	    debug(9, 2) ("ftpReadSize: SIZE reported %s on %s\n",
-		ftpState->ctrl.last_reply,
-		ftpState->title_url);
+		ftpState->ctrl.last_reply, ftpState->title_url);
 	    ftpState->size = -1;
 	}
     } else if (code < 0) {
@@ -1687,15 +1665,7 @@
 	addr.sin_addr = Config.Addrs.tcp_outgoing;
     }
     /* Open data channel with the same local address as control channel */
-    fd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_TCP,
-#else
-	0,
-#endif
-	addr.sin_addr,
-	0,
-	COMM_NONBLOCKING,
+    fd = comm_open(SOCK_STREAM, 0, addr.sin_addr, 0, COMM_NONBLOCKING,
 	storeUrl(ftpState->entry));
     debug(9, 3) ("ftpSendPasv: Unconnected data socket created on FD %d\n", fd);
     if (fd < 0) {
@@ -1780,7 +1750,8 @@
     FtpStateData *ftpState = data;
     debug(9, 3) ("ftpPasvCallback\n");
     if (status != COMM_OK) {
-	debug(9, 2) ("ftpPasvCallback: failed to connect. Retrying without PASV.\n");
+	debug(9,
+	    2) ("ftpPasvCallback: failed to connect. Retrying without PASV.\n");
 	ftpState->fwd->flags.dont_retry = 0;	/* this is a retryable error */
 	ftpState->fwd->flags.ftp_pasv_failed = 1;
 	ftpFailed(ftpState, ERR_NONE);
@@ -1821,20 +1792,16 @@
      * used for both control and data.
      */
     if (fallback) {
-	setsockopt(ftpState->ctrl.fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on));
+	setsockopt(ftpState->ctrl.fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on,
+	    sizeof(on));
 	port = ntohs(addr.sin_port);
     }
-    fd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_TCP,
-#else
-	0,
-#endif
-	addr.sin_addr,
-	port,
+    fd = comm_open(SOCK_STREAM, 0, addr.sin_addr, port,
 	COMM_NONBLOCKING | (fallback ? COMM_REUSEADDR : 0),
 	storeUrl(ftpState->entry));
-    debug(9, 3) ("ftpOpenListenSocket: Unconnected data socket created on FD %d\n", fd);
+    debug(9,
+	3) ("ftpOpenListenSocket: Unconnected data socket created on FD %d\n",
+	fd);
     if (fd < 0) {
 	debug(9, 0) ("ftpOpenListenSocket: comm_open failed\n");
 	return -1;
@@ -1870,8 +1837,7 @@
     addrptr = (unsigned char *) &addr.sin_addr.s_addr;
     portptr = (unsigned char *) &addr.sin_port;
     snprintf(cbuf, 1024, "PORT %d,%d,%d,%d,%d,%d\r\n",
-	addrptr[0], addrptr[1], addrptr[2], addrptr[3],
-	portptr[0], portptr[1]);
+	addrptr[0], addrptr[1], addrptr[2], addrptr[3], portptr[0], portptr[1]);
     ftpWriteCommand(cbuf, ftpState);
     ftpState->state = SENT_PORT;
 }
@@ -1899,14 +1865,16 @@
 
     fd = comm_accept(fd, &my_peer, &me);
     if (fd < 0) {
-	debug(9, 1) ("ftpHandleDataAccept: comm_accept(%d): %s", fd, xstrerror());
+	debug(9, 1) ("ftpHandleDataAccept: comm_accept(%d): %s", fd,
+	    xstrerror());
 	/* XXX Need to set error message */
 	ftpFail(ftpState);
 	return;
     }
     /* Replace the Listen socket with the accepted data socket */
     comm_close(ftpState->data.fd);
-    debug(9, 3) ("ftpAcceptDataConnection: Connected data socket on FD %d\n", fd);
+    debug(9, 3) ("ftpAcceptDataConnection: Connected data socket on FD %d\n",
+	fd);
     ftpState->data.fd = fd;
     ftpState->data.port = ntohs(my_peer.sin_port);
     ftpState->data.host = xstrdup(inet_ntoa(my_peer.sin_addr));
@@ -1949,7 +1917,8 @@
 	snprintf(cbuf, 1024, "STOR %s\r\n", ftpState->filepath);
 	ftpWriteCommand(cbuf, ftpState);
 	ftpState->state = SENT_STOR;
-    } else if (httpHeaderGetInt(&ftpState->request->header, HDR_CONTENT_LENGTH) > 0) {
+    } else if (httpHeaderGetInt(&ftpState->request->header,
+	    HDR_CONTENT_LENGTH) > 0) {
 	/* File upload without a filename. use STOU to generate one */
 	snprintf(cbuf, 1024, "STOU\r\n");
 	ftpWriteCommand(cbuf, ftpState);
@@ -1980,10 +1949,7 @@
 	/* Accept data channel */
 	debug(9, 3) ("ftpReadStor: accepting data channel\n");
 	commSetSelect(ftpState->data.fd,
-	    COMM_SELECT_READ,
-	    ftpAcceptDataConnection,
-	    ftpState,
-	    0);
+	    COMM_SELECT_READ, ftpAcceptDataConnection, ftpState, 0);
     } else {
 	debug(9, 3) ("ftpReadStor: Unexpected reply code %s\n", code);
 	ftpFail(ftpState);
@@ -2010,7 +1976,9 @@
     if (ftpState->size <= 0)
 	return 0;
 
-    ftpState->restart_offset = httpHdrRangeLowestOffset(ftpState->request->range, (size_t) ftpState->size);
+    ftpState->restart_offset =
+	httpHdrRangeLowestOffset(ftpState->request->range,
+	(size_t) ftpState->size);
     if (ftpState->restart_offset <= 0)
 	return 0;
     return 1;
@@ -2070,10 +2038,7 @@
 	/* Begin data transfer */
 	ftpAppendSuccessHeader(ftpState);
 	commSetSelect(ftpState->data.fd,
-	    COMM_SELECT_READ,
-	    ftpDataRead,
-	    ftpState,
-	    Config.Timeout.read);
+	    COMM_SELECT_READ, ftpDataRead, ftpState, Config.Timeout.read);
 	commSetDefer(ftpState->data.fd, fwdCheckDeferRead, ftpState->entry);
 	ftpState->state = READING_DATA;
 	/*
@@ -2081,21 +2046,20 @@
 	 * on the data socket
 	 */
 	commSetTimeout(ftpState->ctrl.fd, -1, NULL, NULL);
-	commSetTimeout(ftpState->data.fd, Config.Timeout.read, ftpTimeout, ftpState);
+	commSetTimeout(ftpState->data.fd, Config.Timeout.read, ftpTimeout,
+	    ftpState);
 	return;
     } else if (code == 150) {
 	/* Accept data channel */
 	commSetSelect(ftpState->data.fd,
-	    COMM_SELECT_READ,
-	    ftpAcceptDataConnection,
-	    ftpState,
-	    0);
+	    COMM_SELECT_READ, ftpAcceptDataConnection, ftpState, 0);
 	/*
 	 * Cancel the timeout on the Control socket and establish one
 	 * on the data socket
 	 */
 	commSetTimeout(ftpState->ctrl.fd, -1, NULL, NULL);
-	commSetTimeout(ftpState->data.fd, Config.Timeout.read, ftpTimeout, ftpState);
+	commSetTimeout(ftpState->data.fd, Config.Timeout.read, ftpTimeout,
+	    ftpState);
 	return;
     } else if (!ftpState->flags.tried_nlst && code > 300) {
 	ftpSendNlst(ftpState);
@@ -2124,10 +2088,7 @@
 	debug(9, 3) ("ftpReadRetr: reading data channel\n");
 	ftpAppendSuccessHeader(ftpState);
 	commSetSelect(ftpState->data.fd,
-	    COMM_SELECT_READ,
-	    ftpDataRead,
-	    ftpState,
-	    Config.Timeout.read);
+	    COMM_SELECT_READ, ftpDataRead, ftpState, Config.Timeout.read);
 	commSetDefer(ftpState->data.fd, fwdCheckDeferRead, ftpState->entry);
 	ftpState->state = READING_DATA;
 	/*
@@ -2140,10 +2101,7 @@
     } else if (code == 150) {
 	/* Accept data channel */
 	commSetSelect(ftpState->data.fd,
-	    COMM_SELECT_READ,
-	    ftpAcceptDataConnection,
-	    ftpState,
-	    0);
+	    COMM_SELECT_READ, ftpAcceptDataConnection, ftpState, 0);
 	/*
 	 * Cancel the timeout on the Control socket and establish one
 	 * on the data socket
@@ -2299,8 +2257,7 @@
 	}
     }
     /* Try to reopen datachannel */
-    if (!ftpState->flags.datachannel_hack &&
-	ftpState->pathcomps == NULL) {
+    if (!ftpState->flags.datachannel_hack && ftpState->pathcomps == NULL) {
 	switch (ftpState->state) {
 	case SENT_RETR:
 	case SENT_LIST:
@@ -2416,7 +2373,8 @@
 }
 
 static void
-ftpPutTransferDone(int fd, char *bufnotused, size_t size, int errflag, void *data)
+ftpPutTransferDone(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     FtpStateData *ftpState = data;
     if (ftpState->data.fd >= 0) {
@@ -2439,7 +2397,8 @@
     if (cbdataValid(ftpState))
 	debug(9, 5) ("ftpSendReply: ftpState (%p) is valid!\n", ftpState);
     if (code == 226) {
-	err_code = (ftpState->mdtm > 0) ? ERR_FTP_PUT_MODIFIED : ERR_FTP_PUT_CREATED;
+	err_code =
+	    (ftpState->mdtm > 0) ? ERR_FTP_PUT_MODIFIED : ERR_FTP_PUT_CREATED;
 	http_code = (ftpState->mdtm > 0) ? HTTP_ACCEPTED : HTTP_CREATED;
     } else if (code == 227) {
 	err_code = ERR_FTP_PUT_CREATED;
@@ -2506,7 +2465,8 @@
 	range_spec.offset = ftpState->restarted_offset;
 	range_spec.length = ftpState->size - ftpState->restarted_offset;
 	httpReplySetHeaders(reply, 1.0, HTTP_PARTIAL_CONTENT, "Gatewaying",
-	    mime_type, ftpState->size - ftpState->restarted_offset, ftpState->mdtm, -2);
+	    mime_type, ftpState->size - ftpState->restarted_offset,
+	    ftpState->mdtm, -2);
 	httpHeaderAddContRange(&reply->header, range_spec, ftpState->size);
     } else {
 	/* Full reply */
@@ -2529,7 +2489,8 @@
 	if (pe)
 	    storeRelease(pe);
 	storeRelease(e);
-    } else if (EBIT_TEST(e->flags, ENTRY_CACHABLE) && !ftpState->restarted_offset) {
+    } else if (EBIT_TEST(e->flags, ENTRY_CACHABLE)
+	&& !ftpState->restarted_offset) {
 	storeSetPublicKey(e);
     } else {
 	storeRelease(e);
@@ -2571,11 +2532,7 @@
     }
     snprintf(buf, MAX_URL, "%s://%s%s%s%s%s",
 	ProtocolStr[request->protocol],
-	loginbuf,
-	request->host,
-	portbuf,
-	"/%2f",
-	strBuf(request->urlpath));
+	loginbuf, request->host, portbuf, "/%2f", strBuf(request->urlpath));
     if ((t = strchr(buf, '?')))
 	*t = '\0';
     return buf;
Index: squid/src/globals.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/globals.h,v
retrieving revision 1.1.1.3.4.2.2.4
retrieving revision 1.1.1.3.4.2.2.4.2.1
diff -u -r1.1.1.3.4.2.2.4 -r1.1.1.3.4.2.2.4.2.1
--- squid/src/globals.h	29 Jul 2001 16:06:05 -0000	1.1.1.3.4.2.2.4
+++ squid/src/globals.h	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.2.2.4.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: globals.h,v 1.1.1.3.4.2.2.4 2001/07/29 16:06:05 serassio Exp $
+ * $Id: globals.h,v 1.1.1.3.4.2.2.4.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -65,7 +64,7 @@
 extern dnsStatData DnsStats;
 #ifdef _SQUID_MSWIN_
 extern sde *sd_table;		/* NULL */
-extern int Biggest_SD;		/* 0 */
+extern int Biggest_SD;		/* -1 */
 extern int Number_SD;		/* 0 */
 #endif
 extern fde *fd_table;		/* NULL */
@@ -144,7 +143,7 @@
 extern int _db_level;
 extern const int CacheDigestHashFuncCount;	/* 4 */
 extern CacheDigest *store_digest;	/* NULL */
-extern const char *StoreDigestFileName;		/* "store_digest" */
+extern const char *StoreDigestFileName;	/* "store_digest" */
 extern const char *StoreDigestMimeStr;	/* "application/cache-digest" */
 #if USE_CACHE_DIGESTS
 extern const Version CacheDigestVer;	/* { 5, 3 } */
@@ -160,9 +159,9 @@
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
 extern unsigned int WIN32_OS_version;	/* 0 */
 extern char *WIN32_OS_string;
-extern char *WIN32_Service_name; /* NULL */
+extern char *WIN32_Service_name;	/* NULL */
 extern unsigned int WIN32_run_mode;	/* _WIN_SQUID_RUN_MODE_INTERACTIVE */
 #if defined(_SQUID_MSWIN_) && defined(_DEBUG)
-extern int do_debug;	/* 0 */
+extern int do_debug;		/* 0 */
 #endif
 #endif
Index: squid/src/gopher.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/gopher.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/gopher.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.2.2.1
+++ squid/src/gopher.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,7 +1,5 @@
-
-
 /*
- * $Id: gopher.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: gopher.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -68,17 +66,20 @@
 #define TEMP_BUF_SIZE       4096
 #define MAX_CSO_RESULT      1024
 
-typedef struct gopher_ds {
+typedef struct gopher_ds
+{
     StoreEntry *entry;
     char host[SQUIDHOSTNAMELEN + 1];
-    enum {
+    enum
+    {
 	NORMAL,
 	HTML_DIR,
 	HTML_INDEX_RESULT,
 	HTML_CSO_RESULT,
 	HTML_INDEX_PAGE,
 	HTML_CSO_PAGE
-    } conversion;
+    }
+    conversion;
     int HTML_header_added;
     int port;
     char type_id;
@@ -89,16 +90,14 @@
     char *buf;			/* pts to a 4k page */
     int fd;
     FwdState *fwdState;
-} GopherStateData;
+}
+GopherStateData;
 
 static PF gopherStateFree;
 static void gopher_mime_content(MemBuf * mb, const char *name, const char *def);
 static void gopherMimeCreate(GopherStateData *);
 static int gopher_url_parser(const char *url,
-    char *host,
-    int *port,
-    char *type_id,
-    char *request);
+    char *host, int *port, char *type_id, char *request);
 static void gopherEndHTML(GopherStateData *);
 static void gopherToHTML(GopherStateData *, char *inbuf, int len);
 static PF gopherTimeout;
@@ -133,8 +132,7 @@
     char *cenc = mimeGetContentEncoding(name);
     if (cenc)
 	memBufPrintf(mb, "Content-Encoding: %s\r\n", cenc);
-    memBufPrintf(mb, "Content-Type: %s\r\n",
-	ctype ? ctype : def_ctype);
+    memBufPrintf(mb, "Content-Type: %s\r\n", ctype ? ctype : def_ctype);
 }
 
 
@@ -151,8 +149,7 @@
 	"HTTP/1.0 200 OK Gatewaying\r\n"
 	"Server: Squid/%s\r\n"
 	"Date: %s\r\n"
-	"MIME-version: 1.0\r\n",
-	version_string, mkrfc1123(squid_curtime));
+	"MIME-version: 1.0\r\n", version_string, mkrfc1123(squid_curtime));
 
     switch (gopherState->type_id) {
 
@@ -195,7 +192,8 @@
 
 /* Parse a gopher url into components.  By Anawat. */
 static int
-gopher_url_parser(const char *url, char *host, int *port, char *type_id, char *request)
+gopher_url_parser(const char *url, char *host, int *port, char *type_id,
+    char *request)
 {
     LOCAL_ARRAY(char, proto, MAX_URL);
     LOCAL_ARRAY(char, hostbuf, MAX_URL);
@@ -242,9 +240,7 @@
     /* parse to see type */
     gopher_url_parser(url,
 	gopherState->host,
-	&gopherState->port,
-	&gopherState->type_id,
-	gopherState->request);
+	&gopherState->port, &gopherState->type_id, gopherState->request);
     switch (gopherState->type_id) {
     case GOPHER_INDEX:
     case GOPHER_CSO:
@@ -301,8 +297,7 @@
 	    "<BODY><H1>%s<BR>Gopher Search</H1>\n"
 	    "<p>This is a searchable Gopher index. Use the search\n"
 	    "function of your browser to enter search terms.\n"
-	    "<ISINDEX></BODY></HTML>\n",
-	    storeUrl(entry), storeUrl(entry));
+	    "<ISINDEX></BODY></HTML>\n", storeUrl(entry), storeUrl(entry));
 	/* now let start sending stuff to client */
 	storeBufferFlush(entry);
 	gopherState->data_in = 1;
@@ -327,10 +322,12 @@
 
     if (!gopherState->HTML_header_added) {
 	if (gopherState->conversion == HTML_CSO_RESULT)
-	    strcat(outbuf, "<HTML><HEAD><TITLE>CSO Searchs Result</TITLE></HEAD>\n"
+	    strcat(outbuf,
+		"<HTML><HEAD><TITLE>CSO Searchs Result</TITLE></HEAD>\n"
 		"<BODY><H1>CSO Searchs Result</H1>\n<PRE>\n");
 	else
-	    strcat(outbuf, "<HTML><HEAD><TITLE>Gopher Menu</TITLE></HEAD>\n"
+	    strcat(outbuf,
+		"<HTML><HEAD><TITLE>Gopher Menu</TITLE></HEAD>\n"
 		"<BODY><H1>Gopher Menu</H1>\n<PRE>\n");
 	gopherState->HTML_header_added = 1;
     }
@@ -346,7 +343,10 @@
 		/* there is no complete line in inbuf */
 		/* copy it to temp buffer */
 		if (gopherState->len + len > TEMP_BUF_SIZE) {
-		    debug(10, 1) ("GopherHTML: Buffer overflow. Lost some data on URL: %s\n",
+		    debug(10, 1)
+
+			
+			("GopherHTML: Buffer overflow. Lost some data on URL: %s\n",
 			storeUrl(entry));
 		    len = TEMP_BUF_SIZE - gopherState->len;
 		}
@@ -372,7 +372,10 @@
 		/* there is no complete line in inbuf */
 		/* copy it to temp buffer */
 		if ((len - (pos - inbuf)) > TEMP_BUF_SIZE) {
-		    debug(10, 1) ("GopherHTML: Buffer overflow. Lost some data on URL: %s\n",
+		    debug(10, 1)
+
+			
+			("GopherHTML: Buffer overflow. Lost some data on URL: %s\n",
 			storeUrl(entry));
 		    len = TEMP_BUF_SIZE;
 		}
@@ -431,7 +434,8 @@
 				port[0] = 0;	/* 0 means none */
 			}
 			/* escape a selector here */
-			escaped_selector = xstrdup(rfc1738_escape_part(selector));
+			escaped_selector =
+			    xstrdup(rfc1738_escape_part(selector));
 
 			switch (gtype) {
 			case GOPHER_DIRECTORY:
@@ -474,17 +478,22 @@
 			memset(tmpbuf, '\0', TEMP_BUF_SIZE);
 			if ((gtype == GOPHER_TELNET) || (gtype == GOPHER_3270)) {
 			    if (strlen(escaped_selector) != 0)
-				snprintf(tmpbuf, TEMP_BUF_SIZE, "<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"telnet://%s@%s%s%s/\">%s</A>\n",
-				    icon_url, escaped_selector, rfc1738_escape_part(host),
-				    *port ? ":" : "", port, html_quote(name));
-			    else
-				snprintf(tmpbuf, TEMP_BUF_SIZE, "<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"telnet://%s%s%s/\">%s</A>\n",
-				    icon_url, rfc1738_escape_part(host), *port ? ":" : "",
+				snprintf(tmpbuf, TEMP_BUF_SIZE,
+				    "<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"telnet://%s@%s%s%s/\">%s</A>\n",
+				    icon_url, escaped_selector,
+				    rfc1738_escape_part(host), *port ? ":" : "",
 				    port, html_quote(name));
+			    else
+				snprintf(tmpbuf, TEMP_BUF_SIZE,
+				    "<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"telnet://%s%s%s/\">%s</A>\n",
+				    icon_url, rfc1738_escape_part(host),
+				    *port ? ":" : "", port, html_quote(name));
 
 			} else {
-			    snprintf(tmpbuf, TEMP_BUF_SIZE, "<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"gopher://%s/%c%s\">%s</A>\n",
-				icon_url, host, gtype, escaped_selector, html_quote(name));
+			    snprintf(tmpbuf, TEMP_BUF_SIZE,
+				"<IMG BORDER=0 SRC=\"%s\"> <A HREF=\"gopher://%s/%c%s\">%s</A>\n",
+				icon_url, host, gtype, escaped_selector,
+				html_quote(name));
 			}
 			safe_free(escaped_selector);
 			strcat(outbuf, tmpbuf);
@@ -518,10 +527,13 @@
 			break;
 
 		    if (gopherState->cso_recno != recno) {
-			snprintf(tmpbuf, TEMP_BUF_SIZE, "</PRE><HR><H2>Record# %d<br><i>%s</i></H2>\n<PRE>", recno, html_quote(result));
+			snprintf(tmpbuf, TEMP_BUF_SIZE,
+			    "</PRE><HR><H2>Record# %d<br><i>%s</i></H2>\n<PRE>",
+			    recno, html_quote(result));
 			gopherState->cso_recno = recno;
 		    } else {
-			snprintf(tmpbuf, TEMP_BUF_SIZE, "%s\n", html_quote(result));
+			snprintf(tmpbuf, TEMP_BUF_SIZE, "%s\n",
+			    html_quote(result));
 		    }
 		    strcat(outbuf, tmpbuf);
 		    gopherState->data_in = 1;
@@ -546,7 +558,9 @@
 		    case 502:	/* Too Many Matches */
 			{
 			    /* Print the message the server returns */
-			    snprintf(tmpbuf, TEMP_BUF_SIZE, "</PRE><HR><H2>%s</H2>\n<PRE>", html_quote(result));
+			    snprintf(tmpbuf, TEMP_BUF_SIZE,
+				"</PRE><HR><H2>%s</H2>\n<PRE>",
+				html_quote(result));
 			    strcat(outbuf, tmpbuf);
 			    gopherState->data_in = 1;
 			    break;
@@ -614,11 +628,7 @@
 #endif
     /* leave one space for \0 in gopherToHTML */
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, buf, read_sz);
-#else
     len = read(fd, buf, read_sz);
-#endif
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
 #if DELAY_POOLS
@@ -671,10 +681,7 @@
 	} else {
 	    storeAppend(entry, buf, len);
 	}
-	commSetSelect(fd,
-	    COMM_SELECT_READ,
-	    gopherReadReply,
-	    data, 0);
+	commSetSelect(fd, COMM_SELECT_READ, gopherReadReply, data, 0);
     }
     memFree(buf, MEM_4K_BUF);
     return;
@@ -761,12 +768,7 @@
 	snprintf(buf, 4096, "%s\r\n", gopherState->request);
     }
     debug(10, 5) ("gopherSendRequest: FD %d\n", fd);
-    comm_write(fd,
-	buf,
-	strlen(buf),
-	gopherSendComplete,
-	data,
-	memFree4K);
+    comm_write(fd, buf, strlen(buf), gopherSendComplete, data, memFree4K);
     if (EBIT_TEST(gopherState->entry->flags, ENTRY_CACHABLE))
 	storeSetPublicKey(gopherState->entry);	/* Make it public */
 }
@@ -783,8 +785,8 @@
     Counter.server.all.requests++;
     Counter.server.other.requests++;
     /* Parse url. */
-    if (gopher_url_parser(storeUrl(entry), gopherState->host, &gopherState->port,
-	    &gopherState->type_id, gopherState->request)) {
+    if (gopher_url_parser(storeUrl(entry), gopherState->host,
+	    &gopherState->port, &gopherState->type_id, gopherState->request)) {
 	ErrorState *err;
 	err = errorCon(ERR_INVALID_URL, HTTP_BAD_REQUEST);
 	err->url = xstrdup(storeUrl(entry));
@@ -793,7 +795,8 @@
 	return;
     }
     comm_add_close_handler(fd, gopherStateFree, gopherState);
-    if (((gopherState->type_id == GOPHER_INDEX) || (gopherState->type_id == GOPHER_CSO))
+    if (((gopherState->type_id == GOPHER_INDEX)
+	    || (gopherState->type_id == GOPHER_CSO))
 	&& (strchr(gopherState->request, '?') == NULL)) {
 	/* Index URL without query word */
 	/* We have to generate search page back to client. No need for connection */
@@ -826,4 +829,4 @@
     gd->buf = memAllocate(MEM_4K_BUF);
     return (gd);
 }
-#endif GOPHER_C
+#endif /* GOPHER_C */
Index: squid/src/helper.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/helper.c,v
retrieving revision 1.1.1.3.24.1
retrieving revision 1.1.1.3.24.1.2.1
diff -u -r1.1.1.3.24.1 -r1.1.1.3.24.1.2.1
--- squid/src/helper.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.24.1
+++ squid/src/helper.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.24.1.2.1
@@ -1,5 +1,6 @@
 #ifndef HELPER_C
 #define HELPER_C
+
 #include "squid.h"
 
 #define HELPER_MAX_ARGS 64
@@ -17,7 +18,6 @@
 void
 helperOpenServers(helper * hlp)
 {
-#ifndef _SQUID_MSWIN_
     char *s;
     char *progname;
     char *shortname;
@@ -31,6 +31,11 @@
     int rfd;
     int wfd;
     wordlist *w;
+#ifdef _SQUID_MSWIN_
+    HANDLE hIpc;
+    pid_t pid;
+#endif
+
     if (hlp->cmdline == NULL)
 	return;
     progname = hlp->cmdline->key;
@@ -50,12 +55,11 @@
     for (k = 0; k < hlp->n_to_start; k++) {
 	getCurrentTime();
 	rfd = wfd = -1;
-	x = ipcCreate(hlp->ipc_type,
-	    progname,
-	    args,
-	    shortname,
-	    &rfd,
-	    &wfd);
+	x = ipcCreate(hlp->ipc_type, progname, args, shortname, &rfd, &wfd
+#ifdef _SQUID_MSWIN_
+	    , &hIpc, &pid
+#endif
+	    );
 	if (x < 0) {
 	    debug(29, 1) ("WARNING: Cannot run '%s' process.\n", progname);
 	    continue;
@@ -71,15 +75,21 @@
 	srv->buf_sz = 8192;
 	srv->offset = 0;
 	srv->parent = hlp;
+#ifdef _SQUID_MSWIN_
+	srv->hIpc = hIpc;
+	srv->pid = pid;
+#endif
 	cbdataLock(hlp);	/* lock because of the parent backlink */
 	dlinkAddTail(srv, &srv->link, &hlp->servers);
 	if (rfd == wfd) {
 	    snprintf(fd_note_buf, FD_DESC_SZ, "%s #%d", shortname, k + 1);
 	    fd_note(rfd, fd_note_buf);
 	} else {
-	    snprintf(fd_note_buf, FD_DESC_SZ, "reading %s #%d", shortname, k + 1);
+	    snprintf(fd_note_buf, FD_DESC_SZ, "reading %s #%d", shortname,
+		k + 1);
 	    fd_note(rfd, fd_note_buf);
-	    snprintf(fd_note_buf, FD_DESC_SZ, "writing %s #%d", shortname, k + 1);
+	    snprintf(fd_note_buf, FD_DESC_SZ, "writing %s #%d", shortname,
+		k + 1);
 	    fd_note(wfd, fd_note_buf);
 	}
 	commSetNonBlocking(rfd);
@@ -90,7 +100,6 @@
     safe_free(shortname);
     safe_free(procname);
     helperKickQueue(hlp);
-#endif 
 }
 
 void
@@ -121,35 +130,25 @@
     double tt;
     storeAppendPrintf(sentry, "number running: %d of %d\n",
 	hlp->n_running, hlp->n_to_start);
-    storeAppendPrintf(sentry, "requests sent: %d\n",
-	hlp->stats.requests);
-    storeAppendPrintf(sentry, "replies received: %d\n",
-	hlp->stats.replies);
-    storeAppendPrintf(sentry, "queue length: %d\n",
-	hlp->stats.queue_size);
+    storeAppendPrintf(sentry, "requests sent: %d\n", hlp->stats.requests);
+    storeAppendPrintf(sentry, "replies received: %d\n", hlp->stats.replies);
+    storeAppendPrintf(sentry, "queue length: %d\n", hlp->stats.queue_size);
     storeAppendPrintf(sentry, "avg service time: %d msec\n",
 	hlp->stats.avg_svc_time);
     storeAppendPrintf(sentry, "\n");
     storeAppendPrintf(sentry, "%7s\t%7s\t%11s\t%s\t%7s\t%7s\n",
-	"#",
-	"FD",
-	"# Requests",
-	"Flags",
-	"Time",
-	"Offset");
+	"#", "FD", "# Requests", "Flags", "Time", "Offset");
     for (link = hlp->servers.head; link; link = link->next) {
 	srv = link->data;
 	tt = 0.001 * tvSubMsec(srv->dispatch_time, current_time);
-	storeAppendPrintf(sentry, "%7d\t%7d\t%11d\t%c%c%c%c\t%7.3f\t%7d\n",
-	    srv->index + 1,
-	    srv->rfd,
+	storeAppendPrintf(sentry, "%7d\t%7d\t%11ld\t%c%c%c%c\t%7.3f\t%7d\n",
+	    srv->index + 1, srv->rfd,
 	    srv->stats.uses,
 	    srv->flags.alive ? 'A' : ' ',
 	    srv->flags.busy ? 'B' : ' ',
 	    srv->flags.closing ? 'C' : ' ',
 	    srv->flags.shutdown ? 'S' : ' ',
-	    tt < 0.0 ? 0.0 : tt,
-	    (int) srv->offset);
+	    tt < 0.0 ? 0.0 : tt, (int) srv->offset);
     }
     storeAppendPrintf(sentry, "\nFlags key:\n\n");
     storeAppendPrintf(sentry, "   A = ALIVE\n");
@@ -163,6 +162,11 @@
 {
     dlink_node *link = hlp->servers.head;
     helper_server *srv;
+#ifdef _SQUID_MSWIN_
+    HANDLE hIpc;
+    pid_t pid;
+    int no;
+#endif
     while (link) {
 	srv = link->data;
 	link = link->next;
@@ -183,7 +187,24 @@
 	    continue;
 	}
 	srv->flags.closing = 1;
+#ifdef _SQUID_MSWIN_
+	hIpc = srv->hIpc;
+	pid = srv->pid;
+	no = srv->index + 1;
+	shutdown(srv->rfd, SD_BOTH);
+#endif
 	comm_close(srv->rfd);
+#ifdef _SQUID_MSWIN_
+	if (hIpc) {
+	    if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
+		getCurrentTime();
+		debug(34, 1) ("helperShutdown: WARNING: %s #%d (%s,%ld) "
+		    "didn't exit in 5 seconds\n",
+		    hlp->id_name, no, hlp->cmdline->key, pid);
+	    }
+	    CloseHandle(hIpc);
+	}
+#endif
     }
 }
 
@@ -253,17 +274,14 @@
     assert(fd == srv->rfd);
     assert(cbdataValid(data));
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, srv->buf + srv->offset, srv->buf_sz - srv->offset);
-#else
     len = read(fd, srv->buf + srv->offset, srv->buf_sz - srv->offset);
-#endif
     fd_bytes(fd, len, FD_READ);
     debug(29, 5) ("helperHandleRead: %d bytes from %s #%d.\n",
 	len, hlp->id_name, srv->index + 1);
     if (len <= 0) {
 	if (len < 0)
-	    debug(50, 1) ("helperHandleRead: FD %d read: %s\n", fd, xstrerror());
+	    debug(50, 1) ("helperHandleRead: FD %d read: %s\n", fd,
+		xstrerror());
 	comm_close(fd);
 	return;
     }
@@ -272,7 +290,8 @@
     r = srv->request;
     if (r == NULL) {
 	/* someone spoke without being spoken to */
-	debug(29, 1) ("helperHandleRead: unexpected read from %s #%d, %d bytes\n",
+	debug(29,
+	    1) ("helperHandleRead: unexpected read from %s #%d, %d bytes\n",
 	    hlp->id_name, srv->index + 1, len);
 	srv->offset = 0;
     } else if ((t = strchr(srv->buf, '\n'))) {
@@ -313,10 +332,13 @@
 	return;
     hlp->last_queue_warn = squid_curtime;
     debug(14, 0) ("WARNING: All %s processes are busy.\n", hlp->id_name);
-    debug(14, 0) ("WARNING: %d pending requests queued\n", hlp->stats.queue_size);
+    debug(14, 0) ("WARNING: %d pending requests queued\n",
+	hlp->stats.queue_size);
     if (hlp->stats.queue_size > hlp->n_running * 2)
 	fatalf("Too many queued %s requests", hlp->id_name);
-    debug(14, 1) ("Consider increasing the number of %s processes in your config file.\n", hlp->id_name);
+    debug(14, 1)
+	("Consider increasing the number of %s processes in your config file.\n",
+	hlp->id_name);
 }
 
 static helper_request *
@@ -364,16 +386,10 @@
     srv->flags.busy = 1;
     srv->request = r;
     srv->dispatch_time = current_time;
-    comm_write(srv->wfd,
-	r->buf,
-	strlen(r->buf),
-	NULL,			/* Handler */
+    comm_write(srv->wfd, r->buf, strlen(r->buf), NULL,	/* Handler */
 	NULL,			/* Handler-data */
 	NULL);			/* free */
-    commSetSelect(srv->rfd,
-	COMM_SELECT_READ,
-	helperHandleRead,
-	srv, 0);
+    commSetSelect(srv->rfd, COMM_SELECT_READ, helperHandleRead, srv, 0);
     debug(29, 5) ("helperDispatch: Request sent to %s #%d, %d bytes\n",
 	hlp->id_name, srv->index + 1, strlen(r->buf));
     srv->stats.uses++;
@@ -396,4 +412,4 @@
     xfree(r->buf);
     memFree(r, MEM_HELPER_REQUEST);
 }
-#endif// HELPER_C
+#endif // HELPER_C
Index: squid/src/htcp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/htcp.c,v
retrieving revision 1.1.1.2.4.1.2.2
retrieving revision 1.1.1.2.4.1.2.2.2.1
diff -u -r1.1.1.2.4.1.2.2 -r1.1.1.2.4.1.2.2.2.1
--- squid/src/htcp.c	14 Jun 2001 21:34:24 -0000	1.1.1.2.4.1.2.2
+++ squid/src/htcp.c	27 Aug 2001 21:48:21 -0000	1.1.1.2.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: htcp.c,v 1.1.1.2.4.1.2.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: htcp.c,v 1.1.1.2.4.1.2.2.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -44,18 +43,21 @@
 typedef struct _htcpSpecifier htcpSpecifier;
 typedef struct _htcpDetail htcpDetail;
 
-struct _Countstr {
+struct _Countstr
+{
     u_short length;
     char *text;
 };
 
-struct _htcpHeader {
+struct _htcpHeader
+{
     u_short length;
     u_char major;
     u_char minor;
 };
 
-struct _htcpDataHeader {
+struct _htcpDataHeader
+{
     u_short length;
 #if !WORDS_BIGENDIAN
     unsigned int opcode:4;
@@ -81,7 +83,8 @@
     /* RR == 0 --> REQUEST */
     /* RR == 1 --> RESPONSE */
 
-struct _htcpAuthHeader {
+struct _htcpAuthHeader
+{
     u_short length;
     time_t sig_time;
     time_t sig_expire;
@@ -89,20 +92,23 @@
     Countstr signature;
 };
 
-struct _htcpSpecifier {
+struct _htcpSpecifier
+{
     char *method;
     char *uri;
     char *version;
     char *req_hdrs;
 };
 
-struct _htcpDetail {
+struct _htcpDetail
+{
     char *resp_hdrs;
     char *entity_hdrs;
     char *cache_hdrs;
 };
 
-struct _htcpStuff {
+struct _htcpStuff
+{
     int op;
     int rr;
     int f1;
@@ -112,7 +118,8 @@
     htcpDetail D;
 };
 
-enum {
+enum
+{
     HTCP_NOP,
     HTCP_TST,
     HTCP_MON,
@@ -121,8 +128,7 @@
     HTCP_END
 };
 
-static const char *const htcpOpcodeStr[] =
-{
+static const char *const htcpOpcodeStr[] = {
     "HTCP_NOP",
     "HTCP_TST",
     "HTCP_MON",
@@ -134,7 +140,8 @@
 /*
  * values for htcpDataHeader->response
  */
-enum {
+enum
+{
     AUTH_REQUIRED,
     AUTH_FAILURE,
     OPCODE_UNIMPLEMENTED,
@@ -146,7 +153,8 @@
 /*
  * values for htcpDataHeader->RR
  */
-enum {
+enum
+{
     RR_REQUEST,
     RR_RESPONSE
 };
@@ -172,15 +180,22 @@
 static void htcpFreeDetail(htcpDetail * s);
 static void htcpHandle(char *buf, int sz, struct sockaddr_in *from);
 static void htcpHandleData(char *buf, int sz, struct sockaddr_in *from);
-static void htcpHandleMon(htcpDataHeader *, char *buf, int sz, struct sockaddr_in *from);
-static void htcpHandleNop(htcpDataHeader *, char *buf, int sz, struct sockaddr_in *from);
-static void htcpHandleSet(htcpDataHeader *, char *buf, int sz, struct sockaddr_in *from);
-static void htcpHandleTst(htcpDataHeader *, char *buf, int sz, struct sockaddr_in *from);
+static void htcpHandleMon(htcpDataHeader *, char *buf, int sz,
+    struct sockaddr_in *from);
+static void htcpHandleNop(htcpDataHeader *, char *buf, int sz,
+    struct sockaddr_in *from);
+static void htcpHandleSet(htcpDataHeader *, char *buf, int sz,
+    struct sockaddr_in *from);
+static void htcpHandleTst(htcpDataHeader *, char *buf, int sz,
+    struct sockaddr_in *from);
 static void htcpRecv(int fd, void *data);
 static void htcpSend(const char *buf, int len, struct sockaddr_in *to);
-static void htcpTstReply(htcpDataHeader *, StoreEntry *, htcpSpecifier *, struct sockaddr_in *);
-static void htcpHandleTstRequest(htcpDataHeader *, char *buf, int sz, struct sockaddr_in *from);
-static void htcpHandleTstResponse(htcpDataHeader *, char *, int, struct sockaddr_in *);
+static void htcpTstReply(htcpDataHeader *, StoreEntry *, htcpSpecifier *,
+    struct sockaddr_in *);
+static void htcpHandleTstRequest(htcpDataHeader *, char *buf, int sz,
+    struct sockaddr_in *from);
+static void htcpHandleTstResponse(htcpDataHeader *, char *, int,
+    struct sockaddr_in *);
 static StoreEntry *htcpCheckHit(const htcpSpecifier *);
 
 static void
@@ -314,8 +329,7 @@
 htcpBuildOpData(char *buf, size_t buflen, htcpStuff * stuff)
 {
     ssize_t off = 0;
-    debug(31, 3) ("htcpBuildOpData: opcode %s\n",
-	htcpOpcodeStr[stuff->op]);
+    debug(31, 3) ("htcpBuildOpData: opcode %s\n", htcpOpcodeStr[stuff->op]);
     switch (stuff->op) {
     case HTCP_TST:
 	off = htcpBuildTstOpData(buf + off, buflen, stuff);
@@ -400,12 +414,10 @@
 	inet_ntoa(to->sin_addr), (int) ntohs(to->sin_port));
     htcpHexdump("htcpSend", buf, len);
     x = comm_udp_sendto(htcpOutSocket,
-	to,
-	sizeof(struct sockaddr_in),
-	buf,
-	len);
+	to, sizeof(struct sockaddr_in), buf, len);
     if (x < 0)
-	debug(31, 0) ("htcpSend: FD %d sendto: %s\n", htcpOutSocket, xstrerror());
+	debug(31, 0) ("htcpSend: FD %d sendto: %s\n", htcpOutSocket,
+	    xstrerror());
 }
 
 /*
@@ -535,7 +547,8 @@
 }
 
 static void
-htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct sockaddr_in *from)
+htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec,
+    struct sockaddr_in *from)
 {
     htcpStuff stuff;
     char *pkt;
@@ -564,8 +577,7 @@
 	stuff.S.version = spec->version;
 	stuff.S.req_hdrs = spec->req_hdrs;
 	httpHeaderPutInt(&hdr, HDR_AGE,
-	    e->timestamp <= squid_curtime ?
-	    squid_curtime - e->timestamp : 0);
+	    e->timestamp <= squid_curtime ? squid_curtime - e->timestamp : 0);
 	httpHeaderPackInto(&hdr, &p);
 	stuff.D.resp_hdrs = xstrdup(mb.buf);
 	debug(31, 3) ("htcpTstReply: resp_hdrs = {%s}\n", stuff.D.resp_hdrs);
@@ -577,7 +589,8 @@
 	    httpHeaderPutTime(&hdr, HDR_LAST_MODIFIED, e->lastmod);
 	httpHeaderPackInto(&hdr, &p);
 	stuff.D.entity_hdrs = xstrdup(mb.buf);
-	debug(31, 3) ("htcpTstReply: entity_hdrs = {%s}\n", stuff.D.entity_hdrs);
+	debug(31, 3) ("htcpTstReply: entity_hdrs = {%s}\n",
+	    stuff.D.entity_hdrs);
 	memBufReset(&mb);
 	httpHeaderReset(&hdr);
 	if ((host = urlHostname(spec->uri))) {
@@ -655,7 +668,8 @@
 }
 
 static void
-htcpHandleTstResponse(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from)
+htcpHandleTstResponse(htcpDataHeader * hdr, char *buf, int sz,
+    struct sockaddr_in *from)
 {
     htcpReplyData htcpReply;
     cache_key *key = NULL;
@@ -668,7 +682,8 @@
     memset(&htcpReply, '\0', sizeof(htcpReply));
     httpHeaderInit(&htcpReply.hdr, hoHtcpReply);
     htcpReply.msg_id = hdr->msg_id;
-    debug(31, 3) ("htcpHandleTstResponse: msg_id = %d\n", (int) htcpReply.msg_id);
+    debug(31, 3) ("htcpHandleTstResponse: msg_id = %d\n",
+	(int) htcpReply.msg_id);
     htcpReply.hit = hdr->response ? 0 : 1;
     if (hdr->F1) {
 	debug(31, 3) ("htcpHandleTstResponse: MISS\n");
@@ -687,7 +702,8 @@
 	    httpHeaderParse(&htcpReply.hdr, t, t + strlen(t));
     }
     key = queried_keys[htcpReply.msg_id % N_QUERIED_KEYS];
-    debug(31, 3) ("htcpHandleTstResponse: key (%p) %s\n", key, storeKeyText(key));
+    debug(31, 3) ("htcpHandleTstResponse: key (%p) %s\n", key,
+	storeKeyText(key));
     neighborsHtcpReply(key, &htcpReply, from);
     httpHeaderClean(&htcpReply.hdr);
     if (d)
@@ -695,7 +711,8 @@
 }
 
 static void
-htcpHandleTstRequest(htcpDataHeader * dhdr, char *buf, int sz, struct sockaddr_in *from)
+htcpHandleTstRequest(htcpDataHeader * dhdr, char *buf, int sz,
+    struct sockaddr_in *from)
 {
     /* buf should be a SPECIFIER */
     htcpSpecifier *s;
@@ -712,12 +729,10 @@
 	return;
     }
     debug(31, 3) ("htcpHandleTstRequest: %s %s %s\n",
-	s->method,
-	s->uri,
-	s->version);
+	s->method, s->uri, s->version);
     debug(31, 3) ("htcpHandleTstRequest: %s\n", s->req_hdrs);
     if ((e = htcpCheckHit(s)))
-	htcpTstReply(dhdr, e, s, from);		/* hit */
+	htcpTstReply(dhdr, e, s, from);	/* hit */
     else
 	htcpTstReply(dhdr, NULL, NULL, from);	/* cache miss */
     htcpFreeSpecifier(s);
@@ -740,7 +755,8 @@
 {
     htcpDataHeader hdr;
     if (sz < sizeof(htcpDataHeader)) {
-	debug(31, 0) ("htcpHandleData: msg size less than htcpDataHeader size\n");
+	debug(31,
+	    0) ("htcpHandleData: msg size less than htcpDataHeader size\n");
 	return;
     }
     xmemcpy(&hdr, buf, sizeof(htcpDataHeader));
@@ -840,16 +856,8 @@
 htcpInit(void)
 {
     enter_suid();
-    htcpInSocket = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_UDP,
-#else
-	0,
-#endif
-	Config.Addrs.udp_incoming,
-	Config.Port.htcp,
-	COMM_NONBLOCKING,
-	"HTCP Socket");
+    htcpInSocket = comm_open(SOCK_DGRAM, 0, Config.Addrs.udp_incoming,
+	Config.Port.htcp, COMM_NONBLOCKING, "HTCP Socket");
     leave_suid();
     if (htcpInSocket < 0)
 	fatal("Cannot open HTCP Socket");
@@ -858,16 +866,8 @@
 	(int) Config.Port.htcp, htcpInSocket);
     if (Config.Addrs.udp_outgoing.s_addr != no_addr.s_addr) {
 	enter_suid();
-	htcpOutSocket = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
-#else
-	    0,
-#endif
-	    Config.Addrs.udp_outgoing,
-	    Config.Port.htcp,
-	    COMM_NONBLOCKING,
-	    "Outgoing HTCP Socket");
+	htcpOutSocket = comm_open(SOCK_DGRAM, 0, Config.Addrs.udp_outgoing,
+	    Config.Port.htcp, COMM_NONBLOCKING, "Outgoing HTCP Socket");
 	leave_suid();
 	if (htcpOutSocket < 0)
 	    fatal("Cannot open Outgoing HTCP Socket");
Index: squid/src/http.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/http.c,v
retrieving revision 1.1.1.3.4.3.2.2
retrieving revision 1.1.1.3.4.3.2.2.2.1
diff -u -r1.1.1.3.4.3.2.2 -r1.1.1.3.4.3.2.2.2.1
--- squid/src/http.c	29 Jul 2001 09:10:28 -0000	1.1.1.3.4.3.2.2
+++ squid/src/http.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.3.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: http.c,v 1.1.1.3.4.3.2.2 2001/07/29 09:10:28 serassio Exp $
+ * $Id: http.c,v 1.1.1.3.4.3.2.2.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -335,7 +334,9 @@
     strncat(httpState->reply_hdr, buf, room < size ? room : size);
     hdr_len += room < size ? room : size;
     if (hdr_len > 4 && strncmp(httpState->reply_hdr, "HTTP/", 5)) {
-	debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr);
+	debug(11,
+	    3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n",
+	    httpState->reply_hdr);
 	httpState->reply_hdr_state += 2;
 	reply->sline.status = HTTP_INVALID_HEADER;
 	return;
@@ -360,7 +361,8 @@
     httpReplyParse(reply, httpState->reply_hdr, hdr_len);
     storeTimestampsSet(entry);
     /* Check if object is cacheable or not based on reply code */
-    debug(11, 3) ("httpProcessReplyHeader: HTTP CODE: %d\n", reply->sline.status);
+    debug(11, 3) ("httpProcessReplyHeader: HTTP CODE: %d\n",
+	reply->sline.status);
     if (neighbors_do_private_keys)
 	httpMaybeRemovePublic(entry, reply->sline.status);
     switch (httpCachableReply(httpState)) {
@@ -479,12 +481,7 @@
     read_sz = delayBytesWanted(delay_id, 1, read_sz);
 #endif
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, buf, read_sz);
-    errno = WSAGetLastError();
-#else
     len = read(fd, buf, read_sz);
-#endif
     debug(11, 5) ("httpReadReply: FD %d: len %d.\n", fd, len);
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
@@ -511,11 +508,7 @@
     }
     if (len < 0) {
 	debug(50, 2) ("httpReadReply: FD %d: read failure: %s.\n",
-#ifdef _SQUID_MSWIN_
 	    fd, xstrerror());
-#else
-	    fd, wsastrerror(errno));
-#endif
 	if (ignoreErrno(errno)) {
 	    commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0);
 	} else if (entry->mem_obj->inmem_hi == 0) {
@@ -637,10 +630,7 @@
 void
 httpBuildRequestHeader(request_t * request,
     request_t * orig_request,
-    StoreEntry * entry,
-    HttpHeader * hdr_out,
-    int cfd,
-    http_state_flags flags)
+    StoreEntry * entry, HttpHeader * hdr_out, int cfd, http_state_flags flags)
 {
     /* building buffer for complex strings */
 #define BBUF_SZ (MAX_URL+32)
@@ -666,8 +656,15 @@
      *  the server and fetch only the requested content) 
      */
     we_do_ranges =
-	orig_request->range && orig_request->flags.cachable && !httpHdrRangeWillBeComplex(orig_request->range) && (Config.rangeOffsetLimit == -1 || httpHdrRangeFirstOffset(orig_request->range) <= Config.rangeOffsetLimit);
-    debug(11, 8) ("httpBuildRequestHeader: range specs: %p, cachable: %d; we_do_ranges: %d\n",
+	orig_request->range && orig_request->flags.cachable
+	&& !httpHdrRangeWillBeComplex(orig_request->range)
+	&& (Config.rangeOffsetLimit == -1
+	|| httpHdrRangeFirstOffset(orig_request->range) <=
+	Config.rangeOffsetLimit);
+    debug(11, 8)
+
+	
+	("httpBuildRequestHeader: range specs: %p, cachable: %d; we_do_ranges: %d\n",
 	orig_request->range, orig_request->flags.cachable, we_do_ranges);
 
     strConnection = httpHeaderGetList(hdr_in, HDR_CONNECTION);
@@ -784,7 +781,8 @@
 	if (!cc)
 	    cc = httpHdrCcCreate();
 	if (!EBIT_TEST(cc->mask, CC_MAX_AGE)) {
-	    const char *url = entry ? storeUrl(entry) : urlCanonical(orig_request);
+	    const char *url =
+		entry ? storeUrl(entry) : urlCanonical(orig_request);
 	    httpHdrCcSetMaxAge(cc, getMaxAge(url));
 	    if (strLen(request->urlpath))
 		assert(strstr(url, strBuf(request->urlpath)));
@@ -809,11 +807,8 @@
  * return the length of the prefix */
 mb_size_t
 httpBuildRequestPrefix(request_t * request,
-    request_t * orig_request,
-    StoreEntry * entry,
-    MemBuf * mb,
-    int cfd,
-    http_state_flags flags)
+request_t * orig_request,
+StoreEntry * entry, MemBuf * mb, int cfd, http_state_flags flags)
 {
     const int offset = mb->size;
     memBufPrintf(mb, "%s %s HTTP/1.0\r\n",
@@ -844,7 +839,8 @@
     peer *p = httpState->peer;
     CWCB *sendHeaderDone;
 
-    debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", httpState->fd, httpState);
+    debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", httpState->fd,
+	httpState);
 
     if (httpState->orig_request->content_length > 0)
 	sendHeaderDone = httpSendRequestEntry;
@@ -873,18 +869,15 @@
 	httpState->flags.keepalive = 1;
     else if (p->stats.n_keepalives_sent < 10)
 	httpState->flags.keepalive = 1;
-    else if ((double) p->stats.n_keepalives_recv / (double) p->stats.n_keepalives_sent > 0.50)
+    else if ((double) p->stats.n_keepalives_recv /
+	(double) p->stats.n_keepalives_sent > 0.50)
 	httpState->flags.keepalive = 1;
     if (httpState->peer)
 	if (neighborType(httpState->peer, httpState->request) == PEER_SIBLING)
 	    httpState->flags.only_if_cached = 1;
     memBufDefInit(&mb);
     httpBuildRequestPrefix(req,
-	httpState->orig_request,
-	entry,
-	&mb,
-	cfd,
-	httpState->flags);
+	httpState->orig_request, entry, &mb, cfd, httpState->flags);
     debug(11, 6) ("httpSendRequest: FD %d:\n%s\n", httpState->fd, mb.buf);
     comm_write_mbuf(httpState->fd, mb, sendHeaderDone, httpState);
 }
@@ -897,8 +890,7 @@
     request_t *proxy_req;
     request_t *orig_req = fwd->request;
     debug(11, 3) ("httpStart: \"%s %s\"\n",
-	RequestMethodStr[orig_req->method],
-	storeUrl(fwd->entry));
+	RequestMethodStr[orig_req->method], storeUrl(fwd->entry));
     cbdataAdd(httpState, memFree, MEM_HTTP_STATE_DATA);
     storeLockObject(fwd->entry);
     httpState->fwd = fwd;
@@ -947,7 +939,8 @@
 }
 
 static void
-httpSendRequestEntry(int fd, char *bufnotused, size_t size, int errflag, void *data)
+httpSendRequestEntry(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     HttpStateData *httpState = data;
     StoreEntry *entry = httpState->entry;
@@ -977,7 +970,8 @@
 }
 
 static void
-httpSendRequestEntryDone(int fd, char *bufnotused, size_t size, int errflag, void *data)
+httpSendRequestEntryDone(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     HttpStateData *httpState = data;
     StoreEntry *entry = httpState->entry;
@@ -1013,4 +1007,4 @@
 	comm_write(fd, "\r\n", 2, httpSendComplete, data, NULL);
     }
 }
-#endif //HTTP_C
\ No newline at end of file
+#endif /// HTTP_C
Index: squid/src/icmp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icmp.c,v
retrieving revision 1.1.1.2.4.2.2.1
retrieving revision 1.1.1.2.4.2.2.1.2.1
diff -u -r1.1.1.2.4.2.2.1 -r1.1.1.2.4.2.2.1.2.1
--- squid/src/icmp.c	6 Jan 2001 12:40:14 -0000	1.1.1.2.4.2.2.1
+++ squid/src/icmp.c	27 Aug 2001 21:48:21 -0000	1.1.1.2.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: icmp.c,v 1.1.1.2.4.2.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: icmp.c,v 1.1.1.2.4.2.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -47,7 +46,13 @@
 static PF icmpRecv;
 static void icmpSend(pingerEchoData * pkt, int len);
 #if ALLOW_SOURCE_PING
-static void icmpHandleSourcePing(const struct sockaddr_in *from, const char *buf);
+static void icmpHandleSourcePing(const struct sockaddr_in *from,
+    const char *buf);
+#endif
+
+#ifdef _SQUID_MSWIN_
+static HANDLE hIpc;
+static pid_t pid;
 #endif
 
 static void
@@ -74,10 +79,7 @@
     commSetSelect(icmp_sock, COMM_SELECT_READ, icmpRecv, NULL, 0);
     memset(&preply, '\0', sizeof(pingerReplyData));
     Counter.syscalls.sock.recvfroms++;
-    n = recv(icmp_sock,
-	(char *) &preply,
-	sizeof(pingerReplyData),
-	0);
+    n = recv(icmp_sock, (char *) &preply, sizeof(pingerReplyData), 0);
     if (n < 0) {
 	debug(50, 1) ("icmpRecv: recv: %s\n", xstrerror());
 	if (++fail_count == 10 || errno == ECONNREFUSED)
@@ -197,18 +199,18 @@
     args[0] = "(pinger)";
     args[1] = NULL;
     x = ipcCreate(IPC_UDP_SOCKET,
-	Config.Program.pinger,
-	args,
-	"Pinger Socket",
-	&rfd,
-	&wfd);
+	Config.Program.pinger, args, "Pinger Socket", &rfd, &wfd
+#ifdef _SQUID_MSWIN_
+	, &hIpc, &pid
+#endif
+	);
     if (x < 0)
 	return;
     assert(rfd == wfd);
     icmp_sock = rfd;
     commSetSelect(icmp_sock, COMM_SELECT_READ, icmpRecv, NULL, 0);
     commSetTimeout(icmp_sock, -1, NULL, NULL);
-    debug(29, 1) ("Pinger socket opened on FD %d\n", icmp_sock);
+    debug(37, 1) ("Pinger socket opened on FD %d\n", icmp_sock);
 #endif
 }
 
@@ -218,9 +220,23 @@
 #if USE_ICMP
     if (icmp_sock < 0)
 	return;
-    debug(29, 1) ("Closing Pinger socket on FD %d\n", icmp_sock);
+    debug(37, 1) ("Closing Pinger socket on FD %d\n", icmp_sock);
+#ifdef _SQUID_MSWIN_
+    send(icmp_sock, "$shutdown\n", 10, 0);
+#endif
     comm_close(icmp_sock);
+#ifdef _SQUID_MSWIN_
+    if (hIpc) {
+	if (WaitForSingleObject(hIpc, 12000) != WAIT_OBJECT_0) {
+	    getCurrentTime();
+	    debug(34, 1)
+		("icmpClose: WARNING: (pinger,%ld) didn't exit in 12 seconds\n",
+		pid);
+	}
+	CloseHandle(hIpc);
+    }
+#endif
     icmp_sock = -1;
 #endif
 }
-#undef ICMP_C
\ No newline at end of file
+#undef ICMP_C
Index: squid/src/icp_v2.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v2.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/icp_v2.c	14 Jun 2001 21:34:24 -0000	1.1.1.3.4.1.2.2
+++ squid/src/icp_v2.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: icp_v2.c,v 1.1.1.3.4.1.2.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: icp_v2.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -46,7 +45,8 @@
 static icpUdpData *IcpQueueTail = NULL;
 
 static void
-icpLogIcp(struct in_addr caddr, log_type logcode, int len, const char *url, int delay)
+icpLogIcp(struct in_addr caddr, log_type logcode, int len, const char *url,
+    int delay)
 {
     AccessLogEntry al;
     if (LOG_TAG_NONE == logcode)
@@ -84,12 +84,8 @@
 }
 
 void *
-icpCreateMessage(
-    icp_opcode opcode,
-    int flags,
-    const char *url,
-    int reqnum,
-    int pad)
+icpCreateMessage(icp_opcode opcode,
+    int flags, const char *url, int reqnum, int pad)
 {
     char *buf = NULL;
     icp_common_t *headerp = NULL;
@@ -117,9 +113,7 @@
 int
 icpUdpSend(int fd,
     const struct sockaddr_in *to,
-    icp_common_t * msg,
-    log_type logcode,
-    int delay)
+    icp_common_t * msg, log_type logcode, int delay)
 {
     icpUdpData *queue;
     int x;
@@ -128,9 +122,7 @@
     debug(12, 5) ("icpUdpSend: FD %d sending %s, %d bytes to %s:%d\n",
 	fd,
 	icp_opcode_str[msg->opcode],
-	len,
-	inet_ntoa(to->sin_addr),
-	ntohs(to->sin_port));
+	len, inet_ntoa(to->sin_addr), ntohs(to->sin_port));
     x = comm_udp_sendto(fd, to, sizeof(*to), msg, len);
     if (x >= 0) {
 	/* successfully written */
@@ -252,9 +244,11 @@
 	}
 	/* The peer is allowed to use this cache */
 	entry = storeGetPublic(url, METHOD_GET);
-	debug(12, 5) ("icpHandleIcpV2: OPCODE %s\n", icp_opcode_str[header.opcode]);
+	debug(12, 5) ("icpHandleIcpV2: OPCODE %s\n",
+	    icp_opcode_str[header.opcode]);
 	if (icpCheckUdpHit(entry, icp_request)) {
-	    reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
+	    reply =
+		icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_HIT, 0);
 	    break;
 	}
@@ -264,16 +258,23 @@
 	}
 	/* if store is rebuilding, return a UDP_HIT, but not a MISS */
 	if (store_dirs_rebuilding && opt_reload_hit_only) {
-	    reply = icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum, src_rtt);
+	    reply =
+		icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum,
+		src_rtt);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS_NOFETCH, 0);
 	} else if (hit_only_mode_until > squid_curtime) {
-	    reply = icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum, src_rtt);
+	    reply =
+		icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum,
+		src_rtt);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS_NOFETCH, 0);
 	} else if (Config.onoff.test_reachability && rtt == 0) {
-	    reply = icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum, src_rtt);
+	    reply =
+		icpCreateMessage(ICP_MISS_NOFETCH, flags, url, header.reqnum,
+		src_rtt);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS_NOFETCH, 0);
 	} else {
-	    reply = icpCreateMessage(ICP_MISS, flags, url, header.reqnum, src_rtt);
+	    reply =
+		icpCreateMessage(ICP_MISS, flags, url, header.reqnum, src_rtt);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS, 0);
 	}
 	break;
@@ -294,9 +295,7 @@
 	}
 	url = buf + sizeof(icp_common_t);
 	debug(12, 3) ("icpHandleIcpV2: %s from %s for '%s'\n",
-	    icp_opcode_str[header.opcode],
-	    inet_ntoa(from.sin_addr),
-	    url);
+	    icp_opcode_str[header.opcode], inet_ntoa(from.sin_addr), url);
 	key = icpGetCacheKey(url, (int) header.reqnum);
 	/* call neighborsUdpAck even if ping_status != PING_WAITING */
 	neighborsUdpAck(key, &header, &from);
@@ -322,8 +321,7 @@
     struct in_addr a;
 
     debug(12, 9) ("opcode:     %3d %s\n",
-	(int) pkt->opcode,
-	icp_opcode_str[pkt->opcode]);
+	(int) pkt->opcode, icp_opcode_str[pkt->opcode]);
     debug(12, 9) ("version: %-8d\n", (int) pkt->version);
     debug(12, 9) ("length:  %-8d\n", (int) ntohs(pkt->length));
     debug(12, 9) ("reqnum:  %-8d\n", ntohl(pkt->reqnum));
@@ -351,10 +349,7 @@
 	Counter.syscalls.sock.recvfroms++;
 	len = recvfrom(sock,
 	    buf,
-	    SQUID_UDP_SO_RCVBUF - 1,
-	    0,
-	    (struct sockaddr *) &from,
-	    &from_len);
+	    SQUID_UDP_SO_RCVBUF - 1, 0, (struct sockaddr *) &from, &from_len);
 	if (len == 0)
 	    break;
 	if (len < 0) {
@@ -375,9 +370,7 @@
 	icpCount(buf, RECV, (size_t) len, 0);
 	buf[len] = '\0';
 	debug(12, 4) ("icpHandleUdp: FD %d: received %d bytes from %s.\n",
-	    sock,
-	    len,
-	    inet_ntoa(from.sin_addr));
+	    sock, len, inet_ntoa(from.sin_addr));
 #ifdef ICP_PACKET_DUMP
 	icpPktDump(buf);
 #endif
@@ -391,10 +384,9 @@
 	else if (icp_version == ICP_VERSION_3)
 	    icpHandleIcpV3(sock, from, buf, len);
 	else
-	    debug(12, 1) ("WARNING: Unused ICP version %d received from %s:%d\n",
-		icp_version,
-		inet_ntoa(from.sin_addr),
-		ntohs(from.sin_port));
+	    debug(12,
+		1) ("WARNING: Unused ICP version %d received from %s:%d\n",
+		icp_version, inet_ntoa(from.sin_addr), ntohs(from.sin_port));
     }
 }
 
@@ -412,49 +404,25 @@
     if ((port = Config.Port.icp) <= 0)
 	return;
     enter_suid();
-    theInIcpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_UDP,
-#else
-	0,
-#endif
-	Config.Addrs.udp_incoming,
-	port,
-	COMM_NONBLOCKING,
-	"ICP Socket");
+    theInIcpConnection = comm_open(SOCK_DGRAM, 0, Config.Addrs.udp_incoming,
+	port, COMM_NONBLOCKING, "ICP Socket");
     leave_suid();
     if (theInIcpConnection < 0)
 	fatal("Cannot open ICP Port");
-    commSetSelect(theInIcpConnection,
-	COMM_SELECT_READ,
-	icpHandleUdp,
-	NULL,
-	0);
+    commSetSelect(theInIcpConnection, COMM_SELECT_READ, icpHandleUdp, NULL, 0);
     for (s = Config.mcast_group_list; s; s = s->next)
 	ipcache_nbgethostbyname(s->key, mcastJoinGroups, NULL);
     debug(12, 1) ("Accepting ICP messages at %s, port %d, FD %d.\n",
-	inet_ntoa(Config.Addrs.udp_incoming),
-	(int) port, theInIcpConnection);
+	inet_ntoa(Config.Addrs.udp_incoming), (int) port, theInIcpConnection);
     if ((addr = Config.Addrs.udp_outgoing).s_addr != no_addr.s_addr) {
 	enter_suid();
-	theOutIcpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
-#else
-	    0,
-#endif
-	    addr,
-	    port,
-	    COMM_NONBLOCKING,
-	    "ICP Port");
+	theOutIcpConnection = comm_open(SOCK_DGRAM, 0, addr, port,
+	    COMM_NONBLOCKING, "ICP Port");
 	leave_suid();
 	if (theOutIcpConnection < 0)
 	    fatal("Cannot open Outgoing ICP Port");
 	commSetSelect(theOutIcpConnection,
-	    COMM_SELECT_READ,
-	    icpHandleUdp,
-	    NULL,
-	    0);
+	    COMM_SELECT_READ, icpHandleUdp, NULL, 0);
 	debug(12, 1) ("Outgoing ICP messages on port %d, FD %d.\n",
 	    (int) port, theOutIcpConnection);
 	fd_note(theOutIcpConnection, "Outgoing ICP socket");
@@ -465,8 +433,7 @@
     memset(&theOutICPAddr, '\0', sizeof(struct in_addr));
     len = sizeof(struct sockaddr_in);
     memset(&xaddr, '\0', len);
-    x = getsockname(theOutIcpConnection,
-	(struct sockaddr *) &xaddr, &len);
+    x = getsockname(theOutIcpConnection, (struct sockaddr *) &xaddr, &len);
     if (x < 0)
 	debug(50, 1) ("theOutIcpConnection FD %d: getsockname: %s\n",
 	    theOutIcpConnection, xstrerror());
@@ -572,4 +539,4 @@
 	return queried_keys[reqnum & N_QUERIED_KEYS_MASK];
     return storeKeyPublic(url, METHOD_GET);
 }
-#undef ICP_V2_C
\ No newline at end of file
+#undef ICP_V2_C
Index: squid/src/icp_v3.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v3.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/icp_v3.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/icp_v3.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: icp_v3.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: icp_v3.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -108,10 +107,12 @@
 	}
 	/* if store is rebuilding, return a UDP_HIT, but not a MISS */
 	if (opt_reload_hit_only && store_dirs_rebuilding) {
-	    reply = icpCreateMessage(ICP_MISS_NOFETCH, 0, url, header.reqnum, 0);
+	    reply =
+		icpCreateMessage(ICP_MISS_NOFETCH, 0, url, header.reqnum, 0);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS_NOFETCH, 0);
 	} else if (hit_only_mode_until > squid_curtime) {
-	    reply = icpCreateMessage(ICP_MISS_NOFETCH, 0, url, header.reqnum, 0);
+	    reply =
+		icpCreateMessage(ICP_MISS_NOFETCH, 0, url, header.reqnum, 0);
 	    icpUdpSend(fd, &from, reply, LOG_UDP_MISS_NOFETCH, 0);
 	} else {
 	    reply = icpCreateMessage(ICP_MISS, 0, url, header.reqnum, 0);
@@ -135,9 +136,7 @@
 	}
 	url = buf + sizeof(icp_common_t);
 	debug(12, 3) ("icpHandleIcpV3: %s from %s for '%s'\n",
-	    icp_opcode_str[header.opcode],
-	    inet_ntoa(from.sin_addr),
-	    url);
+	    icp_opcode_str[header.opcode], inet_ntoa(from.sin_addr), url);
 	key = icpGetCacheKey(url, (int) header.reqnum);
 	/* call neighborsUdpAck even if ping_status != PING_WAITING */
 	neighborsUdpAck(key, &header, &from);
@@ -155,4 +154,4 @@
     if (icp_request)
 	requestDestroy(icp_request);
 }
-#undef ICP_V3_C
\ No newline at end of file
+#undef ICP_V3_C
Index: squid/src/ident.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ident.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/ident.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/ident.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ident.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: ident.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
@@ -40,20 +39,24 @@
 #define IDENT_PORT 113
 #define IDENT_KEY_SZ 50
 
-typedef struct _IdentClient {
+typedef struct _IdentClient
+{
     IDCB *callback;
     void *callback_data;
     struct _IdentClient *next;
-} IdentClient;
+}
+IdentClient;
 
-typedef struct _IdentStateData {
+typedef struct _IdentStateData
+{
     char *key;
     struct _IdentStateData *next;
     int fd;			/* IDENT fd */
     struct sockaddr_in me;
     struct sockaddr_in my_peer;
     IdentClient *clients;
-} IdentStateData;
+}
+IdentStateData;
 
 static PF identReadReply;
 static PF identClose;
@@ -123,8 +126,7 @@
     }
     memBufDefInit(&mb);
     memBufPrintf(&mb, "%d, %d\r\n",
-	ntohs(state->my_peer.sin_port),
-	ntohs(state->me.sin_port));
+	ntohs(state->my_peer.sin_port), ntohs(state->me.sin_port));
     comm_write_mbuf(fd, mb, NULL, state);
     commSetSelect(fd, COMM_SELECT_READ, identReadReply, state, 0);
     commSetTimeout(fd, Config.Timeout.ident, identTimeout, state);
@@ -140,11 +142,7 @@
     int len = -1;
     buf[0] = '\0';
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, buf, BUFSIZ - 1);
-#else
     len = read(fd, buf, BUFSIZ - 1);
-#endif
     fd_bytes(fd, len, FD_READ);
     if (len <= 0) {
 	comm_close(fd);
@@ -189,7 +187,8 @@
  * start a TCP connection to the peer host on port 113
  */
 void
-identStart(struct sockaddr_in *me, struct sockaddr_in *my_peer, IDCB * callback, void *data)
+identStart(struct sockaddr_in *me, struct sockaddr_in *my_peer, IDCB * callback,
+    void *data)
 {
     IdentStateData *state;
     int fd;
@@ -197,26 +196,15 @@
     char key2[IDENT_KEY_SZ];
     char key[IDENT_KEY_SZ];
     snprintf(key1, IDENT_KEY_SZ, "%s:%d",
-	inet_ntoa(me->sin_addr),
-	ntohs(me->sin_port));
+	inet_ntoa(me->sin_addr), ntohs(me->sin_port));
     snprintf(key2, IDENT_KEY_SZ, "%s:%d",
-	inet_ntoa(my_peer->sin_addr),
-	ntohs(my_peer->sin_port));
+	inet_ntoa(my_peer->sin_addr), ntohs(my_peer->sin_port));
     snprintf(key, IDENT_KEY_SZ, "%s,%s", key1, key2);
     if ((state = hash_lookup(ident_hash, key)) != NULL) {
 	identClientAdd(state, callback, data);
 	return;
     }
-    fd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_TCP,
-#else
-	0,
-#endif
-	me->sin_addr,
-	0,
-	COMM_NONBLOCKING,
-	"ident");
+    fd = comm_open(SOCK_STREAM, 0, me->sin_addr, 0, COMM_NONBLOCKING, "ident");
     if (fd == COMM_ERROR) {
 	/* Failed to get a local socket */
 	callback(NULL, data);
@@ -230,23 +218,18 @@
     state->my_peer = *my_peer;
     identClientAdd(state, callback, data);
     hash_join(ident_hash, (hash_link *) state);
-    comm_add_close_handler(fd,
-	identClose,
-	state);
+    comm_add_close_handler(fd, identClose, state);
     commSetTimeout(fd, Config.Timeout.ident, identTimeout, state);
     commConnectStart(fd,
 	inet_ntoa(state->my_peer.sin_addr),
-	IDENT_PORT,
-	identConnectDone,
-	state);
+	IDENT_PORT, identConnectDone, state);
 }
 
 void
 identInit(void)
 {
     ident_hash = hash_create((HASHCMP *) strcmp,
-	hashPrime(Squid_MaxFD / 8),
-	hash4);
+	hashPrime(Squid_MaxFD / 8), hash4);
 }
 
 #endif
Index: squid/src/internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/internal.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/internal.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/internal.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: internal.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: internal.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 76    Internal Squid Object handling
  * AUTHOR: Duane, Alex, Henrik
@@ -57,11 +56,7 @@
 	httpReplySetHeaders(entry->mem_obj->reply,
 	    1.0,
 	    HTTP_NOT_FOUND,
-	    "Not Found",
-	    "text/plain",
-	    strlen(msgbuf),
-	    squid_curtime,
-	    -2);
+	    "Not Found", "text/plain", strlen(msgbuf), squid_curtime, -2);
 	httpReplySwapOut(entry->mem_obj->reply, entry);
 	storeAppend(entry, msgbuf, strlen(msgbuf));
 	storeComplete(entry);
@@ -90,7 +85,8 @@
  * makes internal url with a given host and port (remote internal url)
  */
 char *
-internalRemoteUri(const char *host, u_short port, const char *dir, const char *name)
+internalRemoteUri(const char *host, u_short port, const char *dir,
+    const char *name)
 {
     static MemBuf mb = MemBufNULL;
     static char lc_host[SQUIDHOSTNAMELEN];
Index: squid/src/ipc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipc.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/ipc.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/ipc.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ipc.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: ipc.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 54    Interprocess Communication
  * AUTHOR: Duane Wessels
@@ -35,7 +34,42 @@
 
 #include "squid.h"
 
-#ifndef _SQUID_MSWIN_
+#ifdef _SQUID_MSWIN_
+#include <process.h>
+
+extern void sd_open(int fd, unsigned int type, const char *desc);
+extern void sd_note(int fd, const char *s);
+//extern void commSetNoLinger(int fd);
+
+/* internal to CRTLIB */
+extern void __cdecl _dosmaperr(unsigned long oserrno);
+
+struct ipc_params
+{
+    int type;
+    int crfd;
+    int cwfd;
+    struct sockaddr_in PS;
+    const char *prog;
+    char **args;
+};
+
+static struct thread_params
+{
+    int type;
+    int rfd;
+    int send_fd;
+    const char *prog;
+    pid_t pid;
+};
+static int __stdcall ipc_thread_1(struct ipc_params *params);
+static int __stdcall ipc_thread_2(struct thread_params *params);
+
+static const char *ok_string = "OK\n";
+static const char *err_string = "ERR\n";
+static const char *shutdown_string = "$shutdown\n";
+#endif
+
 static const char *hello_string = "hi there\n";
 #define HELLO_BUF_SZ 32
 static char hello_buf[HELLO_BUF_SZ];
@@ -57,8 +91,18 @@
 }
 
 int
-ipcCreate(int type, const char *prog, char *const args[], const char *name, int *rfd, int *wfd)
+#ifdef _SQUID_MSWIN_
+ipcCreate(int type, const char *prog, char *const args[], const char *name,
+    int *rfd, int *wfd, HANDLE * hIpc, pid_t * ppid)
+#else
+ipcCreate(int type, const char *prog, char *const args[], const char *name,
+    int *rfd, int *wfd)
+#endif
 {
+#ifdef _SQUID_MSWIN_
+    unsigned long thread;
+    struct ipc_params params;
+#endif
     pid_t pid;
     struct sockaddr_in CS;
     struct sockaddr_in PS;
@@ -66,13 +110,15 @@
     int prfd = -1;
     int cwfd = -1;
     int pwfd = -1;
+    socklen_t len;
+#ifndef _SQUID_MSWIN_
     int fd;
     int t1, t2, t3;
-    socklen_t len;
     int tmp_s;
 #if HAVE_PUTENV
     char *env_str;
 #endif
+#endif
     int x;
 
 #if HAVE_POLL && defined(_SQUID_OSF_)
@@ -83,49 +129,27 @@
 	*rfd = -1;
     if (wfd)
 	*wfd = -1;
-    if (type == IPC_TCP_SOCKET) {
-	crfd = cwfd = comm_open(SOCK_STREAM,
 #ifdef _SQUID_MSWIN_
-	    IPPROTO_TCP,
-#else
-	    0,
+    if (hIpc)
+	*hIpc = NULL;
+    if (ppid)
+	*ppid = -1;
 #endif
-	    local_addr,
-	    0,
-	    COMM_NOCLOEXEC,
-	    name);
-	prfd = pwfd = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_TCP,	/* protocol */
-#else
-	    0,				/* protocol */
-#endif
-	    local_addr,
-	    0,			/* port */
-	    0,			/* blocking */
-	    name);
+    if (type == IPC_TCP_SOCKET) {
+	crfd = cwfd =
+	    comm_open(SOCK_STREAM, 0, local_addr, 0, COMM_NOCLOEXEC, name);
+	prfd = pwfd = comm_open(SOCK_STREAM, 0, local_addr, 0, 0, name);
     } else if (type == IPC_UDP_SOCKET) {
-	crfd = cwfd = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
-#else
-	    0,
-#endif
-	    local_addr,
-	    0,
-	    COMM_NOCLOEXEC,
-	    name);
-	prfd = pwfd = comm_open(SOCK_DGRAM,
+	crfd = cwfd =
+	    comm_open(SOCK_DGRAM, 0, local_addr, 0, COMM_NOCLOEXEC, name);
+	prfd = pwfd = comm_open(SOCK_DGRAM, 0, local_addr, 0, 0, name);
+    } else if (type == IPC_FIFO) {
 #ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
+	debug(54, 0)
+	    ("ipcCreate: %s: use IPC_TCP_SOCKET instead of IP_FIFO on Windows\n",
+	    prog);
+	assert(0);
 #else
-	    0,
-#endif
-	    local_addr,
-	    0,
-	    0,
-	    name);
-    } else if (type == IPC_FIFO) {
 	int p2c[2];
 	int c2p[2];
 	if (pipe(p2c) < 0) {
@@ -140,6 +164,7 @@
 	fd_open(cwfd = p2c[1], FD_PIPE, "IPC FIFO Child Write");
 	fd_open(crfd = c2p[0], FD_PIPE, "IPC FIFO Child Read");
 	fd_open(pwfd = c2p[1], FD_PIPE, "IPC FIFO Parent Write");
+#endif
     } else {
 	assert(IPC_NONE);
     }
@@ -156,7 +181,11 @@
 	debug(54, 0) ("ipcCreate: Failed to create server FD.\n");
 	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
     }
+#ifdef _SQUID_MSWIN_
+    {
+#else
     if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
+#endif
 	len = sizeof(PS);
 	memset(&PS, '\0', len);
 	if (getsockname(pwfd, (struct sockaddr *) &PS, &len) < 0) {
@@ -183,86 +212,229 @@
     }
     /* flush or else we get dup data if unbuffered_logs is set */
     logsFlush();
+#ifdef _SQUID_MSWIN_
+    params.type = type;
+    params.crfd = crfd;
+    params.cwfd = cwfd;
+    params.PS = PS;
+    params.prog = prog;
+    params.args = (char **) args;
+
+    thread = _beginthreadex(NULL, 0, ipc_thread_1, &params, 0, NULL);
+
+    if (thread == 0) {
+	debug(50, 1) ("ipcCreate: _beginthread: %s\n", xstrerror());
+#else
     if ((pid = fork()) < 0) {
 	debug(50, 1) ("ipcCreate: fork: %s\n", xstrerror());
+#endif
 	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
     }
+#ifndef _SQUID_MSWIN_
     if (pid > 0) {		/* parent */
 	/* close shared socket with child */
 	comm_close(crfd);
 	if (cwfd != crfd)
 	    comm_close(cwfd);
 	cwfd = crfd = -1;
+
 	if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
-	    if (comm_connect_addr(pwfd, &CS) == COMM_ERROR)
-		return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
-	}
-	memset(hello_buf, '\0', HELLO_BUF_SZ);
-	if (type == IPC_UDP_SOCKET)
-	    x = recv(prfd, hello_buf, HELLO_BUF_SZ - 1, 0);
-	else
-	    x = read(prfd, hello_buf, HELLO_BUF_SZ - 1);
-	if (x < 0) {
-	    debug(50, 0) ("ipcCreate: PARENT: hello read test failed\n");
-	    debug(50, 0) ("--> read: %s\n", xstrerror());
+#else
+#undef  ipcCloseAllFD
+#define ipcCloseAllFD(w,x,y,z) (CloseHandle((HANDLE)thread), ipcCloseAllFD((w),(x),-1,-1))
+    {
+#endif
+	if (comm_connect_addr(pwfd, &CS) == COMM_ERROR)
 	    return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
-	} else if (strcmp(hello_buf, hello_string)) {
-	    debug(54, 0) ("ipcCreate: PARENT: hello read test failed\n");
-	    debug(54, 0) ("--> read returned %d\n", x);
-	    debug(54, 0) ("--> got '%s'\n", rfc1738_escape(hello_buf));
+    }
+    memset(hello_buf, '\0', HELLO_BUF_SZ);
+#ifndef _SQUID_MSWIN_
+    if (type == IPC_UDP_SOCKET)
+#endif
+	x = recv(prfd, hello_buf, HELLO_BUF_SZ - 1, 0);
+#ifndef _SQUID_MSWIN_
+    else
+	x = read(prfd, hello_buf, HELLO_BUF_SZ - 1);
+#endif
+    if (x < 0) {
+	debug(50, 0) ("ipcCreate: PARENT: hello read test failed\n");
+	debug(50, 0) ("--> read: %s\n", xstrerror());
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    } else if (strcmp(hello_buf, hello_string)) {
+	debug(54, 0) ("ipcCreate: PARENT: hello read test failed\n");
+	debug(54, 0) ("--> read returned %d\n", x);
+	debug(54, 0) ("--> got '%s'\n", rfc1738_escape(hello_buf));
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    }
+#ifdef _SQUID_MSWIN_
+    x = send(pwfd, ok_string, strlen(ok_string), 0);
+    if (x < 0) {
+	debug(50, 0) ("ipcCreate: PARENT: OK write test failed\n");
+	debug(50, 0) ("--> read: %s\n", xstrerror());
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    }
+    memset(hello_buf, '\0', HELLO_BUF_SZ);
+    x = recv(prfd, hello_buf, HELLO_BUF_SZ - 1, 0);
+    if (x < 0) {
+	debug(50, 0) ("ipcCreate: PARENT: OK read test failed\n");
+	debug(50, 0) ("--> read: %s\n", xstrerror());
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    } else if (!strcmp(hello_buf, err_string)) {
+	debug(54, 0) ("ipcCreate: PARENT: OK read test failed\n");
+	debug(54, 0) ("--> read returned %d\n", x);
+	debug(54, 0) ("--> got '%s'\n", rfc1738_escape(hello_buf));
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    }
+    hello_buf[x] = '\0';
+    pid = atol(hello_buf);
+#endif
+    commSetTimeout(prfd, -1, NULL, NULL);
+    commSetNonBlocking(prfd);
+    commSetNonBlocking(pwfd);
+    if (rfd)
+	*rfd = prfd;
+    if (wfd)
+	*wfd = pwfd;
+#ifdef _SQUID_MSWIN_
+    sd_table[prfd].flags.ipc = 1;
+    sd_table[pwfd].flags.ipc = 1;
+    sd_table[crfd].flags.ipc = 1;
+    sd_table[cwfd].flags.ipc = 1;
+    {
+	DWORD ecode = 0;
+	if (GetExitCodeThread((HANDLE) thread, &ecode) && ecode == STILL_ACTIVE) {
+	    if (hIpc)
+		*hIpc = (HANDLE) thread;
+	    if (ppid)
+		*ppid = pid;
+	    return pwfd;
+	} else
 	    return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
-	}
-	commSetTimeout(prfd, -1, NULL, NULL);
-	commSetNonBlocking(prfd);
-	commSetNonBlocking(pwfd);
-	if (rfd)
-	    *rfd = prfd;
-	if (wfd)
-	    *wfd = pwfd;
-	fd_table[prfd].flags.ipc = 1;
-	fd_table[pwfd].flags.ipc = 1;
-	return pwfd;
     }
+#else
+    fd_table[prfd].flags.ipc = 1;
+    fd_table[pwfd].flags.ipc = 1;
+    return pwfd;
+#endif
+}
+
+#ifdef _SQUID_MSWIN_
+#undef ipcCloseAllFD
+
+static int
+ipcSend(int cwfd, const char *buf, int len)
+{
+    int x;
+
+    x = send(cwfd, buf, len, 0);
+    if (x < 0) {
+	debug(50, 0) ("sendto FD %d: %s\n", cwfd, xstrerror());
+	debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n");
+    }
+    return x;
+}
+
+static int __stdcall
+ipc_thread_1(struct ipc_params *params)
+{
+    int retval = -1;
+    int t1, t2, t3;
+    int p2c[2] = { -1, -1 };
+    int c2p[2] = { -1, -1 };
+    HANDLE hProcess = NULL;
+    pid_t pid;
+    HANDLE thread = NULL;
+    struct thread_params thread_params;
+    int fd;
+    char *str;
+    int tmp_s;
+#if HAVE_PUTENV
+    char *env_str = NULL;
+#endif
+    int x;
+    int type = params->type;
+    int crfd = params->crfd;
+    int cwfd = params->cwfd;
+    int prfd_ipc = -1, pwfd_ipc = -1, crfd_ipc = -1, cwfd_ipc = -1;
+    char *prog = NULL;
+    char **args = params->args;
+    struct sockaddr_in PS = params->PS;
+    struct sockaddr_in CS_ipc, PS_ipc;
+    char *buf1 = NULL;
+
+    buf1 = xcalloc(1, 8192);
+    strcpy(buf1, params->prog);
+    prog = strtok(buf1, w_space);
+    if (str = strrchr(prog, '/'))
+	prog = ++str;
+    if (str = strrchr(prog, '\\'))
+	prog = ++str;
+    prog = xstrdup(prog);
+
+#else
     /* child */
-    no_suid();			/* give up extra priviliges */
+no_suid();			/* give up extra priviliges */
     /* close shared socket with parent */
-    close(prfd);
-    if (pwfd != prfd)
-	close(pwfd);
-    pwfd = prfd = -1;
+close(prfd);
+if (pwfd != prfd)
+    close(pwfd);
+pwfd = prfd = -1;
+#endif
+if (type == IPC_TCP_SOCKET) {
+    debug(54, 3) ("ipcCreate: calling accept on FD %d\n", crfd);
+    if ((fd = accept(crfd, NULL, NULL)) < 0) {
+	debug(50, 0) ("ipcCreate: FD %d accept: %s\n", crfd, xstrerror());
+#ifdef _SQUID_MSWIN_
+	goto cleanup;
+#else
+	_exit(1);
+#endif
+    }
+    debug(54, 3) ("ipcCreate: CHILD accepted new FD %d\n", fd);
+#ifdef _SQUID_MSWIN_
+    comm_close(crfd);
 
-    if (type == IPC_TCP_SOCKET) {
-	debug(54, 3) ("ipcCreate: calling accept on FD %d\n", crfd);
-	if ((fd = accept(crfd, NULL, NULL)) < 0) {
-	    debug(50, 0) ("ipcCreate: FD %d accept: %s\n", crfd, xstrerror());
-	    _exit(1);
-	}
-	debug(54, 3) ("ipcCreate: CHILD accepted new FD %d\n", fd);
-	close(crfd);
-	cwfd = crfd = fd;
-    } else if (type == IPC_UDP_SOCKET) {
-	if (comm_connect_addr(crfd, &PS) == COMM_ERROR)
-	    return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+    snprintf(buf1, 8191, "%s CHILD socket", prog);
+    sd_open(fd, FD_SOCKET, buf1);
+    sd_table[fd].flags.ipc = 1;
+#else
+    close(crfd);
+#endif
+    cwfd = crfd = fd;
+} else if (type == IPC_UDP_SOCKET) {
+    if (comm_connect_addr(crfd, &PS) == COMM_ERROR)
+#ifdef _SQUID_MSWIN_
+	goto cleanup;
+#else
+	return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
+#endif
+}
+#ifndef _SQUID_MSWIN_
+if (type == IPC_UDP_SOCKET) {
+#endif
+    x = send(cwfd, hello_string, strlen(hello_string), 0);
+    if (x < 0) {
+	debug(50, 0) ("sendto FD %d: %s\n", cwfd, xstrerror());
+	debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n");
+#ifdef _SQUID_MSWIN_
+	goto cleanup;
     }
-    if (type == IPC_UDP_SOCKET) {
-	x = send(cwfd, hello_string, strlen(hello_string), 0);
-	if (x < 0) {
-	    debug(50, 0) ("sendto FD %d: %s\n", cwfd, xstrerror());
-	    debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n");
-	    _exit(1);
-	}
-    } else {
-	if (write(cwfd, hello_string, strlen(hello_string)) < 0) {
-	    debug(50, 0) ("write FD %d: %s\n", cwfd, xstrerror());
-	    debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n");
-	    _exit(1);
-	}
+#else
+	_exit(1);
+    }
+} else {
+    if (write(cwfd, hello_string, strlen(hello_string)) < 0) {
+	debug(50, 0) ("write FD %d: %s\n", cwfd, xstrerror());
+	debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n");
+	_exit(1);
     }
+#endif
 #if HAVE_PUTENV
     env_str = xcalloc((tmp_s = strlen(Config.debugOptions) + 32), 1);
     snprintf(env_str, tmp_s, "SQUID_DEBUG=%s", Config.debugOptions);
     putenv(env_str);
 #endif
+#ifndef _SQUID_MSWIN_
     /*
      * This double-dup stuff avoids problems when one of 
      *  crfd, cwfd, or debug_log are in the rage 0-2.
@@ -292,5 +464,359 @@
     debug(50, 0) ("ipcCreate: %s: %s\n", prog, xstrerror());
     _exit(1);
     return 0;
+#else
+    memset(buf1, '\0', sizeof(buf1));
+    x = recv(crfd, buf1, 8191, 0);
+    if (x < 0) {
+	debug(50, 0) ("ipcCreate: CHILD: OK read test failed\n");
+	debug(50, 0) ("--> read: %s\n", xstrerror());
+	goto cleanup;
+    } else if (strcmp(buf1, ok_string)) {
+	debug(54, 0) ("ipcCreate: CHILD: OK read test failed\n");
+	debug(54, 0) ("--> read returned %d\n", x);
+	debug(54, 0) ("--> got '%s'\n", rfc1738_escape(hello_buf));
+	goto cleanup;
+    }
+    /* assign file descriptors to child process */
+    if (_pipe(p2c, 1024, _O_BINARY | _O_NOINHERIT) < 0) {
+	debug(50, 0) ("ipcCreate: CHILD: pipe: %s\n", xstrerror());
+	ipcSend(cwfd, err_string, strlen(err_string));
+	goto cleanup;
+    }
+    if (_pipe(c2p, 1024, _O_BINARY | _O_NOINHERIT) < 0) {
+	debug(50, 0) ("ipcCreate: CHILD: pipe: %s\n", xstrerror());
+	ipcSend(cwfd, err_string, strlen(err_string));
+	goto cleanup;
+    }
+
+    if (type == IPC_UDP_SOCKET) {
+	snprintf(buf1, 8192, "%s(%ld) <-> ipc CHILD socket", prog, -1);
+	crfd_ipc = cwfd_ipc = comm_open(SOCK_DGRAM, 0, local_addr, 0, 0, buf1);
+
+	if (crfd_ipc < 0) {
+	    debug(54,
+		0) ("ipcCreate: CHILD: Failed to create child FD for %s.\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+
+	snprintf(buf1, 8192, "%s(%ld) <-> ipc PARENT socket", prog, -1);
+	prfd_ipc = pwfd_ipc = comm_open(SOCK_DGRAM, 0, local_addr, 0, 0, buf1);
+	if (pwfd_ipc < 0) {
+	    debug(54,
+		0) ("ipcCreate: CHILD: Failed to create server FD for %s.\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+
+	tmp_s = sizeof(PS_ipc);
+	memset(&PS_ipc, '\0', tmp_s);
+	if (getsockname(pwfd_ipc, (struct sockaddr *) &PS_ipc, &tmp_s) < 0) {
+	    debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror());
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n",
+	    pwfd_ipc, inet_ntoa(PS_ipc.sin_addr), ntohs(PS_ipc.sin_port));
+	tmp_s = sizeof(CS_ipc);
+	memset(&CS_ipc, '\0', tmp_s);
+	if (getsockname(crfd_ipc, (struct sockaddr *) &CS_ipc, &tmp_s) < 0) {
+	    debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror());
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n",
+	    crfd_ipc, inet_ntoa(CS_ipc.sin_addr), ntohs(CS_ipc.sin_port));
+
+	if (comm_connect_addr(pwfd_ipc, &CS_ipc) == COMM_ERROR) {
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+
+	fd = crfd;
+
+	if (comm_connect_addr(crfd_ipc, &PS_ipc) == COMM_ERROR) {
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+    }				/* IPC_UDP_SOCKET */
+    t1 = dup(0);
+    t2 = dup(1);
+    t3 = dup(2);
+    dup2(c2p[0], 0);
+    dup2(p2c[1], 1);
+    dup2(fileno(debug_log), 2);
+    close(c2p[0]);
+    close(p2c[1]);
+
+    commUnsetNonBlocking(fd);
+
+    {
+	STARTUPINFO si;
+	PROCESS_INFORMATION pi;
+
+	memset(&si, 0, sizeof(STARTUPINFO));
+	si.cb = sizeof(STARTUPINFO);
+	si.hStdInput = (HANDLE) _get_osfhandle(0);
+	si.hStdOutput = (HANDLE) _get_osfhandle(1);
+	si.hStdError = (HANDLE) _get_osfhandle(2);
+	si.dwFlags = STARTF_USESTDHANDLES;
+
+	*buf1 = '\0';
+	strcpy(buf1 + 4096, params->prog);
+	str = strtok(buf1 + 4096, w_space);
+	do {
+	    strcat(buf1, str);
+	    strcat(buf1, " ");
+	} while ((str = strtok(NULL, w_space)));
+	x = 1;
+	while (args[x]) {
+	    strcat(buf1, args[x++]);
+	    strcat(buf1, " ");
+	}
+
+	if (CreateProcess(buf1 + 4096, buf1, NULL, NULL, TRUE, CREATE_NO_WINDOW,
+		NULL, NULL, &si, &pi)) {
+	    pid = pi.dwProcessId;
+	    hProcess = pi.hProcess;
+	} else {
+	    pid = -1;
+	    _dosmaperr(GetLastError());
+	    x = errno;
+	}
+    }
+    dup2(t1, 0);
+    dup2(t2, 1);
+    dup2(t3, 2);
+    close(t1);
+    close(t2);
+    close(t3);
+
+    if (pid == -1) {
+	errno = x;
+	debug(50, 0) ("ipcCreate: CHILD: %s: %s\n", params->prog, xstrerror());
+	ipcSend(cwfd, err_string, strlen(err_string));
+	goto cleanup;
+    }
+
+    if (type == IPC_UDP_SOCKET) {
+	WSAPROTOCOL_INFO wpi;
+
+	memset(&wpi, 0, sizeof(wpi));
+	if (SOCKET_ERROR == WSADuplicateSocket(crfd_ipc, pid, &wpi)) {
+	    debug(50, 0) ("ipcCreate: CHILD: WSADuplicateSocket: %s\n",
+		xstrerror());
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	x = write(c2p[1], &wpi, sizeof(wpi));
+	if (x < sizeof(wpi)) {
+	    debug(50, 0) ("ipcCreate: CHILD: write FD %d: %s\n", c2p[1],
+		xstrerror());
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	x = read(p2c[0], buf1, 8192);
+	if (x < 0) {
+	    debug(50, 0) ("ipcCreate: CHILD: read FD %d: %s\n", p2c[0],
+		xstrerror());
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	} else if (strncmp(buf1, ok_string, strlen(ok_string))) {
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n",
+		prog);
+	    debug(54, 0) ("--> read returned %d\n", x);
+	    buf1[x] = '\0';
+	    debug(54, 0) ("--> got '%s'\n", rfc1738_escape(buf1));
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	x = write(c2p[1], &PS_ipc, sizeof(PS_ipc));
+	if (x < sizeof(PS_ipc)) {
+	    debug(50, 0) ("ipcCreate: CHILD: write FD %d: %s\n", c2p[1],
+		xstrerror());
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	x = read(p2c[0], buf1, 8192);
+	if (x < 0) {
+	    debug(50, 0) ("ipcCreate: CHILD: read FD %d: %s\n", p2c[0],
+		xstrerror());
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n",
+		prog);
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	} else if (strncmp(buf1, ok_string, strlen(ok_string))) {
+	    debug(54, 0) ("ipcCreate: CHILD: %s: socket exchange failed\n");
+	    debug(54, 0) ("--> read returned %d\n", x);
+	    buf1[x] = '\0';
+	    debug(54, 0) ("--> got '%s'\n", rfc1738_escape(buf1));
+	    ipcSend(cwfd, err_string, strlen(err_string));
+	    goto cleanup;
+	}
+	x = send(pwfd_ipc, ok_string, strlen(ok_string), 0);
+	x = recv(prfd_ipc, buf1 + 200, 8191 - 200, 0);
+	assert((size_t) x == strlen(ok_string)
+	    && !strncmp(ok_string, buf1 + 200, strlen(ok_string)));
+    }				/* IPC_UDP_SOCKET */
+    snprintf(buf1, 8191, "%s(%ld) CHILD socket", prog, pid);
+    sd_note(fd, buf1);
+    if (prfd_ipc != -1) {
+	snprintf(buf1, 8191, "%s(%ld) <-> ipc CHILD socket", prog, pid);
+	sd_note(crfd_ipc, buf1);
+	snprintf(buf1, 8191, "%s(%ld) <-> ipc PARENT socket", prog, pid);
+	sd_note(prfd_ipc, buf1);
+    }				/* else {                      // IPC_TCP_SOCKET
+				 * commSetNoLinger(fd);
+				 * }
+				 */
+    thread_params.prog = prog;
+    thread_params.send_fd = cwfd;
+    thread_params.pid = pid;
+    if ((thread_params.type = type) == IPC_TCP_SOCKET)
+	thread_params.rfd = p2c[0];
+    else
+	thread_params.rfd = prfd_ipc;
+
+    thread =
+	(HANDLE) _beginthreadex(NULL, 0, ipc_thread_2, &thread_params, 0, NULL);
+    if (!thread) {
+	debug(50, 0) ("ipcCreate: CHILD: _beginthreadex: %s\n", xstrerror());
+	ipcSend(cwfd, err_string, strlen(err_string));
+	goto cleanup;
+    }
+
+    snprintf(buf1, 8191, "%ld\n", pid);
+    if (-1 == ipcSend(cwfd, buf1, strlen(buf1)))
+	goto cleanup;
+
+    debug(54, 2) ("ipc(%s,%d): started successfully\n", prog, pid);
+    /* cycle */
+    for (;;) {
+	x = recv(crfd, buf1, 8192, 0);
+	if (x <= 0) {
+	    debug(54,
+		3) ("ipc(%s,%d): %d bytes received from parent. Exiting...\n",
+		prog, pid, x);
+	    break;
+	}
+	buf1[x] = '\0';
+	if (type == 2 && !strcmp(buf1, shutdown_string)) {
+	    debug(54, 3)
+		
+		("ipc(%s,%d): request for shutdown received from parent. Exiting...\n",
+		prog, pid);
+	    break;
+	}
+	debug(54, 5) ("ipc(%s,%d): received from parent: %s\n", prog, pid,
+	    rfc1738_escape_unescaped(buf1));
+	if (type == IPC_TCP_SOCKET)
+	    x = write(c2p[1], buf1, x);
+	else
+	    x = send(pwfd_ipc, buf1, x, 0);
+	if (x <= 0) {
+	    debug(54, 3) ("ipc(%s,%d): %d bytes written to %s. Exiting...\n",
+		prog, pid, x, prog);
+	    break;
+	}
+    }
+
+    retval = 0;
+
+  cleanup:
+    if (c2p[1] != -1)
+	close(c2p[1]);
+    if (sd_table[crfd].flags.open)
+	ipcCloseAllFD(-1, -1, crfd, cwfd);
+    if (prfd_ipc != -1) {
+	send(crfd_ipc, shutdown_string, strlen(shutdown_string), 0);
+	shutdown(crfd_ipc, SD_BOTH);
+	shutdown(prfd_ipc, SD_BOTH);
+    }
+    ipcCloseAllFD(prfd_ipc, pwfd_ipc, crfd_ipc, cwfd_ipc);
+    if (hProcess && WAIT_OBJECT_0 !=
+	WaitForSingleObject(hProcess, type == IPC_UDP_SOCKET ? 12000 : 5000)) {
+
+	getCurrentTime();
+	debug(54, 0) ("ipc(%s,%d): WARNING: %s didn't exit in %d seconds.\n",
+	    prog, pid, prog, type == IPC_UDP_SOCKET ? 12 : 5);
+    }
+    if (thread && WAIT_OBJECT_0 != WaitForSingleObject(thread, 3000)) {
+	getCurrentTime();
+	debug(54, 0)
+	    ("ipc(%s,%d): WARNING: ipc_thread_2 didn't exit in 3 seconds.\n",
+	    prog, pid, prog);
+    }
+    getCurrentTime();
+    if (!retval)
+	debug(54, 2) ("ipc(%s,%d): normal exit\n", prog, pid);
+
+    if (buf1)
+	xfree(buf1);
+    if (prog)
+	xfree(prog);
+    if (env_str)
+	xfree(env_str);
+    if (thread)
+	CloseHandle(thread);
+    if (hProcess)
+	CloseHandle(hProcess);
+    if (p2c[0] != -1)
+	close(p2c[0]);
+    return retval;
+#endif
+}
+
+#ifdef _SQUID_MSWIN_
+static int __stdcall
+ipc_thread_2(struct thread_params *params)
+{
+    int type = params->type;
+    int rfd = params->rfd;
+    int send_fd = params->send_fd;
+    int x;
+    char *prog = xstrdup(params->prog);
+    pid_t pid = params->pid;
+    char *buf2 = xcalloc(1, 8192);
+
+    for (;;) {
+	if (type == IPC_TCP_SOCKET)
+	    x = read(rfd, buf2, 8192);
+	else
+	    x = recv(rfd, buf2, 8192, 0);
+	if ((x <= 0 && type == IPC_TCP_SOCKET) || (x < 0
+		&& type == IPC_UDP_SOCKET)) {
+	    debug(54, 3) ("ipc(%s,%d): %d bytes read from %s. Exiting...\n",
+		prog, pid, x, prog);
+	    break;
+	}
+	buf2[x] = '\0';
+	if (type == 2 && !strcmp(buf2, shutdown_string)) {
+	    debug(54,
+		3) ("ipc(%s,%d): request for shutdown received. Exiting...\n",
+		prog, pid);
+	    break;
+	}
+	debug(54, 5) ("ipc(%s,%d): received from child : %s\n", prog, pid,
+	    rfc1738_escape_unescaped(buf2));
+	x = send(send_fd, buf2, x, 0);
+	if ((x <= 0 && type == IPC_TCP_SOCKET) || (x < 0
+		&& type == IPC_UDP_SOCKET)) {
+	    debug(54, 3) ("ipc(%s,%d): %d bytes sent to parent. Exiting...\n",
+		prog, pid, x);
+	    break;
+	}
+    }
+    xfree(prog);
+    xfree(buf2);
+    return 0;
 }
-#endif
\ No newline at end of file
+#endif
Index: squid/src/ipcache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipcache.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/ipcache.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/ipcache.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ipcache.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: ipcache.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -35,7 +34,8 @@
 
 #include "squid.h"
 
-static struct {
+static struct
+{
     int requests;
     int replies;
     int hits;
@@ -45,7 +45,8 @@
     int errors;
     int ghbn_calls;		/* # calls to blocking gethostbyname() */
     int release_locked;
-} IpcacheStats;
+}
+IpcacheStats;
 
 static dlink_list lru_list;
 
@@ -58,7 +59,8 @@
 static IPH dummy_handler;
 static int ipcacheExpiredEntry(ipcache_entry *);
 static int ipcache_testname(void);
-static ipcache_entry *ipcacheAddNew(const char *, const struct hostent *, ipcache_status_t);
+static ipcache_entry *ipcacheAddNew(const char *, const struct hostent *,
+    ipcache_status_t);
 #if USE_DNSSERVERS
 static ipcache_entry *ipcacheParse(const char *buf);
 #else
@@ -78,8 +80,7 @@
 static ipcache_addrs static_addrs;
 static hash_table *ip_table = NULL;
 
-static char ipcache_status_char[] =
-{
+static char ipcache_status_char[] = {
     'C',
     'N',
     'P',
@@ -114,7 +115,8 @@
 {
     hash_link *table_entry = NULL;
     if ((table_entry = hash_lookup(ip_table, i->name)) == NULL) {
-	snprintf(tmp_error_buf, ERROR_BUF_SZ, "ipcache_release: key '%s' not found\n", i->name);
+	snprintf(tmp_error_buf, ERROR_BUF_SZ,
+	    "ipcache_release: key '%s' not found\n", i->name);
 	fatal_dump(tmp_error_buf);
     }
     assert(i == (ipcache_entry *) table_entry);
@@ -215,19 +217,18 @@
     i->addrs.badcount = 0;
     for (k = 0; k < addr_count; k++)
 	xmemcpy(&i->addrs.in_addrs[k].s_addr,
-	    *(hp->h_addr_list + k),
-	    hp->h_length);
+	    *(hp->h_addr_list + k), hp->h_length);
 }
 
 static ipcache_entry *
-ipcacheAddNew(const char *name, const struct hostent *hp, ipcache_status_t status)
+ipcacheAddNew(const char *name, const struct hostent *hp,
+    ipcache_status_t status)
 {
     ipcache_entry *i;
     if (ipcache_get(name))
 	fatal_dump("ipcacheAddNew: somebody adding a duplicate!");
     debug(14, 10) ("ipcacheAddNew: Adding '%s', status=%c\n",
-	name,
-	ipcache_status_char[status]);
+	name, ipcache_status_char[status]);
     i = ipcache_create(name);
     if (hp)
 	ipcacheAddHostent(i, hp);
@@ -382,8 +383,7 @@
 	assert(answers[k].rdlength == 4);
 	xmemcpy(&i.addrs.in_addrs[j++], answers[k].rdata, 4);
 	debug(14, 3) ("ipcacheParse: #%d %s\n",
-	    j - 1,
-	    inet_ntoa(i.addrs.in_addrs[j - 1]));
+	    j - 1, inet_ntoa(i.addrs.in_addrs[j - 1]));
     }
     assert(j == na);
     return &i;
@@ -406,7 +406,8 @@
     cbdataFree(c);
     c = NULL;
     n = ++IpcacheStats.replies;
-    statHistCount(&Counter.dns.svc_time, tvSubMsec(i->request_time, current_time));
+    statHistCount(&Counter.dns.svc_time, tvSubMsec(i->request_time,
+	    current_time));
 #if USE_DNSSERVERS
     x = ipcacheParse(reply);
 #else
@@ -480,7 +481,12 @@
 	IpcacheStats.pending_hits++;
 	ipcacheAddPending(i, handler, handlerData);
 	if (squid_curtime - i->expires > 600) {
-	    debug(14, 0) ("ipcache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n", name, (int) (squid_curtime + Config.negativeDnsTtl - i->expires));
+	    debug(14, 0)
+
+		
+		("ipcache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n",
+		name,
+		(int) (squid_curtime + Config.negativeDnsTtl - i->expires));
 	    ipcacheChangeKey(i);
 	    ipcache_call_pending(i);
 	}
@@ -527,8 +533,7 @@
     n = hashPrime(ipcache_high / 4);
     ip_table = hash_create((HASHCMP *) strcmp, n, hash4);
     cachemgrRegister("ipcache",
-	"IP Cache Stats and Contents",
-	stat_ipcache_get, 0, 1);
+	"IP Cache Stats and Contents", stat_ipcache_get, 0, 1);
 }
 
 int
@@ -599,8 +604,7 @@
 	i->locks ? 'L' : ' ',
 	(int) (squid_curtime - i->lastref),
 	(int) (i->expires - squid_curtime),
-	(int) i->addrs.count,
-	(int) i->addrs.badcount);
+	(int) i->addrs.count, (int) i->addrs.badcount);
     for (k = 0; k < (int) i->addrs.count; k++) {
 	storeAppendPrintf(sentry, " %15s-%3s", inet_ntoa(i->addrs.in_addrs[k]),
 	    i->addrs.bad_mask[k] ? "BAD" : "OK ");
@@ -617,16 +621,13 @@
     storeAppendPrintf(sentry, "IP Cache Statistics:\n");
     storeAppendPrintf(sentry, "IPcache Entries: %d\n",
 	memInUse(MEM_IPCACHE_ENTRY));
-    storeAppendPrintf(sentry, "IPcache Requests: %d\n",
-	IpcacheStats.requests);
-    storeAppendPrintf(sentry, "IPcache Hits: %d\n",
-	IpcacheStats.hits);
+    storeAppendPrintf(sentry, "IPcache Requests: %d\n", IpcacheStats.requests);
+    storeAppendPrintf(sentry, "IPcache Hits: %d\n", IpcacheStats.hits);
     storeAppendPrintf(sentry, "IPcache Pending Hits: %d\n",
 	IpcacheStats.pending_hits);
     storeAppendPrintf(sentry, "IPcache Negative Hits: %d\n",
 	IpcacheStats.negative_hits);
-    storeAppendPrintf(sentry, "IPcache Misses: %d\n",
-	IpcacheStats.misses);
+    storeAppendPrintf(sentry, "IPcache Misses: %d\n", IpcacheStats.misses);
     storeAppendPrintf(sentry, "Blocking calls to gethostbyname(): %d\n",
 	IpcacheStats.ghbn_calls);
     storeAppendPrintf(sentry, "Attempts to release locked entries: %d\n",
@@ -634,11 +635,7 @@
     storeAppendPrintf(sentry, "\n\n");
     storeAppendPrintf(sentry, "IP Cache Contents:\n\n");
     storeAppendPrintf(sentry, " %-29.29s %5s %6s %6s %1s\n",
-	"Hostname",
-	"Flags",
-	"lstref",
-	"TTL",
-	"N");
+	"Hostname", "Flags", "lstref", "TTL", "N");
     for (m = lru_list.head; m; m = m->next)
 	ipcacheStatPrint(m->data, sentry);
 }
@@ -734,7 +731,8 @@
     }
     if (k == ia->count) {
 	/* All bad, reset to All good */
-	debug(14, 3) ("ipcacheCycleAddr: Changing ALL %s addrs from BAD to OK\n",
+	debug(14,
+	    3) ("ipcacheCycleAddr: Changing ALL %s addrs from BAD to OK\n",
 	    name);
 	for (k = 0; k < ia->count; k++)
 	    ia->bad_mask[k] = 0;
@@ -856,49 +854,42 @@
 snmp_netIpFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
-    debug(49, 5) ("snmp_netIpFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+    debug(49, 5) ("snmp_netIpFn: Processing request:\n",
+	Var->name[LEN_SQ_NET + 1]);
     snmpDebugOid(5, Var->name, Var->name_length);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_NET + 1]) {
     case IP_ENT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    memInUse(MEM_IPCACHE_ENTRY),
-	    SMI_GAUGE32);
+	    memInUse(MEM_IPCACHE_ENTRY), SMI_GAUGE32);
 	break;
     case IP_REQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.requests,
-	    SMI_COUNTER32);
+	    IpcacheStats.requests, SMI_COUNTER32);
 	break;
     case IP_HITS:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.hits,
-	    SMI_COUNTER32);
+	    IpcacheStats.hits, SMI_COUNTER32);
 	break;
     case IP_PENDHIT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.pending_hits,
-	    SMI_GAUGE32);
+	    IpcacheStats.pending_hits, SMI_GAUGE32);
 	break;
     case IP_NEGHIT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.negative_hits,
-	    SMI_COUNTER32);
+	    IpcacheStats.negative_hits, SMI_COUNTER32);
 	break;
     case IP_MISS:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.misses,
-	    SMI_COUNTER32);
+	    IpcacheStats.misses, SMI_COUNTER32);
 	break;
     case IP_GHBN:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.ghbn_calls,
-	    SMI_COUNTER32);
+	    IpcacheStats.ghbn_calls, SMI_COUNTER32);
 	break;
     case IP_LOC:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IpcacheStats.release_locked,
-	    SMI_COUNTER32);
+	    IpcacheStats.release_locked, SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
Index: squid/src/leakfinder.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/leakfinder.c,v
retrieving revision 1.1.1.1.4.1.2.2
retrieving revision 1.1.1.1.4.1.2.2.2.1
diff -u -r1.1.1.1.4.1.2.2 -r1.1.1.1.4.1.2.2.2.1
--- squid/src/leakfinder.c	14 Jun 2001 21:34:24 -0000	1.1.1.1.4.1.2.2
+++ squid/src/leakfinder.c	27 Aug 2001 21:48:21 -0000	1.1.1.1.4.1.2.2.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: leakfinder.c,v 1.1.1.1.4.1.2.2 2001/06/14 21:34:24 serassio Exp $
+ * $Id: leakfinder.c,v 1.1.1.1.4.1.2.2.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -43,13 +43,15 @@
 
 static int leakCount = 0;
 
-typedef struct _ptr {
+typedef struct _ptr
+{
     void *key;
     struct _ptr *next;
     const char *file;
     int line;
     time_t when;
-} ptr;
+}
+ptr;
 
 static HASHCMP ptr_cmp;
 static HASHHASH ptr_hash;
@@ -62,9 +64,7 @@
 {
     debug(45, 3) ("ptrInit\n");
     htable = hash_create(ptr_cmp, 1 << 8, ptr_hash);
-    cachemgrRegister("leaks",
-	"Memory Leak Tracking",
-	ptrDump, 0, 1);
+    cachemgrRegister("leaks", "Memory Leak Tracking", ptrDump, 0, 1);
 }
 
 void *
@@ -100,11 +100,6 @@
 void *
 leakFree(void *p)
 {
-#ifdef _SQUID_MSWIN_
-#if USE_LEAKFINDER
-    return p;
-#endif
-#endif
     ptr *c = (ptr *) hash_lookup(htable, p);
     assert(p);
     assert(c != NULL);
Index: squid/src/main.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/main.c,v
retrieving revision 1.1.1.3.4.2.2.9
retrieving revision 1.1.1.3.4.2.2.9.2.1
diff -u -r1.1.1.3.4.2.2.9 -r1.1.1.3.4.2.2.9.2.1
--- squid/src/main.c	29 Jul 2001 16:06:05 -0000	1.1.1.3.4.2.2.9
+++ squid/src/main.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.2.2.9.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: main.c,v 1.1.1.3.4.2.2.9 2001/07/29 16:06:05 serassio Exp $
+ * $Id: main.c,v 1.1.1.3.4.2.2.9.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -38,12 +37,12 @@
 #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
 #include <windows.h>
 #include <process.h>
-#ifdef _SQUID_MSWIN_
-#include <direct.h>
-#endif
 static int opt_install_service = FALSE;
 static int opt_remove_service = FALSE;
-static int opt_signal_service = FALSE;
+#ifndef _SQUID_MSWIN_
+static
+#endif
+int opt_signal_service = FALSE;
 extern void WIN32_svcstatusupdate(DWORD);
 void WINAPI WIN32_svcHandler(DWORD);
 #endif
@@ -104,8 +103,7 @@
 	"       -a port   Specify HTTP port number (default: %d).\n"
 	"       -d level  Write debugging to stderr also.\n"
 	"       -f file   Use given config-file instead of\n"
-	"                 %s\n"
-	"       -h        Print help message.\n"
+	"                 %s\n" "       -h        Print help message.\n"
 #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
 	"       -i        Installs as a Windows Service (see -n option).\n"
 #endif
@@ -221,7 +219,7 @@
 	    else if (!strncmp(optarg, "check", strlen(optarg)))
 		opt_send_signal = 0;	/* SIGNULL */
 	    else if (!strncmp(optarg, "parse", strlen(optarg)))
-		opt_parse_cfg_only = 1;		/* parse cfg file only */
+		opt_parse_cfg_only = 1;	/* parse cfg file only */
 	    else
 		usage();
 	    break;
@@ -232,14 +230,16 @@
 		/* NOTREACHED */
 		break;
 #else
-		fatal("Need to add -DMALLOC_DBG when compiling to use -mX option");
+		fatal
+		    ("Need to add -DMALLOC_DBG when compiling to use -mX option");
 		/* NOTREACHED */
 #endif
 	    } else {
 #if XMALLOC_TRACE
 		xmalloc_trace = !xmalloc_trace;
 #else
-		fatal("Need to configure --enable-xmalloc-debug-trace to use -m option");
+		fatal
+		    ("Need to configure --enable-xmalloc-debug-trace to use -m option");
 #endif
 	    }
 #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
@@ -283,11 +283,9 @@
 rotate_logs(int sig)
 {
     do_rotate = 1;
-#ifndef _SQUID_MSWIN_
 #if !HAVE_SIGACTION
     signal(sig, rotate_logs);
 #endif
-#endif
 }
 
 #if ALARM_UPDATES_TIME
@@ -308,18 +306,15 @@
 reconfigure(int sig)
 {
     do_reconfigure = 1;
-#ifndef _SQUID_MSWIN_
 #if !HAVE_SIGACTION
     signal(sig, reconfigure);
 #endif
-#endif
 }
 
 void
 shut_down(int sig)
 {
     do_shutdown = sig == SIGINT ? -1 : 1;
-#ifndef _SQUID_MSWIN_
 #ifdef KILL_PARENT_OPT
     if (getppid() > 1) {
 	debug(1, 1) ("Killing RunCache, pid %d\n", getppid());
@@ -330,7 +325,6 @@
     signal(SIGTERM, SIG_DFL);
     signal(SIGINT, SIG_DFL);
 #endif
-#endif
 }
 
 static void
@@ -467,7 +461,7 @@
 setEffectiveUser(void)
 {
     leave_suid();		/* Run as non privilegied user */
-#if defined(_SQUID_OS2_) || defined(_SQUID_MSWIN_)
+#if defined(_SQUID_OS2_)
     return;
 #else
     if (geteuid() == 0) {
@@ -535,13 +529,13 @@
     log_trace_init("/tmp/squid.alloc");
 #endif
     debug(1, 0) ("Starting Squid Cache version %s for %s...\n",
-	version_string,
-	CONFIG_HOST_TYPE);
+	version_string, CONFIG_HOST_TYPE);
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
     if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE)
-	debug(1, 0) ("Running as %s Windows System Service on %s\n", WIN32_Service_name, WIN32_OS_string);
+	debug(1, 0) ("Running as %s Windows System Service on %s\n",
+	    WIN32_Service_name, WIN32_OS_string);
     else
-	debug(1, 0) ("Running on %s\n",WIN32_OS_string);
+	debug(1, 0) ("Running on %s\n", WIN32_OS_string);
 #endif
     debug(1, 1) ("Process ID %d\n", (int) getpid());
     debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD);
@@ -637,7 +631,8 @@
 
 #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
 /* When USE_WIN32_SERVICE is defined, the main function is placed in win32.c */
-void WINAPI SquidMain(DWORD argc, char **argv)
+void WINAPI
+SquidMain(DWORD argc, char **argv)
 #else
 int
 main(int argc, char **argv)
@@ -658,7 +653,7 @@
 	return;
 #else
     {
-	int WIN32_init_err;	
+	int WIN32_init_err;
 	if ((WIN32_init_err = WIN32_Subsystem_Init()))
 	    return WIN32_init_err;
     }
@@ -812,8 +807,8 @@
 	    do_reconfigure = 0;
 #if defined(_SQUID_MSWIN_) && defined(_DEBUG)
 	} else if (do_debug) {
-	do_debug = 0;
-	DebugBreak();
+	    do_debug = 0;
+	    __asm int 3;
 #endif
 	} else if (do_rotate) {
 	    mainRotate();
@@ -822,7 +817,8 @@
 	    time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0;
 	    debug(1, 1) ("Preparing for shutdown after %d requests\n",
 		Counter.client_http.requests);
-	    debug(1, 1) ("Waiting %d seconds for active connections to finish\n",
+	    debug(1,
+		1) ("Waiting %d seconds for active connections to finish\n",
 		wait);
 	    do_shutdown = 0;
 	    shutting_down = 1;
@@ -836,7 +832,8 @@
 #endif
 	    redirectShutdown();
 	    authenticateShutdown();
-	    eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1);
+	    eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1),
+		1);
 	}
 	eventRun();
 	if ((loop_delay = eventNextTime()) < 0)
@@ -885,14 +882,14 @@
 	    WIN32_sendSignal(opt_send_signal);
 	else {
 #endif
-	if (kill(pid, opt_send_signal) &&
-	/* ignore permissions if just running check */
-	    !(opt_send_signal == 0 && errno == EPERM)) {
-	    fprintf(stderr, "%s: ERROR: Could not send ", appname);
-	    fprintf(stderr, "signal %d to process %d: %s\n",
-		opt_send_signal, (int) pid, xstrerror());
-	    exit(1);
-	}
+	    if (kill(pid, opt_send_signal) &&
+		/* ignore permissions if just running check */
+		!(opt_send_signal == 0 && errno == EPERM)) {
+		fprintf(stderr, "%s: ERROR: Could not send ", appname);
+		fprintf(stderr, "signal %d to process %d: %s\n",
+		    opt_send_signal, (int) pid, xstrerror());
+		exit(1);
+	    }
 #if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
 	}
 #endif
Index: squid/src/mem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mem.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/mem.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/mem.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: mem.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: mem.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -41,24 +40,28 @@
 
 /* string pools */
 #define mem_str_pool_count 3
-static const struct {
+static const struct
+{
     const char *name;
     size_t obj_size;
-} StrPoolsAttrs[mem_str_pool_count] = {
+}
+StrPoolsAttrs[mem_str_pool_count] =
+{
 
     {
-	"Short Strings", 36,
-    },				/* to fit rfc1123 and similar */
+    "Short Strings", 36,}
+    ,				/* to fit rfc1123 and similar */
     {
-	"Medium Strings", 128,
-    },				/* to fit most urls */
+    "Medium Strings", 128,}
+    ,				/* to fit most urls */
     {
-	"Long Strings", 512
-    }				/* other */
+    "Long Strings", 512}	/* other */
 };
-static struct {
+static struct
+{
     MemPool *pool;
-} StrPools[mem_str_pool_count];
+}
+StrPools[mem_str_pool_count];
 static MemMeter StrCountMeter;
 static MemMeter StrVolumeMeter;
 
@@ -74,8 +77,7 @@
     size_t pooled_volume = 0;
     /* heading */
     storeAppendPrintf(sentry,
-	"String Pool\t Impact\t\t\n"
-	" \t (%%strings)\t (%%volume)\n");
+	"String Pool\t Impact\t\t\n" " \t (%%strings)\t (%%volume)\n");
     /* table body */
     for (i = 0; i < mem_str_pool_count; i++) {
 	const MemPool *pool = StrPools[i].pool;
@@ -91,7 +93,8 @@
     storeAppendPrintf(sentry, pfmt,
 	"Other Strings",
 	xpercentInt(StrCountMeter.level - pooled_count, StrCountMeter.level),
-	xpercentInt(StrVolumeMeter.level - pooled_volume, StrVolumeMeter.level));
+	xpercentInt(StrVolumeMeter.level - pooled_volume,
+	    StrVolumeMeter.level));
 }
 
 static void
@@ -216,7 +219,8 @@
 	sizeof(CommWriteStateData), 0);
     memDataInit(MEM_CONNSTATEDATA, "ConnStateData", sizeof(ConnStateData), 0);
 #if USE_CACHE_DIGESTS
-    memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", sizeof(DigestFetchState), 0);
+    memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState",
+	sizeof(DigestFetchState), 0);
 #endif
     memDataInit(MEM_DISK_BUF, "Disk I/O Buffer", DISK_PAGE_SIZE, 200);
     memDataInit(MEM_DLINK_LIST, "dlink_list", sizeof(dlink_list), 10);
@@ -231,8 +235,7 @@
     memDataInit(MEM_FILEMAP, "fileMap", sizeof(fileMap), 0);
     memDataInit(MEM_FQDNCACHE_ENTRY, "fqdncache_entry",
 	sizeof(fqdncache_entry), 0);
-    memDataInit(MEM_FQDNCACHE_PENDING, "fqdn_pending",
-	sizeof(fqdn_pending), 0);
+    memDataInit(MEM_FQDNCACHE_PENDING, "fqdn_pending", sizeof(fqdn_pending), 0);
     memDataInit(MEM_FWD_STATE, "FwdState", sizeof(FwdState), 0);
     memDataInit(MEM_FWD_SERVER, "FwdServer", sizeof(FwdServer), 0);
     memDataInit(MEM_HASH_LINK, "hash_link", sizeof(hash_link), 0);
@@ -241,11 +244,14 @@
 	sizeof(HierarchyLogEntry), 0);
     memDataInit(MEM_HTTP_STATE_DATA, "HttpStateData", sizeof(HttpStateData), 0);
     memDataInit(MEM_HTTP_REPLY, "HttpReply", sizeof(HttpReply), 0);
-    memDataInit(MEM_HTTP_HDR_ENTRY, "HttpHeaderEntry", sizeof(HttpHeaderEntry), 0);
+    memDataInit(MEM_HTTP_HDR_ENTRY, "HttpHeaderEntry", sizeof(HttpHeaderEntry),
+	0);
     memDataInit(MEM_HTTP_HDR_CC, "HttpHdrCc", sizeof(HttpHdrCc), 0);
-    memDataInit(MEM_HTTP_HDR_RANGE_SPEC, "HttpHdrRangeSpec", sizeof(HttpHdrRangeSpec), 0);
+    memDataInit(MEM_HTTP_HDR_RANGE_SPEC, "HttpHdrRangeSpec",
+	sizeof(HttpHdrRangeSpec), 0);
     memDataInit(MEM_HTTP_HDR_RANGE, "HttpHdrRange", sizeof(HttpHdrRange), 0);
-    memDataInit(MEM_HTTP_HDR_CONTENT_RANGE, "HttpHdrContRange", sizeof(HttpHdrContRange), 0);
+    memDataInit(MEM_HTTP_HDR_CONTENT_RANGE, "HttpHdrContRange",
+	sizeof(HttpHdrContRange), 0);
     memDataInit(MEM_ICPUDPDATA, "icpUdpData", sizeof(icpUdpData), 0);
     memDataInit(MEM_ICP_COMMON_T, "icp_common_t", sizeof(icp_common_t), 0);
     memDataInit(MEM_ICP_PING_DATA, "ping_data", sizeof(ping_data), 0);
@@ -262,7 +268,8 @@
     memDataInit(MEM_PEER, "peer", sizeof(peer), 0);
 #if USE_CACHE_DIGESTS
     memDataInit(MEM_PEER_DIGEST, "PeerDigest", sizeof(PeerDigest), 0);
-    memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", sizeof(DigestFetchState), 0);
+    memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState",
+	sizeof(DigestFetchState), 0);
 #endif
     memDataInit(MEM_PINGERECHODATA, "pingerEchoData",
 	sizeof(pingerEchoData), 0);
@@ -288,16 +295,14 @@
     memDataInit(MEM_HELPER, "helper", sizeof(helper), 0);
     memDataInit(MEM_HELPER_REQUEST, "helper_request",
 	sizeof(helper_request), 0);
-    memDataInit(MEM_HELPER_SERVER, "helper_server",
-	sizeof(helper_server), 0);
+    memDataInit(MEM_HELPER_SERVER, "helper_server", sizeof(helper_server), 0);
     memDataInit(MEM_STORE_IO, "storeIOState", sizeof(storeIOState), 0);
     /* init string pools */
     for (i = 0; i < mem_str_pool_count; i++) {
-	StrPools[i].pool = memPoolCreate(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size);
+	StrPools[i].pool =
+	    memPoolCreate(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size);
     }
-    cachemgrRegister("mem",
-	"Memory Utilization",
-	memStats, 0, 1);
+    cachemgrRegister("mem", "Memory Utilization", memStats, 0, 1);
 }
 
 /*
Index: squid/src/mib.txt
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mib.txt,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/mib.txt	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/mib.txt	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -2,7 +2,7 @@
 
 DEFINITIONS ::= BEGIN
 --
--- $Id: mib.txt,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+-- $Id: mib.txt,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
 --
 
 IMPORTS
Index: squid/src/mime.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mime.c,v
retrieving revision 1.1.1.3.4.1.2.2
retrieving revision 1.1.1.3.4.1.2.2.2.1
diff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.2.2.1
--- squid/src/mime.c	3 Jun 2001 19:41:48 -0000	1.1.1.3.4.1.2.2
+++ squid/src/mime.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.2.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: mime.c,v 1.1.1.3.4.1.2.2 2001/06/03 19:41:48 serassio Exp $
+ * $Id: mime.c,v 1.1.1.3.4.1.2.2.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -37,7 +36,8 @@
 
 #define GET_HDR_SZ 1024
 
-typedef struct _mime_entry {
+typedef struct _mime_entry
+{
     char *pattern;
     regex_t compiled_pattern;
     char *icon;
@@ -46,7 +46,8 @@
     char transfer_mode;
     unsigned int view_option:1, download_option:1;
     struct _mime_entry *next;
-} mimeEntry;
+}
+mimeEntry;
 
 static mimeEntry *MimeTable = NULL;
 static mimeEntry **MimeTableTail = NULL;
@@ -114,8 +115,7 @@
     return NULL;
 }
 
-size_t
-headersEnd(const char *mime, size_t l)
+size_t headersEnd(const char *mime, size_t l)
 {
     size_t e = 0;
     int state = 0;
@@ -292,9 +292,6 @@
 	debug(50, 1) ("mimeInit: %s: %s\n", filename, xstrerror());
 	return;
     }
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
-    setmode(fileno(fp), O_TEXT);
-#endif
     if (MimeTableTail == NULL)
 	MimeTableTail = &MimeTable;
     while (fgets(buf, BUFSIZ, fp)) {
@@ -335,7 +332,8 @@
 	    else if (!strcmp(option, "+view"))
 		view_option = 1;
 	    else
-		debug(25, 1) ("mimeInit: unknown option: '%s' (%s)\n", buf, option);
+		debug(25, 1) ("mimeInit: unknown option: '%s' (%s)\n", buf,
+		    option);
 	}
 	if (regcomp(&re, pattern, re_flags) != 0) {
 	    debug(25, 1) ("mimeInit: regcomp error: '%s'\n", buf);
@@ -415,10 +413,7 @@
     }
     flags = null_request_flags;
     flags.cachable = 1;
-    e = storeCreateEntry(url,
-	url,
-	flags,
-	METHOD_GET);
+    e = storeCreateEntry(url, url, flags, METHOD_GET);
     assert(e != NULL);
     storeSetPublicKey(e);
     storeBuffer(e);
Index: squid/src/mk-string-arrays.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mk-string-arrays.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/src/mk-string-arrays.pl	6 Jan 2001 12:40:14 -0000	1.1.1.1.44.1
+++ squid/src/mk-string-arrays.pl	27 Aug 2001 21:48:21 -0000	1.1.1.1.44.1.2.1
@@ -1,5 +1,5 @@
 #******************************************************************************
-# $Id: mk-string-arrays.pl,v 1.1.1.1.44.1 2001/01/06 12:40:14 hno Exp $
+# $Id: mk-string-arrays.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:21 tolsty Exp $
 #
 # File:		mk-strs.pl
 #
Index: squid/src/multicast.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/multicast.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/multicast.c	6 Jan 2001 12:40:14 -0000	1.1.1.1.4.1.2.1
+++ squid/src/multicast.c	27 Aug 2001 21:48:21 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: multicast.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: multicast.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 7     Multicast
  * AUTHOR: Martin Hamilton
Index: squid/src/neighbors.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/neighbors.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/neighbors.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/neighbors.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: neighbors.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: neighbors.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -97,8 +96,7 @@
     return NULL;
 }
 
-peer_t
-neighborType(const peer * p, const request_t * request)
+peer_t neighborType(const peer * p, const request_t * request)
 {
     const struct _domain_type *d = NULL;
     for (d = p->typelist; d; d = d->next) {
@@ -349,8 +347,7 @@
     }
     first_ping = Config.peers;
     cachemgrRegister("server_list",
-	"Peer Cache Statistics",
-	neighborDumpPeers, 0, 1);
+	"Peer Cache Statistics", neighborDumpPeers, 0, 1);
     cachemgrRegister("non_peers",
 	"List of Unknown sites sending ICP messages",
 	neighborDumpNonPeers, 0, 1);
@@ -359,10 +356,7 @@
 int
 neighborsUdpPing(request_t * request,
     StoreEntry * entry,
-    IRCB * callback,
-    void *callback_data,
-    int *exprep,
-    int *timeout)
+    IRCB * callback, void *callback_data, int *exprep, int *timeout)
 {
     const char *url = storeUrl(entry);
     MemObject *mem = entry->mem_obj;
@@ -395,7 +389,8 @@
 	    p->host, url);
 	if (p->type == PEER_MULTICAST)
 	    mcastSetTtl(theOutIcpConnection, p->mcast.ttl);
-	debug(15, 3) ("neighborsUdpPing: key = '%s'\n", storeKeyText(entry->key));
+	debug(15, 3) ("neighborsUdpPing: key = '%s'\n",
+	    storeKeyText(entry->key));
 	debug(15, 3) ("neighborsUdpPing: reqnum = %d\n", reqnum);
 
 #if USE_HTCP
@@ -405,14 +400,12 @@
 	} else
 #endif
 	if (p->icp.port == echo_port) {
-	    debug(15, 4) ("neighborsUdpPing: Looks like a dumb cache, send DECHO ping\n");
+	    debug(15, 4)
+		("neighborsUdpPing: Looks like a dumb cache, send DECHO ping\n");
 	    echo_hdr.reqnum = reqnum;
 	    query = icpCreateMessage(ICP_DECHO, 0, url, reqnum, 0);
 	    icpUdpSend(theOutIcpConnection,
-		&p->in_addr,
-		query,
-		LOG_ICP_QUERY,
-		0);
+		&p->in_addr, query, LOG_ICP_QUERY, 0);
 	} else {
 	    flags = 0;
 	    if (Config.onoff.query_icmp)
@@ -420,10 +413,7 @@
 		    flags |= ICP_FLAG_SRC_RTT;
 	    query = icpCreateMessage(ICP_QUERY, flags, url, reqnum, 0);
 	    icpUdpSend(theOutIcpConnection,
-		&p->in_addr,
-		query,
-		LOG_ICP_QUERY,
-		0);
+		&p->in_addr, query, LOG_ICP_QUERY, 0);
 	}
 	queries_sent++;
 
@@ -435,7 +425,8 @@
 	     */
 	    p->stats.last_reply = squid_curtime;
 	    (*exprep) += p->mcast.n_replies_expected;
-	} else if (squid_curtime - p->stats.last_query > Config.Timeout.deadPeer) {
+	} else if (squid_curtime - p->stats.last_query >
+	    Config.Timeout.deadPeer) {
 	    /*
 	     * fake a recent reply if its been a long time since our
 	     * last query
@@ -462,8 +453,7 @@
 	    /* log it once at the threshold */
 	    if (p->stats.logged_state == PEER_ALIVE) {
 		debug(15, 1) ("Detected DEAD %s: %s/%d/%d\n",
-		    neighborTypeStr(p),
-		    p->host, p->http_port, p->icp.port);
+		    neighborTypeStr(p), p->host, p->http_port, p->icp.port);
 		p->stats.logged_state = PEER_DEAD;
 	    }
 	}
@@ -492,10 +482,7 @@
 		to_addr.sin_port = htons(echo_port);
 		query = icpCreateMessage(ICP_SECHO, 0, url, reqnum, 0);
 		icpUdpSend(theOutIcpConnection,
-		    &to_addr,
-		    query,
-		    LOG_ICP_QUERY,
-		    0);
+		    &to_addr, query, LOG_ICP_QUERY, 0);
 	    }
 	} else {
 	    debug(15, 6) ("neighborsUdpPing: Source Ping: unknown host: %s\n",
@@ -521,11 +508,11 @@
 }
 
 /* lookup the digest of a given peer */
-lookup_t
-peerDigestLookup(peer * p, request_t * request, StoreEntry * entry)
+lookup_t peerDigestLookup(peer * p, request_t * request, StoreEntry * entry)
 {
 #if USE_CACHE_DIGESTS
-    const cache_key *key = request ? storeKeyPublic(storeUrl(entry), request->method) : NULL;
+    const cache_key *key =
+	request ? storeKeyPublic(storeUrl(entry), request->method) : NULL;
     assert(p);
     assert(request);
     debug(15, 5) ("peerDigestLookup: peer %s\n", p->host);
@@ -629,8 +616,7 @@
 {
     if (p->stats.logged_state == PEER_DEAD && p->tcp_up) {
 	debug(15, 1) ("Detected REVIVED %s: %s/%d/%d\n",
-	    neighborTypeStr(p),
-	    p->host, p->http_port, p->icp.port);
+	    neighborTypeStr(p), p->host, p->http_port, p->icp.port);
 	p->stats.logged_state = PEER_ALIVE;
     }
     p->stats.last_reply = squid_curtime;
@@ -661,8 +647,7 @@
 {
     if (p->stats.logged_state == PEER_DEAD && p->tcp_up) {
 	debug(15, 1) ("Detected REVIVED %s: %s/%d/%d\n",
-	    neighborTypeStr(p),
-	    p->host, p->http_port, p->icp.port);
+	    neighborTypeStr(p), p->host, p->http_port, p->icp.port);
 	p->stats.logged_state = PEER_ALIVE;
     }
     p->stats.last_reply = squid_curtime;
@@ -739,7 +724,8 @@
  * If a hit process is already started, then sobeit
  */
 void
-neighborsUdpAck(const cache_key * key, icp_common_t * header, const struct sockaddr_in *from)
+neighborsUdpAck(const cache_key * key, icp_common_t * header,
+    const struct sockaddr_in *from)
 {
     peer *p = NULL;
     StoreEntry *entry;
@@ -802,14 +788,16 @@
 	if (p == NULL) {
 	    neighborIgnoreNonPeer(from, opcode);
 	} else {
-	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header, mem->ircb_data);
+	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header,
+		mem->ircb_data);
 	}
     } else if (opcode == ICP_HIT) {
 	if (p == NULL) {
 	    neighborIgnoreNonPeer(from, opcode);
 	} else {
 	    header->opcode = ICP_HIT;
-	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header, mem->ircb_data);
+	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header,
+		mem->ircb_data);
 	}
     } else if (opcode == ICP_DECHO) {
 	if (p == NULL) {
@@ -818,7 +806,8 @@
 	    debug_trap("neighborsUdpAck: Found non-ICP cache as SIBLING\n");
 	    debug_trap("neighborsUdpAck: non-ICP neighbors must be a PARENT\n");
 	} else {
-	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header, mem->ircb_data);
+	    mem->ping_reply_callback(p, ntype, PROTO_ICP, header,
+		mem->ircb_data);
 	}
     } else if (opcode == ICP_SECHO) {
 	if (p) {
@@ -826,18 +815,23 @@
 	    neighborCountIgnored(p);
 #if ALLOW_SOURCE_PING
 	} else if (Config.onoff.source_ping) {
-	    mem->ping_reply_callback(NULL, ntype, PROTO_ICP, header, mem->ircb_data);
+	    mem->ping_reply_callback(NULL, ntype, PROTO_ICP, header,
+		mem->ircb_data);
 #endif
 	} else {
-	    debug(15, 1) ("Unsolicited SECHO from %s\n", inet_ntoa(from->sin_addr));
+	    debug(15, 1) ("Unsolicited SECHO from %s\n",
+		inet_ntoa(from->sin_addr));
 	}
     } else if (opcode == ICP_DENIED) {
 	if (p == NULL) {
 	    neighborIgnoreNonPeer(from, opcode);
 	} else if (p->stats.pings_acked > 100) {
 	    if (100 * p->icp.counts[ICP_DENIED] / p->stats.pings_acked > 95) {
-		debug(15, 0) ("95%% of replies from '%s' are UDP_DENIED\n", p->host);
-		debug(15, 0) ("Disabling '%s', please check your configuration.\n", p->host);
+		debug(15, 0) ("95%% of replies from '%s' are UDP_DENIED\n",
+		    p->host);
+		debug(15,
+		    0) ("Disabling '%s', please check your configuration.\n",
+		    p->host);
 		neighborRemove(p);
 		p = NULL;
 	    } else {
@@ -947,7 +941,8 @@
     }
     for (j = 0; j < (int) ia->count && j < PEER_MAX_ADDRESSES; j++) {
 	p->addresses[j] = ia->in_addrs[j];
-	debug(15, 2) ("--> IP address #%d: %s\n", j, inet_ntoa(p->addresses[j]));
+	debug(15, 2) ("--> IP address #%d: %s\n", j,
+	    inet_ntoa(p->addresses[j]));
 	p->n_addresses++;
     }
     ap = &p->in_addr;
@@ -988,13 +983,8 @@
 {
     peer *p = data;
     int fd;
-#ifdef _SQUID_MSWIN_
-    fd = comm_open(SOCK_STREAM, IPPROTO_TCP, Config.Addrs.tcp_outgoing,
-	0, COMM_NONBLOCKING, p->host);
-#else
-    fd = comm_open(SOCK_STREAM, 0, Config.Addrs.tcp_outgoing,
-	0, COMM_NONBLOCKING, p->host);
-#endif
+    fd = comm_open(SOCK_STREAM, 0, Config.Addrs.tcp_outgoing, 0,
+	COMM_NONBLOCKING, p->host);
     if (fd < 0)
 	return;
     p->test_fd = fd;
@@ -1006,10 +996,7 @@
 {
     peer *p = data;
     commConnectStart(p->test_fd,
-	p->host,
-	p->http_port,
-	peerCheckConnectDone,
-	p);
+	p->host, p->http_port, peerCheckConnectDone, p);
 }
 
 static void
@@ -1046,9 +1033,7 @@
     if (p->mcast.flags.count_event_pending)
 	return;
     eventAdd("peerCountMcastPeersStart",
-	peerCountMcastPeersStart,
-	p,
-	(double) when, 1);
+	peerCountMcastPeersStart, p, (double) when, 1);
     p->mcast.flags.count_event_pending = 1;
 }
 
@@ -1081,16 +1066,11 @@
     p->mcast.id = mem->id;
     reqnum = icpSetCacheKey(fake->key);
     query = icpCreateMessage(ICP_QUERY, 0, url, reqnum, 0);
-    icpUdpSend(theOutIcpConnection,
-	&p->in_addr,
-	query,
-	LOG_ICP_QUERY,
-	0);
+    icpUdpSend(theOutIcpConnection, &p->in_addr, query, LOG_ICP_QUERY, 0);
     fake->ping_status = PING_WAITING;
     eventAdd("peerCountMcastPeersDone",
 	peerCountMcastPeersDone,
-	psstate,
-	(double) Config.Timeout.mcast_icp_query, 1);
+	psstate, (double) Config.Timeout.mcast_icp_query, 1);
     p->mcast.flags.counting = 1;
     peerCountMcastPeersSchedule(p, MCAST_COUNT_RATE);
 }
@@ -1103,14 +1083,9 @@
     StoreEntry *fake = psstate->entry;
     p->mcast.flags.counting = 0;
     p->mcast.avg_n_members = doubleAverage(p->mcast.avg_n_members,
-	(double) psstate->ping.n_recv,
-	++p->mcast.n_times_counted,
-	10);
+	(double) psstate->ping.n_recv, ++p->mcast.n_times_counted, 10);
     debug(15, 1) ("Group %s: %d replies, %4.1f average, RTT %d\n",
-	p->host,
-	psstate->ping.n_recv,
-	p->mcast.avg_n_members,
-	p->stats.rtt);
+	p->host, psstate->ping.n_recv, p->mcast.avg_n_members, p->stats.rtt);
     p->mcast.n_replies_expected = (int) p->mcast.avg_n_members;
     EBIT_SET(fake->flags, ENTRY_ABORTED);
     requestUnlink(fake->mem_obj->request);
@@ -1122,7 +1097,8 @@
 }
 
 static void
-peerCountHandleIcpReply(peer * p, peer_t type, protocol_t proto, void *hdrnotused, void *data)
+peerCountHandleIcpReply(peer * p, peer_t type, protocol_t proto,
+    void *hdrnotused, void *data)
 {
     ps_state *psstate = data;
     StoreEntry *fake = psstate->entry;
@@ -1132,7 +1108,8 @@
     assert(fake);
     assert(mem);
     psstate->ping.n_recv++;
-    p->stats.rtt = intAverage(p->stats.rtt, rtt, psstate->ping.n_recv, RTT_AV_FACTOR);
+    p->stats.rtt =
+	intAverage(p->stats.rtt, rtt, psstate->ping.n_recv, RTT_AV_FACTOR);
 }
 
 static void
@@ -1193,10 +1170,7 @@
     for (e = peers; e; e = e->next) {
 	assert(e->host != NULL);
 	storeAppendPrintf(sentry, "\n%-11.11s: %s/%d/%d\n",
-	    neighborTypeStr(e),
-	    e->host,
-	    e->http_port,
-	    e->icp.port);
+	    neighborTypeStr(e), e->host, e->http_port, e->icp.port);
 	storeAppendPrintf(sentry, "Flags      :");
 	dump_peer_options(sentry, e);
 	for (i = 0; i < e->n_addresses; i++) {
@@ -1215,8 +1189,7 @@
 	    e->stats.pings_acked,
 	    percent(e->stats.pings_acked, e->stats.pings_sent));
 	storeAppendPrintf(sentry, "FETCHES    : %8d %3d%%\n",
-	    e->stats.fetches,
-	    percent(e->stats.fetches, e->stats.pings_acked));
+	    e->stats.fetches, percent(e->stats.fetches, e->stats.pings_acked));
 	storeAppendPrintf(sentry, "IGNORED    : %8d %3d%%\n",
 	    e->stats.ignored_replies,
 	    percent(e->stats.ignored_replies, e->stats.pings_acked));
@@ -1261,7 +1234,8 @@
 
 #if USE_HTCP
 void
-neighborsHtcpReply(const cache_key * key, htcpReplyData * htcp, const struct sockaddr_in *from)
+neighborsHtcpReply(const cache_key * key, htcpReplyData * htcp,
+    const struct sockaddr_in *from)
 {
     StoreEntry *e = storeGet(key);
     MemObject *mem = NULL;
Index: squid/src/net_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/net_db.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/net_db.c	6 Jan 2001 12:40:14 -0000	1.1.1.3.4.1.2.1
+++ squid/src/net_db.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: net_db.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:14 hno Exp $
+ * $Id: net_db.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -37,7 +36,8 @@
 
 #if USE_ICMP
 
-typedef struct {
+typedef struct
+{
     peer *p;
     StoreEntry *e;
     request_t *r;
@@ -45,7 +45,8 @@
     off_t used;
     size_t buf_sz;
     char *buf;
-} netdbExchangeState;
+}
+netdbExchangeState;
 
 static hash_table *addr_table = NULL;
 static hash_table *host_table = NULL;
@@ -183,10 +184,7 @@
 	*(list + list_count) = n;
 	list_count++;
     }
-    qsort((char *) list,
-	list_count,
-	sizeof(netdbEntry *),
-	netdbLRU);
+    qsort((char *) list, list_count, sizeof(netdbEntry *), netdbLRU);
     for (k = 0; k < list_count; k++) {
 	if (memInUse(MEM_NETDBENTRY) < Config.Netdb.low)
 	    break;
@@ -246,7 +244,8 @@
 	    hostname, n->network, na->network);
 	x = (net_db_name *) hash_lookup(host_table, hostname);
 	if (x == NULL) {
-	    debug(38, 1) ("netdbSendPing: net_db_name list bug: %s not found", hostname);
+	    debug(38, 1) ("netdbSendPing: net_db_name list bug: %s not found",
+		hostname);
 	    cbdataFree(hostname);
 	    return;
 	}
@@ -386,10 +385,7 @@
 	    n->network,
 	    n->pings_sent,
 	    n->pings_recv,
-	    n->hops,
-	    n->rtt,
-	    (int) n->next_ping_time,
-	    (int) n->last_use_time);
+	    n->hops, n->rtt, (int) n->next_ping_time, (int) n->last_use_time);
 	for (x = n->hosts; x; x = x->next)
 	    fprintf(fp, " %s", x->name);
 	fprintf(fp, "\n");
@@ -520,7 +516,8 @@
 	netdbExchangeDone(ex);
 	return;
     }
-    debug(38, 3) ("netdbExchangeHandleReply: for '%s:%d'\n", ex->p->host, ex->p->http_port);
+    debug(38, 3) ("netdbExchangeHandleReply: for '%s:%d'\n", ex->p->host,
+	ex->p->http_port);
     p = buf;
     if (0 == ex->used) {
 	/* skip reply headers */
@@ -570,7 +567,8 @@
 		hops = (double) ntohl(j) / 1000.0;
 		break;
 	    default:
-		debug(38, 1) ("netdbExchangeHandleReply: corrupt data, aborting\n");
+		debug(38,
+		    1) ("netdbExchangeHandleReply: corrupt data, aborting\n");
 		netdbExchangeDone(ex);
 		return;
 	    }
@@ -588,9 +586,13 @@
 	if (++nused == 20)
 	    break;
     }
-    debug(38, 3) ("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n",
+    debug(38, 3)
+
+	
+	("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n",
 	nused, rec_sz, nused * rec_sz);
-    debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen, ex->used);
+    debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen,
+	ex->used);
     if (EBIT_TEST(ex->e->flags, ENTRY_ABORTED)) {
 	debug(38, 3) ("netdbExchangeHandleReply: ENTRY_ABORTED\n");
 	netdbExchangeDone(ex);
@@ -638,9 +640,7 @@
     host_table = hash_create((HASHCMP *) strcmp, n, hash_string);
     eventAddIsh("netdbSaveState", netdbSaveState, NULL, 3600.0, 1);
     netdbReloadState();
-    cachemgrRegister("netdb",
-	"Network Measurement Database",
-	netdbDump, 0, 1);
+    cachemgrRegister("netdb", "Network Measurement Database", netdbDump, 0, 1);
 #endif
 }
 
@@ -677,9 +677,7 @@
     n->hops = ((n->hops * (N - 1)) + hops) / N;
     n->rtt = ((n->rtt * (N - 1)) + rtt) / N;
     debug(38, 3) ("netdbHandlePingReply: %s; rtt=%5.1f  hops=%4.1f\n",
-	n->network,
-	n->rtt,
-	n->hops);
+	n->network, n->rtt, n->hops);
 #endif
 }
 
@@ -724,11 +722,7 @@
     net_db_peer *p;
     storeAppendPrintf(sentry, "Network DB Statistics:\n");
     storeAppendPrintf(sentry, "%-16.16s %9s %7s %5s %s\n",
-	"Network",
-	"recv/sent",
-	"RTT",
-	"Hops",
-	"Hostnames");
+	"Network", "recv/sent", "RTT", "Hops", "Hostnames");
     list = xcalloc(memInUse(MEM_NETDBENTRY), sizeof(netdbEntry *));
     i = 0;
     hash_first(addr_table);
@@ -737,27 +731,18 @@
     if (i != memInUse(MEM_NETDBENTRY))
 	debug(38, 0) ("WARNING: netdb_addrs count off, found %d, expected %d\n",
 	    i, memInUse(MEM_NETDBENTRY));
-    qsort((char *) list,
-	i,
-	sizeof(netdbEntry *),
-	sortByRtt);
+    qsort((char *) list, i, sizeof(netdbEntry *), sortByRtt);
     for (k = 0; k < i; k++) {
 	n = *(list + k);
 	storeAppendPrintf(sentry, "%-16.16s %4d/%4d %7.1f %5.1f",
-	    n->network,
-	    n->pings_recv,
-	    n->pings_sent,
-	    n->rtt,
-	    n->hops);
+	    n->network, n->pings_recv, n->pings_sent, n->rtt, n->hops);
 	for (x = n->hosts; x; x = x->next)
 	    storeAppendPrintf(sentry, " %s", x->name);
 	storeAppendPrintf(sentry, "\n");
 	p = n->peers;
 	for (j = 0; j < n->n_peers; j++, p++) {
 	    storeAppendPrintf(sentry, "    %-22.22s %7.1f %5.1f\n",
-		p->peername,
-		p->rtt,
-		p->hops);
+		p->peername, p->rtt, p->hops);
 	}
     }
     xfree(list);
@@ -828,7 +813,8 @@
     double rtt = (double) irtt;
     double hops = (double) ihops;
     net_db_peer *p;
-    debug(38, 3) ("netdbUpdatePeer: '%s', %d hops, %d rtt\n", r->host, ihops, irtt);
+    debug(38, 3) ("netdbUpdatePeer: '%s', %d hops, %d rtt\n", r->host, ihops,
+	irtt);
     n = netdbLookupHost(r->host);
     if (n == NULL) {
 	debug(38, 3) ("netdbUpdatePeer: host '%s' not found\n", r->host);
@@ -841,10 +827,7 @@
     p->expires = squid_curtime + 3600;
     if (n->n_peers < 2)
 	return;
-    qsort((char *) n->peers,
-	n->n_peers,
-	sizeof(net_db_peer),
-	sortPeerByRtt);
+    qsort((char *) n->peers, n->n_peers, sizeof(net_db_peer), sortPeerByRtt);
 #endif
 }
 
@@ -867,10 +850,7 @@
     p->expires = squid_curtime + 3600;	/* XXX ? */
     if (n->n_peers < 2)
 	return;
-    qsort((char *) n->peers,
-	n->n_peers,
-	sizeof(net_db_peer),
-	sortPeerByRtt);
+    qsort((char *) n->peers, n->n_peers, sizeof(net_db_peer), sortPeerByRtt);
 #endif
 }
 
@@ -899,8 +879,7 @@
     struct in_addr addr;
     storeBuffer(s);
     httpReplyReset(reply);
-    httpReplySetHeaders(reply, 1.0, HTTP_OK, "OK",
-	NULL, -1, squid_curtime, -2);
+    httpReplySetHeaders(reply, 1.0, HTTP_OK, "OK", NULL, -1, squid_curtime, -2);
     httpReplySwapOut(reply, s);
     rec_sz = 0;
     rec_sz += 1 + sizeof(addr.s_addr);
@@ -958,7 +937,9 @@
     cbdataAdd(ex, cbdataXfree, 0);
     cbdataLock(p);
     ex->p = p;
-    uri = internalRemoteUri(p->host, p->http_port, "/squid-internal-dynamic/", "netdb");
+    uri =
+	internalRemoteUri(p->host, p->http_port, "/squid-internal-dynamic/",
+	"netdb");
     debug(38, 3) ("netdbExchangeStart: Requesting '%s'\n", uri);
     assert(NULL != uri);
     ex->r = urlParse(METHOD_GET, uri);
Index: squid/src/pconn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pconn.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/pconn.c	6 Jan 2001 12:40:15 -0000	1.1.1.2.4.1.2.1
+++ squid/src/pconn.c	27 Aug 2001 21:48:21 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: pconn.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: pconn.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 48    Persistent Connections
  * AUTHOR: Duane Wessels
@@ -35,7 +34,8 @@
 #define PCONN_C
 #include "squid.h"
 
-struct _pconn {
+struct _pconn
+{
     char *key;
     struct _pconn *next;
     int *fds;
@@ -120,11 +120,7 @@
     int n;
     assert(table != NULL);
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    n = recv(fd, buf, 256);
-#else
     n = read(fd, buf, 256);
-#endif
     debug(48, 3) ("pconnRead: %d bytes from FD %d, %s\n", n, fd, p->key);
     pconnRemoveFD(p, fd);
     comm_close(fd);
@@ -136,10 +132,7 @@
     int i;
     storeAppendPrintf(e,
 	"Client-side persistent connection counts:\n"
-	"\n"
-	"\treq/\n"
-	"\tconn      count\n"
-	"\t----  ---------\n");
+	"\n" "\treq/\n" "\tconn      count\n" "\t----  ---------\n");
     for (i = 0; i < PCONN_HIST_SZ; i++) {
 	if (client_pconn_hist[i] == 0)
 	    continue;
@@ -148,10 +141,7 @@
     storeAppendPrintf(e,
 	"\n"
 	"Server-side persistent connection counts:\n"
-	"\n"
-	"\treq/\n"
-	"\tconn      count\n"
-	"\t----  ---------\n");
+	"\n" "\treq/\n" "\tconn      count\n" "\t----  ---------\n");
     for (i = 0; i < PCONN_HIST_SZ; i++) {
 	if (server_pconn_hist[i] == 0)
 	    continue;
@@ -173,8 +163,7 @@
 	server_pconn_hist[i] = 0;
     }
     cachemgrRegister("pconn",
-	"Persistent Connection Utilization Histograms",
-	pconnHistDump, 0, 1);
+	"Persistent Connection Utilization Histograms", pconnHistDump, 0, 1);
     debug(48, 3) ("persistent connection module initialized\n");
 }
 
@@ -248,4 +237,4 @@
     else
 	assert(0);
 }
-#undef PCONN_C
\ No newline at end of file
+#undef PCONN_C
Index: squid/src/peer_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_digest.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/peer_digest.c	6 Jan 2001 12:40:15 -0000	1.1.1.3.4.1.2.1
+++ squid/src/peer_digest.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: peer_digest.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: peer_digest.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -50,11 +49,16 @@
 static STCB peerDigestSwapInHeaders;
 static STCB peerDigestSwapInCBlock;
 static STCB peerDigestSwapInMask;
-static int peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size, const char *step_name);
-static void peerDigestFetchStop(DigestFetchState * fetch, char *buf, const char *reason);
-static void peerDigestFetchAbort(DigestFetchState * fetch, char *buf, const char *reason);
-static void peerDigestReqFinish(DigestFetchState * fetch, char *buf, int, int, int, const char *reason, int err);
-static void peerDigestPDFinish(DigestFetchState * fetch, int pcb_valid, int err);
+static int peerDigestFetchedEnough(DigestFetchState * fetch, char *buf,
+    ssize_t size, const char *step_name);
+static void peerDigestFetchStop(DigestFetchState * fetch, char *buf,
+    const char *reason);
+static void peerDigestFetchAbort(DigestFetchState * fetch, char *buf,
+    const char *reason);
+static void peerDigestReqFinish(DigestFetchState * fetch, char *buf, int, int,
+    int, const char *reason, int err);
+static void peerDigestPDFinish(DigestFetchState * fetch, int pcb_valid,
+    int err);
 static void peerDigestFetchFinish(DigestFetchState * fetch, int err);
 static void peerDigestFetchSetStats(DigestFetchState * fetch);
 static int peerDigestSetCBlock(PeerDigest * pd, const char *buf);
@@ -168,8 +172,7 @@
 peerDigestIncDelay(const PeerDigest * pd)
 {
     assert(pd);
-    return pd->times.retry_delay > 0 ?
-	2 * pd->times.retry_delay :	/* exponential backoff */
+    return pd->times.retry_delay > 0 ? 2 * pd->times.retry_delay :	/* exponential backoff */
 	PeerDigestReqMinGap;	/* minimal delay */
 }
 
@@ -232,9 +235,11 @@
 	peerDigestNotePeerGone(pd);
 	return;
     }
-    debug(72, 3) ("peerDigestCheck: peer %s:%d\n", pd->peer->host, pd->peer->http_port);
+    debug(72, 3) ("peerDigestCheck: peer %s:%d\n", pd->peer->host,
+	pd->peer->http_port);
     debug(72, 3) ("peerDigestCheck: time: %d, last received: %d (%+d)\n",
-	squid_curtime, pd->times.received, (squid_curtime - pd->times.received));
+	squid_curtime, pd->times.received,
+	(squid_curtime - pd->times.received));
 
     /* decide when we should send the request:
      * request now unless too close to other requests */
@@ -242,16 +247,19 @@
 
     /* per-peer limit */
     if (req_time - pd->times.received < PeerDigestReqMinGap) {
-	debug(72, 2) ("peerDigestCheck: %s, avoiding close peer requests (%d < %d secs).\n",
+	debug(72, 2)
+
+	    
+	    ("peerDigestCheck: %s, avoiding close peer requests (%d < %d secs).\n",
 	    strBuf(pd->host), req_time - pd->times.received,
 	    PeerDigestReqMinGap);
 	req_time = pd->times.received + PeerDigestReqMinGap;
     }
     /* global limit */
     if (req_time - pd_last_req_time < GlobDigestReqMinGap) {
-	debug(72, 2) ("peerDigestCheck: %s, avoiding close requests (%d < %d secs).\n",
-	    strBuf(pd->host), req_time - pd_last_req_time,
-	    GlobDigestReqMinGap);
+	debug(72, 2)
+	    ("peerDigestCheck: %s, avoiding close requests (%d < %d secs).\n",
+	    strBuf(pd->host), req_time - pd_last_req_time, GlobDigestReqMinGap);
 	req_time = pd_last_req_time + GlobDigestReqMinGap;
     }
     if (req_time <= squid_curtime)
@@ -349,9 +357,10 @@
 	assert(reply);
 	httpReplyParse(reply, buf, hdr_size);
 	status = reply->sline.status;
-	debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %d (%+d)\n",
-	    strBuf(pd->host), status,
-	    reply->expires, reply->expires - squid_curtime);
+	debug(72,
+	    3) ("peerDigestFetchReply: %s status: %d, expires: %d (%+d)\n",
+	    strBuf(pd->host), status, reply->expires,
+	    reply->expires - squid_curtime);
 
 	/* this "if" is based on clientHandleIMSReply() */
 	if (status == HTTP_NOT_MODIFIED) {
@@ -362,7 +371,8 @@
 		fetch->old_entry->mem_obj->request = r =
 		    requestLink(fetch->entry->mem_obj->request);
 	    assert(fetch->old_entry->mem_obj->request);
-	    httpReplyUpdateOnNotModified(fetch->old_entry->mem_obj->reply, reply);
+	    httpReplyUpdateOnNotModified(fetch->old_entry->mem_obj->reply,
+		reply);
 	    storeTimestampsSet(fetch->old_entry);
 	    /* get rid of 304 reply */
 	    storeUnregister(fetch->entry, fetch);
@@ -375,7 +385,8 @@
 	} else if (status == HTTP_OK) {
 	    /* get rid of old entry if any */
 	    if (fetch->old_entry) {
-		debug(72, 3) ("peerDigestFetchReply: got new digest, releasing old one\n");
+		debug(72, 3)
+		    ("peerDigestFetchReply: got new digest, releasing old one\n");
 		storeUnregister(fetch->old_entry, fetch);
 		storeReleaseRequest(fetch->old_entry);
 		storeUnlockObject(fetch->old_entry);
@@ -383,7 +394,8 @@
 	    }
 	} else {
 	    /* some kind of a bug */
-	    peerDigestFetchAbort(fetch, buf, httpStatusLineReason(&reply->sline));
+	    peerDigestFetchAbort(fetch, buf,
+		httpStatusLineReason(&reply->sline));
 	    return;
 	}
 	/* must have a ready-to-use store entry if we got here */
@@ -420,14 +432,14 @@
 	    httpReplyParse(fetch->entry->mem_obj->reply, buf, hdr_size);
 	if (fetch->entry->mem_obj->reply->sline.status != HTTP_OK) {
 	    debug(72, 1) ("peerDigestSwapInHeaders: %s status %d got cached!\n",
-		strBuf(fetch->pd->host), fetch->entry->mem_obj->reply->sline.status);
+		strBuf(fetch->pd->host),
+		fetch->entry->mem_obj->reply->sline.status);
 	    peerDigestFetchAbort(fetch, buf, "internal status error");
 	    return;
 	}
 	fetch->offset += hdr_size;
 	storeClientCopy(fetch->entry, size, fetch->offset,
-	    SM_PAGE_SIZE, buf,
-	    peerDigestSwapInCBlock, fetch);
+	    SM_PAGE_SIZE, buf, peerDigestSwapInCBlock, fetch);
     } else {
 	/* need more data, do we have space? */
 	if (size >= SM_PAGE_SIZE)
@@ -462,9 +474,7 @@
 	    storeClientCopy(fetch->entry,
 		seen,
 		fetch->offset,
-		pd->cd->mask_size,
-		pd->cd->mask,
-		peerDigestSwapInMask, fetch);
+		pd->cd->mask_size, pd->cd->mask, peerDigestSwapInMask, fetch);
 	} else {
 	    peerDigestFetchAbort(fetch, buf, "invalid digest cblock");
 	}
@@ -505,13 +515,13 @@
 	    fetch->offset,
 	    fetch->offset,
 	    buf_sz,
-	    pd->cd->mask + fetch->mask_offset,
-	    peerDigestSwapInMask, fetch);
+	    pd->cd->mask + fetch->mask_offset, peerDigestSwapInMask, fetch);
     }
 }
 
 static int
-peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size, const char *step_name)
+peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size,
+    const char *step_name)
 {
     PeerDigest *pd = NULL;
     const char *host = "<unknown>";	/* peer host */
@@ -599,8 +609,7 @@
 /* complete the digest transfer, update stats, unlock/release everything */
 static void
 peerDigestReqFinish(DigestFetchState * fetch, char *buf,
-    int fcb_valid, int pdcb_valid, int pcb_valid,
-    const char *reason, int err)
+    int fcb_valid, int pdcb_valid, int pcb_valid, const char *reason, int err)
 {
     assert(reason);
 
@@ -649,8 +658,7 @@
 
     if (err) {
 	debug(72, 1) ("%sdisabling (%s) digest from %s\n",
-	    pcb_valid ? "temporary " : "",
-	    pd->req_result, host);
+	    pcb_valid ? "temporary " : "", pd->req_result, host);
 
 	if (pd->cd) {
 	    cacheDigestDestroy(pd->cd);
@@ -772,9 +780,12 @@
 	return 0;
     }
     /* check consistency further */
-    if (cblock.mask_size != cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry)) {
-	debug(72, 0) ("%s digest cblock is corrupted (mask size mismatch: %d ? %d).\n",
-	    host, cblock.mask_size, cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry));
+    if (cblock.mask_size != cacheDigestCalcMaskSize(cblock.capacity,
+	    cblock.bits_per_entry)) {
+	debug(72, 0)
+	    ("%s digest cblock is corrupted (mask size mismatch: %d ? %d).\n",
+	    host, cblock.mask_size, cacheDigestCalcMaskSize(cblock.capacity,
+		cblock.bits_per_entry));
 	return 0;
     }
     /* there are some things we cannot do yet */
@@ -843,7 +854,8 @@
 
     cacheDigestGuessStatsReport(&pd->stats.guess, e, host);
 
-    storeAppendPrintf(e, "\nevent\t timestamp\t secs from now\t secs from init\n");
+    storeAppendPrintf(e,
+	"\nevent\t timestamp\t secs from now\t secs from init\n");
     appendTime(initialized);
     appendTime(needed);
     appendTime(requested);
Index: squid/src/peer_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_select.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/peer_select.c	6 Jan 2001 12:40:15 -0000	1.1.1.3.4.1.2.1
+++ squid/src/peer_select.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: peer_select.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: peer_select.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -35,8 +34,7 @@
 
 #include "squid.h"
 
-const char *hier_strings[] =
-{
+const char *hier_strings[] = {
     "NONE",
     "DIRECT",
     "SIBLING_HIT",
@@ -62,12 +60,13 @@
     "INVALID CODE"
 };
 
-static struct {
+static struct
+{
     int timeouts;
-} PeerStats;
+}
+PeerStats;
 
-static char *DirectStr[] =
-{
+static char *DirectStr[] = {
     "DIRECT_UNKNOWN",
     "DIRECT_NO",
     "DIRECT_MAYBE",
@@ -129,9 +128,7 @@
 
 void
 peerSelect(request_t * request,
-    StoreEntry * entry,
-    PSC * callback,
-    void *callback_data)
+    StoreEntry * entry, PSC * callback, void *callback_data)
 {
     ps_state *psstate = xcalloc(1, sizeof(ps_state));
     if (entry)
@@ -230,28 +227,19 @@
     StoreEntry *entry = ps->entry;
     request_t *request = ps->request;
     debug(44, 3) ("peerSelectFoo: '%s %s'\n",
-	RequestMethodStr[request->method],
-	request->host);
+	RequestMethodStr[request->method], request->host);
     if (ps->direct == DIRECT_UNKNOWN) {
 	if (ps->always_direct == 0 && Config.accessList.AlwaysDirect) {
-	    ps->acl_checklist = aclChecklistCreate(
-		Config.accessList.AlwaysDirect,
-		request,
-		NULL);		/* ident */
-	    aclNBCheck(ps->acl_checklist,
-		peerCheckAlwaysDirectDone,
-		ps);
+	    ps->acl_checklist =
+		aclChecklistCreate(Config.accessList.AlwaysDirect, request, NULL);	/* ident */
+	    aclNBCheck(ps->acl_checklist, peerCheckAlwaysDirectDone, ps);
 	    return;
 	} else if (ps->always_direct > 0) {
 	    ps->direct = DIRECT_YES;
 	} else if (ps->never_direct == 0 && Config.accessList.NeverDirect) {
-	    ps->acl_checklist = aclChecklistCreate(
-		Config.accessList.NeverDirect,
-		request,
-		NULL);		/* ident */
-	    aclNBCheck(ps->acl_checklist,
-		peerCheckNeverDirectDone,
-		ps);
+	    ps->acl_checklist =
+		aclChecklistCreate(Config.accessList.NeverDirect, request, NULL);	/* ident */
+	    aclNBCheck(ps->acl_checklist, peerCheckNeverDirectDone, ps);
 	    return;
 	} else if (ps->never_direct > 0) {
 	    ps->direct = DIRECT_NO;
@@ -260,8 +248,7 @@
 	} else {
 	    ps->direct = DIRECT_MAYBE;
 	}
-	debug(44, 3) ("peerSelectFoo: direct = %s\n",
-	    DirectStr[ps->direct]);
+	debug(44, 3) ("peerSelectFoo: direct = %s\n", DirectStr[ps->direct]);
     }
     if (entry == NULL) {
 	(void) 0;
@@ -324,9 +311,7 @@
 	ps->ping.n_sent = neighborsUdpPing(request,
 	    entry,
 	    peerHandlePingReply,
-	    ps,
-	    &ps->ping.n_replies_expected,
-	    &ps->ping.timeout);
+	    ps, &ps->ping.n_replies_expected, &ps->ping.timeout);
 	if (ps->ping.n_sent == 0)
 	    debug(44, 0) ("WARNING: neighborsUdpPing returned 0\n");
 	debug(44, 3) ("peerSelect: %d ICP replies expected, RTT %d msec\n",
@@ -334,10 +319,7 @@
 	if (ps->ping.n_replies_expected > 0) {
 	    entry->ping_status = PING_WAITING;
 	    eventAdd("peerPingTimeout",
-		peerPingTimeout,
-		ps,
-		0.001 * ps->ping.timeout,
-		0);
+		peerPingTimeout, ps, 0.001 * ps->ping.timeout, 0);
 	    return;
 	}
     }
@@ -416,8 +398,7 @@
     request_t *request = ps->request;
     hier_code code = HIER_NONE;
     debug(44, 3) ("peerGetSomeParent: %s %s\n",
-	RequestMethodStr[request->method],
-	request->host);
+	RequestMethodStr[request->method], request->host);
     if (ps->direct == DIRECT_YES)
 	return;
     if ((p = getDefaultParent(request))) {
@@ -497,8 +478,7 @@
     ps_state *psstate = data;
     icp_opcode op = header->opcode;
     debug(44, 3) ("peerHandleIcpReply: %s %s\n",
-	icp_opcode_str[op],
-	storeUrl(psstate->entry));
+	icp_opcode_str[op], storeUrl(psstate->entry));
 #if USE_CACHE_DIGESTS && 0
     /* do cd lookup to count false misses */
     if (p && request)
@@ -533,8 +513,7 @@
 {
     ps_state *psstate = data;
     debug(44, 3) ("peerHandleIcpReply: %s %s\n",
-	htcp->hit ? "HIT" : "MISS",
-	storeUrl(psstate->entry));
+	htcp->hit ? "HIT" : "MISS", storeUrl(psstate->entry));
     psstate->ping.n_recv++;
     if (htcp->hit) {
 	psstate->hit = p;
@@ -580,7 +559,8 @@
 #endif
 
 static void
-peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *pingdata, void *data)
+peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *pingdata,
+    void *data)
 {
     if (proto == PROTO_ICP)
 	peerHandleIcpReply(p, type, pingdata, data);
@@ -589,7 +569,8 @@
 	peerHandleHtcpReply(p, type, pingdata, data);
 #endif
     else
-	debug(44, 1) ("peerHandlePingReply: unknown protocol_t %d\n", (int) proto);
+	debug(44, 1) ("peerHandlePingReply: unknown protocol_t %d\n",
+	    (int) proto);
 }
 
 static void
@@ -597,8 +578,7 @@
 {
     FwdServer *fs = memAllocate(MEM_FWD_SERVER);
     debug(44, 5) ("peerAddFwdServer: adding %s %s\n",
-	p ? p->host : "DIRECT",
-	hier_strings[code]);
+	p ? p->host : "DIRECT", hier_strings[code]);
     fs->peer = p;
     fs->code = code;
     cbdataLock(fs->peer);
Index: squid/src/pinger.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pinger.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/pinger.c	6 Jan 2001 12:40:15 -0000	1.1.1.3.4.1.2.1
+++ squid/src/pinger.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: pinger.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: pinger.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -37,12 +36,65 @@
 
 #if USE_ICMP
 
+#ifndef _SQUID_MSWIN_
 #include <netinet/in_systm.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
+#else
+#include <winsock2.h>
+#include <process.h>
+
+#define ICMP_ECHO 8
+#define ICMP_ECHOREPLY 0
 
-#ifndef _SQUID_LINUX_
+typedef struct iphdr
+{
+    BYTE ip_vhl:4;		// Length of the header in dwords
+    BYTE version:4;		// Version of IP
+    BYTE tos;			// Type of service
+    USHORT total_len;		// Length of the packet in dwords
+    USHORT ident;		// unique identifier
+    USHORT flags;		// Flags
+    BYTE ip_ttl;		// Time to live
+    BYTE proto;			// Protocol number (TCP, UDP etc)
+    USHORT checksum;		// IP checksum
+    ULONG source_ip;
+    ULONG dest_ip;
+}
+iphdr;
+
+// ICMP header
+typedef struct icmphdr
+{
+    BYTE icmp_type;		// ICMP packet type
+    BYTE icmp_code;		// Type sub code
+    USHORT icmp_cksum;
+    USHORT icmp_id;
+    USHORT icmp_seq;
+    ULONG timestamp;		// not part of ICMP, but we need it
+}
+icmphdr;
+
+int
+xrename(const char *from, const char *to)
+{
+    debug(21, 2) ("xrename: renaming %s to %s\n", from, to);
+#ifdef _SQUID_MSWIN_
+    remove(to);
+#endif
+    if (0 == rename(from, to))
+	return 0;
+    debug(21, errno == ENOENT ? 2 : 1) ("xrename: Cannot rename %s to %s: %s\n",
+	from, to, xstrerror());
+    return -1;
+}
+
+static SOCKET squid_sock = -1;
+
+#endif
+
+#if !defined(_SQUID_LINUX_) && !defined(_SQUID_MSWIN_)
 #define icmphdr icmp
 #define iphdr ip
 #endif
@@ -80,17 +132,18 @@
 #define MAX_PKT_SZ (MAX_PAYLOAD + sizeof(struct timeval) + sizeof (char) + sizeof(struct icmphdr) + 1)
 #endif
 
-typedef struct {
+typedef struct
+{
     struct timeval tv;
     unsigned char opcode;
     char payload[MAX_PAYLOAD];
-} icmpEchoData;
+}
+icmpEchoData;
 
 int icmp_ident = -1;
 int icmp_pkts_sent = 0;
 
-static const char *icmpPktStr[] =
-{
+static const char *icmpPktStr[] = {
     "Echo Reply",
     "ICMP 1",
     "ICMP 2",
@@ -121,23 +174,97 @@
 pingerOpen(void)
 {
     struct protoent *proto = NULL;
+#ifdef _SQUID_MSWIN_
+    WSADATA wsaData;
+    WSAPROTOCOL_INFO wpi;
+    char buf[sizeof(wpi)];
+    int x;
+    struct sockaddr_in PS;
+
+    WSAStartup(2, &wsaData);
+
+    getCurrentTime();
+    _db_init(NULL, "ALL,1");
+    setmode(0, O_BINARY);
+    setmode(1, O_BINARY);
+    x = read(0, buf, sizeof(wpi));
+    if (x < sizeof(wpi)) {
+	getCurrentTime();
+	debug(42, 0) ("pingerOpen: read: FD 0: %s\n", xstrerror());
+	write(1, "ERR\n", 4);
+	exit(1);
+    }
+    xmemcpy(&wpi, buf, sizeof(wpi));
+
+    write(1, "OK\n", 3);
+    x = read(0, buf, sizeof(PS));
+    if (x < sizeof(PS)) {
+	getCurrentTime();
+	debug(42, 0) ("pingerOpen: read: FD 0: %s\n", xstrerror());
+	write(1, "ERR\n", 4);
+	exit(1);
+    }
+    xmemcpy(&PS, buf, sizeof(PS));
+#endif
     if ((proto = getprotobyname("icmp")) == 0) {
+	getCurrentTime();
 	debug(42, 0) ("pingerOpen: unknown protocol: icmp\n");
 	exit(1);
     }
     icmp_sock = socket(PF_INET, SOCK_RAW, proto->p_proto);
     if (icmp_sock < 0) {
+	getCurrentTime();
 	debug(50, 0) ("pingerOpen: icmp_sock: %s\n", xstrerror());
 	exit(1);
     }
     icmp_ident = getpid() & 0xffff;
     debug(42, 0) ("pinger: ICMP socket opened\n");
+#ifdef _SQUID_MSWIN_
+    squid_sock =
+	WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
+	&wpi, 0, 0);
+    if (squid_sock == INVALID_SOCKET) {
+	getCurrentTime();
+	debug(42, 0) ("pingerOpen: WSASocket: %s\n", xstrerror());
+	write(1, "ERR\n", 4);
+	exit(1);
+    }
+    x = connect(squid_sock, (struct sockaddr *) &PS, sizeof(PS));
+    if (SOCKET_ERROR == x) {
+	getCurrentTime();
+	debug(42, 0) ("pingerOpen: connect: %s\n", xstrerror());
+	write(1, "ERR\n", 4);
+	exit(1);
+    }
+    write(1, "OK\n", 3);
+    memset(buf, 0, sizeof(buf));
+    x = recv(squid_sock, buf, sizeof(buf), 0);
+    if (x < 3) {
+	debug(42, 0) ("icmpOpen: recv: %s\n", xstrerror());
+	exit(1);
+    }
+    x = send(squid_sock, buf, strlen(buf), 0);
+    if (x < 3 || strncmp("OK\n", buf, 3)) {
+	debug(42, 0) ("icmpOpen: recv: %s\n", xstrerror());
+	exit(1);
+    }
+
+    getCurrentTime();
+    debug(42, 0) ("pinger: Squid socket opened\n");
+#endif
 }
 
 void
 pingerClose(void)
 {
+#ifdef _SQUID_MSWIN_
+    closesocket(icmp_sock);
+    shutdown(squid_sock, SD_BOTH);
+    closesocket(squid_sock);
+    squid_sock = -1;
+#else
     close(icmp_sock);
+#endif
     icmp_sock = -1;
     icmp_ident = 0;
 }
@@ -185,10 +312,7 @@
     assert(icmp_pktsize <= MAX_PKT_SZ);
     sendto(icmp_sock,
 	pkt,
-	icmp_pktsize,
-	0,
-	(struct sockaddr *) &S,
-	sizeof(struct sockaddr_in));
+	icmp_pktsize, 0, (struct sockaddr *) &S, sizeof(struct sockaddr_in));
     pingerLog(icmp, to, 0, 0);
 }
 
@@ -210,17 +334,14 @@
 	pkt = xmalloc(MAX_PKT_SZ);
     fromlen = sizeof(from);
     n = recvfrom(icmp_sock,
-	pkt,
-	MAX_PKT_SZ,
-	0,
-	(struct sockaddr *) &from,
-	&fromlen);
+	pkt, MAX_PKT_SZ, 0, (struct sockaddr *) &from, &fromlen);
 #if GETTIMEOFDAY_NO_TZP
     gettimeofday(&now);
 #else
     gettimeofday(&now, NULL);
 #endif
-    debug(42, 9) ("pingerRecv: %d bytes from %s\n", n, inet_ntoa(from.sin_addr));
+    debug(42, 9) ("pingerRecv: %d bytes from %s\n", n,
+	inet_ntoa(from.sin_addr));
     ip = (struct iphdr *) (void *) pkt;
 #if HAVE_IP_HL
     iphdrlen = ip->ip_hl << 2;
@@ -276,10 +397,7 @@
 	(int) current_time.tv_sec,
 	(int) current_time.tv_usec,
 	inet_ntoa(addr),
-	(int) icmp->icmp_type,
-	icmpPktStr[icmp->icmp_type],
-	rtt,
-	hops);
+	(int) icmp->icmp_type, icmpPktStr[icmp->icmp_type], rtt, hops);
 }
 
 static int
@@ -305,7 +423,11 @@
     int n;
     int guess_size;
     memset(&pecho, '\0', sizeof(pecho));
+#ifdef _SQUID_MSWIN_
+    n = recv(squid_sock, (char *) &pecho, sizeof(pecho), 0);
+#else
     n = recv(0, (char *) &pecho, sizeof(pecho), 0);
+#endif
     if (n < 0)
 	return n;
     if (0 == n) {
@@ -321,10 +443,7 @@
 	/* don't process this message, but keep running */
 	return 0;
     }
-    pingerSendEcho(pecho.to,
-	pecho.opcode,
-	pecho.payload,
-	pecho.psize);
+    pingerSendEcho(pecho.to, pecho.opcode, pecho.payload, pecho.psize);
     return n;
 }
 
@@ -332,14 +451,18 @@
 pingerSendtoSquid(pingerReplyData * preply)
 {
     int len = sizeof(pingerReplyData) - MAX_PKT_SZ + preply->psize;
+#ifdef _SQUID_MSWIN_
+    if (send(squid_sock, (char *) preply, len, 0) < 0) {
+#else
     if (send(1, (char *) preply, len, 0) < 0) {
+#endif
 	debug(50, 0) ("pinger: send: %s\n", xstrerror());
+	pingerClose();
 	exit(1);
     }
 }
 
-time_t
-getCurrentTime(void)
+time_t getCurrentTime(void)
 {
 #if GETTIMEOFDAY_NO_TZP
     gettimeofday(&current_time);
@@ -365,8 +488,10 @@
  * drop privs
  */
     pingerOpen();
+#ifndef _SQUID_MSWIN_
     setgid(getgid());
     setuid(getuid());
+#endif
 
     if ((t = getenv("SQUID_DEBUG")))
 	debug_args = xstrdup(t);
@@ -374,25 +499,50 @@
     _db_init(NULL, debug_args);
 
     for (;;) {
+#ifdef _SQUID_MSWIN_
+	tv.tv_sec = 5;
+#else
 	tv.tv_sec = 10;
+#endif
 	tv.tv_usec = 0;
 	FD_ZERO(&R);
+#ifdef _SQUID_MSWIN_
+	FD_SET(squid_sock, &R);
+#else
 	FD_SET(0, &R);
+#endif
 	FD_SET(icmp_sock, &R);
 	x = select(icmp_sock + 1, &R, NULL, NULL, &tv);
 	getCurrentTime();
 	if (x < 0)
-	    exit(1);
+	    pingerClose();
+	exit(1);
+#ifdef _SQUID_MSWIN_
+	if (FD_ISSET(squid_sock, &R))
+#else
 	if (FD_ISSET(0, &R))
+#endif
 	    if (pingerReadRequest() < 0) {
 		debug(42, 0) ("Pinger exiting.\n");
+		pingerClose();
 		exit(1);
 	    }
 	if (FD_ISSET(icmp_sock, &R))
 	    pingerRecv();
+#ifdef _SQUID_MSWIN_
+	if (5 + last_check_time < squid_curtime) {
+	    if (send(squid_sock, (char *) &tv, 0, 0) < 0) {
+		debug(42, 0) ("Pinger exiting.\n");
+		pingerClose();
+		exit(1);
+	    }
+#else
 	if (10 + last_check_time < squid_curtime) {
-	    if (send(1, (char *) &tv, 0, 0) < 0)
+	    if (send(1, (char *) &tv, 0, 0) < 0) {
+		pingerClose();
 		exit(1);
+	    }
+#endif
 	    last_check_time = squid_curtime;
 	}
     }
Index: squid/src/protos.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/protos.h,v
retrieving revision 1.1.1.3.4.1.2.6
retrieving revision 1.1.1.3.4.1.2.6.2.1
diff -u -r1.1.1.3.4.1.2.6 -r1.1.1.3.4.1.2.6.2.1
--- squid/src/protos.h	29 Jul 2001 09:10:28 -0000	1.1.1.3.4.1.2.6
+++ squid/src/protos.h	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.6.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: protos.h,v 1.1.1.3.4.1.2.6 2001/07/29 09:10:28 serassio Exp $
+ * $Id: protos.h,v 1.1.1.3.4.1.2.6.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -43,8 +42,7 @@
 #endif
 
 extern aclCheck_t *aclChecklistCreate(const struct _acl_access *,
-    request_t *,
-    const char *ident);
+    request_t *, const char *ident);
 extern void aclNBCheck(aclCheck_t *, PF *, void *);
 extern int aclCheckFast(const struct _acl_access *A, aclCheck_t *);
 extern void aclChecklistFree(aclCheck_t *);
@@ -80,10 +78,14 @@
 extern int aio_get_queue_len(void);
 
 extern void aioInit(void);
+#ifdef _SQUID_MSWIN_
+extern void aioShutdown(void);
+#endif
 extern void aioCancel(int);
 extern void aioOpen(const char *, int, mode_t, AIOCB *, void *);
 extern void aioClose(int);
-extern void aioWrite(int, int offset, char *, int size, AIOCB *, void *, FREE *);
+extern void aioWrite(int, int offset, char *, int size, AIOCB *, void *,
+    FREE *);
 extern void aioRead(int, int offset, char *, int size, AIOCB *, void *);
 extern void aioStat(char *, struct stat *, AIOCB *, void *);
 extern void aioUnlink(const char *, AIOCB *, void *);
@@ -135,7 +137,8 @@
 extern int checkNegativeHit(StoreEntry *);
 extern void clientHttpConnectionsOpen(void);
 extern void clientHttpConnectionsClose(void);
-extern StoreEntry *clientCreateStoreEntry(clientHttpRequest *, method_t, request_flags);
+extern StoreEntry *clientCreateStoreEntry(clientHttpRequest *, method_t,
+    request_flags);
 extern int isTcpHit(log_type);
 
 extern int commSetNonBlocking(int fd);
@@ -150,26 +153,22 @@
 extern int comm_connect_addr(int sock, const struct sockaddr_in *);
 extern void comm_init(void);
 extern int comm_listen(int sock);
-extern int comm_open(int, int, struct in_addr, u_short port, int, const char *note);
+extern int comm_open(int, int, struct in_addr, u_short port, int,
+    const char *note);
 extern u_short comm_local_port(int fd);
 
 extern void commSetSelect(int, unsigned int, PF *, void *, time_t);
 extern void comm_add_close_handler(int fd, PF *, void *);
 extern void comm_remove_close_handler(int fd, PF *, void *);
-extern int comm_udp_sendto(int, const struct sockaddr_in *, int, const void *, int);
-extern void comm_write(int fd,
-    char *buf,
-    int size,
-    CWCB * handler,
-    void *handler_data,
-    FREE *);
-extern void comm_write_mbuf(int fd, MemBuf mb, CWCB * handler, void *handler_data);
+extern int comm_udp_sendto(int, const struct sockaddr_in *, int, const void *,
+    int);
+extern void comm_write(int fd, char *buf, int size, CWCB * handler,
+    void *handler_data, FREE *);
+extern void comm_write_mbuf(int fd, MemBuf mb, CWCB * handler,
+    void *handler_data);
 extern void commCallCloseHandlers(int fd);
 extern int commSetTimeout(int fd, int, PF *, void *);
 extern void commSetDefer(int fd, DEFER * func, void *);
-#ifdef _SQUID_MSWIN_
-extern int WSAignoreErrno(int);
-#endif
 extern int ignoreErrno(int);
 extern void commCloseAllSockets(void);
 
@@ -195,7 +194,7 @@
 extern void packerClean(Packer * p);
 extern void packerAppend(Packer * p, const char *buf, int size);
 #if STDC_HEADERS
-extern void packerPrintf(Packer * p, const char *fmt,...);
+extern void packerPrintf(Packer * p, const char *fmt, ...);
 #else
 extern void packerPrintf();
 #endif
@@ -209,20 +208,22 @@
 extern void _db_rotate_log(void);
 
 #if STDC_HEADERS
-extern void _db_print(const char *,...);
+extern void _db_print(const char *, ...);
 #else
 extern void _db_print();
 #endif
 extern void xassert(const char *, const char *, int);
 
 /* packs, then prints an object using debug() */
-extern void debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm);
+extern void debugObj(int section, int level, const char *label, void *obj,
+    ObjPackMethod pm);
 
 
 extern int file_open(const char *path, int mode);
 extern void file_close(int fd);
 extern void file_write(int, off_t, void *, int len, DWCB *, void *, FREE *);
-extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void *handler_data);
+extern void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler,
+    void *handler_data);
 extern void file_read(int, char *, int, off_t, DRCB *, void *);
 extern void disk_init(void);
 
@@ -237,7 +238,8 @@
 extern void idnsPTRLookup(const struct in_addr, IDNSCB *, void *);
 
 extern void eventAdd(const char *name, EVH * func, void *arg, double when, int);
-extern void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);
+extern void eventAddIsh(const char *name, EVH * func, void *arg,
+    double delta_ish, int);
 extern void eventRun(void);
 extern time_t eventNextTime(void);
 extern void eventDelete(EVH * func, void *arg);
@@ -289,14 +291,12 @@
 extern void httpProcessReplyHeader(HttpStateData *, const char *, int);
 extern mb_size_t httpBuildRequestPrefix(request_t * request,
     request_t * orig_request,
-    StoreEntry * entry,
-    MemBuf * mb,
-    int cfd,
-    http_state_flags);
+    StoreEntry * entry, MemBuf * mb, int cfd, http_state_flags);
 extern void httpAnonInitModule(void);
 extern int httpAnonHdrAllowed(http_hdr_type hdr_id);
 extern int httpAnonHdrDenied(http_hdr_type hdr_id);
-extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, http_state_flags);
+extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *,
+    HttpHeader *, int, http_state_flags);
 
 /* ETag */
 extern int etagParseInit(ETag * etag, const char *str);
@@ -342,17 +342,20 @@
 extern void httpHdrCcSetMaxAge(HttpHdrCc * cc, int max_age);
 extern void httpHdrCcSetSMaxAge(HttpHdrCc * cc, int s_maxage);
 extern void httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist);
-extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
+extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val,
+    double size, int count);
 
 /* Http Range Header Field */
 extern HttpHdrRange *httpHdrRangeParseCreate(const String * range_spec);
 /* returns true if ranges are valid; inits HttpHdrRange */
-extern int httpHdrRangeParseInit(HttpHdrRange * range, const String * range_spec);
+extern int httpHdrRangeParseInit(HttpHdrRange * range,
+    const String * range_spec);
 extern void httpHdrRangeDestroy(HttpHdrRange * range);
 extern HttpHdrRange *httpHdrRangeDup(const HttpHdrRange * range);
 extern void httpHdrRangePackInto(const HttpHdrRange * range, Packer * p);
 /* iterate through specs */
-extern HttpHdrRangeSpec *httpHdrRangeGetSpec(const HttpHdrRange * range, HttpHdrRangePos * pos);
+extern HttpHdrRangeSpec *httpHdrRangeGetSpec(const HttpHdrRange * range,
+    HttpHdrRangePos * pos);
 /* adjust specs after the length is known */
 extern int httpHdrRangeCanonize(HttpHdrRange *, ssize_t);
 /* other */
@@ -367,33 +370,40 @@
 extern HttpHdrContRange *httpHdrContRangeCreate(void);
 extern HttpHdrContRange *httpHdrContRangeParseCreate(const char *crange_spec);
 /* returns true if range is valid; inits HttpHdrContRange */
-extern int httpHdrContRangeParseInit(HttpHdrContRange * crange, const char *crange_spec);
+extern int httpHdrContRangeParseInit(HttpHdrContRange * crange,
+    const char *crange_spec);
 extern void httpHdrContRangeDestroy(HttpHdrContRange * crange);
 extern HttpHdrContRange *httpHdrContRangeDup(const HttpHdrContRange * crange);
-extern void httpHdrContRangePackInto(const HttpHdrContRange * crange, Packer * p);
+extern void httpHdrContRangePackInto(const HttpHdrContRange * crange,
+    Packer * p);
 /* inits with given spec */
 extern void httpHdrContRangeSet(HttpHdrContRange *, HttpHdrRangeSpec, ssize_t);
 
 /* Http Header Tools */
-extern HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count);
+extern HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs
+    * attrs, int count);
 extern void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
-extern int httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * attrs, int end);
+extern int httpHeaderIdByName(const char *name, int name_len,
+    const HttpHeaderFieldInfo * attrs, int end);
 extern int httpHeaderIdByNameDef(const char *name, int name_len);
 extern const char *httpHeaderNameById(int id);
 extern void httpHeaderMaskInit(HttpHeaderMask * mask, int value);
-extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums, int count);
+extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums,
+    int count);
 extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
 extern void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, ssize_t);
 extern void strListAdd(String * str, const char *item, char del);
 extern int strListIsMember(const String * str, const char *item, char del);
 extern int strListIsSubstr(const String * list, const char *s, char del);
-extern int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
+extern int strListGetItem(const String * str, char del, const char **item,
+    int *ilen, const char **pos);
 extern const char *getStringPrefix(const char *str, const char *end);
 extern int httpHeaderParseInt(const char *start, int *val);
 extern int httpHeaderParseSize(const char *start, ssize_t * sz);
 extern int httpHeaderReset(HttpHeader * hdr);
 #if STDC_HEADERS
-extern void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...);
+extern void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id,
+    const char *fmt, ...);
 #else
 extern void httpHeaderPutStrf();
 #endif
@@ -407,37 +417,49 @@
 extern void httpHeaderClean(HttpHeader * hdr);
 /* append/update */
 extern void httpHeaderAppend(HttpHeader * dest, const HttpHeader * src);
-extern void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask);
+extern void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh,
+    const HttpHeaderMask * denied_mask);
 /* parse/pack */
-extern int httpHeaderParse(HttpHeader * hdr, const char *header_start, const char *header_end);
+extern int httpHeaderParse(HttpHeader * hdr, const char *header_start,
+    const char *header_end);
 extern void httpHeaderPackInto(const HttpHeader * hdr, Packer * p);
 /* field manipulation */
 extern int httpHeaderHas(const HttpHeader * hdr, http_hdr_type type);
 extern void httpHeaderPutInt(HttpHeader * hdr, http_hdr_type type, int number);
-extern void httpHeaderPutTime(HttpHeader * hdr, http_hdr_type type, time_t time);
-extern void httpHeaderPutStr(HttpHeader * hdr, http_hdr_type type, const char *str);
-extern void httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme, const char *realm);
+extern void httpHeaderPutTime(HttpHeader * hdr, http_hdr_type type,
+    time_t time);
+extern void httpHeaderPutStr(HttpHeader * hdr, http_hdr_type type,
+    const char *str);
+extern void httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme,
+    const char *realm);
 extern void httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc);
-extern void httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange * cr);
+extern void httpHeaderPutContRange(HttpHeader * hdr,
+    const HttpHdrContRange * cr);
 extern void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range);
-extern void httpHeaderPutExt(HttpHeader * hdr, const char *name, const char *value);
+extern void httpHeaderPutExt(HttpHeader * hdr, const char *name,
+    const char *value);
 extern int httpHeaderGetInt(const HttpHeader * hdr, http_hdr_type id);
 extern time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id);
-extern TimeOrTag httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id);
+extern TimeOrTag httpHeaderGetTimeOrTag(const HttpHeader * hdr,
+    http_hdr_type id);
 extern HttpHdrCc *httpHeaderGetCc(const HttpHeader * hdr);
 extern ETag httpHeaderGetETag(const HttpHeader * hdr, http_hdr_type id);
 extern HttpHdrRange *httpHeaderGetRange(const HttpHeader * hdr);
 extern HttpHdrContRange *httpHeaderGetContRange(const HttpHeader * hdr);
 extern const char *httpHeaderGetStr(const HttpHeader * hdr, http_hdr_type id);
-extern const char *httpHeaderGetLastStr(const HttpHeader * hdr, http_hdr_type id);
-extern const char *httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *authScheme);
+extern const char *httpHeaderGetLastStr(const HttpHeader * hdr,
+    http_hdr_type id);
+extern const char *httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id,
+    const char *authScheme);
 extern String httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id);
 extern int httpHeaderDelByName(HttpHeader * hdr, const char *name);
 extern int httpHeaderDelById(HttpHeader * hdr, http_hdr_type id);
 extern void httpHeaderDelAt(HttpHeader * hdr, HttpHeaderPos pos);
 /* avoid using these low level routines */
-extern HttpHeaderEntry *httpHeaderGetEntry(const HttpHeader * hdr, HttpHeaderPos * pos);
-extern HttpHeaderEntry *httpHeaderFindEntry(const HttpHeader * hdr, http_hdr_type id);
+extern HttpHeaderEntry *httpHeaderGetEntry(const HttpHeader * hdr,
+    HttpHeaderPos * pos);
+extern HttpHeaderEntry *httpHeaderFindEntry(const HttpHeader * hdr,
+    http_hdr_type id);
 extern void httpHeaderAddEntry(HttpHeader * hdr, HttpHeaderEntry * e);
 extern HttpHeaderEntry *httpHeaderEntryClone(const HttpHeaderEntry * e);
 extern void httpHeaderEntryPackInto(const HttpHeaderEntry * e, Packer * p);
@@ -446,7 +468,8 @@
 
 /* Http Msg (currently in HttpReply.c @?@ ) */
 extern int httpMsgIsPersistent(float http_ver, const HttpHeader * hdr);
-extern int httpMsgIsolateHeaders(const char **parse_start, const char **blk_start, const char **blk_end);
+extern int httpMsgIsolateHeaders(const char **parse_start,
+    const char **blk_start, const char **blk_end);
 
 /* Http Reply */
 extern void httpReplyInitModule(void);
@@ -467,7 +490,8 @@
 extern void httpReplySwapOut(const HttpReply * rep, StoreEntry * e);
 /* set commonly used info with one call */
 extern void httpReplySetHeaders(HttpReply * rep, double ver, http_status status,
-    const char *reason, const char *ctype, int clen, time_t lmt, time_t expires);
+    const char *reason, const char *ctype, int clen, time_t lmt,
+    time_t expires);
 /* do everything in one call: init, set, pack, clean, return MemBuf */
 extern MemBuf httpPackedReply(double ver, http_status status, const char *ctype,
     int clen, time_t lmt, time_t expires);
@@ -492,21 +516,21 @@
 extern void httpRequestSwapOut(const request_t * req, StoreEntry * e);
 extern void httpRequestPack(const request_t * req, Packer * p);
 extern int httpRequestPrefixLen(const request_t * req);
-extern int httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConnection);
+extern int httpRequestHdrAllowed(const HttpHeaderEntry * e,
+    String * strConnection);
 extern int httpRequestHdrAllowedByName(http_hdr_type id);
 
 extern void icmpOpen(void);
 extern void icmpClose(void);
 extern void icmpPing(struct in_addr to);
-extern void icmpSourcePing(struct in_addr to, const icp_common_t *, const char *url);
+extern void icmpSourcePing(struct in_addr to, const icp_common_t *,
+    const char *url);
 extern void icmpDomainPing(struct in_addr to, const char *domain);
 
 extern void *icpCreateMessage(icp_opcode opcode,
-    int flags,
-    const char *url,
-    int reqnum,
-    int pad);
-extern int icpUdpSend(int, const struct sockaddr_in *, icp_common_t *, log_type, int);
+    int flags, const char *url, int reqnum, int pad);
+extern int icpUdpSend(int, const struct sockaddr_in *, icp_common_t *, log_type,
+    int);
 extern PF icpHandleUdp;
 extern PF icpUdpSendQueue;
 extern PF httpAccept;
@@ -550,8 +574,7 @@
 extern const cache_key *icpGetCacheKey(const char *url, int reqnum);
 
 extern void ipcache_nbgethostbyname(const char *name,
-    IPH * handler,
-    void *handlerData);
+    IPH * handler, void *handlerData);
 extern EVH ipcache_purgelru;
 extern const ipcache_addrs *ipcache_gethostbyname(const char *, int flags);
 extern void ipcacheInvalidate(const char *);
@@ -582,7 +605,7 @@
 extern void memBufAppend(MemBuf * mb, const char *buf, mb_size_t size);
 /* calls snprintf, extends buffer if needed */
 #if STDC_HEADERS
-extern void memBufPrintf(MemBuf * mb, const char *fmt,...);
+extern void memBufPrintf(MemBuf * mb, const char *fmt, ...);
 #else
 extern void memBufPrintf();
 #endif
@@ -594,9 +617,11 @@
 extern void memBufReport(MemBuf * mb);
 
 extern char *mime_get_header(const char *mime, const char *header);
-extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
+extern char *mime_get_header_field(const char *mime, const char *name,
+    const char *prefix);
 extern size_t headersEnd(const char *, size_t);
-extern const char *mime_get_auth(const char *hdr, const char *auth_scheme, const char **auth_field);
+extern const char *mime_get_auth(const char *hdr, const char *auth_scheme,
+    const char **auth_field);
 
 extern void mimeInit(char *filename);
 extern void mimeFreeMemory(void);
@@ -621,13 +646,10 @@
 extern peer *getSingleParent(request_t *);
 extern int neighborsCount(request_t *);
 extern int neighborsUdpPing(request_t *,
-    StoreEntry *,
-    IRCB * callback,
-    void *data,
-    int *exprep,
-    int *timeout);
+    StoreEntry *, IRCB * callback, void *data, int *exprep, int *timeout);
 extern void neighborAddAcl(const char *, const char *);
-extern void neighborsUdpAck(const cache_key *, icp_common_t *, const struct sockaddr_in *);
+extern void neighborsUdpAck(const cache_key *, icp_common_t *,
+    const struct sockaddr_in *);
 extern void neighborAdd(const char *, const char *, int, int, int, int, int);
 extern void neighbors_open(int);
 extern peer *peerFindByName(const char *);
@@ -635,9 +657,11 @@
 extern peer *getDefaultParent(request_t * request);
 extern peer *getRoundRobinParent(request_t * request);
 extern peer *getAnyParent(request_t * request);
-extern lookup_t peerDigestLookup(peer * p, request_t * request, StoreEntry * entry);
+extern lookup_t peerDigestLookup(peer * p, request_t * request,
+    StoreEntry * entry);
 extern peer *neighborsDigestSelect(request_t * request, StoreEntry * entry);
-extern void peerNoteDigestLookup(request_t * request, peer * p, lookup_t lookup);
+extern void peerNoteDigestLookup(request_t * request, peer * p,
+    lookup_t lookup);
 extern void peerNoteDigestGone(peer * p);
 extern int neighborUp(const peer * e);
 extern CBDUNL peerDestroy;
@@ -648,11 +672,13 @@
 extern int peerHTTPOkay(const peer *, request_t *);
 extern peer *whichPeer(const struct sockaddr_in *from);
 #if USE_HTCP
-extern void neighborsHtcpReply(const cache_key *, htcpReplyData *, const struct sockaddr_in *);
+extern void neighborsHtcpReply(const cache_key *, htcpReplyData *,
+    const struct sockaddr_in *);
 #endif
 
 extern void netdbInit(void);
-extern void netdbHandlePingReply(const struct sockaddr_in *from, int hops, int rtt);
+extern void netdbHandlePingReply(const struct sockaddr_in *from, int hops,
+    int rtt);
 extern void netdbPingSite(const char *hostname);
 extern void netdbInit(void);
 extern void netdbDump(StoreEntry *);
@@ -724,7 +750,8 @@
 
 /* ident.c */
 #if USE_IDENT
-extern void identStart(struct sockaddr_in *me, struct sockaddr_in *peer, IDCB * callback, void *cbdata);
+extern void identStart(struct sockaddr_in *me, struct sockaddr_in *peer,
+    IDCB * callback, void *cbdata);
 extern void identInit(void);
 #endif
 
@@ -746,7 +773,8 @@
 extern void statHistCopy(StatHist * Dest, const StatHist * Orig);
 extern void statHistSafeCopy(StatHist * Dest, const StatHist * Orig);
 extern double statHistDeltaMedian(const StatHist * A, const StatHist * B);
-extern void statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper * bd);
+extern void statHistDump(const StatHist * H, StoreEntry * sentry,
+    StatHistBinDumper * bd);
 extern void statHistLogInit(StatHist * H, int capacity, double min, double max);
 extern void statHistEnumInit(StatHist * H, int last_enum);
 extern void statHistIntInit(StatHist * H, int n);
@@ -809,7 +837,8 @@
 extern StoreEntry *new_StoreEntry(int, const char *, const char *);
 extern StoreEntry *storeGet(const cache_key *);
 extern StoreEntry *storeGetPublic(const char *uri, const method_t method);
-extern StoreEntry *storeCreateEntry(const char *, const char *, request_flags, method_t);
+extern StoreEntry *storeCreateEntry(const char *, const char *, request_flags,
+    method_t);
 extern void storeSetPublicKey(StoreEntry *);
 extern void storeComplete(StoreEntry *);
 extern void storeInit(void);
@@ -822,11 +851,7 @@
 extern int storeUnregister(StoreEntry *, void *);
 extern void storeClientCopy(StoreEntry * e,
     off_t seen_offset,
-    off_t copy_offset,
-    size_t size,
-    char *buf,
-    STCB * callback,
-    void *data);
+    off_t copy_offset, size_t size, char *buf, STCB * callback, void *data);
 extern int storePendingNClients(const StoreEntry *);
 extern EVH storeMaintainSwapSpace;
 extern void storeExpireNow(StoreEntry *);
@@ -855,7 +880,7 @@
 extern void storeHashInsert(StoreEntry * e, const cache_key *);
 extern void storeSetMemStatus(StoreEntry * e, int);
 #if STDC_HEADERS
-extern void storeAppendPrintf(StoreEntry *, const char *,...);
+extern void storeAppendPrintf(StoreEntry *, const char *, ...);
 #else
 extern void storeAppendPrintf();
 #endif
@@ -882,7 +907,8 @@
  */
 extern storeIOState *storeUfsOpen(sfileno, mode_t, STIOCB *, void *);
 extern void storeUfsClose(storeIOState * sio);
-extern void storeUfsRead(storeIOState *, char *, size_t, off_t, STRCB *, void *);
+extern void storeUfsRead(storeIOState *, char *, size_t, off_t, STRCB *,
+    void *);
 extern void storeUfsWrite(storeIOState *, char *, size_t, off_t, FREE *);
 extern void storeUfsUnlink(int fileno);
 
@@ -892,7 +918,8 @@
  */
 extern storeIOState *storeAufsOpen(sfileno, mode_t, STIOCB *, void *);
 extern void storeAufsClose(storeIOState * sio);
-extern void storeAufsRead(storeIOState *, char *, size_t, off_t, STRCB *, void *);
+extern void storeAufsRead(storeIOState *, char *, size_t, off_t, STRCB *,
+    void *);
 extern void storeAufsWrite(storeIOState *, char *, size_t, off_t, FREE *);
 extern void storeAufsUnlink(int fileno);
 #endif
@@ -1006,7 +1033,8 @@
  */
 extern store_client *storeClientListSearch(const MemObject * mem, void *data);
 extern void storeClientListAdd(StoreEntry * e, void *data);
-extern void storeClientCopy(StoreEntry *, off_t, off_t, size_t, char *, STCB *, void *);
+extern void storeClientCopy(StoreEntry *, off_t, off_t, size_t, char *, STCB *,
+    void *);
 extern int storeClientCopyPending(StoreEntry * e, void *data);
 extern int storeUnregister(StoreEntry * e, void *data);
 extern off_t storeLowestMemReaderOffset(const StoreEntry * entry);
@@ -1020,7 +1048,7 @@
 extern void death(int sig);
 extern void fatal(const char *message);
 #if STDC_HEADERS
-extern void fatalf(const char *fmt,...);
+extern void fatalf(const char *fmt, ...);
 #else
 extern void fatalf();
 #endif
@@ -1068,7 +1096,8 @@
 extern void urlInitialize(void);
 extern request_t *urlParse(method_t, char *);
 extern const char *urlCanonical(request_t *);
-extern char *urlRInternal(const char *host, u_short port, const char *dir, const char *name);
+extern char *urlRInternal(const char *host, u_short port, const char *dir,
+    const char *name);
 extern char *urlInternal(const char *dir, const char *name);
 extern int matchDomainName(const char *host, const char *domain);
 extern int urlCheckRequest(const request_t *);
@@ -1146,11 +1175,11 @@
  * ipc.c
  */
 extern int ipcCreate(int type,
-    const char *prog,
-    char *const args[],
-    const char *name,
-    int *rfd,
-    int *wfd);
+    const char *prog, char *const args[], const char *name, int *rfd, int *wfd
+#ifdef _SQUID_MSWIN_
+    , HANDLE * hIpc, pid_t * ppid
+#endif
+    );
 
 /* CacheDigest */
 extern CacheDigest *cacheDigestCreate(int capacity, int bpe);
@@ -1163,15 +1192,19 @@
 extern void cacheDigestDel(CacheDigest * cd, const cache_key * key);
 extern size_t cacheDigestCalcMaskSize(int cap, int bpe);
 extern int cacheDigestBitUtil(const CacheDigest * cd);
-extern void cacheDigestGuessStatsUpdate(cd_guess_stats * stats, int real_hit, int guess_hit);
-extern void cacheDigestGuessStatsReport(const cd_guess_stats * stats, StoreEntry * sentry, const char *label);
-extern void cacheDigestReport(CacheDigest * cd, const char *label, StoreEntry * e);
+extern void cacheDigestGuessStatsUpdate(cd_guess_stats * stats, int real_hit,
+    int guess_hit);
+extern void cacheDigestGuessStatsReport(const cd_guess_stats * stats,
+    StoreEntry * sentry, const char *label);
+extern void cacheDigestReport(CacheDigest * cd, const char *label,
+    StoreEntry * e);
 
 extern void internalStart(request_t *, StoreEntry *);
 extern int internalCheck(const char *urlpath);
 extern int internalStaticCheck(const char *urlpath);
 extern char *internalLocalUri(const char *dir, const char *name);
-extern char *internalRemoteUri(const char *, u_short, const char *, const char *);
+extern char *internalRemoteUri(const char *, u_short, const char *,
+    const char *);
 extern const char *internalHostname(void);
 extern int internalHostnameIs(const char *);
 
@@ -1185,7 +1218,8 @@
 extern void delayInitDelayData(unsigned short pools);
 extern void delayFreeDelayData(void);
 extern void delayCreateDelayPool(unsigned short pool, u_char class);
-extern void delayInitDelayPool(unsigned short pool, u_char class, delaySpecSet * rates);
+extern void delayInitDelayPool(unsigned short pool, u_char class,
+    delaySpecSet * rates);
 extern void delayFreeDelayPool(unsigned short pool);
 extern void delayPoolsReconfigure(void);
 extern void delaySetNoDelay(int fd);
@@ -1204,7 +1238,8 @@
 
 /* helper.c */
 extern void helperOpenServers(helper * hlp);
-extern void helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data);
+extern void helperSubmit(helper * hlp, const char *buf, HLPCB * callback,
+    void *data);
 extern void helperStats(StoreEntry * sentry, helper * hlp);
 extern void helperShutdown(helper * hlp);
 extern helper *helperCreate(const char *);
@@ -1227,13 +1262,28 @@
 extern int gethostname(char *, int);
 #endif
 
-/* CygWin & Windows NT Port */ 
-/* win32.c */ 
+/* CygWin & Windows NT Port */
+/* win32.c */
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
 extern int WIN32_Subsystem_Init();
-extern void WIN32_sendSignal(int);
+#ifdef _SQUID_MSWIN_
+__declspec(dllexport)
+     int WINAPI
+#else
+void
+#endif
+WIN32_sendSignal(int);
 extern void WIN32_Exit(int);
 extern void WIN32_InstallService(void);
 extern void WIN32_RemoveService(void);
+#if defined(_SQUID_MSWIN_)
+#if !defined(COMM_C)
+#define comm_open(sock_type,proto,addr,port,flags,note) \
+	comm_open((sock_type), \
+		(sock_type) == SOCK_DGRAM ? IPPROTO_UDP : IPPROTO_TCP, \
+		(addr),(port),(flags),(note))
+#endif
+extern struct passwd *getpwnam(char *);
+extern struct group *getgrnam(char *);
+#endif
 #endif
-
Index: squid/src/pump.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/pump.c	6 Jan 2001 12:40:15 -0000	1.1.1.3.4.1.2.1
+++ squid/src/pump.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: pump.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: pump.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 61    PUMP handler
  * AUTHOR: Kostas Anagnostakis
@@ -37,7 +37,8 @@
 
 #define PUMP_MAXBUFFER 2*SQUID_UDP_SO_SNDBUF
 
-struct _PumpStateData {
+struct _PumpStateData
+{
     FwdState *fwd;
     request_t *req;
     int c_fd;			/* client fd */
@@ -48,9 +49,11 @@
     StoreEntry *reply_entry;	/* the reply entry */
     CWCB *callback;		/* what to do when we finish sending */
     void *cbdata;		/* callback data passed to callback func */
-    struct {
+    struct
+    {
 	int closing:1;
-    } flags;
+    }
+    flags;
     struct _PumpStateData *next;
 };
 
@@ -164,8 +167,7 @@
 	pumpServerCopyComplete(p->s_fd, NULL, 0, DISK_OK, p);
     } else {
 	storeClientCopy(p->request_entry, p->sent, p->sent, 4096,
-	    memAllocate(MEM_4K_BUF),
-	    pumpServerCopy, p);
+	    memAllocate(MEM_4K_BUF), pumpServerCopy, p);
     }
 }
 
@@ -190,7 +192,8 @@
 }
 
 static void
-pumpServerCopyComplete(int fd, char *bufnotused, size_t size, int errflag, void *data)
+pumpServerCopyComplete(int fd, char *bufnotused, size_t size, int errflag,
+    void *data)
 {
     PumpStateData *p = data;
     int sfd;
@@ -212,8 +215,7 @@
     assert(p->sent <= p->req->content_length);
     if (p->sent < p->req->content_length) {
 	storeClientCopy(p->request_entry, p->sent, p->sent, 4096,
-	    memAllocate(MEM_4K_BUF),
-	    pumpServerCopy, p);
+	    memAllocate(MEM_4K_BUF), pumpServerCopy, p);
 	return;
     }
     debug(61, 5) ("pumpServerCopyComplete: Done!\n", size);
@@ -237,15 +239,12 @@
     PumpStateData *p = data;
     StoreEntry *req = p->request_entry;
     LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF);
-    int bytes_to_read = XMIN(p->req->content_length - p->rcvd, SQUID_TCP_SO_RCVBUF);
+    int bytes_to_read =
+	XMIN(p->req->content_length - p->rcvd, SQUID_TCP_SO_RCVBUF);
     int len = 0;
     errno = 0;
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, buf, bytes_to_read);
-#else
     len = read(fd, buf, bytes_to_read);
-#endif
     fd_bytes(fd, len, FD_READ);
     debug(61, 5) ("pumpReadFromClient: FD %d: len %d.\n", fd, len);
     if (len > 0) {
@@ -257,10 +256,7 @@
 	    debug(61, 5) ("pumpReadFromClient: FD %d: len %d and ignore!\n",
 		fd, len);
 	    commSetSelect(fd,
-		COMM_SELECT_READ,
-		pumpReadFromClient,
-		p,
-		Config.Timeout.read);
+		COMM_SELECT_READ, pumpReadFromClient, p, Config.Timeout.read);
 	} else {
 	    debug(61, 2) ("pumpReadFromClient: aborted.\n");
 	    pumpClose(p);
@@ -278,7 +274,11 @@
     if (len > 0) {
 	int delta = p->rcvd + len - p->req->content_length;
 	if (delta > 0 && p->req->flags.proxy_keepalive) {
-	    debug(61, delta == 2 ? 3 : 1) ("pumpReadFromClient: Warning: read %d bytes past content-length, truncating\n", delta);
+	    debug(61, delta == 2 ? 3 : 1)
+
+		
+		("pumpReadFromClient: Warning: read %d bytes past content-length, truncating\n",
+		delta);
 	    len = p->req->content_length - p->rcvd;
 	}
 	storeAppend(req, buf, len);
@@ -369,7 +369,8 @@
 	p->request_entry = NULL;
     }
     if (rep != NULL) {
-	debug(61, 3) ("pumpFree: did the server-side FD (%d) get closed?\n", p->s_fd);
+	debug(61, 3) ("pumpFree: did the server-side FD (%d) get closed?\n",
+	    p->s_fd);
 	storeUnlockObject(rep);
 	p->reply_entry = NULL;
     }
Index: squid/src/recv-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/recv-announce.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/recv-announce.c	6 Jan 2001 12:40:15 -0000	1.1.1.1.4.1.2.1
+++ squid/src/recv-announce.c	27 Aug 2001 21:48:21 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,7 +1,5 @@
-
-
 /*
- * $Id: recv-announce.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:15 hno Exp $
+ * $Id: recv-announce.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 0     Announcement Server
  * AUTHOR: Harvest Derived
@@ -121,10 +119,10 @@
 	}
 	xmemcpy(ip, &R.sin_addr.s_addr, 4);
 	hp = gethostbyaddr(ip, 4, AF_INET);
-	printf("==============================================================================\n");
-	printf("Received from %s [%s]\n",
-	    inet_ntoa(R.sin_addr),
-	    (hp && hp->h_name) ? hp->h_name : "Unknown");
+	printf
+	    ("==============================================================================\n");
+	printf("Received from %s [%s]\n", inet_ntoa(R.sin_addr), (hp
+		&& hp->h_name) ? hp->h_name : "Unknown");
 	fputs(buf, stdout);
 	fflush(stdout);
     }
Index: squid/src/redirect.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/redirect.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/redirect.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.2.2.1
+++ squid/src/redirect.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: redirect.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: redirect.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -35,14 +34,16 @@
 
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     void *data;
     char *orig_url;
     struct in_addr client_addr;
     const char *client_ident;
     const char *method_s;
     RH *handler;
-} redirectStateData;
+}
+redirectStateData;
 
 static HLPCB redirectHandleReply;
 static void redirectStateFree(redirectStateData * r);
@@ -141,10 +142,7 @@
 	fqdn = dash_str;
     snprintf(buf, 8192, "%s %s/%s %s %s\n",
 	r->orig_url,
-	inet_ntoa(r->client_addr),
-	fqdn,
-	r->client_ident,
-	r->method_s);
+	inet_ntoa(r->client_addr), fqdn, r->client_ident, r->method_s);
     helperSubmit(redirectors, buf, redirectHandleReply, r);
 }
 
@@ -162,8 +160,7 @@
     helperOpenServers(redirectors);
     if (!init) {
 	cachemgrRegister("redirector",
-	    "URL Redirector Stats",
-	    redirectStats, 0, 1);
+	    "URL Redirector Stats", redirectStats, 0, 1);
 	init = 1;
     }
 }
Index: squid/src/refresh.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/refresh.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/refresh.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/refresh.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,7 +1,5 @@
-
-
 /*
- * $Id: refresh.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: refresh.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -40,11 +38,14 @@
 
 #include "squid.h"
 
-typedef enum {
+typedef enum
+{
     rcHTTP, rcICP, rcHTCP, rcCDigest, rcStore, rcCount
-} refreshCountsEnum;
+}
+refreshCountsEnum;
 
-static struct RefreshCounts {
+static struct RefreshCounts
+{
     const char *proto;
     int total;
     int revalidate_stale;
@@ -65,7 +66,8 @@
     /* maybe-counters -- intermediate decisions that may affect the result */
     int request_reload_ignore_maybe;
     int response_lmt_future_maybe;
-} refreshCounts[rcCount];
+}
+refreshCounts[rcCount];
 
 /*
  * Defaults:
@@ -109,7 +111,8 @@
  *  note: request maybe null (e.g. for cache digests build)
  */
 static int
-refreshCheck(const StoreEntry * entry, request_t * request, time_t delta, struct RefreshCounts *rc)
+refreshCheck(const StoreEntry * entry, request_t * request, time_t delta,
+    struct RefreshCounts *rc)
 {
     const refresh_t *R;
     const char *uri = NULL;
@@ -309,12 +312,10 @@
 {
     return refreshCheck(entry,
 	entry->mem_obj ? entry->mem_obj->request : NULL,
-	delta,
-	&refreshCounts[rcCDigest]);
+	delta, &refreshCounts[rcCDigest]);
 }
 
-time_t
-getMaxAge(const char *url)
+time_t getMaxAge(const char *url)
 {
     const refresh_t *R;
     debug(22, 3) ("getMaxAge: '%s'\n", url);
@@ -376,11 +377,11 @@
     for (i = 0; i < rcCount; ++i)
 	storeAppendPrintf(sentry, "%10s\t%6d\t%6.2f\n",
 	    refreshCounts[i].proto,
-	    refreshCounts[i].total,
-	    xpercent(refreshCounts[i].total, total));
+	    refreshCounts[i].total, xpercent(refreshCounts[i].total, total));
 
     /* per protocol histograms */
-    storeAppendPrintf(sentry, "\n\nRefreshCheck histograms for various protocols\n");
+    storeAppendPrintf(sentry,
+	"\n\nRefreshCheck histograms for various protocols\n");
     for (i = 0; i < rcCount; ++i)
 	refreshCountsStats(sentry, &refreshCounts[i]);
 }
@@ -396,8 +397,5 @@
     refreshCounts[rcCDigest].proto = "Cache Digests";
 
     cachemgrRegister("refresh",
-	"Refresh Algorithm Statistics",
-	refreshStats,
-	0,
-	1);
+	"Refresh Algorithm Statistics", refreshStats, 0, 1);
 }
Index: squid/src/send-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/send-announce.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/send-announce.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/send-announce.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: send-announce.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: send-announce.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -47,7 +46,8 @@
 	return;
     cbdataAdd(junk = xmalloc(1), cbdataXfree, 0);
     ipcache_nbgethostbyname(Config.Announce.host, send_announce, junk);
-    eventAdd("send_announce", start_announce, NULL, (double) Config.Announce.period, 1);
+    eventAdd("send_announce", start_announce, NULL,
+	(double) Config.Announce.period, 1);
 }
 
 static void
@@ -75,16 +75,14 @@
     assert(Config.Sockaddr.http);
     snprintf(tbuf, 256, "Running on %s %d %d\n",
 	getMyHostname(),
-	(int) ntohs(Config.Sockaddr.http->s.sin_port),
-	(int) Config.Port.icp);
+	(int) ntohs(Config.Sockaddr.http->s.sin_port), (int) Config.Port.icp);
     strcat(sndbuf, tbuf);
     if (Config.adminEmail) {
 	snprintf(tbuf, 256, "cache_admin: %s\n", Config.adminEmail);
 	strcat(sndbuf, tbuf);
     }
     snprintf(tbuf, 256, "generated %d [%s]\n",
-	(int) squid_curtime,
-	mkhttpdlogtime(&squid_curtime));
+	(int) squid_curtime, mkhttpdlogtime(&squid_curtime));
     strcat(sndbuf, tbuf);
     l = strlen(sndbuf);
     if ((file = Config.Announce.file) != NULL) {
@@ -104,8 +102,7 @@
     S.sin_addr = ia->in_addrs[0];
     assert(theOutIcpConnection > 0);
     x = comm_udp_sendto(theOutIcpConnection,
-	&S, sizeof(S),
-	sndbuf, strlen(sndbuf) + 1);
+	&S, sizeof(S), sndbuf, strlen(sndbuf) + 1);
     if (x < 0)
 	debug(27, 1) ("send_announce: FD %d: %s\n", theOutIcpConnection,
 	    xstrerror());
Index: squid/src/snmp_agent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_agent.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/snmp_agent.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/snmp_agent.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: snmp_agent.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: snmp_agent.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -55,18 +54,15 @@
     switch (Var->name[LEN_SQ_SYS]) {
     case SYSVMSIZ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    store_mem_size >> 10,
-	    ASN_INTEGER);
+	    store_mem_size >> 10, ASN_INTEGER);
 	break;
     case SYSSTOR:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    store_swap_size,
-	    ASN_INTEGER);
+	    store_swap_size, ASN_INTEGER);
 	break;
     case SYS_UPTIME:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    tvSubDsec(squid_start, current_time) * 100,
-	    SMI_TIMETICKS);
+	    tvSubDsec(squid_start, current_time) * 100, SMI_TIMETICKS);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
@@ -80,7 +76,8 @@
 {
     variable_list *Answer = NULL;
     char *cp = NULL;
-    debug(49, 5) ("snmp_confFn: Processing request with magic %d!\n", Var->name[8]);
+    debug(49, 5) ("snmp_confFn: Processing request with magic %d!\n",
+	Var->name[8]);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_CONF]) {
     case CONF_ADMIN:
@@ -105,23 +102,19 @@
 	switch (Var->name[LEN_SQ_CONF + 1]) {
 	case CONF_ST_MMAXSZ:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Config.memMaxSize >> 20,
-		ASN_INTEGER);
+		(snint) Config.memMaxSize >> 20, ASN_INTEGER);
 	    break;
 	case CONF_ST_SWMAXSZ:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Config.Swap.maxSize >> 10,
-		ASN_INTEGER);
+		(snint) Config.Swap.maxSize >> 10, ASN_INTEGER);
 	    break;
 	case CONF_ST_SWHIWM:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Config.Swap.highWaterMark,
-		ASN_INTEGER);
+		(snint) Config.Swap.highWaterMark, ASN_INTEGER);
 	    break;
 	case CONF_ST_SWLOWM:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Config.Swap.lowWaterMark,
-		ASN_INTEGER);
+		(snint) Config.Swap.lowWaterMark, ASN_INTEGER);
 	    break;
 	default:
 	    *ErrP = SNMP_ERR_NOSUCHNAME;
@@ -151,7 +144,8 @@
     char *cp = NULL;
     peer *p = NULL;
     int cnt = 0;
-    debug(49, 5) ("snmp_meshPtblFn: peer %d requested!\n", Var->name[LEN_SQ_MESH + 3]);
+    debug(49, 5) ("snmp_meshPtblFn: peer %d requested!\n",
+	Var->name[LEN_SQ_MESH + 3]);
     *ErrP = SNMP_ERR_NOERROR;
     laddr = oid2addr(&Var->name[LEN_SQ_MESH + 3]);
     for (p = Config.peers; p != NULL; p = p->next, cnt++)
@@ -171,63 +165,51 @@
 	break;
     case MESH_PTBL_IP:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) p->in_addr.sin_addr.s_addr,
-	    SMI_IPADDRESS);
+	    (snint) p->in_addr.sin_addr.s_addr, SMI_IPADDRESS);
 	break;
     case MESH_PTBL_HTTP:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) p->http_port,
-	    ASN_INTEGER);
+	    (snint) p->http_port, ASN_INTEGER);
 	break;
     case MESH_PTBL_ICP:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) p->icp.port,
-	    ASN_INTEGER);
+	    (snint) p->icp.port, ASN_INTEGER);
 	break;
     case MESH_PTBL_TYPE:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) p->type,
-	    ASN_INTEGER);
+	    (snint) p->type, ASN_INTEGER);
 	break;
     case MESH_PTBL_STATE:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) neighborUp(p),
-	    ASN_INTEGER);
+	    (snint) neighborUp(p), ASN_INTEGER);
 	break;
     case MESH_PTBL_SENT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.pings_sent,
-	    ASN_INTEGER);
+	    p->stats.pings_sent, ASN_INTEGER);
 	break;
     case MESH_PTBL_PACKED:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.pings_acked,
-	    ASN_INTEGER);
+	    p->stats.pings_acked, ASN_INTEGER);
 	break;
     case MESH_PTBL_FETCHES:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.fetches,
-	    SMI_COUNTER32);
+	    p->stats.fetches, SMI_COUNTER32);
 	break;
     case MESH_PTBL_RTT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.rtt,
-	    ASN_INTEGER);
+	    p->stats.rtt, ASN_INTEGER);
 	break;
     case MESH_PTBL_IGN:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.ignored_replies,
-	    SMI_COUNTER32);
+	    p->stats.ignored_replies, SMI_COUNTER32);
 	break;
     case MESH_PTBL_KEEPAL_S:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.n_keepalives_sent,
-	    SMI_COUNTER32);
+	    p->stats.n_keepalives_sent, SMI_COUNTER32);
 	break;
     case MESH_PTBL_KEEPAL_R:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    p->stats.n_keepalives_recv,
-	    SMI_COUNTER32);
+	    p->stats.n_keepalives_recv, SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
@@ -241,42 +223,38 @@
 {
     variable_list *Answer = NULL;
     static struct rusage rusage;
-    debug(49, 5) ("snmp_prfSysFn: Processing request with magic %d!\n", Var->name[LEN_SQ_PRF + 1]);
+    debug(49, 5) ("snmp_prfSysFn: Processing request with magic %d!\n",
+	Var->name[LEN_SQ_PRF + 1]);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_PRF + 1]) {
     case PERF_SYS_PF:
 	squid_getrusage(&rusage);
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    rusage_pagefaults(&rusage),
-	    SMI_COUNTER32);
+	    rusage_pagefaults(&rusage), SMI_COUNTER32);
 	break;
     case PERF_SYS_NUMR:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    IOStats.Http.reads,
-	    SMI_COUNTER32);
+	    IOStats.Http.reads, SMI_COUNTER32);
 	break;
     case PERF_SYS_MEMUSAGE:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) memTotalAllocated() >> 10,
-	    ASN_INTEGER);
+	    (snint) memTotalAllocated() >> 10, ASN_INTEGER);
 	break;
     case PERF_SYS_CPUTIME:
 	squid_getrusage(&rusage);
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) rusage_cputime(&rusage),
-	    ASN_INTEGER);
+	    (snint) rusage_cputime(&rusage), ASN_INTEGER);
 	break;
     case PERF_SYS_CPUUSAGE:
 	squid_getrusage(&rusage);
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) dpercent(rusage_cputime(&rusage), tvSubDsec(squid_start, current_time)),
-	    ASN_INTEGER);
+	    (snint) dpercent(rusage_cputime(&rusage), tvSubDsec(squid_start,
+		    current_time)), ASN_INTEGER);
 	break;
     case PERF_SYS_MAXRESSZ:
 	squid_getrusage(&rusage);
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) rusage_maxrss(&rusage),
-	    ASN_INTEGER);
+	    (snint) rusage_maxrss(&rusage), ASN_INTEGER);
 	break;
     case PERF_SYS_CURLRUEXP:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
@@ -289,23 +267,19 @@
 	break;
     case PERF_SYS_CURUNLREQ:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) Counter.unlink.requests,
-	    SMI_COUNTER32);
+	    (snint) Counter.unlink.requests, SMI_COUNTER32);
 	break;
     case PERF_SYS_CURUNUSED_FD:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) Squid_MaxFD - Number_FD,
-	    SMI_GAUGE32);
+	    (snint) Squid_MaxFD - Number_FD, SMI_GAUGE32);
 	break;
     case PERF_SYS_CURRESERVED_FD:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) Number_FD,
-	    SMI_GAUGE32);
+	    (snint) Number_FD, SMI_GAUGE32);
 	break;
     case PERF_SYS_NUMOBJCNT:
 	Answer = snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) memInUse(MEM_STOREENTRY),
-	    SMI_COUNTER32);
+	    (snint) memInUse(MEM_STOREENTRY), SMI_COUNTER32);
 	break;
     default:
 	*ErrP = SNMP_ERR_NOSUCHNAME;
@@ -322,85 +296,71 @@
     static StatCounters *l = NULL;
     double x;
     int minutes;
-    debug(49, 5) ("snmp_prfProtoFn: Processing request with magic %d!\n", Var->name[LEN_SQ_PRF]);
+    debug(49, 5) ("snmp_prfProtoFn: Processing request with magic %d!\n",
+	Var->name[LEN_SQ_PRF]);
     *ErrP = SNMP_ERR_NOERROR;
     switch (Var->name[LEN_SQ_PRF + 1]) {
     case PERF_PROTOSTAT_AGGR:	/* cacheProtoAggregateStats */
 	switch (Var->name[LEN_SQ_PRF + 2]) {
 	case PERF_PROTOSTAT_AGGR_HTTP_REQ:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.requests,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.requests, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_HTTP_HITS:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.hits,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.hits, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_HTTP_ERRORS:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.errors,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.errors, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.kbytes_in.kb,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.kbytes_in.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.kbytes_out.kb,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.kbytes_out.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_ICP_S:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.icp.pkts_sent,
-		SMI_COUNTER32);
+		(snint) Counter.icp.pkts_sent, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_ICP_R:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.icp.pkts_recv,
-		SMI_COUNTER32);
+		(snint) Counter.icp.pkts_recv, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_ICP_SKB:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.icp.kbytes_sent.kb,
-		SMI_COUNTER32);
+		(snint) Counter.icp.kbytes_sent.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_ICP_RKB:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.icp.kbytes_recv.kb,
-		SMI_COUNTER32);
+		(snint) Counter.icp.kbytes_recv.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_REQ:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.server.all.requests,
-		SMI_INTEGER);
+		(snint) Counter.server.all.requests, SMI_INTEGER);
 	    break;
 	case PERF_PROTOSTAT_AGGR_ERRORS:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.server.all.errors,
-		SMI_INTEGER);
+		(snint) Counter.server.all.errors, SMI_INTEGER);
 	    break;
 	case PERF_PROTOSTAT_AGGR_KBYTES_IN:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.server.all.kbytes_in.kb,
-		SMI_COUNTER32);
+		(snint) Counter.server.all.kbytes_in.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_KBYTES_OUT:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.server.all.kbytes_out.kb,
-		SMI_COUNTER32);
+		(snint) Counter.server.all.kbytes_out.kb, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_CURSWAP:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) store_swap_size,
-		SMI_COUNTER32);
+		(snint) store_swap_size, SMI_COUNTER32);
 	    break;
 	case PERF_PROTOSTAT_AGGR_CLIENTS:
 	    Answer = snmp_var_new_integer(Var->name, Var->name_length,
-		(snint) Counter.client_http.clients,
-		SMI_COUNTER32);
+		(snint) Counter.client_http.clients, SMI_COUNTER32);
 	    break;
 	default:
 	    *ErrP = SNMP_ERR_NOSUCHNAME;
@@ -440,10 +400,14 @@
 		&f->client_http.hit_svc_time);
 	    break;
 	case PERF_MEDIAN_ICP_QUERY:
-	    x = statHistDeltaMedian(&l->icp.query_svc_time, &f->icp.query_svc_time);
+	    x =
+		statHistDeltaMedian(&l->icp.query_svc_time,
+		&f->icp.query_svc_time);
 	    break;
 	case PERF_MEDIAN_ICP_REPLY:
-	    x = statHistDeltaMedian(&l->icp.reply_svc_time, &f->icp.reply_svc_time);
+	    x =
+		statHistDeltaMedian(&l->icp.reply_svc_time,
+		&f->icp.reply_svc_time);
 	    break;
 	case PERF_MEDIAN_DNS:
 	    x = statHistDeltaMedian(&l->dns.svc_time, &f->dns.svc_time);
@@ -459,8 +423,7 @@
 	    return NULL;
 	}
 	return snmp_var_new_integer(Var->name, Var->name_length,
-	    (snint) x,
-	    SMI_INTEGER);
+	    (snint) x, SMI_INTEGER);
     }
     *ErrP = SNMP_ERR_NOSUCHNAME;
     return NULL;
Index: squid/src/snmp_core.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_core.c,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/snmp_core.c	15 Jul 2001 08:49:37 -0000	1.1.1.3.4.1.2.3
+++ squid/src/snmp_core.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: snmp_core.c,v 1.1.1.3.4.1.2.3 2001/07/15 08:49:37 serassio Exp $
+ * $Id: snmp_core.c,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -40,9 +39,11 @@
 #define MAX_PROTOSTAT 5
 
 typedef struct _mib_tree_entry mib_tree_entry;
-typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
+typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn);
 
-struct _mib_tree_entry {
+struct _mib_tree_entry
+{
     oid *name;
     int len;
     oid_ParseFn *parsefunction;
@@ -56,24 +57,33 @@
 mib_tree_entry *mib_tree_last;
 
 #if STDC_HEADERS
-static mib_tree_entry *snmpAddNode(oid * name, int len, oid_ParseFn * parsefunction, instance_Fn * instancefunction, int children,...);
-static oid *snmpCreateOid(int length,...);
+static mib_tree_entry *snmpAddNode(oid * name, int len,
+    oid_ParseFn * parsefunction, instance_Fn * instancefunction, int children,
+    ...);
+static oid *snmpCreateOid(int length, ...);
 #else
 static mib_tree_entry *snmpAddNode();
 static oid *snmpCreateOid();
 #endif
 extern void (*snmplib_debug_hook) (int, char *);
-static oid *static_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
-static oid *time_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
-static oid *peer_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
-static oid *client_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn);
+static oid *static_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn);
+static oid *time_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn);
+static oid *peer_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn);
+static oid *client_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn);
 static void snmpDecodePacket(snmp_request_t * rq);
 static void snmpConstructReponse(snmp_request_t * rq);
 static struct snmp_pdu *snmpAgentResponse(struct snmp_pdu *PDU);
-static oid_ParseFn *snmpTreeNext(oid * Current, snint CurrentLen, oid ** Next, snint * NextLen);
+static oid_ParseFn *snmpTreeNext(oid * Current, snint CurrentLen, oid ** Next,
+    snint * NextLen);
 static oid_ParseFn *snmpTreeGet(oid * Current, snint CurrentLen);
-static mib_tree_entry *snmpTreeEntry(oid entry, snint len, mib_tree_entry * current);
-static mib_tree_entry *snmpTreeSiblingEntry(oid entry, snint len, mib_tree_entry * current);
+static mib_tree_entry *snmpTreeEntry(oid entry, snint len,
+    mib_tree_entry * current);
+static mib_tree_entry *snmpTreeSiblingEntry(oid entry, snint len,
+    mib_tree_entry * current);
 static oid *snmpOidDup(oid * A, snint ALen);
 static void snmpSnmplibDebug(int lvl, char *buf);
 
@@ -101,233 +111,522 @@
     mib_tree_head = snmpAddNode(snmpCreateOid(1, 1),
 	1, NULL, NULL, 1,
 	snmpAddNode(snmpCreateOid(2, 1, 3),
-	    2, NULL, NULL, 1,
-	    snmpAddNode(snmpCreateOid(3, 1, 3, 6),
-		3, NULL, NULL, 1,
-		snmpAddNode(snmpCreateOid(4, 1, 3, 6, 1),
-		    4, NULL, NULL, 1,
-		    snmpAddNode(snmpCreateOid(5, 1, 3, 6, 1, 4),
-			5, NULL, NULL, 1,
-			snmpAddNode(snmpCreateOid(6, 1, 3, 6, 1, 4, 1),
-			    6, NULL, NULL, 1,
-			    snmpAddNode(snmpCreateOid(7, 1, 3, 6, 1, 4, 1, 3495),
-				7, NULL, NULL, 1,
-				snmpAddNode(snmpCreateOid(LEN_SQUIDMIB, SQUIDMIB),
-				    8, NULL, NULL, 5,
-				    snmpAddNode(snmpCreateOid(LEN_SQ_SYS, SQ_SYS),
-					LEN_SQ_SYS, NULL, NULL, 3,
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_SYS, SYSVMSIZ),
-					    LEN_SYS, snmp_sysFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_SYS, SYSSTOR),
-					    LEN_SYS, snmp_sysFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_SYS, SYS_UPTIME),
-					    LEN_SYS, snmp_sysFn, static_Inst, 0)),
-				    snmpAddNode(snmpCreateOid(LEN_SQ_CONF, SQ_CONF),
-					LEN_SQ_CONF, NULL, NULL, 5,
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_CONF, CONF_ADMIN),
-					    LEN_SYS, snmp_confFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_CONF, CONF_VERSION),
-					    LEN_SYS, snmp_confFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_CONF, CONF_VERSION_ID),
-					    LEN_SYS, snmp_confFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_CONF, CONF_LOG_FAC),
-					    LEN_SYS, snmp_confFn, static_Inst, 0),
-					snmpAddNode(snmpCreateOid(LEN_SYS, SQ_CONF, CONF_STORAGE),
-					    LEN_SYS, NULL, NULL, 4,
-					    snmpAddNode(snmpCreateOid(LEN_CONF_ST, SQ_CONF, CONF_STORAGE, CONF_ST_MMAXSZ),
-						LEN_CONF_ST, snmp_confFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_CONF_ST, SQ_CONF, CONF_STORAGE, CONF_ST_SWMAXSZ),
-						LEN_CONF_ST, snmp_confFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_CONF_ST, SQ_CONF, CONF_STORAGE, CONF_ST_SWHIWM),
-						LEN_CONF_ST, snmp_confFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_CONF_ST, SQ_CONF, CONF_STORAGE, CONF_ST_SWLOWM),
-						LEN_CONF_ST, snmp_confFn, static_Inst, 0))),
-				    snmpAddNode(snmpCreateOid(LEN_SQ_PRF, SQ_PRF),
-					LEN_SQ_PRF, NULL, NULL, 2,
-					snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 1, SQ_PRF, PERF_SYS),
-					    LEN_SQ_PRF + 1, NULL, NULL, 11,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 1),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 2),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 3),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 4),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 5),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 6),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 7),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 8),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 9),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 10),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_SYS, 11),
-						LEN_SQ_PRF + 2, snmp_prfSysFn, static_Inst, 0)),
-					snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 1, SQ_PRF, PERF_PROTO),
+2, NULL, NULL, 1,
+snmpAddNode(snmpCreateOid(3, 1, 3, 6),
+			3, NULL, NULL, 1,
+		    snmpAddNode(snmpCreateOid(4, 1, 3, 6, 1),
+4, NULL, NULL, 1,
+snmpAddNode(snmpCreateOid(5, 1, 3, 6, 1, 4),
+      5, NULL, NULL, 1,
+      snmpAddNode(snmpCreateOid(6, 1, 3, 6, 1, 4, 1),
+	  6, NULL, NULL, 1,
+snmpAddNode(snmpCreateOid(7, 1, 3, 6, 1, 4, 1, 3495),
+7, NULL, NULL, 1,
+snmpAddNode(snmpCreateOid(LEN_SQUIDMIB, SQUIDMIB),
+	    8, NULL, NULL, 5,
+	    snmpAddNode(snmpCreateOid(LEN_SQ_SYS, SQ_SYS),
+		      LEN_SQ_SYS, NULL, NULL, 3,
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+				       SQ_SYS, SYSVMSIZ), LEN_SYS,
+					    snmp_sysFn, static_Inst, 0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_SYS, SYSSTOR), LEN_SYS,
+					    snmp_sysFn, static_Inst, 0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_SYS, SYS_UPTIME), LEN_SYS,
+					    snmp_sysFn, static_Inst, 0)),
+				    snmpAddNode(snmpCreateOid(LEN_SQ_CONF,
+					    SQ_CONF), LEN_SQ_CONF, NULL, NULL,
+					5, snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_CONF, CONF_ADMIN), LEN_SYS,
+					    snmp_confFn, static_Inst, 0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_CONF, CONF_VERSION), LEN_SYS,
+					    snmp_confFn, static_Inst, 0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_CONF, CONF_VERSION_ID),
+					    LEN_SYS, snmp_confFn, static_Inst,
+					    0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+					SQ_CONF, CONF_LOG_FAC), LEN_SYS,
+					    snmp_confFn, static_Inst, 0),
+					snmpAddNode(snmpCreateOid(LEN_SYS,
+						SQ_CONF, CONF_STORAGE), LEN_SYS,
+					    NULL, NULL, 4,
+					    snmpAddNode(snmpCreateOid
+						(LEN_CONF_ST, SQ_CONF,
+						    CONF_STORAGE,
+						    CONF_ST_MMAXSZ),
+						LEN_CONF_ST, snmp_confFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid
+			   (LEN_CONF_ST, SQ_CONF,
+	  CONF_STORAGE,
+	  CONF_ST_SWMAXSZ),
+      LEN_CONF_ST, snmp_confFn,
+static_Inst, 0),
+snmpAddNode(snmpCreateOid
+(LEN_CONF_ST, SQ_CONF,
+CONF_STORAGE,
+CONF_ST_SWHIWM),
+LEN_CONF_ST, snmp_confFn,
+static_Inst, 0),
+snmpAddNode(snmpCreateOid
+(LEN_CONF_ST, SQ_CONF,
+CONF_STORAGE,
+CONF_ST_SWLOWM),
+LEN_CONF_ST, snmp_confFn,
+static_Inst, 0))),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF,
+SQ_PRF), LEN_SQ_PRF, NULL, NULL, 2,
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF +
+1, SQ_PRF, PERF_SYS),
+LEN_SQ_PRF + 1, NULL, NULL, 11,
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
++ 2, SQ_PRF, PERF_SYS, 1),
+LEN_SQ_PRF + 2, snmp_prfSysFn,
+static_Inst, 0),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
++ 2, SQ_PRF, PERF_SYS, 2),
+LEN_SQ_PRF + 2, snmp_prfSysFn,
+static_Inst, 0),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
++ 2, SQ_PRF, PERF_SYS, 3),
+LEN_SQ_PRF + 2, snmp_prfSysFn,
+static_Inst, 0),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
++ 2, SQ_PRF, PERF_SYS, 4),
+   LEN_SQ_PRF + 2, snmp_prfSysFn,
+   static_Inst, 0),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+	       + 2, SQ_PRF, PERF_SYS, 5),
+	   LEN_SQ_PRF + 2, snmp_prfSysFn,
+	    static_Inst, 0),
+snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+      + 2, SQ_PRF, PERF_SYS, 6),
+				  LEN_SQ_PRF + 2, snmp_prfSysFn,
+				  static_Inst, 0),
+	      snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_SYS, 7),
+						LEN_SQ_PRF + 2, snmp_prfSysFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_SYS, 8),
+						LEN_SQ_PRF + 2, snmp_prfSysFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_SYS, 9),
+						LEN_SQ_PRF + 2, snmp_prfSysFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_SYS, 10),
+						LEN_SQ_PRF + 2, snmp_prfSysFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_SYS, 11),
+						LEN_SQ_PRF + 2, snmp_prfSysFn,
+						static_Inst, 0)),
+					snmpAddNode(snmpCreateOid(LEN_SQ_PRF +
+						1, SQ_PRF, PERF_PROTO),
 					    LEN_SQ_PRF + 1, NULL, NULL, 2,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_PROTO, 1),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_PROTO, 1),
 						LEN_SQ_PRF + 2, NULL, NULL, 15,
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 1),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 2),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 3),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 4),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 5),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 6),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 7),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 8),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 9),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 10),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 11),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 12),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 13),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 14),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 1, 15),
-						    LEN_SQ_PRF + 3, snmp_prfProtoFn, static_Inst, 0)),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 2, SQ_PRF, PERF_PROTO, 2),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 1),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 2),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 3),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 4),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 5),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 6),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 7),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 8),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 9),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 10),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 11),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 12),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 13),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 14),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 1, 15),
+						    LEN_SQ_PRF + 3,
+						    snmp_prfProtoFn,
+						    static_Inst, 0)),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_PRF
+						    + 2, SQ_PRF, PERF_PROTO, 2),
 						LEN_SQ_PRF + 2, NULL, NULL, 1,
-						snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 3, SQ_PRF, PERF_PROTO, 2, 1),
-						    LEN_SQ_PRF + 3, NULL, NULL, 10,
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 1),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 2),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 3),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 4),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 5),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 6),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 7),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 8),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 9),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0),
-						    snmpAddNode(snmpCreateOid(LEN_SQ_PRF + 4, SQ_PRF, PERF_PROTO, 2, 1, 10),
-							LEN_SQ_PRF + 4, snmp_prfProtoFn, time_Inst, 0))))),
-				    snmpAddNode(snmpCreateOid(LEN_SQ_NET, SQ_NET),
-					LEN_SQ_NET, NULL, NULL, 3,
-					snmpAddNode(snmpCreateOid(LEN_SQ_NET + 1, SQ_NET, NET_IP_CACHE),
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_PRF + 3, SQ_PRF,
+							PERF_PROTO, 2, 1),
+						    LEN_SQ_PRF + 3, NULL, NULL,
+						    10,
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    1), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    2), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    3), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    4), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    5), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    6), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    7), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    8), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    9), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0),
+						    snmpAddNode(snmpCreateOid
+							(LEN_SQ_PRF + 4, SQ_PRF,
+							    PERF_PROTO, 2, 1,
+							    10), LEN_SQ_PRF + 4,
+							snmp_prfProtoFn,
+							time_Inst, 0))))),
+				    snmpAddNode(snmpCreateOid(LEN_SQ_NET,
+					    SQ_NET), LEN_SQ_NET, NULL, NULL, 3,
+					snmpAddNode(snmpCreateOid(LEN_SQ_NET +
+						1, SQ_NET, NET_IP_CACHE),
 					    LEN_SQ_NET + 1, NULL, NULL, 8,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_ENT),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_REQ),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_HITS),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_PENDHIT),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_NEGHIT),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_MISS),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_GHBN),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_IP_CACHE, IP_LOC),
-						LEN_SQ_NET + 2, snmp_netIpFn, static_Inst, 0)),
-					snmpAddNode(snmpCreateOid(LEN_SQ_NET + 1, SQ_NET, NET_FQDN_CACHE),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_ENT), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_REQ), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_HITS), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_PENDHIT), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_NEGHIT), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_MISS), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_GHBN), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_IP_CACHE,
+						    IP_LOC), LEN_SQ_NET + 2,
+						snmp_netIpFn, static_Inst, 0)),
+					snmpAddNode(snmpCreateOid(LEN_SQ_NET +
+						1, SQ_NET, NET_FQDN_CACHE),
 					    LEN_SQ_NET + 1, NULL, NULL, 7,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_ENT),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_REQ),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_HITS),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_PENDHIT),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_NEGHIT),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_MISS),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_FQDN_CACHE, FQDN_GHBN),
-						LEN_SQ_NET + 2, snmp_netFqdnFn, static_Inst, 0)),
-					snmpAddNode(snmpCreateOid(LEN_SQ_NET + 1, SQ_NET, NET_DNS_CACHE),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_ENT), LEN_SQ_NET + 2,
+						snmp_netFqdnFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_REQ), LEN_SQ_NET + 2,
+						snmp_netFqdnFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_HITS), LEN_SQ_NET + 2,
+						snmp_netFqdnFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_PENDHIT),
+						LEN_SQ_NET + 2, snmp_netFqdnFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_NEGHIT),
+						LEN_SQ_NET + 2, snmp_netFqdnFn,
+						static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_MISS), LEN_SQ_NET + 2,
+						snmp_netFqdnFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_FQDN_CACHE,
+						    FQDN_GHBN), LEN_SQ_NET + 2,
+						snmp_netFqdnFn, static_Inst,
+						0)),
+					snmpAddNode(snmpCreateOid(LEN_SQ_NET +
+						1, SQ_NET, NET_DNS_CACHE),
 					    LEN_SQ_NET + 1, NULL, NULL, 3,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REQ),
-						LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_REP),
-						LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0),
-					    snmpAddNode(snmpCreateOid(LEN_SQ_NET + 2, SQ_NET, NET_DNS_CACHE, DNS_SERVERS),
-						LEN_SQ_NET + 2, snmp_netDnsFn, static_Inst, 0))),
-				    snmpAddNode(snmpCreateOid(LEN_SQ_MESH, SQ_MESH),
-					LEN_SQ_MESH, NULL, NULL, 2,
-					snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 1, SQ_MESH, 1),
-					    LEN_SQ_MESH + 1, NULL, NULL, 1,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 2, SQ_MESH, 1, 1),
-						LEN_SQ_MESH + 2, NULL, NULL, 13,
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 1),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 2),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 3),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 4),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 5),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 6),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 7),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 8),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 9),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 10),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 11),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 12),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 1, 1, 13),
-						    LEN_SQ_MESH + 3, snmp_meshPtblFn, peer_Inst, 0))),
-					snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 1, SQ_MESH, 2),
-					    LEN_SQ_MESH + 1, NULL, NULL, 1,
-					    snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 2, SQ_MESH, 2, 1),
-						LEN_SQ_MESH + 2, NULL, NULL, 9,
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 1),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 2),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 3),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 4),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 5),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 6),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 7),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 8),
-						    LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0),
-						(mib_tree_last = snmpAddNode(snmpCreateOid(LEN_SQ_MESH + 3, SQ_MESH, 2, 1, 9),
-							LEN_SQ_MESH + 3, snmp_meshCtblFn, client_Inst, 0)))))
-				)
-			    )
-			)
-		    )
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_DNS_CACHE,
+						    DNS_REQ), LEN_SQ_NET + 2,
+						snmp_netDnsFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_DNS_CACHE,
+						    DNS_REP), LEN_SQ_NET + 2,
+						snmp_netDnsFn, static_Inst, 0),
+					    snmpAddNode(snmpCreateOid(LEN_SQ_NET
+						    + 2, SQ_NET, NET_DNS_CACHE,
+						    DNS_SERVERS),
+						LEN_SQ_NET + 2, snmp_netDnsFn,
+						static_Inst, 0))),
+				    snmpAddNode(snmpCreateOid(LEN_SQ_MESH,
+					    SQ_MESH), LEN_SQ_MESH, NULL, NULL,
+					2,
+					snmpAddNode(snmpCreateOid(LEN_SQ_MESH +
+					     1, SQ_MESH, 1), LEN_SQ_MESH + 1,
+					    NULL, NULL, 1,
+					    snmpAddNode(snmpCreateOid
+						(LEN_SQ_MESH + 2, SQ_MESH, 1,
+						    1), LEN_SQ_MESH + 2, NULL,
+						NULL, 13,
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 1),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 2),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 3),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 4),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 5),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 6),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 7),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 8),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 9),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 10),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 11),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 12),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0),
+						snmpAddNode(snmpCreateOid
+					    (LEN_SQ_MESH + 3, SQ_MESH,
+							1, 1, 13),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshPtblFn, peer_Inst,
+						    0))),
+					snmpAddNode(snmpCreateOid(LEN_SQ_MESH +
+						1, SQ_MESH, 2), LEN_SQ_MESH + 1,
+					    NULL, NULL, 1,
+					    snmpAddNode(snmpCreateOid
+						(LEN_SQ_MESH + 2, SQ_MESH, 2,
+						    1), LEN_SQ_MESH + 2, NULL,
+						NULL, 9,
+						snmpAddNode(snmpCreateOid
+						    (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 1),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 2),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 3),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 4),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 5),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 6),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 7),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						snmpAddNode(snmpCreateOid
+			       (LEN_SQ_MESH + 3, SQ_MESH,
+							2, 1, 8),
+						    LEN_SQ_MESH + 3,
+						    snmp_meshCtblFn,
+						    client_Inst, 0),
+						(mib_tree_last =
+			       snmpAddNode(snmpCreateOid
+		      (LEN_SQ_MESH + 3,
+			  SQ_MESH, 2, 1, 9),
+					  LEN_SQ_MESH + 3,
+					  snmp_meshCtblFn, client_Inst,
+				       0)))))))))
 		)
 	    )
 	)
@@ -347,41 +646,25 @@
     debug(49, 5) ("snmpConnectionOpen: Called\n");
     if ((port = Config.Port.snmp) > (u_short) 0) {
 	enter_suid();
-	theInSnmpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	    IPPROTO_UDP,
-#else
-	    0,
-#endif
-	    Config.Addrs.snmp_incoming,
-	    port,
-	    COMM_NONBLOCKING,
-	    "SNMP Port");
+	theInSnmpConnection = comm_open(SOCK_DGRAM, 0,
+	    Config.Addrs.snmp_incoming, port, COMM_NONBLOCKING, "SNMP Port");
 	leave_suid();
 	if (theInSnmpConnection < 0)
 	    fatal("Cannot open snmp Port");
-	commSetSelect(theInSnmpConnection, COMM_SELECT_READ, snmpHandleUdp, NULL, 0);
-	debug(1, 1) ("Accepting SNMP messages on port %d, FD %d.\n",
-	    (int) port, theInSnmpConnection);
+	commSetSelect(theInSnmpConnection, COMM_SELECT_READ, snmpHandleUdp,
+	    NULL, 0);
+	debug(1, 1) ("Accepting SNMP messages on port %d, FD %d.\n", (int) port,
+	    theInSnmpConnection);
 	if (Config.Addrs.snmp_outgoing.s_addr != no_addr.s_addr) {
 	    enter_suid();
-	    theOutSnmpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-		IPPROTO_UDP,
-#else
-		0,
-#endif
-		Config.Addrs.snmp_outgoing,
-		port,
-		COMM_NONBLOCKING,
+	    theOutSnmpConnection = comm_open(SOCK_DGRAM, 0,
+		Config.Addrs.snmp_outgoing, port, COMM_NONBLOCKING,
 		"SNMP Port");
 	    leave_suid();
 	    if (theOutSnmpConnection < 0)
 		fatal("Cannot open Outgoing SNMP Port");
 	    commSetSelect(theOutSnmpConnection,
-		COMM_SELECT_READ,
-		snmpHandleUdp,
-		NULL, 0);
+		COMM_SELECT_READ, snmpHandleUdp, NULL, 0);
 	    debug(1, 1) ("Outgoing SNMP messages on port %d, FD %d.\n",
 		(int) port, theOutSnmpConnection);
 	    fd_note(theOutSnmpConnection, "Outgoing SNMP socket");
@@ -392,8 +675,7 @@
 	memset(&theOutSNMPAddr, '\0', sizeof(struct in_addr));
 	len = sizeof(struct sockaddr_in);
 	memset(&xaddr, '\0', len);
-	x = getsockname(theOutSnmpConnection,
-	    (struct sockaddr *) &xaddr, &len);
+	x = getsockname(theOutSnmpConnection, (struct sockaddr *) &xaddr, &len);
 	if (x < 0)
 	    debug(51, 1) ("theOutSnmpConnection FD %d: getsockname: %s\n",
 		theOutSnmpConnection, xstrerror());
@@ -416,7 +698,8 @@
      * and 'out' sockets might be just one FD.  This prevents this
      * function from executing repeatedly.  When we are really ready to
      * exit or restart, main will comm_close the 'out' descriptor.
-     */ theInSnmpConnection = -1;
+     */
+    theInSnmpConnection = -1;
     /*
      * Normally we only write to the outgoing SNMP socket, but we
      * also have a read handler there to catch messages sent to that
@@ -463,18 +746,12 @@
     Counter.syscalls.sock.recvfroms++;
 
     len = recvfrom(sock,
-	buf,
-	SNMP_REQUEST_SIZE,
-	0,
-	(struct sockaddr *) &from,
-	&from_len);
+	buf, SNMP_REQUEST_SIZE, 0, (struct sockaddr *) &from, &from_len);
 
     if (len > 0) {
 	buf[len] = '\0';
 	debug(49, 3) ("snmpHandleUdp: FD %d: received %d bytes from %s.\n",
-	    sock,
-	    len,
-	    inet_ntoa(from.sin_addr));
+	    sock, len, inet_ntoa(from.sin_addr));
 
 	snmp_rq = xcalloc(1, sizeof(snmp_request_t));
 	snmp_rq->buf = (u_char *) buf;
@@ -544,7 +821,8 @@
 	Session.community = rq->community;
 	Session.community_len = strlen((char *) rq->community);
 	ret = snmp_build(&Session, RespPDU, rq->outbuf, &rq->outlen);
-	sendto(rq->sock, rq->outbuf, rq->outlen, 0, (struct sockaddr *) &rq->from, sizeof(rq->from));
+	sendto(rq->sock, rq->outbuf, rq->outlen, 0,
+	    (struct sockaddr *) &rq->from, sizeof(rq->from));
 	snmp_free_pdu(RespPDU);
 	xfree(rq->outbuf);
     }
@@ -576,8 +854,7 @@
 	    RespVars = &(Answer->variables);
 	    /* Loop through all variables */
 	    for (VarPtrP = &(PDU->variables);
-		*VarPtrP;
-		VarPtrP = &((*VarPtrP)->next_variable)) {
+		*VarPtrP; VarPtrP = &((*VarPtrP)->next_variable)) {
 		VarPtr = *VarPtrP;
 
 		index++;
@@ -592,8 +869,7 @@
 		    VarNew = (*ParseFn) (VarPtr, (snint *) & (Answer->errstat));
 
 		/* Was there an error? */
-		if ((Answer->errstat != SNMP_ERR_NOERROR) ||
-		    (VarNew == NULL)) {
+		if ((Answer->errstat != SNMP_ERR_NOERROR) || (VarNew == NULL)) {
 		    Answer->errindex = index;
 		    debug(49, 5) ("snmpAgentParse: successful.\n");
 		    /* Just copy the rest of the variables.  Quickly. */
@@ -611,18 +887,21 @@
 	    oid *NextOidName = NULL;
 	    int NextOidNameLen = 0;
 
-	    ParseFn = snmpTreeNext(PDU->variables->name, PDU->variables->name_length,
+	    ParseFn =
+		snmpTreeNext(PDU->variables->name, PDU->variables->name_length,
 		&(NextOidName), (snint *) & NextOidNameLen);
 
 	    if (ParseFn == NULL) {
 		Answer->errstat = SNMP_ERR_NOSUCHNAME;
 		debug(49, 5) ("snmpAgentResponse: No such oid: ");
-		snmpDebugOid(5, PDU->variables->name, PDU->variables->name_length);
+		snmpDebugOid(5, PDU->variables->name,
+		    PDU->variables->name_length);
 	    } else {
 		xfree(PDU->variables->name);
 		PDU->variables->name = NextOidName;
 		PDU->variables->name_length = NextOidNameLen;
-		VarNew = (*ParseFn) (PDU->variables, (snint *) & Answer->errstat);
+		VarNew =
+		    (*ParseFn) (PDU->variables, (snint *) & Answer->errstat);
 	    }
 
 	    /* Was there an error? */
@@ -657,7 +936,8 @@
     mibTreeEntry = mib_tree_head;
     if (Current[count] == mibTreeEntry->name[count]) {
 	count++;
-	while ((mibTreeEntry) && (count < CurrentLen) && (!mibTreeEntry->parsefunction)) {
+	while ((mibTreeEntry) && (count < CurrentLen)
+	    && (!mibTreeEntry->parsefunction)) {
 	    lastEntry = mibTreeEntry;
 	    mibTreeEntry = snmpTreeEntry(Current[count], count, mibTreeEntry);
 	    count++;
@@ -684,7 +964,8 @@
     mibTreeEntry = mib_tree_head;
     if (Current[count] == mibTreeEntry->name[count]) {
 	count++;
-	while ((mibTreeEntry) && (count < CurrentLen) && (!mibTreeEntry->parsefunction)) {
+	while ((mibTreeEntry) && (count < CurrentLen)
+	    && (!mibTreeEntry->parsefunction)) {
 	    mibTreeEntry = snmpTreeEntry(Current[count], count, mibTreeEntry);
 	    count++;
 	}
@@ -696,24 +977,30 @@
 	return (Fn);
     if ((mibTreeEntry) && (mibTreeEntry->parsefunction)) {
 	*NextLen = CurrentLen;
-	*Next = (*mibTreeEntry->instancefunction) (Current, NextLen, mibTreeEntry, &Fn);
+	*Next =
+	    (*mibTreeEntry->instancefunction) (Current, NextLen, mibTreeEntry,
+	    &Fn);
 	if (*Next)
 	    return (Fn);
     }
     if ((mibTreeEntry) && (mibTreeEntry->parsefunction)) {
 	count--;
-	nextoid = snmpTreeSiblingEntry(Current[count], count, mibTreeEntry->parent);
+	nextoid =
+	    snmpTreeSiblingEntry(Current[count], count, mibTreeEntry->parent);
 	if (nextoid) {
 	    debug(49, 5) ("snmpTreeNext: Next OID found for sibling\n");
 	    mibTreeEntry = nextoid;
 	    count++;
 	} else {
-	    debug(49, 5) ("snmpTreeNext: Attempting to recurse up for next object\n");
+	    debug(49,
+		5) ("snmpTreeNext: Attempting to recurse up for next object\n");
 	    while (!nextoid) {
 		count--;
 		if (mibTreeEntry->parent->parent) {
 		    nextoid = mibTreeEntry->parent;
-		    mibTreeEntry = snmpTreeEntry(Current[count] + 1, count, nextoid->parent);
+		    mibTreeEntry =
+			snmpTreeEntry(Current[count] + 1, count,
+			nextoid->parent);
 		    if (!mibTreeEntry) {
 			mibTreeEntry = nextoid;
 			nextoid = NULL;
@@ -730,13 +1017,16 @@
     }
     if (mibTreeEntry) {
 	*NextLen = mibTreeEntry->len;
-	*Next = (*mibTreeEntry->instancefunction) (mibTreeEntry->name, NextLen, mibTreeEntry, &Fn);
+	*Next =
+	    (*mibTreeEntry->instancefunction) (mibTreeEntry->name, NextLen,
+	    mibTreeEntry, &Fn);
     }
     return (Fn);
 }
 
 static oid *
-static_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn)
+static_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn)
 {
     oid *instance = NULL;
 
@@ -755,8 +1045,7 @@
 {
     oid *instance = NULL;
     int identifier = 0, loop = 0;
-    int index[TIME_INDEX_LEN] =
-    {TIME_INDEX};
+    int index[TIME_INDEX_LEN] = { TIME_INDEX };
 
     if (*len <= current->len) {
 	instance = xmalloc(sizeof(name) * (*len + 1));
@@ -806,7 +1095,8 @@
 	last_addr = xmalloc(strlen(host_addr));
 	strncpy(last_addr, host_addr, strlen(host_addr));
 	current_addr = inet_ntoa(peers->in_addr.sin_addr);
-	while ((peers) && (strncmp(last_addr, current_addr, strlen(current_addr)))) {
+	while ((peers)
+	    && (strncmp(last_addr, current_addr, strlen(current_addr)))) {
 	    if (peers->next) {
 		peers = peers->next;
 		current_addr = inet_ntoa(peers->in_addr.sin_addr);
@@ -837,7 +1127,8 @@
 }
 
 static oid *
-client_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn)
+client_Inst(oid * name, snint * len, mib_tree_entry * current,
+    oid_ParseFn ** Fn)
 {
     oid *instance = NULL;
     u_char *cp = NULL;
@@ -927,7 +1218,8 @@
  */
 static mib_tree_entry *
 #if STDC_HEADERS
-snmpAddNode(oid * name, int len, oid_ParseFn * parsefunction, instance_Fn * instancefunction, int children,...)
+snmpAddNode(oid * name, int len, oid_ParseFn * parsefunction,
+    instance_Fn * instancefunction, int children, ...)
 #else
 snmpAddNode(va_alist)
      va_dcl
@@ -980,7 +1272,7 @@
  */
 static oid *
 #if STDC_HEADERS
-snmpCreateOid(int length,...)
+snmpCreateOid(int length, ...)
 #else
 snmpCreateOid(va_alist)
      va_dcl
@@ -1055,8 +1347,7 @@
     Dest[3] = *cp++;
 }
 
-struct in_addr
-       *
+struct in_addr *
 oid2addr(oid * id)
 {
     static struct in_addr laddr;
Index: squid/src/squid.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/squid.h,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/squid.h	14 Jun 2001 20:36:16 -0000	1.1.1.3.4.1.2.3
+++ squid/src/squid.h	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: squid.h,v 1.1.1.3.4.1.2.3 2001/06/14 20:36:16 serassio Exp $
+ * $Id: squid.h,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -197,9 +196,7 @@
 #include <dirent.h>
 #define NAMLEN(dirent) strlen((dirent)->d_name)
 #else /* HAVE_DIRENT_H */
-#ifndef _SQUID_MSWIN_
 #define dirent direct
-#endif
 #define NAMLEN(dirent) (dirent)->d_namlen
 #if HAVE_SYS_NDIR_H
 #include <sys/ndir.h>
@@ -275,7 +272,8 @@
  * source code cleaner, so we don't need lots of #ifdefs in other
  * places
  */
-struct rusage {
+struct rusage
+{
     struct timeval ru_stime;
     struct timeval ru_utime;
     int ru_maxrss;
@@ -327,10 +325,8 @@
 #else
 #define leakAdd(p) p
 #define leakTouch(p) p
-#ifndef _SQUID_MSWIN_
 #define leakFree(p) p
 #endif
-#endif
 
 #if defined(_SQUID_NEXT_) && !defined(S_ISDIR)
 #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
@@ -348,10 +344,6 @@
 #define USE_UNLINKD 1
 #endif
 
-#ifdef _SQUID_MSWIN_
-#undef USE_UNLINKD
-#endif
-
 #include "md5.h"
 #include "Stack.h"
 
Index: squid/src/ssl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ssl.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/ssl.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/ssl.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: ssl.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: ssl.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -35,24 +34,29 @@
 #define SSL_C
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     char *url;
     char *host;			/* either request->host or proxy host */
     u_short port;
     request_t *request;
     FwdServer *servers;
-    struct {
+    struct
+    {
 	int fd;
 	int len;
 	char *buf;
-    } client, server;
+    }
+    client, server;
     size_t *size_ptr;		/* pointer to size in an ConnStateData for logging */
 #if DELAY_POOLS
     delay_id delay_id;
 #endif
-} SslStateData;
+}
+SslStateData;
 
-static const char *const conn_established = "HTTP/1.0 200 Connection established\r\n\r\n";
+static const char *const conn_established =
+    "HTTP/1.0 200 Connection established\r\n\r\n";
 
 static CNCB sslConnectDone;
 static ERCB sslErrorComplete;
@@ -136,17 +140,11 @@
     if (sslState->client.fd > -1) {
 	if (sslState->server.len > 0) {
 	    commSetSelect(sslState->client.fd,
-		COMM_SELECT_WRITE,
-		sslWriteClient,
-		sslState,
-		0);
+		COMM_SELECT_WRITE, sslWriteClient, sslState, 0);
 	}
 	if (sslState->client.len < read_sz) {
 	    commSetSelect(sslState->client.fd,
-		COMM_SELECT_READ,
-		sslReadClient,
-		sslState,
-		Config.Timeout.read);
+		COMM_SELECT_READ, sslReadClient, sslState, Config.Timeout.read);
 	}
     } else if (sslState->client.len == 0) {
 	comm_close(sslState->server.fd);
@@ -154,10 +152,7 @@
     if (sslState->server.fd > -1) {
 	if (sslState->client.len > 0) {
 	    commSetSelect(sslState->server.fd,
-		COMM_SELECT_WRITE,
-		sslWriteServer,
-		sslState,
-		0);
+		COMM_SELECT_WRITE, sslWriteServer, sslState, 0);
 	}
 #if DELAY_POOLS
 	/*
@@ -172,10 +167,7 @@
 	if (sslState->server.len < read_sz) {
 	    /* Have room to read more */
 	    commSetSelect(sslState->server.fd,
-		COMM_SELECT_READ,
-		sslReadServer,
-		sslState,
-		Config.Timeout.read);
+		COMM_SELECT_READ, sslReadServer, sslState, Config.Timeout.read);
 	}
     } else if (sslState->client.fd == -1) {
 	/* client already closed, nothing more to do */
@@ -199,11 +191,7 @@
     read_sz = delayBytesWanted(sslState->delay_id, 1, read_sz);
 #endif
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, sslState->server.buf + sslState->server.len, read_sz);
-#else
     len = read(fd, sslState->server.buf + sslState->server.len, read_sz);
-#endif
     debug(26, 3) ("sslReadServer: FD %d, read   %d bytes\n", fd, len);
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
@@ -236,16 +224,11 @@
     int len;
     assert(fd == sslState->client.fd);
     debug(26, 3) ("sslReadClient: FD %d, reading %d bytes at offset %d\n",
-	fd, SQUID_TCP_SO_RCVBUF - sslState->client.len,
-	sslState->client.len);
+	fd, SQUID_TCP_SO_RCVBUF - sslState->client.len, sslState->client.len);
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, sslState->client.buf + sslState->client.len, SQUID_TCP_SO_RCVBUF - sslState->client.len);
-#else
     len = read(fd,
 	sslState->client.buf + sslState->client.len,
 	SQUID_TCP_SO_RCVBUF - sslState->client.len);
-#endif
     debug(26, 3) ("sslReadClient: FD %d, read   %d bytes\n", fd, len);
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
@@ -254,13 +237,10 @@
     }
     cbdataLock(sslState);
     if (len < 0) {
-#ifdef _SQUID_MSWIN_
-	debug(50, WSAECONNRESET == WSAGetLastError() ? 3 : 1) ("sslReadClient: FD %d: read failure: %s\n",
-	    fd, xstrerror());
-#else
-	debug(50, ECONNRESET == errno ? 3 : 1) ("sslReadClient: FD %d: read failure: %s\n",
-	    fd, xstrerror());
-#endif
+	debug(50,
+	    ECONNRESET ==
+	    errno ? 3 : 1) ("sslReadClient: FD %d: read failure: %s\n", fd,
+	    xstrerror());
 	if (!ignoreErrno(errno))
 	    comm_close(fd);
     } else if (len == 0) {
@@ -281,13 +261,7 @@
     debug(26, 3) ("sslWriteServer: FD %d, %d bytes to write\n",
 	fd, sslState->client.len);
     Counter.syscalls.sock.writes++;
-#ifdef _SQUID_MSWIN_
-    len = send(fd,sslState->client.buf,sslState->client.len);
-#else
-    len = write(fd,
-	sslState->client.buf,
-	sslState->client.len);
-#endif
+    len = write(fd, sslState->client.buf, sslState->client.len);
     debug(26, 3) ("sslWriteServer: FD %d, %d bytes written\n", fd, len);
     if (len > 0) {
 	fd_bytes(fd, len, FD_WRITE);
@@ -298,8 +272,7 @@
 	if (sslState->client.len > 0) {
 	    /* we didn't write the whole thing */
 	    xmemmove(sslState->client.buf,
-		sslState->client.buf + len,
-		sslState->client.len);
+		sslState->client.buf + len, sslState->client.len);
 	}
     }
     cbdataLock(sslState);
@@ -324,13 +297,7 @@
     debug(26, 3) ("sslWriteClient: FD %d, %d bytes to write\n",
 	fd, sslState->server.len);
     Counter.syscalls.sock.writes++;
-#ifdef _SQUID_MSWIN_
-    len = send(fd, sslState->server.buf, sslState->server.len);
-#else
-    len = write(fd, 
-	sslState->server.buf,
-	sslState->server.len);
-#endif
+    len = write(fd, sslState->server.buf, sslState->server.len);
     debug(26, 3) ("sslWriteClient: FD %d, %d bytes written\n", fd, len);
     if (len > 0) {
 	fd_bytes(fd, len, FD_WRITE);
@@ -343,8 +310,7 @@
 	if (sslState->server.len > 0) {
 	    /* we didn't write the whole thing */
 	    xmemmove(sslState->server.buf,
-		sslState->server.buf + len,
-		sslState->server.len);
+		sslState->server.buf + len, sslState->server.len);
 	}
     }
     cbdataLock(sslState);
@@ -421,9 +387,7 @@
 	else
 	    sslConnected(sslState->server.fd, sslState);
 	commSetTimeout(sslState->server.fd,
-	    Config.Timeout.read,
-	    sslTimeout,
-	    sslState);
+	    Config.Timeout.read, sslTimeout, sslState);
 #if DELAY_POOLS
 	commSetDefer(sslState->server.fd, sslDeferServerRead, sslState);
 #endif
@@ -442,16 +406,8 @@
     Counter.server.all.requests++;
     Counter.server.other.requests++;
     /* Create socket. */
-    sock = comm_open(SOCK_STREAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_TCP,
-#else
-	0,
-#endif
-	Config.Addrs.tcp_outgoing,
-	0,
-	COMM_NONBLOCKING,
-	url);
+    sock = comm_open(SOCK_STREAM, 0, Config.Addrs.tcp_outgoing, 0,
+	COMM_NONBLOCKING, url);
     if (sock == COMM_ERROR) {
 	debug(26, 4) ("sslStart: Failed because we're out of sockets.\n");
 	err = errorCon(ERR_SOCKET_FAILURE, HTTP_INTERNAL_SERVER_ERROR);
@@ -473,24 +429,13 @@
     sslState->server.fd = sock;
     sslState->server.buf = xmalloc(SQUID_TCP_SO_RCVBUF);
     sslState->client.buf = xmalloc(SQUID_TCP_SO_RCVBUF);
-    comm_add_close_handler(sslState->server.fd,
-	sslServerClosed,
-	sslState);
-    comm_add_close_handler(sslState->client.fd,
-	sslClientClosed,
-	sslState);
+    comm_add_close_handler(sslState->server.fd, sslServerClosed, sslState);
+    comm_add_close_handler(sslState->client.fd, sslClientClosed, sslState);
     commSetTimeout(sslState->client.fd,
-	Config.Timeout.lifetime,
-	sslTimeout,
-	sslState);
+	Config.Timeout.lifetime, sslTimeout, sslState);
     commSetTimeout(sslState->server.fd,
-	Config.Timeout.connect,
-	sslTimeout,
-	sslState);
-    peerSelect(request,
-	NULL,
-	sslPeerSelectComplete,
-	sslState);
+	Config.Timeout.connect, sslTimeout, sslState);
+    peerSelect(request, NULL, sslPeerSelectComplete, sslState);
     /*
      * Disable the client read handler until peer selection is complete
      * Take control away from client_side.c.
@@ -510,12 +455,8 @@
     memset(&flags, '\0', sizeof(flags));
     memBufDefInit(&mb);
     memBufPrintf(&mb, "CONNECT %s HTTP/1.0\r\n", sslState->url);
-    httpBuildRequestHeader(sslState->request,
-	sslState->request,
-	NULL,			/* StoreEntry */
-	&hdr_out,
-	sslState->client.fd,
-	flags);			/* flags */
+    httpBuildRequestHeader(sslState->request, sslState->request, NULL,	/* StoreEntry */
+	&hdr_out, sslState->client.fd, flags);	/* flags */
     packerToMemInit(&p, &mb);
     httpHeaderPackInto(&hdr_out, &p);
     httpHeaderClean(&hdr_out);
@@ -526,9 +467,7 @@
     sslState->client.len = mb.size;
     memBufClean(&mb);
     commSetTimeout(sslState->server.fd,
-	Config.Timeout.read,
-	sslTimeout,
-	sslState);
+	Config.Timeout.read, sslTimeout, sslState);
     sslSetSelect(sslState);
 }
 
@@ -572,12 +511,8 @@
     }
 #endif
     hierarchyNote(&sslState->request->hier,
-	fs->peer ? fs->code : DIRECT,
-	sslState->host);
+	fs->peer ? fs->code : DIRECT, sslState->host);
     commConnectStart(sslState->server.fd,
-	sslState->host,
-	sslState->port,
-	sslConnectDone,
-	sslState);
+	sslState->host, sslState->port, sslConnectDone, sslState);
 }
-#undef SSL_C
\ No newline at end of file
+#undef SSL_C
Index: squid/src/stat.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stat.c,v
retrieving revision 1.1.1.3.4.1.2.5
retrieving revision 1.1.1.3.4.1.2.5.2.1
diff -u -r1.1.1.3.4.1.2.5 -r1.1.1.3.4.1.2.5.2.1
--- squid/src/stat.c	28 Jul 2001 10:18:13 -0000	1.1.1.3.4.1.2.5
+++ squid/src/stat.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.1.2.5.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: stat.c,v 1.1.1.3.4.1.2.5 2001/07/28 10:18:13 serassio Exp $
+ * $Id: stat.c,v 1.1.1.3.4.1.2.5.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -39,11 +38,13 @@
 #define DEBUG_OPENFD 1
 
 typedef int STOBJFLT(const StoreEntry *);
-typedef struct {
+typedef struct
+{
     StoreEntry *sentry;
     int bucket;
     STOBJFLT *filter;
-} StatObjectsState;
+}
+StatObjectsState;
 
 /* LOCALS */
 static const char *describeStatuses(const StoreEntry *);
@@ -192,8 +193,7 @@
     snprintf(buf, 256, "%-13s %-13s %-12s %-12s",
 	storeStatusStr[entry->store_status],
 	memStatusStr[entry->mem_status],
-	swapStatusStr[entry->swap_status],
-	pingStatusStr[entry->ping_status]);
+	swapStatusStr[entry->swap_status], pingStatusStr[entry->ping_status]);
     return buf;
 }
 
@@ -241,9 +241,7 @@
     LOCAL_ARRAY(char, buf, 256);
     snprintf(buf, 256, "LV:%-9d LU:%-9d LM:%-9d EX:%-9d",
 	(int) entry->timestamp,
-	(int) entry->lastref,
-	(int) entry->lastmod,
-	(int) entry->expires);
+	(int) entry->lastref, (int) entry->lastmod, (int) entry->expires);
     return buf;
 }
 
@@ -261,11 +259,8 @@
     storeAppendPrintf(s, "\t%s\n", storeEntryFlags(e));
     storeAppendPrintf(s, "\t%s\n", describeTimestamps(e));
     storeAppendPrintf(s, "\t%d locks, %d clients, %d refs\n",
-	(int) e->lock_count,
-	storePendingNClients(e),
-	(int) e->refcount);
-    storeAppendPrintf(s, "\tSwap File %#08X\n",
-	e->swap_file_number);
+	(int) e->lock_count, storePendingNClients(e), (int) e->refcount);
+    storeAppendPrintf(s, "\tSwap File %#08X\n", e->swap_file_number);
     if (mem != NULL) {
 	storeAppendPrintf(s, "\tinmem_lo: %d\n", (int) mem->inmem_lo);
 	storeAppendPrintf(s, "\tinmem_hi: %d\n", (int) mem->inmem_hi);
@@ -282,8 +277,7 @@
 		(int) sc->copy_offset);
 	    storeAppendPrintf(s, "\t\tseen_offset: %d\n",
 		(int) sc->seen_offset);
-	    storeAppendPrintf(s, "\t\tcopy_size: %d\n",
-		(int) sc->copy_size);
+	    storeAppendPrintf(s, "\t\tcopy_size: %d\n", (int) sc->copy_size);
 	    storeAppendPrintf(s, "\t\tflags:");
 	    if (sc->flags.disk_io_pending)
 		storeAppendPrintf(s, " disk_io_pending");
@@ -391,9 +385,8 @@
 }
 #endif
 
-#ifdef _SQUID_MSWIN_
 static const char *
-sdRemoteAddr(const sde * f)
+fdRemoteAddr(const fde * f)
 {
     LOCAL_ARRAY(char, buf, 32);
     if (f->type != FD_SOCKET)
@@ -401,10 +394,10 @@
     snprintf(buf, 32, "%s.%d", f->ipaddr, (int) f->remote_port);
     return buf;
 }
-#endif
 
+#ifdef _SQUID_MSWIN_
 static const char *
-fdRemoteAddr(const fde * f)
+sdRemoteAddr(const sde * f)
 {
     LOCAL_ARRAY(char, buf, 32);
     if (f->type != FD_SOCKET)
@@ -412,25 +405,19 @@
     snprintf(buf, 32, "%s.%d", f->ipaddr, (int) f->remote_port);
     return buf;
 }
+#endif
 
 static void
 statFiledescriptors(StoreEntry * sentry)
 {
     int i;
     fde *f;
-#ifdef _SQUID_MSWIN_
-    sde *s;
-#endif
     storeAppendPrintf(sentry, "Active file descriptors:\n");
     storeAppendPrintf(sentry, "%-4s %-6s %-4s %-7s* %-7s* %-21s %s\n",
 	"File",
-	"Type",
-	"Tout",
-	"Nread",
-	"Nwrite",
-	"Remote Address",
-	"Description");
-    storeAppendPrintf(sentry, "---- ------ ---- -------- -------- --------------------- ------------------------------\n");
+	"Type", "Tout", "Nread", "Nwrite", "Remote Address", "Description");
+    storeAppendPrintf(sentry,
+	"---- ------ ---- -------- -------- --------------------- ------------------------------\n");
     for (i = 0; i < Squid_MaxFD; i++) {
 	f = &fd_table[i];
 	if (!f->flags.open)
@@ -442,25 +429,23 @@
 	    f->bytes_read,
 	    f->read_handler ? '*' : ' ',
 	    f->bytes_written,
-	    f->write_handler ? '*' : ' ',
-	    fdRemoteAddr(f),
-	    f->desc);
+	    f->write_handler ? '*' : ' ', fdRemoteAddr(f), f->desc);
     }
 #ifdef _SQUID_MSWIN_
-    for (i = 0; i < Squid_MaxFD; i++) {
-	s = &sd_table[i];
-	if (!s->flags.open)
-	    continue;
-	storeAppendPrintf(sentry, "%4d %-6.6s %4d %7d%c %7d%c %-21s %s\n",
-	    i,
-	    fdTypeStr[s->type],
-	    s->timeout_handler ? (int) (s->timeout - squid_curtime) / 60 : 0,
-	    s->bytes_read,
-	    s->read_handler ? '*' : ' ',
-	    s->bytes_written,
-	    s->write_handler ? '*' : ' ',
-	    sdRemoteAddr(s),
-	    s->desc);
+    {
+	sde *f;
+	for (i = 0; i < Squid_MaxFD; i++) {
+	    f = &sd_table[i];
+	    if (!f->flags.open)
+		continue;
+	    storeAppendPrintf(sentry, "%4d %-6.6s %4d %7d%c %7d%c %-21s %s\n",
+		i,
+		fdTypeStr[f->type],
+		f->timeout_handler ? (int) (f->timeout -
+squid_curtime) / 60 : 0, f->bytes_read, f->read_handler ? '*' : ' ',
+		f->bytes_written, f->write_handler ? '*' : ' ', sdRemoteAddr(f),
+		f->desc);
+	}
     }
 #endif
 }
@@ -487,8 +472,7 @@
 	mkrfc1123(squid_start.tv_sec));
     storeAppendPrintf(sentry, "Current Time:\t%s\n",
 	mkrfc1123(current_time.tv_sec));
-    storeAppendPrintf(sentry, "Connection information for %s:\n",
-	appname);
+    storeAppendPrintf(sentry, "Connection information for %s:\n", appname);
     storeAppendPrintf(sentry, "\tNumber of clients accessing cache:\t%u\n",
 	Counter.client_http.clients);
     storeAppendPrintf(sentry, "\tNumber of HTTP requests received:\t%u\n",
@@ -509,16 +493,14 @@
     storeAppendPrintf(sentry, "\tSelect loop called: %d times, %0.3f ms avg\n",
 	Counter.select_loops, 1000.0 * runtime / Counter.select_loops);
 
-    storeAppendPrintf(sentry, "Cache information for %s:\n",
-	appname);
-    storeAppendPrintf(sentry, "\tRequest Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
-	statRequestHitRatio(5),
-	statRequestHitRatio(60));
-    storeAppendPrintf(sentry, "\tByte Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
-	statByteHitRatio(5),
-	statByteHitRatio(60));
-    storeAppendPrintf(sentry, "\tStorage Swap size:\t%d KB\n",
-	store_swap_size);
+    storeAppendPrintf(sentry, "Cache information for %s:\n", appname);
+    storeAppendPrintf(sentry,
+	"\tRequest Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statRequestHitRatio(5), statRequestHitRatio(60));
+    storeAppendPrintf(sentry,
+	"\tByte Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statByteHitRatio(5), statByteHitRatio(60));
+    storeAppendPrintf(sentry, "\tStorage Swap size:\t%d KB\n", store_swap_size);
     storeAppendPrintf(sentry, "\tStorage Mem size:\t%d KB\n",
 	(int) (store_mem_size >> 10));
 #if HEAP_REPLACEMENT
@@ -533,28 +515,29 @@
     storeAppendPrintf(sentry, "\tRequests given to unlinkd:\t%d\n",
 	Counter.unlink.requests);
 
-    storeAppendPrintf(sentry, "Median Service Times (seconds)  5 min    60 min:\n");
+    storeAppendPrintf(sentry,
+	"Median Service Times (seconds)  5 min    60 min:\n");
     storeAppendPrintf(sentry, "\tHTTP Requests (All):  %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_HTTP) / 1000.0,
-	statMedianSvc(60, MEDIAN_HTTP) / 1000.0);
+	statMedianSvc(5, MEDIAN_HTTP) / 1000.0, statMedianSvc(60,
+	    MEDIAN_HTTP) / 1000.0);
     storeAppendPrintf(sentry, "\tCache Misses:         %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_MISS) / 1000.0,
-	statMedianSvc(60, MEDIAN_MISS) / 1000.0);
+	statMedianSvc(5, MEDIAN_MISS) / 1000.0, statMedianSvc(60,
+	    MEDIAN_MISS) / 1000.0);
     storeAppendPrintf(sentry, "\tCache Hits:           %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_HIT) / 1000.0,
-	statMedianSvc(60, MEDIAN_HIT) / 1000.0);
+	statMedianSvc(5, MEDIAN_HIT) / 1000.0, statMedianSvc(60,
+	    MEDIAN_HIT) / 1000.0);
     storeAppendPrintf(sentry, "\tNear Hits:            %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_NH) / 1000.0,
-	statMedianSvc(60, MEDIAN_NH) / 1000.0);
+	statMedianSvc(5, MEDIAN_NH) / 1000.0, statMedianSvc(60,
+	    MEDIAN_NH) / 1000.0);
     storeAppendPrintf(sentry, "\tNot-Modified Replies: %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_NM) / 1000.0,
-	statMedianSvc(60, MEDIAN_NM) / 1000.0);
+	statMedianSvc(5, MEDIAN_NM) / 1000.0, statMedianSvc(60,
+	    MEDIAN_NM) / 1000.0);
     storeAppendPrintf(sentry, "\tDNS Lookups:          %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_DNS) / 1000.0,
-	statMedianSvc(60, MEDIAN_DNS) / 1000.0);
+	statMedianSvc(5, MEDIAN_DNS) / 1000.0, statMedianSvc(60,
+	    MEDIAN_DNS) / 1000.0);
     storeAppendPrintf(sentry, "\tICP Queries:          %8.5f %8.5f\n",
-	statMedianSvc(5, MEDIAN_ICP_QUERY) / 1000000.0,
-	statMedianSvc(60, MEDIAN_ICP_QUERY) / 1000000.0);
+	statMedianSvc(5, MEDIAN_ICP_QUERY) / 1000000.0, statMedianSvc(60,
+	    MEDIAN_ICP_QUERY) / 1000000.0);
 
     squid_getrusage(&rusage);
     cputime = rusage_cputime(&rusage);
@@ -574,16 +557,14 @@
 
 #if HAVE_MSTATS && HAVE_GNUMALLOC_H
     ms = mstats();
-    storeAppendPrintf(sentry, "Memory usage for %s via mstats():\n",
-	appname);
+    storeAppendPrintf(sentry, "Memory usage for %s via mstats():\n", appname);
     storeAppendPrintf(sentry, "\tTotal space in arena:  %6d KB\n",
 	ms.bytes_total >> 10);
     storeAppendPrintf(sentry, "\tTotal free:            %6d KB %d%%\n",
 	ms.bytes_free >> 10, percent(ms.bytes_free, ms.bytes_total));
 #elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO
     mp = mallinfo();
-    storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n",
-	appname);
+    storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n", appname);
     storeAppendPrintf(sentry, "\tTotal space in arena:  %6d KB\n",
 	mp.arena >> 10);
     storeAppendPrintf(sentry, "\tOrdinary blocks:       %6d KB %6d blks\n",
@@ -604,15 +585,16 @@
 	t >> 10, percent(t, mp.arena));
 #if HAVE_EXT_MALLINFO
     storeAppendPrintf(sentry, "\tmax size of small blocks:\t%d\n", mp.mxfast);
-    storeAppendPrintf(sentry, "\tnumber of small blocks in a holding block:\t%d\n",
-	mp.nlblks);
+    storeAppendPrintf(sentry,
+	"\tnumber of small blocks in a holding block:\t%d\n", mp.nlblks);
     storeAppendPrintf(sentry, "\tsmall block rounding factor:\t%d\n", mp.grain);
-    storeAppendPrintf(sentry, "\tspace (including overhead) allocated in ord. blks:\t%d\n"
-	,mp.uordbytes);
+    storeAppendPrintf(sentry,
+	"\tspace (including overhead) allocated in ord. blks:\t%d\n",
+	mp.uordbytes);
     storeAppendPrintf(sentry, "\tnumber of ordinary blocks allocated:\t%d\n",
 	mp.allocated);
-    storeAppendPrintf(sentry, "\tbytes used in maintaining the free tree:\t%d\n",
-	mp.treeoverhead);
+    storeAppendPrintf(sentry,
+	"\tbytes used in maintaining the free tree:\t%d\n", mp.treeoverhead);
 #endif /* HAVE_EXT_MALLINFO */
 #endif /* HAVE_MALLINFO */
     storeAppendPrintf(sentry, "Memory accounted for:\n");
@@ -623,8 +605,15 @@
     storeAppendPrintf(sentry, "\tMaximum number of file descriptors:   %4d\n",
 	Squid_MaxFD);
     storeAppendPrintf(sentry, "\tLargest file desc currently in use:   %4d\n",
+#ifdef _SQUID_MSWIN_
+	XMAX(Biggest_FD, Biggest_SD));
+#else
 	Biggest_FD);
+#endif
     storeAppendPrintf(sentry, "\tNumber of file desc currently in use: %4d\n",
+#ifdef _SQUID_MSWIN_
+	Number_SD +
+#endif
 	Number_FD);
     storeAppendPrintf(sentry, "\tFiles queued for open:                %4d\n",
 	Opening_FD);
@@ -634,26 +623,15 @@
 	RESERVED_FD);
     storeAppendPrintf(sentry, "\tStore Disk files open:                %4d\n",
 	store_open_disk_fd);
-#ifdef _SQUID_MSWIN_
-    storeAppendPrintf(sentry, "Socket descriptor usage for %s:\n", appname);
-    storeAppendPrintf(sentry, "\tMaximum number of socket descriptors:   %4d\n",
-	Squid_MaxFD);
-    storeAppendPrintf(sentry, "\tLargest socket desc currently in use:   %4d\n",
-	Biggest_SD);
-    storeAppendPrintf(sentry, "\tNumber of socket desc currently in use: %4d\n",
-	Number_SD);
-#endif
+
     storeAppendPrintf(sentry, "Internal Data Structures:\n");
-    storeAppendPrintf(sentry, "\t%6d StoreEntries\n",
-	memInUse(MEM_STOREENTRY));
+    storeAppendPrintf(sentry, "\t%6d StoreEntries\n", memInUse(MEM_STOREENTRY));
     storeAppendPrintf(sentry, "\t%6d StoreEntries with MemObjects\n",
 	memInUse(MEM_MEMOBJECT));
-    storeAppendPrintf(sentry, "\t%6d Hot Object Cache Items\n",
-	hot_obj_count);
+    storeAppendPrintf(sentry, "\t%6d Hot Object Cache Items\n", hot_obj_count);
     storeAppendPrintf(sentry, "\t%6d Filemap bits set\n",
 	storeDirMapBitsInUse());
-    storeAppendPrintf(sentry, "\t%6d on-disk objects\n",
-	n_disk_objects);
+    storeAppendPrintf(sentry, "\t%6d on-disk objects\n", n_disk_objects);
 
 #if XMALLOC_STATISTICS
     storeAppendPrintf(sentry, "Memory allocation statistics\n");
@@ -694,12 +672,10 @@
 
     storeAppendPrintf(sentry, "sample_start_time = %d.%d (%s)\n",
 	(int) l->timestamp.tv_sec,
-	(int) l->timestamp.tv_usec,
-	mkrfc1123(l->timestamp.tv_sec));
+	(int) l->timestamp.tv_usec, mkrfc1123(l->timestamp.tv_sec));
     storeAppendPrintf(sentry, "sample_end_time = %d.%d (%s)\n",
 	(int) f->timestamp.tv_sec,
-	(int) f->timestamp.tv_usec,
-	mkrfc1123(f->timestamp.tv_sec));
+	(int) f->timestamp.tv_usec, mkrfc1123(f->timestamp.tv_sec));
 
     storeAppendPrintf(sentry, "client_http.requests = %f/sec\n",
 	XAVG(client_http.requests));
@@ -769,10 +745,8 @@
     storeAppendPrintf(sentry, "server.other.kbytes_out = %f/sec\n",
 	XAVG(server.other.kbytes_out.kb));
 
-    storeAppendPrintf(sentry, "icp.pkts_sent = %f/sec\n",
-	XAVG(icp.pkts_sent));
-    storeAppendPrintf(sentry, "icp.pkts_recv = %f/sec\n",
-	XAVG(icp.pkts_recv));
+    storeAppendPrintf(sentry, "icp.pkts_sent = %f/sec\n", XAVG(icp.pkts_sent));
+    storeAppendPrintf(sentry, "icp.pkts_recv = %f/sec\n", XAVG(icp.pkts_recv));
     storeAppendPrintf(sentry, "icp.queries_sent = %f/sec\n",
 	XAVG(icp.queries_sent));
     storeAppendPrintf(sentry, "icp.replies_sent = %f/sec\n",
@@ -804,16 +778,12 @@
     storeAppendPrintf(sentry, "icp.reply_median_svc_time = %f seconds\n",
 	x / 1000000.0);
     x = statHistDeltaMedian(&l->dns.svc_time, &f->dns.svc_time);
-    storeAppendPrintf(sentry, "dns.median_svc_time = %f seconds\n",
-	x / 1000.0);
+    storeAppendPrintf(sentry, "dns.median_svc_time = %f seconds\n", x / 1000.0);
     storeAppendPrintf(sentry, "unlink.requests = %f/sec\n",
 	XAVG(unlink.requests));
-    storeAppendPrintf(sentry, "page_faults = %f/sec\n",
-	XAVG(page_faults));
-    storeAppendPrintf(sentry, "select_loops = %f/sec\n",
-	XAVG(select_loops));
-    storeAppendPrintf(sentry, "select_fds = %f/sec\n",
-	XAVG(select_fds));
+    storeAppendPrintf(sentry, "page_faults = %f/sec\n", XAVG(page_faults));
+    storeAppendPrintf(sentry, "select_loops = %f/sec\n", XAVG(select_loops));
+    storeAppendPrintf(sentry, "select_fds = %f/sec\n", XAVG(select_fds));
     storeAppendPrintf(sentry, "average_select_fd_period = %f/fd\n",
 	f->select_fds > l->select_fds ?
 	(f->select_time - l->select_time) / (f->select_fds - l->select_fds)
@@ -826,25 +796,42 @@
 	XAVG(aborted_requests));
 
 #if HAVE_POLL
-    storeAppendPrintf(sentry, "syscalls.polls = %f/sec\n", XAVG(syscalls.polls));
+    storeAppendPrintf(sentry, "syscalls.polls = %f/sec\n",
+	XAVG(syscalls.polls));
 #else
-    storeAppendPrintf(sentry, "syscalls.selects = %f/sec\n", XAVG(syscalls.selects));
+    storeAppendPrintf(sentry, "syscalls.selects = %f/sec\n",
+	XAVG(syscalls.selects));
 #endif
-    storeAppendPrintf(sentry, "syscalls.disk.opens = %f/sec\n", XAVG(syscalls.disk.opens));
-    storeAppendPrintf(sentry, "syscalls.disk.closes = %f/sec\n", XAVG(syscalls.disk.closes));
-    storeAppendPrintf(sentry, "syscalls.disk.reads = %f/sec\n", XAVG(syscalls.disk.reads));
-    storeAppendPrintf(sentry, "syscalls.disk.writes = %f/sec\n", XAVG(syscalls.disk.writes));
-    storeAppendPrintf(sentry, "syscalls.disk.seeks = %f/sec\n", XAVG(syscalls.disk.seeks));
-    storeAppendPrintf(sentry, "syscalls.disk.unlinks = %f/sec\n", XAVG(syscalls.disk.unlinks));
-    storeAppendPrintf(sentry, "syscalls.sock.accepts = %f/sec\n", XAVG(syscalls.sock.accepts));
-    storeAppendPrintf(sentry, "syscalls.sock.sockets = %f/sec\n", XAVG(syscalls.sock.sockets));
-    storeAppendPrintf(sentry, "syscalls.sock.connects = %f/sec\n", XAVG(syscalls.sock.connects));
-    storeAppendPrintf(sentry, "syscalls.sock.binds = %f/sec\n", XAVG(syscalls.sock.binds));
-    storeAppendPrintf(sentry, "syscalls.sock.closes = %f/sec\n", XAVG(syscalls.sock.closes));
-    storeAppendPrintf(sentry, "syscalls.sock.reads = %f/sec\n", XAVG(syscalls.sock.reads));
-    storeAppendPrintf(sentry, "syscalls.sock.writes = %f/sec\n", XAVG(syscalls.sock.writes));
-    storeAppendPrintf(sentry, "syscalls.sock.recvfroms = %f/sec\n", XAVG(syscalls.sock.recvfroms));
-    storeAppendPrintf(sentry, "syscalls.sock.sendtos = %f/sec\n", XAVG(syscalls.sock.sendtos));
+    storeAppendPrintf(sentry, "syscalls.disk.opens = %f/sec\n",
+	XAVG(syscalls.disk.opens));
+    storeAppendPrintf(sentry, "syscalls.disk.closes = %f/sec\n",
+	XAVG(syscalls.disk.closes));
+    storeAppendPrintf(sentry, "syscalls.disk.reads = %f/sec\n",
+	XAVG(syscalls.disk.reads));
+    storeAppendPrintf(sentry, "syscalls.disk.writes = %f/sec\n",
+	XAVG(syscalls.disk.writes));
+    storeAppendPrintf(sentry, "syscalls.disk.seeks = %f/sec\n",
+	XAVG(syscalls.disk.seeks));
+    storeAppendPrintf(sentry, "syscalls.disk.unlinks = %f/sec\n",
+	XAVG(syscalls.disk.unlinks));
+    storeAppendPrintf(sentry, "syscalls.sock.accepts = %f/sec\n",
+	XAVG(syscalls.sock.accepts));
+    storeAppendPrintf(sentry, "syscalls.sock.sockets = %f/sec\n",
+	XAVG(syscalls.sock.sockets));
+    storeAppendPrintf(sentry, "syscalls.sock.connects = %f/sec\n",
+	XAVG(syscalls.sock.connects));
+    storeAppendPrintf(sentry, "syscalls.sock.binds = %f/sec\n",
+	XAVG(syscalls.sock.binds));
+    storeAppendPrintf(sentry, "syscalls.sock.closes = %f/sec\n",
+	XAVG(syscalls.sock.closes));
+    storeAppendPrintf(sentry, "syscalls.sock.reads = %f/sec\n",
+	XAVG(syscalls.sock.reads));
+    storeAppendPrintf(sentry, "syscalls.sock.writes = %f/sec\n",
+	XAVG(syscalls.sock.writes));
+    storeAppendPrintf(sentry, "syscalls.sock.recvfroms = %f/sec\n",
+	XAVG(syscalls.sock.recvfroms));
+    storeAppendPrintf(sentry, "syscalls.sock.sendtos = %f/sec\n",
+	XAVG(syscalls.sock.sendtos));
 
     storeAppendPrintf(sentry, "cpu_time = %f seconds\n", ct);
     storeAppendPrintf(sentry, "wall_time = %f seconds\n", dt);
@@ -863,57 +850,38 @@
 	statCountersInit(&CountHourHist[i]);
     statCountersInit(&Counter);
     eventAdd("statAvgTick", statAvgTick, NULL, (double) COUNT_INTERVAL, 1);
-    cachemgrRegister("info",
-	"General Runtime Information",
-	info_get, 0, 1);
+    cachemgrRegister("info", "General Runtime Information", info_get, 0, 1);
     cachemgrRegister("filedescriptors",
-	"Process Filedescriptor Allocation",
-	statFiledescriptors, 0, 1);
-    cachemgrRegister("objects",
-	"All Cache Objects",
-	stat_objects_get, 0, 0);
+	"Process Filedescriptor Allocation", statFiledescriptors, 0, 1);
+    cachemgrRegister("objects", "All Cache Objects", stat_objects_get, 0, 0);
     cachemgrRegister("vm_objects",
-	"In-Memory and In-Transit Objects",
-	stat_vmobjects_get, 0, 0);
+	"In-Memory and In-Transit Objects", stat_vmobjects_get, 0, 0);
 #if DEBUG_OPENFD
     cachemgrRegister("openfd_objects",
-	"Objects with Swapout files open",
-	statOpenfdObj, 0, 0);
+	"Objects with Swapout files open", statOpenfdObj, 0, 0);
 #endif
     cachemgrRegister("io",
-	"Server-side network read() size histograms",
-	stat_io_get, 0, 1);
+	"Server-side network read() size histograms", stat_io_get, 0, 1);
     cachemgrRegister("counters",
-	"Traffic and Resource Counters",
-	statCountersDump, 0, 1);
+	"Traffic and Resource Counters", statCountersDump, 0, 1);
     cachemgrRegister("peer_select",
-	"Peer Selection Algorithms",
-	statPeerSelect, 0, 1);
+	"Peer Selection Algorithms", statPeerSelect, 0, 1);
     cachemgrRegister("digest_stats",
-	"Cache Digest and ICP blob",
-	statDigestBlob, 0, 1);
-    cachemgrRegister("5min",
-	"5 Minute Average of Counters",
-	statAvg5min, 0, 1);
+	"Cache Digest and ICP blob", statDigestBlob, 0, 1);
+    cachemgrRegister("5min", "5 Minute Average of Counters", statAvg5min, 0, 1);
     cachemgrRegister("60min",
-	"60 Minute Average of Counters",
-	statAvg60min, 0, 1);
-    cachemgrRegister("utilization",
-	"Cache Utilization",
-	statUtilization, 0, 1);
+	"60 Minute Average of Counters", statAvg60min, 0, 1);
+    cachemgrRegister("utilization", "Cache Utilization", statUtilization, 0, 1);
 #if STAT_GRAPHS
     cachemgrRegister("graph_variables",
-	"Display cache metrics graphically",
-	statGraphDump, 0, 1);
+	"Display cache metrics graphically", statGraphDump, 0, 1);
 #endif
     cachemgrRegister("histograms",
-	"Full Histogram Counts",
-	statCountersHistograms, 0, 1);
+	"Full Histogram Counts", statCountersHistograms, 0, 1);
     ClientActiveRequests.head = NULL;
     ClientActiveRequests.tail = NULL;
     cachemgrRegister("active_requests",
-	"Client-side Active Requests",
-	statClientRequests, 0, 1);
+	"Client-side Active Requests", statClientRequests, 0, 1);
 }
 
 static void
@@ -1017,11 +985,16 @@
     statCountersInitSpecial(dest);
     /* now handle special cases */
     /* note: we assert that histogram capacities do not change */
-    statHistCopy(&dest->client_http.all_svc_time, &orig->client_http.all_svc_time);
-    statHistCopy(&dest->client_http.miss_svc_time, &orig->client_http.miss_svc_time);
-    statHistCopy(&dest->client_http.nm_svc_time, &orig->client_http.nm_svc_time);
-    statHistCopy(&dest->client_http.nh_svc_time, &orig->client_http.nh_svc_time);
-    statHistCopy(&dest->client_http.hit_svc_time, &orig->client_http.hit_svc_time);
+    statHistCopy(&dest->client_http.all_svc_time,
+	&orig->client_http.all_svc_time);
+    statHistCopy(&dest->client_http.miss_svc_time,
+	&orig->client_http.miss_svc_time);
+    statHistCopy(&dest->client_http.nm_svc_time,
+	&orig->client_http.nm_svc_time);
+    statHistCopy(&dest->client_http.nh_svc_time,
+	&orig->client_http.nh_svc_time);
+    statHistCopy(&dest->client_http.hit_svc_time,
+	&orig->client_http.hit_svc_time);
     statHistCopy(&dest->icp.query_svc_time, &orig->icp.query_svc_time);
     statHistCopy(&dest->icp.reply_svc_time, &orig->icp.reply_svc_time);
     statHistCopy(&dest->dns.svc_time, &orig->dns.svc_time);
@@ -1064,12 +1037,10 @@
 
     storeAppendPrintf(sentry, "sample_time = %d.%d (%s)\n",
 	(int) f->timestamp.tv_sec,
-	(int) f->timestamp.tv_usec,
-	mkrfc1123(f->timestamp.tv_sec));
+	(int) f->timestamp.tv_usec, mkrfc1123(f->timestamp.tv_sec));
     storeAppendPrintf(sentry, "client_http.requests = %d\n",
 	f->client_http.requests);
-    storeAppendPrintf(sentry, "client_http.hits = %d\n",
-	f->client_http.hits);
+    storeAppendPrintf(sentry, "client_http.hits = %d\n", f->client_http.hits);
     storeAppendPrintf(sentry, "client_http.errors = %d\n",
 	f->client_http.errors);
     storeAppendPrintf(sentry, "client_http.kbytes_in = %d\n",
@@ -1115,18 +1086,12 @@
     storeAppendPrintf(sentry, "server.other.kbytes_out = %d\n",
 	(int) f->server.other.kbytes_out.kb);
 
-    storeAppendPrintf(sentry, "icp.pkts_sent = %d\n",
-	f->icp.pkts_sent);
-    storeAppendPrintf(sentry, "icp.pkts_recv = %d\n",
-	f->icp.pkts_recv);
-    storeAppendPrintf(sentry, "icp.queries_sent = %d\n",
-	f->icp.queries_sent);
-    storeAppendPrintf(sentry, "icp.replies_sent = %d\n",
-	f->icp.replies_sent);
-    storeAppendPrintf(sentry, "icp.queries_recv = %d\n",
-	f->icp.queries_recv);
-    storeAppendPrintf(sentry, "icp.replies_recv = %d\n",
-	f->icp.replies_recv);
+    storeAppendPrintf(sentry, "icp.pkts_sent = %d\n", f->icp.pkts_sent);
+    storeAppendPrintf(sentry, "icp.pkts_recv = %d\n", f->icp.pkts_recv);
+    storeAppendPrintf(sentry, "icp.queries_sent = %d\n", f->icp.queries_sent);
+    storeAppendPrintf(sentry, "icp.replies_sent = %d\n", f->icp.replies_sent);
+    storeAppendPrintf(sentry, "icp.queries_recv = %d\n", f->icp.queries_recv);
+    storeAppendPrintf(sentry, "icp.replies_recv = %d\n", f->icp.replies_recv);
     storeAppendPrintf(sentry, "icp.query_timeouts = %d\n",
 	f->icp.query_timeouts);
     storeAppendPrintf(sentry, "icp.replies_queued = %d\n",
@@ -1145,16 +1110,11 @@
 	(int) f->icp.r_kbytes_recv.kb);
 
 #if USE_CACHE_DIGESTS
-    storeAppendPrintf(sentry, "icp.times_used = %d\n",
-	f->icp.times_used);
-    storeAppendPrintf(sentry, "cd.times_used = %d\n",
-	f->cd.times_used);
-    storeAppendPrintf(sentry, "cd.msgs_sent = %d\n",
-	f->cd.msgs_sent);
-    storeAppendPrintf(sentry, "cd.msgs_recv = %d\n",
-	f->cd.msgs_recv);
-    storeAppendPrintf(sentry, "cd.memory = %d\n",
-	(int) f->cd.memory.kb);
+    storeAppendPrintf(sentry, "icp.times_used = %d\n", f->icp.times_used);
+    storeAppendPrintf(sentry, "cd.times_used = %d\n", f->cd.times_used);
+    storeAppendPrintf(sentry, "cd.msgs_sent = %d\n", f->cd.msgs_sent);
+    storeAppendPrintf(sentry, "cd.msgs_recv = %d\n", f->cd.msgs_recv);
+    storeAppendPrintf(sentry, "cd.memory = %d\n", (int) f->cd.memory.kb);
     storeAppendPrintf(sentry, "cd.local_memory = %d\n",
 	(int) (store_digest ? store_digest->mask_size / 1024 : 0));
     storeAppendPrintf(sentry, "cd.kbytes_sent = %d\n",
@@ -1163,20 +1123,15 @@
 	(int) f->cd.kbytes_recv.kb);
 #endif
 
-    storeAppendPrintf(sentry, "unlink.requests = %d\n",
-	f->unlink.requests);
-    storeAppendPrintf(sentry, "page_faults = %d\n",
-	f->page_faults);
-    storeAppendPrintf(sentry, "select_loops = %d\n",
-	f->select_loops);
-    storeAppendPrintf(sentry, "cpu_time = %f\n",
-	f->cputime);
+    storeAppendPrintf(sentry, "unlink.requests = %d\n", f->unlink.requests);
+    storeAppendPrintf(sentry, "page_faults = %d\n", f->page_faults);
+    storeAppendPrintf(sentry, "select_loops = %d\n", f->select_loops);
+    storeAppendPrintf(sentry, "cpu_time = %f\n", f->cputime);
     storeAppendPrintf(sentry, "wall_time = %f\n",
 	tvSubDsec(f->timestamp, current_time));
     storeAppendPrintf(sentry, "swap_files_cleaned = %d\n",
 	f->swap_files_cleaned);
-    storeAppendPrintf(sentry, "aborted_requests = %d\n",
-	f->aborted_requests);
+    storeAppendPrintf(sentry, "aborted_requests = %d\n", f->aborted_requests);
 }
 
 void
@@ -1217,7 +1172,8 @@
     storeAppendPrintf(sentry, "Total:        %7d (%3d%%)\n",
 	tot_used, xpercentInt(tot_used, tot_used));
 #else
-    storeAppendPrintf(sentry, "peer digests are disabled; no stats is available.\n");
+    storeAppendPrintf(sentry,
+	"peer digests are disabled; no stats is available.\n");
 #endif
 }
 
@@ -1263,19 +1219,29 @@
     assert(l);
     switch (which) {
     case MEDIAN_HTTP:
-	x = statHistDeltaMedian(&l->client_http.all_svc_time, &f->client_http.all_svc_time);
+	x =
+	    statHistDeltaMedian(&l->client_http.all_svc_time,
+	    &f->client_http.all_svc_time);
 	break;
     case MEDIAN_HIT:
-	x = statHistDeltaMedian(&l->client_http.hit_svc_time, &f->client_http.hit_svc_time);
+	x =
+	    statHistDeltaMedian(&l->client_http.hit_svc_time,
+	    &f->client_http.hit_svc_time);
 	break;
     case MEDIAN_MISS:
-	x = statHistDeltaMedian(&l->client_http.miss_svc_time, &f->client_http.miss_svc_time);
+	x =
+	    statHistDeltaMedian(&l->client_http.miss_svc_time,
+	    &f->client_http.miss_svc_time);
 	break;
     case MEDIAN_NM:
-	x = statHistDeltaMedian(&l->client_http.nm_svc_time, &f->client_http.nm_svc_time);
+	x =
+	    statHistDeltaMedian(&l->client_http.nm_svc_time,
+	    &f->client_http.nm_svc_time);
 	break;
     case MEDIAN_NH:
-	x = statHistDeltaMedian(&l->client_http.nh_svc_time, &f->client_http.nh_svc_time);
+	x =
+	    statHistDeltaMedian(&l->client_http.nh_svc_time,
+	    &f->client_http.nh_svc_time);
 	break;
     case MEDIAN_ICP_QUERY:
 	x = statHistDeltaMedian(&l->icp.query_svc_time, &f->icp.query_svc_time);
@@ -1336,8 +1302,12 @@
     size_t s;
     size_t c;
     assert(minutes < N_COUNT_HIST);
-    c = CountHist[0].client_http.kbytes_out.kb - CountHist[minutes].client_http.kbytes_out.kb;
-    s = CountHist[0].server.all.kbytes_in.kb - CountHist[minutes].server.all.kbytes_in.kb;
+    c =
+	CountHist[0].client_http.kbytes_out.kb -
+	CountHist[minutes].client_http.kbytes_out.kb;
+    s =
+	CountHist[0].server.all.kbytes_in.kb -
+	CountHist[minutes].server.all.kbytes_in.kb;
     /* size_t might be unsigned */
     if (c > s)
 	return dpercent(c - s, c);
@@ -1366,15 +1336,11 @@
 	    storeAppendPrintf(s, "\tin: buf %p, offset %d, size %d\n",
 		conn->in.buf, conn->in.offset, conn->in.size);
 	    storeAppendPrintf(s, "\tpeer: %s:%d\n",
-		inet_ntoa(conn->peer.sin_addr),
-		ntohs(conn->peer.sin_port));
+		inet_ntoa(conn->peer.sin_addr), ntohs(conn->peer.sin_port));
 	    storeAppendPrintf(s, "\tme: %s:%d\n",
-		inet_ntoa(conn->me.sin_addr),
-		ntohs(conn->me.sin_port));
-	    storeAppendPrintf(s, "\tnrequests: %d\n",
-		conn->nrequests);
-	    storeAppendPrintf(s, "\tpersistent: %d\n",
-		conn->persistent);
+		inet_ntoa(conn->me.sin_addr), ntohs(conn->me.sin_port));
+	    storeAppendPrintf(s, "\tnrequests: %d\n", conn->nrequests);
+	    storeAppendPrintf(s, "\tpersistent: %d\n", conn->persistent);
 	    storeAppendPrintf(s, "\tdefer: n %d, until %d\n",
 		conn->defer.n, conn->defer.until);
 	}
@@ -1384,12 +1350,14 @@
 	    http->out.offset, http->out.size);
 	storeAppendPrintf(s, "req_sz %d\n", http->req_sz);
 	e = http->entry;
-	storeAppendPrintf(s, "entry %p/%s\n", e, e ? storeKeyText(e->key) : "N/A");
+	storeAppendPrintf(s, "entry %p/%s\n", e,
+	    e ? storeKeyText(e->key) : "N/A");
 	e = http->old_entry;
-	storeAppendPrintf(s, "old_entry %p/%s\n", e, e ? storeKeyText(e->key) : "N/A");
-	storeAppendPrintf(s, "start %d.%06d (%f seconds ago)\n", http->start.tv_sec,
-	    http->start.tv_usec,
-	    tvSubDsec(http->start, current_time));
+	storeAppendPrintf(s, "old_entry %p/%s\n", e,
+	    e ? storeKeyText(e->key) : "N/A");
+	storeAppendPrintf(s, "start %d.%06d (%f seconds ago)\n",
+	    http->start.tv_sec, http->start.tv_usec, tvSubDsec(http->start,
+		current_time));
 	storeAppendPrintf(s, "\n");
     }
 }
@@ -1434,33 +1402,50 @@
     int i;
     double dt;
 
-    GENGRAPH(client_http.requests, "client_http.requests", "Client HTTP requests/sec");
+    GENGRAPH(client_http.requests, "client_http.requests",
+	"Client HTTP requests/sec");
     GENGRAPH(client_http.hits, "client_http.hits", "Client HTTP hits/sec");
-    GENGRAPH(client_http.errors, "client_http.errors", "Client HTTP errors/sec");
-    GENGRAPH(client_http.kbytes_in.kb, "client_http.kbytes_in", "Client HTTP kbytes_in/sec");
-    GENGRAPH(client_http.kbytes_out.kb, "client_http.kbytes_out", "Client HTTP kbytes_out/sec");
+    GENGRAPH(client_http.errors, "client_http.errors",
+	"Client HTTP errors/sec");
+    GENGRAPH(client_http.kbytes_in.kb, "client_http.kbytes_in",
+	"Client HTTP kbytes_in/sec");
+    GENGRAPH(client_http.kbytes_out.kb, "client_http.kbytes_out",
+	"Client HTTP kbytes_out/sec");
 
     /* XXX todo: http median service times */
 
     GENGRAPH(server.all.requests, "server.all.requests", "Server requests/sec");
     GENGRAPH(server.all.errors, "server.all.errors", "Server errors/sec");
-    GENGRAPH(server.all.kbytes_in.kb, "server.all.kbytes_in", "Server total kbytes_in/sec");
-    GENGRAPH(server.all.kbytes_out.kb, "server.all.kbytes_out", "Server total kbytes_out/sec");
-
-    GENGRAPH(server.http.requests, "server.http.requests", "Server HTTP requests/sec");
-    GENGRAPH(server.http.errors, "server.http.errors", "Server HTTP errors/sec");
-    GENGRAPH(server.http.kbytes_in.kb, "server.http.kbytes_in", "Server HTTP kbytes_in/sec");
-    GENGRAPH(server.http.kbytes_out.kb, "server.http.kbytes_out", "Server HTTP kbytes_out/sec");
+    GENGRAPH(server.all.kbytes_in.kb, "server.all.kbytes_in",
+	"Server total kbytes_in/sec");
+    GENGRAPH(server.all.kbytes_out.kb, "server.all.kbytes_out",
+	"Server total kbytes_out/sec");
+
+    GENGRAPH(server.http.requests, "server.http.requests",
+	"Server HTTP requests/sec");
+    GENGRAPH(server.http.errors, "server.http.errors",
+	"Server HTTP errors/sec");
+    GENGRAPH(server.http.kbytes_in.kb, "server.http.kbytes_in",
+	"Server HTTP kbytes_in/sec");
+    GENGRAPH(server.http.kbytes_out.kb, "server.http.kbytes_out",
+	"Server HTTP kbytes_out/sec");
 
-    GENGRAPH(server.ftp.requests, "server.ftp.requests", "Server FTP requests/sec");
+    GENGRAPH(server.ftp.requests, "server.ftp.requests",
+	"Server FTP requests/sec");
     GENGRAPH(server.ftp.errors, "server.ftp.errors", "Server FTP errors/sec");
-    GENGRAPH(server.ftp.kbytes_in.kb, "server.ftp.kbytes_in", "Server FTP kbytes_in/sec");
-    GENGRAPH(server.ftp.kbytes_out.kb, "server.ftp.kbytes_out", "Server FTP kbytes_out/sec");
-
-    GENGRAPH(server.other.requests, "server.other.requests", "Server other requests/sec");
-    GENGRAPH(server.other.errors, "server.other.errors", "Server other errors/sec");
-    GENGRAPH(server.other.kbytes_in.kb, "server.other.kbytes_in", "Server other kbytes_in/sec");
-    GENGRAPH(server.other.kbytes_out.kb, "server.other.kbytes_out", "Server other kbytes_out/sec");
+    GENGRAPH(server.ftp.kbytes_in.kb, "server.ftp.kbytes_in",
+	"Server FTP kbytes_in/sec");
+    GENGRAPH(server.ftp.kbytes_out.kb, "server.ftp.kbytes_out",
+	"Server FTP kbytes_out/sec");
+
+    GENGRAPH(server.other.requests, "server.other.requests",
+	"Server other requests/sec");
+    GENGRAPH(server.other.errors, "server.other.errors",
+	"Server other errors/sec");
+    GENGRAPH(server.other.kbytes_in.kb, "server.other.kbytes_in",
+	"Server other kbytes_in/sec");
+    GENGRAPH(server.other.kbytes_out.kb, "server.other.kbytes_out",
+	"Server other kbytes_out/sec");
 
     GENGRAPH(icp.pkts_sent, "icp.pkts_sent", "ICP packets sent/sec");
     GENGRAPH(icp.pkts_recv, "icp.pkts_recv", "ICP packets received/sec");
@@ -1470,7 +1455,8 @@
     /* XXX todo: icp median service times */
     /* XXX todo: dns median service times */
 
-    GENGRAPH(unlink.requests, "unlink.requests", "Cache File unlink requests/sec");
+    GENGRAPH(unlink.requests, "unlink.requests",
+	"Cache File unlink requests/sec");
     GENGRAPH(page_faults, "page_faults", "System Page Faults/sec");
     GENGRAPH(select_loops, "select_loops", "System Select Loop calls/sec");
     GENGRAPH(cputime, "cputime", "CPU utilisation");
Index: squid/src/stmem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stmem.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/stmem.c	6 Jan 2001 12:40:16 -0000	1.1.1.2.4.1.2.1
+++ squid/src/stmem.c	27 Aug 2001 21:48:21 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: stmem.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: stmem.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Harvest Derived
@@ -121,8 +120,7 @@
     }
 }
 
-ssize_t
-stmemCopy(const mem_hdr * mem, off_t offset, char *buf, size_t size)
+ssize_t stmemCopy(const mem_hdr * mem, off_t offset, char *buf, size_t size)
 {
     mem_node *p = mem->head;
     off_t t_off = mem->origin_offset;
Index: squid/src/store.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store.c,v
retrieving revision 1.1.1.3.4.5.2.4
retrieving revision 1.1.1.3.4.5.2.4.2.1
diff -u -r1.1.1.3.4.5.2.4 -r1.1.1.3.4.5.2.4.2.1
--- squid/src/store.c	18 Jun 2001 19:30:39 -0000	1.1.1.3.4.5.2.4
+++ squid/src/store.c	27 Aug 2001 21:48:21 -0000	1.1.1.3.4.5.2.4.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store.c,v 1.1.1.3.4.5.2.4 2001/06/18 19:30:39 serassio Exp $
+ * $Id: store.c,v 1.1.1.3.4.5.2.4.2.1 2001/08/27 21:48:21 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -39,37 +38,35 @@
 
 #define STORE_IN_MEM_BUCKETS		(229)
 
-const char *memStatusStr[] =
-{
+const char *memStatusStr[] = {
     "NOT_IN_MEMORY",
     "IN_MEMORY"
 };
 
-const char *pingStatusStr[] =
-{
+const char *pingStatusStr[] = {
     "PING_NONE",
     "PING_WAITING",
     "PING_DONE"
 };
 
-const char *storeStatusStr[] =
-{
+const char *storeStatusStr[] = {
     "STORE_OK",
     "STORE_PENDING"
 };
 
-const char *swapStatusStr[] =
-{
+const char *swapStatusStr[] = {
     "SWAPOUT_NONE",
     "SWAPOUT_WRITING",
     "SWAPOUT_DONE"
 };
 
-typedef struct lock_ctrl_t {
+typedef struct lock_ctrl_t
+{
     SIH *callback;
     void *callback_data;
     StoreEntry *e;
-} lock_ctrl_t;
+}
+lock_ctrl_t;
 
 /*
  * local function prototypes
@@ -383,7 +380,8 @@
     assert(!EBIT_TEST(e->flags, RELEASE_REQUEST));
     newkey = storeKeyPublic(mem->url, mem->method);
     if ((e2 = (StoreEntry *) hash_lookup(store_table, newkey))) {
-	debug(20, 3) ("storeSetPublicKey: Making old '%s' private.\n", mem->url);
+	debug(20, 3) ("storeSetPublicKey: Making old '%s' private.\n",
+	    mem->url);
 	storeSetPrivateKey(e2);
 	storeRelease(e2);
 	newkey = storeKeyPublic(mem->url, mem->method);
@@ -397,7 +395,8 @@
 }
 
 StoreEntry *
-storeCreateEntry(const char *url, const char *log_url, request_flags flags, method_t method)
+storeCreateEntry(const char *url, const char *log_url, request_flags flags,
+    method_t method)
 {
     StoreEntry *e = NULL;
     MemObject *mem = NULL;
@@ -448,8 +447,7 @@
     assert(e->store_status == STORE_PENDING);
     if (len) {
 	debug(20, 5) ("storeAppend: appending %d bytes for '%s'\n",
-	    len,
-	    storeKeyText(e->key));
+	    len, storeKeyText(e->key));
 	storeGetMemSpace(len);
 	stmemAppend(&mem->data_hdr, buf, len);
 	mem->inmem_hi += len;
@@ -462,7 +460,7 @@
 
 void
 #if STDC_HEADERS
-storeAppendPrintf(StoreEntry * e, const char *fmt,...)
+storeAppendPrintf(StoreEntry * e, const char *fmt, ...)
 #else
 storeAppendPrintf(va_alist)
      va_dcl
@@ -493,8 +491,10 @@
     storeAppend(e, buf, strlen(buf));
 }
 
-struct _store_check_cachable_hist {
-    struct {
+struct _store_check_cachable_hist
+{
+    struct
+    {
 	int non_get;
 	int not_entry_cachable;
 	int release_request;
@@ -506,11 +506,15 @@
 	int too_many_open_files;
 	int too_many_open_fds;
 	int lru_age_too_low;
-    } no;
-    struct {
+    }
+    no;
+    struct
+    {
 	int Default;
-    } yes;
-} store_check_cachable_hist;
+    }
+    yes;
+}
+store_check_cachable_hist;
 
 int
 storeTooManyDiskFilesOpen(void)
@@ -552,7 +556,8 @@
     } else if (EBIT_TEST(e->flags, RELEASE_REQUEST)) {
 	debug(20, 2) ("storeCheckCachable: NO: release requested\n");
 	store_check_cachable_hist.no.release_request++;
-    } else if (e->store_status == STORE_OK && EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) {
+    } else if (e->store_status == STORE_OK
+	&& EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) {
 	debug(20, 2) ("storeCheckCachable: NO: wrong content-length\n");
 	store_check_cachable_hist.no.wrong_content_length++;
     } else if (EBIT_TEST(e->flags, ENTRY_NEGCACHED)) {
@@ -562,7 +567,8 @@
     } else if (e->mem_obj->inmem_hi > Config.Store.maxObjectSize) {
 	debug(20, 2) ("storeCheckCachable: NO: too big\n");
 	store_check_cachable_hist.no.too_big++;
-    } else if (e->mem_obj->reply->content_length > (int) Config.Store.maxObjectSize) {
+    } else if (e->mem_obj->reply->content_length >
+	(int) Config.Store.maxObjectSize) {
 	debug(20, 2) ("storeCheckCachable: NO: too big\n");
 	store_check_cachable_hist.no.too_big++;
     } else if (storeCheckTooSmall(e)) {
@@ -697,10 +703,7 @@
     /* Notify the server side */
     if (mem->abort.callback) {
 	eventAdd("mem->abort.callback",
-	    mem->abort.callback,
-	    mem->abort.data,
-	    0.0,
-	    0);
+	    mem->abort.callback, mem->abort.data, 0.0, 0);
 	mem->abort.callback = NULL;
 	mem->abort.data = NULL;
     }
@@ -754,7 +757,8 @@
 	    continue;
 	}
 	released++;
-	debug(20, 3) ("Released memory object with key %f size %d refs %d url %s\n",
+	debug(20,
+	    3) ("Released memory object with key %f size %d refs %d url %s\n",
 	    age, e->swap_file_sz, e->refcount, e->mem_obj->url);
 	min_age = age;
 	storePurgeMem(e);
@@ -837,7 +841,9 @@
 	eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0, 1);
 	return;
     } else {
-	f = (double) (store_swap_size - store_swap_low) / (store_swap_high - store_swap_low);
+	f =
+	    (double) (store_swap_size - store_swap_low) / (store_swap_high -
+	    store_swap_low);
 	f = f < 0.0 ? 0.0 : f > 1.0 ? 1.0 : f;
 	max_scan = (int) (f * 400.0 + 100.0);
 	max_remove = (int) (f * 70.0 + 10.0);
@@ -867,7 +873,9 @@
 		 * It will always be "SPECIAL" and therefore never removed.
 		 */
 		debug(20, 4) ("storeMaintainSwapSpace: locked url %s\n",
-		    (e->mem_obj && e->mem_obj->url) ? e->mem_obj->url : storeKeyText(e->key));
+		    (e->mem_obj
+			&& e->mem_obj->url) ? e->mem_obj->url : storeKeyText(e->
+			key));
 		linklistPush(&locked_entries, e);
 	    }
 	    locked++;
@@ -879,7 +887,8 @@
 	     * checks...
 	     */
 	    expired++;
-	    debug(20, 3) ("Released store object age %f size %d refs %d key %s\n",
+	    debug(20,
+		3) ("Released store object age %f size %d refs %d key %s\n",
 		age, e->swap_file_sz, e->refcount, storeKeyText(e->key));
 	    min_age = age;
 	    storeRelease(e);
@@ -938,7 +947,10 @@
 	    break;
     }
 #endif
-    debug(20, (expired ? 2 : 3)) ("storeMaintainSwapSpace: scanned %d/%d removed %d/%d locked %d f=%.03f\n",
+    debug(20, (expired ? 2 : 3))
+
+	
+	("storeMaintainSwapSpace: scanned %d/%d removed %d/%d locked %d f=%.03f\n",
 	scanned, max_scan, expired, max_remove, locked, f);
     debug(20, 3) ("storeMaintainSwapSpace stats:\n");
     debug(20, 3) ("  %6d objects\n", memInUse(MEM_STOREENTRY));
@@ -989,7 +1001,8 @@
 	storeDirMapBitReset(e->swap_file_number);
 	if (e->swap_status == SWAPOUT_DONE)
 	    if (EBIT_TEST(e->flags, ENTRY_VALIDATED))
-		storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, -1);
+		storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz,
+		    -1);
 	if (!EBIT_TEST(e->flags, KEY_PRIVATE))
 	    storeDirSwapLog(e, SWAP_LOG_DEL);
     }
@@ -1046,9 +1059,9 @@
     const HttpReply *reply;
     assert(e->mem_obj != NULL);
     reply = e->mem_obj->reply;
-    debug(20, 3) ("storeEntryValidLength: Checking '%s'\n", storeKeyText(e->key));
-    debug(20, 5) ("storeEntryValidLength:     object_len = %d\n",
-	objectLen(e));
+    debug(20, 3) ("storeEntryValidLength: Checking '%s'\n",
+	storeKeyText(e->key));
+    debug(20, 5) ("storeEntryValidLength:     object_len = %d\n", objectLen(e));
     debug(20, 5) ("storeEntryValidLength:         hdr_sz = %d\n",
 	reply->hdr_sz);
     debug(20, 5) ("storeEntryValidLength: content_length = %d\n",
@@ -1077,8 +1090,7 @@
 	return 1;
     debug(20, 3) ("storeEntryValidLength: %d bytes too %s; '%s'\n",
 	diff < 0 ? -diff : diff,
-	diff < 0 ? "big" : "small",
-	storeKeyText(e->key));
+	diff < 0 ? "big" : "small", storeKeyText(e->key));
     return 0;
 }
 
@@ -1150,12 +1162,9 @@
     eventAdd("storeLateRelease", storeLateRelease, NULL, 1.0, 1);
     storeDirInit();
     storeRebuildStart();
-    cachemgrRegister("storedir",
-	"Store Directory Stats",
-	storeDirStats, 0, 1);
+    cachemgrRegister("storedir", "Store Directory Stats", storeDirStats, 0, 1);
     cachemgrRegister("store_check_cachable_stats",
-	"storeCheckCachable() Stats",
-	storeCheckCachableStats, 0, 1);
+	"storeCheckCachable() Stats", storeCheckCachableStats, 0, 1);
 }
 
 void
@@ -1213,13 +1222,14 @@
  * near the high water mark.  The LRU age value can be examined on the
  * cachemgr 'info' page.
  */
-time_t
-storeExpiredReferenceAge(void)
+time_t storeExpiredReferenceAge(void)
 {
     double x;
     double z;
     time_t age;
-    x = (double) (store_swap_high - store_swap_size) / (store_swap_high - store_swap_low);
+    x =
+	(double) (store_swap_high - store_swap_size) / (store_swap_high -
+	store_swap_low);
     x = x < 0.0 ? 0.0 : x > 1.0 ? 1.0 : x;
     z = pow((double) (Config.referenceAge / 60), x);
     age = (time_t) (z * 60.0);
@@ -1296,8 +1306,8 @@
      * squid_curtime because it results in a negative served_date.
      */
     if (age > squid_curtime - served_date)
-       if (squid_curtime > age)
-           served_date = squid_curtime - age;
+	if (squid_curtime > age)
+	    served_date = squid_curtime - age;
     entry->expires = reply->expires;
     entry->lastmod = reply->last_modified;
     entry->timestamp = served_date;
@@ -1324,30 +1334,20 @@
 void
 storeMemObjectDump(MemObject * mem)
 {
-    debug(20, 1) ("MemObject->data.head: %p\n",
-	mem->data_hdr.head);
-    debug(20, 1) ("MemObject->data.tail: %p\n",
-	mem->data_hdr.tail);
+    debug(20, 1) ("MemObject->data.head: %p\n", mem->data_hdr.head);
+    debug(20, 1) ("MemObject->data.tail: %p\n", mem->data_hdr.tail);
     debug(20, 1) ("MemObject->data.origin_offset: %d\n",
 	mem->data_hdr.origin_offset);
     debug(20, 1) ("MemObject->start_ping: %d.%06d\n",
-	(int) mem->start_ping.tv_sec,
-	(int) mem->start_ping.tv_usec);
-    debug(20, 1) ("MemObject->inmem_hi: %d\n",
-	(int) mem->inmem_hi);
-    debug(20, 1) ("MemObject->inmem_lo: %d\n",
-	(int) mem->inmem_lo);
-    debug(20, 1) ("MemObject->clients: %p\n",
-	mem->clients);
-    debug(20, 1) ("MemObject->nclients: %d\n",
-	mem->nclients);
-    debug(20, 1) ("MemObject->reply: %p\n",
-	mem->reply);
-    debug(20, 1) ("MemObject->request: %p\n",
-	mem->request);
+	(int) mem->start_ping.tv_sec, (int) mem->start_ping.tv_usec);
+    debug(20, 1) ("MemObject->inmem_hi: %d\n", (int) mem->inmem_hi);
+    debug(20, 1) ("MemObject->inmem_lo: %d\n", (int) mem->inmem_lo);
+    debug(20, 1) ("MemObject->clients: %p\n", mem->clients);
+    debug(20, 1) ("MemObject->nclients: %d\n", mem->nclients);
+    debug(20, 1) ("MemObject->reply: %p\n", mem->reply);
+    debug(20, 1) ("MemObject->request: %p\n", mem->request);
     debug(20, 1) ("MemObject->log_url: %p %s\n",
-	mem->log_url,
-	checkNullString(mem->log_url));
+	mem->log_url, checkNullString(mem->log_url));
 }
 
 void
@@ -1363,7 +1363,8 @@
     debug(20, l) ("StoreEntry->swap_file_sz: %d\n", (int) e->swap_file_sz);
     debug(20, l) ("StoreEntry->refcount: %d\n", e->refcount);
     debug(20, l) ("StoreEntry->flags: %s\n", storeEntryFlags(e));
-    debug(20, l) ("StoreEntry->swap_file_number: %d\n", (int) e->swap_file_number);
+    debug(20, l) ("StoreEntry->swap_file_number: %d\n",
+	(int) e->swap_file_number);
     debug(20, l) ("StoreEntry->lock_count: %d\n", (int) e->lock_count);
     debug(20, l) ("StoreEntry->mem_status: %d\n", (int) e->mem_status);
     debug(20, l) ("StoreEntry->ping_status: %d\n", (int) e->ping_status);
Index: squid/src/store_client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/store_client.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.2.2.1
+++ squid/src/store_client.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_client.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_client.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -160,21 +159,14 @@
 void
 storeClientCopy(StoreEntry * e,
     off_t seen_offset,
-    off_t copy_offset,
-    size_t size,
-    char *buf,
-    STCB * callback,
-    void *data)
+    off_t copy_offset, size_t size, char *buf, STCB * callback, void *data)
 {
     store_client *sc;
     assert(!EBIT_TEST(e->flags, ENTRY_ABORTED));
-    debug(20, 3) ("storeClientCopy: %s, seen %d, want %d, size %d, cb %p, cbdata %p\n",
-	storeKeyText(e->key),
-	(int) seen_offset,
-	(int) copy_offset,
-	(int) size,
-	callback,
-	data);
+    debug(20, 3)
+	("storeClientCopy: %s, seen %d, want %d, size %d, cb %p, cbdata %p\n",
+	storeKeyText(e->key), (int) seen_offset, (int) copy_offset, (int) size,
+	callback, data);
     sc = storeClientListSearch(e->mem_obj, data);
     assert(sc != NULL);
     assert(sc->callback == NULL);
@@ -218,7 +210,8 @@
     if (sc->flags.copy_event_pending)
 	return;
     if (EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)) {
-	debug(20, 5) ("storeClientCopy2: returning because ENTRY_FWD_HDR_WAIT set\n");
+	debug(20,
+	    5) ("storeClientCopy2: returning because ENTRY_FWD_HDR_WAIT set\n");
 	return;
     }
     if (sc->flags.store_copying) {
@@ -243,13 +236,17 @@
 	sc->flags.disk_io_pending = 0;
 	sc->callback = NULL;
 	callback(sc->callback_data, sc->copy_buf, 0);
-    } else if (e->store_status == STORE_PENDING && sc->seen_offset >= mem->inmem_hi) {
+    } else if (e->store_status == STORE_PENDING
+	&& sc->seen_offset >= mem->inmem_hi) {
 	/* client has already seen this, wait for more */
 	debug(20, 3) ("storeClientCopy2: Waiting for more\n");
-    } else if (sc->copy_offset >= mem->inmem_lo && sc->copy_offset < mem->inmem_hi) {
+    } else if (sc->copy_offset >= mem->inmem_lo
+	&& sc->copy_offset < mem->inmem_hi) {
 	/* What the client wants is in memory */
 	debug(20, 3) ("storeClientCopy2: Copying from memory\n");
-	sz = stmemCopy(&mem->data_hdr, sc->copy_offset, sc->copy_buf, sc->copy_size);
+	sz =
+	    stmemCopy(&mem->data_hdr, sc->copy_offset, sc->copy_buf,
+	    sc->copy_size);
 	sc->flags.disk_io_pending = 0;
 	sc->callback = NULL;
 	callback(sc->callback_data, sc->copy_buf, sz);
@@ -295,20 +292,13 @@
     assert(sc->callback != NULL);
     if (mem->swap_hdr_sz == 0) {
 	storeRead(sc->swapin_sio,
-	    sc->copy_buf,
-	    sc->copy_size,
-	    0,
-	    storeClientReadHeader,
-	    sc);
+	    sc->copy_buf, sc->copy_size, 0, storeClientReadHeader, sc);
     } else {
 	if (sc->entry->swap_status == SWAPOUT_WRITING)
-	    assert(storeOffset(mem->swapout.sio) > sc->copy_offset + mem->swap_hdr_sz);
-	storeRead(sc->swapin_sio,
-	    sc->copy_buf,
-	    sc->copy_size,
-	    sc->copy_offset + mem->swap_hdr_sz,
-	    storeClientReadBody,
-	    sc);
+	    assert(storeOffset(mem->swapout.sio) >
+		sc->copy_offset + mem->swap_hdr_sz);
+	storeRead(sc->swapin_sio, sc->copy_buf, sc->copy_size,
+	    sc->copy_offset + mem->swap_hdr_sz, storeClientReadBody, sc);
     }
 }
 
@@ -492,8 +482,7 @@
     return 1;
 }
 
-off_t
-storeLowestMemReaderOffset(const StoreEntry * entry)
+off_t storeLowestMemReaderOffset(const StoreEntry * entry)
 {
     const MemObject *mem = entry->mem_obj;
     off_t lowest = mem->inmem_hi;
Index: squid/src/store_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_digest.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/store_digest.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/store_digest.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: store_digest.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_digest.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -47,7 +47,8 @@
  * local types
  */
 
-typedef struct {
+typedef struct
+{
     StoreDigestCBlock cblock;
     int rebuild_lock;		/* bucket number */
     StoreEntry *rewrite_lock;	/* store entry with the digest */
@@ -55,16 +56,19 @@
     int rewrite_offset;
     int rebuild_count;
     int rewrite_count;
-} StoreDigestState;
+}
+StoreDigestState;
 
-typedef struct {
+typedef struct
+{
     int del_count;		/* #store entries deleted from store_digest */
     int del_lost_count;		/* #store entries not found in store_digest on delete */
     int add_count;		/* #store entries accepted to store_digest */
     int add_coll_count;		/* #accepted entries that collided with existing ones */
     int rej_count;		/* #store entries not accepted to store_digest */
     int rej_coll_count;		/* #not accepted entries that collided with existing ones */
-} StoreDigestStats;
+}
+StoreDigestStats;
 
 /* local vars */
 static StoreDigestState sd_state;
@@ -102,11 +106,11 @@
 	return;
     }
     store_digest = cacheDigestCreate(cap, Config.digest.bits_per_entry);
-    debug(71, 1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n",
+    debug(71,
+	1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n",
 	Config.digest.rebuild_period, Config.digest.rewrite_period);
     memset(&sd_state, 0, sizeof(sd_state));
-    cachemgrRegister("store_digest", "Store Digest",
-	storeDigestReport, 0, 1);
+    cachemgrRegister("store_digest", "Store Digest", storeDigestReport, 0, 1);
 #else
     store_digest = NULL;
     debug(71, 3) ("Local cache digest is 'off'\n");
@@ -159,11 +163,10 @@
     }
     if (store_digest) {
 	cacheDigestReport(store_digest, "store", e);
-	storeAppendPrintf(e, "\t added: %d rejected: %d ( %.2f %%) del-ed: %d\n",
-	    sd_stats.add_count,
-	    sd_stats.rej_count,
-	    xpercent(sd_stats.rej_count, sd_stats.rej_count + sd_stats.add_count),
-	    sd_stats.del_count);
+	storeAppendPrintf(e,
+	    "\t added: %d rejected: %d ( %.2f %%) del-ed: %d\n",
+	    sd_stats.add_count, sd_stats.rej_count, xpercent(sd_stats.rej_count,
+		sd_stats.rej_count + sd_stats.add_count), sd_stats.del_count);
 	storeAppendPrintf(e, "\t collisions: on add: %.2f %% on rej: %.2f %%\n",
 	    xpercent(sd_stats.add_coll_count, sd_stats.add_count),
 	    xpercent(sd_stats.rej_coll_count, sd_stats.rej_count));
@@ -217,7 +220,8 @@
     /* still here? check staleness */
     /* Note: We should use the time of the next rebuild, not (cur_time+period) */
     if (refreshCheckDigest(e, Config.digest.rebuild_period)) {
-	debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n",
+	debug(71,
+	    6) ("storeDigestAdd: entry expires within %d secs, ignoring\n",
 	    Config.digest.rebuild_period);
 	return 0;
     }
@@ -253,13 +257,18 @@
     assert(store_digest);
     /* prevent overlapping if rebuild schedule is too tight */
     if (sd_state.rebuild_lock) {
-	debug(71, 1) ("storeDigestRebuildStart: overlap detected, consider increasing rebuild period\n");
+	debug(71, 1)
+
+	    
+	    ("storeDigestRebuildStart: overlap detected, consider increasing rebuild period\n");
 	return;
     }
     sd_state.rebuild_lock = 1;
-    debug(71, 2) ("storeDigestRebuildStart: rebuild #%d\n", sd_state.rebuild_count + 1);
+    debug(71, 2) ("storeDigestRebuildStart: rebuild #%d\n",
+	sd_state.rebuild_count + 1);
     if (sd_state.rewrite_lock) {
-	debug(71, 2) ("storeDigestRebuildStart: waiting for Rewrite to finish.\n");
+	debug(71,
+	    2) ("storeDigestRebuildStart: waiting for Rewrite to finish.\n");
 	return;
     }
     storeDigestRebuildResume();
@@ -274,7 +283,7 @@
     sd_state.rebuild_offset = 0;
     /* resize or clear */
     if (!storeDigestResize())
-	cacheDigestClear(store_digest);		/* not clean()! */
+	cacheDigestClear(store_digest);	/* not clean()! */
     memset(&sd_stats, 0, sizeof(sd_stats));
     eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1);
 }
@@ -303,10 +312,12 @@
     assert(sd_state.rebuild_lock);
     if (sd_state.rebuild_offset + bcount > store_hash_buckets)
 	bcount = store_hash_buckets - sd_state.rebuild_offset;
-    debug(71, 3) ("storeDigestRebuildStep: buckets: %d offset: %d chunk: %d buckets\n",
+    debug(71, 3)
+	("storeDigestRebuildStep: buckets: %d offset: %d chunk: %d buckets\n",
 	store_hash_buckets, sd_state.rebuild_offset, bcount);
     while (bcount--) {
-	hash_link *link_ptr = hash_get_bucket(store_table, sd_state.rebuild_offset);
+	hash_link *link_ptr =
+	    hash_get_bucket(store_table, sd_state.rebuild_offset);
 	for (; link_ptr; link_ptr = link_ptr->next) {
 	    storeDigestAdd((StoreEntry *) link_ptr);
 	}
@@ -316,7 +327,8 @@
     if (sd_state.rebuild_offset >= store_hash_buckets)
 	storeDigestRebuildFinish();
     else
-	eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0, 1);
+	eventAdd("storeDigestRebuildStep", storeDigestRebuildStep, NULL, 0.0,
+	    1);
 }
 
 
@@ -331,10 +343,14 @@
     assert(store_digest);
     /* prevent overlapping if rewrite schedule is too tight */
     if (sd_state.rewrite_lock) {
-	debug(71, 1) ("storeDigestRewrite: overlap detected, consider increasing rewrite period\n");
+	debug(71, 1)
+
+	    
+	    ("storeDigestRewrite: overlap detected, consider increasing rewrite period\n");
 	return;
     }
-    debug(71, 2) ("storeDigestRewrite: start rewrite #%d\n", sd_state.rewrite_count + 1);
+    debug(71, 2) ("storeDigestRewrite: start rewrite #%d\n",
+	sd_state.rewrite_count + 1);
     /* make new store entry */
     url = internalLocalUri("/squid-internal-periodic/", StoreDigestFileName);
     flags = null_request_flags;
@@ -342,11 +358,13 @@
     sd_state.rewrite_lock = e = storeCreateEntry(url, url, flags, METHOD_GET);
     assert(sd_state.rewrite_lock);
     cbdataAdd(sd_state.rewrite_lock, NULL, 0);
-    debug(71, 3) ("storeDigestRewrite: url: %s key: %s\n", url, storeKeyText(e->key));
+    debug(71, 3) ("storeDigestRewrite: url: %s key: %s\n", url,
+	storeKeyText(e->key));
     e->mem_obj->request = requestLink(urlParse(METHOD_GET, url));
     /* wait for rebuild (if any) to finish */
     if (sd_state.rebuild_lock) {
-	debug(71, 2) ("storeDigestRewriteStart: waiting for rebuild to finish.\n");
+	debug(71,
+	    2) ("storeDigestRewriteStart: waiting for rebuild to finish.\n");
 	return;
     }
     storeDigestRewriteResume();
@@ -366,15 +384,17 @@
     /* fake reply */
     httpReplyReset(e->mem_obj->reply);
     httpReplySetHeaders(e->mem_obj->reply, 1.0, 200, "Cache Digest OK",
-	"application/cache-digest", store_digest->mask_size + sizeof(sd_state.cblock),
-	squid_curtime, squid_curtime + Config.digest.rewrite_period);
+	"application/cache-digest",
+	store_digest->mask_size + sizeof(sd_state.cblock), squid_curtime,
+	squid_curtime + Config.digest.rewrite_period);
     debug(71, 3) ("storeDigestRewrite: entry expires on %d (%+d)\n",
 	e->mem_obj->reply->expires, e->mem_obj->reply->expires - squid_curtime);
     storeBuffer(e);
     httpReplySwapOut(e->mem_obj->reply, e);
     storeDigestCBlockSwapOut(e);
     storeBufferFlush(e);
-    eventAdd("storeDigestSwapOutStep", storeDigestSwapOutStep, sd_state.rewrite_lock, 0.0, 1);
+    eventAdd("storeDigestSwapOutStep", storeDigestSwapOutStep,
+	sd_state.rewrite_lock, 0.0, 1);
 }
 
 /* finishes swap out sequence for the digest; schedules next rewrite */
@@ -416,7 +436,8 @@
     if (sd_state.rewrite_offset + chunk_size > store_digest->mask_size)
 	chunk_size = store_digest->mask_size - sd_state.rewrite_offset;
     storeAppend(e, store_digest->mask + sd_state.rewrite_offset, chunk_size);
-    debug(71, 3) ("storeDigestSwapOutStep: size: %d offset: %d chunk: %d bytes\n",
+    debug(71,
+	3) ("storeDigestSwapOutStep: size: %d offset: %d chunk: %d bytes\n",
 	store_digest->mask_size, sd_state.rewrite_offset, chunk_size);
     sd_state.rewrite_offset += chunk_size;
     /* are we done ? */
@@ -455,7 +476,8 @@
     const int lo_cap = 1 + store_swap_size / Config.Store.avgObjectSize;
     const int e_count = memInUse(MEM_STOREENTRY);
     int cap = e_count ? e_count : hi_cap;
-    debug(71, 2) ("storeDigestCalcCap: have: %d, want %d entries; limits: [%d, %d]\n",
+    debug(71,
+	2) ("storeDigestCalcCap: have: %d, want %d entries; limits: [%d, %d]\n",
 	e_count, cap, lo_cap, hi_cap);
     if (cap < lo_cap)
 	cap = lo_cap;
Index: squid/src/store_dir.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_dir.c,v
retrieving revision 1.1.1.3.4.2.2.7
retrieving revision 1.1.1.3.4.2.2.7.2.1
diff -u -r1.1.1.3.4.2.2.7 -r1.1.1.3.4.2.2.7.2.1
--- squid/src/store_dir.c	8 Jul 2001 10:32:00 -0000	1.1.1.3.4.2.2.7
+++ squid/src/store_dir.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.2.2.7.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_dir.c,v 1.1.1.3.4.2.2.7 2001/07/08 10:32:00 serassio Exp $
+ * $Id: store_dir.c,v 1.1.1.3.4.2.2.7.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -45,8 +44,7 @@
 #include <sys/vfs.h>
 #endif
 
-const char *SwapDirType[] =
-{
+const char *SwapDirType[] = {
     "ufs",
     "!ERROR!"
 };
@@ -89,7 +87,7 @@
 #endif
     } while (pid > 0 || (pid < 0 && errno == EINTR));
 #else
-	}
+    }
 #endif
 }
 
@@ -282,9 +280,7 @@
 	return;
     assert(op > SWAP_LOG_NOP && op < SWAP_LOG_MAX);
     debug(20, 3) ("storeDirSwapLog: %s %s %08X\n",
-	swap_log_op_str[op],
-	storeKeyText(e->key),
-	e->swap_file_number);
+	swap_log_op_str[op], storeKeyText(e->key), e->swap_file_number);
     sd = &Config.cacheSwap.swapDirs[dirn];
     sd->log.write(sd, e, op);
 }
@@ -316,7 +312,8 @@
 	store_swap_size);
     storeAppendPrintf(sentry, "Current Capacity       : %d%% used, %d%% free\n",
 	percent((int) store_swap_size, (int) Config.Swap.maxSize),
-	percent((int) (Config.Swap.maxSize - store_swap_size), (int) Config.Swap.maxSize));
+	percent((int) (Config.Swap.maxSize - store_swap_size),
+	    (int) Config.Swap.maxSize));
     storeUfsDirStats(sentry);	/* XXX */
 }
 
@@ -365,8 +362,8 @@
     for (dirn = 0; dirn < Config.cacheSwap.n_configured; dirn++) {
 	sd = &Config.cacheSwap.swapDirs[dirn];
 	if (sd->log.open)
-	    sd->log.open(sd);    
-	}
+	    sd->log.open(sd);
+    }
 }
 
 void
@@ -502,7 +499,8 @@
     (((fsbs) != 0 && (fsbs) < (bs)) ? \
             (num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))
 int
-storeDirGetUFSStats(const char *path, int *totl_kb, int *free_kb, int *totl_in, int *free_in)
+storeDirGetUFSStats(const char *path, int *totl_kb, int *free_kb, int *totl_in,
+    int *free_in)
 {
 #if HAVE_STATVFS
     struct statvfs sfs;
Index: squid/src/store_dir_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_dir_ufs.c,v
retrieving revision 1.1.1.1.4.1.2.8
retrieving revision 1.1.1.1.4.1.2.8.2.1
diff -u -r1.1.1.1.4.1.2.8 -r1.1.1.1.4.1.2.8.2.1
--- squid/src/store_dir_ufs.c	29 Jul 2001 09:10:28 -0000	1.1.1.1.4.1.2.8
+++ squid/src/store_dir_ufs.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.1.2.8.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_dir_ufs.c,v 1.1.1.1.4.1.2.8 2001/07/29 09:10:28 serassio Exp $
+ * $Id: store_dir_ufs.c,v 1.1.1.1.4.1.2.8.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -45,18 +44,21 @@
 #define STORE_META_BUFSZ 4096
 
 typedef struct _RebuildState RebuildState;
-struct _RebuildState {
+struct _RebuildState
+{
     SwapDir *sd;
     int n_read;
     FILE *log;
     int speed;
     int curlvl1;
     int curlvl2;
-    struct {
+    struct
+    {
 	unsigned int need_to_validate:1;
 	unsigned int clean:1;
 	unsigned int init:1;
-    } flags;
+    }
+    flags;
     int done;
     int in_dir;
     int fn;
@@ -84,11 +86,7 @@
     size_t swap_file_sz,
     time_t expires,
     time_t timestamp,
-    time_t lastref,
-    time_t lastmod,
-    u_num32 refcount,
-    u_short flags,
-    int clean);
+    time_t lastref, time_t lastmod, u_num32 refcount, u_short flags, int clean);
 static void storeUfsDirRebuild(SwapDir * sd);
 static void storeUfsDirCloseTmpSwapLog(SwapDir * sd);
 static FILE *storeUfsDirOpenTmpSwapLog(SwapDir *, int *, int *);
@@ -131,8 +129,7 @@
 	debug(20, should_exist ? 1 : 3) ("%s created\n", path);
 	created = 1;
     } else {
-	fatalf("Failed to make swap directory %s: %s",
-	    path, xstrerror());
+	fatalf("Failed to make swap directory %s: %s", path, xstrerror());
     }
     return created;
 }
@@ -250,9 +247,9 @@
 {
     static int started_clean_event = 0;
     static const char *errmsg =
-    "\tFailed to verify one of the swap directories, Check cache.log\n"
-    "\tfor details.  Run 'squid -z' to create swap directories\n"
-    "\tif needed, or if running Squid for the first time.";
+	"\tFailed to verify one of the swap directories, Check cache.log\n"
+	"\tfor details.  Run 'squid -z' to create swap directories\n"
+	"\tif needed, or if running Squid for the first time.";
     if (storeUfsVerifyCacheDirs(sd) < 0)
 	fatal(errmsg);
     storeUfsDirOpenSwapLog(sd);
@@ -314,7 +311,7 @@
 	debug(20, 9) ("file_in: fd=%d %08X\n", fd, sfileno);
 	Counter.syscalls.disk.reads++;
 #ifdef _SQUID_MSWIN_
-	if (fread(hdr_buf, 1, DISK_PAGE_SIZE, fd_table[fd].fbuf) == 0 
+	if (fread(hdr_buf, 1, DISK_PAGE_SIZE, fd_table[fd].fbuf) == 0
 	    && ferror(fd_table[fd].fbuf)) {
 #else
 	if (read(fd, hdr_buf, DISK_PAGE_SIZE) < 0) {
@@ -336,11 +333,13 @@
 #endif
 	tlv_list = storeSwapMetaUnpack(hdr_buf, &swap_hdr_len);
 	if (tlv_list == NULL) {
-	    debug(20, 1) ("storeRebuildFromDirectory: failed to get meta data\n");
+	    debug(20,
+		1) ("storeRebuildFromDirectory: failed to get meta data\n");
 	    storeUnlink(sfileno);
 	    continue;
 	}
-	debug(20, 3) ("storeRebuildFromDirectory: successful swap meta unpacking\n");
+	debug(20,
+	    3) ("storeRebuildFromDirectory: successful swap meta unpacking\n");
 	memset(key, '\0', MD5_DIGEST_CHARS);
 	memset(&tmpe, '\0', sizeof(StoreEntry));
 	for (t = tlv_list; t; t = t->next) {
@@ -395,14 +394,9 @@
 	}
 	rb->counts.objcount++;
 	storeEntryDump(&tmpe, 5);
-	e = storeAddDiskRestore(key,
-	    sfileno,
-	    tmpe.swap_file_sz,
-	    tmpe.expires,
-	    tmpe.timestamp,
-	    tmpe.lastref,
-	    tmpe.lastmod,
-	    tmpe.refcount,	/* refcount */
+	e =
+	    storeAddDiskRestore(key, sfileno, tmpe.swap_file_sz, tmpe.expires,
+	    tmpe.timestamp, tmpe.lastref, tmpe.lastmod, tmpe.refcount,	/* refcount */
 	    tmpe.flags,		/* flags */
 	    (int) rb->flags.clean);
     }
@@ -439,10 +433,10 @@
 	    continue;
 	if (s.op >= SWAP_LOG_MAX)
 	    continue;
-	s.swap_file_number = storeDirProperFileno(rb->sd->index, s.swap_file_number);
+	s.swap_file_number =
+	    storeDirProperFileno(rb->sd->index, s.swap_file_number);
 	debug(20, 3) ("storeRebuildFromSwapLog: %s %s %08X\n",
-	    swap_log_op_str[(int) s.op],
-	    storeKeyText(s.key),
+	    swap_log_op_str[(int) s.op], storeKeyText(s.key),
 	    s.swap_file_number);
 	if (s.op == SWAP_LOG_ADD) {
 	    (void) 0;
@@ -558,11 +552,7 @@
 	    s.swap_file_sz,
 	    s.expires,
 	    s.timestamp,
-	    s.lastref,
-	    s.lastmod,
-	    s.refcount,
-	    s.flags,
-	    (int) rb->flags.clean);
+	    s.lastref, s.lastmod, s.refcount, s.flags, (int) rb->flags.clean);
 	storeDirSwapLog(e, SWAP_LOG_ADD);
     }
     eventAdd("storeRebuild", storeRebuildFromSwapLog, rb, 0.0, 1);
@@ -575,10 +565,7 @@
     int used = 0;
     int dirs_opened = 0;
     debug(20, 3) ("storeGetNextFile: flag=%d, %d: /%02X/%02X\n",
-	rb->flags.init,
-	rb->sd->index,
-	rb->curlvl1,
-	rb->curlvl2);
+	rb->flags.init, rb->sd->index, rb->curlvl1, rb->curlvl2);
     if (rb->done)
 	return -2;
     while (fd < 0 && rb->done == 0) {
@@ -593,8 +580,7 @@
 	}
 	if (0 == rb->in_dir) {	/* we need to read in a new directory */
 	    snprintf(rb->fullpath, SQUID_MAXPATHLEN, "%s/%02X/%02X",
-		rb->sd->path,
-		rb->curlvl1, rb->curlvl2);
+		rb->sd->path, rb->curlvl1, rb->curlvl2);
 	    if (rb->flags.init && rb->td != NULL)
 		closedir(rb->td);
 	    rb->td = NULL;
@@ -609,7 +595,8 @@
 		rb->entry = readdir(rb->td);	/* skip . and .. */
 		rb->entry = readdir(rb->td);
 		if (rb->entry == NULL && errno == ENOENT)
-		    debug(20, 1) ("storeGetNextFile: directory does not exist!.\n");
+		    debug(20,
+			1) ("storeGetNextFile: directory does not exist!.\n");
 		debug(20, 3) ("storeGetNextFile: Directory %s\n", rb->fullpath);
 	    }
 	}
@@ -620,15 +607,18 @@
 		    rb->entry->d_name);
 		continue;
 	    }
-	    if (!storeUfsFilenoBelongsHere(rb->fn, rb->sd->index, rb->curlvl1, rb->curlvl2)) {
-		debug(20, 3) ("storeGetNextFile: %08X does not belong in %d/%d/%d\n",
+	    if (!storeUfsFilenoBelongsHere(rb->fn, rb->sd->index, rb->curlvl1,
+		    rb->curlvl2)) {
+		debug(20,
+		    3) ("storeGetNextFile: %08X does not belong in %d/%d/%d\n",
 		    rb->fn, rb->sd->index, rb->curlvl1, rb->curlvl2);
 		continue;
 	    }
 	    rb->fn = storeDirProperFileno(rb->sd->index, rb->fn);
 	    used = storeDirMapBitTest(rb->fn);
 	    if (used) {
-		debug(20, 3) ("storeGetNextFile: Locked, continuing with next.\n");
+		debug(20,
+		    3) ("storeGetNextFile: Locked, continuing with next.\n");
 		continue;
 	    }
 	    snprintf(rb->fullfilename, SQUID_MAXPATHLEN, "%s/%s",
@@ -636,7 +626,8 @@
 	    debug(20, 3) ("storeGetNextFile: Opening %s\n", rb->fullfilename);
 	    fd = file_open(rb->fullfilename, O_RDONLY);
 	    if (fd < 0)
-		debug(50, 1) ("storeGetNextFile: %s: %s\n", rb->fullfilename, xstrerror());
+		debug(50, 1) ("storeGetNextFile: %s: %s\n", rb->fullfilename,
+		    xstrerror());
 	    else
 		store_open_disk_fd++;
 	    continue;
@@ -662,14 +653,11 @@
     size_t swap_file_sz,
     time_t expires,
     time_t timestamp,
-    time_t lastref,
-    time_t lastmod,
-    u_num32 refcount,
-    u_short flags,
-    int clean)
+    time_t lastref, time_t lastmod, u_num32 refcount, u_short flags, int clean)
 {
     StoreEntry *e = NULL;
-    debug(20, 5) ("StoreAddDiskRestore: %s, fileno=%08X\n", storeKeyText(key), file_number);
+    debug(20, 5) ("StoreAddDiskRestore: %s, fileno=%08X\n", storeKeyText(key),
+	file_number);
     /* if you call this you'd better be sure file_number is not 
      * already in use! */
     e = new_StoreEntry(STORE_ENTRY_WITHOUT_MEMOBJ, NULL, NULL);
@@ -812,7 +800,8 @@
     return fp;
 }
 
-struct _clean_state {
+struct _clean_state
+{
     char *cur;
     char *new;
     char *cln;
@@ -886,13 +875,15 @@
     /* buffered write */
     if (state->outbuf_offset + ss > CLEAN_BUF_SZ) {
 #ifdef _SQUID_MSWIN_
-	if (fwrite(state->outbuf, 1, state->outbuf_offset, fd_table[state->fd].fbuf) < state->outbuf_offset) {
+	if (fwrite(state->outbuf, 1, state->outbuf_offset,
+		fd_table[state->fd].fbuf) < state->outbuf_offset) {
 #else
 	if (write(state->fd, state->outbuf, state->outbuf_offset) < 0) {
 #endif
 	    debug(50, 0) ("storeDirWriteCleanLogs: %s: write: %s\n",
 		state->new, xstrerror());
-	    debug(20, 0) ("storeDirWriteCleanLogs: Current swap logfile not replaced.\n");
+	    debug(20, 0)
+		("storeDirWriteCleanLogs: Current swap logfile not replaced.\n");
 	    file_close(state->fd);
 	    state->fd = -1;
 	    unlink(state->new);
@@ -914,9 +905,9 @@
     if (state->fd < 0)
 	return;
 #ifdef _SQUID_MSWIN_
-    fbuf=fd_table[state->fd].fbuf;
+    fbuf = fd_table[state->fd].fbuf;
     fwrite(state->outbuf, 1, state->outbuf_offset, fbuf);
-    if (ferror(fbuf) || feof(fbuf)){
+    if (ferror(fbuf) || feof(fbuf)) {
 #else
     if (write(state->fd, state->outbuf, state->outbuf_offset) < 0) {
 #endif
@@ -979,12 +970,7 @@
     s->flags = e->flags;
     xmemcpy(s->key, e->key, MD5_DIGEST_CHARS);
     file_write(sd->u.ufs.swaplog_fd,
-	-1,
-	s,
-	sizeof(storeSwapLogData),
-	NULL,
-	NULL,
-	xfree);
+	-1, s, sizeof(storeSwapLogData), NULL, NULL, xfree);
 }
 
 static void
@@ -1169,10 +1155,11 @@
 	SD = &Config.cacheSwap.swapDirs[i];
 	storeAppendPrintf(sentry, "\n");
 	storeAppendPrintf(sentry, "Store Directory #%d: %s\n", i, SD->path);
-	storeAppendPrintf(sentry, "FS Block Size %d Bytes\n",
-	    SD->fs.blksize);
-	storeAppendPrintf(sentry, "First level subdirectories: %d\n", SD->u.ufs.l1);
-	storeAppendPrintf(sentry, "Second level subdirectories: %d\n", SD->u.ufs.l2);
+	storeAppendPrintf(sentry, "FS Block Size %d Bytes\n", SD->fs.blksize);
+	storeAppendPrintf(sentry, "First level subdirectories: %d\n",
+	    SD->u.ufs.l1);
+	storeAppendPrintf(sentry, "Second level subdirectories: %d\n",
+	    SD->u.ufs.l2);
 	storeAppendPrintf(sentry, "Maximum Size: %d KB\n", SD->max_size);
 	storeAppendPrintf(sentry, "Current Size: %d KB\n", SD->cur_size);
 	storeAppendPrintf(sentry, "Percent Used: %0.2f%%\n",
@@ -1180,16 +1167,16 @@
 	storeAppendPrintf(sentry, "Filemap bits in use: %d of %d (%d%%)\n",
 	    SD->map->n_files_in_map, SD->map->max_n_files,
 	    percent(SD->map->n_files_in_map, SD->map->max_n_files));
-	x = storeDirGetUFSStats(SD->path, &totl_kb, &free_kb, &totl_in, &free_in);
+	x =
+	    storeDirGetUFSStats(SD->path, &totl_kb, &free_kb, &totl_in,
+	    &free_in);
 	if (0 == x) {
-	    storeAppendPrintf(sentry, "Filesystem Space in use: %d/%d KB (%d%%)\n",
-	    	totl_kb - free_kb,
-		totl_kb,
-		percent(totl_kb - free_kb, totl_kb));
-	    storeAppendPrintf(sentry, "Filesystem Inodes in use: %d/%d (%d%%)\n",
-		totl_in - free_in,
-		totl_in,
-		percent(totl_in - free_in, totl_in));
+	    storeAppendPrintf(sentry,
+		"Filesystem Space in use: %d/%d KB (%d%%)\n", totl_kb - free_kb,
+		totl_kb, percent(totl_kb - free_kb, totl_kb));
+	    storeAppendPrintf(sentry,
+		"Filesystem Inodes in use: %d/%d (%d%%)\n", totl_in - free_in,
+		totl_in, percent(totl_in - free_in, totl_in));
 	}
 	storeAppendPrintf(sentry, "Flags:");
 	if (SD->flags.selected)
@@ -1348,10 +1335,7 @@
     storeAppendPrintf(entry, "%s %s %s %d %d %d\n",
 	name,
 	SwapDirType[s->type],
-	s->path,
-	s->max_size >> 10,
-	s->u.ufs.l1,
-	s->u.ufs.l2);
+	s->path, s->max_size >> 10, s->u.ufs.l1, s->u.ufs.l2);
 }
 
 /*
@@ -1380,8 +1364,6 @@
     fullpath[0] = '\0';
     snprintf(fullpath, SQUID_MAXPATHLEN, "%s/%02X/%02X/%08X",
 	Config.cacheSwap.swapDirs[dirn].path,
-	((filn / L2) / L2) % L1,
-	(filn / L2) % L2,
-	filn);
+	((filn / L2) / L2) % L1, (filn / L2) % L2, filn);
     return fullpath;
 }
Index: squid/src/store_heap_replacement.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_heap_replacement.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/store_heap_replacement.c	6 Jan 2001 12:40:16 -0000	1.1.1.1.4.1.2.1
+++ squid/src/store_heap_replacement.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_heap_replacement.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_heap_replacement.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Heap-based replacement
  * AUTHOR: John Dilley
Index: squid/src/store_io.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_io.c,v
retrieving revision 1.1.1.1.20.1
retrieving revision 1.1.1.1.20.1.2.1
diff -u -r1.1.1.1.20.1 -r1.1.1.1.20.1.2.1
--- squid/src/store_io.c	6 Jan 2001 12:40:16 -0000	1.1.1.1.20.1
+++ squid/src/store_io.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.20.1.2.1
@@ -1,4 +1,5 @@
 #define STORE_IO_C
+
 #include "squid.h"
 
 storeIOState *
@@ -12,7 +13,8 @@
 void
 storeClose(storeIOState * sio)
 {
-    SwapDir *SD = &Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
+    SwapDir *SD =
+	&Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
     if (sio->flags.closing)
 	return;
     sio->flags.closing = 1;
@@ -20,16 +22,20 @@
 }
 
 void
-storeRead(storeIOState * sio, char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
+storeRead(storeIOState * sio, char *buf, size_t size, off_t offset,
+    STRCB * callback, void *callback_data)
 {
-    SwapDir *SD = &Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
+    SwapDir *SD =
+	&Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
     SD->obj.read(sio, buf, size, offset, callback, callback_data);
 }
 
 void
-storeWrite(storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+storeWrite(storeIOState * sio, char *buf, size_t size, off_t offset,
+    FREE * free_func)
 {
-    SwapDir *SD = &Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
+    SwapDir *SD =
+	&Config.cacheSwap.swapDirs[sio->swap_file_number >> SWAP_DIR_SHIFT];
     SD->obj.write(sio, buf, size, offset, free_func);
 }
 
@@ -40,8 +46,7 @@
     SD->obj.unlink(f);
 }
 
-off_t
-storeOffset(storeIOState * sio)
+off_t storeOffset(storeIOState * sio)
 {
     return sio->offset;
 }
Index: squid/src/store_io_asyncufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_asyncufs.c,v
retrieving revision 1.1.1.1.4.3
retrieving revision 1.1.1.1.4.3.6.1
diff -u -r1.1.1.1.4.3 -r1.1.1.1.4.3.6.1
--- squid/src/store_io_asyncufs.c	22 May 2000 11:00:39 -0000	1.1.1.1.4.3
+++ squid/src/store_io_asyncufs.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.3.6.1
@@ -1,10 +1,11 @@
-
 /*
  * DEBUG 78
  */
 
 #include "squid.h"
 
+#if USE_ASYNC_IO
+
 #define SWAP_DIR_SHIFT 24
 #define SWAP_FILE_MASK 0x00FFFFFF
 #define MAGIC1 (NUMTHREADS/Config.cacheSwap.n_configured/2)
@@ -16,14 +17,16 @@
 static int storeAufsSomethingPending(storeIOState *);
 static int storeAufsKickWriteQueue(storeIOState * sio);
 
-struct _queued_write {
+struct _queued_write
+{
     char *buf;
     size_t size;
     off_t offset;
     FREE *free_func;
 };
 
-struct _queued_read {
+struct _queued_read
+{
     char *buf;
     size_t size;
     off_t offset;
@@ -76,7 +79,8 @@
 }
 
 void
-storeAufsRead(storeIOState * sio, char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
+storeAufsRead(storeIOState * sio, char *buf, size_t size, off_t offset,
+    STRCB * callback, void *callback_data)
 {
     assert(sio->read.callback == NULL);
     assert(sio->read.callback_data == NULL);
@@ -107,7 +111,8 @@
 }
 
 void
-storeAufsWrite(storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+storeAufsWrite(storeIOState * sio, char *buf, size_t size, off_t offset,
+    FREE * free_func)
 {
     debug(78, 3) ("storeAufsWrite: fileno %08X, FD %d\n",
 	sio->swap_file_number, sio->type.aufs.fd);
@@ -141,12 +146,7 @@
      * callback function
      */
     aioWrite(sio->type.aufs.fd,
-	offset,
-	buf,
-	size,
-	storeAufsWriteDone,
-	sio,
-	free_func);
+	offset, buf, size, storeAufsWriteDone, sio, free_func);
 }
 
 void
@@ -177,9 +177,11 @@
     struct _queued_read *q = linklistShift(&sio->type.aufs.pending_reads);
     if (NULL == q)
 	return 0;
-    debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %d bytes\n",
+    debug(78,
+	3) ("storeAufsKickReadQueue: reading queued request of %d bytes\n",
 	q->size);
-    storeAufsRead(sio, q->buf, q->size, q->offset, q->callback, q->callback_data);
+    storeAufsRead(sio, q->buf, q->size, q->offset, q->callback,
+	q->callback_data);
     xfree(q);
     return 1;
 }
@@ -304,3 +306,5 @@
 	return 1;
     return 0;
 }
+
+#endif /*USE_ASYNC_IO */
Index: squid/src/store_io_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_ufs.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/store_io_ufs.c	6 Jan 2001 12:40:16 -0000	1.1.1.1.4.1.2.1
+++ squid/src/store_io_ufs.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_io_ufs.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_io_ufs.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -89,7 +88,8 @@
 }
 
 void
-storeUfsRead(storeIOState * sio, char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
+storeUfsRead(storeIOState * sio, char *buf, size_t size, off_t offset,
+    STRCB * callback, void *callback_data)
 {
     assert(sio->read.callback == NULL);
     assert(sio->read.callback_data == NULL);
@@ -100,26 +100,18 @@
 	sio->swap_file_number, sio->type.ufs.fd);
     sio->offset = offset;
     sio->type.ufs.flags.reading = 1;
-    file_read(sio->type.ufs.fd,
-	buf,
-	size,
-	offset,
-	storeUfsReadDone,
-	sio);
+    file_read(sio->type.ufs.fd, buf, size, offset, storeUfsReadDone, sio);
 }
 
 void
-storeUfsWrite(storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
+storeUfsWrite(storeIOState * sio, char *buf, size_t size, off_t offset,
+    FREE * free_func)
 {
-    debug(79, 3) ("storeUfsWrite: fileno %08X, FD %d\n", sio->swap_file_number, sio->type.ufs.fd);
+    debug(79, 3) ("storeUfsWrite: fileno %08X, FD %d\n", sio->swap_file_number,
+	sio->type.ufs.fd);
     sio->type.ufs.flags.writing = 1;
     file_write(sio->type.ufs.fd,
-	offset,
-	buf,
-	size,
-	storeUfsWriteDone,
-	sio,
-	free_func);
+	offset, buf, size, storeUfsWriteDone, sio, free_func);
 }
 
 void
Index: squid/src/store_key_md5.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_key_md5.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/store_key_md5.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/store_key_md5.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_key_md5.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_key_md5.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager MD5 Cache Keys
  * AUTHOR: Duane Wessels
@@ -85,9 +84,7 @@
     /* note, n must be a power of 2! */
     const unsigned char *digest = key;
     unsigned int i = digest[0]
-    | digest[1] << 8
-    | digest[2] << 16
-    | digest[3] << 24;
+	| digest[1] << 8 | digest[2] << 16 | digest[3] << 24;
     return (i & (--n));
 }
 
@@ -97,8 +94,7 @@
     static cache_key digest[MD5_DIGEST_CHARS];
     MD5_CTX M;
     assert(id > 0);
-    debug(20, 3) ("storeKeyPrivate: %s %s\n",
-	RequestMethodStr[method], url);
+    debug(20, 3) ("storeKeyPrivate: %s %s\n", RequestMethodStr[method], url);
     MD5Init(&M);
     MD5Update(&M, (unsigned char *) &id, sizeof(id));
     MD5Update(&M, (unsigned char *) &method, sizeof(method));
Index: squid/src/store_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_log.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/store_log.c	6 Jan 2001 12:40:16 -0000	1.1.1.2.4.1.2.1
+++ squid/src/store_log.c	27 Aug 2001 21:48:22 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_log.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_log.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Logging Functions
  * AUTHOR: Duane Wessels
@@ -35,8 +34,7 @@
 
 #include "squid.h"
 
-static char *storeLogTags[] =
-{
+static char *storeLogTags[] = {
     "CREATE",
     "SWAPIN",
     "SWAPOUT",
@@ -76,8 +74,7 @@
 	strLen(reply->content_type) ? strBuf(reply->content_type) : "unknown",
 	reply->content_length,
 	(int) (mem->inmem_hi - mem->reply->hdr_sz),
-	RequestMethodStr[mem->method],
-	mem->log_url);
+	RequestMethodStr[mem->method], mem->log_url);
     file_write_mbuf(storelog_fd, -1, mb, NULL, NULL);
 }
 
Index: squid/src/store_rebuild.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_rebuild.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/store_rebuild.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/store_rebuild.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_rebuild.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_rebuild.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -42,7 +41,6 @@
 static int
 storeCleanupDoubleCheck(const StoreEntry * e)
 {
-#ifndef _SQUID_MSWIN_
     /* XXX too UFS specific */
     struct stat sb;
     int dirn = e->swap_file_number >> SWAP_DIR_SHIFT;
@@ -70,7 +68,6 @@
 	storeEntryDump(e, 0);
 	return -1;
     }
-#endif
     return 0;
 }
 
Index: squid/src/store_swapin.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapin.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/store_swapin.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.1.2.1
+++ squid/src/store_swapin.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_swapin.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_swapin.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Swapin Functions
  * AUTHOR: Duane Wessels
@@ -61,9 +60,7 @@
     debug(20, 3) ("storeSwapInStart: Opening fileno %08X\n",
 	e->swap_file_number);
     sc->swapin_sio = storeOpen(e->swap_file_number,
-	O_RDONLY,
-	storeSwapInFileClosed,
-	sc);
+	O_RDONLY, storeSwapInFileClosed, sc);
     cbdataLock(sc->swapin_sio);
 }
 
@@ -72,8 +69,7 @@
 {
     store_client *sc = data;
     STCB *callback;
-    debug(20, 3) ("storeSwapInFileClosed: sio=%p, errflag=%d\n",
-	sio, errflag);
+    debug(20, 3) ("storeSwapInFileClosed: sio=%p, errflag=%d\n", sio, errflag);
     cbdataUnlock(sio);
     sc->swapin_sio = NULL;
     if ((callback = sc->callback)) {
Index: squid/src/store_swapmeta.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapmeta.c,v
retrieving revision 1.1.1.2.4.2.2.1
retrieving revision 1.1.1.2.4.2.2.1.2.1
diff -u -r1.1.1.2.4.2.2.1 -r1.1.1.2.4.2.2.1.2.1
--- squid/src/store_swapmeta.c	6 Jan 2001 12:40:16 -0000	1.1.1.2.4.2.2.1
+++ squid/src/store_swapmeta.c	27 Aug 2001 21:48:22 -0000	1.1.1.2.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_swapmeta.c,v 1.1.1.2.4.2.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_swapmeta.c,v 1.1.1.2.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -128,7 +127,7 @@
      * enough to hold one type and one length.
      */
     if (buflen <= (sizeof(char) + sizeof(int)))
-	    return NULL;
+	return NULL;
     while (buflen - j > (sizeof(char) + sizeof(int))) {
 	type = buf[j++];
 	if (type < STORE_META_VOID || type > STORE_META_END) {
Index: squid/src/store_swapout.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapout.c,v
retrieving revision 1.1.1.3.4.2.2.1
retrieving revision 1.1.1.3.4.2.2.1.2.1
diff -u -r1.1.1.3.4.2.2.1 -r1.1.1.3.4.2.2.1.2.1
--- squid/src/store_swapout.c	6 Jan 2001 12:40:16 -0000	1.1.1.3.4.2.2.1
+++ squid/src/store_swapout.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: store_swapout.c,v 1.1.1.3.4.2.2.1 2001/01/06 12:40:16 hno Exp $
+ * $Id: store_swapout.c,v 1.1.1.3.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -96,10 +95,8 @@
 	storeSwapOutFileClose(e);
 	return;
     }
-    debug(20, 7) ("storeSwapOut: mem->inmem_lo = %d\n",
-	(int) mem->inmem_lo);
-    debug(20, 7) ("storeSwapOut: mem->inmem_hi = %d\n",
-	(int) mem->inmem_hi);
+    debug(20, 7) ("storeSwapOut: mem->inmem_lo = %d\n", (int) mem->inmem_lo);
+    debug(20, 7) ("storeSwapOut: mem->inmem_hi = %d\n", (int) mem->inmem_hi);
     debug(20, 7) ("storeSwapOut: swapout.queue_offset = %d\n",
 	(int) mem->swapout.queue_offset);
     if (mem->swapout.sio)
@@ -107,8 +104,7 @@
 	    (int) storeOffset(mem->swapout.sio));
     assert(mem->inmem_hi >= mem->swapout.queue_offset);
     lowest_offset = storeLowestMemReaderOffset(e);
-    debug(20, 7) ("storeSwapOut: lowest_offset = %d\n",
-	(int) lowest_offset);
+    debug(20, 7) ("storeSwapOut: lowest_offset = %d\n", (int) lowest_offset);
     new_mem_lo = lowest_offset;
     assert(new_mem_lo >= mem->inmem_lo);
     if (storeSwapOutAble(e)) {
@@ -135,8 +131,7 @@
     if (!storeSwapOutAble(e))
 	return;
     swapout_size = (size_t) (mem->inmem_hi - mem->swapout.queue_offset);
-    debug(20, 7) ("storeSwapOut: swapout_size = %d\n",
-	(int) swapout_size);
+    debug(20, 7) ("storeSwapOut: swapout_size = %d\n", (int) swapout_size);
     if (swapout_size == 0) {
 	if (e->store_status == STORE_OK)
 	    storeSwapOutFileClose(e);
@@ -170,11 +165,10 @@
 	    swapout_size = DISK_PAGE_SIZE;
 	swap_buf = memAllocate(MEM_DISK_BUF);
 	swap_buf_len = stmemCopy(&mem->data_hdr,
-	    mem->swapout.queue_offset,
-	    swap_buf,
-	    swapout_size);
+	    mem->swapout.queue_offset, swap_buf, swapout_size);
 	if (swap_buf_len < 0) {
-	    debug(20, 1) ("stmemCopy returned %d for '%s'\n", swap_buf_len, storeKeyText(e->key));
+	    debug(20, 1) ("stmemCopy returned %d for '%s'\n", swap_buf_len,
+		storeKeyText(e->key));
 	    storeUnlink(e->swap_file_number);
 	    storeDirMapBitReset(e->swap_file_number);
 	    e->swap_file_number = -1;
@@ -233,7 +227,8 @@
     assert(e->swap_status == SWAPOUT_WRITING);
     cbdataFree(c);
     if (errflag) {
-	debug(20, 3) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
+	debug(20,
+	    3) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
 	    e->swap_file_number, errflag, xstrerror());
 	/*
 	 * yuck.  don't clear the filemap bit for some errors so that
@@ -251,7 +246,8 @@
 	e->swap_status = SWAPOUT_NONE;
     } else {
 	/* swapping complete */
-	debug(20, 3) ("storeSwapOutFileClosed: SwapOut complete: '%s' to %08X\n",
+	debug(20,
+	    3) ("storeSwapOutFileClosed: SwapOut complete: '%s' to %08X\n",
 	    storeUrl(e), e->swap_file_number);
 	e->swap_file_sz = objectLen(e) + mem->swap_hdr_sz;
 	e->swap_status = SWAPOUT_DONE;
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/structs.h,v
retrieving revision 1.1.1.3.4.2.2.3
retrieving revision 1.1.1.3.4.2.2.3.2.1
diff -u -r1.1.1.3.4.2.2.3 -r1.1.1.3.4.2.2.3.2.1
--- squid/src/structs.h	14 Jun 2001 20:36:16 -0000	1.1.1.3.4.2.2.3
+++ squid/src/structs.h	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.2.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: structs.h,v 1.1.1.3.4.2.2.3 2001/06/14 20:36:16 serassio Exp $
+ * $Id: structs.h,v 1.1.1.3.4.2.2.3.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -31,43 +30,50 @@
  *
  */
 
-struct _dlink_node {
+struct _dlink_node
+{
     void *data;
     dlink_node *prev;
     dlink_node *next;
 };
 
-struct _dlink_list {
+struct _dlink_list
+{
     dlink_node *head;
     dlink_node *tail;
 };
 
-struct _acl_ip_data {
+struct _acl_ip_data
+{
     struct in_addr addr1;	/* if addr2 non-zero then its a range */
     struct in_addr addr2;
     struct in_addr mask;
     acl_ip_data *next;		/* used for parsing, not for storing */
 };
 
-struct _acl_snmp_comm {
+struct _acl_snmp_comm
+{
     char *name;
     void *community;
     acl_snmp_comm *next;
 };
 
-struct _acl_time_data {
+struct _acl_time_data
+{
     int weekbits;
     int start;
     int stop;
     acl_time_data *next;
 };
 
-struct _acl_name_list {
+struct _acl_name_list
+{
     char name[ACL_NAME_SZ];
     acl_name_list *next;
 };
 
-struct _acl_proxy_auth_user {
+struct _acl_proxy_auth_user
+{
     /* first two items must be same as hash_link */
     char *user;
     acl_proxy_auth_user *next;
@@ -79,7 +85,8 @@
     time_t ip_expiretime;
 };
 
-struct _acl_deny_info_list {
+struct _acl_deny_info_list
+{
     int err_page_id;
     char *err_page_name;
     acl_name_list *acl_list;
@@ -88,13 +95,15 @@
 
 #if USE_ARP_ACL
 
-struct _acl_arp_data {
+struct _acl_arp_data
+{
     char eth[6];
 };
 
 #endif
 
-struct _String {
+struct _String
+{
     /* never reference these directly! */
     unsigned short int size;	/* buffer size; 64K limit */
     unsigned short int len;	/* current length  */
@@ -103,7 +112,8 @@
 
 #if SQUID_SNMP
 
-struct _snmp_request_t {
+struct _snmp_request_t
+{
     u_char *buf;
     u_char *outbuf;
     int len;
@@ -118,7 +128,8 @@
 
 #endif
 
-struct _acl {
+struct _acl
+{
     char name[ACL_NAME_SZ];
     squid_acl type;
     void *data;
@@ -126,20 +137,23 @@
     acl *next;
 };
 
-struct _acl_list {
+struct _acl_list
+{
     int op;
     acl *acl;
     acl_list *next;
 };
 
-struct _acl_access {
+struct _acl_access
+{
     int allow;
     acl_list *acl_list;
     char *cfgline;
     acl_access *next;
 };
 
-struct _aclCheck_t {
+struct _aclCheck_t
+{
     const acl_access *access_list;
     struct in_addr src_addr;
     struct in_addr dst_addr;
@@ -159,45 +173,53 @@
     void *callback_data;
 };
 
-struct _aio_result_t {
+struct _aio_result_t
+{
     int aio_return;
     int aio_errno;
 };
 
-struct _wordlist {
+struct _wordlist
+{
     char *key;
     wordlist *next;
 };
 
-struct _intlist {
+struct _intlist
+{
     int i;
     intlist *next;
 };
 
-struct _intrange {
+struct _intrange
+{
     int i;
     int j;
     intrange *next;
 };
 
-struct _ushortlist {
+struct _ushortlist
+{
     u_short i;
     ushortlist *next;
 };
 
-struct _relist {
+struct _relist
+{
     char *pattern;
     regex_t regex;
     relist *next;
 };
 
-struct _sockaddr_in_list {
+struct _sockaddr_in_list
+{
     struct sockaddr_in s;
     sockaddr_in_list *next;
 };
 
 #if DELAY_POOLS
-struct _delaySpec {
+struct _delaySpec
+{
     int restore_bps;
     int max_bytes;
 };
@@ -205,13 +227,15 @@
 /* malloc()'d only as far as used (class * sizeof(delaySpec)!
  * order of elements very important!
  */
-struct _delaySpecSet {
+struct _delaySpecSet
+{
     delaySpec aggregate;
     delaySpec individual;
     delaySpec network;
 };
 
-struct _delayConfig {
+struct _delayConfig
+{
     unsigned short pools;
     unsigned short initial;
     unsigned char *class;
@@ -221,23 +245,30 @@
 
 #endif
 
-struct _SquidConfig {
-    struct {
+struct _SquidConfig
+{
+    struct
+    {
 	size_t maxSize;
 	int highWaterMark;
 	int lowWaterMark;
-    } Swap;
+    }
+    Swap;
     size_t memMaxSize;
-    struct {
+    struct
+    {
 	char *relayHost;
 	u_short relayPort;
 	peer *peer;
-    } Wais;
-    struct {
+    }
+    Wais;
+    struct
+    {
 	size_t min;
 	int pct;
 	size_t max;
-    } quickAbort;
+    }
+    quickAbort;
 #if HEAP_REPLACEMENT
     char *replPolicy;
 #else
@@ -251,7 +282,8 @@
     time_t negativeDnsTtl;
     time_t positiveDnsTtl;
     time_t shutdownLifetime;
-    struct {
+    struct
+    {
 	time_t read;
 	time_t lifetime;
 	time_t connect;
@@ -266,11 +298,13 @@
 #if USE_IDENT
 	time_t ident;
 #endif
-    } Timeout;
+    }
+    Timeout;
     size_t maxRequestHeaderSize;
     size_t maxRequestBodySize;
     size_t maxReplyBodySize;
-    struct {
+    struct
+    {
 	u_short icp;
 #if USE_HTCP
 	u_short htcp;
@@ -278,37 +312,47 @@
 #if SQUID_SNMP
 	u_short snmp;
 #endif
-    } Port;
-    struct {
+    }
+    Port;
+    struct
+    {
 	sockaddr_in_list *http;
-    } Sockaddr;
+    }
+    Sockaddr;
 #if SQUID_SNMP
-    struct {
+    struct
+    {
 	char *configFile;
 	char *agentInfo;
-    } Snmp;
+    }
+    Snmp;
 #endif
 #if USE_WCCP
-    struct {
+    struct
+    {
 	struct in_addr router;
 	struct in_addr incoming;
 	struct in_addr outgoing;
 	int version;
-    } Wccp;
+    }
+    Wccp;
 #endif
     char *as_whois_server;
-    struct {
+    struct
+    {
 	char *log;
 	char *access;
 	char *store;
 	char *swap;
 	char *useragent;
 	int rotateNumber;
-    } Log;
+    }
+    Log;
     char *adminEmail;
     char *effectiveUser;
     char *effectiveGroup;
-    struct {
+    struct
+    {
 #if USE_DNSSERVERS
 	char *dnsserver;
 #endif
@@ -316,7 +360,8 @@
 	wordlist *authenticate;
 	char *pinger;
 	char *unlinkd;
-    } Program;
+    }
+    Program;
 #if USE_DNSSERVERS
     int dnsChildren;
 #endif
@@ -324,10 +369,12 @@
     int authenticateChildren;
     int authenticateTTL;
     int authenticateIpTTL;
-    struct {
+    struct
+    {
 	char *host;
 	u_short port;
-    } Accel;
+    }
+    Accel;
     char *appendDomain;
     size_t appendDomainLen;
     char *debugOptions;
@@ -337,13 +384,16 @@
     char *uniqueHostname;
     wordlist *hostnameAliases;
     char *errHtmlText;
-    struct {
+    struct
+    {
 	char *host;
 	char *file;
 	time_t period;
 	u_short port;
-    } Announce;
-    struct {
+    }
+    Announce;
+    struct
+    {
 	struct in_addr tcp_outgoing;
 	struct in_addr udp_incoming;
 	struct in_addr udp_outgoing;
@@ -352,7 +402,8 @@
 	struct in_addr snmp_outgoing;
 #endif
 	struct in_addr client_netmask;
-    } Addrs;
+    }
+    Addrs;
     size_t tcpRcvBufsz;
     size_t udpMaxHitObjsz;
     wordlist *hierarchy_stoplist;
@@ -361,28 +412,37 @@
     wordlist *dns_nameservers;
     peer *peers;
     int npeers;
-    struct {
+    struct
+    {
 	int size;
 	int low;
 	int high;
-    } ipcache;
-    struct {
+    }
+    ipcache;
+    struct
+    {
 	int size;
-    } fqdncache;
+    }
+    fqdncache;
     int minDirectHops;
     cachemgr_passwd *passwd_list;
-    struct {
+    struct
+    {
 	int objectsPerBucket;
 	size_t avgObjectSize;
 	size_t maxObjectSize;
 	size_t minObjectSize;
-    } Store;
-    struct {
+    }
+    Store;
+    struct
+    {
 	int high;
 	int low;
 	time_t period;
-    } Netdb;
-    struct {
+    }
+    Netdb;
+    struct
+    {
 	int log_udp;
 #if USE_DNSSERVERS
 	int res_defnames;
@@ -417,10 +477,13 @@
 #if USE_CACHE_DIGESTS
 	int digest_generation;
 #endif
+	int log_redirected_url;
 	int ie_refresh;
-    } onoff;
+    }
+    onoff;
     acl *aclList;
-    struct {
+    struct
+    {
 	acl_access *http;
 	acl_access *icp;
 	acl_access *miss;
@@ -436,88 +499,112 @@
 	acl_access *identLookup;
 #endif
 	acl_access *redirector;
-    } accessList;
+    }
+    accessList;
     acl_deny_info_list *denyInfoList;
     char *proxyAuthRealm;
-    struct {
+    struct
+    {
 	size_t list_width;
 	int list_wrap;
 	char *anon_user;
 	int passive;
-    } Ftp;
+    }
+    Ftp;
     refresh_t *Refresh;
-    struct _cacheSwap {
+    struct _cacheSwap
+    {
 	SwapDir *swapDirs;
 	int n_allocated;
 	int n_configured;
-    } cacheSwap;
+    }
+    cacheSwap;
     char *fake_ua;
-    struct {
+    struct
+    {
 	char *directory;
-    } icons;
+    }
+    icons;
     char *errorDirectory;
-    struct {
+    struct
+    {
 	time_t timeout;
 	int maxtries;
-    } retry;
-    struct {
+    }
+    retry;
+    struct
+    {
 	size_t limit;
-    } MemPools;
+    }
+    MemPools;
 #if DELAY_POOLS
     delayConfig Delay;
 #endif
-    struct {
+    struct
+    {
 	int icp_average;
 	int dns_average;
 	int http_average;
 	int icp_min_poll;
 	int dns_min_poll;
 	int http_min_poll;
-    } comm_incoming;
+    }
+    comm_incoming;
     int max_open_disk_fds;
     int uri_whitespace;
     size_t rangeOffsetLimit;
 #if MULTICAST_MISS_STREAM
-    struct {
+    struct
+    {
 	struct in_addr addr;
 	int ttl;
 	unsigned short port;
 	char *encode_key;
-    } mcast_miss;
+    }
+    mcast_miss;
 #endif
     HttpHeaderMask anonymize_headers;
     char *coredump_dir;
     char *chroot_dir;
 #if USE_CACHE_DIGESTS
-    struct {
+    struct
+    {
 	int bits_per_entry;
 	time_t rebuild_period;
 	time_t rewrite_period;
 	size_t swapout_chunk_size;
 	int rebuild_chunk_percentage;
-    } digest;
+    }
+    digest;
 #endif
 };
 
-struct _SquidConfig2 {
-    struct {
+struct _SquidConfig2
+{
+    struct
+    {
 	char *prefix;
 	int on;
-    } Accel;
-    struct {
+    }
+    Accel;
+    struct
+    {
 	int enable_purge;
-    } onoff;
+    }
+    onoff;
     uid_t effectiveUserID;
     gid_t effectiveGroupID;
 };
 
-struct _close_handler {
+struct _close_handler
+{
     PF *handler;
     void *data;
     close_handler *next;
 };
 
-struct _dread_ctrl {
+struct _dread_ctrl
+{
     int fd;
     off_t offset;
     int req_len;
@@ -527,7 +614,8 @@
     void *client_data;
 };
 
-struct _dnsserver_t {
+struct _dnsserver_t
+{
     int id;
     int inpipe;
     int outpipe;
@@ -539,13 +627,15 @@
     void *data;
 };
 
-struct _dnsStatData {
+struct _dnsStatData
+{
     int requests;
     int replies;
     int hist[DefaultDnsChildrenMax];
 };
 
-struct _dwrite_q {
+struct _dwrite_q
+{
     off_t file_offset;
     char *buf;
     int len;
@@ -559,18 +649,21 @@
  * this struct is likely to change
  * Note: "str" points to memory in HttpHeaderEntry (for now)
  *       so ETags should be used as tmp variables only (for now) */
-struct _ETag {
+struct _ETag
+{
     const char *str;		/* quoted-string */
     int weak;			/* true if it is a weak validator */
 };
 #ifdef _SQUID_MSWIN_
-struct _sde {
+struct _sde
+{
     unsigned int type;
     u_short local_port;
     u_short remote_port;
     char ipaddr[16];		/* dotted decimal address of peer */
     char desc[FD_DESC_SZ];
-    struct {
+    struct
+    {
 	unsigned int open:1;
 	unsigned int close_request:1;
 	unsigned int write_daemon:1;
@@ -583,7 +676,8 @@
 #ifdef OPTIMISTIC_IO
 	unsigned int calling_io_handler:1;
 #endif
-    } flags;
+    }
+    flags;
     int bytes_read;
     int bytes_written;
     int uses;			/* ie # req's over persistent conn */
@@ -601,31 +695,34 @@
     CommWriteStateData *rwstate;	/* State data for comm_write */
 };
 
-struct statfs {
-   long    f_type;     /* type of filesystem (see below) */
-   long    f_bsize;    /* optimal transfer block size */
-   long    f_blocks;   /* total data blocks in file system */
-   long    f_bfree;    /* free blocks in fs */
-   long    f_bavail;   /* free blocks avail to non-superuser */
-   long    f_files;    /* total file nodes in file system */
-   long    f_ffree;    /* free file nodes in fs */
-   long    f_fsid;     /* file system id */
-   long    f_namelen;  /* maximum length of filenames */
-   long    f_spare[6]; /* spare for later */
+struct statfs
+{
+    long f_type;		/* type of filesystem (see below) */
+    long f_bsize;		/* optimal transfer block size */
+    long f_blocks;		/* total data blocks in file system */
+    long f_bfree;		/* free blocks in fs */
+    long f_bavail;		/* free blocks avail to non-superuser */
+    long f_files;		/* total file nodes in file system */
+    long f_ffree;		/* free file nodes in fs */
+    long f_fsid;		/* file system id */
+    long f_namelen;		/* maximum length of filenames */
+    long f_spare[6];		/* spare for later */
 };
 #endif
 
 
-struct _fde {
+struct _fde
+{
     unsigned int type;
     u_short local_port;
     u_short remote_port;
 #ifdef _SQUID_MSWIN_
-	FILE * fbuf;
+    FILE *fbuf;
 #endif
     char ipaddr[16];		/* dotted decimal address of peer */
     char desc[FD_DESC_SZ];
-    struct {
+    struct
+    {
 	unsigned int open:1;
 	unsigned int close_request:1;
 	unsigned int write_daemon:1;
@@ -635,17 +732,20 @@
 	unsigned int nonblocking:1;
 	unsigned int ipc:1;
 	unsigned int called_connect:1;
-    } flags;
+    }
+    flags;
     int bytes_read;
     int bytes_written;
     int uses;			/* ie # req's over persistent conn */
-    struct _fde_disk {
+    struct _fde_disk
+    {
 	DWCB *wrt_handle;
 	void *wrt_handle_data;
 	dwrite_q *write_q;
 	dwrite_q *write_q_tail;
 	off_t offset;
-    } disk;
+    }
+    disk;
     PF *read_handler;
     void *read_data;
     PF *write_handler;
@@ -660,7 +760,8 @@
     CommWriteStateData *rwstate;	/* State data for comm_write */
 };
 
-struct _fileMap {
+struct _fileMap
+{
     int max_n_files;
     int n_files_in_map;
     int toggle;
@@ -670,7 +771,8 @@
 
 /* auto-growing memory-resident buffer with printf interface */
 /* note: when updating this struct, update MemBufNULL #define */
-struct _MemBuf {
+struct _MemBuf
+{
     /* public, read-only */
     char *buf;
     mb_size_t size;		/* used space, does not count 0-terminator */
@@ -682,7 +784,8 @@
 };
 
 /* see Packer.c for description */
-struct _Packer {
+struct _Packer
+{
     /* protected, use interface functions instead */
     append_f append;
     vprintf_f vprintf;
@@ -690,7 +793,8 @@
 };
 
 /* http status line */
-struct _HttpStatusLine {
+struct _HttpStatusLine
+{
     /* public, read only */
     float version;
     const char *reason;		/* points to a _constant_ string (default or supplied), never free()d */
@@ -701,26 +805,30 @@
  * Note: HttpBody is used only for messages with a small content that is
  * known a priory (e.g., error messages).
  */
-struct _HttpBody {
+struct _HttpBody
+{
     /* private */
     MemBuf mb;
 };
 
 /* http header extention field */
-struct _HttpHdrExtField {
+struct _HttpHdrExtField
+{
     String name;		/* field-name  from HTTP/1.1 (no column after name) */
     String value;		/* field-value from HTTP/1.1 */
 };
 
 /* http cache control header field */
-struct _HttpHdrCc {
+struct _HttpHdrCc
+{
     int mask;
     int max_age;
     int s_maxage;
 };
 
 /* http byte-range-spec */
-struct _HttpHdrRangeSpec {
+struct _HttpHdrRangeSpec
+{
     ssize_t offset;
     ssize_t length;
 };
@@ -729,25 +837,29 @@
  * This object holds all range specs in order of their appearence
  * in the request because we SHOULD preserve that order.
  */
-struct _HttpHdrRange {
+struct _HttpHdrRange
+{
     Stack specs;
 };
 
 /* http content-range header field */
-struct _HttpHdrContRange {
+struct _HttpHdrContRange
+{
     HttpHdrRangeSpec spec;
     ssize_t elength;		/* entity length, not content length */
 };
 
 /* some fields can hold either time or etag specs (e.g. If-Range) */
-struct _TimeOrTag {
+struct _TimeOrTag
+{
     ETag tag;			/* entity tag */
     time_t time;
     int valid;			/* true if struct is usable */
 };
 
 /* data for iterating thru range specs */
-struct _HttpHdrRangeIter {
+struct _HttpHdrRangeIter
+{
     HttpHdrRangePos pos;
     const HttpHdrRangeSpec *spec;	/* current spec at pos */
     ssize_t debt_size;		/* bytes left to send from the current spec */
@@ -756,14 +868,16 @@
 };
 
 /* constant attributes of http header fields */
-struct _HttpHeaderFieldAttrs {
+struct _HttpHeaderFieldAttrs
+{
     const char *name;
     http_hdr_type id;
     field_type type;
 };
 
 /* per field statistics */
-struct _HttpHeaderFieldStat {
+struct _HttpHeaderFieldStat
+{
     int aliveCount;		/* created but not destroyed (count) */
     int seenCount;		/* #fields we've seen */
     int parsCount;		/* #parsing attempts */
@@ -772,20 +886,23 @@
 };
 
 /* compiled version of HttpHeaderFieldAttrs plus stats */
-struct _HttpHeaderFieldInfo {
+struct _HttpHeaderFieldInfo
+{
     http_hdr_type id;
     String name;
     field_type type;
     HttpHeaderFieldStat stat;
 };
 
-struct _HttpHeaderEntry {
+struct _HttpHeaderEntry
+{
     http_hdr_type id;
     String name;
     String value;
 };
 
-struct _HttpHeader {
+struct _HttpHeader
+{
     /* protected, do not use these, use interface functions instead */
     Array entries;		/* parsed fields in raw format */
     HttpHeaderMask mask;	/* bit set <=> entry present */
@@ -793,7 +910,8 @@
     int len;			/* length when packed, not counting terminating '\0' */
 };
 
-struct _HttpReply {
+struct _HttpReply
+{
     /* unsupported, writable, may disappear/change in the future */
     int hdr_sz;			/* sums _stored_ status-line, headers, and <CRLF> */
 
@@ -816,13 +934,15 @@
     HttpBody body;		/* for small constant memory-resident text bodies only */
 };
 
-struct _http_state_flags {
+struct _http_state_flags
+{
     unsigned int proxying:1;
     unsigned int keepalive:1;
     unsigned int only_if_cached:1;
 };
 
-struct _HttpStateData {
+struct _HttpStateData
+{
     StoreEntry *entry;
     request_t *request;
     char *reply_hdr;
@@ -835,7 +955,8 @@
     FwdState *fwd;
 };
 
-struct _icpUdpData {
+struct _icpUdpData
+{
     struct sockaddr_in address;
     void *msg;
     size_t len;
@@ -847,7 +968,8 @@
     struct timeval queue_time;
 };
 
-struct _ping_data {
+struct _ping_data
+{
     struct timeval start;
     struct timeval stop;
     int n_sent;
@@ -859,7 +981,8 @@
     int p_rtt;
 };
 
-struct _HierarchyLogEntry {
+struct _HierarchyLogEntry
+{
     hier_code code;
     char host[SQUIDHOSTNAMELEN];
     ping_data ping;
@@ -872,43 +995,57 @@
     struct timeval store_complete_stop;
 };
 
-struct _AccessLogEntry {
+struct _AccessLogEntry
+{
     const char *url;
-    struct {
+    struct
+    {
 	method_t method;
 	int code;
 	const char *content_type;
 	float version;
-    } http;
-    struct {
+    }
+    http;
+    struct
+    {
 	icp_opcode opcode;
-    } icp;
-    struct {
+    }
+    icp;
+    struct
+    {
 	struct in_addr caddr;
 	size_t size;
 	log_type code;
 	int msec;
 	const char *ident;
-    } cache;
-    struct {
+    }
+    cache;
+    struct
+    {
 	char *request;
 	char *reply;
-    } headers;
-    struct {
+    }
+    headers;
+    struct
+    {
 	const char *method_str;
-    } private;
+    }
+    private;
     HierarchyLogEntry hier;
 };
 
-struct _clientHttpRequest {
+struct _clientHttpRequest
+{
     ConnStateData *conn;
     request_t *request;		/* Parsed URL ... */
     char *uri;
     char *log_uri;
-    struct {
+    struct
+    {
 	off_t offset;
 	size_t size;
-    } out;
+    }
+    out;
     HttpHdrRangeIter range_iter;	/* data for iterating thru range specs */
     size_t req_sz;		/* raw request size on input, not current request size */
     StoreEntry *entry;
@@ -924,25 +1061,32 @@
     aclCheck_t *acl_checklist;	/* need ptr back so we can unreg if needed */
     clientHttpRequest *next;
     AccessLogEntry al;
-    struct {
+    struct
+    {
 	unsigned int accel:1;
 	unsigned int internal:1;
 	unsigned int done_copying:1;
-    } flags;
-    struct {
+    }
+    flags;
+    struct
+    {
 	http_status status;
 	char *location;
-    } redirect;
+    }
+    redirect;
     dlink_node active;
 };
 
-struct _ConnStateData {
+struct _ConnStateData
+{
     int fd;
-    struct {
+    struct
+    {
 	char *buf;
 	off_t offset;
 	size_t size;
-    } in;
+    }
+    in;
     clientHttpRequest *chr;
     struct sockaddr_in peer;
     struct sockaddr_in me;
@@ -950,13 +1094,16 @@
     char ident[USER_IDENT_SZ];
     int nrequests;
     int persistent;
-    struct {
+    struct
+    {
 	int n;
 	time_t until;
-    } defer;
+    }
+    defer;
 };
 
-struct _ipcache_addrs {
+struct _ipcache_addrs
+{
     struct in_addr *in_addrs;
     unsigned char *bad_mask;
     unsigned char count;
@@ -964,13 +1111,15 @@
     unsigned char badcount;
 };
 
-struct _ip_pending {
+struct _ip_pending
+{
     IPH *handler;
     void *handlerData;
     ip_pending *next;
 };
 
-struct _ipcache_entry {
+struct _ipcache_entry
+{
     /* first two items must be equivalent to hash_link */
     char *name;
     ipcache_entry *next;
@@ -985,13 +1134,15 @@
     ipcache_status_t status:3;
 };
 
-struct _fqdn_pending {
+struct _fqdn_pending
+{
     FQDNH *handler;
     void *handlerData;
     fqdn_pending *next;
 };
 
-struct _fqdncache_entry {
+struct _fqdncache_entry
+{
     /* first two items must be equivalent to hash_link */
     char *name;
     fqdncache_entry *next;
@@ -1007,26 +1158,30 @@
     fqdncache_status_t status:3;
 };
 
-struct _domain_ping {
+struct _domain_ping
+{
     char *domain;
     int do_ping;		/* boolean */
     domain_ping *next;
 };
 
-struct _domain_type {
+struct _domain_type
+{
     char *domain;
     peer_t type;
     domain_type *next;
 };
 
 #if USE_CACHE_DIGESTS
-struct _Version {
+struct _Version
+{
     short int current;		/* current version */
     short int required;		/* minimal version that can safely handle current version */
 };
 
 /* digest control block; used for transmission and storage */
-struct _StoreDigestCBlock {
+struct _StoreDigestCBlock
+{
     Version ver;
     int capacity;
     int count;
@@ -1038,7 +1193,8 @@
     int reserved[32 - 6];
 };
 
-struct _DigestFetchState {
+struct _DigestFetchState
+{
     PeerDigest *pd;
     StoreEntry *entry;
     StoreEntry *old_entry;
@@ -1048,14 +1204,17 @@
     time_t start_time;
     time_t resp_time;
     time_t expires;
-    struct {
+    struct
+    {
 	int msg;
 	int bytes;
-    } sent, recv;
+    }
+    sent  , recv;
 };
 
 /* statistics for cache digests and other hit "predictors" */
-struct _cd_guess_stats {
+struct _cd_guess_stats
+{
     /* public, read-only */
     int true_hits;
     int false_hits;
@@ -1064,17 +1223,21 @@
     int close_hits;		/* tmp, remove it later */
 };
 
-struct _PeerDigest {
+struct _PeerDigest
+{
     peer *peer;			/* pointer back to peer structure, argh */
     CacheDigest *cd;		/* actual digest structure */
     String host;		/* copy of peer->host */
     const char *req_result;	/* text status of the last request */
-    struct {
+    struct
+    {
 	unsigned int needed:1;	/* there were requests for this digest */
 	unsigned int usable:1;	/* can be used for lookups */
 	unsigned int requested:1;	/* in process of receiving [fresh] digest */
-    } flags;
-    struct {
+    }
+    flags;
+    struct
+    {
 	/* all times are absolute unless augmented with _delay */
 	time_t initialized;	/* creation */
 	time_t needed;		/* first lookup/use by a peer */
@@ -1084,24 +1247,31 @@
 	time_t req_delay;	/* last request response time */
 	time_t received;	/* received the current copy of a digest */
 	time_t disabled;	/* disabled for good */
-    } times;
-    struct {
+    }
+    times;
+    struct
+    {
 	cd_guess_stats guess;
 	int used_count;
-	struct {
+	struct
+	{
 	    int msgs;
 	    kb_t kbytes;
-	} sent, recv;
-    } stats;
+	}
+	sent  , recv;
+    }
+    stats;
 };
 
 #endif
 
-struct _peer {
+struct _peer
+{
     char *host;
     peer_t type;
     struct sockaddr_in in_addr;
-    struct {
+    struct
+    {
 	int pings_sent;
 	int pings_acked;
 	int fetches;
@@ -1112,24 +1282,30 @@
 	time_t last_query;
 	time_t last_reply;
 	int logged_state;	/* so we can print dead/revived msgs */
-    } stats;
-    struct {
+    }
+    stats;
+    struct
+    {
 	int version;
 	int counts[ICP_END];
 	u_short port;
-    } icp;
+    }
+    icp;
 #if USE_HTCP
-    struct {
+    struct
+    {
 	double version;
 	int counts[2];
 	u_short port;
-    } htcp;
+    }
+    htcp;
 #endif
     u_short http_port;
     domain_ping *peer_domain;
     domain_type *typelist;
     acl_access *access;
-    struct {
+    struct
+    {
 	unsigned int proxy_only:1;
 	unsigned int no_query:1;
 	unsigned int no_digest:1;
@@ -1144,19 +1320,24 @@
 #if DELAY_POOLS
 	unsigned int no_delay:1;
 #endif
-    } options;
+    }
+    options;
     int weight;
-    struct {
+    struct
+    {
 	double avg_n_members;
 	int n_times_counted;
 	int n_replies_expected;
 	int ttl;
 	int id;
-	struct {
+	struct
+	{
 	    unsigned int count_event_pending:1;
 	    unsigned int counting:1;
-	} flags;
-    } mcast;
+	}
+	flags;
+    }
+    mcast;
 #if USE_CACHE_DIGESTS
     PeerDigest *digest;
     char *digest_url;
@@ -1169,31 +1350,36 @@
     peer *next;
     int test_fd;
 #if USE_CARP
-    struct {
+    struct
+    {
 	unsigned long hash;
 	unsigned long load_multiplier;
 	float load_factor;
-    } carp;
+    }
+    carp;
 #endif
     char *login;		/* Proxy authorization */
     time_t connect_timeout;
 };
 
-struct _net_db_name {
+struct _net_db_name
+{
     char *name;
     net_db_name *htbl_next;
     net_db_name *next;
     netdbEntry *net_db_entry;
 };
 
-struct _net_db_peer {
+struct _net_db_peer
+{
     char *peername;
     double hops;
     double rtt;
     time_t expires;
 };
 
-struct _netdbEntry {
+struct _netdbEntry
+{
     /* first two items must be equivalent to hash_link */
     char *key;
     netdbEntry *next;
@@ -1211,7 +1397,8 @@
     int n_peers;
 };
 
-struct _ps_state {
+struct _ps_state
+{
     request_t *request;
     StoreEntry *entry;
     int always_direct;
@@ -1242,14 +1429,16 @@
     aclCheck_t *acl_checklist;
 };
 
-struct _pingerEchoData {
+struct _pingerEchoData
+{
     struct in_addr to;
     unsigned char opcode;
     int psize;
     char payload[PINGER_PAYLOAD_SZ];
 };
 
-struct _pingerReplyData {
+struct _pingerReplyData
+{
     struct in_addr from;
     unsigned char opcode;
     int rtt;
@@ -1258,7 +1447,8 @@
     char payload[PINGER_PAYLOAD_SZ];
 };
 
-struct _icp_common_t {
+struct _icp_common_t
+{
     unsigned char opcode;	/* opcode */
     unsigned char version;	/* version number */
     unsigned short length;	/* total length (bytes) */
@@ -1268,30 +1458,36 @@
     u_num32 shostid;		/* sender host id */
 };
 
-struct _iostats {
-    struct {
+struct _iostats
+{
+    struct
+    {
 	int reads;
 	int reads_deferred;
 	int read_hist[16];
 	int writes;
 	int write_hist[16];
-    } Http, Ftp, Gopher, Wais;
+    }
+    Http  , Ftp, Gopher, Wais;
 };
 
-struct _mem_node {
+struct _mem_node
+{
     char *data;
     int len;
     mem_node *next;
 };
 
-struct _mem_hdr {
+struct _mem_hdr
+{
     mem_node *head;
     mem_node *tail;
     int origin_offset;
 };
 
 /* keep track each client receiving data from that particular StoreEntry */
-struct _store_client {
+struct _store_client
+{
     int type;
     off_t copy_offset;
     off_t seen_offset;
@@ -1301,11 +1497,13 @@
     void *callback_data;
     StoreEntry *entry;		/* ptr to the parent StoreEntry, argh! */
     storeIOState *swapin_sio;
-    struct {
+    struct
+    {
 	unsigned int disk_io_pending:1;
 	unsigned int store_copying:1;
 	unsigned int copy_event_pending:1;
-    } flags;
+    }
+    flags;
     store_client *next;
 #if DELAY_POOLS
     delay_id delay_id;
@@ -1314,7 +1512,8 @@
 
 
 /* This structure can be freed while object is purged out from memory */
-struct _MemObject {
+struct _MemObject
+{
     method_t method;
     char *url;
     mem_hdr data_hdr;
@@ -1322,20 +1521,24 @@
     off_t inmem_lo;
     store_client *clients;
     int nclients;
-    struct {
+    struct
+    {
 	off_t queue_offset;	/* relative to in-mem data */
 	storeIOState *sio;
-    } swapout;
+    }
+    swapout;
     HttpReply *reply;
     request_t *request;
     struct timeval start_ping;
     IRCB *ping_reply_callback;
     void *ircb_data;
     int fd;			/* FD of client creating this entry */
-    struct {
+    struct
+    {
 	STABH *callback;
 	void *data;
-    } abort;
+    }
+    abort;
     char *log_url;
 #if HEAP_REPLACEMENT
     /* 
@@ -1350,7 +1553,8 @@
     size_t swap_hdr_sz;
 };
 
-struct _StoreEntry {
+struct _StoreEntry
+{
     /* first two items must be same as hash_link */
     const cache_key *key;
     StoreEntry *next;
@@ -1375,7 +1579,8 @@
     swap_status_t swap_status:3;
 };
 
-struct _SwapDir {
+struct _SwapDir
+{
     swapdir_t type;
     fileMap *map;
     int cur_size;
@@ -1383,42 +1588,57 @@
     char *path;
     int index;			/* This entry's index into the swapDirs array */
     int suggest;
-    struct {
+    struct
+    {
 	unsigned int selected:1;
 	unsigned int read_only:1;
-    } flags;
+    }
+    flags;
     STINIT *init;
     STNEWFS *newfs;
-    struct {
+    struct
+    {
 	STOBJOPEN *open;
 	STOBJCLOSE *close;
 	STOBJREAD *read;
 	STOBJWRITE *write;
 	STOBJUNLINK *unlink;
-    } obj;
-    struct {
+    }
+    obj;
+    struct
+    {
 	STLOGOPEN *open;
 	STLOGCLOSE *close;
 	STLOGWRITE *write;
-	struct {
+	struct
+	{
 	    STLOGCLEANOPEN *open;
 	    STLOGCLEANWRITE *write;
 	    void *state;
-	} clean;
-    } log;
-    struct {
+	}
+	clean;
+    }
+    log;
+    struct
+    {
 	int blksize;
-    } fs;
-    union {
-	struct {
+    }
+    fs;
+    union
+    {
+	struct
+	{
 	    int l1;
 	    int l2;
 	    int swaplog_fd;
-	} ufs;
-    } u;
+	}
+	ufs;
+    }
+    u;
 };
 
-struct _request_flags {
+struct _request_flags
+{
     unsigned int range:1;
     unsigned int nocache:1;
     unsigned int ims:1;
@@ -1439,50 +1659,67 @@
     unsigned int internal:1;
 };
 
-struct _link_list {
+struct _link_list
+{
     void *ptr;
     struct _link_list *next;
 };
 
-struct _storeIOState {
+struct _storeIOState
+{
     sfileno swap_file_number;
     mode_t mode;
     size_t st_size;		/* do stat(2) after read open */
     off_t offset;		/* current offset pointer */
     STIOCB *callback;
     void *callback_data;
-    struct {
+    struct
+    {
 	STRCB *callback;
 	void *callback_data;
-    } read;
-    struct {
+    }
+    read;
+    struct
+    {
 	unsigned int closing:1;	/* debugging aid */
-    } flags;
-    union {
-	struct {
+    }
+    flags;
+    union
+    {
+	struct
+	{
 	    int fd;
-	    struct {
+	    struct
+	    {
 		unsigned int close_request:1;
 		unsigned int reading:1;
 		unsigned int writing:1;
-	    } flags;
-	} ufs;
-	struct {
+	    }
+	    flags;
+	}
+	ufs;
+	struct
+	{
 	    int fd;
-	    struct {
+	    struct
+	    {
 		unsigned int close_request:1;
 		unsigned int reading:1;
 		unsigned int writing:1;
 		unsigned int opening:1;
-	    } flags;
+	    }
+	    flags;
 	    const char *read_buf;
 	    link_list *pending_writes;
 	    link_list *pending_reads;
-	} aufs;
-    } type;
+	}
+	aufs;
+    }
+    type;
 };
 
-struct _request_t {
+struct _request_t
+{
     method_t method;
     protocol_t protocol;
     char login[MAX_LOGIN_SZ];
@@ -1513,20 +1750,23 @@
     time_t lastmod;		/* Used on refreshes */
 };
 
-struct _cachemgr_passwd {
+struct _cachemgr_passwd
+{
     char *passwd;
     wordlist *actions;
     cachemgr_passwd *next;
 };
 
-struct _refresh_t {
+struct _refresh_t
+{
     char *pattern;
     regex_t compiled_pattern;
     time_t min;
     double pct;
     time_t max;
     refresh_t *next;
-    struct {
+    struct
+    {
 	unsigned int icase:1;
 #if HTTP_VIOLATIONS
 	unsigned int override_expire:1;
@@ -1534,10 +1774,12 @@
 	unsigned int reload_into_ims:1;
 	unsigned int ignore_reload:1;
 #endif
-    } flags;
+    }
+    flags;
 };
 
-struct _CommWriteStateData {
+struct _CommWriteStateData
+{
     char *buf;
     size_t size;
     off_t offset;
@@ -1546,7 +1788,8 @@
     FREE *free_func;
 };
 
-struct _ErrorState {
+struct _ErrorState
+{
     err_type type;
     int page_id;
     http_status http_status;
@@ -1561,14 +1804,18 @@
     char *redirect_url;
     ERCB *callback;
     void *callback_data;
-    struct {
+    struct
+    {
 	unsigned int flag_cbdata:1;
-    } flags;
-    struct {
+    }
+    flags;
+    struct
+    {
 	wordlist *server_msg;
 	char *request;
 	char *reply;
-    } ftp;
+    }
+    ftp;
     char *request_hdrs;
 };
 
@@ -1576,7 +1823,8 @@
  * "very generic" histogram; 
  * see important comments on hbase_f restrictions in StatHist.c
  */
-struct _StatHist {
+struct _StatHist
+{
     int *bins;
     int capacity;
     double min;
@@ -1590,8 +1838,10 @@
  * if you add a field to StatCounters, 
  * you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
  */
-struct _StatCounters {
-    struct {
+struct _StatCounters
+{
+    struct
+    {
 	int clients;
 	int requests;
 	int hits;
@@ -1604,16 +1854,22 @@
 	StatHist nh_svc_time;
 	StatHist hit_svc_time;
 	StatHist all_svc_time;
-    } client_http;
-    struct {
-	struct {
+    }
+    client_http;
+    struct
+    {
+	struct
+	{
 	    int requests;
 	    int errors;
 	    kb_t kbytes_in;
 	    kb_t kbytes_out;
-	} all , http, ftp, other;
-    } server;
-    struct {
+	}
+	all   , http, ftp, other;
+    }
+    server;
+    struct
+    {
 	int pkts_sent;
 	int queries_sent;
 	int replies_sent;
@@ -1634,14 +1890,20 @@
 	StatHist reply_svc_time;
 	int query_timeouts;
 	int times_used;
-    } icp;
-    struct {
+    }
+    icp;
+    struct
+    {
 	int requests;
-    } unlink;
-    struct {
+    }
+    unlink;
+    struct
+    {
 	StatHist svc_time;
-    } dns;
-    struct {
+    }
+    dns;
+    struct
+    {
 	int times_used;
 	kb_t kbytes_sent;
 	kb_t kbytes_recv;
@@ -1652,10 +1914,13 @@
 	cd_guess_stats guess;
 #endif
 	StatHist on_xition_count;
-    } cd;
-    struct {
+    }
+    cd;
+    struct
+    {
 	int times_used;
-    } netdb;
+    }
+    netdb;
     int page_faults;
     int select_loops;
     int select_fds;
@@ -1666,16 +1931,20 @@
     StatHist comm_dns_incoming;
     StatHist comm_http_incoming;
     StatHist select_fds_hist;
-    struct {
-	struct {
+    struct
+    {
+	struct
+	{
 	    int opens;
 	    int closes;
 	    int reads;
 	    int writes;
 	    int seeks;
 	    int unlinks;
-	} disk;
-	struct {
+	}
+	disk;
+	struct
+	{
 	    int accepts;
 	    int sockets;
 	    int connects;
@@ -1685,19 +1954,22 @@
 	    int writes;
 	    int recvfroms;
 	    int sendtos;
-	} sock;
+	}
+	sock;
 #if HAVE_POLL
 	int polls;
 #else
 	int selects;
 #endif
-    } syscalls;
+    }
+    syscalls;
     int swap_files_cleaned;
     int aborted_requests;
 };
 
 /* per header statistics */
-struct _HttpHeaderStat {
+struct _HttpHeaderStat
+{
     const char *label;
     HttpHeaderMask *owner_mask;
 
@@ -1712,14 +1984,16 @@
 };
 
 
-struct _tlv {
+struct _tlv
+{
     char type;
     int length;
     void *value;
     tlv *next;
 };
 
-struct _storeSwapLogData {
+struct _storeSwapLogData
+{
     char op;
     sfileno swap_file_number;
     time_t timestamp;
@@ -1733,14 +2007,16 @@
 };
 
 /* object to track per-action memory usage (e.g. #idle objects) */
-struct _MemMeter {
+struct _MemMeter
+{
     ssize_t level;		/* current level (count or volume) */
     ssize_t hwater_level;	/* high water mark */
     time_t hwater_stamp;	/* timestamp of last high water mark change */
 };
 
 /* object to track per-pool memory usage (alloc = inuse+idle) */
-struct _MemPoolMeter {
+struct _MemPoolMeter
+{
     MemMeter alloc;
     MemMeter inuse;
     MemMeter idle;
@@ -1749,34 +2025,41 @@
 };
 
 /* a pool is a [growing] space for objects of the same size */
-struct _MemPool {
+struct _MemPool
+{
     const char *label;
     size_t obj_size;
     Stack pstack;		/* stack for free pointers */
     MemPoolMeter meter;
 };
 
-struct _ClientInfo {
+struct _ClientInfo
+{
     /* first two items must be equivalent to hash_link */
     char *key;
     ClientInfo *next;
     struct in_addr addr;
-    struct {
+    struct
+    {
 	int result_hist[LOG_TYPE_MAX];
 	int n_requests;
 	kb_t kbytes_in;
 	kb_t kbytes_out;
 	kb_t hit_kbytes_out;
-    } Http, Icp;
-    struct {
+    }
+    Http  , Icp;
+    struct
+    {
 	time_t time;
 	int n_req;
 	int n_denied;
-    } cutoff;
+    }
+    cutoff;
     int n_established;		/* number of current established connections */
 };
 
-struct _CacheDigest {
+struct _CacheDigest
+{
     /* public, read-only */
     char *mask;			/* bit mask */
     size_t mask_size;		/* mask size in bytes */
@@ -1786,13 +2069,15 @@
     int del_count;		/* number of deletions performed so far */
 };
 
-struct _FwdServer {
+struct _FwdServer
+{
     peer *peer;			/* NULL --> origin server */
     hier_code code;
     FwdServer *next;
 };
 
-struct _FwdState {
+struct _FwdState
+{
     int client_fd;
     StoreEntry *entry;
     request_t *request;
@@ -1801,36 +2086,43 @@
     ErrorState *err;
     time_t start;
     int n_tries;
-    struct {
+    struct
+    {
 	unsigned int dont_retry:1;
 	unsigned int ftp_pasv_failed:1;
-    } flags;
+    }
+    flags;
 };
 
 #if USE_HTCP
-struct _htcpReplyData {
+struct _htcpReplyData
+{
     int hit;
     HttpHeader hdr;
     u_num32 msg_id;
     double version;
-    struct {
+    struct
+    {
 	/* cache-to-origin */
 	double rtt;
 	int samp;
 	int hops;
-    } cto;
+    }
+    cto;
 };
 
 #endif
 
 
-struct _helper_request {
+struct _helper_request
+{
     char *buf;
     HLPCB *callback;
     void *data;
 };
 
-struct _helper {
+struct _helper
+{
     wordlist *cmdline;
     dlink_list servers;
     dlink_list queue;
@@ -1839,15 +2131,18 @@
     int n_running;
     int ipc_type;
     time_t last_queue_warn;
-    struct {
+    struct
+    {
 	int requests;
 	int replies;
 	int queue_size;
 	int avg_svc_time;
-    } stats;
+    }
+    stats;
 };
 
-struct _helper_server {
+struct _helper_server
+{
     int index;
     int rfd;
     int wfd;
@@ -1859,26 +2154,36 @@
     dlink_node link;
     helper *parent;
     helper_request *request;
-    struct _helper_flags {
+    struct _helper_flags
+    {
 	unsigned int alive:1;
 	unsigned int busy:1;
 	unsigned int closing:1;
 	unsigned int shutdown:1;
-    } flags;
-    struct {
+    }
+    flags;
+    struct
+    {
 	int uses;
-    } stats;
+    }
+    stats;
+#ifdef _SQUID_MSWIN_
+    HANDLE hIpc;
+    pid_t pid;
+#endif
 };
 
 /*
  * use this when you need to pass callback data to a blocking
  * operation, but you don't want to add that pointer to cbdata
  */
-struct _generic_cbdata {
+struct _generic_cbdata
+{
     void *data;
 };
 
-struct _store_rebuild_data {
+struct _store_rebuild_data
+{
     int objcount;		/* # objects successfully reloaded */
     int expcount;		/* # objects expired */
     int scancount;		/* # entries scanned or read from state file */
Index: squid/src/test-ellipses.pl
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/test-ellipses.pl,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/src/test-ellipses.pl	6 Jan 2001 12:40:17 -0000	1.1.1.1.44.1
+++ squid/src/test-ellipses.pl	27 Aug 2001 21:48:22 -0000	1.1.1.1.44.1.2.1
@@ -1,7 +1,7 @@
 #!/usr/local/bin/perl -w
 use strict;
 
-# $Id: test-ellipses.pl,v 1.1.1.1.44.1 2001/01/06 12:40:17 hno Exp $
+# $Id: test-ellipses.pl,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:22 tolsty Exp $
 
 #
 # Replaces printf-like function calls with printf and compiles with gcc -Wall
Index: squid/src/test_cache_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/test_cache_digest.c,v
retrieving revision 1.1.1.1.4.1.2.1
retrieving revision 1.1.1.1.4.1.2.1.2.1
diff -u -r1.1.1.1.4.1.2.1 -r1.1.1.1.4.1.2.1.2.1
--- squid/src/test_cache_digest.c	6 Jan 2001 12:40:17 -0000	1.1.1.1.4.1.2.1
+++ squid/src/test_cache_digest.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: test_cache_digest.c,v 1.1.1.1.4.1.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: test_cache_digest.c,v 1.1.1.1.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -38,16 +37,19 @@
 
 #include "squid.h"
 #include "hash.h"
-typedef struct {
+typedef struct
+{
     int query_count;
     int true_hit_count;
     int true_miss_count;
     int false_hit_count;
     int false_miss_count;
-} CacheQueryStats;
+}
+CacheQueryStats;
 
 typedef struct _Cache Cache;
-struct _Cache {
+struct _Cache
+{
     const char *name;
     hash_table *hash;
     CacheDigest *digest;
@@ -60,27 +62,34 @@
 };
 
 
-typedef struct _CacheEntry {
+typedef struct _CacheEntry
+{
     const cache_key *key;
     struct _CacheEntry *next;
     unsigned char key_arr[MD5_DIGEST_CHARS];
     /* storeSwapLogData s; */
-} CacheEntry;
+}
+CacheEntry;
 
 /* parsed access log entry */
-typedef struct {
+typedef struct
+{
     cache_key key[MD5_DIGEST_CHARS];
     time_t timestamp;
     short int use_icp;		/* true/false */
-} RawAccessLogEntry;
+}
+RawAccessLogEntry;
 
-typedef enum {
+typedef enum
+{
     frError = -2, frMore = -1, frEof = 0, frOk = 1
-} fr_result;
+}
+fr_result;
 typedef struct _FileIterator FileIterator;
 typedef fr_result(*FI_READER) (FileIterator * fi);
 
-struct _FileIterator {
+struct _FileIterator
+{
     const char *fname;
     FILE *file;
     time_t inner_time;		/* timestamp of the current entry */
@@ -96,8 +105,7 @@
 static time_t cur_time = -1;	/* timestamp of the current log entry */
 
 /* copied from url.c */
-const char *RequestMethodStr[] =
-{
+const char *RequestMethodStr[] = {
     "NONE",
     "GET",
     "POST",
@@ -107,6 +115,7 @@
     "TRACE",
     "PURGE"
 };
+
 /* copied from url.c */
 static method_t
 methodStrToId(const char *s)
@@ -266,7 +275,8 @@
     struct timeval t_start, t_end;
 
     assert(cache);
-    fprintf(stderr, "%s: init-ing digest with %d entries\n", cache->name, cache->count);
+    fprintf(stderr, "%s: init-ing digest with %d entries\n", cache->name,
+	cache->count);
     if (cache->digest)
 	cacheDigestDestroy(cache->digest);
     hash = cache->hash;
@@ -322,22 +332,21 @@
 {
     fprintf(stdout, "%s: peer queries: %d (%d%%)\n",
 	cache->name,
-	stats->query_count, xpercentInt(stats->query_count, cache->req_count)
-	);
+	stats->query_count, xpercentInt(stats->query_count, cache->req_count));
     fprintf(stdout, "%s: t-hit: %d (%d%%) t-miss: %d (%d%%) t-*: %d (%d%%)\n",
 	cache->name,
-	stats->true_hit_count, xpercentInt(stats->true_hit_count, stats->query_count),
-	stats->true_miss_count, xpercentInt(stats->true_miss_count, stats->query_count),
-	stats->true_hit_count + stats->true_miss_count,
-	xpercentInt(stats->true_hit_count + stats->true_miss_count, stats->query_count)
-	);
+	stats->true_hit_count, xpercentInt(stats->true_hit_count,
+stats->query_count), stats->true_miss_count, xpercentInt(stats->true_miss_count,
+	    stats->query_count), stats->true_hit_count + stats->true_miss_count,
+	xpercentInt(stats->true_hit_count + stats->true_miss_count,
+	    stats->query_count));
     fprintf(stdout, "%s: f-hit: %d (%d%%) f-miss: %d (%d%%) f-*: %d (%d%%)\n",
-	cache->name,
-	stats->false_hit_count, xpercentInt(stats->false_hit_count, stats->query_count),
-	stats->false_miss_count, xpercentInt(stats->false_miss_count, stats->query_count),
+	cache->name, stats->false_hit_count, xpercentInt(stats->false_hit_count,
+	    stats->query_count), stats->false_miss_count,
+	xpercentInt(stats->false_miss_count, stats->query_count),
 	stats->false_hit_count + stats->false_miss_count,
-	xpercentInt(stats->false_hit_count + stats->false_miss_count, stats->query_count)
-	);
+	xpercentInt(stats->false_hit_count + stats->false_miss_count,
+	    stats->query_count));
 }
 
 static void
@@ -369,7 +378,8 @@
 	return frEof;
     fi->inner_time = entry->lastref;
     if (entry->op != SWAP_LOG_ADD && entry->op != SWAP_LOG_DEL) {
-	fprintf(stderr, "%s:%d: unknown swap log action\n", fi->fname, fi->line_count);
+	fprintf(stderr, "%s:%d: unknown swap log action\n", fi->fname,
+	    fi->line_count);
 	exit(-3);
     }
     return frOk;
@@ -492,8 +502,7 @@
 static int
 usage(const char *prg_name)
 {
-    fprintf(stderr, "usage: %s <access_log> <swap_state> ...\n",
-	prg_name);
+    fprintf(stderr, "usage: %s <access_log> <swap_state> ...\n", prg_name);
     return -1;
 }
 
Index: squid/src/tools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/tools.c,v
retrieving revision 1.1.1.3.4.1.2.6
retrieving revision 1.1.1.3.4.1.2.6.2.1
diff -u -r1.1.1.3.4.1.2.6 -r1.1.1.3.4.1.2.6.2.1
--- squid/src/tools.c	29 Jul 2001 16:06:05 -0000	1.1.1.3.4.1.2.6
+++ squid/src/tools.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.6.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: tools.c,v 1.1.1.3.4.1.2.6 2001/07/29 16:06:05 serassio Exp $
+ * $Id: tools.c,v 1.1.1.3.4.1.2.6.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -33,14 +32,12 @@
  *
  */
 
+#define TOOLS_C
 #include "squid.h"
 #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
 #include <windows.h>
 #include <psapi.h>
 #include <process.h>
-#ifdef _SQUID_MSWIN_
-#include <sys/timeb.h>
-#endif
 #endif
 
 #define DEAD_MSG "\
@@ -70,24 +67,12 @@
     /* Release the main ports as early as possible */
     for (i = 0; i < NHttpSockets; i++) {
 	if (HttpSockets[i] >= 0)
-#ifdef _SQUID_MSWIN_
-	    closesocket(HttpSockets[i]);
-#else
 	    close(HttpSockets[i]);
-#endif
     }
     if (theInIcpConnection >= 0)
-#ifdef _SQUID_MSWIN_
-	closesocket(theInIcpConnection);
-#else
 	close(theInIcpConnection);
-#endif
     if (theOutIcpConnection >= 0 && theOutIcpConnection != theInIcpConnection)
-#ifdef _SQUID_MSWIN_
-	closesocket(theOutIcpConnection);
-#else
 	close(theOutIcpConnection);
-#endif
 }
 
 static char *
@@ -134,8 +119,7 @@
     fprintf(debug_log, "\ttotal space in arena:  %6d KB\n",
 	(int) (ms.bytes_total >> 10));
     fprintf(debug_log, "\tTotal free:            %6d KB %d%%\n",
-	(int) (ms.bytes_free >> 10),
-	percent(ms.bytes_free, ms.bytes_total));
+	(int) (ms.bytes_free >> 10), percent(ms.bytes_free, ms.bytes_total));
 #elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO
     struct mallinfo mp;
     int t;
@@ -143,18 +127,15 @@
 	return;
     mp = mallinfo();
     fprintf(debug_log, "Memory usage for %s via mallinfo():\n", appname);
-    fprintf(debug_log, "\ttotal space in arena:  %6d KB\n",
-	mp.arena >> 10);
+    fprintf(debug_log, "\ttotal space in arena:  %6d KB\n", mp.arena >> 10);
     fprintf(debug_log, "\tOrdinary blocks:       %6d KB %6d blks\n",
 	mp.uordblks >> 10, mp.ordblks);
     fprintf(debug_log, "\tSmall blocks:          %6d KB %6d blks\n",
 	mp.usmblks >> 10, mp.smblks);
     fprintf(debug_log, "\tHolding blocks:        %6d KB %6d blks\n",
 	mp.hblkhd >> 10, mp.hblks);
-    fprintf(debug_log, "\tFree Small blocks:     %6d KB\n",
-	mp.fsmblks >> 10);
-    fprintf(debug_log, "\tFree Ordinary blocks:  %6d KB\n",
-	mp.fordblks >> 10);
+    fprintf(debug_log, "\tFree Small blocks:     %6d KB\n", mp.fsmblks >> 10);
+    fprintf(debug_log, "\tFree Ordinary blocks:  %6d KB\n", mp.fordblks >> 10);
     t = mp.uordblks + mp.usmblks + mp.hblkhd;
     fprintf(debug_log, "\tTotal in use:          %6d KB %d%%\n",
 	t >> 10, percent(t, mp.arena));
@@ -162,13 +143,12 @@
     fprintf(debug_log, "\tTotal free:            %6d KB %d%%\n",
 	t >> 10, percent(t, mp.arena));
 #if HAVE_EXT_MALLINFO
-    fprintf(debug_log, "\tmax size of small blocks:\t%d\n",
-	mp.mxfast);
+    fprintf(debug_log, "\tmax size of small blocks:\t%d\n", mp.mxfast);
     fprintf(debug_log, "\tnumber of small blocks in a holding block:\t%d\n",
 	mp.nlblks);
-    fprintf(debug_log, "\tsmall block rounding factor:\t%d\n",
-	mp.grain);
-    fprintf(debug_log, "\tspace (including overhead) allocated in ord. blks:\t%d\n",
+    fprintf(debug_log, "\tsmall block rounding factor:\t%d\n", mp.grain);
+    fprintf(debug_log,
+	"\tspace (including overhead) allocated in ord. blks:\t%d\n",
 	mp.uordbytes);
     fprintf(debug_log, "\tnumber of ordinary blocks allocated:\t%d\n",
 	mp.allocated);
@@ -194,35 +174,33 @@
     leave_suid();
 #endif
 #if HAVE_WIN32_PSAPI && (defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_))
-    if ((WIN32_OS_version == _WIN_OS_WINNT) || (WIN32_OS_version == _WIN_OS_WIN2K))
-    {
-    	/* On Windows NT/2000 call PSAPI.DLL for process Memory */
-    	/* informations -- Guido Serassio                       */
-    	HANDLE hProcess;
-    	PROCESS_MEMORY_COUNTERS pmc;
+    if ((WIN32_OS_version == _WIN_OS_WINNT)
+	|| (WIN32_OS_version == _WIN_OS_WIN2K)) {
+	/* On Windows NT/2000 call PSAPI.DLL for process Memory */
+	/* informations -- Guido Serassio                       */
+	HANDLE hProcess;
+	PROCESS_MEMORY_COUNTERS pmc;
 	hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
-	    PROCESS_VM_READ,
-	    FALSE, GetCurrentProcessId());
+	    PROCESS_VM_READ, FALSE, GetCurrentProcessId());
 #if defined (_SQUID_MSWIN_)
 	{
-	/* Microsoft Visual C++ doesn't have getrusage function,  */
-	/* so we get process CPU time information from PSAPI.DLL. */
+	    /* Microsoft Visual C++ doesn't have getrusage function,  */
+	    /* so we get process CPU time information from PSAPI.DLL. */
 	    FILETIME ftCreate, ftExit, ftKernel, ftUser;
-	    if (GetProcessTimes(hProcess, &ftCreate, &ftExit, &ftKernel, &ftUser))
-	    {
-	    	LONGLONG tUser64 = *(LONGLONG *)&ftUser;
-		LONGLONG tKernel64 = *(LONGLONG *)&ftKernel;
-		r->ru_utime.tv_usec =(DWORD)(tUser64 / 10);
-		r->ru_stime.tv_usec =(DWORD)(tKernel64 / 10);
+	    if (GetProcessTimes(hProcess, &ftCreate, &ftExit, &ftKernel,
+		    &ftUser)) {
+		LONGLONG tUser64 = *(LONGLONG *) & ftUser;
+		LONGLONG tKernel64 = *(LONGLONG *) & ftKernel;
+		r->ru_utime.tv_usec = (DWORD) (tUser64 / 10);
+		r->ru_stime.tv_usec = (DWORD) (tKernel64 / 10);
 	    }
 	}
 #endif
-	if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) )
-	{
-	    r->ru_maxrss=(DWORD)(pmc.WorkingSetSize /1024);
-	    r->ru_majflt=pmc.PageFaultCount;
+	if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) {
+	    r->ru_maxrss = (DWORD) (pmc.WorkingSetSize / 1024);
+	    r->ru_majflt = pmc.PageFaultCount;
 	}
-	CloseHandle( hProcess );
+	CloseHandle(hProcess);
     }
 #endif
 #endif
@@ -272,7 +250,6 @@
 #endif
 }
 
-
 void
 PrintRusage(void)
 {
@@ -281,14 +258,14 @@
     fprintf(debug_log, "CPU Usage: %.3f seconds = %.3f user + %.3f sys\n",
 	rusage_cputime(&rusage),
 	rusage.ru_utime.tv_sec + ((double) rusage.ru_utime.tv_usec / 1000000.0),
-	rusage.ru_stime.tv_sec + ((double) rusage.ru_stime.tv_usec / 1000000.0));
+	rusage.ru_stime.tv_sec +
+	((double) rusage.ru_stime.tv_usec / 1000000.0));
     fprintf(debug_log, "Maximum Resident Size: %d KB\n",
 	rusage_maxrss(&rusage));
     fprintf(debug_log, "Page faults with physical i/o: %d\n",
 	rusage_pagefaults(&rusage));
 }
 
-
 void
 death(int sig)
 {
@@ -338,7 +315,6 @@
     abort();
 }
 
-
 void
 sigusr2_handle(int sig)
 {
@@ -406,7 +382,7 @@
 /* printf-style interface for fatal */
 #if STDC_HEADERS
 void
-fatalf(const char *fmt,...)
+fatalf(const char *fmt, ...)
 {
     va_list args;
     va_start(args, fmt);
@@ -505,8 +481,7 @@
 	    /* use the official name from DNS lookup */
 	    xstrncpy(host, h->h_name, SQUIDHOSTNAMELEN);
 	    debug(50, 4) ("getMyHostname: resolved %s to '%s'\n",
-		inet_ntoa(Config.Sockaddr.http->s.sin_addr),
-		host);
+		inet_ntoa(Config.Sockaddr.http->s.sin_addr), host);
 	    present = 1;
 	    return host;
 	}
@@ -529,7 +504,8 @@
 	present = 1;
 	return host;
     }
-    fatal("Could not determine fully qualified hostname.  Please set 'visible_hostname'\n");
+    fatal
+	("Could not determine fully qualified hostname.  Please set 'visible_hostname'\n");
     return NULL;		/* keep compiler happy */
 }
 
@@ -556,7 +532,6 @@
 leave_suid(void)
 {
     debug(21, 3) ("leave_suid: PID %d called\n", getpid());
-#ifndef _SQUID_MSWIN_
     if (geteuid() != 0)
 	return;
     /* Started as a root, check suid option */
@@ -579,7 +554,6 @@
     if (setuid(Config2.effectiveUserID) < 0)
 	debug(50, 0) ("ALERT: setuid: %s\n", xstrerror());
 #endif
-#endif
 }
 
 /* Enter a privilegied section */
@@ -587,13 +561,11 @@
 enter_suid(void)
 {
     debug(21, 3) ("enter_suid: PID %d taking root priveleges\n", getpid());
-#ifndef _SQUID_MSWIN_
 #if HAVE_SETRESUID
     setresuid(-1, 0, -1);
 #else
     setuid(0);
 #endif
-#endif
 }
 
 /* Give up the posibility to gain privilegies.
@@ -606,7 +578,8 @@
     uid_t uid;
     leave_suid();
     uid = geteuid();
-    debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n", getpid());
+    debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n",
+	getpid());
 #if HAVE_SETRESUID
     if (setresuid(uid, uid, uid) < 0)
 	debug(50, 1) ("no_suid: setresuid: %s\n", xstrerror());
@@ -645,8 +618,7 @@
 }
 
 
-pid_t
-readPidFile(void)
+pid_t readPidFile(void)
 {
     FILE *pid_fp = NULL;
     const char *f = Config.pidFilename;
@@ -709,7 +681,8 @@
     }
 #endif
 #else /* HAVE_SETRLIMIT */
-    debug(21, 1) ("setMaxFD: Cannot increase: setrlimit() not supported on this system\n");
+    debug(21, 1)
+	("setMaxFD: Cannot increase: setrlimit() not supported on this system\n");
 #endif /* HAVE_SETRLIMIT */
 
 #if HAVE_SETRLIMIT && defined(RLIMIT_DATA)
@@ -738,8 +711,7 @@
 #endif /* RLIMIT_VMEM */
 }
 
-time_t
-getCurrentTime(void)
+time_t getCurrentTime(void)
 {
 #if GETTIMEOFDAY_NO_TZP
     gettimeofday(&current_time);
@@ -772,7 +744,8 @@
     sa.sa_flags = flags;
     sigemptyset(&sa.sa_mask);
     if (sigaction(sig, &sa, NULL) < 0)
-	debug(50, 0) ("sigaction: sig=%d func=%p: %s\n", sig, func, xstrerror());
+	debug(50, 0) ("sigaction: sig=%d func=%p: %s\n", sig, func,
+	    xstrerror());
 #else
     signal(sig, func);
 #endif
@@ -958,7 +931,7 @@
 {
     debug(21, 2) ("xrename: renaming %s to %s\n", from, to);
 #ifdef _SQUID_MSWIN_
-	remove(to);
+    remove(to);
 #endif
     if (0 == rename(from, to))
 	return 0;
Index: squid/src/typedefs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.3.2.1
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.3.2.1
--- squid/src/typedefs.h	14 Jun 2001 20:36:16 -0000	1.1.1.3.4.1.2.3
+++ squid/src/typedefs.h	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: typedefs.h,v 1.1.1.3.4.1.2.3 2001/06/14 20:36:16 serassio Exp $
+ * $Id: typedefs.h,v 1.1.1.3.4.1.2.3.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -37,16 +36,20 @@
 typedef unsigned int swap_status_t;
 typedef signed int sfileno;
 
-typedef struct {
+typedef struct
+{
     size_t bytes;
     size_t kb;
-} kb_t;
+}
+kb_t;
 
-typedef struct {
+typedef struct
+{
     size_t count;
     size_t bytes;
     size_t gb;
-} gb_t;
+}
+gb_t;
 
 /*
  * grep '^struct' structs.h \
@@ -230,7 +233,8 @@
 typedef void STLOGCLEANWRITE(const StoreEntry *, SwapDir *);
 
 typedef double hbase_f(double);
-typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size, int count);
+typedef void StatHistBinDumper(StoreEntry *, int idx, double val, double size,
+    int count);
 
 /* append/vprintf's for Packer */
 typedef void (*append_f) (void *, const char *buf, int size);
Index: squid/src/unlinkd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/unlinkd.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/unlinkd.c	6 Jan 2001 12:40:17 -0000	1.1.1.3.4.1.2.1
+++ squid/src/unlinkd.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: unlinkd.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -36,6 +36,8 @@
 
 #ifdef UNLINK_DAEMON
 
+#include "globals.h"
+
 /* This is the external unlinkd process */
 
 #define UNLINK_BUF_LEN 1024
@@ -73,8 +75,27 @@
 static int unlinkd_rfd = -1;
 #endif
 
+#ifdef _SQUID_MSWIN_
+extern void sd_note(int fd, const char *s);
+
+static HANDLE hIpc;
+static pid_t pid;
+#endif
+
 #define UNLINKD_QUEUE_LIMIT 20
 
+static unsigned long n_successes = 0, n_failures = 0;
+static void
+unlinkdStats(StoreEntry * sentry)
+{
+    storeAppendPrintf(sentry, "Unlink Daemon Statistics:\n");
+    storeAppendPrintf(sentry,
+	"\nNumber of requests:  %lu\n"
+	"Number of successes: %lu\n"
+	"Number of failures:  %lu\n", Counter.unlink.requests, n_successes,
+	n_failures);
+}
+
 void
 unlinkdUnlink(const char *path)
 {
@@ -113,21 +134,41 @@
     if (queuelen > 0) {
 	int x;
 	int i;
-	char rbuf[512];
-	x = read(unlinkd_rfd, rbuf, 511);
+	static char rbuf[512];
+	static int offset = 0;
+#ifdef _SQUID_MSWIN_
+	x = recv(unlinkd_rfd, rbuf + offset, 511, 0);
+#else
+	x = read(unlinkd_rfd, rbuf + offset, 511);
+#endif
 	if (x > 0) {
-	    rbuf[x] = '\0';
+	    rbuf[x += offset] = '\0';
 	    for (i = 0; i < x; i++)
-		if ('\n' == rbuf[i])
+		if ('\n' == rbuf[i]) {
+		    if (strncmp(rbuf, "OK\r\n", 4) && strncmp(rbuf, "OK\n", 3))
+			n_failures++;
+		    else
+			n_successes++;
 		    queuelen--;
+		    i++;
+		    xmemmove(rbuf, rbuf + i, sizeof(rbuf) - i);
+		    x -= i;
+		    i = -1;
+		}
 	    assert(queuelen >= 0);
+	    assert(x >= 0);
+	    offset = x;
 	}
     }
     l = strlen(path);
     assert(l < MAXPATHLEN);
     xstrncpy(buf, path, MAXPATHLEN);
     buf[l++] = '\n';
+#ifdef _SQUID_MSWIN_
+    x = send(unlinkd_wfd, buf, l, 0);
+#else
     x = write(unlinkd_wfd, buf, l);
+#endif
     if (x < 0) {
 	debug(50, 1) ("unlinkdUnlink: write FD %d failed: %s\n",
 	    unlinkd_wfd, xstrerror());
@@ -148,20 +189,48 @@
 unlinkdClose(void)
 {
 #if USE_UNLINKD
-    assert(unlinkd_wfd > -1);
-    debug(12, 1) ("Closing unlinkd pipe on FD %d\n", unlinkd_wfd);
-    file_close(unlinkd_wfd);
-    if (unlinkd_wfd != unlinkd_rfd)
-	file_close(unlinkd_rfd);
-    unlinkd_wfd = -1;
-    unlinkd_rfd = -1;
+#ifdef _SQUID_MSWIN_
+    if (unlinkd_wfd > -1) {
+#else
+    {
+	assert(unlinkd_wfd > -1);
+#endif
+	debug(12, 1) ("Closing unlinkd pipe on FD %d\n", unlinkd_wfd);
+#ifdef _SQUID_MSWIN_
+	shutdown(unlinkd_wfd, SD_BOTH);
+	comm_close(unlinkd_wfd);
+	if (unlinkd_wfd != unlinkd_rfd)
+	    comm_close(unlinkd_rfd);
+#else
+	file_close(unlinkd_wfd);
+	if (unlinkd_wfd != unlinkd_rfd)
+	    file_close(unlinkd_rfd);
+#endif
+	unlinkd_wfd = -1;
+	unlinkd_rfd = -1;
+    }
+#ifdef _SQUID_MSWIN_
+    else {
+	debug(12, 0) ("unlinkdClose: WARNING: unlinkd_wfd is %d\n",
+	    unlinkd_wfd);
+    }
+    if (hIpc) {
+	if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
+	    getCurrentTime();
+	    debug(12, 1)
+		
+		("unlinkdClose: WARNING: (unlinkd,%ld) didn't exit in 5 seconds\n",
+		pid);
+	}
+	CloseHandle(hIpc);
+    }
+#endif
 #endif
 }
 
 void
 unlinkdInit(void)
 {
-#ifndef _SQUID_MSWIN_
 #if USE_UNLINKD
     int x;
     char *args[2];
@@ -171,21 +240,28 @@
 #if HAVE_POLL && defined(_SQUID_OSF_)
     /* pipes and poll() don't get along on DUNIX -DW */
     x = ipcCreate(IPC_TCP_SOCKET,
+#elif defined(_SQUID_MSWIN_)
+	/* select() will fail on a pipe */
+	x = ipcCreate(IPC_TCP_SOCKET,
 #else
     x = ipcCreate(IPC_FIFO,
 #endif
-	Config.Program.unlinkd,
-	args,
-	"unlinkd",
-	&unlinkd_rfd,
-	&unlinkd_wfd);
+	Config.Program.unlinkd, args, "unlinkd", &unlinkd_rfd, &unlinkd_wfd
+#ifdef _SQUID_MSWIN_
+	, &hIpc, &pid
+#endif
+	);
     if (x < 0)
 	fatal("Failed to create unlinkd subprocess");
     slp.tv_sec = 0;
     slp.tv_usec = 250000;
     select(0, NULL, NULL, NULL, &slp);
+#ifdef _SQUID_MSWIN_
+    sd_note(unlinkd_wfd, "squid <-> unlinkd");
+#else
     fd_note(unlinkd_wfd, "squid -> unlinkd");
     fd_note(unlinkd_rfd, "unlinkd -> squid");
+#endif
     commSetTimeout(unlinkd_rfd, -1, NULL, NULL);
     commSetTimeout(unlinkd_wfd, -1, NULL, NULL);
     /*
@@ -195,14 +271,20 @@
      * code to retry if we get EWOULDBLOCK.  Unfortunately, we can
      * do this only for the IPC_FIFO case.
      */
+#ifdef _SQUID_MSWIN_
+    assert(sd_table[unlinkd_rfd].flags.nonblocking);
+    if (FD_PIPE == sd_table[unlinkd_wfd].type)
+#else
     assert(fd_table[unlinkd_rfd].flags.nonblocking);
     if (FD_PIPE == fd_table[unlinkd_wfd].type)
+#endif
 	commUnsetNonBlocking(unlinkd_wfd);
     debug(12, 1) ("Unlinkd pipe opened on FD %d\n", unlinkd_wfd);
+    cachemgrRegister("unlinkd", "Unlink Daemon Stats", unlinkdStats, 0, 1);
+
 #else
     debug(12, 1) ("Unlinkd is disabled\n");
 #endif
-#endif
 }
 
 #endif /* ndef UNLINK_DAEMON */
Index: squid/src/url.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/url.c,v
retrieving revision 1.1.1.3.4.4.2.3
retrieving revision 1.1.1.3.4.4.2.3.2.1
diff -u -r1.1.1.3.4.4.2.3 -r1.1.1.3.4.4.2.3.2.1
--- squid/src/url.c	14 Jun 2001 21:34:24 -0000	1.1.1.3.4.4.2.3
+++ squid/src/url.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.4.2.3.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: url.c,v 1.1.1.3.4.4.2.3 2001/06/14 21:34:24 serassio Exp $
+ * $Id: url.c,v 1.1.1.3.4.4.2.3.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -35,8 +34,7 @@
 
 #include "squid.h"
 
-const char *RequestMethodStr[] =
-{
+const char *RequestMethodStr[] = {
     "NONE",
     "GET",
     "POST",
@@ -60,8 +58,7 @@
     "ERROR"
 };
 
-const char *ProtocolStr[] =
-{
+const char *ProtocolStr[] = {
     "NONE",
     "http",
     "ftp",
@@ -82,13 +79,9 @@
 static request_t *urnParse(method_t method, char *urn);
 static const char *const valid_hostname_chars =
 #if ALLOW_HOSTNAME_UNDERSCORES
-"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-"abcdefghijklmnopqrstuvwxyz"
-"0123456789-._";
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789-._";
 #else
-"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-"abcdefghijklmnopqrstuvwxyz"
-"0123456789-.";
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789-.";
 #endif
 
 /* convert %xx in url string to a character 
@@ -147,8 +140,7 @@
     /* more cases? */
 }
 
-method_t
-urlParseMethod(const char *s)
+method_t urlParseMethod(const char *s)
 {
     method_t method = METHOD_NONE;
     for (method++; method < METHOD_ENUM_END; method++) {
@@ -159,8 +151,7 @@
 }
 
 
-protocol_t
-urlParseProtocol(const char *s)
+protocol_t urlParseProtocol(const char *s)
 {
     /* test common stuff first */
     if (strcasecmp(s, "http") == 0)
@@ -234,13 +225,13 @@
     }
     if (method == METHOD_CONNECT) {
 	port = CONNECT_PORT;
-	if (sscanf(url, "%[^:]:%d", host, &port) < 1)
+	if (sscanf(url, "%[^:\r\n]:%d", host, &port) < 1)
 	    return NULL;
     } else if (!strncmp(url, "urn:", 4)) {
 	return urnParse(method, url);
     } else {
-	if (sscanf(url, "%[^:]://%[^/]%[^\r\n]", proto, host, urlpath) < 2)
-	    return NULL;
+	if (sscanf(url, "%[^:\r\n]://%[^/\r\n]%[^\r\n]", proto, host,
+		urlpath) < 2) return NULL;
 	protocol = urlParseProtocol(proto);
 	port = urlDefaultPort(protocol);
 	/* Is there any login informaiton? */
@@ -354,9 +345,7 @@
 		ProtocolStr[request->protocol],
 		request->login,
 		*request->login ? "@" : null_string,
-		request->host,
-		portbuf,
-		strBuf(request->urlpath));
+		request->host, portbuf, strBuf(request->urlpath));
 	    break;
 	}
     }
@@ -390,10 +379,7 @@
 	    }
 	    snprintf(buf, MAX_URL, "%s://%s%s%s%s",
 		ProtocolStr[request->protocol],
-		loginbuf,
-		request->host,
-		portbuf,
-		strBuf(request->urlpath));
+		loginbuf, request->host, portbuf, strBuf(request->urlpath));
 	    /*
 	     * strip arguments AFTER a question-mark
 	     */
Index: squid/src/urn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/urn.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.1.2.1
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.1.2.1
--- squid/src/urn.c	6 Jan 2001 12:40:17 -0000	1.1.1.3.4.1.2.1
+++ squid/src/urn.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.1.2.1
@@ -1,7 +1,6 @@
-
 /*
  *
- * $Id: urn.c,v 1.1.1.3.4.1.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: urn.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -36,24 +35,32 @@
 
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     StoreEntry *entry;
     StoreEntry *urlres_e;
     request_t *request;
     request_t *urlres_r;
-    struct {
+    struct
+    {
 	int force_menu:1;
-    } flags;
-} UrnState;
+    }
+    flags;
+}
+UrnState;
 
-typedef struct {
+typedef struct
+{
     char *url;
     char *host;
     int rtt;
-    struct {
+    struct
+    {
 	int cached;
-    } flags;
-} url_entry;
+    }
+    flags;
+}
+url_entry;
 
 static STCB urnHandleReply;
 static url_entry *urnParseReply(const char *inbuf, method_t);
@@ -90,8 +97,7 @@
     if (rtt_ret)
 	*rtt_ret = min_rtt;
     debug(52, 1) ("urnFindMinRtt: Returning '%s' RTT %d\n",
-	min_u ? min_u->url : "NONE",
-	min_rtt);
+	min_u ? min_u->url : "NONE", min_rtt);
     return min_u;
 }
 
@@ -124,7 +130,8 @@
     } else {
 	host = xstrdup(strBuf(r->urlpath));
     }
-    snprintf(urlres, 4096, "http://%s/uri-res/N2L?urn:%s", host, strBuf(r->urlpath));
+    snprintf(urlres, 4096, "http://%s/uri-res/N2L?urn:%s", host,
+	strBuf(r->urlpath));
     safe_free(host);
     urlres_r = urlParse(METHOD_GET, urlres);
     if (urlres_r == NULL) {
@@ -136,7 +143,8 @@
     }
     httpHeaderPutStr(&urlres_r->header, HDR_ACCEPT, "text/plain");
     if ((urlres_e = storeGetPublic(urlres, METHOD_GET)) == NULL) {
-	urlres_e = storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET);
+	urlres_e =
+	    storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET);
 	storeClientListAdd(urlres_e, urnState);
 	fwdStart(-1, urlres_e, urlres_r);
     } else {
@@ -146,12 +154,7 @@
     urnState->urlres_e = urlres_e;
     urnState->urlres_r = requestLink(urlres_r);
     storeClientCopy(urlres_e,
-	0,
-	0,
-	4096,
-	memAllocate(MEM_4K_BUF),
-	urnHandleReply,
-	urnState);
+	0, 0, 4096, memAllocate(MEM_4K_BUF), urnHandleReply, urnState);
 }
 
 static int
@@ -200,12 +203,7 @@
     }
     if (urlres_e->store_status == STORE_PENDING && size < SM_PAGE_SIZE) {
 	storeClientCopy(urlres_e,
-	    size,
-	    0,
-	    SM_PAGE_SIZE,
-	    buf,
-	    urnHandleReply,
-	    urnState);
+	    size, 0, SM_PAGE_SIZE, buf, urnHandleReply, urnState);
 	return;
     }
     /* we know its STORE_OK */
@@ -253,11 +251,9 @@
     for (i = 0; i < urlcnt; i++) {
 	u = &urls[i];
 	debug(52, 3) ("URL {%s}\n", u->url);
-	memBufPrintf(&mb,
-	    "<TR><TD><A HREF=\"%s\">%s</A></TD>", u->url, u->url);
+	memBufPrintf(&mb, "<TR><TD><A HREF=\"%s\">%s</A></TD>", u->url, u->url);
 	if (urls[i].rtt > 0)
-	    memBufPrintf(&mb,
-		"<TD align=right>%4d </it>ms</it></TD>", u->rtt);
+	    memBufPrintf(&mb, "<TD align=right>%4d </it>ms</it></TD>", u->rtt);
 	else
 	    memBufPrintf(&mb, "<TD align=right>Unknown</TD>");
 	memBufPrintf(&mb,
@@ -268,8 +264,7 @@
 	"<HR>\n"
 	"<ADDRESS>\n"
 	"Generated by %s@%s\n"
-	"</ADDRESS>\n",
-	full_appname_string, getMyHostname());
+	"</ADDRESS>\n", full_appname_string, getMyHostname());
     rep = e->mem_obj->reply;
     httpReplyReset(rep);
     httpReplySetHeaders(rep, 1.0, HTTP_MOVED_TEMPORARILY, NULL,
Index: squid/src/useragent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/useragent.c,v
retrieving revision 1.1.1.3.4.1.2.10
retrieving revision 1.1.1.3.4.1.2.10.2.1
diff -u -r1.1.1.3.4.1.2.10 -r1.1.1.3.4.1.2.10.2.1
--- squid/src/useragent.c	15 Jul 2001 16:58:38 -0000	1.1.1.3.4.1.2.10
+++ squid/src/useragent.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.4.1.2.10.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: useragent.c,v 1.1.1.3.4.1.2.10 2001/07/15 16:58:38 serassio Exp $
+ * $Id: useragent.c,v 1.1.1.3.4.1.2.10.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey <ramey@csc.ti.com>
@@ -123,10 +122,7 @@
 	strcpy(time_str, s);
 	last_time = squid_curtime;
     }
-    fprintf(cache_useragent_log, "%s [%s] \"%s\"\n",
-	client,
-	time_str,
-	agent);
+    fprintf(cache_useragent_log, "%s [%s] \"%s\"\n", client, time_str, agent);
     if (!Config.onoff.buffered_logs)
 	fflush(cache_useragent_log);
 #endif
Index: squid/src/wais.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wais.c,v
retrieving revision 1.1.1.2.4.1.2.1
retrieving revision 1.1.1.2.4.1.2.1.2.1
diff -u -r1.1.1.2.4.1.2.1 -r1.1.1.2.4.1.2.1.2.1
--- squid/src/wais.c	6 Jan 2001 12:40:17 -0000	1.1.1.2.4.1.2.1
+++ squid/src/wais.c	27 Aug 2001 21:48:22 -0000	1.1.1.2.4.1.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: wais.c,v 1.1.1.2.4.1.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: wais.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -35,7 +34,8 @@
 #define WAIS_C
 #include "squid.h"
 
-typedef struct {
+typedef struct
+{
     int fd;
     StoreEntry *entry;
     method_t method;
@@ -43,7 +43,8 @@
     char url[MAX_URL];
     request_t *request;
     FwdState *fwd;
-} WaisStateData;
+}
+WaisStateData;
 
 static PF waisStateFree;
 static PF waisTimeout;
@@ -103,11 +104,7 @@
     read_sz = delayBytesWanted(delay_id, 1, read_sz);
 #endif
     Counter.syscalls.sock.reads++;
-#ifdef _SQUID_MSWIN_
-    len = recv(fd, buf, read_sz);
-#else
     len = read(fd, buf, read_sz);
-#endif
     if (len > 0) {
 	fd_bytes(fd, len, FD_READ);
 #if DELAY_POOLS
@@ -130,8 +127,7 @@
 	if (ignoreErrno(errno)) {
 	    /* reinstall handlers */
 	    /* XXX This may loop forever */
-	    commSetSelect(fd, COMM_SELECT_READ,
-		waisReadReply, waisState, 0);
+	    commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0);
 	} else {
 	    ErrorState *err;
 	    EBIT_CLR(entry->flags, ENTRY_CACHABLE);
@@ -156,10 +152,7 @@
 	comm_close(fd);
     } else {
 	storeAppend(entry, buf, len);
-	commSetSelect(fd,
-	    COMM_SELECT_READ,
-	    waisReadReply,
-	    waisState, 0);
+	commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0);
     }
 }
 
@@ -188,10 +181,7 @@
 	comm_close(fd);
     } else {
 	/* Schedule read reply. */
-	commSetSelect(fd,
-	    COMM_SELECT_READ,
-	    waisReadReply,
-	    waisState, 0);
+	commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0);
 	commSetDefer(fd, fwdCheckDeferRead, entry);
     }
 }
Index: squid/src/wccp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wccp.c,v
retrieving revision 1.1.1.1.4.2.2.1
retrieving revision 1.1.1.1.4.2.2.1.2.1
diff -u -r1.1.1.1.4.2.2.1 -r1.1.1.1.4.2.2.1.2.1
--- squid/src/wccp.c	6 Jan 2001 12:40:17 -0000	1.1.1.1.4.2.2.1
+++ squid/src/wccp.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: wccp.c,v 1.1.1.1.4.2.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: wccp.c,v 1.1.1.1.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 80     WCCP Support
  * AUTHOR: Glenn Chisholm
@@ -49,7 +48,8 @@
 #define WCCP_I_SEE_YOU 8
 #define WCCP_ASSIGN_BUCKET 9
 
-struct wccp_here_i_am_t {
+struct wccp_here_i_am_t
+{
     int type;
     int version;
     int revision;
@@ -58,14 +58,16 @@
     int id;
 };
 
-struct wccp_cache_entry_t {
+struct wccp_cache_entry_t
+{
     struct in_addr ip_addr;
     int revision;
     char hash[WCCP_HASH_SIZE];
     int reserved;
 };
 
-struct wccp_i_see_you_t {
+struct wccp_i_see_you_t
+{
     int type;
     int version;
     int change;
@@ -74,7 +76,8 @@
     struct wccp_cache_entry_t wccp_cache_entry[WCCP_ACTIVE_CACHES];
 };
 
-struct wccp_assign_bucket_t {
+struct wccp_assign_bucket_t
+{
     int type;
     int id;
     int number;
@@ -125,42 +128,21 @@
 	debug(1, 1) ("WCCP Disabled.\n");
 	return;
     }
-    theInWccpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_UDP,
-#else
-	0,
-#endif
-	Config.Wccp.incoming,
-	port,
-	COMM_NONBLOCKING,
-	"WCCP Socket");
+    theInWccpConnection = comm_open(SOCK_DGRAM, 0, Config.Wccp.incoming,
+	port, COMM_NONBLOCKING, "WCCP Socket");
     if (theInWccpConnection < 0)
 	fatal("Cannot open WCCP Port");
     commSetSelect(theInWccpConnection,
-	COMM_SELECT_READ,
-	wccpHandleUdp,
-	NULL,
-	0);
+	COMM_SELECT_READ, wccpHandleUdp, NULL, 0);
     debug(1, 1) ("Accepting WCCP messages on port %d, FD %d.\n",
 	(int) port, theInWccpConnection);
     if (Config.Wccp.outgoing.s_addr != no_addr.s_addr) {
-	theOutWccpConnection = comm_open(SOCK_DGRAM,
-#ifdef _SQUID_MSWIN_
-	IPPROTO_UDP,
-#else
-	0,
-#endif
-	    Config.Wccp.outgoing,
-	    port,
-	    COMM_NONBLOCKING,
-	    "WCCP Socket");
+	theOutWccpConnection = comm_open(SOCK_DGRAM, 0, Config.Wccp.outgoing,
+	    port, COMM_NONBLOCKING, "WCCP Socket");
 	if (theOutWccpConnection < 0)
 	    fatal("Cannot open Outgoing WCCP Port");
 	commSetSelect(theOutWccpConnection,
-	    COMM_SELECT_READ,
-	    wccpHandleUdp,
-	    NULL, 0);
+	    COMM_SELECT_READ, wccpHandleUdp, NULL, 0);
 	debug(1, 1) ("Outgoing WCCP messages on port %d, FD %d.\n",
 	    (int) port, theOutWccpConnection);
 	fd_note(theOutWccpConnection, "Outgoing WCCP socket");
@@ -177,8 +159,8 @@
 	fatal("Unable to connect WCCP out socket");
     local_len = sizeof(local);
     memset(&local, '\0', local_len);
-    if (getsockname(theOutWccpConnection, (struct sockaddr *) &local, &local_len))
-	fatal("Unable to getsockname on WCCP out socket");
+    if (getsockname(theOutWccpConnection, (struct sockaddr *) &local,
+	    &local_len)) fatal("Unable to getsockname on WCCP out socket");
     local_ip.s_addr = local.sin_addr.s_addr;
 }
 
@@ -228,16 +210,8 @@
 
     Counter.syscalls.sock.recvfroms++;
 
-    len = recvfrom(sock,
-#ifdef _SQUID_MSWIN_
-	(char *)&wccp_i_see_you,
-#else
-    &wccp_i_see_you,
-#endif
-	WCCP_RESPONSE_SIZE,
-	0,
-	(struct sockaddr *) &from,
-	&from_len);
+    len = recvfrom(sock, &wccp_i_see_you,
+	WCCP_RESPONSE_SIZE, 0, (struct sockaddr *) &from, &from_len);
     if (len < 0)
 	return;
     if (Config.Wccp.router.s_addr != from.sin_addr.s_addr)
@@ -262,8 +236,8 @@
 {
     int loop;
     for (loop = 0; loop < ntohl(wccp_i_see_you.number); loop++) {
-	if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr.s_addr < local_ip.s_addr)
-	    return 0;
+	if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr.s_addr <
+	    local_ip.s_addr) return 0;
     }
     return 1;
 }
@@ -274,14 +248,7 @@
     debug(80, 6) ("wccpHereIam: Called\n");
 
     wccp_here_i_am.id = wccp_i_see_you.id;
-    send(theOutWccpConnection,
-#ifdef _SQUID_MSWIN_
-	(const char*)&wccp_here_i_am,
-#else
-    &wccp_here_i_am,
-#endif
-	sizeof(wccp_here_i_am),
-	0);
+    send(theOutWccpConnection, &wccp_here_i_am, sizeof(wccp_here_i_am), 0);
 
     if (!eventFind(wccpHereIam, NULL))
 	eventAdd("wccpHereIam", wccpHereIam, NULL, 10.0, 1);
@@ -308,9 +275,7 @@
     wab_len = sizeof(struct wccp_assign_bucket_t);
     cache_len = WCCP_CACHE_LEN * number_caches;
 
-    buf = xmalloc(wab_len +
-	WCCP_BUCKETS +
-	cache_len);
+    buf = xmalloc(wab_len + WCCP_BUCKETS + cache_len);
     wccp_assign_bucket = (struct wccp_assign_bucket_t *) buf;
     caches = (int *) (buf + wab_len);
     buckets = buf + wab_len + cache_len;
@@ -333,10 +298,7 @@
     wccp_assign_bucket->id = wccp_i_see_you.id;
     wccp_assign_bucket->number = wccp_i_see_you.number;
 
-    send(theOutWccpConnection,
-	buf,
-	wab_len + WCCP_BUCKETS + cache_len,
-	0);
+    send(theOutWccpConnection, buf, wab_len + WCCP_BUCKETS + cache_len, 0);
     change = 0;
     xfree(buf);
 }
Index: squid/src/whois.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/whois.c,v
retrieving revision 1.1.1.2.4.2.2.1
retrieving revision 1.1.1.2.4.2.2.1.2.1
diff -u -r1.1.1.2.4.2.2.1 -r1.1.1.2.4.2.2.1.2.1
--- squid/src/whois.c	6 Jan 2001 12:40:17 -0000	1.1.1.2.4.2.2.1
+++ squid/src/whois.c	27 Aug 2001 21:48:22 -0000	1.1.1.2.4.2.2.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: whois.c,v 1.1.1.2.4.2.2.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: whois.c,v 1.1.1.2.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 75    WHOIS protocol
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -37,11 +36,13 @@
 
 #define WHOIS_PORT 43
 
-typedef struct {
+typedef struct
+{
     StoreEntry *entry;
     request_t *request;
     FwdState *fwd;
-} WhoisState;
+}
+WhoisState;
 
 static PF whoisClose;
 static PF whoisTimeout;
@@ -100,12 +101,14 @@
 	kb_incr(&Counter.server.all.kbytes_in, len);
 	kb_incr(&Counter.server.http.kbytes_in, len);
 	storeAppend(entry, buf, len);
-	commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, Config.Timeout.read);
+	commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p,
+	    Config.Timeout.read);
     } else if (len < 0) {
 	debug(50, 2) ("whoisReadReply: FD %d: read failure: %s.\n",
 	    fd, xstrerror());
 	if (ignoreErrno(errno)) {
-	    commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, Config.Timeout.read);
+	    commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p,
+		Config.Timeout.read);
 	} else if (mem->inmem_hi == 0) {
 	    ErrorState *err;
 	    err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR);
Index: squid/src/win32.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/win32.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/src/win32.c	14 Jun 2001 20:36:16 -0000	1.1.2.3
+++ squid/src/win32.c	27 Aug 2001 21:48:22 -0000	1.1.2.3.2.1
@@ -38,6 +38,9 @@
 #if defined(_SQUID_MSWIN_)
 static int Win32SockInit(void);
 static void Win32SockCleanup(void);
+
+LPCRITICAL_SECTION dbg_mutex = NULL;
+extern int opt_signal_service;
 #endif /* End native Windows NT EXPERIMENTAL PORT */
 
 static SERVICE_STATUS svcStatus;
@@ -49,7 +52,7 @@
 #else
 #define SOFTWARE "Squid"
 #endif
-#define VERSION  "2.3-STABLE-4"
+#define VERSION  "2.3-STABLE-5"
 #define REGKEY "SOFTWARE\\" VENDOR "\\" SOFTWARE "\\" VERSION
 
 /* ====================================================================== */
@@ -188,31 +191,31 @@
     switch (osvi.dwPlatformId) {
     case VER_PLATFORM_WIN32_NT:
 	if (osvi.dwMajorVersion <= 4) {
-	    WIN32_OS_string=xstrdup("Windows NT");
+	    WIN32_OS_string = xstrdup("Windows NT");
 	    return _WIN_OS_WINNT;
 	}
 	if (osvi.dwMajorVersion == 5) {
-	    WIN32_OS_string=xstrdup("Windows 2000");
+	    WIN32_OS_string = xstrdup("Windows 2000");
 	    return _WIN_OS_WIN2K;
 	}
 	break;
     case VER_PLATFORM_WIN32_WINDOWS:
 	if ((osvi.dwMajorVersion > 4) ||
 	    ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion > 0))) {
-	    WIN32_OS_string=xstrdup("Windows 98");
+	    WIN32_OS_string = xstrdup("Windows 98");
 	    return _WIN_OS_WIN98;
 	}
-	WIN32_OS_string=xstrdup("Windows 95");
+	WIN32_OS_string = xstrdup("Windows 95");
 	return _WIN_OS_WIN95;
 	break;
     case VER_PLATFORM_WIN32s:
-	WIN32_OS_string=xstrdup("Windows 3.1 with WIN32S");
+	WIN32_OS_string = xstrdup("Windows 3.1 with WIN32S");
 	return _WIN_OS_WIN32S;
 	break;
     default:
 	return _WIN_OS_UNKNOWN;
     }
-    WIN32_OS_string=xstrdup("Unknown");
+    WIN32_OS_string = xstrdup("Unknown");
     return _WIN_OS_UNKNOWN;
 }
 
@@ -220,10 +223,13 @@
 /* PUBLIC FUNCTIONS */
 /* ====================================================================== */
 
-VOID
-WIN32_Exit(int ExitStatus)
+VOID WIN32_Exit(int ExitStatus)
 {
 #ifdef _SQUID_MSWIN_
+    if (ExitStatus) {
+	unlinkdClose();
+	redirectShutdown();
+    }
     Win32SockCleanup();
 #endif
 #ifdef USE_WIN32_SERVICE
@@ -234,6 +240,13 @@
     svcStatus.dwCurrentState = SERVICE_STOPPED;
     SetServiceStatus(svcHandle, &svcStatus);
 #endif
+#ifdef _SQUID_MSWIN_
+#ifdef USE_ASYNC_IO
+    aioShutdown();
+#endif
+    if (dbg_mutex)
+	DeleteCriticalSection(dbg_mutex);
+#endif
     exit(0);
 }
 
@@ -247,8 +260,7 @@
 	HKEY hndKey;
 	/* Register the service Handler function */
 	svcHandle =
-	    RegisterServiceCtrlHandler(WIN32_Service_name,
-	    WIN32_svcHandler);
+	    RegisterServiceCtrlHandler(WIN32_Service_name, WIN32_svcHandler);
 	if (svcHandle == 0)
 	    return 1;
 	/* Set Process work dir to directory cointaining squid.exe */
@@ -263,11 +275,12 @@
 	    DWORD Size = 0;
 	    LONG Result;
 	    Result =
-		RegQueryValueEx(hndKey, WIN32_Service_name, NULL, &Type, NULL, &Size);
+		RegQueryValueEx(hndKey, WIN32_Service_name, NULL, &Type, NULL,
+		&Size);
 	    if (Result == ERROR_SUCCESS && Size) {
 		ConfigFile = xmalloc(Size);
-		RegQueryValueEx(hndKey, WIN32_Service_name, NULL, &Type, ConfigFile,
-		    &Size);
+		RegQueryValueEx(hndKey, WIN32_Service_name, NULL, &Type,
+		    ConfigFile, &Size);
 	    } else
 		ConfigFile = xstrdup(DefaultConfigFile);
 	    RegCloseKey(hndKey);
@@ -373,7 +386,8 @@
     if (!schSCManager)
 	debug(1, 1) ("OpenSCManager failed");
     else {
-	schService = OpenService(schSCManager, WIN32_Service_name, SERVICE_ALL_ACCESS);
+	schService =
+	    OpenService(schSCManager, WIN32_Service_name, SERVICE_ALL_ACCESS);
 	if (schService == NULL)
 	    debug(1, 1) ("OpenService failed");
 	/* Could not open the service */
@@ -391,7 +405,7 @@
 	    }
 	    /* now remove the service */
 	    if (DeleteService(schService) == 0)
-		fprintf(stderr,"DeleteService failed.\n");
+		fprintf(stderr, "DeleteService failed.\n");
 	    else
 		printf("Service %s deleted successfully.\n",
 		    WIN32_Service_name);
@@ -409,26 +423,26 @@
     char ServicePath[512];
     char szPath[512];
     int lenpath;
-    
+
     if (!WIN32_Service_name)
 	WIN32_Service_name = xstrdup(_WIN_SQUID_DEFAULT_SERVICE_NAME);
     if ((lenpath = GetModuleFileName(NULL, ServicePath, 512)) == 0) {
 	debug(1, 1) ("Can't get executable path");
 	exit(1);
     }
-    snprintf(szPath, sizeof(szPath), "%s %s:%s", ServicePath, _WIN_SQUID_SERVICE_OPTION, WIN32_Service_name);
+    snprintf(szPath, sizeof(szPath), "%s %s:%s", ServicePath,
+	_WIN_SQUID_SERVICE_OPTION, WIN32_Service_name);
     schSCManager = OpenSCManager(NULL,	/* machine (NULL == local)    */
 	NULL,			/* database (NULL == default) */
 	SC_MANAGER_ALL_ACCESS	/* access required            */
 	);
-    if (!schSCManager) {    
+    if (!schSCManager) {
 	debug(1, 1) ("OpenSCManager failed");
 	exit(1);
-    }
-    else {
+    } else {
 	schService = CreateService(schSCManager,	/* SCManager database     */
-	    WIN32_Service_name,		/* name of service        */
-	    WIN32_Service_name,		/* name to display        */
+	    WIN32_Service_name,	/* name of service        */
+	    WIN32_Service_name,	/* name to display        */
 	    SERVICE_ALL_ACCESS,	/* desired access         */
 	    SERVICE_WIN32_OWN_PROCESS,	/* service type           */
 	    SERVICE_AUTO_START,	/* start type             */
@@ -436,7 +450,7 @@
 	    (const char *) szPath,	/* service's binary       */
 	    NULL,		/* no load ordering group */
 	    NULL,		/* no tag identifier      */
-	    "Tcpip\0Afd\0",		/* dependencies           */
+	    "Tcpip\0Afd\0",	/* dependencies           */
 	    NULL,		/* LocalSystem account    */
 	    NULL);		/* no password            */
 	if (schService) {
@@ -444,7 +458,8 @@
 	    /* Now store the config file location in the registry */
 	    if (!ConfigFile)
 		ConfigFile = xstrdup(DefaultConfigFile);
-	    WIN32_StoreKey(WIN32_Service_name, REG_SZ, (unsigned char *) ConfigFile, strlen(ConfigFile) + 1);
+	    WIN32_StoreKey(WIN32_Service_name, REG_SZ,
+		(unsigned char *) ConfigFile, strlen(ConfigFile) + 1);
 	    printf("Squid Cache version %s for %s\n", version_string,
 		CONFIG_HOST_TYPE);
 	    printf("installed successfully as %s Windows System Service.\n",
@@ -460,7 +475,12 @@
     }
 }
 
+#ifdef _SQUID_MSWIN_
+__declspec(dllexport)
+     int WINAPI
+#else
 void
+#endif
 WIN32_sendSignal(int WIN32_signal)
 {
     SERVICE_STATUS ssStatus;
@@ -468,16 +488,22 @@
     SC_HANDLE schService;
     SC_HANDLE schSCManager;
 
-    if (!WIN32_Service_name)
-	WIN32_Service_name = xstrdup(_WIN_SQUID_DEFAULT_SERVICE_NAME);
-    schSCManager = OpenSCManager(NULL,	/* machine (NULL == local)    */
-	NULL,			/* database (NULL == default) */
-	SC_MANAGER_ALL_ACCESS	/* access required            */
-	);
-    if (!schSCManager) {
-	debug(1, 1) ("OpenSCManager failed");
-	exit(1);
+#ifdef _SQUID_MSWIN_
+    if (opt_signal_service) {
+#endif
+	if (!WIN32_Service_name)
+	    WIN32_Service_name = xstrdup(_WIN_SQUID_DEFAULT_SERVICE_NAME);
+	schSCManager = OpenSCManager(NULL,	/* machine (NULL == local)    */
+	    NULL,		/* database (NULL == default) */
+	    SC_MANAGER_ALL_ACCESS	/* access required            */
+	    );
+	if (!schSCManager) {
+	    debug(1, 1) ("OpenSCManager failed");
+	    exit(1);
+	}
+#ifdef _SQUID_MSWIN_
     }
+#endif
     /* The required service object access depends on the control. */
     switch (WIN32_signal) {
     case 0:			/* SIGNULL */
@@ -506,64 +532,81 @@
 	fdwControl = _WIN_SQUID_SERVICE_CONTROL_INTERRUPT;
 	break;
     default:
-	exit(1);
+#ifdef _SQUID_MSWIN_
+	if (opt_signal_service)
+#endif
+	    exit(1);
+#ifdef _SQUID_MSWIN_
+	else
+	    return FALSE;
+#endif
     }
-    /* Open a handle to the service. */
-    schService = OpenService(schSCManager,	/* SCManager database */
-	WIN32_Service_name,	/* name of service    */
-	fdwAccess);		/* specify access     */
-    if (schService == NULL) {
-	fprintf(stderr, "%s: ERROR: Could not open Service %s\n", appname,
-	    WIN32_Service_name);
-	exit(1);
-    } else {
-	/* Send a control value to the service. */
-	if (!ControlService(schService,	/* handle of service      */
-		fdwControl,	/* control value to send  */
-		&ssStatus)) {	/* address of status info */
-	    fprintf(stderr, "%s: ERROR: Could not Control Service %s\n",
-		appname, WIN32_Service_name);
+#ifdef _SQUID_MSWIN_
+    if (opt_signal_service) {
+#endif
+	/* Open a handle to the service. */
+	schService = OpenService(schSCManager,	/* SCManager database */
+	    WIN32_Service_name,	/* name of service    */
+	    fdwAccess);		/* specify access     */
+	if (schService == NULL) {
+	    fprintf(stderr, "%s: ERROR: Could not open Service %s\n", appname,
+		WIN32_Service_name);
 	    exit(1);
 	} else {
-	    /* Print the service status. */
-	    printf("\nStatus of %s Service:\n", WIN32_Service_name);
-	    printf("  Service Type: 0x%lx\n", ssStatus.dwServiceType);
-	    printf("  Current State: 0x%lx\n", ssStatus.dwCurrentState);
-	    printf("  Controls Accepted: 0x%lx\n", ssStatus.dwControlsAccepted);
-	    printf("  Exit Code: %ld\n", ssStatus.dwWin32ExitCode);
-	    printf("  Service Specific Exit Code: %ld\n",
-		ssStatus.dwServiceSpecificExitCode);
-	    printf("  Check Point: %ld\n", ssStatus.dwCheckPoint);
-	    printf("  Wait Hint: %ld\n", ssStatus.dwWaitHint);
+	    /* Send a control value to the service. */
+	    if (!ControlService(schService,	/* handle of service      */
+		    fdwControl,	/* control value to send  */
+		    &ssStatus)) {	/* address of status info */
+		fprintf(stderr, "%s: ERROR: Could not Control Service %s\n",
+		    appname, WIN32_Service_name);
+		exit(1);
+	    } else {
+		/* Print the service status. */
+		printf("\nStatus of %s Service:\n", WIN32_Service_name);
+		printf("  Service Type: 0x%lx\n", ssStatus.dwServiceType);
+		printf("  Current State: 0x%lx\n", ssStatus.dwCurrentState);
+		printf("  Controls Accepted: 0x%lx\n",
+		    ssStatus.dwControlsAccepted);
+		printf("  Exit Code: %ld\n", ssStatus.dwWin32ExitCode);
+		printf("  Service Specific Exit Code: %ld\n",
+		    ssStatus.dwServiceSpecificExitCode);
+		printf("  Check Point: %ld\n", ssStatus.dwCheckPoint);
+		printf("  Wait Hint: %ld\n", ssStatus.dwWaitHint);
+	    }
+	    CloseServiceHandle(schService);
 	}
-	CloseServiceHandle(schService);
-    }
-    CloseServiceHandle(schSCManager);
+	CloseServiceHandle(schSCManager);
+#ifdef _SQUID_MSWIN_
+    } else
+	WIN32_svcHandler(fdwControl);
+    return TRUE;
+#endif
 }
 
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
 {
     SERVICE_TABLE_ENTRY DispatchTable[] = {
 	{NULL, SquidMain},
 	{NULL, NULL}
     };
     char *c;
-    
-    if ((argc == 2) && strstr(argv[1], _WIN_SQUID_SERVICE_OPTION)){
+
+    if ((argc == 2) && strstr(argv[1], _WIN_SQUID_SERVICE_OPTION)) {
 	WIN32_run_mode = _WIN_SQUID_RUN_MODE_SERVICE;
-	if (!(c=strchr(argv[1],':'))){
+	if (!(c = strchr(argv[1], ':'))) {
 	    fprintf(stderr, "Bad Service Parameter: %s\n", argv[1]);
 	    return 1;
 	}
-	WIN32_Service_name = xstrdup(c+1);
-	DispatchTable[0].lpServiceName=WIN32_Service_name;
-    	if (!StartServiceCtrlDispatcher(DispatchTable)) {
+	WIN32_Service_name = xstrdup(c + 1);
+	DispatchTable[0].lpServiceName = WIN32_Service_name;
+	if (!StartServiceCtrlDispatcher(DispatchTable)) {
 	    fprintf(stderr, "StartServiceCtrlDispatcher error = %ld\n",
 		GetLastError());
 	    return 1;
 	}
     } else {
-    	WIN32_run_mode = _WIN_SQUID_RUN_MODE_INTERACTIVE;
+	WIN32_run_mode = _WIN_SQUID_RUN_MODE_INTERACTIVE;
 	SquidMain(argc, argv);
     }
     return 0;
@@ -576,7 +619,8 @@
 #if defined(_SQUID_MSWIN_)
 static int s_iInitCount = 0;
 
-static int Win32SockInit(void)
+static int
+Win32SockInit(void)
 {
     int iVersionRequested;
     WSADATA wsaData;
@@ -585,8 +629,7 @@
     if (s_iInitCount > 0) {
 	s_iInitCount++;
 	return (0);
-    }
-    else if (s_iInitCount < 0)
+    } else if (s_iInitCount < 0)
 	return (s_iInitCount);
     /* s_iInitCount == 0. Do the initailization */
     iVersionRequested = MAKEWORD(2, 0);
@@ -595,22 +638,23 @@
 	s_iInitCount = -1;
 	return (s_iInitCount);
     }
-    if (LOBYTE(wsaData.wVersion) != 2 ||
-	HIBYTE(wsaData.wVersion) != 0) {
+    if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) {
 	s_iInitCount = -2;
 	WSACleanup();
 	return (s_iInitCount);
     }
-    debug(1,1)("Windows sockets initialised");
+    debug(1, 1) ("Windows sockets initialised");
     s_iInitCount++;
     return (s_iInitCount);
 }
 
-static void Win32SockCleanup(void)
+static void
+Win32SockCleanup(void)
 {
     if (--s_iInitCount == 0)
 	WSACleanup();
     return;
 }
+
 #endif /* End native Windows NT EXPERIMENTAL PORT */
 #endif
Index: squid/test-suite/hash.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/hash.c,v
retrieving revision 1.1.1.1.44.1
retrieving revision 1.1.1.1.44.1.2.1
diff -u -r1.1.1.1.44.1 -r1.1.1.1.44.1.2.1
--- squid/test-suite/hash.c	6 Jan 2001 12:40:17 -0000	1.1.1.1.44.1
+++ squid/test-suite/hash.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.44.1.2.1
@@ -1,6 +1,5 @@
-
 /*
- * $Id: hash.c,v 1.1.1.1.44.1 2001/01/06 12:40:17 hno Exp $
+ * $Id: hash.c,v 1.1.1.1.44.1.2.1 2001/08/27 21:48:22 tolsty Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -39,7 +38,7 @@
 #include <assert.h>
 #include "hash.h"
 #undef free
-extern void my_free(char *, int , void *);
+extern void my_free(char *, int, void *);
 
 #define free(a) my_free(__FILE__, __LINE__, a)
 
@@ -176,7 +175,7 @@
     /* Add to the given hash table 'hid' */
     new = calloc(1, sizeof(hash_link));
     if (!new) {
-	fprintf(stderr,"calloc failed!\n");
+	fprintf(stderr, "calloc failed!\n");
 	print_stats();
 	exit(1);
     }
@@ -298,7 +297,7 @@
 		hid->current_ptr = walker->next;
 	    if (FreeLink) {
 		if (walker) {
-		free(walker);
+		    free(walker);
 		}
 	    }
 	    return 0;
@@ -337,10 +336,10 @@
 void
 hashFreeMemory(hash_table * hid)
 {
-	if (hid->buckets);
+    if (hid->buckets);
     free(hid->buckets);
-	if (hid)
-    free(hid);
+    if (hid)
+	free(hid);
 }
 
 
@@ -371,8 +370,7 @@
 
     while (fgets(buf, BUFSIZ, stdin)) {
 	buf[strlen(buf) - 1] = '\0';
-	printf("Inserting '%s' for item %p to hash table: %d\n",
-	    buf, buf, hid);
+	printf("Inserting '%s' for item %p to hash table: %d\n", buf, buf, hid);
 	hash_insert(hid, xstrdup(buf), (void *) 0x12345678);
 	if (random() % 17 == 0)
 	    strcpy(todelete, buf);
@@ -402,4 +400,3 @@
     exit(0);
 }
 #endif
-
Index: squid/test-suite/hash.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/hash.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/test-suite/hash.h	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/test-suite/hash.h	27 Aug 2001 21:48:22 -0000	1.1.1.1.76.1
@@ -1,6 +1,7 @@
-#define  DEFAULT_HASH_SIZE 7951     
+#define  DEFAULT_HASH_SIZE 7951
 typedef unsigned int HASHHASH(const void *, unsigned int);
-struct _hash_link {  
+struct _hash_link
+{
     char *key;
     struct _hash_link *next;
     void *item;
@@ -9,7 +10,8 @@
 
 typedef struct _hash_link hash_link;
 
-struct _hash_table {
+struct _hash_table
+{
     int valid;
     hash_link **buckets;
     HASHCMP *cmp;
@@ -17,17 +19,17 @@
     unsigned int size;
     unsigned int current_slot;
     hash_link *current_ptr;
-};  
+};
 typedef struct _hash_table hash_table;
 
 extern int hash_links_allocated;
-extern int store_hash_buckets;        /* 0 */
-extern hash_table *store_table;       /* NULL */
+extern int store_hash_buckets;	/* 0 */
+extern hash_table *store_table;	/* NULL */
 extern hash_table *hash_create(HASHCMP *, int, HASHHASH *);
 extern void hash_insert(hash_table *, const char *, void *);
 extern int hash_delete(hash_table *, const char *);
 int hash_delete_link(hash_table *, hash_link *);
-int hash_unlink(hash_table *,hash_link *, int);
+int hash_unlink(hash_table *, hash_link *, int);
 void hash_join(hash_table *, hash_link *);
 int hash_remove_link(hash_table *, hash_link *);
 hash_link *hash_lookup(hash_table *, const void *);
Index: squid/test-suite/membanger.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/membanger.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/test-suite/membanger.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/test-suite/membanger.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.76.1
@@ -39,7 +39,7 @@
 
 int i;
 int a;
-int run_stats=0;
+int run_stats = 0;
 void *my_xmalloc(size_t);
 void *my_xcalloc(int, size_t);
 int my_xfree(void *);
@@ -49,163 +49,176 @@
 #define xfree my_xfree
 
 int *size2id_array[2];
-int size2id_len=0;
-int size2id_alloc=0;
+int size2id_len = 0;
+int size2id_alloc = 0;
 
-typedef struct {
-	char orig_ptr[32];
-	void *my_ptr;
+typedef struct
+{
+    char orig_ptr[32];
+    void *my_ptr;
 #ifdef WITH_LIB
-	MemPool *pool;
+    MemPool *pool;
 #endif
-	int size;
-} memitem;
+    int size;
+}
+memitem;
 
-struct {
-	int mallocs,frees,callocs,reallocs;
-} mstat;
+struct
+{
+    int mallocs, frees, callocs, reallocs;
+}
+mstat;
 
 memitem *mi;
 void size2id(size_t, memitem *);
 void badformat();
 void init_stats(), print_stats();
-void my_hash_insert(hash_table *h, const char *k, memitem *item);
-static void *xmemAlloc(memitem *item);
-static void xmemFree(memitem *item);
+void my_hash_insert(hash_table * h, const char *k, memitem * item);
+static void *xmemAlloc(memitem * item);
+static void xmemFree(memitem * item);
 
-int 
-ptrcmp(const void *a,const void *b) 
+int
+ptrcmp(const void *a, const void *b)
 {
-	return (strcmp(a,b));
+    return (strcmp(a, b));
 }
 
-main(int argc,char **argv)
+main(int argc, char **argv)
 {
     char c;
-    extern char *optarg; 
+    extern char *optarg;
     malloc_options = "A";
-    a=0;
+    a = 0;
     while ((c = getopt(argc, argv, "f:i:M:l:m:r:N")) != -1) {
-      switch (c) {
+	switch (c) {
 	case 'N':
-	   mem_pools_on=0;
-	   break;
+	    mem_pools_on = 0;
+	    break;
 	case 'r':
-	  run_stats=atoi(optarg);
-	  break;
+	    run_stats = atoi(optarg);
+	    break;
 	case 'f':
-	  fn=strdup(optarg);
-	  fp=fopen(fn,"r");
-	  break;
+	    fn = strdup(optarg);
+	    fp = fopen(fn, "r");
+	    break;
 	case 'i':
-	  initsiz=atoi(optarg);
-	  break;
+	    initsiz = atoi(optarg);
+	    break;
 	case 'l':
-	  mem_max_size = atoi(optarg)*1024*1024;
-	  break;
+	    mem_max_size = atoi(optarg) * 1024 * 1024;
+	    break;
 	case 'M':
-	  maxsiz=atoi(optarg);
-	  break;
+	    maxsiz = atoi(optarg);
+	    break;
 	case 'm':
-	  minchunk=atoi(optarg);
-	  break;
+	    minchunk = atoi(optarg);
+	    break;
 	default:
-  	  fprintf(stderr,
-		"Usage: %s -f file -M maxsiz -i initsiz -m minchunk",argv[0]);
-	  exit(1);
-      }
-	
+	    fprintf(stderr,
+		"Usage: %s -f file -M maxsiz -i initsiz -m minchunk", argv[0]);
+	    exit(1);
+	}
+
     }
     if (!fp) {
 	fprintf(stderr,
-		"%s pummels %s\n%s . o O ( You't supply a valid tracefile.)\n",
-			argv[0], getenv("USER"), argv[0]);
+	    "%s pummels %s\n%s . o O ( You't supply a valid tracefile.)\n",
+	    argv[0], getenv("USER"), argv[0]);
 	exit(1);
     }
 #ifdef WITH_LIB
     sizeToPoolInit();
 #endif
-    mem_table = hash_create(ptrcmp, 229, hash4);         /* small hash table */
+    mem_table = hash_create(ptrcmp, 229, hash4);	/* small hash table */
     init_stats();
-    while (fgets(mbuf, 256, fp)!=NULL) {
-	if (run_stats>0 && (++a)%run_stats==0) print_stats();
-	p=NULL;
-	switch(mbuf[0]) {
-	case 'm': /* malloc */
-	   p=strtok(&mbuf[2],":");
-	   if (!p) badformat();
-	   size=atoi(p);
-	   p=strtok(NULL,"\n");
-	   if (!p) badformat();
-	   mi=malloc(sizeof(memitem)); 
-	   strcpy(mi->orig_ptr,p);
-	   mi->size=size;
-	   size2id(size,mi);
-	   mi->my_ptr = xmemAlloc(mi); /* (void *)xmalloc(size); */
-	   assert(mi->my_ptr);
-	   my_hash_insert(mem_table, mi->orig_ptr, mi);
-	   mstat.mallocs++;
-	   break;
-	case 'c': /* calloc */
-	   p=strtok(&mbuf[2],":");
-	   if (!p) badformat();
-	   amt=atoi(p);
-	   p=strtok(NULL,":");
-	   if (!p) badformat();
-	   size=atoi(p);
-	   p=strtok(NULL,"\n");
-	   if (!p) badformat();
-           mi=malloc(sizeof(memitem));
-	   strcpy(mi->orig_ptr,p);
-	   size2id(size,mi);
-           mi->size=amt*size;
-           mi->my_ptr= xmemAlloc(mi); /*(void *)xmalloc(amt*size);*/
-	   assert(mi->my_ptr);
-	   my_hash_insert(mem_table, mi->orig_ptr, mi);
-	   mstat.callocs++;
-	   break;
+    while (fgets(mbuf, 256, fp) != NULL) {
+	if (run_stats > 0 && (++a) % run_stats == 0)
+	    print_stats();
+	p = NULL;
+	switch (mbuf[0]) {
+	case 'm':		/* malloc */
+	    p = strtok(&mbuf[2], ":");
+	    if (!p)
+		badformat();
+	    size = atoi(p);
+	    p = strtok(NULL, "\n");
+	    if (!p)
+		badformat();
+	    mi = malloc(sizeof(memitem));
+	    strcpy(mi->orig_ptr, p);
+	    mi->size = size;
+	    size2id(size, mi);
+	    mi->my_ptr = xmemAlloc(mi);	/* (void *)xmalloc(size); */
+	    assert(mi->my_ptr);
+	    my_hash_insert(mem_table, mi->orig_ptr, mi);
+	    mstat.mallocs++;
+	    break;
+	case 'c':		/* calloc */
+	    p = strtok(&mbuf[2], ":");
+	    if (!p)
+		badformat();
+	    amt = atoi(p);
+	    p = strtok(NULL, ":");
+	    if (!p)
+		badformat();
+	    size = atoi(p);
+	    p = strtok(NULL, "\n");
+	    if (!p)
+		badformat();
+	    mi = malloc(sizeof(memitem));
+	    strcpy(mi->orig_ptr, p);
+	    size2id(size, mi);
+	    mi->size = amt * size;
+	    mi->my_ptr = xmemAlloc(mi);	/*(void *)xmalloc(amt*size); */
+	    assert(mi->my_ptr);
+	    my_hash_insert(mem_table, mi->orig_ptr, mi);
+	    mstat.callocs++;
+	    break;
 	case 'r':
-           p=strtok(&mbuf[2],":");
-	   if (!p) badformat();
-	   strcpy(abuf,p);
-           p=strtok(NULL,":");
-	   if (!p) badformat();
-	   mem_entry=hash_lookup(mem_table, p);
-           if (mem_entry==NULL) {
-                fprintf(stderr,"invalid realloc (%s)!\n",p);
+	    p = strtok(&mbuf[2], ":");
+	    if (!p)
+		badformat();
+	    strcpy(abuf, p);
+	    p = strtok(NULL, ":");
+	    if (!p)
+		badformat();
+	    mem_entry = hash_lookup(mem_table, p);
+	    if (mem_entry == NULL) {
+		fprintf(stderr, "invalid realloc (%s)!\n", p);
 		break;
-           }
-	   mi=(memitem *)(mem_entry->item);
-	   assert(mi->pool);
-	   assert(mi->my_ptr);
-	   xmemFree(mi); /* xfree(mi->my_ptr); */
-	   size2id(atoi(p),mi);   /* we don't need it here I guess? */
-           strcpy(mi->orig_ptr,abuf);
-	   p=strtok(NULL,"\n");
-	   if (!p) badformat();
-	   mi->my_ptr= xmemAlloc(mi); /* (char *)xmalloc(atoi(p)); */
-	   assert(mi->my_ptr);
-	   mstat.reallocs++;
-	   break;
+	    }
+	    mi = (memitem *) (mem_entry->item);
+	    assert(mi->pool);
+	    assert(mi->my_ptr);
+	    xmemFree(mi);	/* xfree(mi->my_ptr); */
+	    size2id(atoi(p), mi);	/* we don't need it here I guess? */
+	    strcpy(mi->orig_ptr, abuf);
+	    p = strtok(NULL, "\n");
+	    if (!p)
+		badformat();
+	    mi->my_ptr = xmemAlloc(mi);	/* (char *)xmalloc(atoi(p)); */
+	    assert(mi->my_ptr);
+	    mstat.reallocs++;
+	    break;
 	case 'f':
-	   p=strtok(&mbuf[2],"\n");
-	   mem_entry=hash_lookup(mem_table, p);		
-	   if (mem_entry==NULL) {
-		if (p[0]!='0')
-		fprintf(stderr,"invalid free (%s) at line %d!\n",p,a);
+	    p = strtok(&mbuf[2], "\n");
+	    mem_entry = hash_lookup(mem_table, p);
+	    if (mem_entry == NULL) {
+		if (p[0] != '0')
+		    fprintf(stderr, "invalid free (%s) at line %d!\n", p, a);
 		break;
-	   }
-	   mi=(memitem *)(mem_entry->item);
-	   assert(mi->pool);
-	   assert(mi->my_ptr);
-	   xmemFree(mi); /* xfree(mi->my_ptr); */ 
-	   hash_unlink(mem_table, mem_entry, 1);
-	   free(mi);
-	   mstat.frees++;
-	   break;
+	    }
+	    mi = (memitem *) (mem_entry->item);
+	    assert(mi->pool);
+	    assert(mi->my_ptr);
+	    xmemFree(mi);	/* xfree(mi->my_ptr); */
+	    hash_unlink(mem_table, mem_entry, 1);
+	    free(mi);
+	    mstat.frees++;
+	    break;
 	default:
-		fprintf(stderr,"%s pummels %s.bad.format\n", argv[0],fn);
-		exit(1);
+	    fprintf(stderr, "%s pummels %s.bad.format\n", argv[0], fn);
+	    exit(1);
 	}
 
     }
@@ -216,19 +229,19 @@
 void *
 my_xmalloc(size_t a)
 {
-	return NULL;
+    return NULL;
 }
 
 void *
 my_xcalloc(int a, size_t b)
 {
-	return NULL;
+    return NULL;
 }
 
 int
 my_xfree(void *p)
 {
-	return 0;
+    return 0;
 }
 void
 init_stats()
@@ -240,36 +253,36 @@
 print_stats()
 {
 #ifdef WITH_LIB
-        memReport(stdout); 
+    memReport(stdout);
 #endif
-	getrusage(RUSAGE_SELF, &myusage);
-	printf("m/c/f/r=%d/%d/%d/%d\n",mstat.mallocs,mstat.callocs,
-					mstat.frees, mstat.reallocs);
+    getrusage(RUSAGE_SELF, &myusage);
+    printf("m/c/f/r=%d/%d/%d/%d\n", mstat.mallocs, mstat.callocs,
+	mstat.frees, mstat.reallocs);
 #if 0
-	printf("types                 : %d\n",size2id_len);
+    printf("types                 : %d\n", size2id_len);
 #endif
-	printf("user time used        : %d.%d\n", (int)myusage.ru_utime.tv_sec,
-						(int)myusage.ru_utime.tv_usec);
-	printf("system time used      : %d.%d\n", (int)myusage.ru_stime.tv_sec,
-                                                (int)myusage.ru_stime.tv_usec);
-	printf("max resident set size : %d\n",(int)myusage.ru_maxrss);
-	printf("page faults           : %d\n", (int)myusage.ru_majflt);
+    printf("user time used        : %d.%d\n", (int) myusage.ru_utime.tv_sec,
+	(int) myusage.ru_utime.tv_usec);
+    printf("system time used      : %d.%d\n", (int) myusage.ru_stime.tv_sec,
+	(int) myusage.ru_stime.tv_usec);
+    printf("max resident set size : %d\n", (int) myusage.ru_maxrss);
+    printf("page faults           : %d\n", (int) myusage.ru_majflt);
 }
 
 void
-size2id(size_t sz,memitem *mi)
+size2id(size_t sz, memitem * mi)
 {
 #ifdef WITH_LIB
-	mi->pool = sizeToPool(sz);
-	assert(mi->pool);
+    mi->pool = sizeToPool(sz);
+    assert(mi->pool);
 #endif
-	return;
+    return;
 }
 
 void
 badformat()
 {
-    fprintf(stderr,"pummel.bad.format\n");
+    fprintf(stderr, "pummel.bad.format\n");
     exit(1);
 }
 
@@ -277,22 +290,22 @@
 const char *
 make_nam(int id, int size)
 {
-    const char *buf = malloc(30); /* argh */
-    sprintf((char *)buf, "pl:%d/%d", id, size);
+    const char *buf = malloc(30);	/* argh */
+    sprintf((char *) buf, "pl:%d/%d", id, size);
     return buf;
 }
 
 void
-my_hash_insert(hash_table *h, const char *k, memitem *item)
-{	
-	memitem *l;
-	assert( item->pool);
-	assert( item->my_ptr);	
-	hash_insert(h,k,item);
+my_hash_insert(hash_table * h, const char *k, memitem * item)
+{
+    memitem *l;
+    assert(item->pool);
+    assert(item->my_ptr);
+    hash_insert(h, k, item);
 }
 
 static void *
-xmemAlloc(memitem *item)
+xmemAlloc(memitem * item)
 {
     extern MemPool *StringPool;
     assert(item && item->pool);
@@ -303,23 +316,24 @@
 }
 
 static void
-xmemFree(memitem *item)
+xmemFree(memitem * item)
 {
     extern MemPool *StringPool;
     assert(item && item->pool);
     if (StringPool == item->pool)
-        return memStringFree(item->pool, item->my_ptr, item->size);
+	return memStringFree(item->pool, item->my_ptr, item->size);
     else
-        return memFree(item->pool, item->my_ptr);
+	return memFree(item->pool, item->my_ptr);
 }
 
-void my_free(char *file, int line, void *ptr)
+void
+my_free(char *file, int line, void *ptr)
 {
 #if 0
-fprintf(stderr,"{%s:%d:%p",file,line,ptr);
+    fprintf(stderr, "{%s:%d:%p", file, line, ptr);
 #endif
-free(ptr);
-#if 0 
-fprintf(stderr,"}\n");
+    free(ptr);
+#if 0
+    fprintf(stderr, "}\n");
 #endif
 }
Index: squid/test-suite/pconn-banger.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/pconn-banger.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/test-suite/pconn-banger.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/test-suite/pconn-banger.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.76.1
@@ -1,6 +1,4 @@
-
 #include "config.h"
-
 /*
  * On some systems, FD_SETSIZE is set to something lower than the
  * actual number of files which can be opened.  IRIX is one case,
@@ -112,7 +110,8 @@
 
 #define REPLY_HDR_SZ 8192
 
-struct _r {
+struct _r
+{
     char url[1024];
     int content_length;
     int hdr_length;
@@ -167,7 +166,6 @@
 }
 
 int
-
 open_http_socket(void)
 {
     int s;
@@ -191,7 +189,7 @@
 int
 send_request(int fd, const char *data)
 {
-    char msg[4096],buf[4096];
+    char msg[4096], buf[4096];
     int len;
     time_t w;
     struct _r *r;
@@ -200,24 +198,24 @@
     char *tmp = strdup(data);
     struct stat st;
     int file_fd = -1;
-    method=strtok(tmp, " ");
-    url=strtok(NULL, " ");
-    file=strtok(NULL, " ");
-    size=strtok(NULL, " ");
-    checksum=strtok(NULL, " ");
+    method = strtok(tmp, " ");
+    url = strtok(NULL, " ");
+    file = strtok(NULL, " ");
+    size = strtok(NULL, " ");
+    checksum = strtok(NULL, " ");
     if (!url) {
-      url=method;
-      method="GET";
+	url = method;
+	method = "GET";
     }
-    if (file && strcmp(file,"-")==0)
-	file=NULL;
-    if (size && strcmp(size,"-")==0)
-	size=NULL;
-    if (checksum && strcmp(checksum,"-")==0)
-	checksum=NULL;
+    if (file && strcmp(file, "-") == 0)
+	file = NULL;
+    if (size && strcmp(size, "-") == 0)
+	size = NULL;
+    if (checksum && strcmp(checksum, "-") == 0)
+	checksum = NULL;
     msg[0] = '\0';
     sprintf(buf, "%s %s HTTP/1.0\r\n", method, url);
-    strcat(msg,buf);
+    strcat(msg, buf);
     strcat(msg, "Accept: */*\r\n");
     strcat(msg, "Proxy-Connection: Keep-Alive\r\n");
     if (opt_ims && (lrand48() & 0x03) == 0) {
@@ -226,11 +224,11 @@
 	strcat(msg, buf);
     }
     if (file) {
-	if ( (file_fd = open(file,O_RDONLY)) < 0) {
+	if ((file_fd = open(file, O_RDONLY)) < 0) {
 	    perror("open");
 	    return -1;
 	}
-	if ( fstat(file_fd, &st) ) {
+	if (fstat(file_fd, &st)) {
 	    perror("fstat");
 	    close(file_fd);
 	    return -1;
@@ -247,7 +245,7 @@
 	return -1;
     }
     if (file) {
-	while((len=read(file_fd, buf, sizeof buf)) > 0) {
+	while ((len = read(file_fd, buf, sizeof buf)) > 0) {
 	    if (write(fd, buf, len) < 0) {
 		close(fd);
 		perror("body write");
@@ -302,8 +300,8 @@
 	    t += strlen(hdr);
 	    while (isspace(*t))
 		t++;
-	    strcpy(result,"");
-	    strncat(result,t,strcspn(t, crlf));
+	    strcpy(result, "");
+	    strncat(result, t, strcspn(t, crlf));
 	    return result;
 	}
     }
@@ -315,20 +313,19 @@
 {
 #if 0
     fprintf(stderr, "DONE: %s, (%d+%d)\n",
-	    r->url,
-	    r->hdr_length,
-	    r->content_length);
+	r->url, r->hdr_length, r->content_length);
 #endif
     if (r->content_length != r->bytes_read)
 	fprintf(stderr, "ERROR! Short reply, expected %d bytes got %d\n",
 	    r->content_length, r->bytes_read);
     else if (r->validsize >= 0) {
 	if (r->validsize != r->bytes_read)
-	    fprintf(stderr, "WARNING: %s Object size mismatch, expected %d got %d\n",
-		    r->url, r->validsize, r->bytes_read);
+	    fprintf(stderr,
+		"WARNING: %s Object size mismatch, expected %d got %d\n",
+		r->url, r->validsize, r->bytes_read);
 	else if (opt_checksum && r->sum != r->validsum)
 	    fprintf(stderr, "WARNING: %s Checksum error. Expected %d got %d\n",
-		    r->url, r->validsum, r->sum);
+		r->url, r->validsum, r->sum);
     }
 }
 int
@@ -338,21 +335,22 @@
     const char *end;
     const char *url;
     static char buf[READ_BUF_SZ];
-    int hlen,blen;
-    if (len < 0 ) {
+    int hlen, blen;
+    if (len < 0) {
 	perror("read");
 	Requests = r->next;
 	request_done(r);
 	free(r);
 	noutstanding--;
 	if (trace_fd >= 0)
-	    write(trace_fd,"\n[CLOSED]\n",10);
+	    write(trace_fd, "\n[CLOSED]\n", 10);
 	return -1;
     }
     total_bytes_read += len;
-    xmemcpy(buf,inbuf,len);
+    xmemcpy(buf, inbuf, len);
     if (len == 0) {
-	fprintf(stderr, "WARNING: %s, server closed socket after %d+%d bytes\n", r->url, r->hdr_offset, r->bytes_read);
+	fprintf(stderr, "WARNING: %s, server closed socket after %d+%d bytes\n",
+	    r->url, r->hdr_offset, r->bytes_read);
 	/* XXX, If no data was received and it isn't the first request on this
 	 * connection then the request should be restarted rather than aborted
 	 * but this is a simple test program an not a full blown HTTP client.
@@ -377,13 +375,15 @@
 	    xmemmove(buf, buf + hlen, len);
 	}
 	/* Process headers */
-	if (r->hdr_length == 0 && (end = mime_headers_end(r->reply_hdrs)) != NULL) {
+	if (r->hdr_length == 0
+	    && (end = mime_headers_end(r->reply_hdrs)) != NULL) {
 #if 0
-	    fprintf(stderr, "FOUND EOH FOR %s\n", r->url); */
+	    fprintf(stderr, "FOUND EOH FOR %s\n", r->url);
+	    */
 #endif
-	    r->hdr_length = end - r->reply_hdrs;
+		r->hdr_length = end - r->reply_hdrs;
 #if 0
- 	    fprintf(stderr, "HDR_LENGTH = %d\n", r->hdr_length);
+	    fprintf(stderr, "HDR_LENGTH = %d\n", r->hdr_length);
 #endif
 	    /* "unread" any body contents received */
 	    blen = r->hdr_offset - r->hdr_length;
@@ -393,20 +393,22 @@
 		xmemcpy(buf, r->reply_hdrs + r->hdr_length, blen);
 		len += blen;
 	    }
-	    r->reply_hdrs[r->hdr_length]='\0'; /* Null terminate headers */
+	    r->reply_hdrs[r->hdr_length] = '\0';	/* Null terminate headers */
 	    /* Parse headers */
-	    r->content_length = get_header_int_value("content-length:", r->reply_hdrs, end);
+	    r->content_length =
+		get_header_int_value("content-length:", r->reply_hdrs, end);
 /*	    fprintf(stderr, "CONTENT_LENGTH = %d\n", r->content_length); */
 	    url = get_header_string_value("X-Request-URI:", r->reply_hdrs, end);
 	    if (url != NULL && strcmp(r->url, url) != 0)
 		fprintf(stderr, "WARNING: %s got reply %s\n", r->url, url);
 #if XREQUESTURI || 0
-	    fprintf(stderr, "LOCATION = %s\n", get_header_string_value("X-Request-URI:", r->reply_hdrs, end));  
+	    fprintf(stderr, "LOCATION = %s\n",
+		get_header_string_value("X-Request-URI:", r->reply_hdrs, end));
 #endif
 	}
-	if ( !(len==0 || r->hdr_length > 0) ) {
+	if (!(len == 0 || r->hdr_length > 0)) {
 	    fprintf(stderr, "ERROR!!!\n");
-	    assert((len==0 || r->hdr_length > 0));
+	    assert((len == 0 || r->hdr_length > 0));
 	}
 	/* Process body */
 	if (r->hdr_length != 0) {
@@ -415,14 +417,14 @@
 	    if (r->content_length >= 0) {
 		bytes_left = r->content_length - r->bytes_read;
 		assert(bytes_left >= 0);
-	    	bytes_used = len < bytes_left ? len : bytes_left;
+		bytes_used = len < bytes_left ? len : bytes_left;
 	    } else {
-		bytes_left = len + 1; /* Unknown end... */
+		bytes_left = len + 1;	/* Unknown end... */
 		bytes_used = len;
 	    }
 	    if (opt_checksum) {
-		for(i=0; i<bytes_used; i++)
-		    r->sum += (int)buf[i] & 0xFF;
+		for (i = 0; i < bytes_used; i++)
+		    r->sum += (int) buf[i] & 0xFF;
 	    }
 	    r->bytes_read += bytes_used;
 	    len -= bytes_used;
@@ -462,7 +464,7 @@
     static int pconn_fd = -1;
     static char buf[8192];
     struct timeval to;
-    struct timeval now,last,start;
+    struct timeval now, last, start;
     fd_set R;
     struct _r *r;
     struct _r *nextr;
@@ -480,10 +482,10 @@
     }
     while (!done_reading_urls || noutstanding) {
 	if (!opt_reopen && pconn_fd < 0) {
-	    fprintf(stderr,"TERMINATED: Connection closed\n");
+	    fprintf(stderr, "TERMINATED: Connection closed\n");
 	    break;
 	}
-	if (pconn_fd<0) {
+	if (pconn_fd < 0) {
 	    pconn_fd = open_http_socket();
 	    if (pconn_fd < 0) {
 		perror("socket");
@@ -491,14 +493,14 @@
 	    }
 	    nextr = Requests;
 	    Requests = NULL;
-	    noutstanding=0;
+	    noutstanding = 0;
 	    while ((r = nextr) != NULL) {
 		nextr = r->next;
 		if (send_request(pconn_fd, r->url) != 0) {
 		    close(pconn_fd);
-		    pconn_fd=-1;
+		    pconn_fd = -1;
 		    nextr = r;
-		    for (r = Requests; r!=NULL && r->next; r=r->next);
+		    for (r = Requests; r != NULL && r->next; r = r->next);
 		    if (r != NULL)
 			r->next = nextr;
 		    else
@@ -508,7 +510,7 @@
 		free(r);
 	    }
 	    timeouts = 0;
-	    if (pconn_fd <0)
+	    if (pconn_fd < 0)
 		continue;
 	}
 	if (timeouts == 200) {
@@ -520,7 +522,8 @@
 	    free(r);
 	    noutstanding--;
 	}
-	if (pconn_fd>=0 && noutstanding < max_outstanding && !done_reading_urls) {
+	if (pconn_fd >= 0 && noutstanding < max_outstanding
+	    && !done_reading_urls) {
 	    char *t;
 	    if (fgets(buf, 8191, stdin) == NULL) {
 		fprintf(stderr, "Done Reading URLS\n");
@@ -532,7 +535,7 @@
 		*t = '\0';
 	    if (send_request(pconn_fd, buf) != 0) {
 		close(pconn_fd);
-		pconn_fd=-1;
+		pconn_fd = -1;
 		continue;
 	    }
 	    nrequests++;
@@ -560,21 +563,19 @@
 		pconn_fd = -1;
 	}
 	gettimeofday(&now, NULL);
-        if (now.tv_sec > last.tv_sec) {
+	if (now.tv_sec > last.tv_sec) {
 	    int dt;
 	    int nreq;
 	    last = now;
 	    dt = (int) (now.tv_sec - start.tv_sec);
-	    nreq=0;
-	    for (r=Requests; r ; r=r->next) nreq++;
-	    printf("T+ %6d: %9d req (%+4d), %4d pend, %3d/sec avg, %dmb, %dkb/sec avg\n",
-		    dt,
-		    nrequests,
-		    reqpersec,
-		    nreq,
-		    (int) (nrequests / dt),
-		    (int)total_bytes_read / 1024 / 1024,
-		    (int)total_bytes_read / 1024 / dt);
+	    nreq = 0;
+	    for (r = Requests; r; r = r->next)
+		nreq++;
+	    printf
+		("T+ %6d: %9d req (%+4d), %4d pend, %3d/sec avg, %dmb, %dkb/sec avg\n",
+		dt, nrequests, reqpersec, nreq, (int) (nrequests / dt),
+		(int) total_bytes_read / 1024 / 1024,
+		(int) total_bytes_read / 1024 / dt);
 	    reqpersec = 0;
 	}
     }
@@ -583,7 +584,9 @@
 void
 usage(void)
 {
-    fprintf(stderr, "usage: %s: -p port -h host -n max -t tracefile -i -c -l lifetime\n", progname);
+    fprintf(stderr,
+	"usage: %s: -p port -h host -n max -t tracefile -i -c -l lifetime\n",
+	progname);
 }
 
 int
@@ -616,7 +619,7 @@
 	    lifetime = (time_t) atoi(optarg);
 	    break;
 	case 't':
-	    trace_fd = open(optarg,O_WRONLY|O_CREAT|O_TRUNC,0666);
+	    trace_fd = open(optarg, O_WRONLY | O_CREAT | O_TRUNC, 0666);
 	    break;
 	case 'r':
 	    opt_reopen = !opt_reopen;
Index: squid/test-suite/tcp-banger2.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/tcp-banger2.c,v
retrieving revision 1.1.1.3.30.1
retrieving revision 1.1.1.3.30.1.2.1
diff -u -r1.1.1.3.30.1 -r1.1.1.3.30.1.2.1
--- squid/test-suite/tcp-banger2.c	6 Jan 2001 12:40:17 -0000	1.1.1.3.30.1
+++ squid/test-suite/tcp-banger2.c	27 Aug 2001 21:48:22 -0000	1.1.1.3.30.1.2.1
@@ -1,7 +1,5 @@
 #include "config.h"
-
-/* $Id: tcp-banger2.c,v 1.1.1.3.30.1 2001/01/06 12:40:17 hno Exp $ */
-
+/* $Id: tcp-banger2.c,v 1.1.1.3.30.1.2.1 2001/08/27 21:48:22 tolsty Exp $ */
 /*
  * On some systems, FD_SETSIZE is set to something lower than the
  * actual number of files which can be opened.  IRIX is one case,
@@ -111,13 +109,15 @@
 
 typedef void (CB) (int, void *);
 
-struct _f {
+struct _f
+{
     CB *cb;
     CB *ccb;
     void *data;
     time_t start;
 };
-struct _request {
+struct _request
+{
     int fd;
     char *url;
     char method[16];
@@ -229,7 +229,8 @@
 		    r->content_length = atoi(header + 15);
 		else if (strncasecmp(header, "X-Request-URI:", 14) == 0) {
 		    /* Check URI */
-		    if (strncmp(r->url, header + 15, strcspn(header + 15, "\r\n"))) {
+		    if (strncmp(r->url, header + 15, strcspn(header + 15,
+				"\r\n"))) {
 			char url[8192];
 			strncpy(url, header + 15, strcspn(header + 15, "\r\n"));
 			url[strcspn(header + 15, "\r\n")] = '\n';
@@ -272,19 +273,22 @@
 	    r->url, r->bodysize, r->content_length);
     else if (r->validsize >= 0) {
 	if (r->validsize != r->bodysize)
-	    fprintf(stderr, "WARNING: %s size mismatch wanted %d bytes got %d\n",
-		r->url, r->validsize, r->bodysize);
+	    fprintf(stderr,
+		"WARNING: %s size mismatch wanted %d bytes got %d\n", r->url,
+		r->validsize, r->bodysize);
 	else if (opt_checksum && r->validsum != r->sum)
-	    fprintf(stderr, "WARNING: %s invalid checksum wanted 0x%lx got 0x%lx\n",
-		r->url, r->validsum, r->sum);
+	    fprintf(stderr,
+		"WARNING: %s invalid checksum wanted 0x%lx got 0x%lx\n", r->url,
+		r->validsum, r->sum);
     }
     if (trace_file) {
 	if (opt_checksum)
 	    fprintf(trace_file, "%s %s %d %s %d 0x%lx\n",
-		r->method, r->url, r->status, r->requestbodyfile, r->bodysize, r->sum);
+		r->method, r->url, r->status, r->requestbodyfile, r->bodysize,
+		r->sum);
 	else
-	    fprintf(trace_file, "%s %s %d %s %d\n",
-		r->method, r->url, r->status, r->requestbodyfile, r->bodysize);
+	    fprintf(trace_file, "%s %s %d %s %d\n", r->method, r->url,
+		r->status, r->requestbodyfile, r->bodysize);
     }
     free_request(r);
 }
@@ -464,7 +468,8 @@
     fprintf(stderr, " -t <tracefile>  Save request trace\n");
     fprintf(stderr, " -c              Check checksum agains trace\n");
     fprintf(stderr, " -i              Send random If-Modified-Since times\n");
-    fprintf(stderr, " -l <seconds>    Connection lifetime timeout (default 60)\n");
+    fprintf(stderr,
+	" -l <seconds>    Connection lifetime timeout (default 60)\n");
     fprintf(stderr, " -a              Accelerator mode\n");
 }
 
@@ -569,12 +574,9 @@
 	if (now.tv_sec > last.tv_sec) {
 	    last = now;
 	    dt = (int) (now.tv_sec - start.tv_sec);
-	    printf("T+ %6d: %9d req (%+4d), %4d conn, %3d/sec avg, %dmb, %dkb/sec avg\n",
-		dt,
-		nrequests,
-		reqpersec,
-		nfds,
-		(int) (nrequests / dt),
+	    printf
+		("T+ %6d: %9d req (%+4d), %4d conn, %3d/sec avg, %dmb, %dkb/sec avg\n",
+		dt, nrequests, reqpersec, nfds, (int) (nrequests / dt),
 		(int) total_bytes_read / 1024 / 1024,
 		(int) total_bytes_read / 1024 / dt);
 	    reqpersec = 0;
Index: squid/test-suite/tcp-banger3.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/tcp-banger3.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.76.1
diff -u -r1.1.1.2 -r1.1.1.2.76.1
--- squid/test-suite/tcp-banger3.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/test-suite/tcp-banger3.c	27 Aug 2001 21:48:22 -0000	1.1.1.2.76.1
@@ -1,5 +1,4 @@
 #include "config.h"
-
 /*
  * On some systems, FD_SETSIZE is set to something lower than the
  * actual number of files which can be opened.  IRIX is one case,
@@ -88,7 +87,8 @@
 #define READ_BUF_SZ 4096
 #define URL_BUF_SZ 4096
 
-struct _thing {
+struct _thing
+{
     int rfd;
     int wfd;
     int state;
@@ -150,7 +150,8 @@
     S.sin_port = htons(port);
     S.sin_family = AF_INET;
     if (debug)
-	fprintf(stderr, "%s (%s) %d %s\n", host, inet_ntoa(S.sin_addr), (int) port, path);
+	fprintf(stderr, "%s (%s) %d %s\n", host, inet_ntoa(S.sin_addr),
+	    (int) port, path);
     s = socket(PF_INET, SOCK_STREAM, 0);
     if (s < 0) {
 	perror("socket");
@@ -164,11 +165,7 @@
     snprintf(request, URL_BUF_SZ,
 	"GET %s HTTP/1.1\r\n"
 	"Accept: */*\r\n"
-	"Host: %s\r\n"
-	"Connection: close\r\n"
-	"\r\n",
-	path,
-	host);
+	"Host: %s\r\n" "Connection: close\r\n" "\r\n", path, host);
     x = write(s, request, strlen(request));
     if (x < 0) {
 	perror("write");
@@ -192,7 +189,8 @@
     struct timeval t1;
     struct timeval t2;
     if (debug)
-	fprintf(stderr, "Child PID %d entering child_main_loop\n", (int) getpid());
+	fprintf(stderr, "Child PID %d entering child_main_loop\n",
+	    (int) getpid());
     setbuf(stdin, NULL);
     setbuf(stdout, NULL);
     setbuf(stderr, NULL);
@@ -263,8 +261,7 @@
 	t = create_a_thing(argv);
 	assert(t);
 	if (debug)
-	    fprintf(stderr, "Thing #%d on FD %d/%d\n",
-		i, t->rfd, t->wfd);
+	    fprintf(stderr, "Thing #%d on FD %d/%d\n", i, t->rfd, t->wfd);
 	*T = t;
 	T = &t->next;
     }
@@ -305,7 +302,8 @@
     if (x < 0)
 	perror("write");
     if (debug)
-	fprintf(stderr, "dispatched URL to thing PID %d, %d bytes\n", (int) t->pid, x);
+	fprintf(stderr, "dispatched URL to thing PID %d, %d bytes\n",
+	    (int) t->pid, x);
     strncpy(t->url, url, URL_BUF_SZ);
     if ((s = strchr(t->url, '\n')))
 	*s = '\0';
@@ -325,7 +323,8 @@
 	perror("read");
     } else if (2 == sscanf(buf, "%d %d", &i, &j)) {
 	gettimeofday(&now, NULL);
-	printf("%d.%06d %9d %9d %s\n", (int) now.tv_sec, (int) now.tv_usec, i, j, t->url);
+	printf("%d.%06d %9d %9d %s\n", (int) now.tv_sec, (int) now.tv_usec, i,
+	    j, t->url);
     }
     t->state = 0;
     FD_CLR(t->rfd, &R1);
@@ -382,7 +381,7 @@
     signal(SIGCHLD, sig_child);
     create_children(argv);
     parent_main_loop();
-    for (i=3;i<=maxfd; i++)
+    for (i = 3; i <= maxfd; i++)
 	close(i);
     sleep(1);
 }
Index: squid/test-suite/waiter.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/test-suite/waiter.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.76.1
diff -u -r1.1.1.1 -r1.1.1.1.76.1
--- squid/test-suite/waiter.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/test-suite/waiter.c	27 Aug 2001 21:48:22 -0000	1.1.1.1.76.1
@@ -1,24 +1,23 @@
 #include <sys/time.h>
 #include <assert.h>
-
 int
 main(int argc, char *argv[])
 {
-	int i;
-	struct timeval now;
-	struct timeval alarm;
-	struct timeval to;
-	assert(argc == 2);
-	i = atoi(argv[1]);
-	gettimeofday(&now, NULL);
-	alarm.tv_sec = now.tv_sec + i + (now.tv_sec % i);
-	alarm.tv_usec = 0;
-	to.tv_sec = alarm.tv_sec - now.tv_sec;
-	to.tv_usec = alarm.tv_usec - now.tv_usec;
-	if (to.tv_usec < 0) {
-		to.tv_usec += 1000000;
-		to.tv_sec -= 1;
-	}
-	select(1, NULL, NULL, NULL, &to);
-	return 0;
+    int i;
+    struct timeval now;
+    struct timeval alarm;
+    struct timeval to;
+    assert(argc == 2);
+    i = atoi(argv[1]);
+    gettimeofday(&now, NULL);
+    alarm.tv_sec = now.tv_sec + i + (now.tv_sec % i);
+    alarm.tv_usec = 0;
+    to.tv_sec = alarm.tv_sec - now.tv_sec;
+    to.tv_usec = alarm.tv_usec - now.tv_usec;
+    if (to.tv_usec < 0) {
+	to.tv_usec += 1000000;
+	to.tv_sec -= 1;
+    }
+    select(1, NULL, NULL, NULL, &to);
+    return 0;
 }
Index: squid/win/cf.data.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/Attic/cf.data.mak,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/cf.data.mak	25 Mar 2001 16:55:30 -0000	1.1.2.1
+++ squid/win/cf.data.mak	27 Aug 2001 21:48:22 -0000	1.1.2.1.2.1
@@ -13,7 +13,7 @@
 #
 SQUID_EXE	= squid$(exec_suffix)
 CLIENT_EXE	= client$(exec_suffix)
-DNSSERVER_EXE	= dnsserver.dll
+DNSSERVER_EXE	= dnsserver$(exec_suffix)
 UNLINKD_EXE	= unlinkd$(exec_suffix)
 PINGER_EXE	= pinger$(exec_suffix)
 CACHEMGR_EXE	= cachemgr$(cgi_suffix)
Index: squid/win/resource.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/Attic/resource.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/resource.h	6 Jan 2001 12:40:17 -0000	1.1.2.1
+++ squid/win/resource.h	27 Aug 2001 21:48:22 -0000	1.1.2.1.2.1
@@ -7,7 +7,7 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_RESOURCE_VALUE        102
 #define _APS_NEXT_COMMAND_VALUE         40001
 #define _APS_NEXT_CONTROL_VALUE         1000
 #define _APS_NEXT_SYMED_VALUE           101
Index: squid/win/squid.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/Attic/squid.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/squid.rc	6 Jan 2001 12:40:17 -0000	1.1.2.1
+++ squid/win/squid.rc	27 Aug 2001 21:48:22 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - Main executable\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "squid\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
             VALUE "OriginalFilename", "squid.exe\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/win/update.bat
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/Attic/update.bat,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/update.bat	30 Jun 2001 18:47:21 -0000	1.1.2.1
+++ squid/win/update.bat	27 Aug 2001 21:48:22 -0000	1.1.2.1.2.1
@@ -1,11 +1,17 @@
 @echo off
-if %1==release net stop "SquidNT2.3"
+rem if %1==release net stop "Squid"
+net stop "SquidNT2.3"
 copy %0\..\squidnt\%1\squid.exe %2\squid.exe
-copy %0\..\dnsserver\%1\dnsserver.dll %2\dnsserver.dll
-copy %0\..\..\auth_modules\NT\%1\nt_auth.dll %2\nt_auth.dll
-copy %0\..\..\auth_modules\NCSA\%1\ncsa_auth.dll %2\ncsa_auth.dll
-copy %0\..\..\auth_modules\ldap\%1\ldap_auth.dll %2\ldap_auth.dll
+copy %0\..\dnsserver\%1\dnsserver.exe %2\dnsserver.exe
+copy %0\..\..\auth_modules\NT\%1\nt_auth.exe %2\nt_auth.exe
+copy %0\..\..\auth_modules\NCSA\%1\ncsa_auth.exe %2\ncsa_auth.exe
+copy %0\..\..\auth_modules\ldap\%1\ldap_auth.exe %2\ldap_auth.exe
 copy %0\..\..\contrib\htpasswd\%1\htpasswd.exe %2\htpasswd.exe
-copy %0\..\cachemgr\%1\cachemgr.exe %2\cgi-bin\cachemgr.cgi
-copy %0\..\..\contrib\chpasswd\%1\chpasswd.exe %2\cgi-bin\chpasswd.cgi
-if %1==release net start "SquidNT2.3"
+copy %0\..\cachemgr\%1\cachemgr.exe %2\cachemgr.cgi
+copy %0\..\cachemgr\%1\cachemgr.exe %2\cachemgr.exe
+copy %0\..\..\contrib\chpasswd\%1\chpasswd.exe %2\chpasswd.cgi
+copy %0\..\unlinkd\%1\unlinkd.exe %2\unlinkd.exe
+copy %0\..\pinger\%1\pinger.exe %2\pinger.exe
+copy %0\..\client\%1\client.exe %2\client.exe
+if /i %1==release net start "Squid"
+rem net start "SquidNT2.3"
Index: squid/win/win.dsw
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/Attic/win.dsw,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.4.2.1
diff -u -r1.1.2.4 -r1.1.2.4.2.1
--- squid/win/win.dsw	15 Jul 2001 08:49:37 -0000	1.1.2.4
+++ squid/win/win.dsw	27 Aug 2001 21:48:22 -0000	1.1.2.4.2.1
@@ -3,7 +3,7 @@
 
 ###############################################################################
 
-Project: "LDAP_auth"="..\auth_modules\LDAP\LDAP_auth.dsp" - Package Owner=<4>
+Project: "LDAP_auth"=..\auth_modules\LDAP\LDAP_auth.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,7 +18,7 @@
 
 ###############################################################################
 
-Project: "NCSA_auth"="..\auth_modules\NCSA\NCSA_auth.dsp" - Package Owner=<4>
+Project: "NCSA_auth"=..\auth_modules\NCSA\NCSA_auth.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -27,19 +27,19 @@
 Package=<4>
 {{{
     Begin Project Dependency
-    Project_Dep_Name miscutil
-    End Project Dependency
-    Begin Project Dependency
     Project_Dep_Name chpasswd
     End Project Dependency
     Begin Project Dependency
     Project_Dep_Name htpasswd
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name miscutil
+    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "NT_auth"="..\auth_modules\NT\NT_auth.dsp" - Package Owner=<4>
+Project: "NT_auth"=..\auth_modules\NT\NT_auth.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -66,7 +66,7 @@
 
 ###############################################################################
 
-Project: "cachemgr"=".\cachemgr\cachemgr.dsp" - Package Owner=<4>
+Project: "cachemgr"=.\cachemgr\cachemgr.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -81,7 +81,7 @@
 
 ###############################################################################
 
-Project: "cf_data"=".\cf_data.dsp" - Package Owner=<4>
+Project: "cf_data"=.\cf_data.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -93,7 +93,7 @@
 
 ###############################################################################
 
-Project: "cf_gen"=".\cf_gen\cf_gen.dsp" - Package Owner=<4>
+Project: "cf_gen"=.\cf_gen\cf_gen.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -108,7 +108,7 @@
 
 ###############################################################################
 
-Project: "chpasswd"="..\contrib\chpasswd\chpasswd.dsp" - Package Owner=<4>
+Project: "chpasswd"=..\contrib\chpasswd\chpasswd.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -120,7 +120,7 @@
 
 ###############################################################################
 
-Project: "dnsserver"=".\dnsserver\dnsserver.dsp" - Package Owner=<4>
+Project: "client"=.\client\client.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -135,7 +135,7 @@
 
 ###############################################################################
 
-Project: "htpasswd"="..\contrib\htpasswd\htpasswd.dsp" - Package Owner=<4>
+Project: "dnsserver"=.\dnsserver\dnsserver.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -143,11 +143,14 @@
 
 Package=<4>
 {{{
+    Begin Project Dependency
+    Project_Dep_Name miscutil
+    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "libregex"=".\libregex\libregex.dsp" - Package Owner=<4>
+Project: "htpasswd"=..\contrib\htpasswd\htpasswd.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -159,7 +162,7 @@
 
 ###############################################################################
 
-Project: "libsnmp"=".\libsnmp\libsnmp.dsp" - Package Owner=<4>
+Project: "libregex"=.\libregex\libregex.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -171,7 +174,19 @@
 
 ###############################################################################
 
-Project: "miscutil"=".\miscutil\miscutil.dsp" - Package Owner=<4>
+Project: "libsnmp"=.\libsnmp\libsnmp.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "miscutil"=.\miscutil\miscutil.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -182,11 +197,29 @@
     Begin Project Dependency
     Project_Dep_Name libregex
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name Perl Preprocessing
+    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "squid_conf"=".\squid_conf.dsp" - Package Owner=<4>
+Project: "pinger"=.\pinger\pinger.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name miscutil
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "squid_conf"=.\squid_conf.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -204,7 +237,7 @@
 
 ###############################################################################
 
-Project: "squidnt"=".\squidnt\squidnt.dsp" - Package Owner=<4>
+Project: "squidnt"=.\squidnt\squidnt.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -228,9 +261,6 @@
     Project_Dep_Name cachemgr
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name dnsserver
-    End Project Dependency
-    Begin Project Dependency
     Project_Dep_Name LDAP_auth
     End Project Dependency
     Begin Project Dependency
@@ -240,12 +270,45 @@
     Project_Dep_Name squid_conf
     End Project Dependency
     Begin Project Dependency
+    Project_Dep_Name dnsserver
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name unlinkd
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name client
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pinger
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name chpasswd
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name htpasswd
+    End Project Dependency
+    Begin Project Dependency
     Project_Dep_Name libsnmp
     End Project Dependency
 }}}
 
 ###############################################################################
 
+Project: "unlinkd"=.\unlinkd\unlinkd.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name miscutil
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Global:
 
 Package=<5>
Index: squid/win/cachemgr/cachemgr.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/cachemgr/Attic/cachemgr.dsp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/cachemgr/cachemgr.dsp	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/win/cachemgr/cachemgr.dsp	27 Aug 2001 21:48:22 -0000	1.1.2.3.2.1
@@ -50,7 +50,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\\"
+# ADD LINK32 kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\\"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "cachemgr - Win32 Debug"
@@ -67,7 +67,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
@@ -75,7 +75,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\\"
+# ADD LINK32 kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\\"
 
 !ENDIF 
 
Index: squid/win/cachemgr/cachemgr.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/cachemgr/Attic/cachemgr.mak,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/cachemgr/cachemgr.mak	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/win/cachemgr/cachemgr.mak	27 Aug 2001 21:48:22 -0000	1.1.2.3.2.1
@@ -66,7 +66,7 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cachemgr.pdb" /machine:I386 /out:"$(OUTDIR)\cachemgr.exe" /libpath:"..\\" 
+LINK32_FLAGS=kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cachemgr.pdb" /machine:I386 /out:"$(OUTDIR)\cachemgr.exe" /libpath:"..\\" 
 LINK32_OBJS= \
 	"$(INTDIR)\cachemgr.obj" \
 	"$(INTDIR)\cachemgr.res" \
@@ -87,11 +87,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\cachemgr.exe"
+ALL : "$(OUTDIR)\cachemgr.exe" "$(OUTDIR)\cachemgr.bsc"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Debug" "$(OUTDIR)\cachemgr.exe"
+ALL : "miscutil - Win32 Debug" "$(OUTDIR)\cachemgr.exe" "$(OUTDIR)\cachemgr.bsc"
 
 !ENDIF 
 
@@ -102,8 +102,10 @@
 !ENDIF 
 	-@erase "$(INTDIR)\cachemgr.obj"
 	-@erase "$(INTDIR)\cachemgr.res"
+	-@erase "$(INTDIR)\cachemgr.sbr"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
+	-@erase "$(OUTDIR)\cachemgr.bsc"
 	-@erase "$(OUTDIR)\cachemgr.exe"
 	-@erase "$(OUTDIR)\cachemgr.ilk"
 	-@erase "$(OUTDIR)\cachemgr.pdb"
@@ -111,14 +113,20 @@
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\cachemgr.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\cachemgr.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 RSC_PROJ=/l 0x409 /fo"$(INTDIR)\cachemgr.res" /d "_DEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\cachemgr.bsc" 
 BSC32_SBRS= \
-	
+	"$(INTDIR)\cachemgr.sbr"
+
+"$(OUTDIR)\cachemgr.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\cachemgr.pdb" /debug /machine:I386 /out:"$(OUTDIR)\cachemgr.exe" /pdbtype:sept /libpath:"..\\" 
+LINK32_FLAGS=kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\cachemgr.pdb" /debug /machine:I386 /out:"$(OUTDIR)\cachemgr.exe" /pdbtype:sept /libpath:"..\\" 
 LINK32_OBJS= \
 	"$(INTDIR)\cachemgr.obj" \
 	"$(INTDIR)\cachemgr.res" \
@@ -174,10 +182,22 @@
 !IF "$(CFG)" == "cachemgr - Win32 Release" || "$(CFG)" == "cachemgr - Win32 Debug"
 SOURCE=..\..\src\cachemgr.c
 
+!IF  "$(CFG)" == "cachemgr - Win32 Release"
+
+
 "$(INTDIR)\cachemgr.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "cachemgr - Win32 Debug"
+
+
+"$(INTDIR)\cachemgr.obj"	"$(INTDIR)\cachemgr.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=.\cachemgr.rc
 
 "$(INTDIR)\cachemgr.res" : $(SOURCE) "$(INTDIR)"
Index: squid/win/cachemgr/cachemgr.rc
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/cachemgr/Attic/cachemgr.rc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/cachemgr/cachemgr.rc	6 Jan 2001 12:40:17 -0000	1.1.2.1
+++ squid/win/cachemgr/cachemgr.rc	27 Aug 2001 21:48:22 -0000	1.1.2.1.2.1
@@ -49,13 +49,13 @@
             VALUE "FileDescription", "SquidNT - CGI Cache Manager\0"
             VALUE "FileVersion", "1, 0, 0, 1\0"
             VALUE "InternalName", "cachemgr\0"
-            VALUE "LegalCopyright", "Romeo Anghelache & Guido Serassio\0"
+            VALUE "LegalCopyright", "Romeo Anghelache, Guido Serassio & Andrey Shorin\0"
             VALUE "LegalTrademarks", "GNU gpl\0"
             VALUE "OriginalFilename", "cachemgr.exe\0"
-            VALUE "PrivateBuild", "STABLE4\0"
+            VALUE "PrivateBuild", "STABLE5\0"
             VALUE "ProductName", "Squid Proxy Server for Windows NT\0"
             VALUE "ProductVersion", "2.3\0"
-            VALUE "SpecialBuild", "STABLE4\0"
+            VALUE "SpecialBuild", "STABLE5\0"
         END
     END
     BLOCK "VarFileInfo"
Index: squid/win/cf_gen/cf_gen.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/cf_gen/Attic/cf_gen.dsp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/win/cf_gen/cf_gen.dsp	25 Mar 2001 16:55:30 -0000	1.1.2.2
+++ squid/win/cf_gen/cf_gen.dsp	27 Aug 2001 21:48:23 -0000	1.1.2.2.2.1
@@ -50,7 +50,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib advapi32.lib /nologo /subsystem:console /machine:I386
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "cf_gen - Win32 Debug"
@@ -75,7 +75,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
Index: squid/win/cf_gen/cf_gen.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/cf_gen/Attic/cf_gen.mak,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -u -r1.1.2.2 -r1.1.2.2.2.1
--- squid/win/cf_gen/cf_gen.mak	25 Mar 2001 16:55:30 -0000	1.1.2.2
+++ squid/win/cf_gen/cf_gen.mak	27 Aug 2001 21:48:23 -0000	1.1.2.2.2.1
@@ -36,10 +36,21 @@
 OutDir=.\Release
 # End Custom Macros
 
+!IF "$(RECURSE)" == "0" 
+
 ALL : "$(OUTDIR)\cf_gen.exe"
 
+!ELSE 
+
+ALL : "miscutil - Win32 Release" "$(OUTDIR)\cf_gen.exe"
 
+!ENDIF 
+
+!IF "$(RECURSE)" == "1" 
+CLEAN :"miscutil - Win32 ReleaseCLEAN" 
+!ELSE 
 CLEAN :
+!ENDIF 
 	-@erase "$(INTDIR)\cf_gen.obj"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(OUTDIR)\cf_gen.exe"
@@ -53,9 +64,10 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cf_gen.pdb" /machine:I386 /out:"$(OUTDIR)\cf_gen.exe" 
+LINK32_FLAGS=kernel32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cf_gen.pdb" /machine:I386 /out:"$(OUTDIR)\cf_gen.exe" 
 LINK32_OBJS= \
-	"$(INTDIR)\cf_gen.obj"
+	"$(INTDIR)\cf_gen.obj" \
+	"..\miscutil\Release\miscutil.lib"
 
 "$(OUTDIR)\cf_gen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
@@ -70,10 +82,21 @@
 OutDir=.\Debug
 # End Custom Macros
 
+!IF "$(RECURSE)" == "0" 
+
 ALL : "$(OUTDIR)\cf_gen.exe"
 
+!ELSE 
 
+ALL : "miscutil - Win32 Debug" "$(OUTDIR)\cf_gen.exe"
+
+!ENDIF 
+
+!IF "$(RECURSE)" == "1" 
+CLEAN :"miscutil - Win32 DebugCLEAN" 
+!ELSE 
 CLEAN :
+!ENDIF 
 	-@erase "$(INTDIR)\cf_gen.obj"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
@@ -90,9 +113,10 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\cf_gen.pdb" /debug /machine:I386 /out:"$(OUTDIR)\cf_gen.exe" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\cf_gen.pdb" /debug /machine:I386 /out:"$(OUTDIR)\cf_gen.exe" /pdbtype:sept 
 LINK32_OBJS= \
-	"$(INTDIR)\cf_gen.obj"
+	"$(INTDIR)\cf_gen.obj" \
+	"..\miscutil\Debug\miscutil.lib"
 
 "$(OUTDIR)\cf_gen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
@@ -148,6 +172,32 @@
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!IF  "$(CFG)" == "cf_gen - Win32 Release"
+
+"miscutil - Win32 Release" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" 
+   cd "..\cf_gen"
+
+"miscutil - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\cf_gen"
+
+!ELSEIF  "$(CFG)" == "cf_gen - Win32 Debug"
+
+"miscutil - Win32 Debug" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" 
+   cd "..\cf_gen"
+
+"miscutil - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\cf_gen"
+
+!ENDIF 
+
 
 !ENDIF 
 
Index: squid/win/dnsserver/dnsserver.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/dnsserver/Attic/dnsserver.dsp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/dnsserver/dnsserver.dsp	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/win/dnsserver/dnsserver.dsp	27 Aug 2001 21:48:23 -0000	1.1.2.3.2.1
@@ -2,7 +2,7 @@
 # Microsoft Developer Studio Generated Build File, Format Version 6.00
 # ** DO NOT EDIT **
 
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
 
 CFG=dnsserver - Win32 Debug
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,
@@ -17,8 +17,8 @@
 !MESSAGE 
 !MESSAGE Possible choices for configuration are:
 !MESSAGE 
-!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Console Application")
 !MESSAGE 
 
 # Begin Project
@@ -26,60 +26,55 @@
 # PROP Scc_ProjName ""
 # PROP Scc_LocalPath ""
 CPP=cl.exe
-MTL=midl.exe
 RSC=rc.exe
 
 !IF  "$(CFG)" == "dnsserver - Win32 Release"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Output_Dir "dnsserver___Win32_Release"
+# PROP BASE Intermediate_Dir "dnsserver___Win32_Release"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "Release"
 # PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../include" /I "../" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "NDEBUG"
-# ADD RSC /l 0x410 /d "NDEBUG"
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib /nologo /dll /machine:I386
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386
 
 !ELSEIF  "$(CFG)" == "dnsserver - Win32 Debug"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Output_Dir "dnsserver___Win32_Debug"
+# PROP BASE Intermediate_Dir "dnsserver___Win32_Debug"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "Debug"
 # PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 1
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x410 /d "_DEBUG"
-# ADD RSC /l 0x410 /d "_DEBUG"
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
 
 !ENDIF 
 
@@ -102,10 +97,6 @@
 # Begin Group "Resource Files"
 
 # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\dnsserver.rc
-# End Source File
 # End Group
 # End Target
 # End Project
Index: squid/win/dnsserver/dnsserver.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/dnsserver/Attic/dnsserver.mak,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/dnsserver/dnsserver.mak	30 Jun 2001 18:42:07 -0000	1.1.2.3
+++ squid/win/dnsserver/dnsserver.mak	27 Aug 2001 21:48:23 -0000	1.1.2.3.2.1
@@ -13,8 +13,8 @@
 !MESSAGE 
 !MESSAGE Possible choices for configuration are:
 !MESSAGE 
-!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Console Application")
 !MESSAGE 
 !ERROR An invalid configuration is specified.
 !ENDIF 
@@ -26,7 +26,6 @@
 !ENDIF 
 
 CPP=cl.exe
-MTL=midl.exe
 RSC=rc.exe
 
 !IF  "$(CFG)" == "dnsserver - Win32 Release"
@@ -39,11 +38,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\dnsserver.dll"
+ALL : "$(OUTDIR)\dnsserver.exe"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Release" "$(OUTDIR)\dnsserver.dll"
+ALL : "miscutil - Win32 Release" "$(OUTDIR)\dnsserver.exe"
 
 !ENDIF 
 
@@ -53,29 +52,24 @@
 CLEAN :
 !ENDIF 
 	-@erase "$(INTDIR)\dnsserver.obj"
-	-@erase "$(INTDIR)\dnsserver.res"
 	-@erase "$(INTDIR)\vc60.idb"
-	-@erase "$(OUTDIR)\dnsserver.dll"
-	-@erase "$(OUTDIR)\dnsserver.exp"
+	-@erase "$(OUTDIR)\dnsserver.exe"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../include" /I "../" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /Fp"$(INTDIR)\dnsserver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\dnsserver.res" /d "NDEBUG" 
+CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dnsserver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\dnsserver.bsc" 
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\dnsserver.pdb" /machine:I386 /out:"$(OUTDIR)\dnsserver.dll" /implib:"$(OUTDIR)\dnsserver.lib" 
+LINK32_FLAGS=kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dnsserver.pdb" /machine:I386 /out:"$(OUTDIR)\dnsserver.exe" 
 LINK32_OBJS= \
 	"$(INTDIR)\dnsserver.obj" \
-	"$(INTDIR)\dnsserver.res" \
 	"..\miscutil\Release\miscutil.lib"
 
-"$(OUTDIR)\dnsserver.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\dnsserver.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -90,11 +84,11 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\dnsserver.dll"
+ALL : "$(OUTDIR)\dnsserver.exe"
 
 !ELSE 
 
-ALL : "miscutil - Win32 Debug" "$(OUTDIR)\dnsserver.dll"
+ALL : "miscutil - Win32 Debug" "$(OUTDIR)\dnsserver.exe"
 
 !ENDIF 
 
@@ -104,32 +98,27 @@
 CLEAN :
 !ENDIF 
 	-@erase "$(INTDIR)\dnsserver.obj"
-	-@erase "$(INTDIR)\dnsserver.res"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
-	-@erase "$(OUTDIR)\dnsserver.dll"
-	-@erase "$(OUTDIR)\dnsserver.exp"
+	-@erase "$(OUTDIR)\dnsserver.exe"
 	-@erase "$(OUTDIR)\dnsserver.ilk"
 	-@erase "$(OUTDIR)\dnsserver.pdb"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DNSSERVER_EXPORTS" /Fp"$(INTDIR)\dnsserver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
-RSC_PROJ=/l 0x410 /fo"$(INTDIR)\dnsserver.res" /d "_DEBUG" 
+CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dnsserver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\dnsserver.bsc" 
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dnsserver.pdb" /debug /machine:I386 /out:"$(OUTDIR)\dnsserver.dll" /implib:"$(OUTDIR)\dnsserver.lib" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib ws2_32.lib advapi32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dnsserver.pdb" /debug /machine:I386 /out:"$(OUTDIR)\dnsserver.exe" /pdbtype:sept 
 LINK32_OBJS= \
 	"$(INTDIR)\dnsserver.obj" \
-	"$(INTDIR)\dnsserver.res" \
 	"..\miscutil\Debug\miscutil.lib"
 
-"$(OUTDIR)\dnsserver.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+"$(OUTDIR)\dnsserver.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
@@ -183,12 +172,6 @@
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=.\dnsserver.rc
-
-"$(INTDIR)\dnsserver.res" : $(SOURCE) "$(INTDIR)"
-	$(RSC) $(RSC_PROJ) $(SOURCE)
-
-
 !IF  "$(CFG)" == "dnsserver - Win32 Release"
 
 "miscutil - Win32 Release" : 
Index: squid/win/libsnmp/libsnmp.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/libsnmp/Attic/libsnmp.dsp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/libsnmp/libsnmp.dsp	15 Jul 2001 08:49:38 -0000	1.1.2.1
+++ squid/win/libsnmp/libsnmp.dsp	27 Aug 2001 21:48:23 -0000	1.1.2.1.2.1
@@ -64,7 +64,7 @@
 # PROP Intermediate_Dir "Debug"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MT /W3 /Gm /GX /ZI /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D SQUID_SNMP=1 /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D SQUID_SNMP=1 /FR /YX /FD /GZ /c
 # ADD BASE RSC /l 0x410 /d "_DEBUG"
 # ADD RSC /l 0x410 /d "_DEBUG"
 BSC32=bscmake.exe
Index: squid/win/libsnmp/libsnmp.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/libsnmp/Attic/libsnmp.mak,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.2.1
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- squid/win/libsnmp/libsnmp.mak	15 Jul 2001 08:49:38 -0000	1.1.2.1
+++ squid/win/libsnmp/libsnmp.mak	27 Aug 2001 21:48:23 -0000	1.1.2.1.2.1
@@ -65,7 +65,7 @@
 LIB32=link.exe -lib
 LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libsnmp.lib" 
 LIB32_OBJS= \
-	"$(INTDIR)\snmplib_debug.obj" \
+	"$(INTDIR)\asn1.obj" \
 	"$(INTDIR)\coexistance.obj" \
 	"$(INTDIR)\mib.obj" \
 	"$(INTDIR)\parse.obj" \
@@ -75,7 +75,7 @@
 	"$(INTDIR)\snmp_msg.obj" \
 	"$(INTDIR)\snmp_pdu.obj" \
 	"$(INTDIR)\snmp_vars.obj" \
-	"$(INTDIR)\asn1.obj"
+	"$(INTDIR)\snmplib_debug.obj"
 
 "$(OUTDIR)\libsnmp.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
     $(LIB32) @<<
@@ -90,37 +90,65 @@
 OutDir=.\Debug
 # End Custom Macros
 
-ALL : "$(OUTDIR)\libsnmp.lib"
+ALL : "$(OUTDIR)\libsnmp.lib" "$(OUTDIR)\libsnmp.bsc"
 
 
 CLEAN :
 	-@erase "$(INTDIR)\asn1.obj"
+	-@erase "$(INTDIR)\asn1.sbr"
 	-@erase "$(INTDIR)\coexistance.obj"
+	-@erase "$(INTDIR)\coexistance.sbr"
 	-@erase "$(INTDIR)\mib.obj"
+	-@erase "$(INTDIR)\mib.sbr"
 	-@erase "$(INTDIR)\parse.obj"
+	-@erase "$(INTDIR)\parse.sbr"
 	-@erase "$(INTDIR)\snmp_api.obj"
+	-@erase "$(INTDIR)\snmp_api.sbr"
 	-@erase "$(INTDIR)\snmp_api_error.obj"
+	-@erase "$(INTDIR)\snmp_api_error.sbr"
 	-@erase "$(INTDIR)\snmp_error.obj"
+	-@erase "$(INTDIR)\snmp_error.sbr"
 	-@erase "$(INTDIR)\snmp_msg.obj"
+	-@erase "$(INTDIR)\snmp_msg.sbr"
 	-@erase "$(INTDIR)\snmp_pdu.obj"
+	-@erase "$(INTDIR)\snmp_pdu.sbr"
 	-@erase "$(INTDIR)\snmp_vars.obj"
+	-@erase "$(INTDIR)\snmp_vars.sbr"
 	-@erase "$(INTDIR)\snmplib_debug.obj"
+	-@erase "$(INTDIR)\snmplib_debug.sbr"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
+	-@erase "$(OUTDIR)\libsnmp.bsc"
 	-@erase "$(OUTDIR)\libsnmp.lib"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MT /W3 /Gm /GX /ZI /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D SQUID_SNMP=1 /Fp"$(INTDIR)\libsnmp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D SQUID_SNMP=1 /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libsnmp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\libsnmp.bsc" 
 BSC32_SBRS= \
-	
+	"$(INTDIR)\asn1.sbr" \
+	"$(INTDIR)\coexistance.sbr" \
+	"$(INTDIR)\mib.sbr" \
+	"$(INTDIR)\parse.sbr" \
+	"$(INTDIR)\snmp_api.sbr" \
+	"$(INTDIR)\snmp_api_error.sbr" \
+	"$(INTDIR)\snmp_error.sbr" \
+	"$(INTDIR)\snmp_msg.sbr" \
+	"$(INTDIR)\snmp_pdu.sbr" \
+	"$(INTDIR)\snmp_vars.sbr" \
+	"$(INTDIR)\snmplib_debug.sbr"
+
+"$(OUTDIR)\libsnmp.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
 LIB32=link.exe -lib
 LIB32_FLAGS=/nologo /out:"$(OUTDIR)\libsnmp.lib" 
 LIB32_OBJS= \
-	"$(INTDIR)\snmplib_debug.obj" \
+	"$(INTDIR)\asn1.obj" \
 	"$(INTDIR)\coexistance.obj" \
 	"$(INTDIR)\mib.obj" \
 	"$(INTDIR)\parse.obj" \
@@ -130,7 +158,7 @@
 	"$(INTDIR)\snmp_msg.obj" \
 	"$(INTDIR)\snmp_pdu.obj" \
 	"$(INTDIR)\snmp_vars.obj" \
-	"$(INTDIR)\asn1.obj"
+	"$(INTDIR)\snmplib_debug.obj"
 
 "$(OUTDIR)\libsnmp.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
     $(LIB32) @<<
@@ -182,70 +210,202 @@
 !IF "$(CFG)" == "libsnmp - Win32 Release" || "$(CFG)" == "libsnmp - Win32 Debug"
 SOURCE=..\..\snmplib\asn1.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\asn1.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\asn1.obj"	"$(INTDIR)\asn1.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\coexistance.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\coexistance.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\coexistance.obj"	"$(INTDIR)\coexistance.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\mib.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\mib.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\mib.obj"	"$(INTDIR)\mib.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\parse.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\parse.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\parse.obj"	"$(INTDIR)\parse.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_api.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_api.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_api.obj"	"$(INTDIR)\snmp_api.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_api_error.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_api_error.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_api_error.obj"	"$(INTDIR)\snmp_api_error.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_error.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_error.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_error.obj"	"$(INTDIR)\snmp_error.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_msg.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_msg.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_msg.obj"	"$(INTDIR)\snmp_msg.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_pdu.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_pdu.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_pdu.obj"	"$(INTDIR)\snmp_pdu.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmp_vars.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmp_vars.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmp_vars.obj"	"$(INTDIR)\snmp_vars.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\snmplib\snmplib_debug.c
 
+!IF  "$(CFG)" == "libsnmp - Win32 Release"
+
+
 "$(INTDIR)\snmplib_debug.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "libsnmp - Win32 Debug"
+
+
+"$(INTDIR)\snmplib_debug.obj"	"$(INTDIR)\snmplib_debug.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 
 !ENDIF 
 
Index: squid/win/miscutil/miscutil.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/miscutil/Attic/miscutil.dsp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/miscutil/miscutil.dsp	8 Jul 2001 10:32:00 -0000	1.1.2.3
+++ squid/win/miscutil/miscutil.dsp	27 Aug 2001 21:48:23 -0000	1.1.2.3.2.1
@@ -65,8 +65,7 @@
 # PROP Intermediate_Dir "Debug"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# SUBTRACT CPP /Fr
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /Fr /YX /FD /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
Index: squid/win/miscutil/miscutil.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/miscutil/Attic/miscutil.mak,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -u -r1.1.2.3 -r1.1.2.3.2.1
--- squid/win/miscutil/miscutil.mak	8 Jul 2001 10:32:00 -0000	1.1.2.3
+++ squid/win/miscutil/miscutil.mak	27 Aug 2001 21:48:23 -0000	1.1.2.3.2.1
@@ -61,7 +61,6 @@
 	-@erase "$(INTDIR)\iso3307.obj"
 	-@erase "$(INTDIR)\md5.obj"
 	-@erase "$(INTDIR)\radix.obj"
-	-@erase "$(INTDIR)\readdir.obj"
 	-@erase "$(INTDIR)\rfc1035.obj"
 	-@erase "$(INTDIR)\rfc1123.obj"
 	-@erase "$(INTDIR)\rfc1738.obj"
@@ -108,7 +107,6 @@
 	"$(INTDIR)\util.obj" \
 	"$(INTDIR)\uudecode.obj" \
 	"$(INTDIR)\win32lib.obj" \
-	"$(INTDIR)\readdir.obj" \
 	"..\libregex\Release\libregex.lib"
 
 "$(OUTDIR)\miscutil.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
@@ -149,7 +147,6 @@
 	-@erase "$(INTDIR)\iso3307.obj"
 	-@erase "$(INTDIR)\md5.obj"
 	-@erase "$(INTDIR)\radix.obj"
-	-@erase "$(INTDIR)\readdir.obj"
 	-@erase "$(INTDIR)\rfc1035.obj"
 	-@erase "$(INTDIR)\rfc1123.obj"
 	-@erase "$(INTDIR)\rfc1738.obj"
@@ -197,7 +194,6 @@
 	"$(INTDIR)\util.obj" \
 	"$(INTDIR)\uudecode.obj" \
 	"$(INTDIR)\win32lib.obj" \
-	"$(INTDIR)\readdir.obj" \
 	"..\libregex\Debug\libregex.lib"
 
 "$(OUTDIR)\miscutil.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
@@ -308,12 +304,6 @@
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\lib\readdir.c
-
-"$(INTDIR)\readdir.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
-
-
 SOURCE=..\..\lib\rfc1035.c
 
 "$(INTDIR)\rfc1035.obj" : $(SOURCE) "$(INTDIR)"
@@ -383,25 +373,25 @@
 !IF  "$(CFG)" == "miscutil - Win32 Release"
 
 "libregex - Win32 Release" : 
-   cd "\work\nt-2.3\win\libregex"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libregex.mak" CFG="libregex - Win32 Release" 
+   cd "\work\squidnt23\win\libregex"
+   $(MAKE) /$(MAKEFLAGS) /F .\libregex.mak CFG="libregex - Win32 Release" 
    cd "..\miscutil"
 
 "libregex - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\libregex"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libregex.mak" CFG="libregex - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\libregex"
+   $(MAKE) /$(MAKEFLAGS) /F .\libregex.mak CFG="libregex - Win32 Release" RECURSE=1 CLEAN 
    cd "..\miscutil"
 
 !ELSEIF  "$(CFG)" == "miscutil - Win32 Debug"
 
 "libregex - Win32 Debug" : 
-   cd "\work\nt-2.3\win\libregex"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libregex.mak" CFG="libregex - Win32 Debug" 
+   cd "\work\squidnt23\win\libregex"
+   $(MAKE) /$(MAKEFLAGS) /F .\libregex.mak CFG="libregex - Win32 Debug" 
    cd "..\miscutil"
 
 "libregex - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\libregex"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libregex.mak" CFG="libregex - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\libregex"
+   $(MAKE) /$(MAKEFLAGS) /F .\libregex.mak CFG="libregex - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\miscutil"
 
 !ENDIF 
Index: squid/win/squidnt/squidnt.dsp
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/squidnt/Attic/squidnt.dsp,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.5.2.1
diff -u -r1.1.2.5 -r1.1.2.5.2.1
--- squid/win/squidnt/squidnt.dsp	15 Jul 2001 08:49:38 -0000	1.1.2.5
+++ squid/win/squidnt/squidnt.dsp	27 Aug 2001 21:48:23 -0000	1.1.2.5.2.1
@@ -51,12 +51,12 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /machine:I386 /out:"Release/squid.exe"
-# SUBTRACT LINK32 /profile
+# ADD LINK32 kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /machine:I386 /out:"Release/squid.exe" /EXPORT:WIN32_sendSignal
+# SUBTRACT LINK32 /pdb:none
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy Squid files to run location
-PostBuild_Cmds=..\update.bat release e:\squid
+PostBuild_Cmds=..\update.bat release c:\squid
 # End Special Build Tool
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
@@ -73,8 +73,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /YX /FD /GZ /c
-# SUBTRACT CPP /Fr
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fr /YX /FD /GZ /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
@@ -82,12 +81,12 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 winwrap.lib kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/squid.exe" /pdbtype:sept
-# SUBTRACT LINK32 /profile
+# ADD LINK32 kernel32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/squid.exe" /pdbtype:sept /EXPORT:WIN32_sendSignal
+# SUBTRACT LINK32 /pdb:none
 # Begin Special Build Tool
 SOURCE="$(InputPath)"
 PostBuild_Desc=Copy Squid files to run location
-PostBuild_Cmds=..\update.bat debug e:\squid
+PostBuild_Cmds=..\update.bat debug c:\squid
 # End Special Build Tool
 
 !ENDIF 
@@ -109,6 +108,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\src\aiops.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\src\asn.c
 # End Source File
 # Begin Source File
@@ -309,6 +312,7 @@
 # Begin Source File
 
 SOURCE=..\..\src\leakfinder.c
+# PROP Exclude_From_Build 1
 # End Source File
 # Begin Source File
 
@@ -424,6 +428,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\src\store_io_asyncufs.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\src\store_io_ufs.c
 # End Source File
 # Begin Source File
Index: squid/win/squidnt/squidnt.mak
===================================================================
RCS file: /cvsroot/squid-sf//squid/win/squidnt/Attic/squidnt.mak,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.5.2.1
diff -u -r1.1.2.5 -r1.1.2.5.2.1
--- squid/win/squidnt/squidnt.mak	15 Jul 2001 08:49:38 -0000	1.1.2.5
+++ squid/win/squidnt/squidnt.mak	27 Aug 2001 21:48:23 -0000	1.1.2.5.2.1
@@ -42,17 +42,18 @@
 
 !ELSE 
 
-ALL : "libsnmp - Win32 Release" "squid_conf - Win32 Release" "Perl Preprocessing - Win32 Release" "LDAP_auth - Win32 Release" "dnsserver - Win32 Release" "cachemgr - Win32 Release" "NCSA_auth - Win32 Release" "NT_auth - Win32 Release" "miscutil - Win32 Release" "$(OUTDIR)\squid.exe"
+ALL : "libsnmp - Win32 Release" "htpasswd - Win32 Release" "chpasswd - Win32 Release" "pinger - Win32 Release" "client - Win32 Release" "unlinkd - Win32 Release" "dnsserver - Win32 Release" "squid_conf - Win32 Release" "Perl Preprocessing - Win32 Release" "LDAP_auth - Win32 Release" "cachemgr - Win32 Release" "NCSA_auth - Win32 Release" "NT_auth - Win32 Release" "miscutil - Win32 Release" "$(OUTDIR)\squid.exe"
 
 !ENDIF 
 
 !IF "$(RECURSE)" == "1" 
-CLEAN :"miscutil - Win32 ReleaseCLEAN" "NT_auth - Win32 ReleaseCLEAN" "NCSA_auth - Win32 ReleaseCLEAN" "cachemgr - Win32 ReleaseCLEAN" "dnsserver - Win32 ReleaseCLEAN" "LDAP_auth - Win32 ReleaseCLEAN" "Perl Preprocessing - Win32 ReleaseCLEAN" "squid_conf - Win32 ReleaseCLEAN" "libsnmp - Win32 ReleaseCLEAN" 
+CLEAN :"miscutil - Win32 ReleaseCLEAN" "NT_auth - Win32 ReleaseCLEAN" "NCSA_auth - Win32 ReleaseCLEAN" "cachemgr - Win32 ReleaseCLEAN" "LDAP_auth - Win32 ReleaseCLEAN" "Perl Preprocessing - Win32 ReleaseCLEAN" "squid_conf - Win32 ReleaseCLEAN" "dnsserver - Win32 ReleaseCLEAN" "unlinkd - Win32 ReleaseCLEAN" "client - Win32 ReleaseCLEAN" "pinger - Win32 ReleaseCLEAN" "chpasswd - Win32 ReleaseCLEAN" "htpasswd - Win32 ReleaseCLEAN" "libsnmp - Win32 ReleaseCLEAN" 
 !ELSE 
 CLEAN :
 !ENDIF 
 	-@erase "$(INTDIR)\access_log.obj"
 	-@erase "$(INTDIR)\acl.obj"
+	-@erase "$(INTDIR)\aiops.obj"
 	-@erase "$(INTDIR)\asn.obj"
 	-@erase "$(INTDIR)\async_io.obj"
 	-@erase "$(INTDIR)\authenticate.obj"
@@ -100,7 +101,6 @@
 	-@erase "$(INTDIR)\internal.obj"
 	-@erase "$(INTDIR)\ipc.obj"
 	-@erase "$(INTDIR)\ipcache.obj"
-	-@erase "$(INTDIR)\leakfinder.obj"
 	-@erase "$(INTDIR)\main.obj"
 	-@erase "$(INTDIR)\mem.obj"
 	-@erase "$(INTDIR)\MemBuf.obj"
@@ -130,6 +130,7 @@
 	-@erase "$(INTDIR)\store_dir.obj"
 	-@erase "$(INTDIR)\store_dir_ufs.obj"
 	-@erase "$(INTDIR)\store_io.obj"
+	-@erase "$(INTDIR)\store_io_asyncufs.obj"
 	-@erase "$(INTDIR)\store_io_ufs.obj"
 	-@erase "$(INTDIR)\store_key_md5.obj"
 	-@erase "$(INTDIR)\store_log.obj"
@@ -161,10 +162,11 @@
 BSC32_SBRS= \
 	
 LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\squid.pdb" /machine:I386 /out:"$(OUTDIR)\squid.exe" 
+LINK32_FLAGS=kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\squid.pdb" /machine:I386 /out:"$(OUTDIR)\squid.exe" /EXPORT:WIN32_sendSignal 
 LINK32_OBJS= \
 	"$(INTDIR)\access_log.obj" \
 	"$(INTDIR)\acl.obj" \
+	"$(INTDIR)\aiops.obj" \
 	"$(INTDIR)\asn.obj" \
 	"$(INTDIR)\async_io.obj" \
 	"$(INTDIR)\authenticate.obj" \
@@ -212,7 +214,6 @@
 	"$(INTDIR)\internal.obj" \
 	"$(INTDIR)\ipc.obj" \
 	"$(INTDIR)\ipcache.obj" \
-	"$(INTDIR)\leakfinder.obj" \
 	"$(INTDIR)\main.obj" \
 	"$(INTDIR)\mem.obj" \
 	"$(INTDIR)\MemBuf.obj" \
@@ -229,6 +230,8 @@
 	"$(INTDIR)\redirect.obj" \
 	"$(INTDIR)\refresh.obj" \
 	"$(INTDIR)\send-announce.obj" \
+	"$(INTDIR)\snmp_agent.obj" \
+	"$(INTDIR)\snmp_core.obj" \
 	"$(INTDIR)\ssl.obj" \
 	"$(INTDIR)\stat.obj" \
 	"$(INTDIR)\StatHist.obj" \
@@ -239,6 +242,7 @@
 	"$(INTDIR)\store_dir.obj" \
 	"$(INTDIR)\store_dir_ufs.obj" \
 	"$(INTDIR)\store_io.obj" \
+	"$(INTDIR)\store_io_asyncufs.obj" \
 	"$(INTDIR)\store_io_ufs.obj" \
 	"$(INTDIR)\store_key_md5.obj" \
 	"$(INTDIR)\store_log.obj" \
@@ -258,10 +262,8 @@
 	"$(INTDIR)\whois.obj" \
 	"$(INTDIR)\win32.obj" \
 	"$(INTDIR)\squid.res" \
-	"$(INTDIR)\snmp_core.obj" \
-	"$(INTDIR)\snmp_agent.obj" \
 	"..\miscutil\Release\miscutil.lib" \
-	"..\release\libsnmp.lib"
+	"..\libsnmp\Release\libsnmp.lib"
 
 "$(OUTDIR)\squid.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
@@ -278,8 +280,8 @@
 OutDir=.\Release
 # End Custom Macros
 
-$(DS_POSTBUILD_DEP) : "libsnmp - Win32 Release" "squid_conf - Win32 Release" "Perl Preprocessing - Win32 Release" "LDAP_auth - Win32 Release" "dnsserver - Win32 Release" "cachemgr - Win32 Release" "NCSA_auth - Win32 Release" "NT_auth - Win32 Release" "miscutil - Win32 Release" "$(OUTDIR)\squid.exe"
-   ..\update.bat release e:\squid
+$(DS_POSTBUILD_DEP) : "libsnmp - Win32 Release" "htpasswd - Win32 Release" "chpasswd - Win32 Release" "pinger - Win32 Release" "client - Win32 Release" "unlinkd - Win32 Release" "dnsserver - Win32 Release" "squid_conf - Win32 Release" "Perl Preprocessing - Win32 Release" "LDAP_auth - Win32 Release" "cachemgr - Win32 Release" "NCSA_auth - Win32 Release" "NT_auth - Win32 Release" "miscutil - Win32 Release" "$(OUTDIR)\squid.exe"
+   ..\update.bat release c:\squid
 	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
@@ -292,136 +294,338 @@
 
 !IF "$(RECURSE)" == "0" 
 
-ALL : "$(OUTDIR)\squid.exe"
+ALL : "$(OUTDIR)\squid.exe" "$(OUTDIR)\squidnt.bsc"
 
 !ELSE 
 
-ALL : "libsnmp - Win32 Debug" "squid_conf - Win32 Debug" "Perl Preprocessing - Win32 Debug" "LDAP_auth - Win32 Debug" "dnsserver - Win32 Debug" "cachemgr - Win32 Debug" "NCSA_auth - Win32 Debug" "NT_auth - Win32 Debug" "miscutil - Win32 Debug" "$(OUTDIR)\squid.exe"
+ALL : "libsnmp - Win32 Debug" "htpasswd - Win32 Debug" "chpasswd - Win32 Debug" "pinger - Win32 Debug" "client - Win32 Debug" "unlinkd - Win32 Debug" "dnsserver - Win32 Debug" "squid_conf - Win32 Debug" "Perl Preprocessing - Win32 Debug" "LDAP_auth - Win32 Debug" "cachemgr - Win32 Debug" "NCSA_auth - Win32 Debug" "NT_auth - Win32 Debug" "miscutil - Win32 Debug" "$(OUTDIR)\squid.exe" "$(OUTDIR)\squidnt.bsc"
 
 !ENDIF 
 
 !IF "$(RECURSE)" == "1" 
-CLEAN :"miscutil - Win32 DebugCLEAN" "NT_auth - Win32 DebugCLEAN" "NCSA_auth - Win32 DebugCLEAN" "cachemgr - Win32 DebugCLEAN" "dnsserver - Win32 DebugCLEAN" "LDAP_auth - Win32 DebugCLEAN" "Perl Preprocessing - Win32 DebugCLEAN" "squid_conf - Win32 DebugCLEAN" "libsnmp - Win32 DebugCLEAN" 
+CLEAN :"miscutil - Win32 DebugCLEAN" "NT_auth - Win32 DebugCLEAN" "NCSA_auth - Win32 DebugCLEAN" "cachemgr - Win32 DebugCLEAN" "LDAP_auth - Win32 DebugCLEAN" "Perl Preprocessing - Win32 DebugCLEAN" "squid_conf - Win32 DebugCLEAN" "dnsserver - Win32 DebugCLEAN" "unlinkd - Win32 DebugCLEAN" "client - Win32 DebugCLEAN" "pinger - Win32 DebugCLEAN" "chpasswd - Win32 DebugCLEAN" "htpasswd - Win32 DebugCLEAN" "libsnmp - Win32 DebugCLEAN" 
 !ELSE 
 CLEAN :
 !ENDIF 
 	-@erase "$(INTDIR)\access_log.obj"
+	-@erase "$(INTDIR)\access_log.sbr"
 	-@erase "$(INTDIR)\acl.obj"
+	-@erase "$(INTDIR)\acl.sbr"
+	-@erase "$(INTDIR)\aiops.obj"
+	-@erase "$(INTDIR)\aiops.sbr"
 	-@erase "$(INTDIR)\asn.obj"
+	-@erase "$(INTDIR)\asn.sbr"
 	-@erase "$(INTDIR)\async_io.obj"
+	-@erase "$(INTDIR)\async_io.sbr"
 	-@erase "$(INTDIR)\authenticate.obj"
+	-@erase "$(INTDIR)\authenticate.sbr"
 	-@erase "$(INTDIR)\cache_cf.obj"
+	-@erase "$(INTDIR)\cache_cf.sbr"
 	-@erase "$(INTDIR)\cache_manager.obj"
+	-@erase "$(INTDIR)\cache_manager.sbr"
 	-@erase "$(INTDIR)\CacheDigest.obj"
+	-@erase "$(INTDIR)\CacheDigest.sbr"
 	-@erase "$(INTDIR)\carp.obj"
+	-@erase "$(INTDIR)\carp.sbr"
 	-@erase "$(INTDIR)\cbdata.obj"
+	-@erase "$(INTDIR)\cbdata.sbr"
 	-@erase "$(INTDIR)\client_db.obj"
+	-@erase "$(INTDIR)\client_db.sbr"
 	-@erase "$(INTDIR)\client_side.obj"
+	-@erase "$(INTDIR)\client_side.sbr"
 	-@erase "$(INTDIR)\comm.obj"
+	-@erase "$(INTDIR)\comm.sbr"
 	-@erase "$(INTDIR)\comm_select.obj"
+	-@erase "$(INTDIR)\comm_select.sbr"
 	-@erase "$(INTDIR)\debug.obj"
+	-@erase "$(INTDIR)\debug.sbr"
 	-@erase "$(INTDIR)\delay_pools.obj"
+	-@erase "$(INTDIR)\delay_pools.sbr"
 	-@erase "$(INTDIR)\disk.obj"
+	-@erase "$(INTDIR)\disk.sbr"
 	-@erase "$(INTDIR)\dns.obj"
+	-@erase "$(INTDIR)\dns.sbr"
 	-@erase "$(INTDIR)\dns_internal.obj"
+	-@erase "$(INTDIR)\dns_internal.sbr"
 	-@erase "$(INTDIR)\errorpage.obj"
+	-@erase "$(INTDIR)\errorpage.sbr"
 	-@erase "$(INTDIR)\ETag.obj"
+	-@erase "$(INTDIR)\ETag.sbr"
 	-@erase "$(INTDIR)\event.obj"
+	-@erase "$(INTDIR)\event.sbr"
 	-@erase "$(INTDIR)\fd.obj"
+	-@erase "$(INTDIR)\fd.sbr"
 	-@erase "$(INTDIR)\filemap.obj"
+	-@erase "$(INTDIR)\filemap.sbr"
 	-@erase "$(INTDIR)\forward.obj"
+	-@erase "$(INTDIR)\forward.sbr"
 	-@erase "$(INTDIR)\fqdncache.obj"
+	-@erase "$(INTDIR)\fqdncache.sbr"
 	-@erase "$(INTDIR)\ftp.obj"
+	-@erase "$(INTDIR)\ftp.sbr"
 	-@erase "$(INTDIR)\globals.obj"
+	-@erase "$(INTDIR)\globals.sbr"
 	-@erase "$(INTDIR)\gopher.obj"
+	-@erase "$(INTDIR)\gopher.sbr"
 	-@erase "$(INTDIR)\helper.obj"
+	-@erase "$(INTDIR)\helper.sbr"
 	-@erase "$(INTDIR)\htcp.obj"
+	-@erase "$(INTDIR)\htcp.sbr"
 	-@erase "$(INTDIR)\http.obj"
+	-@erase "$(INTDIR)\http.sbr"
 	-@erase "$(INTDIR)\HttpBody.obj"
+	-@erase "$(INTDIR)\HttpBody.sbr"
 	-@erase "$(INTDIR)\HttpHdrCc.obj"
+	-@erase "$(INTDIR)\HttpHdrCc.sbr"
 	-@erase "$(INTDIR)\HttpHdrContRange.obj"
+	-@erase "$(INTDIR)\HttpHdrContRange.sbr"
 	-@erase "$(INTDIR)\HttpHdrRange.obj"
+	-@erase "$(INTDIR)\HttpHdrRange.sbr"
 	-@erase "$(INTDIR)\HttpHeader.obj"
+	-@erase "$(INTDIR)\HttpHeader.sbr"
 	-@erase "$(INTDIR)\HttpHeaderTools.obj"
+	-@erase "$(INTDIR)\HttpHeaderTools.sbr"
 	-@erase "$(INTDIR)\HttpMsg.obj"
+	-@erase "$(INTDIR)\HttpMsg.sbr"
 	-@erase "$(INTDIR)\HttpReply.obj"
+	-@erase "$(INTDIR)\HttpReply.sbr"
 	-@erase "$(INTDIR)\HttpRequest.obj"
+	-@erase "$(INTDIR)\HttpRequest.sbr"
 	-@erase "$(INTDIR)\HttpStatusLine.obj"
+	-@erase "$(INTDIR)\HttpStatusLine.sbr"
 	-@erase "$(INTDIR)\icmp.obj"
+	-@erase "$(INTDIR)\icmp.sbr"
 	-@erase "$(INTDIR)\icp_v2.obj"
+	-@erase "$(INTDIR)\icp_v2.sbr"
 	-@erase "$(INTDIR)\icp_v3.obj"
+	-@erase "$(INTDIR)\icp_v3.sbr"
 	-@erase "$(INTDIR)\ident.obj"
+	-@erase "$(INTDIR)\ident.sbr"
 	-@erase "$(INTDIR)\internal.obj"
+	-@erase "$(INTDIR)\internal.sbr"
 	-@erase "$(INTDIR)\ipc.obj"
+	-@erase "$(INTDIR)\ipc.sbr"
 	-@erase "$(INTDIR)\ipcache.obj"
-	-@erase "$(INTDIR)\leakfinder.obj"
+	-@erase "$(INTDIR)\ipcache.sbr"
 	-@erase "$(INTDIR)\main.obj"
+	-@erase "$(INTDIR)\main.sbr"
 	-@erase "$(INTDIR)\mem.obj"
+	-@erase "$(INTDIR)\mem.sbr"
 	-@erase "$(INTDIR)\MemBuf.obj"
+	-@erase "$(INTDIR)\MemBuf.sbr"
 	-@erase "$(INTDIR)\MemPool.obj"
+	-@erase "$(INTDIR)\MemPool.sbr"
 	-@erase "$(INTDIR)\mime.obj"
+	-@erase "$(INTDIR)\mime.sbr"
 	-@erase "$(INTDIR)\multicast.obj"
+	-@erase "$(INTDIR)\multicast.sbr"
 	-@erase "$(INTDIR)\neighbors.obj"
+	-@erase "$(INTDIR)\neighbors.sbr"
 	-@erase "$(INTDIR)\net_db.obj"
+	-@erase "$(INTDIR)\net_db.sbr"
 	-@erase "$(INTDIR)\Packer.obj"
+	-@erase "$(INTDIR)\Packer.sbr"
 	-@erase "$(INTDIR)\pconn.obj"
+	-@erase "$(INTDIR)\pconn.sbr"
 	-@erase "$(INTDIR)\peer_digest.obj"
+	-@erase "$(INTDIR)\peer_digest.sbr"
 	-@erase "$(INTDIR)\peer_select.obj"
+	-@erase "$(INTDIR)\peer_select.sbr"
 	-@erase "$(INTDIR)\pump.obj"
+	-@erase "$(INTDIR)\pump.sbr"
 	-@erase "$(INTDIR)\redirect.obj"
+	-@erase "$(INTDIR)\redirect.sbr"
 	-@erase "$(INTDIR)\refresh.obj"
+	-@erase "$(INTDIR)\refresh.sbr"
 	-@erase "$(INTDIR)\send-announce.obj"
+	-@erase "$(INTDIR)\send-announce.sbr"
 	-@erase "$(INTDIR)\snmp_agent.obj"
+	-@erase "$(INTDIR)\snmp_agent.sbr"
 	-@erase "$(INTDIR)\snmp_core.obj"
+	-@erase "$(INTDIR)\snmp_core.sbr"
 	-@erase "$(INTDIR)\squid.res"
 	-@erase "$(INTDIR)\ssl.obj"
+	-@erase "$(INTDIR)\ssl.sbr"
 	-@erase "$(INTDIR)\stat.obj"
+	-@erase "$(INTDIR)\stat.sbr"
 	-@erase "$(INTDIR)\StatHist.obj"
+	-@erase "$(INTDIR)\StatHist.sbr"
 	-@erase "$(INTDIR)\stmem.obj"
+	-@erase "$(INTDIR)\stmem.sbr"
 	-@erase "$(INTDIR)\store.obj"
+	-@erase "$(INTDIR)\store.sbr"
 	-@erase "$(INTDIR)\store_client.obj"
+	-@erase "$(INTDIR)\store_client.sbr"
 	-@erase "$(INTDIR)\store_digest.obj"
+	-@erase "$(INTDIR)\store_digest.sbr"
 	-@erase "$(INTDIR)\store_dir.obj"
+	-@erase "$(INTDIR)\store_dir.sbr"
 	-@erase "$(INTDIR)\store_dir_ufs.obj"
+	-@erase "$(INTDIR)\store_dir_ufs.sbr"
 	-@erase "$(INTDIR)\store_io.obj"
+	-@erase "$(INTDIR)\store_io.sbr"
+	-@erase "$(INTDIR)\store_io_asyncufs.obj"
+	-@erase "$(INTDIR)\store_io_asyncufs.sbr"
 	-@erase "$(INTDIR)\store_io_ufs.obj"
+	-@erase "$(INTDIR)\store_io_ufs.sbr"
 	-@erase "$(INTDIR)\store_key_md5.obj"
+	-@erase "$(INTDIR)\store_key_md5.sbr"
 	-@erase "$(INTDIR)\store_log.obj"
+	-@erase "$(INTDIR)\store_log.sbr"
 	-@erase "$(INTDIR)\store_rebuild.obj"
+	-@erase "$(INTDIR)\store_rebuild.sbr"
 	-@erase "$(INTDIR)\store_swapin.obj"
+	-@erase "$(INTDIR)\store_swapin.sbr"
 	-@erase "$(INTDIR)\store_swapmeta.obj"
+	-@erase "$(INTDIR)\store_swapmeta.sbr"
 	-@erase "$(INTDIR)\store_swapout.obj"
+	-@erase "$(INTDIR)\store_swapout.sbr"
 	-@erase "$(INTDIR)\String.obj"
+	-@erase "$(INTDIR)\String.sbr"
 	-@erase "$(INTDIR)\string_arrays.obj"
+	-@erase "$(INTDIR)\string_arrays.sbr"
 	-@erase "$(INTDIR)\tools.obj"
+	-@erase "$(INTDIR)\tools.sbr"
 	-@erase "$(INTDIR)\unlinkd.obj"
+	-@erase "$(INTDIR)\unlinkd.sbr"
 	-@erase "$(INTDIR)\url.obj"
+	-@erase "$(INTDIR)\url.sbr"
 	-@erase "$(INTDIR)\urn.obj"
+	-@erase "$(INTDIR)\urn.sbr"
 	-@erase "$(INTDIR)\useragent.obj"
+	-@erase "$(INTDIR)\useragent.sbr"
 	-@erase "$(INTDIR)\vc60.idb"
 	-@erase "$(INTDIR)\vc60.pdb"
 	-@erase "$(INTDIR)\wais.obj"
+	-@erase "$(INTDIR)\wais.sbr"
 	-@erase "$(INTDIR)\wccp.obj"
+	-@erase "$(INTDIR)\wccp.sbr"
 	-@erase "$(INTDIR)\whois.obj"
+	-@erase "$(INTDIR)\whois.sbr"
 	-@erase "$(INTDIR)\win32.obj"
+	-@erase "$(INTDIR)\win32.sbr"
 	-@erase "$(OUTDIR)\squid.exe"
 	-@erase "$(OUTDIR)\squid.ilk"
 	-@erase "$(OUTDIR)\squid.pdb"
+	-@erase "$(OUTDIR)\squidnt.bsc"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
-CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+CPP_PROJ=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 RSC_PROJ=/l 0x409 /fo"$(INTDIR)\squid.res" /d "_DEBUG" 
 BSC32=bscmake.exe
 BSC32_FLAGS=/nologo /o"$(OUTDIR)\squidnt.bsc" 
 BSC32_SBRS= \
-	
+	"$(INTDIR)\access_log.sbr" \
+	"$(INTDIR)\acl.sbr" \
+	"$(INTDIR)\aiops.sbr" \
+	"$(INTDIR)\asn.sbr" \
+	"$(INTDIR)\async_io.sbr" \
+	"$(INTDIR)\authenticate.sbr" \
+	"$(INTDIR)\cache_cf.sbr" \
+	"$(INTDIR)\cache_manager.sbr" \
+	"$(INTDIR)\CacheDigest.sbr" \
+	"$(INTDIR)\carp.sbr" \
+	"$(INTDIR)\cbdata.sbr" \
+	"$(INTDIR)\client_db.sbr" \
+	"$(INTDIR)\client_side.sbr" \
+	"$(INTDIR)\comm.sbr" \
+	"$(INTDIR)\comm_select.sbr" \
+	"$(INTDIR)\debug.sbr" \
+	"$(INTDIR)\delay_pools.sbr" \
+	"$(INTDIR)\disk.sbr" \
+	"$(INTDIR)\dns.sbr" \
+	"$(INTDIR)\dns_internal.sbr" \
+	"$(INTDIR)\errorpage.sbr" \
+	"$(INTDIR)\ETag.sbr" \
+	"$(INTDIR)\event.sbr" \
+	"$(INTDIR)\fd.sbr" \
+	"$(INTDIR)\filemap.sbr" \
+	"$(INTDIR)\forward.sbr" \
+	"$(INTDIR)\fqdncache.sbr" \
+	"$(INTDIR)\ftp.sbr" \
+	"$(INTDIR)\globals.sbr" \
+	"$(INTDIR)\gopher.sbr" \
+	"$(INTDIR)\helper.sbr" \
+	"$(INTDIR)\htcp.sbr" \
+	"$(INTDIR)\http.sbr" \
+	"$(INTDIR)\HttpBody.sbr" \
+	"$(INTDIR)\HttpHdrCc.sbr" \
+	"$(INTDIR)\HttpHdrContRange.sbr" \
+	"$(INTDIR)\HttpHdrRange.sbr" \
+	"$(INTDIR)\HttpHeader.sbr" \
+	"$(INTDIR)\HttpHeaderTools.sbr" \
+	"$(INTDIR)\HttpMsg.sbr" \
+	"$(INTDIR)\HttpReply.sbr" \
+	"$(INTDIR)\HttpRequest.sbr" \
+	"$(INTDIR)\HttpStatusLine.sbr" \
+	"$(INTDIR)\icmp.sbr" \
+	"$(INTDIR)\icp_v2.sbr" \
+	"$(INTDIR)\icp_v3.sbr" \
+	"$(INTDIR)\ident.sbr" \
+	"$(INTDIR)\internal.sbr" \
+	"$(INTDIR)\ipc.sbr" \
+	"$(INTDIR)\ipcache.sbr" \
+	"$(INTDIR)\main.sbr" \
+	"$(INTDIR)\mem.sbr" \
+	"$(INTDIR)\MemBuf.sbr" \
+	"$(INTDIR)\MemPool.sbr" \
+	"$(INTDIR)\mime.sbr" \
+	"$(INTDIR)\multicast.sbr" \
+	"$(INTDIR)\neighbors.sbr" \
+	"$(INTDIR)\net_db.sbr" \
+	"$(INTDIR)\Packer.sbr" \
+	"$(INTDIR)\pconn.sbr" \
+	"$(INTDIR)\peer_digest.sbr" \
+	"$(INTDIR)\peer_select.sbr" \
+	"$(INTDIR)\pump.sbr" \
+	"$(INTDIR)\redirect.sbr" \
+	"$(INTDIR)\refresh.sbr" \
+	"$(INTDIR)\send-announce.sbr" \
+	"$(INTDIR)\snmp_agent.sbr" \
+	"$(INTDIR)\snmp_core.sbr" \
+	"$(INTDIR)\ssl.sbr" \
+	"$(INTDIR)\stat.sbr" \
+	"$(INTDIR)\StatHist.sbr" \
+	"$(INTDIR)\stmem.sbr" \
+	"$(INTDIR)\store.sbr" \
+	"$(INTDIR)\store_client.sbr" \
+	"$(INTDIR)\store_digest.sbr" \
+	"$(INTDIR)\store_dir.sbr" \
+	"$(INTDIR)\store_dir_ufs.sbr" \
+	"$(INTDIR)\store_io.sbr" \
+	"$(INTDIR)\store_io_asyncufs.sbr" \
+	"$(INTDIR)\store_io_ufs.sbr" \
+	"$(INTDIR)\store_key_md5.sbr" \
+	"$(INTDIR)\store_log.sbr" \
+	"$(INTDIR)\store_rebuild.sbr" \
+	"$(INTDIR)\store_swapin.sbr" \
+	"$(INTDIR)\store_swapmeta.sbr" \
+	"$(INTDIR)\store_swapout.sbr" \
+	"$(INTDIR)\String.sbr" \
+	"$(INTDIR)\string_arrays.sbr" \
+	"$(INTDIR)\tools.sbr" \
+	"$(INTDIR)\unlinkd.sbr" \
+	"$(INTDIR)\url.sbr" \
+	"$(INTDIR)\urn.sbr" \
+	"$(INTDIR)\useragent.sbr" \
+	"$(INTDIR)\wais.sbr" \
+	"$(INTDIR)\wccp.sbr" \
+	"$(INTDIR)\whois.sbr" \
+	"$(INTDIR)\win32.sbr"
+
+"$(OUTDIR)\squidnt.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+    $(BSC32) @<<
+  $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
 LINK32=link.exe
-LINK32_FLAGS=winwrap.lib kernel32.lib user32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\squid.pdb" /debug /machine:I386 /out:"$(OUTDIR)\squid.exe" /pdbtype:sept 
+LINK32_FLAGS=kernel32.lib ws2_32.lib advapi32.lib psapi.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\squid.pdb" /debug /machine:I386 /out:"$(OUTDIR)\squid.exe" /pdbtype:sept /EXPORT:WIN32_sendSignal 
 LINK32_OBJS= \
 	"$(INTDIR)\access_log.obj" \
 	"$(INTDIR)\acl.obj" \
+	"$(INTDIR)\aiops.obj" \
 	"$(INTDIR)\asn.obj" \
 	"$(INTDIR)\async_io.obj" \
 	"$(INTDIR)\authenticate.obj" \
@@ -469,7 +673,6 @@
 	"$(INTDIR)\internal.obj" \
 	"$(INTDIR)\ipc.obj" \
 	"$(INTDIR)\ipcache.obj" \
-	"$(INTDIR)\leakfinder.obj" \
 	"$(INTDIR)\main.obj" \
 	"$(INTDIR)\mem.obj" \
 	"$(INTDIR)\MemBuf.obj" \
@@ -486,6 +689,8 @@
 	"$(INTDIR)\redirect.obj" \
 	"$(INTDIR)\refresh.obj" \
 	"$(INTDIR)\send-announce.obj" \
+	"$(INTDIR)\snmp_agent.obj" \
+	"$(INTDIR)\snmp_core.obj" \
 	"$(INTDIR)\ssl.obj" \
 	"$(INTDIR)\stat.obj" \
 	"$(INTDIR)\StatHist.obj" \
@@ -496,6 +701,7 @@
 	"$(INTDIR)\store_dir.obj" \
 	"$(INTDIR)\store_dir_ufs.obj" \
 	"$(INTDIR)\store_io.obj" \
+	"$(INTDIR)\store_io_asyncufs.obj" \
 	"$(INTDIR)\store_io_ufs.obj" \
 	"$(INTDIR)\store_key_md5.obj" \
 	"$(INTDIR)\store_log.obj" \
@@ -515,10 +721,8 @@
 	"$(INTDIR)\whois.obj" \
 	"$(INTDIR)\win32.obj" \
 	"$(INTDIR)\squid.res" \
-	"$(INTDIR)\snmp_core.obj" \
-	"$(INTDIR)\snmp_agent.obj" \
 	"..\miscutil\Debug\miscutil.lib" \
-	"..\Debug\libsnmp.lib"
+	"..\libsnmp\Debug\libsnmp.lib"
 
 "$(OUTDIR)\squid.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
@@ -535,8 +739,8 @@
 OutDir=.\Debug
 # End Custom Macros
 
-$(DS_POSTBUILD_DEP) : "libsnmp - Win32 Debug" "squid_conf - Win32 Debug" "Perl Preprocessing - Win32 Debug" "LDAP_auth - Win32 Debug" "dnsserver - Win32 Debug" "cachemgr - Win32 Debug" "NCSA_auth - Win32 Debug" "NT_auth - Win32 Debug" "miscutil - Win32 Debug" "$(OUTDIR)\squid.exe"
-   ..\update.bat debug e:\squid
+$(DS_POSTBUILD_DEP) : "libsnmp - Win32 Debug" "htpasswd - Win32 Debug" "chpasswd - Win32 Debug" "pinger - Win32 Debug" "client - Win32 Debug" "unlinkd - Win32 Debug" "dnsserver - Win32 Debug" "squid_conf - Win32 Debug" "Perl Preprocessing - Win32 Debug" "LDAP_auth - Win32 Debug" "cachemgr - Win32 Debug" "NCSA_auth - Win32 Debug" "NT_auth - Win32 Debug" "miscutil - Win32 Debug" "$(OUTDIR)\squid.exe" "$(OUTDIR)\squidnt.bsc"
+   ..\update.bat debug c:\squid
 	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
 
 !ENDIF 
@@ -584,28 +788,94 @@
 !IF "$(CFG)" == "squidnt - Win32 Release" || "$(CFG)" == "squidnt - Win32 Debug"
 SOURCE=..\..\src\access_log.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\access_log.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\access_log.obj"	"$(INTDIR)\access_log.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\acl.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\acl.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\acl.obj"	"$(INTDIR)\acl.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\aiops.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\aiops.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\aiops.obj"	"$(INTDIR)\aiops.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\asn.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\asn.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\asn.obj"	"$(INTDIR)\asn.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\async_io.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\async_io.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\async_io.obj"	"$(INTDIR)\async_io.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\authenticate.c
 
 !IF  "$(CFG)" == "squidnt - Win32 Release"
@@ -620,9 +890,9 @@
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 
-"$(INTDIR)\authenticate.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\authenticate.obj"	"$(INTDIR)\authenticate.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) @<<
   $(CPP_SWITCHES) $(SOURCE)
 <<
@@ -632,514 +902,1487 @@
 
 SOURCE=..\..\src\cache_cf.c
 
-"$(INTDIR)\cache_cf.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
-
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\cache_manager.c
 
-"$(INTDIR)\cache_manager.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\cache_cf.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\CacheDigest.c
-
-"$(INTDIR)\CacheDigest.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
-
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-SOURCE=..\..\src\carp.c
 
-"$(INTDIR)\carp.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\cache_cf.obj"	"$(INTDIR)\cache_cf.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\cbdata.c
+!ENDIF 
 
-"$(INTDIR)\cbdata.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\cache_manager.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\client_db.c
 
-"$(INTDIR)\client_db.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\cache_manager.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\client_side.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\client_side.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\cache_manager.obj"	"$(INTDIR)\cache_manager.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\comm.c
+!ENDIF 
 
-"$(INTDIR)\comm.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\CacheDigest.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\comm_select.c
 
-"$(INTDIR)\comm_select.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\CacheDigest.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\debug.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\debug.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\CacheDigest.obj"	"$(INTDIR)\CacheDigest.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\delay_pools.c
+!ENDIF 
 
-"$(INTDIR)\delay_pools.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\carp.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\disk.c
 
-"$(INTDIR)\disk.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\carp.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\dns.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\dns.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\carp.obj"	"$(INTDIR)\carp.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\dns_internal.c
+!ENDIF 
 
-"$(INTDIR)\dns_internal.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\cbdata.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\errorpage.c
 
-"$(INTDIR)\errorpage.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\cbdata.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\ETag.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\ETag.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\cbdata.obj"	"$(INTDIR)\cbdata.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\event.c
+!ENDIF 
 
-"$(INTDIR)\event.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\client_db.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\fd.c
 
-"$(INTDIR)\fd.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\client_db.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\filemap.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\filemap.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\client_db.obj"	"$(INTDIR)\client_db.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\forward.c
+!ENDIF 
 
-"$(INTDIR)\forward.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\client_side.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\fqdncache.c
 
-"$(INTDIR)\fqdncache.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\client_side.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\ftp.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\ftp.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\client_side.obj"	"$(INTDIR)\client_side.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\globals.c
+!ENDIF 
+
+SOURCE=..\..\src\comm.c
 
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
-CPP_SWITCHES=/nologo /G6 /MT /W3 /vmg /GX /O2 /Ob2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /D DEFAULT_CONFIG_FILE=\"c:/squid/etc/squid.conf\" /c 
 
-"$(INTDIR)\globals.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) @<<
-  $(CPP_SWITCHES) $(SOURCE)
-<<
+"$(INTDIR)\comm.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ  /D DEFAULT_CONFIG_FILE=\"c:/squid/etc/squid.conf\" /c 
 
-"$(INTDIR)\globals.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) @<<
-  $(CPP_SWITCHES) $(SOURCE)
-<<
+"$(INTDIR)\comm.obj"	"$(INTDIR)\comm.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
 !ENDIF 
 
-SOURCE=..\..\src\gopher.c
+SOURCE=..\..\src\comm_select.c
 
-"$(INTDIR)\gopher.obj" : $(SOURCE) "$(INTDIR)"
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\comm_select.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\helper.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\helper.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\comm_select.obj"	"$(INTDIR)\comm_select.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\htcp.c
+!ENDIF 
 
-"$(INTDIR)\htcp.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\debug.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\http.c
 
-"$(INTDIR)\http.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\debug.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpBody.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\HttpBody.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\debug.obj"	"$(INTDIR)\debug.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpHdrCc.c
+!ENDIF 
 
-"$(INTDIR)\HttpHdrCc.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\delay_pools.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\HttpHdrContRange.c
 
-"$(INTDIR)\HttpHdrContRange.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\delay_pools.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpHdrRange.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\HttpHdrRange.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\delay_pools.obj"	"$(INTDIR)\delay_pools.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpHeader.c
+!ENDIF 
 
-"$(INTDIR)\HttpHeader.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\disk.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\HttpHeaderTools.c
 
-"$(INTDIR)\HttpHeaderTools.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\disk.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpMsg.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\HttpMsg.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\disk.obj"	"$(INTDIR)\disk.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpReply.c
+!ENDIF 
 
-"$(INTDIR)\HttpReply.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\dns.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\HttpRequest.c
 
-"$(INTDIR)\HttpRequest.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\dns.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\HttpStatusLine.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\HttpStatusLine.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\dns.obj"	"$(INTDIR)\dns.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\icmp.c
+!ENDIF 
 
-"$(INTDIR)\icmp.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\dns_internal.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\icp_v2.c
 
-"$(INTDIR)\icp_v2.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\dns_internal.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\icp_v3.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\icp_v3.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\dns_internal.obj"	"$(INTDIR)\dns_internal.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ENDIF 
+
+SOURCE=..\..\src\errorpage.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\errorpage.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\errorpage.obj"	"$(INTDIR)\errorpage.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\ETag.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ETag.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\ETag.obj"	"$(INTDIR)\ETag.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\event.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\event.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\event.obj"	"$(INTDIR)\event.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\fd.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\fd.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\fd.obj"	"$(INTDIR)\fd.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\filemap.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\filemap.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\filemap.obj"	"$(INTDIR)\filemap.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\forward.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\forward.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\forward.obj"	"$(INTDIR)\forward.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\fqdncache.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\fqdncache.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\fqdncache.obj"	"$(INTDIR)\fqdncache.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\ftp.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ftp.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\ftp.obj"	"$(INTDIR)\ftp.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\globals.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+CPP_SWITCHES=/nologo /G6 /MT /W3 /vmg /GX /O2 /Ob2 /I "../../include" /I "../" /I "../../src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /D DEFAULT_CONFIG_FILE=\"c:/squid/etc/squid.conf\" /c 
+
+"$(INTDIR)\globals.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) @<<
+  $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+CPP_SWITCHES=/nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ  /D DEFAULT_CONFIG_FILE=\"c:/squid/etc/squid.conf\" /c 
+
+"$(INTDIR)\globals.obj"	"$(INTDIR)\globals.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) @<<
+  $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF 
+
+SOURCE=..\..\src\gopher.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\gopher.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\gopher.obj"	"$(INTDIR)\gopher.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\helper.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\helper.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\helper.obj"	"$(INTDIR)\helper.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\htcp.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\htcp.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\htcp.obj"	"$(INTDIR)\htcp.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\http.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\http.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\http.obj"	"$(INTDIR)\http.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpBody.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpBody.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpBody.obj"	"$(INTDIR)\HttpBody.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpHdrCc.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpHdrCc.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpHdrCc.obj"	"$(INTDIR)\HttpHdrCc.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpHdrContRange.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpHdrContRange.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpHdrContRange.obj"	"$(INTDIR)\HttpHdrContRange.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpHdrRange.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpHdrRange.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpHdrRange.obj"	"$(INTDIR)\HttpHdrRange.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpHeader.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpHeader.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpHeader.obj"	"$(INTDIR)\HttpHeader.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpHeaderTools.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpHeaderTools.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpHeaderTools.obj"	"$(INTDIR)\HttpHeaderTools.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpMsg.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpMsg.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpMsg.obj"	"$(INTDIR)\HttpMsg.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpReply.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpReply.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpReply.obj"	"$(INTDIR)\HttpReply.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpRequest.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpRequest.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpRequest.obj"	"$(INTDIR)\HttpRequest.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\HttpStatusLine.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\HttpStatusLine.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\HttpStatusLine.obj"	"$(INTDIR)\HttpStatusLine.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\icmp.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\icmp.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\icmp.obj"	"$(INTDIR)\icmp.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\icp_v2.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\icp_v2.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\icp_v2.obj"	"$(INTDIR)\icp_v2.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\icp_v3.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\icp_v3.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\icp_v3.obj"	"$(INTDIR)\icp_v3.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\ident.c
 
-"$(INTDIR)\ident.obj" : $(SOURCE) "$(INTDIR)"
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ident.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\ident.obj"	"$(INTDIR)\ident.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\internal.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\internal.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\internal.obj"	"$(INTDIR)\internal.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\ipc.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ipc.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\ipc.obj"	"$(INTDIR)\ipc.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\ipcache.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ipcache.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\ipcache.obj"	"$(INTDIR)\ipcache.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\leakfinder.c
+SOURCE=..\..\src\main.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\main.obj"	"$(INTDIR)\main.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\mem.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\mem.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\mem.obj"	"$(INTDIR)\mem.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\MemBuf.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\MemBuf.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\MemBuf.obj"	"$(INTDIR)\MemBuf.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\MemPool.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\MemPool.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\MemPool.obj"	"$(INTDIR)\MemPool.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\mime.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\mime.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\mime.obj"	"$(INTDIR)\mime.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\multicast.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\multicast.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\multicast.obj"	"$(INTDIR)\multicast.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\neighbors.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\neighbors.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\neighbors.obj"	"$(INTDIR)\neighbors.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\net_db.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\net_db.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\net_db.obj"	"$(INTDIR)\net_db.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\Packer.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\Packer.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\Packer.obj"	"$(INTDIR)\Packer.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\pconn.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\pconn.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\pconn.obj"	"$(INTDIR)\pconn.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\peer_digest.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\peer_digest.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\peer_digest.obj"	"$(INTDIR)\peer_digest.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\peer_select.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\peer_select.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\peer_select.obj"	"$(INTDIR)\peer_select.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\pump.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\pump.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\pump.obj"	"$(INTDIR)\pump.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\redirect.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\redirect.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\redirect.obj"	"$(INTDIR)\redirect.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\refresh.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\refresh.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\refresh.obj"	"$(INTDIR)\refresh.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE="..\..\src\send-announce.c"
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\send-announce.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\internal.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\internal.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\send-announce.obj"	"$(INTDIR)\send-announce.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\ipc.c
+!ENDIF 
 
-"$(INTDIR)\ipc.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\snmp_agent.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\snmp_agent.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\ipcache.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\ipcache.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\snmp_agent.obj"	"$(INTDIR)\snmp_agent.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\leakfinder.c
+!ENDIF 
+
+SOURCE=..\..\src\snmp_core.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
 
-"$(INTDIR)\leakfinder.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\snmp_core.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\main.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\snmp_core.obj"	"$(INTDIR)\snmp_core.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\mem.c
+!ENDIF 
 
-"$(INTDIR)\mem.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\ssl.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\ssl.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\MemBuf.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\MemBuf.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\ssl.obj"	"$(INTDIR)\ssl.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\MemPool.c
+!ENDIF 
 
-"$(INTDIR)\MemPool.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\stat.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\stat.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\mime.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\mime.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\stat.obj"	"$(INTDIR)\stat.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\multicast.c
+!ENDIF 
 
-"$(INTDIR)\multicast.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\StatHist.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\StatHist.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\neighbors.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\neighbors.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\StatHist.obj"	"$(INTDIR)\StatHist.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\net_db.c
+!ENDIF 
 
-"$(INTDIR)\net_db.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\stmem.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\stmem.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\Packer.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\Packer.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\stmem.obj"	"$(INTDIR)\stmem.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\pconn.c
+!ENDIF 
 
-"$(INTDIR)\pconn.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\peer_digest.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\peer_digest.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store.obj"	"$(INTDIR)\store.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\peer_select.c
+!ENDIF 
 
-"$(INTDIR)\peer_select.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_client.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_client.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\pump.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\pump.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_client.obj"	"$(INTDIR)\store_client.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\redirect.c
+!ENDIF 
 
-"$(INTDIR)\redirect.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_digest.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_digest.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\refresh.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\refresh.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_digest.obj"	"$(INTDIR)\store_digest.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE="..\..\src\send-announce.c"
+!ENDIF 
 
-"$(INTDIR)\send-announce.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_dir.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_dir.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\snmp_agent.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\snmp_agent.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_dir.obj"	"$(INTDIR)\store_dir.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\snmp_core.c
+!ENDIF 
 
-"$(INTDIR)\snmp_core.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_dir_ufs.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_dir_ufs.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\ssl.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\ssl.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_dir_ufs.obj"	"$(INTDIR)\store_dir_ufs.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\stat.c
+!ENDIF 
 
-"$(INTDIR)\stat.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_io.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_io.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\StatHist.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\StatHist.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_io.obj"	"$(INTDIR)\store_io.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\stmem.c
+!ENDIF 
 
-"$(INTDIR)\stmem.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_io_asyncufs.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_io_asyncufs.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\store.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_io_asyncufs.obj"	"$(INTDIR)\store_io_asyncufs.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_client.c
+!ENDIF 
 
-"$(INTDIR)\store_client.obj" : $(SOURCE) "$(INTDIR)"
+SOURCE=..\..\src\store_io_ufs.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_io_ufs.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_digest.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\store_digest.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_io_ufs.obj"	"$(INTDIR)\store_io_ufs.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_dir.c
+!ENDIF 
+
+SOURCE=..\..\src\store_key_md5.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_key_md5.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\store_key_md5.obj"	"$(INTDIR)\store_key_md5.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\store_log.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_log.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\store_log.obj"	"$(INTDIR)\store_log.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\store_rebuild.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_rebuild.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\store_rebuild.obj"	"$(INTDIR)\store_rebuild.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
+SOURCE=..\..\src\store_swapin.c
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
+"$(INTDIR)\store_swapin.obj" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\store_swapin.obj"	"$(INTDIR)\store_swapin.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
 
-"$(INTDIR)\store_dir.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\store_swapmeta.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\store_dir_ufs.c
 
-"$(INTDIR)\store_dir_ufs.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\store_swapmeta.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_io.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\store_io.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_swapmeta.obj"	"$(INTDIR)\store_swapmeta.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_io_ufs.c
+!ENDIF 
 
-"$(INTDIR)\store_io_ufs.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\store_swapout.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\store_key_md5.c
 
-"$(INTDIR)\store_key_md5.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\store_swapout.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_log.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\store_log.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\store_swapout.obj"	"$(INTDIR)\store_swapout.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_rebuild.c
+!ENDIF 
 
-"$(INTDIR)\store_rebuild.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\String.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\store_swapin.c
 
-"$(INTDIR)\store_swapin.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\String.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_swapmeta.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\store_swapmeta.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\String.obj"	"$(INTDIR)\String.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\store_swapout.c
+!ENDIF 
 
-"$(INTDIR)\store_swapout.obj" : $(SOURCE) "$(INTDIR)"
-	$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=..\..\src\string_arrays.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
 
-SOURCE=..\..\src\String.c
 
-"$(INTDIR)\String.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\string_arrays.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
-SOURCE=..\..\src\string_arrays.c
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-"$(INTDIR)\string_arrays.obj" : $(SOURCE) "$(INTDIR)"
+
+"$(INTDIR)\string_arrays.obj"	"$(INTDIR)\string_arrays.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ENDIF 
+
 SOURCE=..\..\src\tools.c
 
 !IF  "$(CFG)" == "squidnt - Win32 Release"
@@ -1154,9 +2397,9 @@
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
-CPP_SWITCHES=/nologo /G6 /MTd /W4 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
+CPP_SWITCHES=/nologo /G6 /MTd /W4 /Gm /GX /ZI /Od /I "../../include" /I "../" /I "../../src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D DEFAULT_CONFIG_FILE=\"squid.conf\" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\squidnt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
 
-"$(INTDIR)\tools.obj" : $(SOURCE) "$(INTDIR)"
+"$(INTDIR)\tools.obj"	"$(INTDIR)\tools.sbr" : $(SOURCE) "$(INTDIR)"
 	$(CPP) @<<
   $(CPP_SWITCHES) $(SOURCE)
 <<
@@ -1166,66 +2409,162 @@
 
 SOURCE=..\..\src\unlinkd.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\unlinkd.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\unlinkd.obj"	"$(INTDIR)\unlinkd.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\url.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\url.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\url.obj"	"$(INTDIR)\url.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\urn.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\urn.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\urn.obj"	"$(INTDIR)\urn.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\useragent.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\useragent.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\useragent.obj"	"$(INTDIR)\useragent.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\wais.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\wais.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\wais.obj"	"$(INTDIR)\wais.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\wccp.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\wccp.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\wccp.obj"	"$(INTDIR)\wccp.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\whois.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\whois.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\whois.obj"	"$(INTDIR)\whois.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\..\src\win32.c
 
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+
 "$(INTDIR)\win32.obj" : $(SOURCE) "$(INTDIR)"
 	$(CPP) $(CPP_PROJ) $(SOURCE)
 
 
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+
+"$(INTDIR)\win32.obj"	"$(INTDIR)\win32.sbr" : $(SOURCE) "$(INTDIR)"
+	$(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF 
+
 SOURCE=..\squid.rc
 
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 
 "$(INTDIR)\squid.res" : $(SOURCE) "$(INTDIR)"
-	$(RSC) /l 0x409 /fo"$(INTDIR)\squid.res" /i "\work\nt-2.3\win" /d "NDEBUG" $(SOURCE)
+	$(RSC) /l 0x409 /fo"$(INTDIR)\squid.res" /i "\work\squidnt23\win" /d "NDEBUG" $(SOURCE)
 
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 
 "$(INTDIR)\squid.res" : $(SOURCE) "$(INTDIR)"
-	$(RSC) /l 0x409 /fo"$(INTDIR)\squid.res" /i "\work\nt-2.3\win" /d "_DEBUG" $(SOURCE)
+	$(RSC) /l 0x409 /fo"$(INTDIR)\squid.res" /i "\work\squidnt23\win" /d "_DEBUG" $(SOURCE)
 
 
 !ENDIF 
@@ -1233,25 +2572,25 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "miscutil - Win32 Release" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" 
    cd "..\squidnt"
 
 "miscutil - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Release" RECURSE=1 CLEAN 
    cd "..\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "miscutil - Win32 Debug" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" 
    cd "..\squidnt"
 
 "miscutil - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\miscutil"
-   $(MAKE) /$(MAKEFLAGS) /F ".\miscutil.mak" CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\miscutil"
+   $(MAKE) /$(MAKEFLAGS) /F .\miscutil.mak CFG="miscutil - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\squidnt"
 
 !ENDIF 
@@ -1265,25 +2604,25 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "NT_auth - Win32 Release" : 
-   cd "\work\nt-2.3\auth_modules\NT"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NT_auth.mak" CFG="NT_auth - Win32 Release" 
+   cd "\work\squidnt23\auth_modules\NT"
+   $(MAKE) /$(MAKEFLAGS) /F .\NT_auth.mak CFG="NT_auth - Win32 Release" 
    cd "..\..\win\squidnt"
 
 "NT_auth - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\NT"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NT_auth.mak" CFG="NT_auth - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\NT"
+   $(MAKE) /$(MAKEFLAGS) /F .\NT_auth.mak CFG="NT_auth - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "NT_auth - Win32 Debug" : 
-   cd "\work\nt-2.3\auth_modules\NT"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NT_auth.mak" CFG="NT_auth - Win32 Debug" 
+   cd "\work\squidnt23\auth_modules\NT"
+   $(MAKE) /$(MAKEFLAGS) /F .\NT_auth.mak CFG="NT_auth - Win32 Debug" 
    cd "..\..\win\squidnt"
 
 "NT_auth - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\NT"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NT_auth.mak" CFG="NT_auth - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\NT"
+   $(MAKE) /$(MAKEFLAGS) /F .\NT_auth.mak CFG="NT_auth - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ENDIF 
@@ -1291,25 +2630,25 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "NCSA_auth - Win32 Release" : 
-   cd "\work\nt-2.3\auth_modules\NCSA"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NCSA_auth.mak" CFG="NCSA_auth - Win32 Release" 
+   cd "\work\squidnt23\auth_modules\NCSA"
+   $(MAKE) /$(MAKEFLAGS) /F .\NCSA_auth.mak CFG="NCSA_auth - Win32 Release" 
    cd "..\..\win\squidnt"
 
 "NCSA_auth - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\NCSA"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NCSA_auth.mak" CFG="NCSA_auth - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\NCSA"
+   $(MAKE) /$(MAKEFLAGS) /F .\NCSA_auth.mak CFG="NCSA_auth - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "NCSA_auth - Win32 Debug" : 
-   cd "\work\nt-2.3\auth_modules\NCSA"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NCSA_auth.mak" CFG="NCSA_auth - Win32 Debug" 
+   cd "\work\squidnt23\auth_modules\NCSA"
+   $(MAKE) /$(MAKEFLAGS) /F .\NCSA_auth.mak CFG="NCSA_auth - Win32 Debug" 
    cd "..\..\win\squidnt"
 
 "NCSA_auth - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\NCSA"
-   $(MAKE) /$(MAKEFLAGS) /F ".\NCSA_auth.mak" CFG="NCSA_auth - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\NCSA"
+   $(MAKE) /$(MAKEFLAGS) /F .\NCSA_auth.mak CFG="NCSA_auth - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ENDIF 
@@ -1317,51 +2656,25 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "cachemgr - Win32 Release" : 
-   cd "\work\nt-2.3\win\cachemgr"
-   $(MAKE) /$(MAKEFLAGS) /F ".\cachemgr.mak" CFG="cachemgr - Win32 Release" 
+   cd "\work\squidnt23\win\cachemgr"
+   $(MAKE) /$(MAKEFLAGS) /F .\cachemgr.mak CFG="cachemgr - Win32 Release" 
    cd "..\squidnt"
 
 "cachemgr - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\cachemgr"
-   $(MAKE) /$(MAKEFLAGS) /F ".\cachemgr.mak" CFG="cachemgr - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\cachemgr"
+   $(MAKE) /$(MAKEFLAGS) /F .\cachemgr.mak CFG="cachemgr - Win32 Release" RECURSE=1 CLEAN 
    cd "..\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "cachemgr - Win32 Debug" : 
-   cd "\work\nt-2.3\win\cachemgr"
-   $(MAKE) /$(MAKEFLAGS) /F ".\cachemgr.mak" CFG="cachemgr - Win32 Debug" 
+   cd "\work\squidnt23\win\cachemgr"
+   $(MAKE) /$(MAKEFLAGS) /F .\cachemgr.mak CFG="cachemgr - Win32 Debug" 
    cd "..\squidnt"
 
 "cachemgr - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\cachemgr"
-   $(MAKE) /$(MAKEFLAGS) /F ".\cachemgr.mak" CFG="cachemgr - Win32 Debug" RECURSE=1 CLEAN 
-   cd "..\squidnt"
-
-!ENDIF 
-
-!IF  "$(CFG)" == "squidnt - Win32 Release"
-
-"dnsserver - Win32 Release" : 
-   cd "\work\nt-2.3\win\dnsserver"
-   $(MAKE) /$(MAKEFLAGS) /F ".\dnsserver.mak" CFG="dnsserver - Win32 Release" 
-   cd "..\squidnt"
-
-"dnsserver - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win\dnsserver"
-   $(MAKE) /$(MAKEFLAGS) /F ".\dnsserver.mak" CFG="dnsserver - Win32 Release" RECURSE=1 CLEAN 
-   cd "..\squidnt"
-
-!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
-
-"dnsserver - Win32 Debug" : 
-   cd "\work\nt-2.3\win\dnsserver"
-   $(MAKE) /$(MAKEFLAGS) /F ".\dnsserver.mak" CFG="dnsserver - Win32 Debug" 
-   cd "..\squidnt"
-
-"dnsserver - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win\dnsserver"
-   $(MAKE) /$(MAKEFLAGS) /F ".\dnsserver.mak" CFG="dnsserver - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win\cachemgr"
+   $(MAKE) /$(MAKEFLAGS) /F .\cachemgr.mak CFG="cachemgr - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\squidnt"
 
 !ENDIF 
@@ -1369,25 +2682,25 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "LDAP_auth - Win32 Release" : 
-   cd "\work\nt-2.3\auth_modules\LDAP"
-   $(MAKE) /$(MAKEFLAGS) /F ".\LDAP_auth.mak" CFG="LDAP_auth - Win32 Release" 
+   cd "\work\squidnt23\auth_modules\LDAP"
+   $(MAKE) /$(MAKEFLAGS) /F .\LDAP_auth.mak CFG="LDAP_auth - Win32 Release" 
    cd "..\..\win\squidnt"
 
 "LDAP_auth - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\LDAP"
-   $(MAKE) /$(MAKEFLAGS) /F ".\LDAP_auth.mak" CFG="LDAP_auth - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\LDAP"
+   $(MAKE) /$(MAKEFLAGS) /F .\LDAP_auth.mak CFG="LDAP_auth - Win32 Release" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "LDAP_auth - Win32 Debug" : 
-   cd "\work\nt-2.3\auth_modules\LDAP"
-   $(MAKE) /$(MAKEFLAGS) /F ".\LDAP_auth.mak" CFG="LDAP_auth - Win32 Debug" 
+   cd "\work\squidnt23\auth_modules\LDAP"
+   $(MAKE) /$(MAKEFLAGS) /F .\LDAP_auth.mak CFG="LDAP_auth - Win32 Debug" 
    cd "..\..\win\squidnt"
 
 "LDAP_auth - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\auth_modules\LDAP"
-   $(MAKE) /$(MAKEFLAGS) /F ".\LDAP_auth.mak" CFG="LDAP_auth - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\auth_modules\LDAP"
+   $(MAKE) /$(MAKEFLAGS) /F .\LDAP_auth.mak CFG="LDAP_auth - Win32 Debug" RECURSE=1 CLEAN 
    cd "..\..\win\squidnt"
 
 !ENDIF 
@@ -1395,24 +2708,24 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "Perl Preprocessing - Win32 Release" : 
-   cd "\work\nt-2.3\win"
+   cd "\work\squidnt23\win"
    $(MAKE) /$(MAKEFLAGS) /F ".\Perl Preprocessing.mak" CFG="Perl Preprocessing - Win32 Release" 
    cd ".\squidnt"
 
 "Perl Preprocessing - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win"
+   cd "\work\squidnt23\win"
    $(MAKE) /$(MAKEFLAGS) /F ".\Perl Preprocessing.mak" CFG="Perl Preprocessing - Win32 Release" RECURSE=1 CLEAN 
    cd ".\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "Perl Preprocessing - Win32 Debug" : 
-   cd "\work\nt-2.3\win"
+   cd "\work\squidnt23\win"
    $(MAKE) /$(MAKEFLAGS) /F ".\Perl Preprocessing.mak" CFG="Perl Preprocessing - Win32 Debug" 
    cd ".\squidnt"
 
 "Perl Preprocessing - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win"
+   cd "\work\squidnt23\win"
    $(MAKE) /$(MAKEFLAGS) /F ".\Perl Preprocessing.mak" CFG="Perl Preprocessing - Win32 Debug" RECURSE=1 CLEAN 
    cd ".\squidnt"
 
@@ -1421,52 +2734,208 @@
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
 "squid_conf - Win32 Release" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\squid_conf.mak" CFG="squid_conf - Win32 Release" 
+   cd "\work\squidnt23\win"
+   $(MAKE) /$(MAKEFLAGS) /F .\squid_conf.mak CFG="squid_conf - Win32 Release" 
    cd ".\squidnt"
 
 "squid_conf - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\squid_conf.mak" CFG="squid_conf - Win32 Release" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win"
+   $(MAKE) /$(MAKEFLAGS) /F .\squid_conf.mak CFG="squid_conf - Win32 Release" RECURSE=1 CLEAN 
    cd ".\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "squid_conf - Win32 Debug" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\squid_conf.mak" CFG="squid_conf - Win32 Debug" 
+   cd "\work\squidnt23\win"
+   $(MAKE) /$(MAKEFLAGS) /F .\squid_conf.mak CFG="squid_conf - Win32 Debug" 
    cd ".\squidnt"
 
 "squid_conf - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\squid_conf.mak" CFG="squid_conf - Win32 Debug" RECURSE=1 CLEAN 
+   cd "\work\squidnt23\win"
+   $(MAKE) /$(MAKEFLAGS) /F .\squid_conf.mak CFG="squid_conf - Win32 Debug" RECURSE=1 CLEAN 
    cd ".\squidnt"
 
 !ENDIF 
 
 !IF  "$(CFG)" == "squidnt - Win32 Release"
 
+"dnsserver - Win32 Release" : 
+   cd "\work\squidnt23\win\dnsserver"
+   $(MAKE) /$(MAKEFLAGS) /F .\dnsserver.mak CFG="dnsserver - Win32 Release" 
+   cd "..\squidnt"
+
+"dnsserver - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\dnsserver"
+   $(MAKE) /$(MAKEFLAGS) /F .\dnsserver.mak CFG="dnsserver - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"dnsserver - Win32 Debug" : 
+   cd "\work\squidnt23\win\dnsserver"
+   $(MAKE) /$(MAKEFLAGS) /F .\dnsserver.mak CFG="dnsserver - Win32 Debug" 
+   cd "..\squidnt"
+
+"dnsserver - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\dnsserver"
+   $(MAKE) /$(MAKEFLAGS) /F .\dnsserver.mak CFG="dnsserver - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+"unlinkd - Win32 Release" : 
+   cd "\work\squidnt23\win\unlinkd"
+   $(MAKE) /$(MAKEFLAGS) /F .\unlinkd.mak CFG="unlinkd - Win32 Release" 
+   cd "..\squidnt"
+
+"unlinkd - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\unlinkd"
+   $(MAKE) /$(MAKEFLAGS) /F .\unlinkd.mak CFG="unlinkd - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"unlinkd - Win32 Debug" : 
+   cd "\work\squidnt23\win\unlinkd"
+   $(MAKE) /$(MAKEFLAGS) /F .\unlinkd.mak CFG="unlinkd - Win32 Debug" 
+   cd "..\squidnt"
+
+"unlinkd - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\unlinkd"
+   $(MAKE) /$(MAKEFLAGS) /F .\unlinkd.mak CFG="unlinkd - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+"client - Win32 Release" : 
+   cd "\work\squidnt23\win\client"
+   $(MAKE) /$(MAKEFLAGS) /F .\client.mak CFG="client - Win32 Release" 
+   cd "..\squidnt"
+
+"client - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\client"
+   $(MAKE) /$(MAKEFLAGS) /F .\client.mak CFG="client - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"client - Win32 Debug" : 
+   cd "\work\squidnt23\win\client"
+   $(MAKE) /$(MAKEFLAGS) /F .\client.mak CFG="client - Win32 Debug" 
+   cd "..\squidnt"
+
+"client - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\client"
+   $(MAKE) /$(MAKEFLAGS) /F .\client.mak CFG="client - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+"pinger - Win32 Release" : 
+   cd "\work\squidnt23\win\pinger"
+   $(MAKE) /$(MAKEFLAGS) /F .\pinger.mak CFG="pinger - Win32 Release" 
+   cd "..\squidnt"
+
+"pinger - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\win\pinger"
+   $(MAKE) /$(MAKEFLAGS) /F .\pinger.mak CFG="pinger - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"pinger - Win32 Debug" : 
+   cd "\work\squidnt23\win\pinger"
+   $(MAKE) /$(MAKEFLAGS) /F .\pinger.mak CFG="pinger - Win32 Debug" 
+   cd "..\squidnt"
+
+"pinger - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\win\pinger"
+   $(MAKE) /$(MAKEFLAGS) /F .\pinger.mak CFG="pinger - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+"chpasswd - Win32 Release" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Release" 
+   cd "..\..\win\squidnt"
+
+"chpasswd - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\..\win\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"chpasswd - Win32 Debug" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Debug" 
+   cd "..\..\win\squidnt"
+
+"chpasswd - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\contrib\chpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\chpasswd.mak CFG="chpasswd - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\..\win\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
+"htpasswd - Win32 Release" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Release" 
+   cd "..\..\win\squidnt"
+
+"htpasswd - Win32 ReleaseCLEAN" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\..\win\squidnt"
+
+!ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
+
+"htpasswd - Win32 Debug" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Debug" 
+   cd "..\..\win\squidnt"
+
+"htpasswd - Win32 DebugCLEAN" : 
+   cd "\work\squidnt23\contrib\htpasswd"
+   $(MAKE) /$(MAKEFLAGS) /F .\htpasswd.mak CFG="htpasswd - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\..\win\squidnt"
+
+!ENDIF 
+
+!IF  "$(CFG)" == "squidnt - Win32 Release"
+
 "libsnmp - Win32 Release" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libsnmp.mak" CFG="libsnmp - Win32 Release" 
-   cd ".\squidnt"
+   cd "\work\squidnt23\win\libsnmp"
+   $(MAKE) /$(MAKEFLAGS) /F .\libsnmp.mak CFG="libsnmp - Win32 Release" 
+   cd "..\squidnt"
 
 "libsnmp - Win32 ReleaseCLEAN" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libsnmp.mak" CFG="libsnmp - Win32 Release" RECURSE=1 CLEAN 
-   cd ".\squidnt"
+   cd "\work\squidnt23\win\libsnmp"
+   $(MAKE) /$(MAKEFLAGS) /F .\libsnmp.mak CFG="libsnmp - Win32 Release" RECURSE=1 CLEAN 
+   cd "..\squidnt"
 
 !ELSEIF  "$(CFG)" == "squidnt - Win32 Debug"
 
 "libsnmp - Win32 Debug" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libsnmp.mak" CFG="libsnmp - Win32 Debug" 
-   cd ".\squidnt"
+   cd "\work\squidnt23\win\libsnmp"
+   $(MAKE) /$(MAKEFLAGS) /F .\libsnmp.mak CFG="libsnmp - Win32 Debug" 
+   cd "..\squidnt"
 
 "libsnmp - Win32 DebugCLEAN" : 
-   cd "\work\nt-2.3\win"
-   $(MAKE) /$(MAKEFLAGS) /F ".\libsnmp.mak" CFG="libsnmp - Win32 Debug" RECURSE=1 CLEAN 
-   cd ".\squidnt"
+   cd "\work\squidnt23\win\libsnmp"
+   $(MAKE) /$(MAKEFLAGS) /F .\libsnmp.mak CFG="libsnmp - Win32 Debug" RECURSE=1 CLEAN 
+   cd "..\squidnt"
 
 !ENDIF 
 
