mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.
Jeremy. (This used to be commit 1ba42aca2163c534f6be4e4a733604e3dffe0ed8)
This commit is contained in:
parent
4a85b76dae
commit
211697ee6c
@ -13,6 +13,7 @@
|
||||
#undef loff_t
|
||||
#undef offset_t
|
||||
#undef aclent_t
|
||||
#undef wchar_t
|
||||
#undef HAVE_CONNECT
|
||||
#undef HAVE_SHORT_INO_T
|
||||
#undef WITH_SMBWRAPPER
|
||||
|
869
source3/configure
vendored
869
source3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -219,6 +219,7 @@ AC_CHECK_TYPE(ino_t,unsigned)
|
||||
AC_CHECK_TYPE(loff_t,off_t)
|
||||
AC_CHECK_TYPE(offset_t,loff_t)
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
AC_CHECK_TYPE(wchar_t, unsigned short)
|
||||
|
||||
# we need libcups for CUPS support...
|
||||
AC_CHECK_LIB(cups,httpConnect)
|
||||
|
@ -79,6 +79,7 @@
|
||||
#undef loff_t
|
||||
#undef offset_t
|
||||
#undef aclent_t
|
||||
#undef wchar_t
|
||||
#undef HAVE_CONNECT
|
||||
#undef HAVE_SHORT_INO_T
|
||||
#undef WITH_SMBWRAPPER
|
||||
|
@ -703,10 +703,10 @@ typedef struct smb_wpasswd {
|
||||
#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
|
||||
|
||||
/* smb_ucs2_t versions of the above. */
|
||||
#define wpstrcpy(d,s) safe_wstrcpy((d),(s),sizeof(wpstring))
|
||||
#define wpstrcat(d,s) safe_wstrcat((d),(s),sizeof(wpstring))
|
||||
#define wfstrcpy(d,s) safe_wstrcpy((d),(s),sizeof(wfstring))
|
||||
#define wfstrcat(d,s) safe_wstrcat((d),(s),sizeof(wfstring))
|
||||
#define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring))
|
||||
#define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring))
|
||||
#define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring))
|
||||
#define wfstrcat(d,s) safe_strcat_w((d),(s),sizeof(wfstring))
|
||||
|
||||
#ifdef __COMPAR_FN_T
|
||||
#define QSORT_CAST (__compar_fn_t)
|
||||
|
@ -74,6 +74,9 @@
|
||||
/* separators for lists */
|
||||
#define LIST_SEP " \t,;:\n\r"
|
||||
|
||||
/* wchar separators for lists */
|
||||
#define LIST_SEP_W wchar_list_sep
|
||||
|
||||
#ifndef LOCKDIR
|
||||
/* this should have been set in the Makefile */
|
||||
#define LOCKDIR "/tmp/samba"
|
||||
|
@ -438,15 +438,58 @@ char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len);
|
||||
smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len);
|
||||
char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len);
|
||||
smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len);
|
||||
size_t wstrlen(const smb_ucs2_t *src);
|
||||
smb_ucs2_t *safe_wstrcpy(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength);
|
||||
smb_ucs2_t *safe_wstrcat(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength);
|
||||
int wstrcmp(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
int wstrncmp(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len);
|
||||
smb_ucs2_t *wstrstr(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
smb_ucs2_t *wstrchr(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *wstrrchr(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *wstrtok(smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
size_t strlen_w(const smb_ucs2_t *src);
|
||||
smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength);
|
||||
smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength);
|
||||
int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len);
|
||||
smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
smb_ucs2_t *strdup_w(const smb_ucs2_t *s);
|
||||
int isupper_w( smb_ucs2_t val);
|
||||
int islower_w( smb_ucs2_t val);
|
||||
int isdigit_w( smb_ucs2_t val);
|
||||
int isxdigit_w( smb_ucs2_t val);
|
||||
int isspace_w( smb_ucs2_t val);
|
||||
smb_ucs2_t toupper_w( smb_ucs2_t val );
|
||||
smb_ucs2_t tolower_w( smb_ucs2_t val );
|
||||
void set_first_token_w(smb_ucs2_t *ptr);
|
||||
BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize);
|
||||
smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep);
|
||||
int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t);
|
||||
int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n);
|
||||
BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2);
|
||||
BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n);
|
||||
BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2);
|
||||
void strlower_w(smb_ucs2_t *s);
|
||||
void strupper_w(smb_ucs2_t *s);
|
||||
void strnorm_w(smb_ucs2_t *s);
|
||||
BOOL strisnormal_w(smb_ucs2_t *s);
|
||||
void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc);
|
||||
smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n);
|
||||
size_t str_charnum_w(const smb_ucs2_t *s);
|
||||
BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back);
|
||||
BOOL strhasupper_w(const smb_ucs2_t *s);
|
||||
BOOL strhaslower_w(const smb_ucs2_t *s);
|
||||
size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c);
|
||||
BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c);
|
||||
smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength);
|
||||
smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n);
|
||||
smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c);
|
||||
size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex);
|
||||
BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive);
|
||||
BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src);
|
||||
void string_free_w(smb_ucs2_t **s);
|
||||
BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src);
|
||||
void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len);
|
||||
void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert);
|
||||
void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert);
|
||||
void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len);
|
||||
void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back);
|
||||
smb_ucs2_t *octal_string_w(int i);
|
||||
smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length);
|
||||
|
||||
/*The following definitions come from libsmb/clientgen.c */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user