From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 11:01:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DCD316A4CE; Sun, 4 Jan 2004 11:01:12 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97A5343D53; Sun, 4 Jan 2004 11:01:11 -0800 (PST) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i04J1BZv079812; Sun, 4 Jan 2004 11:01:11 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i04J1Aud079811; Sun, 4 Jan 2004 11:01:10 -0800 (PST) (envelope-from rizzo) Date: Sun, 4 Jan 2004 11:01:10 -0800 From: Luigi Rizzo To: Eugene Grosbein Message-ID: <20040104110110.A79771@xorpc.icir.org> References: <3FF714C6.1D099404@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3FF714C6.1D099404@grosbein.pp.ru>; from eugen@grosbein.pp.ru on Sun, Jan 04, 2004 at 02:15:18AM +0700 cc: hackers@freebsd.org cc: ache@freebsd.org Subject: Re: syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2004 19:01:12 -0000 On Sun, Jan 04, 2004 at 02:15:18AM +0700, Eugene Grosbein wrote: > Hi! > > ache@freebsd.org wrote 8 years ago in src/lib/libc/gen/syslog.c: > > p += sprintf(p, "%.15s ", ctime(&now) + 4); > > What is '+ 4' for? quite likely it is to skip the 'day of week' field -- the ctime manpage says The ctime() function adjusts the time value for the current time zone in the same manner as localtime(), and returns a pointer to a 26-character string of the form: Thu Nov 24 18:22:48 1986\n\0 All the fields have constant width. so it makes sense cheers luigi > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/syslog.c.diff?r1=1.2&r2=1.3 > > Eugene Grosbein > > P.S. Please CC me, I'm not in list > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"