summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tdr/tdr.c25
-rwxr-xr-xsource4/script/mkproto.pl16
2 files changed, 28 insertions, 13 deletions
diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c
index 22893b18ea..5d645c4ff3 100644
--- a/source4/lib/tdr/tdr.c
+++ b/source4/lib/tdr/tdr.c
@@ -45,7 +45,7 @@
#define TDR_SSVAL(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSSVAL(tdr->data.data,ofs,v); } else SSVAL(tdr->data.data,ofs,v); } while (0)
#define TDR_SIVAL(tdr, ofs, v) do { if (TDR_BE(tdr)) { RSIVAL(tdr->data.data,ofs,v); } else SIVAL(tdr->data.data,ofs,v); } while (0)
-/*
+/**
expand the available space in the buffer to 'size'
*/
NTSTATUS tdr_push_expand(struct tdr_push *tdr, uint32_t size)
@@ -198,10 +198,11 @@ NTSTATUS tdr_print_charset(struct tdr_print *tdr, const char *name, const char *
return NT_STATUS_OK;
}
-/*
+/**
pull a ipv4address
*/
-NTSTATUS tdr_pull_ipv4address(struct tdr_pull *tdr, TALLOC_CTX *ctx, const char **address)
+NTSTATUS tdr_pull_ipv4address(struct tdr_pull *tdr, TALLOC_CTX *ctx,
+ const char **address)
{
struct ipv4_addr in;
TDR_CHECK(tdr_pull_uint32(tdr, ctx, &in.addr));
@@ -211,7 +212,7 @@ NTSTATUS tdr_pull_ipv4address(struct tdr_pull *tdr, TALLOC_CTX *ctx, const char
return NT_STATUS_OK;
}
-/*
+/**
push a ipv4address
*/
NTSTATUS tdr_push_ipv4address(struct tdr_push *tdr, const char **address)
@@ -221,7 +222,7 @@ NTSTATUS tdr_push_ipv4address(struct tdr_push *tdr, const char **address)
return NT_STATUS_OK;
}
-/*
+/**
print a ipv4address
*/
NTSTATUS tdr_print_ipv4address(struct tdr_print *tdr, const char *name,
@@ -231,7 +232,7 @@ NTSTATUS tdr_print_ipv4address(struct tdr_print *tdr, const char *name,
return NT_STATUS_OK;
}
-/*
+/**
parse a hyper
*/
NTSTATUS tdr_pull_hyper(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint64_t *v)
@@ -243,7 +244,7 @@ NTSTATUS tdr_pull_hyper(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint64_t *v)
return NT_STATUS_OK;
}
-/*
+/**
push a hyper
*/
NTSTATUS tdr_push_hyper(struct tdr_push *tdr, uint64_t *v)
@@ -255,9 +256,7 @@ NTSTATUS tdr_push_hyper(struct tdr_push *tdr, uint64_t *v)
return NT_STATUS_OK;
}
-
-
-/*
+/**
push a NTTIME
*/
NTSTATUS tdr_push_NTTIME(struct tdr_push *tdr, NTTIME *t)
@@ -266,7 +265,7 @@ NTSTATUS tdr_push_NTTIME(struct tdr_push *tdr, NTTIME *t)
return NT_STATUS_OK;
}
-/*
+/**
pull a NTTIME
*/
NTSTATUS tdr_pull_NTTIME(struct tdr_pull *tdr, TALLOC_CTX *ctx, NTTIME *t)
@@ -275,7 +274,7 @@ NTSTATUS tdr_pull_NTTIME(struct tdr_pull *tdr, TALLOC_CTX *ctx, NTTIME *t)
return NT_STATUS_OK;
}
-/*
+/**
push a time_t
*/
NTSTATUS tdr_push_time_t(struct tdr_push *tdr, time_t *t)
@@ -283,7 +282,7 @@ NTSTATUS tdr_push_time_t(struct tdr_push *tdr, time_t *t)
return tdr_push_uint32(tdr, (uint32_t *)t);
}
-/*
+/**
pull a time_t
*/
NTSTATUS tdr_pull_time_t(struct tdr_pull *tdr, TALLOC_CTX *ctx, time_t *t)
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index ebdd803991..827304b650 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -158,10 +158,24 @@ sub process_file($$$)
$private_file->("\n/* The following definitions come from $filename */\n\n");
+ my $comment = undef;
+ my $incomment = 0;
while (my $line = <FH>) {
my $target = \&private;
my $is_public = 0;
+ if ($line =~ /^\/\*\*/) {
+ $comment = "";
+ $incomment = 1;
+ }
+
+ if ($incomment) {
+ $comment .= $line;
+ if ($line =~ /\*\//) {
+ $incomment = 0;
+ }
+ }
+
# these are ordered for maximum speed
next if ($line =~ /^\s/);
@@ -189,6 +203,8 @@ sub process_file($$$)
next if ($line =~ /^int\s*main/);
+ $target->("\n$comment") if (defined($comment)); $comment = undef;
+
if ( $line =~ /\(.*\)\s*$/o ) {
chomp $line;
$target->("$line;\n");