Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cb6e87c1
Commit
cb6e87c1
authored
Mar 23, 2004
by
Falk Hüffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update coding rules.
Originally committed as revision 2920 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8066e59f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
ffmpeg-doc.texi
doc/ffmpeg-doc.texi
+33
-2
No files found.
doc/ffmpeg-doc.texi
View file @
cb6e87c1
...
@@ -925,9 +925,40 @@ to send your patches to the ffmpeg mailing list.
...
@@ -925,9 +925,40 @@ to send your patches to the ffmpeg mailing list.
@section Coding Rules
@section Coding Rules
ffmpeg is programmed in ANSI C language. GCC extensions are
ffmpeg is programmed in the ISO C90 language with a few additional
tolerated. Indent size is 4. The TAB character should not be used.
features from ISO C99, namely:
@itemize @bullet
@item
the @samp
{
inline
}
keyword;
@item
@samp
{
//
}
comments;
@item
designated struct initializers (@samp
{
struct s x = @
{
.i = 17 @
}
;
}
)
@item
compound literals (@samp
{
x = (struct s)
{
17, 23 @
}
;
}
)
@end itemize
These features are supported by all compilers we care about, so we won't
accept patches to remove their use unless they absolutely don't impair
clarity and performance.
All code must compile with gcc 2.95 and gcc 3.3. Currently, ffmpeg also
compiles with several other compilers, such as the Compaq ccc compiler
or Sun Studio 9, and we would like to keep it that way unless it would
be exceedingly involved. To ensure compatibility, please don't use any
additional C99 features or gcc extensions. Watch out especially for:
@itemize @bullet
@item
mixing statements and declarations;
@item
@samp
{
long long
}
(use @samp
{
int64
_
t
}
instead);
@item
@samp
{__
attribute
__}
not protected by @samp
{
#ifdef
__
GNUC
__}
or similar;
@item
gcc statement expressions (@samp
{
(x = (@
{
int y = 4; y; @
}
)
}
).
@end itemize
Indent size is 4. The TAB character should not be used.
The presentation is the one specified by 'indent -i4 -kr'.
The presentation is the one specified by 'indent -i4 -kr'.
Main priority in ffmpeg is simplicity and small code size (=less
Main priority in ffmpeg is simplicity and small code size (=less
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment