From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.46]) by mx.groups.io with SMTP id smtpd.web11.18556.1665834465802509380 for ; Sat, 15 Oct 2022 04:47:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=UtwFAfey; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.220.46, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WF3gjKm06+vExYjqC8DEb1pg9VpGZAZ4OkLOp4LhEOS4tQACy6us35ivo3KMegY2GAPq/c/5bdlEi/nAyNKK98gOv+SVviWaCkLoLORR0soKf5Rijp3JNziZ2d3Gcwl9CdzVABOznN/sw/Hrczg4jNtl+SlYZj3hC7120E+0kf6v/9KoAx3dR+LZMFOtw60VhDCOd+c2Q4O0821pDKxB+Jw6LN/JUb1Ups2XxaKxU/gbtVCswKTWkHeD9aljoCHFpbLf9teO5iinzCy+JvO8FhgQJbyPYcCyjLbazwxzBq1Ee1kfvN4X08YEIRZSAj31V1uNen612sFCXiZ/xJ+UTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UdN8tLUch/047svKH6QFhoVmvJlVbfwe/4DA4LBqnFM=; b=nagnGnqIlLp+WB9pfIy2O56Zgx1tnKAau7VoVB6sPySjUvcwiSPspuoPUHyduwF12q2zAA9GOEfAMAE9FFtwLQuMqeiIgWM+qBAIz5LLs4899vXvEnwLyYV2E6blBu41R1FZZ0z9d4xysgrWktn4NoAPhEXR8GYK6D5BuZsz/s6MzQdZ34wzG9kLX671pq47/UeLoUuvmSYSNCtkGXnHd0grpDcKjfyVxmqAnPujIGiV7/ibFDeU88lWDhH3gxbiviK9VcnSYKRr1ffvysLvJLuwzLb5j/c1VpLlgyJndpoxMzifNnYBheCUp7s7kQJ2SA1KG2KRgucZuBW2UsU5wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UdN8tLUch/047svKH6QFhoVmvJlVbfwe/4DA4LBqnFM=; b=UtwFAfeyOWVJO085wIJlGyj0WTMtr3fYxog2J6LmBwyqRtFVXsVM7Q7yXvssrnnCcsKBtDEekxMa87R5NSJVldH3Br4o7FZ1bl4lO0acmxALM36HcokQGDOjWDsQflzgkawUG35P2iAMEVWgX+/j3MOS2q7r2IBKt/3rl3m+SIc= Received: from MW4PR03CA0326.namprd03.prod.outlook.com (2603:10b6:303:dd::31) by MN2PR12MB4206.namprd12.prod.outlook.com (2603:10b6:208:1d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Sat, 15 Oct 2022 11:47:41 +0000 Received: from CO1NAM11FT077.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dd:cafe::8d) by MW4PR03CA0326.outlook.office365.com (2603:10b6:303:dd::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30 via Frontend Transport; Sat, 15 Oct 2022 11:47:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT077.mail.protection.outlook.com (10.13.175.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.20 via Frontend Transport; Sat, 15 Oct 2022 11:47:41 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sat, 15 Oct 2022 06:47:37 -0500 From: "Chang, Abner" To: CC: Ray Ni , Michael D Kinney , Sunil V L , Abdul Lateef Attar , Leif Lindholm Subject: [tianocore-docs][PATCH V2 1/2] edk II C Coding Standard: Insert Directory Names section Date: Sat, 15 Oct 2022 19:46:45 +0800 Message-ID: <20221015114645.581-1-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT077:EE_|MN2PR12MB4206:EE_ X-MS-Office365-Filtering-Correlation-Id: a151a0cf-2e67-41d0-dfa4-08daaea310f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zkYK5jpAU+IO64lMg2RXKv6eFx7PHngAL5MK1Pop9GIiVQ1CJ4bziFZeXs5OA0cDc5qvKCsAKF8D0FVlM1NCouWIQT2iqwoAXg9jedUdZDI8kFl+YL3SmENDeBtRfcCrz9f3MIH7zuB8I/1fzSDbYC+YQj9lPOvwGV0hroY/K3eVX1FhC5TdGs+XuEWqwAQaNjJte9xOiS46SlnKUdvbvsmhUZb2sF7mRyPhO2WucaqUK65yGPzwGS66zsEzj6XIbxC9DlsYT6RkLPKEGYZiv7rQ6qd2/t4XcNsDAHrIh+/E2zU2SxSbxdOAP9ubjpyyxLygOMJB0WFA7IaaJZuMEsCXe6CpJ3NgVhlH+aP9pcZyBZtupLHVIXk1GtiOklEYeH00WVIwR4Tw/ou8/HhzusGtF7PwW9SCkdssoPTpERhBx9Yij1RpmgQA243LBhdwQpxtfW0hmXLR5k++fgGsPgm4+n/Vl8hqng5crudfXKn/+7wrC8RcGBw/Q/qc2bhVxnCvFpcaBo7+DO+cnhJv0EhPdj18puJ/2dqgOX2lYbsaxJp5P6kW5kdKAHFOomtPVEEInrDfDf91UBoONW+OzA6PG+Hz6DD0c+8vtMWvgHIQietaQRmrDNFB0MsQLFmCfU8RfYZ8/8sNyxMdht4sID0ifkHmxUJx1TC+r+x1hqZC3TlKXhLBtSmHktUiY9IdJLwqRmv+gkYOcDsTZFnL4iJsE5FJMyKQfj5sCGsV1nETsPqO+0E9dvnqKDOIyNKqa8JbePpzDTQACy/RRGF7ckeq20ui3rYHLE/BaH1mDYRsJMHs790UW4UprngDyTvxq/0/zmk0FBwVYTI/V8QITUEyO7h5WLFAeYSMwofBP6I= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199015)(40470700004)(36840700001)(46966006)(47076005)(83380400001)(426003)(86362001)(7696005)(966005)(336012)(2876002)(8676002)(478600001)(4326008)(36860700001)(70206006)(16526019)(1076003)(186003)(2616005)(40480700001)(41300700001)(36756003)(70586007)(2906002)(356005)(40460700003)(82740400003)(6916009)(54906003)(81166007)(316002)(82310400005)(30864003)(5660300002)(8936002)(6666004)(26005)(36900700001)(19607625013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2022 11:47:41.2497 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a151a0cf-2e67-41d0-dfa4-08daaea310f9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT077.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4206 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Abner Chang Insert 4.2 Directory names as the placeholder and update markdown file names and content of follow up sections. PR: https://github.com/tianocore-docs/edk2-CCodingStandardsSpecification/pu= ll/2/files Signed-off-by: Abner Chang Cc: Ray Ni Cc: Michael D Kinney Cc: Sunil V L Cc: Abdul Lateef Attar Cc: Leif Lindholm --- 4_naming_conventions/42_directory_names.md | 30 +++++++++++++ .../{42_file_names.md =3D> 43_file_names.md} | 12 +++--- .../{43_identifiers.md =3D> 44_identifiers.md} | 42 +++++++++---------- ...les.md =3D> 45_global_&_module_variables.md} | 10 ++--- ..._space_rules.md =3D> 46_name_space_rules.md} | 18 ++++---- README.md | 1 + SUMMARY.md | 12 +++--- 7 files changed, 79 insertions(+), 46 deletions(-) create mode 100644 4_naming_conventions/42_directory_names.md rename 4_naming_conventions/{42_file_names.md =3D> 43_file_names.md} (87%) rename 4_naming_conventions/{43_identifiers.md =3D> 44_identifiers.md} (85= %) rename 4_naming_conventions/{44_global_&_module_variables.md =3D> 45_globa= l_&_module_variables.md} (90%) rename 4_naming_conventions/{45_name_space_rules.md =3D> 46_name_space_rul= es.md} (87%) diff --git a/4_naming_conventions/42_directory_names.md b/4_naming_conventi= ons/42_directory_names.md new file mode 100644 index 0000000..766ccb1 --- /dev/null +++ b/4_naming_conventions/42_directory_names.md @@ -0,0 +1,30 @@ + diff --git a/4_naming_conventions/42_file_names.md b/4_naming_conventions/4= 3_file_names.md similarity index 87% rename from 4_naming_conventions/42_file_names.md rename to 4_naming_conventions/43_file_names.md index f948763..13e0c63 100644 --- a/4_naming_conventions/42_file_names.md +++ b/4_naming_conventions/43_file_names.md @@ -1,5 +1,5 @@ =20 -## 4.2 File Names +## 4.3 File Names =20 -### 4.2.1 There is no limit to file name lengths. +### 4.3.1 There is no limit to file name lengths. =20 Do not assume that file names must be 8.3 compatible. Be reasonable though= . Let the file names be as long as necessary, but no longer. Some operating syst= ems limit file names to 32 characters. =20 -### 4.2.2 Spaces in file and directory names are NOT permitted. +### 4.3.2 Spaces in file and directory names are NOT permitted. =20 Allowing spaces would cause problems with certain versions of existing ind= ustry tools and does not provide additional clarity. =20 -### 4.2.3 Never start file names with numbers. +### 4.3.3 Never start file names with numbers. =20 Most source control systems will not be able to handle file names that sta= rt with numbers. =20 -### 4.2.4 Non-standard characters shall not occur in file names. +### 4.3.4 Non-standard characters shall not occur in file names. =20 All file names within an EDK II source tree must comply with the following regular expression: diff --git a/4_naming_conventions/43_identifiers.md b/4_naming_conventions/= 44_identifiers.md similarity index 85% rename from 4_naming_conventions/43_identifiers.md rename to 4_naming_conventions/44_identifiers.md index 5363f73..5c1b113 100644 --- a/4_naming_conventions/43_identifiers.md +++ b/4_naming_conventions/44_identifiers.md @@ -1,5 +1,5 @@ =20 -## 4.3 Identifiers +## 4.4 Identifiers =20 -### 4.3.1 Identifiers shall not rely on the significance of more than 31 c= haracters. +### 4.4.1 Identifiers shall not rely on the significance of more than 31 c= haracters. =20 Identifiers (variable names, labels, structure tags, derived macro names, = etc.) may be an arbitrary length. The ISO standard only guarantees that language @@ -42,7 +42,7 @@ has been confirmed that 31 character / case significance = is supported by EDK II supported tool chains, there is no requirement to ensure uniqueness of externals within the first 6 characters. =20 -### 4.3.2 Always make identifier names that are visually distinguishable. +### 4.4.2 Always make identifier names that are visually distinguishable. =20 While not as big an issue as it has been in the past, when choosing labels ensure that the label is unlikely to be confused with other labels used in= the @@ -50,9 +50,9 @@ file. Ensure that long label names vary by more than one = or two characters. Ensure that labels don't vary between zero and oh (0 and O), one and ell (= 1 and l). Some also consider 2 and Z, and 5 and S to be similar. =20 -### 4.3.3 Hungarian Prefixes +### 4.4.3 Hungarian Prefixes =20 -#### 4.3.3.1 Use of Hungarian notation is not allowed +#### 4.4.3.1 Use of Hungarian notation is not allowed =20 This set of detailed guidelines for naming variables and routines is a convention widely used with the C programming language, especially in @@ -68,7 +68,7 @@ Global data and module data shall be prefixed with 'g' or= 'm', respectively. Pointer variables may optionally be prefixed with 'p'. These are the only exceptions to the prohibition against Hungarian notation. =20 -#### 4.3.3.2 Any variable with file scope, or better, shall be prefixed by= an 'm' or 'g' +#### 4.4.3.2 Any variable with file scope, or better, shall be prefixed by= an 'm' or 'g' =20 There are no exceptions to this rule. The '`m`' prefix identifies a variab= le with module scope, while a '`g`' prefix identifies a global variable. @@ -78,13 +78,13 @@ gThisIsAGlobalVariableName mThisIsAModuleVariableName ``` =20 -#### 4.3.3.3 Pointer variables may optionally be prefixed with a 'p' +#### 4.4.3.3 Pointer variables may optionally be prefixed with a 'p' =20 Time has shown that pass-by-value vs. pass-by-reference errors are significantly reduced with only the introduction of a '`p`' prefix for poi= nter variables. =20 -#### 4.3.3.4 Reasons use of Hungarian prefixes not allowed +#### 4.4.3.4 Reasons use of Hungarian prefixes not allowed =20 The abstraction of abstract data types is ignored. Instead, base types bas= ed on programminglanguage integers or long integers are abstracted. Thus, the na= mes @@ -100,21 +100,21 @@ Studies have shown that Hungarian notation tends to e= ncourage lazy variable names. It's common to focus on the Hungarian prefix without putting effort= into a descriptive name. =20 -### 4.3.4 Function and Data Names +### 4.4.4 Function and Data Names =20 -#### 4.3.4.1 Identifiers shall contain mixed upper- and lower-case text. +#### 4.4.4.1 Identifiers shall contain mixed upper- and lower-case text. =20 Use of all upper- or all lower-case is very difficult to read because comp= ound words cannot be clearly separated. =20 -#### 4.3.4.2 The names of newly created global entities (such as structure= s, macros, and defines) shall not use an `EFI_` prefix. +#### 4.4.4.2 The names of newly created global entities (such as structure= s, macros, and defines) shall not use an `EFI_` prefix. =20 From now on, the use of `DXE_` and `PEI_` prefixes shall be reserved for D= XE and PEI drivers, respectively. If a structure happens to apply equally to PEI = and DXE, it should use the prefix `DXE_`. If a structure is local to a particu= lar module only, no special prefix is required. =20 -#### 4.3.4.3 Acronyms are not capitalized in Function and Data Names. +#### 4.4.4.3 Acronyms are not capitalized in Function and Data Names. =20 When all letters in an acronym are capitalized, it makes the prior and subsequent words visually difficult to distinguish. @@ -123,14 +123,14 @@ subsequent words visually difficult to distinguish. ThisIsAnExampleOfWhatToDoForPci ``` =20 -#### 4.3.4.4 Never use C keywords or the names of symbols declared in the = standard header files as internal symbols. +#### 4.4.4.4 Never use C keywords or the names of symbols declared in the = standard header files as internal symbols. =20 When you need to use the name of an existing library function for a user-defined function, each use of the user-defined function must be paire= d with a corresponding comment. The ISO standard does not, however, guarante= e that the user-defined function will take priority over the library functio= n. =20 -##### 4.3.4.4.1 List of the C-reserved keywords. +##### 4.4.4.4.1 List of the C-reserved keywords. =20 In principle, the ISO standard, reserves all names beginning with undersco= re + capital letter, or with underscore + underscore. External symbols names sh= all @@ -162,23 +162,23 @@ not begin with an underscore. In addition to those listed, the identifiers asm and fortran are common language extensions and should also be treated as reserved. =20 -### 4.3.5 Type and Macro Names +### 4.4.5 Type and Macro Names =20 -#### 4.3.5.1 Use all capital letters for both #define and typedef declarat= ions. +#### 4.4.5.1 Use all capital letters for both #define and typedef declarat= ions. =20 This clearly differentiates static declarations from dynamic data types. =20 -#### 4.3.5.2 Each word of a concept shall be separated by an underscore ch= aracter. +#### 4.4.5.2 Each word of a concept shall be separated by an underscore ch= aracter. =20 The underscore effectively separates the words, making names more readable= . =20 -#### 4.3.5.3 The use of the "_t" suffix, designating a type, is not allowe= d. +#### 4.4.5.3 The use of the "_t" suffix, designating a type, is not allowe= d. =20 ``` typedef UINT32 THIS_IS_AN_EXAMPLE_OF_WHAT_TO_DO_FOR_PCI; ``` =20 -#### 4.3.5.4 The names of guard macros shall end with an underscore charac= ter. +#### 4.4.5.4 The names of guard macros shall end with an underscore charac= ter. =20 The guard macro, used in the `#ifndef` at the start of an include file, us= es a postfix underscore character '`_`', in its name in order to prevent collis= ion @@ -200,7 +200,7 @@ be required if the header files are mutually exclusive. #endif /* FILE_NAME_H_ */ ``` =20 -#### 4.3.5.5 The #else and #endif clauses of conditional compilation block= s shall be commented to identify their context. +#### 4.4.5.5 The #else and #endif clauses of conditional compilation block= s shall be commented to identify their context. =20 If a conditional compilation construct spans more than seven lines, a comm= ent shall be added to the construct's `#else` and `#endif` clauses identifying= the diff --git a/4_naming_conventions/44_global_&_module_variables.md b/4_namin= g_conventions/45_global_&_module_variables.md similarity index 90% rename from 4_naming_conventions/44_global_&_module_variables.md rename to 4_naming_conventions/45_global_&_module_variables.md index a2ec4f6..cdeb0a2 100644 --- a/4_naming_conventions/44_global_&_module_variables.md +++ b/4_naming_conventions/45_global_&_module_variables.md @@ -1,5 +1,5 @@ =20 -## 4.4 Global & Module Variables +## 4.5 Global & Module Variables =20 There is often confusion about what constitutes module variables versus gl= obal variables. Technically, both global and module variables are defined at fi= le @@ -45,9 +45,9 @@ small number of routines. On the other hand, a global var= iable is accessed throughout the firmware and as the firmware evolves more code will tend to access the data resulting in a large number of uses to track down. =20 -### 4.4.1 Recommendations for Global and Module Variables +### 4.5.1 Recommendations for Global and Module Variables =20 -#### 4.4.1.1 The use of global and module data is strongly discouraged. +#### 4.5.1.1 The use of global and module data is strongly discouraged. =20 Global variables are appropriate for GUID, protocol, PPI definitions and o= ther immutable objects. Attempting to create global variables can cause many @@ -59,7 +59,7 @@ programming issues. A module is defined to be a set of da= ta and routines that act on that data. Thus, in EFI a protocol could be thought of as a module.= A complicated protocol may be built out of several smaller modules. =20 -#### 4.4.1.2 Use locking to protect access to global and module variables. +#### 4.5.1.2 Use locking to protect access to global and module variables. =20 This protection is strongly encouraged and especially useful for data that= is accessed at various task priority levels. diff --git a/4_naming_conventions/45_name_space_rules.md b/4_naming_convent= ions/46_name_space_rules.md similarity index 87% rename from 4_naming_conventions/45_name_space_rules.md rename to 4_naming_conventions/46_name_space_rules.md index ecdebbe..98e2687 100644 --- a/4_naming_conventions/45_name_space_rules.md +++ b/4_naming_conventions/46_name_space_rules.md @@ -1,5 +1,5 @@ =20 -## 4.5 Name Space Rules +## 4.6 Name Space Rules =20 ISO C defines several name spaces (see ISO/IEC 9899:1994 6.1.2.3). The sam= e name could be used in a separate name space for a completely different ite= m. @@ -46,7 +46,7 @@ Name spaces are defined as: apply to scope. Scope is described in "Scoping Rules". ********** =20 -### 4.5.1 Names shall be used consistently within the same type. +### 4.6.1 Names shall be used consistently within the same type. =20 For example, structure tags may only be reused as structure types, and uni= on tags may be reused only for union types. @@ -62,7 +62,7 @@ typedef struct MyStruct { Because of the similarity of `MyStruct` to `MY_STRUCT`, they may only be u= sed to refer to the same structure type. =20 -### 4.5.2 No identifier in one name space may be reused as an identifier i= n another name space +### 4.6.2 No identifier in one name space may be reused as an identifier i= n another name space =20 Exceptions are structure member and union member names. =20 @@ -85,10 +85,10 @@ typedef struct { } BAD_STRUCT; ``` =20 -### 4.5.3 A typedef name shall be a unique identifier. +### 4.6.3 A typedef name shall be a unique identifier. =20 The name that appears at the end of a typedef (`STRUCT_ONE` and `STRUCT_TW= O` in -the example in Section 4.5.2) is known as a _typedef name_. Because of amb= iguity +the example in Section 4.6.2) is known as a _typedef name_. Because of amb= iguity in the C specifications, and to avoid confusion, and once a typedef name i= s used in a structure declaration, it may not be declared elsewhere =20 @@ -97,10 +97,10 @@ in a structure declaration, it may not be declared else= where number of files is not a violation of this rule. ********** =20 -### 4.5.4 A tag name shall be unique. +### 4.6.4 A tag name shall be unique. =20 The name after the `struct` in structure definitions (`StructOne` and -`StructTwo` in the example in 4.5.2) is known as a _structure tag_ or simp= ly a +`StructTwo` in the example in 4.6.2) is known as a _structure tag_ or simp= ly a _tag_. To avoid confusion, once a tag is used for declaring a structure it shall not be declared elsewhere. =20 @@ -109,7 +109,7 @@ shall not be declared elsewhere. violation of this rule. ********** =20 -### 4.5.5 Prefix module-scope identifiers for cleaner namespaces. +### 4.6.5 Prefix module-scope identifiers for cleaner namespaces. =20 The use of prefixes is not an absolute requirement, but has been shown as = a successful method of avoiding namespace pollution and makes it easier to m= eet diff --git a/README.md b/README.md index 0648819..77cfdc8 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights = reserved. | | [#425](https://bugzilla.tianocore.org/show_bug.cgi?id=3D425) = [CCS] clarify line breaking and indentation requirements for multi-line fun= ction calls | | | | [#1656](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1656= ) Update all Wiki pages for the BSD+Patent license change with SPDX identif= iers | | | | [#607](https://bugzilla.tianocore.org/show_bug.cgi?id=3D607) = Document code comment requirements for spurious variable assignments = | | +| 2.3 | Add 4.2 Directory names section and update File names section= for the guidelines of module directory and file naming|September 2022|| diff --git a/SUMMARY.md b/SUMMARY.md index cf8600a..32a575d 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,7 +1,8 @@