POV-Ray : Newsgroups : povray.binaries.programming : command line : Re: command line Server Time
26 Apr 2024 16:00:46 EDT (-0400)
  Re: command line  
From: Warp
Date: 5 Mar 2002 07:00:38
Message: <3c84b366@news.povray.org>
majucatur <maj### [at] yahoocom> wrote:
> I know that I need to write a .c module with functions, and a .h file with
> its data types and global definitions.

  Why is it a so common misconception that you should put all the data types
of a .c file into its correspondent .h file?
  A .c file is a module, and its correspondent .h file declares its
*public interface*, that is, it declares the part of the module which other
modules need to see.
  Internal data types (and functions) used by the module are *not* part of
this public interface. Also global variables used solely in this module (even
though we don't use global variables, do we?) should be declared as static in
the .c file, not in the .h file. The .h file should always be as minimal as
possible.

  As for your actual question, I didn't understand it well enough to write
a proper answer.
  (Perhaps a really short example could help?)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.