idl: Use typedef rather than declare.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 12 Jan 2008 00:18:53 +0000 (01:18 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 12 Jan 2008 00:18:53 +0000 (01:18 +0100)
(This used to be commit 3fd750bd54f150ff62fd8165406bd26d03d624cf)

12 files changed:
source4/heimdal/lib/com_err/lex.c
source4/librpc/idl/drsblobs.idl
source4/librpc/idl/drsuapi.idl
source4/librpc/idl/lsa.idl
source4/librpc/idl/nbt.idl
source4/librpc/idl/netlogon.idl
source4/librpc/idl/samr.idl
source4/librpc/idl/spoolss.idl
source4/librpc/idl/srvsvc.idl
source4/librpc/idl/winbind.idl
source4/librpc/idl/winreg.idl
source4/librpc/idl/wkssvc.idl

index 77e79d4eae6791bf813c7ec94b7d36ae537c4ce6..7a85b302a11bcb80cab551a11c2ebe2acf9bbb88 100644 (file)
@@ -343,6 +343,9 @@ FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 typedef int yy_state_type;
 
 extern int yylineno;
+
+int yylineno = 1;
+
 extern char *yytext;
 #define yytext_ptr yytext
 
@@ -530,7 +533,7 @@ static int getstring(void);
 
 #undef ECHO
 
-#line 533 "heimdal/lib/com_err/lex.c"
+#line 536 "heimdal/lib/com_err/lex.c"
 
 #define INITIAL 0
 
@@ -685,7 +688,7 @@ YY_DECL
     
 #line 59 "lex.l"
 
-#line 688 "heimdal/lib/com_err/lex.c"
+#line 691 "heimdal/lib/com_err/lex.c"
 
        if ( !(yy_init) )
                {
@@ -849,7 +852,7 @@ YY_RULE_SETUP
 #line 75 "lex.l"
 ECHO;
        YY_BREAK
-#line 852 "heimdal/lib/com_err/lex.c"
+#line 855 "heimdal/lib/com_err/lex.c"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -1080,7 +1083,7 @@ static int yy_get_next_buffer (void)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       (yy_n_chars), num_to_read );
+                       (yy_n_chars), (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
                }
@@ -1581,7 +1584,7 @@ YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 
 /** Setup the input buffer state to scan a string. The next call to yylex() will
  * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
+ * @param yystr a NUL-terminated string to scan
  * 
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
@@ -1659,6 +1662,15 @@ static void yy_fatal_error (yyconst char* msg )
 
 /* Accessor  methods (get/set functions) to struct members. */
 
+/** Get the current line number.
+ * 
+ */
+int yyget_lineno  (void)
+{
+        
+    return yylineno;
+}
+
 /** Get the input stream.
  * 
  */
@@ -1692,6 +1704,16 @@ char *yyget_text  (void)
         return yytext;
 }
 
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void yyset_lineno (int  line_number )
+{
+    
+    yylineno = line_number;
+}
+
 /** Set the input stream. This does not discard the current
  * input buffer.
  * @param in_str A readable stream.
index f690e39ca43760a6415927016305c25982a0f852..1e80597f4ad477d01ed444b5158fb5c7f5dd2a74 100644 (file)
@@ -9,9 +9,9 @@ import "drsuapi.idl";
   helpstring("Active Directory Replication LDAP Blobs")
 ]
 interface drsblobs {
-       declare bitmap drsuapi_DsReplicaSyncOptions;
-       declare bitmap drsuapi_DsReplicaNeighbourFlags;
-       declare [v1_enum] enum drsuapi_DsAttributeId;
+       typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions;
+       typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags;
+       typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
 
        /*
         * replPropertyMetaData
index e8fbc85f29788d2054e342060f95dbfdf352508a..f298b7e32106d3cceb8ef3d5f2c5e9ddb1441c62 100644 (file)
@@ -13,7 +13,7 @@ import "security.idl", "misc.idl", "samr.idl";
 ]
 interface drsuapi
 {
-       declare bitmap samr_GroupAttrs;
+       typedef bitmap samr_GroupAttrs samr_GroupAttrs;
 
        /*****************/
         /* Function 0x00 */
index b692139fc857f15949252d30c980991aa19ca40a..ea944589369adc2a3e29fa92aadd4e5a45ea4c8c 100644 (file)
@@ -13,7 +13,7 @@ import "security.idl";
   helpstring("Local Security Authority")
 ] interface lsarpc
 {
-       declare bitmap security_secinfo;
+       typedef bitmap security_secinfo security_secinfo;
 
        typedef [public,noejs] struct {
                [value(2*strlen_m(string))] uint16 length;
index 609f84c993bff16788e4770e8834a4fd3f1564b9..d4c2bf1ad096e49117278521f837a660e27b13f4 100644 (file)
@@ -418,7 +418,7 @@ interface nbt
                uint16               lm20_token;
        } nbt_netlogon_response_from_pdc2;
 
-       declare enum netr_SamDatabaseID;
+       typedef enum netr_SamDatabaseID netr_SamDatabaseID;
 
        /* announce change to UAS or SAM */
        typedef struct {
@@ -592,7 +592,7 @@ interface nbt
        /* \MAILSLOT\BROWSE mailslot requests                   */
        /* for details see http://ubiqx.org/cifs/Browsing.html  */
        /********************************************************/
-       declare bitmap svcctl_ServerType;
+       typedef bitmap svcctl_ServerType svcctl_ServerType;
 
        typedef [enum8bit] enum { 
                HostAnnouncement        = 1,
index 96aab3a807d4cc9859b2442431fddc30e82de0fb..dcbb647ba01ce55aba1ee28f8af3cf7b2525f5f5 100644 (file)
@@ -18,7 +18,7 @@ import "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
 
 interface netlogon
 {
-       declare bitmap samr_AcctFlags;
+       typedef bitmap samr_AcctFlags samr_AcctFlags;
 
        /*****************/
        /* Function 0x00 */
@@ -278,7 +278,7 @@ interface netlogon
        /*****************/
        /* Function 0x05 */
 
-       declare enum netr_SchannelType;
+       typedef enum netr_SchannelType netr_SchannelType;
 
        NTSTATUS netr_ServerAuthenticate(
                [in,string,charset(UTF16)] uint16 *server_name,
@@ -306,7 +306,7 @@ interface netlogon
        /*****************/
        /* Function 0x07 */
 
-       declare enum netr_SamDatabaseID;
+       typedef enum netr_SamDatabaseID netr_SamDatabaseID;
 
        typedef struct {
                [string,charset(UTF16)] uint16 *account_name;
index f008637e99307636e8c16cbcfcf5c549c3391e69..b6d2b9f941e173280161b98fbdb255836e24f7ef 100644 (file)
@@ -16,7 +16,7 @@ import "misc.idl", "lsa.idl", "security.idl";
   pointer_default_top(unique)
 ] interface samr
 {
-       declare bitmap security_secinfo;
+       typedef bitmap security_secinfo security_secinfo;
 
        /* account control (acct_flags) bits */
        typedef [public,bitmap32bit] bitmap {
@@ -1240,7 +1240,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        /************************/
        /* Function    0x3f     */
 
-       declare enum samr_RejectReason;
+       typedef enum samr_RejectReason samr_RejectReason;
 
        typedef struct {
                samr_RejectReason reason;
index 9c26b14892de790d701c241a8eab1cf5bac93b18..7d40861a52622801e0bb6751f9eb94e52b37e4b0 100644 (file)
@@ -14,7 +14,7 @@ import "security.idl", "winreg.idl";
   helper("librpc/ndr/ndr_spoolss_buf.h")
 ] interface spoolss
 {
-       declare [v1_enum] enum winreg_Type;
+       typedef [v1_enum] enum winreg_Type winreg_Type;
        typedef struct {
                uint16 year;
                uint16 month;
index 8fb539086acf58c6b920f211ce01a36b69a2ccef..c3f0bd51a78c33c4f3ba0470e667a64719bc2dd7 100644 (file)
@@ -13,8 +13,8 @@ import "security.idl", "svcctl.idl";
   helpstring("Server Service")
 ] interface srvsvc
 {
-       declare bitmap svcctl_ServerType;
-       declare bitmap security_secinfo;
+       typedef bitmap svcctl_ServerType svcctl_ServerType;
+       typedef bitmap security_secinfo security_secinfo;
 
 /**************************/
 /* srvsvc_NetCharDev      */
index 222ac0d6c03b594fb266a9b23db2a61b75c30600..29649c0ea7bbf809038176c9bd03a940139444b8 100644 (file)
@@ -13,8 +13,8 @@ import "netlogon.idl";
 ]
 interface winbind
 {
-       declare [switch_type(uint16)] union netr_LogonLevel;
-       declare [switch_type(uint16)] union netr_Validation;
+       typedef [switch_type(uint16)] union netr_LogonLevel netr_LogonLevel;
+       typedef [switch_type(uint16)] union netr_Validation netr_Validation;
 
        /* a call to get runtime informations */
        void winbind_information(/* TODO */);
index 5d0085c969646554f4f933b92e0828edf8b0963a..fc734b7403c4f1747f78cc57e7120e39c981a738 100644 (file)
@@ -13,7 +13,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
   helpstring("Remote Registry Service")
 ] interface winreg
 {
-       declare bitmap security_secinfo;
+       typedef bitmap security_secinfo security_secinfo;
 
        typedef [bitmap32bit] bitmap {
                KEY_QUERY_VALUE                 = 0x00001,
index dfb18e7ea8290aa7ec489ae15e6b4de16b45e5b3..9829379eef6b709ca52e1b5cb407b3a038747b11 100644 (file)
@@ -14,7 +14,7 @@ import "srvsvc.idl", "lsa.idl";
   endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:")
 ] interface wkssvc
 {
-       declare [v1_enum] enum srvsvc_PlatformId;
+       typedef [v1_enum] enum srvsvc_PlatformId srvsvc_PlatformId;
 
 #define BOOL uint32