ntdll Rtl Strings

thomas.mertes at gmx.at thomas.mertes at gmx.at
Fri Mar 14 02:51:07 CST 2003


Hello

In your patch you changed the comment of "my"
RtlCharToInteger function:

> @@ -870,16 +1049,21 @@
>   *
>   * Convert a character string into its integer equivalent.
>   *
> - * On success assign an integer value and return STATUS_SUCCESS.
> - * For base 0 accept: {whitespace} [+|-] [0[x|o|b]] {digits}
> - * For bases 2, 8, 10 and 16 accept: {whitespace} [+|-] {digits}
> - * For other bases return STATUS_INVALID_PARAMETER.
> - * For value == NULL return STATUS_ACCESS_VIOLATION.
> - * No check of value overflow: Just assign lower 32 bits (as native DLL).
> - * Do not check for str != NULL (as native DLL).
> + * PARAMS
> + *  str   [I] String containing number
> + *  base  [I] Number base for conversion
> + *  value [O] Destination for converted value
> + *
> + * RETURNS
> + *  Success: STATUS_SUCCESS. value contains the converted number
> + *  Failure: STATUS_ACCESS_VIOLATION, if value is NULL.
> + *           STATUS_INVALID_PARAMETER, if base is not 2, 8, 10 or 16.
>   *
> - * Difference:
> - * - Do not read garbage behind '\0' as native DLL does.
> + * NOTES
> + *  The string should be in the format "{whitespace} [+|-] [0[x|o|b]]
{digits}".
> + *  No check is made for value overflow, only the lower 32 bits are
assigned.
> + *  If str is NULL this function will crash.
> + *  This function does not read garbage behind '\0' as the native version
does.
>   */
>  NTSTATUS WINAPI RtlCharToInteger(
>  	PCSZ str,

If you want to reformat it (to automatically generate
documentation) this is ok. But please don't remove information.
My documentation was not copied from the M$ documentation.
It needed testing (see: dlls/ntdll/tests/rtlstr.c) to find out that

For base 0 it accepts: {whitespace} [+|-] [0[x|o|b]] {digits}
For bases 2, 8, 10 and 16 it accepts: {whitespace} [+|-] {digits}

This is more precise and better information than the M$
documentation (which for other functions I implemented is
sometimes misleading or just wrong). I want our
documentation to be better than the original.

I created a "Difference" section that the differences between
the native and the wine function really stand out.
For example: I am not always capable to find out which
garbage values are generated by native functions.
In such cases the "Difference" section gives this information.
When an application works with the native function, but
not with the wine function (it really requests these garbage
values) the "Difference" section gives an entry to "improve"
the wine function.

So: Feel free to reformat the comments of "my" functions,
but do not remove information.

Greetings
Thomas Mertes

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!




More information about the wine-devel mailing list