From owner-freebsd-questions  Tue Oct 15 19:21:13 1996
Return-Path: owner-questions
Received: (from root@localhost)
          by freefall.freebsd.org (8.7.5/8.7.3) id TAA28245
          for questions-outgoing; Tue, 15 Oct 1996 19:21:13 -0700 (PDT)
Received: from plethora.cs.wustl.edu (plethora.cs.wustl.edu [128.252.165.113])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA28209
          for <freebsd-questions@FreeBSD.org>; Tue, 15 Oct 1996 19:21:06 -0700 (PDT)
Received: (from jxh@localhost) by plethora.cs.wustl.edu (8.7.6/8.7.3) id VAA00456; Tue, 15 Oct 1996 21:20:21 -0500 (CDT)
Date: Tue, 15 Oct 1996 21:20:21 -0500 (CDT)
Message-Id: <199610160220.VAA00456@plethora.cs.wustl.edu>
From: James Hu <jxh@cs.wustl.edu>
To: Gary Kline <kline@tera.com>
Cc: freebsd-questions@FreeBSD.org (FreeBSD Questions Mailgroup)
Subject: interpretation?
In-Reply-To: <199610160045.RAA19446@athena.tera.com>
References: <199610160045.RAA19446@athena.tera.com>
Sender: owner-questions@FreeBSD.org
X-Loop: FreeBSD.org
Precedence: bulk

Gary Kline <kline@tera.com> writes:
> Can any resident C wizard interpret this parameter definition for me?
>> localtime(const time_t * const timep)

        timep is a constant pointer to a time_t constant

an equivalent type is: time_t const * const timep

        timep is a constant pointer to a constant time_t

although it reads a little differently.

What timep is saying is not only are the contents of the pointer
a constant (the constant time_t), but it itself will never change
value (the constant pointer).

> And, is there a simpler way of saying the same thing?

No.

Read the C faq (and its references) for a detailed explanation.

-- James