From owner-freebsd-chat@FreeBSD.ORG Tue Feb 10 15:06:15 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61EAF16A4CE for ; Tue, 10 Feb 2004 15:06:15 -0800 (PST) Received: from www.bluecirclesoft.com (cpe-024-165-114-048.cinci.rr.com [24.165.114.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 149BD43D1D for ; Tue, 10 Feb 2004 15:06:15 -0800 (PST) (envelope-from marc.ramirez@bluecirclesoft.com) Received: from www.bluecirclesoft.com (localhost [127.0.0.1]) i1AN6DPh040002; Tue, 10 Feb 2004 18:06:13 -0500 (EST) (envelope-from mrami@bluecirclesoft.com) Received: (from mrami@localhost) by www.bluecirclesoft.com (8.12.9p2/8.12.9/Submit) id i1AN6Ciw040001; Tue, 10 Feb 2004 18:06:12 -0500 (EST) (envelope-from mrami) Date: Tue, 10 Feb 2004 18:06:12 -0500 From: Marc Ramirez To: Jeremy Faulkner Message-ID: <20040210230611.GB39506@www.bluecirclesoft.com> References: <40293B38.30401@potentialtech.com> <402940EC.2030403@gldis.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: <402940EC.2030403@gldis.ca> User-Agent: Mutt/1.4.1i cc: Bill Moran cc: freebsd-chat@freebsd.org Subject: Re: Could use some help with variable length argument lists X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 23:06:15 -0000 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 10, 2004 at 03:37:00PM -0500, Jeremy Faulkner wrote: >=20 >=20 > va_start says that the last required variable is "message". >=20 > You can't use ap because it's not in the list of variables when you=20 > called the function. ap doesn't represent a parameter, it represents the list. C/C++ have no way of knowing how many parameters were passed in. The information in "message" tells the function how many parameters are in the list. > _log(1, "Log test"); > ^ There's nothing there to be "ap" >=20 > So it "Segmentation fault (core dumped)"'s >=20 > _log(1, "Log test", NULL); If that were true, then printf("Hello, world!"); could never work. Marc. > --=20 > Jeremy Faulkner http://www.gldis.ca > _______________________________________________ > freebsd-chat@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-chat > To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org" --=20 Marc Ramirez Blue Circle Software Corporation 513-688-1070 (main) 513-382-1270 (direct) http://www.bluecirclesoft.com http://www.mrami.com (personal) --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD4DBQFAKWPig1EgpGw750IRArrhAJUZR4qHXkFWwz6GZOXSd/7VXX//AJ9Fk9/K OwpY/MNzZfh8bXGAKwAyXg== =aveT -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k--