C preprocessor macros beginning/ending with underscores are
reserved for system use as well as macros containing a double
underscore anywhere, so application software macros are
supposed to be named differently.
For a header file gphoto2-abilities-list.h, this
consistently uses a macro name
LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
for the usual
#ifndef LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
#define LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
... content of the header file ...
#endif /* !defined(LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H) */
Found using "clang -Weverything".
This should work, unless when run with an ancient C preprocessor
which might only the first 8 or 10 characters to distinguish
macro names and ignores the remainder of the name.
41 lines
1.5 KiB
C
41 lines
1.5 KiB
C
/* command.h
|
|
*
|
|
* Copyright (C) M. Adam Kendall <joker@penguinpub.com>
|
|
* Copyright (C) 2002 Bart van Leeuwen <bart@netage.nl>
|
|
*
|
|
* Based on the chotplay CLI interface from Ken-ichi Hayashi 1996,1997
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
* Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef CAMLIBS_SONYDSCF1_COMMAND_H
|
|
#define CAMLIBS_SONYDSCF1_COMMAND_H
|
|
|
|
int F1ok (GPPort*);
|
|
long F1getdata (GPPort*,char *, unsigned char *);
|
|
int F1status (GPPort*);
|
|
char F1newstatus (GPPort *port, int, char *);
|
|
int F1howmany (GPPort *);
|
|
int F1fopen (GPPort *,char *);
|
|
long F1fread(GPPort *,unsigned char *data, long len);
|
|
long F1fwrite(GPPort *,unsigned char *data, long len, unsigned char b);
|
|
long F1fseek (GPPort *,long, int);
|
|
unsigned long F1finfo (GPPort *,char *);
|
|
int F1fclose (GPPort *);
|
|
int F1deletepicture (GPPort*,int);
|
|
|
|
#endif /* !defined(CAMLIBS_SONYDSCF1_COMMAND_H) */
|