riched20: Remove unused functions

Dylan Smith dylan.ah.smith at gmail.com
Sat Feb 7 12:20:11 CST 2009


On Sat, Feb 7, 2009 at 9:33 AM, Andrew Talbot
<andrew.talbot at talbotville.com> wrote:
>
> @@ -65,17 +65,6 @@ ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars)
>   return s;
>  }
>
> -ME_String *ME_MakeStringB(int nMaxChars)
> -{ /* Create a buffer (uninitialized string) of size nMaxChars */
> -  ME_String *s = ALLOC_OBJ(ME_String);
> -
> -  s->nLen = nMaxChars;
> -  s->nBuffer = ME_GetOptimalBuffer(s->nLen+1);
> -  s->szData = ALLOC_N_OBJ(WCHAR, s->nBuffer);
> -  s->szData[s->nLen] = 0;
> -  return s;
> -}
> -
>  ME_String *ME_StrDup(const ME_String *s)
>  {
>   return ME_MakeStringN(s->szData, s->nLen);

I think that ME_MakeStringB should be made static, and the
ME_MakeString functions should use it since it's code is repeated.
I'll send a patch doing that so ME_MakeStringB doesn't remain unused.

Besides that I agree with the changes, and was about to submit a patch
that got rid ME_ConcatString while some replacing lstrcpyW calls in
ME_AppendString that would truncate strings containing NULL bytes,
since ME_ConcatString has the same problem.  Maybe I should remove
ME_ConcatString for you so that our patches don't conflict, since
ME_ConcatString follows ME_AppendString in the code.

Thanks for helping clean up some of that old richedit code.



More information about the wine-devel mailing list