Re: Compiling LS modules with DEV-C++
ilmcuts <[email protected]> Tue, 18 Nov 2003 14:44:35 +0100
| Newsgroups | gmane.comp.windows.shell-shocked.devel |
|---|---|
| Message-ID | <5.1.1.6.2.20031118144035.02563640@localhost> |
At 17:37 17.11.2003 -0500, Brian Wolven wrote: >I edited all the bang >function arguments so that they conform to the prototype, but some string >functions are unhappy when that is done, e.g., in this bang: > >void BangWinMove(HWND hCaller, LPCSTR pszArgs) > >this line generates errors: > >else if (strstr(strlwr(pszArgs),"centered")) > >unless it is changed to this: > >else if (strstr(strlwr((char *)pszArgs),"centered")) Please don't do that... strlwr modifies the source string and you thus modify an internal buffer in the core. In this case it most likely won't cause any harm, but you should should still avoid it if possible. As far as I can see you have two choices here, either make a copy of the source string or use a case insensitive strstr replacement, for example StrStrI. __________________________________________________ Subscription options and archive: http://www.freelists.org/list/shell-coding