Skip to content

Commit 8ba2356

Browse files
committed
fix spelling errors
1 parent 515fec4 commit 8ba2356

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

src/mmdata.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,15 +2489,15 @@ pntrString *pntrTempAllocStack[M_MAX_ALLOC_STACK];
24892489
* allocates a \ref block capable of holding \p size \ref pntrString entries
24902490
* and pushes it onto the \ref pntrTempAllocStack.
24912491
* \par size == 0
2492-
* pops off all entries from the \ref pntrTempAllocStack and adds them to the
2493-
* \ref memFreePool.
2492+
* pops off all entries from index \ref g_pntrStartTempAllocStack on from
2493+
* \ref pntrTempAllocStack and adds them to the \ref memFreePool.
24942494
* \param[in] size count of \ref pntrString entries. This value must include
24952495
* a terminal NULL pointer if needed.
24962496
* \return a pointer to the allocated \ref block, or NULL if deallocation
24972497
* requested
24982498
* \pre
24992499
* \p size ==0: all entries in from \ref pntrTempAllocStack from
2500-
* \ref g_pntrTempAllocStackStart do not contain relevant data any more.
2500+
* \ref g_pntrStartTempAllocStack do not contain relevant data any more.
25012501
* \post
25022502
* - \p size > 0: memory for \p size entries is reserved in the \ref block
25032503
* "block's" header, but the data is still random.

src/mmdata.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
/*E*/extern long db1;
4646
/*!
4747
* \var long db2
48-
* Bytes held in \ref blocks managed in \ref tempAllocStack
48+
* Bytes held in \ref block "blocks" managed in \ref tempAllocStack
4949
* "temporary pointer stacks".
5050
*/
5151
/*E*/extern long db2;
@@ -526,6 +526,25 @@ extern struct nullPntrStruct g_PntrNull;
526526
* \post The variable is initialized.
527527
*/
528528
#define pntrString_def(x) pntrString *x = NULL_PNTRSTRING
529+
/*!
530+
* \def free_pntrString
531+
* \param[in,out] x variable name
532+
* Assigns \ref NULL_PNTRSTRING to a variable \ref pntrString \p x. Frees all
533+
* \ref pntrTempAllocStack, beginning with index
534+
* \ref g_pntrStartTempAllocStack. See \ref pntrLet.
535+
* \pre
536+
* - the \ref block assigned to \p x does not contain any valuable data.
537+
* - all \ref pntrString elements freed in \ref pntrTempAllocStack can be
538+
* discarded without losing relevant references.
539+
* \post
540+
* - \p x is assigned NULL_PNTRSTRING.
541+
* - The stack pointer of \ref pntrTempAllocStack is reset to
542+
* \ref g_pntrStartTempAllocStack and all referenced
543+
* \ref block "blocks" on and beyond that are returned to the
544+
* \ref memFreePool.
545+
* - updates \ref db3 and \ref poolTotalFree.
546+
* - Exit on out-of-memory
547+
*/
529548
#define free_pntrString(x) pntrLet(&x, NULL_PNTRSTRING)
530549

531550

@@ -692,7 +711,7 @@ long compressedProofSize(const nmbrString *proof, long statemNum);
692711
*/
693712
extern long g_pntrTempAllocStackTop; /* Top of stack for pntrTempAlloc function */
694713
/*!
695-
* \var long g_pntrTempAllocStackStart
714+
* \var long g_pntrStartTempAllocStack
696715
*
697716
* Index of the first entry of the \ref stack "stack" \ref pntrTempAllocStack
698717
* eligible for deallocation on the next call to \ref pntrTempAlloc. Entries
@@ -732,7 +751,7 @@ temp_pntrString *pntrMakeTempAlloc(pntrString *s);
732751
* \n
733752
* It is assumed that the value persisted in \p target is in fact computed from
734753
* temporary operands in \ref pntrTempAllocStack. All blocks starting with
735-
* the element at \ref g_pntrTempAllocStackStart are returned to the
754+
* the element at \ref g_pntrStartTempAllocStack are returned to the
736755
* \ref memFreePool.
737756
* \attention freed \ref block "blocks" contain \ref pntrString instances.
738757
* See \ref pntrTempAllocStack to learn how this free process can be
@@ -754,7 +773,7 @@ temp_pntrString *pntrMakeTempAlloc(pntrString *s);
754773
* - due to a possible reallocation the pointer \p target points to may
755774
* change.
756775
* - The stack pointer of \ref pntrTempAllocStack is reset to
757-
* \ref g_pntrTempAllocStackStart and all referenced
776+
* \ref g_pntrStartTempAllocStack and all referenced
758777
* \ref block "blocks" on and beyond that are returned to the
759778
* \ref memFreePool.
760779
* - updates \ref db3 and \ref poolTotalFree.

src/mmvstr.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,16 @@ void freeTempAlloc(void);
301301
* \pre
302302
* - \ref g_startTempAllocStack contains the starting index of entries in
303303
* \ref tempAllocStack, that is going to be deallocated.
304-
* - The destination of this function must either be empty, or uniquely point
305-
* to a \ref vstring, but not any of the \ref temp_vstring;
306-
* - The destination need not provide enough space for the source. If
304+
* - The \p target of this function must either be empty, or uniquely point
305+
* to a \ref vstring, but not to any of the \ref temp_vstring;
306+
* - The \p target need not provide enough space for the source. If
307307
* necessary, it is reallocated;
308308
* \post
309309
* - Entries in \ref tempAllocStack from \ref g_startTempAllocStack (on entry
310310
* to the function) are deallocated;
311311
* - The stack pointer in \ref g_tempAllocStackTop is set to
312312
* \ref g_startTempAllocStack (on entry to the function);
313-
* - If the assigned value is the empty string, but the destination not, it is
313+
* - If the assigned value is the empty string, but the \p target not, it is
314314
* freed and assigned to a constant "";
315315
* - \ref db is updated.
316316
* \bug In an out-of-memory situation the program is not exited

0 commit comments

Comments
 (0)