From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.46]) by mx.groups.io with SMTP id smtpd.web12.4340.1666154026844879256 for ; Tue, 18 Oct 2022 21:33:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=NsYa+oMv; 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.94.46, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8dnLcB/Xmtb1VX6RJ4k5G4ZKAGKlSCv4DnWVgCBowTS2+E8oKCC7Qv3RUKfFHurq5Q+5HCsgRQbi4fd0LK4UDx+Mr0WR204t47W4+Vqc/LhUbL2t+2rcsocRuXUKi9491oKpo6/+VZC/GxcD6ibLHba/izyG/csq+zVAVdZ1Vuwtqm7CLiUU3h7p3nx+hCv49BfNU3WaINl/OjzZiiLv7p+SETmXiL8ZwmUWTFR5D9y/9YEOdsZLnxWHCm2H3XR/gfr+qEGjN5PZmoHmtaW/cYFtvYuug1VPyBtSY9TNR/CqF1w0S2yDRjt2//uR1c3u6OlfJlhJ46yBSrHL4LiSg== 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=eDHJatnPasO/SKsCgH7axmvaA9QNBRjTjBzoCR3cUXE=; b=BiKuLjIoCmcvhjXMRAfhqjPj4ZtZ2wN3mqn+Gh1vEukQZik9yTpnyfbPrDC0PRKii6UvLL3ddX5ETDuS/UZv+NmTtTaJGSN7dwkBDX/Q4fnZcKf84SNKyWp05d8wlriEVOESztZPwf2dq30paTPqd5TxDcFIPlUM0E5iBM+l7WUmK0VHaTR2GV5uD1YOlvMrjRtDxmWnIxoK25S2VwdnIb1yZIopdhmf1WBH6o/5nC8qbO4rtpKNQb73Y8ZsU/2l1hNGbjmRuTEpFXRH0ltpknB3d4qa/FSzQ+JrtYoQcQJpcqJr/AYrfQM3iht3u8zLZQT9NSBRPQ7wVTXxXynwsQ== 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=eDHJatnPasO/SKsCgH7axmvaA9QNBRjTjBzoCR3cUXE=; b=NsYa+oMvqTQ2pEsXoHMlPOcOcyn0yrn1LZXh6xCfRuL+rKwrsXMDaqNkhJyI4HIl0BmUoKxg//sbBo8HMk9u9E5tcZhdORNzhhjWUYqmMxHetI9LolOmTQ3iXYDeBHqX7dX24kkWYOC/0Ly4PzYb4qKdFWGXDibxlLTR6x12JB4= Received: from DM6PR02CA0084.namprd02.prod.outlook.com (2603:10b6:5:1f4::25) by DS7PR12MB6262.namprd12.prod.outlook.com (2603:10b6:8:96::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32; Wed, 19 Oct 2022 04:33:44 +0000 Received: from DM6NAM11FT085.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::6c) by DM6PR02CA0084.outlook.office365.com (2603:10b6:5:1f4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.31 via Frontend Transport; Wed, 19 Oct 2022 04:33:44 +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 DM6NAM11FT085.mail.protection.outlook.com (10.13.172.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Wed, 19 Oct 2022 04:33:44 +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.31; Tue, 18 Oct 2022 23:33:41 -0500 From: "Chang, Abner" To: CC: Ray Ni , Michael D Kinney , Sunil V L , Abdul Lateef Attar , Leif Lindholm , Ray Ni Subject: [tianocore-docs][PATCH V3 1/2] edk II C Coding Standard: Insert Directory Names section Date: Wed, 19 Oct 2022 12:33:11 +0800 Message-ID: <20221019043311.994-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT085:EE_|DS7PR12MB6262:EE_ X-MS-Office365-Filtering-Correlation-Id: 60959aff-c4bc-4c6d-2fe2-08dab18b1b55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yZm9yaLxTESGYshvOlFXkV5PZmZT8SzE40BZ9ejTgLwXD7c6qY/G4nMsAdTJrw2emfAJDZEpZiapvwWSOcfHXiYHJW8pL/yalR4tqthIDaPTc4r5UCsCnn4YES1QPQDm21awEXVfwBzo8paGPrsAPxhei0ahxfjItP2quwx2FNprwJuKcN/BMKyLXJuvXZ4R0iybbfarYbhsKhjXcTbI8K+KZgDN2PlSvEsDQzrFV5gHcJwaQ7b4hB0ugoaFNwNK8heNnpb8Ml07Oc3IBOM6nMfwmvIo8GV51ZJe2cSTF7iSknSMIBdJmOZU1CADfI8DemfxV2twa16shreGWLwEL96ztzmWoP5Ei1r9ZtiO5Va3ob4SZG9R0IABDXE/jqGMlYl3dYlmRztFDODAn+jpiJXLeMTHylDUHqF4bxAwr1GRzIEvIq8O2Ip9YiI9/eZ4Gh53KTdik7AxhL8bHygxN1dy5Un5v/1pg0xeLvz8h5OaA+PAkRtWtQRn1M1GvX2SntHFZPDMfKy0GeN9I/YRMkqcDwRe8U2gCC1eOE3Afb4uOoOQIjS9pw0+onEK4M2YnD75IjJL1WfnKcozxZgHGU/o96kpEEWE29v2/XfdeodTiWlZjnCuRQwM+47joXLr4UfaoRixt0XGPU68m+k5T7/H33y8YwHpyabE012PXOQLwL5SMag8XuhxhRS2u+8qapvHB57VKdJOOyxTEVh/FbzswULGqHUfYje9OCATN7SQk2X4BRD8cyeWTOnJf4ufv7OSgXXi/341l4CtkRAd3TS257DEGMt1qR50bEXNFvRi0bVEF/sNdgdLWZHvH8E1SddaUxQzR1fD7IKH1TmkgZedZ+tNkcTL0m+oGSRd1J0= 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)(136003)(346002)(376002)(39860400002)(396003)(451199015)(46966006)(40470700004)(36840700001)(36756003)(30864003)(36860700001)(86362001)(82740400003)(2876002)(2906002)(2616005)(5660300002)(426003)(186003)(47076005)(16526019)(1076003)(81166007)(356005)(83380400001)(336012)(26005)(966005)(316002)(478600001)(7696005)(6916009)(54906003)(70586007)(70206006)(82310400005)(6666004)(40480700001)(8936002)(4326008)(41300700001)(40460700003)(8676002)(36900700001)(19607625013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2022 04:33:44.2547 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60959aff-c4bc-4c6d-2fe2-08dab18b1b55 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: DM6NAM11FT085.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6262 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 Reviewed-by: Ray Ni Reviewed-by: Abdul Lateef Attar --- 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 @@