struct loadparm_context;
struct smb_iconv_handle;
+size_t ucs2_align(const void *base_ptr, const void *p, int flags);
+
char *strchr_m(const char *s, char c);
/**
* Calculate the number of units (8 or 16-bit, depending on the
return count;
}
+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.
limited by 'n' bytes
**/
_PUBLIC_ size_t utf16_len_n(const void *src, size_t n);
-_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags);
/**
* @brief Constant time compare to memory regions.
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;
-}
-
/**
String replace.
NOTE: oldc and newc must be 7 bit characters
/* The following definitions come from lib/charcnv.c */
void gfree_charcnv(void);
-size_t ucs2_align(const void *base_ptr, const void *p, int flags);
size_t push_ascii(void *dest, const char *src, size_t dest_len, int flags);
size_t push_ascii_fstring(void *dest, const char *src);
size_t push_ascii_nstring(void *dest, const char *src);