[AD] Some fixes for the Docs in "Unicode routines"

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


The attatched diff for allegro._tx (against the allegro._tx of 4.2.2 RC1) adds a missing explanation of the 'size' paramater in ustrzncpy()

Also, I have put the word 'size' in single-quotes in the docs for do_uconvert(), ustrzcpy(), ustrzcat() in the phrase "your parameter `size' must reflect this" (it was already in single quotes in the docs for ustrzncpy() ).


AE.

--- allegro._tx.old	2007-07-01 16:50:52.000000000 +0200
+++ allegro._tx	2007-07-07 01:23:39.812358400 +0200
@@ -1160,8 +1160,8 @@
 <endblock>
    Note that, even for empty strings, your destination string must have at
    least enough bytes to store the terminating null character of the string,
-   and your parameter size must reflect this. Otherwise, the debug version of
-   Allegro will abort at an assertion, and the release version of Allegro
+   and your parameter `size' must reflect this. Otherwise, the debug version
+   of Allegro will abort at an assertion, and the release version of Allegro
    will overrun the destination buffer.
    
 @\char *@uconvert(const char *s, int type,
@@ -1433,8 +1433,8 @@
 
    Note that, even for empty strings, your destination string must have at
    least enough bytes to store the terminating null character of the string,
-   and your parameter size must reflect this. Otherwise, the debug version of
-   Allegro will abort at an assertion, and the release version of Allegro
+   and your parameter `size' must reflect this. Otherwise, the debug version
+   of Allegro will abort at an assertion, and the release version of Allegro
    will overrun the destination buffer.
 @retval
    Returns the value of `dest'.
@@ -1459,8 +1459,8 @@
 
    Note that, even for empty strings, your destination string must have at
    least enough bytes to store the terminating null character of the string,
-   and your parameter size must reflect this. Otherwise, the debug version of
-   Allegro will abort at an assertion, and the release version of Allegro
+   and your parameter `size' must reflect this. Otherwise, the debug version
+   of Allegro will abort at an assertion, and the release version of Allegro
    will overrun the destination buffer.
 @retval
    Returns the value of `dest'.
@@ -1497,7 +1497,9 @@
 @eref exkeys
 @shortdesc Copies a string into another one, specifying size.
    This function is like ustrzcpy() except that no more than `n' characters
-   from `src' are copied into `dest'. If `src' is shorter than `n' characters,
+   from `src' are copied into `dest' whose length in bytes is specified by
+   `size' and which is guaranteed to be null-terminated even if `src' is
+   bigger than `size'. If `src' is shorter than `n' characters,
    null characters are appended to `dest' as padding until `n' characters have
    been written. In any case, `dest' is guaranteed to be null-terminated.
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/