don't need srvstr_push_size or srvstr_pull_size
authorAndrew Tridgell <tridge@samba.org>
Wed, 14 Mar 2001 12:45:46 +0000 (12:45 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 14 Mar 2001 12:45:46 +0000 (12:45 +0000)
source/include/proto.h
source/smbd/srvstr.c

index e666f23ece33fd0c9824a8ccda544306c0370f6d..999e3e2b823d8b12c03c71f35dca55c297296ae9 100644 (file)
@@ -4074,10 +4074,7 @@ void close_cnum(connection_struct *conn, uint16 vuid);
 /*The following definitions come from  smbd/srvstr.c  */
 
 int srvstr_push(void *outbuf, void *dest, const char *src, int dest_len, int flags);
-int srvstr_push_size(void *outbuf, 
-                    const void *dest, const char *src, int dest_len, int flags);
 int srvstr_pull(void *inbuf, char *dest, const void *src, int dest_len, int src_len, int flags);
-int srvstr_pull_size(void *inbuf, const void *src, int src_len);
 int srvstr_align(void *inbuf, int offset);
 
 /*The following definitions come from  smbd/ssl.c  */
index c3eef464408e4f5097bf0dafd48079013a433d30..241a74f02f04d24aead46125c7d8e8ad7c84df7d 100644 (file)
@@ -78,28 +78,6 @@ int srvstr_push(void *outbuf, void *dest, const char *src, int dest_len, int fla
        return len;
 }
 
-
-/****************************************************************************
-return the length that a string would occupy when copied with srvstr_push()
-  STR_TERMINATE means include the null termination
-  STR_CONVERT   means convert from unix to dos codepage
-  STR_UPPER     means uppercase in the destination
-note that dest is only used for alignment purposes. No data is written.
-****************************************************************************/
-int srvstr_push_size(void *outbuf, 
-                    const void *dest, const char *src, int dest_len, int flags)
-{
-       int len = strlen(src);
-       if (flags & STR_TERMINATE) len++;
-       if (!(flags & STR_ASCII) && UNICODE_FLAG(outbuf)) len *= 2;
-
-       if (!(flags & STR_ASCII) && dest && srvstr_align(outbuf, PTR_DIFF(outbuf, dest))) {
-               len++;
-       }
-
-       return len;
-}
-
 /****************************************************************************
 copy a string from a unicode or ascii source (depending on flg2) 
 to a char* destination
@@ -156,24 +134,6 @@ int srvstr_pull(void *inbuf, char *dest, const void *src, int dest_len, int src_
        return len;
 }
 
-/****************************************************************************
-return the length that a string would occupy (not including the null)
-when copied with srvstr_pull()
-if src_len is -1 then assume the source is null terminated
-****************************************************************************/
-int srvstr_pull_size(void *inbuf, const void *src, int src_len)
-{
-       if (srvstr_align(inbuf, PTR_DIFF(src, inbuf))) {
-               src++;
-               if (src_len > 0) src_len--;
-       }
-
-       if (!UNICODE_FLAG(inbuf)) {
-               return strlen(src);
-       }       
-       return strlen_w(src);
-}
-
 /****************************************************************************
 return an alignment of either 0 or 1
 if unicode is not negotiated then return 0