summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-07 12:02:44 -0800
committerJeremy Allison <jra@samba.org>2007-12-07 12:02:44 -0800
commit9e8180b9835fc100c25ef230747f7b44ef03d685 (patch)
treecf5d36ea4d4d94f4ca841ef2905ffd7c53b60038 /source3/lib
parent67344a467f77513c31fc8c941a22701ce26eea83 (diff)
downloadsamba-9e8180b9835fc100c25ef230747f7b44ef03d685.tar.gz
samba-9e8180b9835fc100c25ef230747f7b44ef03d685.tar.bz2
samba-9e8180b9835fc100c25ef230747f7b44ef03d685.zip
Remove pstrings completely except for smbctool (what does this do ?).
Don't build this for now. Jeremy. (This used to be commit 46b67fd82c795d1a34a1efca9e409c0f3fa4f3a2)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c16
-rw-r--r--source3/lib/util_str.c17
2 files changed, 9 insertions, 24 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3d653d9b80..83b122c660 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2211,9 +2211,9 @@ void dump_data(int level, const unsigned char *buf1,int len)
n = MIN(8,i%16);
print_asc(level,&buf[i-(i%16)],n); DEBUGADD(level,( " " ));
n = (i%16) - n;
- if (n>0) print_asc(level,&buf[i-n],n);
- DEBUGADD(level,("\n"));
- }
+ if (n>0) print_asc(level,&buf[i-n],n);
+ DEBUGADD(level,("\n"));
+ }
}
void dump_data_pw(const char *msg, const uchar * data, size_t len)
@@ -2229,10 +2229,10 @@ void dump_data_pw(const char *msg, const uchar * data, size_t len)
char *tab_depth(int depth)
{
- static pstring spaces;
+ static fstring spaces;
size_t len = depth * 4;
- if (len > sizeof(pstring)-1) {
- len = sizeof(pstring)-1;
+ if (len > sizeof(fstring)-1) {
+ len = sizeof(fstring)-1;
}
memset(spaces, ' ', len);
@@ -2254,7 +2254,7 @@ int str_checksum(const char *s)
int res = 0;
int c;
int i=0;
-
+
while(*s) {
c = *s;
res ^= (c << (i % 15)) ^ (c >> (15-(i%15)));
@@ -2564,7 +2564,7 @@ char *pid_path(const char *name)
*
* @param name File to find, relative to LIBDIR.
*
- * @retval Pointer to a static #pstring containing the full path.
+ * @retval Pointer to a string containing the full path.
**/
char *lib_path(const char *name)
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index f26c8b8a77..0bf4ac83b2 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -1277,7 +1277,7 @@ void fstring_sub(char *s,const char *pattern,const char *insert)
/**
Similar to string_sub2, but it will accept only allocated strings
and may realloc them so pay attention at what you pass on no
- pointers inside strings, no pstrings or const may be passed
+ pointers inside strings, no const may be passed
as string.
**/
@@ -1992,21 +1992,6 @@ char *binary_string(char *buf, int len)
s[j] = 0;
return s;
}
-/**
- Just a typesafety wrapper for snprintf into a pstring.
-**/
-
- int pstr_sprintf(pstring s, const char *fmt, ...)
-{
- va_list ap;
- int ret;
-
- va_start(ap, fmt);
- ret = vsnprintf(s, PSTRING_LEN, fmt, ap);
- va_end(ap);
- return ret;
-}
-
/**
Just a typesafety wrapper for snprintf into a fstring.