Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
cb6e87c1
Commit
cb6e87c1
authored
21 years ago
by
Falk Hüffner
Browse files
Options
Downloads
Patches
Plain Diff
Update coding rules.
Originally committed as revision 2920 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8066e59f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/ffmpeg-doc.texi
+33
-2
33 additions, 2 deletions
doc/ffmpeg-doc.texi
with
33 additions
and
2 deletions
doc/ffmpeg-doc.texi
+
33
−
2
View file @
cb6e87c1
...
...
@@ -925,9 +925,40 @@ to send your patches to the ffmpeg mailing list.
@section Coding Rules
ffmpeg is programmed in ANSI C language. GCC extensions are
tolerated. Indent size is 4. The TAB character should not be used.
ffmpeg is programmed in the ISO C90 language with a few additional
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'.
Main priority in ffmpeg is simplicity and small code size (=less
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment