mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib/util ucs2_align is identical, put it in common
Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
parent
2eea91957c
commit
b2e37d9ce1
@ -249,13 +249,6 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2)
|
|||||||
return strcasecmp(s1,s2) == 0;
|
return strcasecmp(s1,s2) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
|
|
||||||
{
|
|
||||||
if (flags & (STR_NOALIGN|STR_ASCII))
|
|
||||||
return 0;
|
|
||||||
return PTR_DIFF(p, base_ptr) & 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
String replace.
|
String replace.
|
||||||
**/
|
**/
|
||||||
|
@ -52,3 +52,10 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2)
|
|||||||
}
|
}
|
||||||
return (*psz1 - *psz2);
|
return (*psz1 - *psz2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
|
||||||
|
{
|
||||||
|
if (flags & (STR_NOALIGN|STR_ASCII))
|
||||||
|
return 0;
|
||||||
|
return PTR_DIFF(p, base_ptr) & 1;
|
||||||
|
}
|
||||||
|
@ -632,13 +632,6 @@ char *strlower_talloc(TALLOC_CTX *ctx, const char *s) {
|
|||||||
return talloc_strdup_lower(ctx, s);
|
return talloc_strdup_lower(ctx, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ucs2_align(const void *base_ptr, const void *p, int flags)
|
|
||||||
{
|
|
||||||
if (flags & (STR_NOALIGN|STR_ASCII))
|
|
||||||
return 0;
|
|
||||||
return PTR_DIFF(p, base_ptr) & 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy a string from a char* unix src to a dos codepage string destination.
|
* Copy a string from a char* unix src to a dos codepage string destination.
|
||||||
|
Loading…
Reference in New Issue
Block a user