[vlc-devel] [PATCH 00/27] Fix of reserved identifiers (cont.)
Filip Roséen
filip at atch.se
Mon Feb 22 01:12:41 CET 2016
> https://mailman.videolan.org/pipermail/vlc-devel/2016-February/106154.html
>
> These patches all boil down to fixing issues where reserved identifiers are
> used, making the codebase ill-formed according to the C (WG14) ISO Standard.
>
> - http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf (section: 7.1.3/1)
> - http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
> - http://c-faq.com/decl/namespace.html
>
>
> In short, removal/fix of the following type of identifiers:
>
> - identifiers in the global scope that start with an underscore
> - identifiers (everywhere) that start with an underscore followed by a uppercase letter
> - identifiers (everywhere) that start with two underscores
This time the naming convention of the fixed include-guards should be more
pleasing to the eye, as well as more on point with the rest of the codebase.
After a discussion regarding the matter in `#videolan`, it was decided that the
fixed include-guards should follow the below described convention:
include/vlc/*: LIBVLC_${FILE-WITHOUT-EXT}_${EXT}_
src/*/*: LIBVLC_${DIRECTORY-NAME}_{FILE-WITHOUT-EXT}_${EXT}_
src/*: LIBVLC_${FILE-WITHOUT-EXT}_${EXT}_
include/*: VLC_${FILE-WITHOUT-EXT}_${EXT}_
modules/*: VLC_${MODULE-NAME}_${FILE-WITHOUT-EXT}_${EXT}_
Examples (affected in this patch):
src/video_output/inhibit.h => LIBVLC_VIDEO_OUTPUT_INHIBIT_H_
modules/mux/mpeg/csa.h => VLC_MPEG_CSA_H_
NOTE:
- Not all patches are related to reserved identifiers in include-guards,
please pay special attention to patch #3 and #16.
- Everything has been changed manually. I have tried to make sure that there
aren't any typos in the patches, but if that's the case I will offer a (1)
beer to anyone who spot such.
Filip Roséen (27):
src/video_output/: fixed broken include-guard
m/visualization/visual/: fixed include-guards
modules/video_filter: removed usage of reserved identifier
modules/video_chroma: fixed include-guards
modules/packetizer: fixed include-guards
modules/mux/mpeg: fixed include-guards
modules/misc/webservices: fixed include-guards
modules/lua: reserved identifier in function names
modules/hw/mmal: fixed include-guards
modules/gui/qt4/util: fixed include-guards
modules: gui/qt4/components/sout: fixed include-guard
modules/gui/qt4/components/playlist: fixed include-guards
modules/gui/qt4/components: fixed include-guards
modules/demux/mp4: fixed include-guards
modules/demux/mkv: fixed include-guards
modules/demux/avi: renamed reserved identifiers
modules/demux/asf: fixed include-guards
modules/control/dbus: fixed include-guards
modules/codec/wmafixed: fixed include-guards
modules/codec/avcodec: fixed include-guards
modules/codec: fixed include-guards
modules/audio_filter: fixed include-guard
modules/access/zip/unzip: fixed include-guard
modules/access/v4l2/linux: fixed include-guards
module/access/mms: fixed include-guards
modules/access/linsys: fixed include-guards
modules/access/dcp: fixed include-guards
modules/access/dcp/dcpparser.h | 6 +++---
modules/access/linsys/linsys_sdi.h | 4 ++--
modules/access/linsys/linsys_sdiaudio.h | 4 ++--
modules/access/linsys/linsys_sdivideo.h | 4 ++--
modules/access/mms/asf.h | 4 ++--
modules/access/mms/buffer.h | 4 ++--
modules/access/mms/mms.h | 4 ++--
modules/access/mms/mmsh.h | 4 ++--
modules/access/mms/mmstu.h | 4 ++--
modules/access/v4l2/linux/videodev2.h | 6 +++---
modules/access/zip/unzip/ioapi.h | 4 ++--
modules/audio_filter/equalizer_presets.h | 4 ++--
modules/codec/a52.h | 4 ++--
modules/codec/avcodec/chroma.h | 4 ++--
modules/codec/cc.h | 4 ++--
modules/codec/mft.c | 2 ++
modules/codec/wmafixed/asf.h | 4 ++--
modules/codec/wmafixed/wmadec.h | 4 ++--
modules/control/dbus/dbus_common.h | 6 +++---
modules/control/dbus/dbus_introspect.h | 6 +++---
modules/control/dbus/dbus_player.h | 6 +++---
modules/control/dbus/dbus_root.h | 6 +++---
modules/control/dbus/dbus_tracklist.h | 6 +++---
modules/demux/asf/asfpacket.h | 4 ++--
modules/demux/asf/libasf.h | 4 ++--
modules/demux/avi/libavi.c | 4 ++--
modules/demux/avi/libavi.h | 8 ++++----
modules/demux/mkv/Ebml_parser.hpp | 4 ++--
modules/demux/mkv/chapter_command.hpp | 4 ++--
modules/demux/mkv/chapters.hpp | 4 ++--
modules/demux/mkv/demux.hpp | 4 ++--
modules/demux/mkv/matroska_segment.hpp | 4 ++--
modules/demux/mkv/mkv.hpp | 4 ++--
modules/demux/mkv/virtual_segment.hpp | 4 ++--
modules/demux/mp4/fragments.h | 4 ++--
modules/demux/mp4/languages.h | 4 ++--
modules/demux/mp4/libmp4.h | 4 ++--
modules/demux/mp4/mp4.h | 4 ++--
modules/gui/qt4/components/complete_preferences.hpp | 4 ++--
modules/gui/qt4/components/controller_widget.hpp | 4 ++--
modules/gui/qt4/components/extended_panels.hpp | 4 ++--
modules/gui/qt4/components/info_panels.hpp | 4 ++--
modules/gui/qt4/components/interface_widgets.hpp | 4 ++--
modules/gui/qt4/components/open_panels.hpp | 4 ++--
modules/gui/qt4/components/playlist/playlist.hpp | 4 ++--
modules/gui/qt4/components/playlist/playlist_item.hpp | 4 ++--
modules/gui/qt4/components/playlist/playlist_model.hpp | 4 ++--
modules/gui/qt4/components/playlist/selector.hpp | 4 ++--
modules/gui/qt4/components/playlist/sorting.h | 4 ++--
modules/gui/qt4/components/playlist/standardpanel.hpp | 4 ++--
modules/gui/qt4/components/playlist/views.hpp | 4 ++--
modules/gui/qt4/components/playlist/vlc_model.hpp | 4 ++--
modules/gui/qt4/components/preferences_widgets.hpp | 4 ++--
modules/gui/qt4/components/simple_preferences.hpp | 4 ++--
modules/gui/qt4/components/sout/profile_selector.hpp | 4 ++--
modules/gui/qt4/util/customwidgets.hpp | 4 ++--
modules/gui/qt4/util/input_slider.hpp | 4 ++--
modules/gui/qt4/util/qmenuview.hpp | 4 ++--
modules/gui/qt4/util/qt_dirs.hpp | 4 ++--
modules/gui/qt4/util/qvlcapp.hpp | 4 ++--
modules/gui/qt4/util/qvlcframe.hpp | 4 ++--
modules/gui/qt4/util/searchlineedit.hpp | 4 ++--
modules/gui/qt4/util/singleton.hpp | 6 +++---
modules/hw/mmal/mmal_picture.h | 4 ++--
modules/lua/extension.h | 6 +++---
modules/lua/extension_thread.c | 2 +-
modules/misc/webservices/json.h | 4 ++--
modules/mux/mpeg/csa.h | 4 ++--
modules/mux/mpeg/streams.h | 4 ++--
modules/mux/mpeg/tables.h | 4 ++--
modules/mux/mpeg/tsutil.h | 4 ++--
modules/packetizer/packetizer_helper.h | 4 ++--
modules/packetizer/startcode_helper.h | 4 ++--
modules/video_chroma/copy.h | 4 ++--
modules/video_chroma/dxgi_fmt.h | 6 +++---
modules/video_filter/grain.c | 4 ++--
modules/visualization/visual/fft.h | 6 +++---
modules/visualization/visual/window.h | 6 +++---
modules/visualization/visual/window_presets.h | 6 +++---
src/video_output/inhibit.h | 4 ++--
80 files changed, 174 insertions(+), 172 deletions(-)
--
2.7.1
More information about the vlc-devel
mailing list