From 95611f11554b6ce8d8b708abbff72e9b01ed56af Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 3 Mar 2026 16:59:50 -0700 Subject: [PATCH 1/3] Add helpful comments. Add comment to clarify that DateTime->Value is not seconds since the epoch. Add comments clarifying confusing details in the DateTime structure. Add comment to explain what the qpf_grow_fn_t() type is, used by qprintf. --- centrallix-lib/include/datatypes.h | 8 ++++---- centrallix-lib/include/qprintf.h | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/centrallix-lib/include/datatypes.h b/centrallix-lib/include/datatypes.h index da7b509d8..7b45a0edd 100644 --- a/centrallix-lib/include/datatypes.h +++ b/centrallix-lib/include/datatypes.h @@ -28,12 +28,12 @@ typedef union _DT unsigned int Second:6; unsigned int Minute:6; unsigned int Hour:5; - unsigned int Day:5; - unsigned int Month:4; - unsigned int Year:12; + unsigned int Day:5; /* 1-based */ + unsigned int Month:4; /* 0-based */ + unsigned int Year:12; /* 1900-based: so 2002 is 102. */ } Part; - long long Value; + long long Value; /* NOT seconds since the epoch! */ } DateTime, *pDateTime; diff --git a/centrallix-lib/include/qprintf.h b/centrallix-lib/include/qprintf.h index d638ef684..998013861 100644 --- a/centrallix-lib/include/qprintf.h +++ b/centrallix-lib/include/qprintf.h @@ -32,7 +32,15 @@ #include -typedef int (*qpf_grow_fn_t)(char**, size_t*, size_t, void*, size_t); +/*** A function to grow a string buffer. + *** + *** @param str The string buffer being grown. + *** @param size A pointer to the current size of the string buffer. + *** @param offset An offset up to which data must be preserved. + *** @param args Arguments for growing the buffer. + *** @param req The requested size. + ***/ +typedef int (*qpf_grow_fn_t)(char** str, size_t* size, size_t offset, void* args, size_t req); typedef struct _QPS { From f19429f45e9473e39a499e125b92be4a71072e87 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 3 Mar 2026 17:47:31 -0700 Subject: [PATCH 2/3] Fix DateTime comments. --- centrallix-lib/include/datatypes.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/centrallix-lib/include/datatypes.h b/centrallix-lib/include/datatypes.h index 7b45a0edd..1d223aa3f 100644 --- a/centrallix-lib/include/datatypes.h +++ b/centrallix-lib/include/datatypes.h @@ -25,12 +25,12 @@ typedef union _DT { struct { - unsigned int Second:6; - unsigned int Minute:6; - unsigned int Hour:5; - unsigned int Day:5; /* 1-based */ - unsigned int Month:4; /* 0-based */ - unsigned int Year:12; /* 1900-based: so 2002 is 102. */ + unsigned int Second:6; /* 0-based */ + unsigned int Minute:6; /* 0-based */ + unsigned int Hour:5; /* 0-based */ + unsigned int Day:5; /* 0-based */ + unsigned int Month:4; /* 0-based: so February is 1. */ + unsigned int Year:12; /* 1900-based: so 2002 is 102. */ } Part; long long Value; /* NOT seconds since the epoch! */ From fd90c111f28208511054bae2035d5910dd45ceba Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Fri, 6 Mar 2026 14:46:57 -0700 Subject: [PATCH 3/3] Update copywrite notice in modified files. --- centrallix-lib/include/datatypes.h | 2 +- centrallix-lib/include/qprintf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/centrallix-lib/include/datatypes.h b/centrallix-lib/include/datatypes.h index 1d223aa3f..4190d7b6f 100644 --- a/centrallix-lib/include/datatypes.h +++ b/centrallix-lib/include/datatypes.h @@ -5,7 +5,7 @@ /* Centrallix Application Server System */ /* Centrallix Base Library */ /* */ -/* Copyright (C) 1998-2001 LightSys Technology Services, Inc. */ +/* Copyright (C) 1998-2026 LightSys Technology Services, Inc. */ /* */ /* You may use these files and this library under the terms of the */ /* GNU Lesser General Public License, Version 2.1, contained in the */ diff --git a/centrallix-lib/include/qprintf.h b/centrallix-lib/include/qprintf.h index 998013861..a9ba2b37f 100644 --- a/centrallix-lib/include/qprintf.h +++ b/centrallix-lib/include/qprintf.h @@ -13,7 +13,7 @@ /* Centrallix Application Server System */ /* Centrallix Base Library */ /* */ -/* Copyright (C) 1998-2006 LightSys Technology Services, Inc. */ +/* Copyright (C) 1998-2026 LightSys Technology Services, Inc. */ /* */ /* You may use these files and this library under the terms of the */ /* GNU Lesser General Public License, Version 2.1, contained in the */