Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Coding_Standard_Latest

Coding_Standard_Latest

Ratings: (0)|Views: 55|Likes:
Published by api-3752289

More info:

Published by: api-3752289 on Oct 15, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

Internal Document
C Coding Standard
Release <Software Release Number>
<DocNum> Rev. X0

Document Version <1.2>
15 October, 2008
KWC-SWAT Team

Kyocera Proprietary
Export of this technology or software is regulated by the U.S. Government.
Diversion contrary to U.S. law prohibited.

Data and information contained in or disclosed by this document are proprietary information of Kyocera Wireless Corp., and all rights therein are expressly reserved. By accepting this material, the recipient agrees that this material and the information contained therein are held in confidence and in trust and will not be used, copied, or reproduced in whole or in part, nor its contents revealed in any manner to others without the express written permission of Kyocera Wireless Corp.

123456789
10

Kyocera Wireless Corp.
10300 Campus Point Drive
San Diego, California 92121-1714

Copyright \u00a9 2001 Kyocera Wireless Corp. All rights reserved.
Printed in the United States of America.
<DocNum> Rev. X0
Document Version <1.2>
1 September, 2004
Kyocera Proprietary
11
1

12 13 14 15 16 17 18 19

20 21 22 23

C Coding Standard
Internal Document
Contents
Release <Software Release Number>
Contents
Table of Contents
1 Introduction....................................................................................................................... . . . . . . . . . 1
2 Naming Standards..................................................................................................................... 2

2.1 General Considerations in Naming........................................................................................ 2 2.2 File Names.............................................................................................................................2 2.3 Variable and Function Names................................................................................................ 3 2.3.1 Basics............................................................................................................................... 3 2.3.2 Visibility (scope) of Names............................................................................................. 4 2.3.3 #define.............................................................................................................................. 4 2.3.4 typedef.............................................................................................................................. 5 2.3.5 enum.................................................................................................................................5 2.3.6 struct................................................................................................................................. 5 2.4 Pseudo-Hungarian Notation................................................................................................... 6

3 File Organization.......................................................................................................................7

3.1 Header (.h) files..................................................................................................................... 8 3.1.1 Header File Identifier (double-inclusion preventer)........................................................ 8 3.1.2 Header File Comment...................................................................................................... 8 3.1.3 Nesting of Header Files................................................................................................... 9 3.1.4 Variable Declarations in Header Files.............................................................................. 9 3.1.5 Function Declarations in Header Files............................................................................. 9 3.2 Source (.c) files...................................................................................................................... 9 3.2.1 Source File Comment...................................................................................................... 9 3.2.2 Declarations of file-local (static) functions.................................................................... 10 3.2.3 Function Headers........................................................................................................... 10 3.2.4 Logic Headers................................................................................................................ 10 3.3 Templates............................................................................................................................. 10 3.4 Copyright............................................................................................................................. 10

4 Code Formatting..................................................................................................... . . . . . . . . . . . . . . . . . 12

4.1 Code formatters.................................................................................................................... 12 4.2 Whitespace........................................................................................................................... 12 4.3 Long Lines...........................................................................................................................13 4.4 Operator Precedence............................................................................................................ 13 4.5 Conditional and Mathematical Operations.......................................................................... 14

KWC-SWAT Team
<DocNum> Rev. X0
8865897.doc
1 September, 2004
Kyocera Proprietary
Page iii
24
25
123456789
10

11 12 13 14 15

16

17 18 19 20 21 22 23 24 25 26 27 28 29

30

31 32 33 34 35

26
27

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->