about summary refs log tree commit diff
path: root/analyzer/pgmtexture.c
diff options
context:
space:
mode:
Diffstat (limited to 'analyzer/pgmtexture.c')
-rw-r--r--analyzer/pgmtexture.c9
1 files changed, 9 insertions, 0 deletions
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);