Something I don't understand about Squid

From: Yee Man Chan <ymc@dont-contact.us>
Date: Mon, 27 Sep 1999 20:17:41 -0400

Hi,

I am starting to play with Squid source. I am dealing with 2.2S5 and running
under RedHat Linux 6.0. I ran GNU gdb comes with the distribution to see how
Squid works. Then I find something I can't explain:

1. I added a function to Squid that takes a StoreEntry * e as a parameter. I
find that even if I did nothing to the parameter, when I step through the
function, the value of the pointer changes. The same thing happens to e->
mem_obj as well. Why?
2. There are xmalloc, xcalloc, xstrncpy, etc... in Squid. I am wondering if
they are really wrappers of the ANSI C standard library functions. There are
also others, for example, strcat, strcpy that do not have an x------
counterpart, why? And why do you define sprintf to unary +, so that we are
forced (?) to use snprintf defined in lib/snprintf.c?

Thanks for your time.
Yee Man
Received on Mon Sep 27 1999 - 20:18:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:17 MST