@@ -335,7 +335,7 @@ void let(vstring *target, const char *source);
335
335
* The following parameters are pointers to NUL terminated strings as well,
336
336
* except for the last parameter that must be NULL. It is allowed to
337
337
* duplicate parameters.
338
- * \return the concatenated \ref temp_string terminated by a NUL character.
338
+ * \return the concatenated \ref temp_vstring terminated by a NUL character.
339
339
* \post the resulting string is pushed onto the \ref tempAllocStack.
340
340
* \ref db is updated.
341
341
* \bug a stack overflow of \ref tempAllocStack is not handled correctly.
@@ -358,50 +358,50 @@ int linput(FILE *stream, const char *ask, vstring *target);
358
358
/* Emulation of BASIC string functions */
359
359
/* Indices are 1-based */
360
360
/*!
361
- * \fn temp_vstring seg(const char *sin, long p1 , long p2 )
361
+ * \fn temp_vstring seg(const char *sin, long start , long stop )
362
362
* Extracts a substring from a source and pushes it on \ref tempAllocStack.
363
363
* Note: The bounding indices are 1-based and inclusive.
364
364
*
365
365
* \param[in] sin (not null) pointer to the NUL-terminated source text.
366
- * \param[in] p1 offset of the first byte of the substring, counted in bytes from
366
+ * \param[in] start offset of the first byte of the substring, counted in bytes from
367
367
* the first one of \p sin, a 1-based index. A value less than 1 is
368
368
* internally corrected to 1, but it must not point beyond the terminating
369
- * NUL of \p sin, if \p p1 <= \p p2 .
370
- * \param[in] p2 offset of the last byte of the substring, counted in bytes from
369
+ * NUL of \p sin, if \p start <= \p stop .
370
+ * \param[in] stop offset of the last byte of the substring, counted in bytes from
371
371
* the first one of \p sin, a 1-based index. The natural bounds of this
372
- * value are \p p1 - 1 and the length of \p sin. Values outside of this
373
- * range are internally corrected to the closer of these limits. If \p p2 <
374
- * \p p1 the empty string is returned.
372
+ * value are \p start - 1 and the length of \p sin. Values outside of this
373
+ * range are internally corrected to the closer of these limits. If \p stop
374
+ * < \p start the empty string is returned.
375
375
* \attention the indices are 1-based: seg("hello", 2, 3) == "el"!
376
376
* \return a pointer to new allocated \ref temp_vstring referencing the
377
377
* requested substring, that is also pushed onto the top of
378
378
* \ref tempAllocStack
379
379
* \pre
380
- * \p p1 <= length(\p sin).
380
+ * \p start <= length(\p sin).
381
381
* \post
382
382
* A pointer to the substring is pushed on \ref tempAllocStack, even if it
383
383
* empty;
384
384
* \warning not UTF-8 safe.
385
385
* \bug a stack overflow of \ref tempAllocStack is not handled correctly;
386
386
*/
387
- temp_vstring seg (const char * sin , long p1 , long p2 );
387
+ temp_vstring seg (const char * sin , long start , long stop );
388
388
/*!
389
- * \fn temp_vstring mid(const char *sin, long p , long l )
389
+ * \fn temp_vstring mid(const char *sin, long start , long length )
390
390
* Extracts a substring from a source and pushes it on \ref tempAllocStack
391
391
*
392
392
* \param[in] sin (not null) pointer to the NUL-terminated source text.
393
- * \param[in] p offset of the substring in bytes from the first byte of \p sin,
394
- * 1-based. A value less than 1 is internally corrected to 1, but it must
395
- * never point beyond the terminating NUL of \p sin.
396
- * \param[in] l length of substring in bytes. Negative values are corrected to 0.
397
- * If \p p + \p l exceeds the length of \p sin, then only the portion up
398
- * to the terminating NUL is taken.
399
- * \attention the index \p p is 1-based: mid("hello", 2, 1) == "e"!
393
+ * \param[in] start offset of the substring in bytes from the first byte of
394
+ * \p sin, 1-based. A value less than 1 is internally corrected to 1, but it
395
+ * must never point beyond the terminating NUL of \p sin.
396
+ * \param[in] length length of substring in bytes. Negative values are
397
+ * corrected to 0. If \p start + \p length exceeds the length of \p sin,
398
+ * then only the portion up to the terminating NUL is taken.
399
+ * \attention the index \p start is 1-based: mid("hello", 2, 1) == "e"!
400
400
* \return a pointer to new allocated \ref temp_vstring referencing the
401
401
* requested substring, that is also pushed onto the top of
402
402
* \ref tempAllocStack
403
403
* \pre
404
- * \p p <= length(\p sin). This must hold even if the requested length is
404
+ * \p start <= length(\p sin). This must hold even if the requested length is
405
405
* 0, because its implementation in C requires the validity of the pointer,
406
406
* even if it is not dereferenced.
407
407
* \post
@@ -410,7 +410,7 @@ temp_vstring seg(const char *sin, long p1, long p2);
410
410
* \warning not UTF-8 safe.
411
411
* \bug a stack overflow of \ref tempAllocStack is not handled correctly;
412
412
*/
413
- temp_vstring mid (const char * sin , long p , long l );
413
+ temp_vstring mid (const char * sin , long start , long length );
414
414
/*!
415
415
* \fn temp_vstring left(const char *sin, long n)
416
416
* \brief Extract leftmost n characters.
0 commit comments