summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-23 01:53:54 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-23 01:53:54 +0000
commitd47d14f2ffc7a6d2cc306530b777f364767998b3 (patch)
tree5ff4972c9bea1a5104a2aac2986f2331db96d101 /source4/lib
parent7ab05c2ffa87c962a38a9ac90fa5705d93516a57 (diff)
downloadsamba-d47d14f2ffc7a6d2cc306530b777f364767998b3.tar.gz
samba-d47d14f2ffc7a6d2cc306530b777f364767998b3.tar.bz2
samba-d47d14f2ffc7a6d2cc306530b777f364767998b3.zip
reduced the number of magic types we need in mkproto.pl
In general I prefer "struct foo" to just "foo" for most structures. There are exceptions. (This used to be commit 04eb12b56c653f98801ab29411f47564ab32fa58)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/system.c2
-rw-r--r--source4/lib/util_unistr.c39
2 files changed, 1 insertions, 40 deletions
diff --git a/source4/lib/system.c b/source4/lib/system.c
index bafe689a30..f79386eed1 100644
--- a/source4/lib/system.c
+++ b/source4/lib/system.c
@@ -324,7 +324,7 @@ FILE *sys_fopen(const char *path, const char *type)
A readdir wrapper that will deal with 64 bit filesizes.
********************************************************************/
-SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp)
+struct smb_dirent *sys_readdir(DIR *dirp)
{
#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_READDIR64)
return readdir64(dirp);
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index 71a67eb159..3ab04eda1f 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -794,43 +794,4 @@ int unistrcpy(uint16 *dst, uint16 *src)
return num_wchars;
}
-/**
- * Samba ucs2 type to UNISTR2 conversion
- *
- * @param ctx Talloc context to create the dst strcture (if null) and the
- * contents of the unicode string.
- * @param dst UNISTR2 destination. If equals null, then it's allocated.
- * @param src smb_ucs2_t source.
- * @param max_len maximum number of unicode characters to copy. If equals
- * null, then null-termination of src is taken
- *
- * @return copied UNISTR2 destination
- **/
-UNISTR2* ucs2_to_unistr2(TALLOC_CTX *ctx, UNISTR2* dst, smb_ucs2_t* src)
-{
- size_t len;
-
- if (!src) return NULL;
- len = strlen_w(src);
-
- /* allocate UNISTR2 destination if not given */
- if (!dst) {
- dst = (UNISTR2*) talloc(ctx, sizeof(UNISTR2));
- if (!dst) return NULL;
- }
- if (!dst->buffer) {
- dst->buffer = (uint16*) talloc(ctx, sizeof(uint16) * (len + 1));
- if (!dst->buffer) return NULL;
- }
-
- /* set UNISTR2 parameters */
- dst->uni_max_len = len + 1;
- dst->undoc = 0;
- dst->uni_str_len = len;
-
- /* copy the actual unicode string */
- strncpy_w(dst->buffer, src, dst->uni_max_len);
-
- return dst;
-};