Skip to content

Commit

Permalink
Bug cmus#177: Include guards became consistent.
Browse files Browse the repository at this point in the history
Some include guards did not fit to the expected naming convention of the
C language standard.
https://www.securecoding.cert.org/confluence/display/seccode/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier

This detail was fixed by the addition of the project name as a prefix.

Signed-off-by: Markus Elfring <[email protected]>
  • Loading branch information
elfring authored and flyingmutant committed Sep 5, 2014
1 parent cf2563b commit aacf178
Show file tree
Hide file tree
Showing 67 changed files with 134 additions and 135 deletions.
4 changes: 2 additions & 2 deletions aac.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _AAC_H
#define _AAC_H
#ifndef CMUS_AAC_H
#define CMUS_AAC_H

#include "channelmap.h"
#include <neaacdec.h>
Expand Down
4 changes: 2 additions & 2 deletions ape.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _APE_H
#define _APE_H
#ifndef CMUS_APE_H
#define CMUS_APE_H

#include <stdint.h>
#include <stdlib.h>
Expand Down
4 changes: 2 additions & 2 deletions browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _BROWSER_H
#define _BROWSER_H
#ifndef CMUS_BROWSER_H
#define CMUS_BROWSER_H

#include "list.h"
#include "window.h"
Expand Down
4 changes: 2 additions & 2 deletions buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _BUFFER_H
#define _BUFFER_H
#ifndef CMUS_BUFFER_H
#define CMUS_BUFFER_H

/* must be a multiple of any supported frame size */
#define CHUNK_SIZE (60 * 1024)
Expand Down
4 changes: 2 additions & 2 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CACHE_H
#define CACHE_H
#ifndef CMUS_CACHE_H
#define CMUS_CACHE_H

#include "track_info.h"
#include "locking.h"
Expand Down
4 changes: 2 additions & 2 deletions channelmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _CHANNELMAP_H
#define _CHANNELMAP_H
#ifndef CMUS_CHANNELMAP_H
#define CMUS_CHANNELMAP_H

#include <string.h>

Expand Down
4 changes: 2 additions & 2 deletions cmus.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _CMUS_H
#define _CMUS_H
#ifndef CMUS_API_H
#define CMUS_API_H

#include "track_info.h"

Expand Down
4 changes: 2 additions & 2 deletions command_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _COMMAND_MODE_H
#define _COMMAND_MODE_H
#ifndef CMUS_COMMAND_MODE_H
#define CMUS_COMMAND_MODE_H

#include "uchar.h"

Expand Down
4 changes: 2 additions & 2 deletions comment.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _COMMENT_H
#define _COMMENT_H
#ifndef CMUS_COMMENT_H
#define CMUS_COMMENT_H

#include "keyval.h"

Expand Down
4 changes: 2 additions & 2 deletions compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef COMPILER_H
#define COMPILER_H
#ifndef CMUS_COMPILER_H
#define CMUS_COMPILER_H

#include <stddef.h>

Expand Down
4 changes: 2 additions & 2 deletions convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CONVERT_H
#define CONVERT_H
#ifndef CMUS_CONVERT_H
#define CMUS_CONVERT_H

#include <sys/types.h> /* ssize_t */

Expand Down
5 changes: 2 additions & 3 deletions cue_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef __CUE_UTILS_H__
#define __CUE_UTILS_H__
#ifndef CMUS_CUE_UTILS_H
#define CMUS_CUE_UTILS_H

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DEBUG_H
#define DEBUG_H
#ifndef CMUS_DEBUG_H
#define CMUS_DEBUG_H

#include "compiler.h"
#ifdef HAVE_CONFIG
Expand Down
4 changes: 2 additions & 2 deletions discid.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _DISCID_H
#define _DISCID_H
#ifndef CMUS_DISCID_H
#define CMUS_DISCID_H

char *get_default_cdda_device(void);
int parse_cdda_url(const char *url, char **disc_id, int *start_track, int *end_track);
Expand Down
4 changes: 2 additions & 2 deletions editable.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef EDITABLE_H
#define EDITABLE_H
#ifndef CMUS_EDITABLE_H
#define CMUS_EDITABLE_H

#include "window.h"
#include "list.h"
Expand Down
4 changes: 2 additions & 2 deletions expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef EXPR_H
#define EXPR_H
#ifndef CMUS_EXPR_H
#define CMUS_EXPR_H

#include "track_info.h"
#include "list.h"
Expand Down
4 changes: 2 additions & 2 deletions file.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _FILE_H
#define _FILE_H
#ifndef CMUS_FILE_H
#define CMUS_FILE_H

#include <stddef.h> /* size_t */
#include <sys/types.h> /* ssize_t */
Expand Down
4 changes: 2 additions & 2 deletions filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef FILTERS_H
#define FILTERS_H
#ifndef CMUS_FILTERS_H
#define CMUS_FILTERS_H

#include "list.h"
#include "window.h"
Expand Down
4 changes: 2 additions & 2 deletions format_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _FORMAT_PRINT_H
#define _FORMAT_PRINT_H
#ifndef CMUS_FORMAT_PRINT_H
#define CMUS_FORMAT_PRINT_H

#include "gbuf.h"

Expand Down
4 changes: 2 additions & 2 deletions gbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef GBUF_H
#define GBUF_H
#ifndef CMUS_GBUF_H
#define CMUS_GBUF_H

#include "compiler.h"

Expand Down
4 changes: 2 additions & 2 deletions glob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef GLOB_H
#define GLOB_H
#ifndef CMUS_GLOB_H
#define CMUS_GLOB_H

#include "list.h"

Expand Down
4 changes: 2 additions & 2 deletions help.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef HELP_H
#define HELP_H
#ifndef CMUS_HELP_H
#define CMUS_HELP_H

#include "list.h"
#include "window.h"
Expand Down
4 changes: 2 additions & 2 deletions history.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _HISTORY_H
#define _HISTORY_H
#ifndef CMUS_HISTORY_H
#define CMUS_HISTORY_H

#include "list.h"

Expand Down
4 changes: 2 additions & 2 deletions http.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _HTTP_H
#define _HTTP_H
#ifndef CMUS_HTTP_H
#define CMUS_HTTP_H

#include "keyval.h"

Expand Down
4 changes: 2 additions & 2 deletions id3.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _ID3_H
#define _ID3_H
#ifndef CMUS_ID3_H
#define CMUS_ID3_H

#include <stdint.h>

Expand Down
4 changes: 2 additions & 2 deletions input.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _INPUT_H
#define _INPUT_H
#ifndef CMUS_INPUT_H
#define CMUS_INPUT_H

#include "keyval.h"
#include "sf.h"
Expand Down
4 changes: 2 additions & 2 deletions ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _IP_H
#define _IP_H
#ifndef CMUS_IP_H
#define CMUS_IP_H

#include "keyval.h"
#include "sf.h"
Expand Down
4 changes: 2 additions & 2 deletions iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _ITER_H
#define _ITER_H
#ifndef CMUS_ITER_H
#define CMUS_ITER_H

#include <stddef.h> /* NULL */

Expand Down
4 changes: 2 additions & 2 deletions job.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef JOB_H
#define JOB_H
#ifndef CMUS_JOB_H
#define CMUS_JOB_H

#include "cmus.h"

Expand Down
4 changes: 2 additions & 2 deletions keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef KEYS_H
#define KEYS_H
#ifndef CMUS_KEYS_H
#define CMUS_KEYS_H

#include "uchar.h"

Expand Down
4 changes: 2 additions & 2 deletions keyval.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef KEYVAL_H
#define KEYVAL_H
#ifndef CMUS_KEYVAL_H
#define CMUS_KEYVAL_H

struct keyval {
char *key;
Expand Down
4 changes: 2 additions & 2 deletions lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef LIB_H
#define LIB_H
#ifndef CMUS_LIB_H
#define CMUS_LIB_H

#include "editable.h"
#include "search.h"
Expand Down
4 changes: 2 additions & 2 deletions list.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#ifndef CMUS_LIST_H
#define CMUS_LIST_H

#include "compiler.h" /* container_of */

Expand Down
4 changes: 2 additions & 2 deletions load_dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _LOAD_DIR_H
#define _LOAD_DIR_H
#ifndef CMUS_LOAD_DIR_H
#define CMUS_LOAD_DIR_H

#include <sys/stat.h>
#include <stdlib.h>
Expand Down
4 changes: 2 additions & 2 deletions locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _LOCKING_H
#define _LOCKING_H
#ifndef CMUS_LOCKING_H
#define CMUS_LOCKING_H

#include <pthread.h>

Expand Down
4 changes: 2 additions & 2 deletions mergesort.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _MERGESORT_H
#define _MERGESORT_H
#ifndef CMUS_MERGESORT_H
#define CMUS_MERGESORT_H

#include "list.h"

Expand Down
Loading

0 comments on commit aacf178

Please sign in to comment.