lib/param: generate the param_functions.h containing the prototypes
[samba.git] / source4 / script / mkproto.pl
index d1f8f886f6e68050c9fa29d2e625678f9389cc34..2c3ebac0f99275a9e3b78e374e57d56f85a2c717 100755 (executable)
@@ -124,33 +124,6 @@ sub print_footer($$)
        $file->("\n#endif /* $header_name */\n\n");
 }
 
-sub handle_loadparm($$) 
-{
-       my ($file,$line) = @_;
-
-       if ($line =~ /^_PUBLIC_ FN_(GLOBAL|LOCAL)_(CONST_STRING|STRING|BOOL|bool|CHAR|INTEGER|LIST)\((\w+),.*\)/o) {
-               my $scope = $1;
-               my $type = $2;
-               my $name = $3;
-
-               my %tmap = (
-                           "BOOL" => "bool ",
-                           "CONST_STRING" => "const char *",
-                           "STRING" => "const char *",
-                           "INTEGER" => "int ",
-                           "CHAR" => "char ",
-                           "LIST" => "const char **",
-                           );
-
-               my %smap = (
-                           "GLOBAL" => "struct loadparm_context *",
-                           "LOCAL" => "struct loadparm_service *"
-                           );
-
-               $file->("$tmap{$type}$name($smap{$scope});\n");
-       }
-}
-
 sub process_file($$$) 
 {
        my ($public_file, $private_file, $filename) = @_;
@@ -190,8 +163,7 @@ sub process_file($$$)
 
                next if ($line =~ /^\/|[;]/);
 
-               if ($line =~ /^_PUBLIC_ FN_/) {
-                       handle_loadparm($public_file, $line);
+               if ($line =~ /^FN_/) {
                        next;
                }
 
@@ -205,7 +177,7 @@ sub process_file($$$)
                                  void|bool|int|struct|char|const|\w+_[tT]\s|uint|unsigned|long|NTSTATUS|
                                  ADS_STATUS|enum\s.*\(|DATA_BLOB|WERROR|XFILE|FILE|DIR|
                              double|TDB_CONTEXT|TDB_DATA|TALLOC_CTX|NTTIME|FN_|init_module|
-                             GtkWidget|GType|smb_ucs2_t|krb5_error_code)
+                             GtkWidget|GType|smb_ucs2_t|krb5_error_code|NET_API_STATUS)
                              /xo);
 
                next if ($line =~ /^int\s*main/);