From 626172a16bba9a601c7652569ce9410631c1e6c0 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 8 May 2024 19:28:06 +0300 Subject: libcamera: Drop file name from header comment blocks Source files in libcamera start by a comment block header, which includes the file name and a one-line description of the file contents. While the latter is useful to get a quick overview of the file contents at a glance, the former is mostly a source of inconvenience. The name in the comments can easily get out of sync with the file name when files are renamed, and copy & paste during development have often lead to incorrect names being used to start with. Readers of the source code are expected to know which file they're looking it. Drop the file name from the header comment block. The change was generated with the following script: ---------------------------------------- dirs="include/libcamera src test utils" declare -rA patterns=( ['c']=' \* ' ['cpp']=' \* ' ['h']=' \* ' ['py']='# ' ['sh']='# ' ) for ext in ${!patterns[@]} ; do files=$(for dir in $dirs ; do find $dir -name "*.${ext}" ; done) pattern=${patterns[${ext}]} for file in $files ; do name=$(basename ${file}) sed -i "s/^\(${pattern}\)${name} - /\1/" "$file" done done ---------------------------------------- This misses several files that are out of sync with the comment block header. Those will be addressed separately and manually. Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Scally --- src/apps/cam/camera_session.cpp | 2 +- src/apps/cam/camera_session.h | 2 +- src/apps/cam/capture_script.cpp | 2 +- src/apps/cam/capture_script.h | 2 +- src/apps/cam/drm.cpp | 2 +- src/apps/cam/drm.h | 2 +- src/apps/cam/file_sink.cpp | 2 +- src/apps/cam/file_sink.h | 2 +- src/apps/cam/frame_sink.cpp | 2 +- src/apps/cam/frame_sink.h | 2 +- src/apps/cam/kms_sink.cpp | 2 +- src/apps/cam/kms_sink.h | 2 +- src/apps/cam/main.cpp | 2 +- src/apps/cam/main.h | 2 +- src/apps/cam/sdl_sink.h | 2 +- src/apps/cam/sdl_texture.cpp | 2 +- src/apps/cam/sdl_texture.h | 2 +- src/apps/cam/sdl_texture_mjpg.cpp | 2 +- src/apps/cam/sdl_texture_mjpg.h | 2 +- src/apps/cam/sdl_texture_yuv.cpp | 2 +- src/apps/cam/sdl_texture_yuv.h | 2 +- src/apps/common/dng_writer.cpp | 2 +- src/apps/common/dng_writer.h | 2 +- src/apps/common/event_loop.cpp | 2 +- src/apps/common/event_loop.h | 2 +- src/apps/common/image.cpp | 2 +- src/apps/common/image.h | 2 +- src/apps/common/options.cpp | 2 +- src/apps/common/options.h | 2 +- src/apps/common/ppm_writer.cpp | 2 +- src/apps/common/ppm_writer.h | 2 +- src/apps/common/stream_options.cpp | 2 +- src/apps/common/stream_options.h | 2 +- src/apps/lc-compliance/environment.cpp | 2 +- src/apps/lc-compliance/environment.h | 2 +- src/apps/lc-compliance/main.cpp | 2 +- src/apps/lc-compliance/tests/capture_test.cpp | 2 +- src/apps/qcam/cam_select_dialog.cpp | 2 +- src/apps/qcam/cam_select_dialog.h | 2 +- src/apps/qcam/main.cpp | 2 +- src/apps/qcam/main_window.cpp | 2 +- src/apps/qcam/main_window.h | 2 +- src/apps/qcam/message_handler.cpp | 2 +- src/apps/qcam/viewfinder.h | 2 +- src/apps/qcam/viewfinder_qt.cpp | 2 +- src/apps/qcam/viewfinder_qt.h | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) (limited to 'src/apps') diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp index 48fce178..f13355ba 100644 --- a/src/apps/cam/camera_session.cpp +++ b/src/apps/cam/camera_session.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * camera_session.cpp - Camera capture session + * Camera capture session */ #include diff --git a/src/apps/cam/camera_session.h b/src/apps/cam/camera_session.h index 0bab519f..4442fd9b 100644 --- a/src/apps/cam/camera_session.h +++ b/src/apps/cam/camera_session.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * camera_session.h - Camera capture session + * Camera capture session */ #pragma once diff --git a/src/apps/cam/capture_script.cpp b/src/apps/cam/capture_script.cpp index 1215713f..fc1dfa75 100644 --- a/src/apps/cam/capture_script.cpp +++ b/src/apps/cam/capture_script.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * capture_script.cpp - Capture session configuration script + * Capture session configuration script */ #include "capture_script.h" diff --git a/src/apps/cam/capture_script.h b/src/apps/cam/capture_script.h index 40042c03..294b9203 100644 --- a/src/apps/cam/capture_script.h +++ b/src/apps/cam/capture_script.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * capture_script.h - Capture session configuration script + * Capture session configuration script */ #pragma once diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp index 8779a713..47bbb6b0 100644 --- a/src/apps/cam/drm.cpp +++ b/src/apps/cam/drm.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * drm.cpp - DRM/KMS Helpers + * DRM/KMS Helpers */ #include "drm.h" diff --git a/src/apps/cam/drm.h b/src/apps/cam/drm.h index ebaea04d..1ba83b6e 100644 --- a/src/apps/cam/drm.h +++ b/src/apps/cam/drm.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * drm.h - DRM/KMS Helpers + * DRM/KMS Helpers */ #pragma once diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp index 906b50e6..3e000d2f 100644 --- a/src/apps/cam/file_sink.cpp +++ b/src/apps/cam/file_sink.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * file_sink.cpp - File Sink + * File Sink */ #include diff --git a/src/apps/cam/file_sink.h b/src/apps/cam/file_sink.h index 300edf8d..9d560783 100644 --- a/src/apps/cam/file_sink.h +++ b/src/apps/cam/file_sink.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * file_sink.h - File Sink + * File Sink */ #pragma once diff --git a/src/apps/cam/frame_sink.cpp b/src/apps/cam/frame_sink.cpp index af21d575..68d6f2c1 100644 --- a/src/apps/cam/frame_sink.cpp +++ b/src/apps/cam/frame_sink.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * frame_sink.cpp - Base Frame Sink Class + * Base Frame Sink Class */ #include "frame_sink.h" diff --git a/src/apps/cam/frame_sink.h b/src/apps/cam/frame_sink.h index ca4347cb..11105c6c 100644 --- a/src/apps/cam/frame_sink.h +++ b/src/apps/cam/frame_sink.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * frame_sink.h - Base Frame Sink Class + * Base Frame Sink Class */ #pragma once diff --git a/src/apps/cam/kms_sink.cpp b/src/apps/cam/kms_sink.cpp index 6991c3fa..672c985a 100644 --- a/src/apps/cam/kms_sink.cpp +++ b/src/apps/cam/kms_sink.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * kms_sink.cpp - KMS Sink + * KMS Sink */ #include "kms_sink.h" diff --git a/src/apps/cam/kms_sink.h b/src/apps/cam/kms_sink.h index e2c618a1..4b7b4c26 100644 --- a/src/apps/cam/kms_sink.h +++ b/src/apps/cam/kms_sink.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * kms_sink.h - KMS Sink + * KMS Sink */ #pragma once diff --git a/src/apps/cam/main.cpp b/src/apps/cam/main.cpp index 1aabee01..4f87f200 100644 --- a/src/apps/cam/main.cpp +++ b/src/apps/cam/main.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * main.cpp - cam - The libcamera swiss army knife + * cam - The libcamera swiss army knife */ #include diff --git a/src/apps/cam/main.h b/src/apps/cam/main.h index 4aa959b3..64e6a20e 100644 --- a/src/apps/cam/main.h +++ b/src/apps/cam/main.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * main.h - Cam application + * Cam application */ #pragma once diff --git a/src/apps/cam/sdl_sink.h b/src/apps/cam/sdl_sink.h index 6c19c663..18ec7fbe 100644 --- a/src/apps/cam/sdl_sink.h +++ b/src/apps/cam/sdl_sink.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_sink.h - SDL Sink + * SDL Sink */ #pragma once diff --git a/src/apps/cam/sdl_texture.cpp b/src/apps/cam/sdl_texture.cpp index e9040bc5..e52c4a3a 100644 --- a/src/apps/cam/sdl_texture.cpp +++ b/src/apps/cam/sdl_texture.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture.cpp - SDL Texture + * SDL Texture */ #include "sdl_texture.h" diff --git a/src/apps/cam/sdl_texture.h b/src/apps/cam/sdl_texture.h index 3993dd46..990f83b6 100644 --- a/src/apps/cam/sdl_texture.h +++ b/src/apps/cam/sdl_texture.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture.h - SDL Texture + * SDL Texture */ #pragma once diff --git a/src/apps/cam/sdl_texture_mjpg.cpp b/src/apps/cam/sdl_texture_mjpg.cpp index da958e03..cace18fc 100644 --- a/src/apps/cam/sdl_texture_mjpg.cpp +++ b/src/apps/cam/sdl_texture_mjpg.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture_mjpg.cpp - SDL Texture MJPG + * SDL Texture MJPG */ #include "sdl_texture_mjpg.h" diff --git a/src/apps/cam/sdl_texture_mjpg.h b/src/apps/cam/sdl_texture_mjpg.h index 814ca79a..37bed5f0 100644 --- a/src/apps/cam/sdl_texture_mjpg.h +++ b/src/apps/cam/sdl_texture_mjpg.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture_mjpg.h - SDL Texture MJPG + * SDL Texture MJPG */ #pragma once diff --git a/src/apps/cam/sdl_texture_yuv.cpp b/src/apps/cam/sdl_texture_yuv.cpp index b29c3b93..480d7a37 100644 --- a/src/apps/cam/sdl_texture_yuv.cpp +++ b/src/apps/cam/sdl_texture_yuv.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture_yuv.cpp - SDL YUV Textures + * SDL YUV Textures */ #include "sdl_texture_yuv.h" diff --git a/src/apps/cam/sdl_texture_yuv.h b/src/apps/cam/sdl_texture_yuv.h index 310e4e50..29c756e7 100644 --- a/src/apps/cam/sdl_texture_yuv.h +++ b/src/apps/cam/sdl_texture_yuv.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Ideas on Board Oy * - * sdl_texture_yuv.h - SDL YUV Textures + * SDL YUV Textures */ #pragma once diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp index 82bc065a..59f1fa23 100644 --- a/src/apps/common/dng_writer.cpp +++ b/src/apps/common/dng_writer.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Raspberry Pi Ltd * - * dng_writer.cpp - DNG writer + * DNG writer */ #include "dng_writer.h" diff --git a/src/apps/common/dng_writer.h b/src/apps/common/dng_writer.h index 38f38f62..917713e6 100644 --- a/src/apps/common/dng_writer.h +++ b/src/apps/common/dng_writer.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Raspberry Pi Ltd * - * dng_writer.h - DNG writer + * DNG writer */ #pragma once diff --git a/src/apps/common/event_loop.cpp b/src/apps/common/event_loop.cpp index cb83845c..f7f9afa0 100644 --- a/src/apps/common/event_loop.cpp +++ b/src/apps/common/event_loop.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * event_loop.cpp - cam - Event loop + * cam - Event loop */ #include "event_loop.h" diff --git a/src/apps/common/event_loop.h b/src/apps/common/event_loop.h index ef79e8e5..ef129b9a 100644 --- a/src/apps/common/event_loop.h +++ b/src/apps/common/event_loop.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * event_loop.h - cam - Event loop + * cam - Event loop */ #pragma once diff --git a/src/apps/common/image.cpp b/src/apps/common/image.cpp index fe2cc6da..a2a0f58f 100644 --- a/src/apps/common/image.cpp +++ b/src/apps/common/image.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * image.cpp - Multi-planar image with access to pixel data + * Multi-planar image with access to pixel data */ #include "image.h" diff --git a/src/apps/common/image.h b/src/apps/common/image.h index 7953b177..e47e446b 100644 --- a/src/apps/common/image.h +++ b/src/apps/common/image.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Ideas on Board Oy * - * image.h - Multi-planar image with access to pixel data + * Multi-planar image with access to pixel data */ #pragma once diff --git a/src/apps/common/options.cpp b/src/apps/common/options.cpp index 4f7e8691..ab19aa3d 100644 --- a/src/apps/common/options.cpp +++ b/src/apps/common/options.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * options.cpp - cam - Options parsing + * cam - Options parsing */ #include diff --git a/src/apps/common/options.h b/src/apps/common/options.h index 4ddd4987..9771aa7a 100644 --- a/src/apps/common/options.h +++ b/src/apps/common/options.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * options.h - cam - Options parsing + * cam - Options parsing */ #pragma once diff --git a/src/apps/common/ppm_writer.cpp b/src/apps/common/ppm_writer.cpp index a8ccf67a..d6c8641d 100644 --- a/src/apps/common/ppm_writer.cpp +++ b/src/apps/common/ppm_writer.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2024 Red Hat, Inc. * - * ppm_writer.cpp - PPM writer + * PPM writer */ #include "ppm_writer.h" diff --git a/src/apps/common/ppm_writer.h b/src/apps/common/ppm_writer.h index 4c38f5ce..8c8d2e15 100644 --- a/src/apps/common/ppm_writer.h +++ b/src/apps/common/ppm_writer.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2024, Red Hat, Inc. * - * ppm_writer.h - PPM writer + * PPM writer */ #pragma once diff --git a/src/apps/common/stream_options.cpp b/src/apps/common/stream_options.cpp index 663b979a..99239e07 100644 --- a/src/apps/common/stream_options.cpp +++ b/src/apps/common/stream_options.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Raspberry Pi Ltd * - * stream_options.cpp - Helper to parse options for streams + * Helper to parse options for streams */ #include "stream_options.h" diff --git a/src/apps/common/stream_options.h b/src/apps/common/stream_options.h index a5f3bde0..a93f104c 100644 --- a/src/apps/common/stream_options.h +++ b/src/apps/common/stream_options.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Raspberry Pi Ltd * - * stream_options.h - Helper to parse options for streams + * Helper to parse options for streams */ #pragma once diff --git a/src/apps/lc-compliance/environment.cpp b/src/apps/lc-compliance/environment.cpp index 5eb3775f..987264f1 100644 --- a/src/apps/lc-compliance/environment.cpp +++ b/src/apps/lc-compliance/environment.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Collabora Ltd. * - * environment.cpp - Common environment for tests + * Common environment for tests */ #include "environment.h" diff --git a/src/apps/lc-compliance/environment.h b/src/apps/lc-compliance/environment.h index 0debbcce..543e5372 100644 --- a/src/apps/lc-compliance/environment.h +++ b/src/apps/lc-compliance/environment.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2021, Collabora Ltd. * - * environment.h - Common environment for tests + * Common environment for tests */ #pragma once diff --git a/src/apps/lc-compliance/main.cpp b/src/apps/lc-compliance/main.cpp index 74e0d4df..3f1d2a61 100644 --- a/src/apps/lc-compliance/main.cpp +++ b/src/apps/lc-compliance/main.cpp @@ -3,7 +3,7 @@ * Copyright (C) 2020, Google Inc. * Copyright (C) 2021, Collabora Ltd. * - * main.cpp - lc-compliance - The libcamera compliance tool + * lc-compliance - The libcamera compliance tool */ #include diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp index 284d3630..ad3a1da2 100644 --- a/src/apps/lc-compliance/tests/capture_test.cpp +++ b/src/apps/lc-compliance/tests/capture_test.cpp @@ -3,7 +3,7 @@ * Copyright (C) 2020, Google Inc. * Copyright (C) 2021, Collabora Ltd. * - * capture_test.cpp - Test camera capture + * Test camera capture */ #include "capture.h" diff --git a/src/apps/qcam/cam_select_dialog.cpp b/src/apps/qcam/cam_select_dialog.cpp index 3c8b12a9..c51f5974 100644 --- a/src/apps/qcam/cam_select_dialog.cpp +++ b/src/apps/qcam/cam_select_dialog.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Utkarsh Tiwari * - * cam_select_dialog.cpp - qcam - Camera Selection dialog + * qcam - Camera Selection dialog */ #include "cam_select_dialog.h" diff --git a/src/apps/qcam/cam_select_dialog.h b/src/apps/qcam/cam_select_dialog.h index 0b7709ed..4bec9ea9 100644 --- a/src/apps/qcam/cam_select_dialog.h +++ b/src/apps/qcam/cam_select_dialog.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2022, Utkarsh Tiwari * - * cam_select_dialog.h - qcam - Camera Selection dialog + * qcam - Camera Selection dialog */ #pragma once diff --git a/src/apps/qcam/main.cpp b/src/apps/qcam/main.cpp index 36cb93a5..9846fba5 100644 --- a/src/apps/qcam/main.cpp +++ b/src/apps/qcam/main.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * main.cpp - qcam - The libcamera GUI test application + * qcam - The libcamera GUI test application */ #include diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index 361d5825..d515beed 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * main_window.cpp - qcam - Main application window + * qcam - Main application window */ #include "main_window.h" diff --git a/src/apps/qcam/main_window.h b/src/apps/qcam/main_window.h index 2e3e1b5c..4cead734 100644 --- a/src/apps/qcam/main_window.h +++ b/src/apps/qcam/main_window.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * main_window.h - qcam - Main application window + * qcam - Main application window */ #pragma once diff --git a/src/apps/qcam/message_handler.cpp b/src/apps/qcam/message_handler.cpp index 261623e1..c89714a9 100644 --- a/src/apps/qcam/message_handler.cpp +++ b/src/apps/qcam/message_handler.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Laurent Pinchart * - * message_handler.cpp - qcam - Log message handling + * qcam - Log message handling */ #include "message_handler.h" diff --git a/src/apps/qcam/viewfinder.h b/src/apps/qcam/viewfinder.h index a57446e8..914f88ec 100644 --- a/src/apps/qcam/viewfinder.h +++ b/src/apps/qcam/viewfinder.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * viewfinder.h - qcam - Viewfinder base class + * qcam - Viewfinder base class */ #pragma once diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp index 62ed5e7c..4821c27d 100644 --- a/src/apps/qcam/viewfinder_qt.cpp +++ b/src/apps/qcam/viewfinder_qt.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * viewfinder_qt.cpp - qcam - QPainter-based ViewFinder + * qcam - QPainter-based ViewFinder */ #include "viewfinder_qt.h" diff --git a/src/apps/qcam/viewfinder_qt.h b/src/apps/qcam/viewfinder_qt.h index eb3a9988..4f4b9f11 100644 --- a/src/apps/qcam/viewfinder_qt.h +++ b/src/apps/qcam/viewfinder_qt.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * viewfinder_qt.h - qcam - QPainter-based ViewFinder + * qcam - QPainter-based ViewFinder */ #pragma once -- cgit v1.2.1