Rob Shearman : widl: Implement lcid property on library declarations.

Alexandre Julliard julliard at winehq.org
Thu Apr 24 15:56:48 CDT 2008


Module: wine
Branch: master
Commit: 02f5412a535315bfd3ef6ad57f1962dce0ef9775
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=02f5412a535315bfd3ef6ad57f1962dce0ef9775

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Apr 24 19:03:07 2008 +0100

widl: Implement lcid property on library declarations.

---

 tools/widl/parser.y     |    2 ++
 tools/widl/widltypes.h  |    1 +
 tools/widl/write_msft.c |    4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index bce194c..99be1f2 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -493,6 +493,7 @@ attribute:					{ $$ = NULL; }
 	| tIN					{ $$ = make_attr(ATTR_IN); }
 	| tINPUTSYNC				{ $$ = make_attr(ATTR_INPUTSYNC); }
 	| tLENGTHIS '(' m_exprs ')'		{ $$ = make_attrp(ATTR_LENGTHIS, $3); }
+	| tLCID	'(' expr_const ')'		{ $$ = make_attrp(ATTR_LIBLCID, $3); }
 	| tLOCAL				{ $$ = make_attr(ATTR_LOCAL); }
 	| tNONBROWSABLE				{ $$ = make_attr(ATTR_NONBROWSABLE); }
 	| tNONCREATABLE				{ $$ = make_attr(ATTR_NONCREATABLE); }
@@ -2010,6 +2011,7 @@ struct allowed_attr allowed_attr[] =
     /* ATTR_IN */               { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "in" },
     /* ATTR_INPUTSYNC */        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" },
     /* ATTR_LENGTHIS */         { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "length_is" },
+    /* ATTR_LIBLCID */          { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" },
     /* ATTR_LOCAL */            { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "local" },
     /* ATTR_NONBROWSABLE */     { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" },
     /* ATTR_NONCREATABLE */     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index fd8b8dd..bf28a01 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -104,6 +104,7 @@ enum attr_type
     ATTR_IN,
     ATTR_INPUTSYNC,
     ATTR_LENGTHIS,
+    ATTR_LIBLCID,
     ATTR_LOCAL,
     ATTR_NONBROWSABLE,
     ATTR_NONCREATABLE,
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
index 56bff46..accb648 100644
--- a/tools/widl/write_msft.c
+++ b/tools/widl/write_msft.c
@@ -2322,8 +2322,8 @@ static void set_help_string_context(msft_typelib_t *typelib)
 
 static void set_lcid(msft_typelib_t *typelib)
 {
-    typelib->typelib_header.lcid2 = 0x0;
-    return;
+    const expr_t *lcid_expr = get_attrp( typelib->typelib->attrs, ATTR_LIBLCID );
+    typelib->typelib_header.lcid2 = lcid_expr ? lcid_expr->cval : 0x0;
 }
 
 static void set_lib_flags(msft_typelib_t *typelib)




More information about the wine-cvs mailing list