From aded7e90e31700d177d559d0930099753fd38e06 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 22 Jan 2022 18:52:20 +0000 Subject: add comment git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4252 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/pgmtexture.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'analyzer/pgmtexture.c') diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c index c69643e7..72f660f1 100644 --- a/analyzer/pgmtexture.c +++ b/analyzer/pgmtexture.c @@ -49,7 +49,16 @@ static bool const sortit = FALSE; static float * vector(unsigned int const nl, unsigned int const nh) { +/*---------------------------------------------------------------------------- + Allocate a float vector with range [nl..nh] + + We do some seedy C here, subtracting an arbitrary integer from a pointer and + calling the result a pointer. It normally works because the only way we'll + use that pointer is by adding that same integer or something greater to it. + The point of this is not to allocate memory for vector elements that will + never be referenced (component < nl). +-----------------------------------------------------------------------------*/ float * v; assert(nh >= nl); -- cgit 1.4.1