mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 11:42:54 +03:00
* util.h (str_unconst): Provide a replacement for the const_cast
macro from global.h. * util.c (str_unconst): Likewise.
This commit is contained in:
parent
d34c405387
commit
a3a1e26210
@ -1,3 +1,9 @@
|
||||
2005-04-13 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* util.h (str_unconst): Provide a replacement for the const_cast
|
||||
macro from global.h.
|
||||
* util.c (str_unconst): Likewise.
|
||||
|
||||
2005-04-07 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* view.c: Removed mmap(2) support. Now regular files are
|
||||
|
@ -1441,3 +1441,9 @@ cstrcasestr (const char *haystack, const char *needle)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern char *
|
||||
str_unconst (const char *s)
|
||||
{
|
||||
return (char *) s;
|
||||
}
|
||||
|
@ -3,6 +3,12 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Returns its argument as a "modifiable" string. This function is
|
||||
* intended to pass strings to legacy libraries that don't know yet
|
||||
* about the "const" modifier. The return value of this function
|
||||
* MUST NOT be modified. */
|
||||
extern char *str_unconst (const char *);
|
||||
|
||||
/* String managing functions */
|
||||
|
||||
extern const char *cstrcasestr (const char *haystack, const char *needle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user