Commit Graph

9 Commits

Author SHA1 Message Date
Hans Ulrich Niedermann
0dbeaf7cbf Use consistently named non-reserved CPP macros for header files
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.
2021-10-05 16:07:20 +02:00
Marcus Meissner
663401e3c4 c++ protect 2018-10-14 09:21:13 +02:00
peterbud
230e2554f8 add O_BINARY flag for open() calls to write images in binary mode on Windows 2016-11-19 23:47:21 +01:00
Marcus Meissner
1b9ead0602 pass onoff argument to autofocus
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15209 67ed7778-7388-44ab-90cf-0a291f65f57c
2014-10-09 10:24:16 +00:00
Marcus Meissner
ca55fb156d fixed sample_open_camera to load the abilities and portinfolist
(was done by sample_autodetect before)


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14352 67ed7778-7388-44ab-90cf-0a291f65f57c
2013-04-25 07:39:18 +00:00
Marcus Meissner
4d3129c1c7 added a bit focusing to the preview sample, also added manual focusing
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14174 67ed7778-7388-44ab-90cf-0a291f65f57c
2013-01-09 19:58:56 +00:00
Marcus Meissner
bd7d4e26dc add a focusing sample to preview
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14173 67ed7778-7388-44ab-90cf-0a291f65f57c
2013-01-09 19:11:52 +00:00
Marcus Meissner
314fcced1c New file config.c for configuration helpers.
Use it for lunkwill-canon-capture.c
Owner setting and reporting (sample-owner)
Very basic hello world program now in sample-autodetect,
multi camrea program in sample-multi-detect.
README updated


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11372 67ed7778-7388-44ab-90cf-0a291f65f57c
2008-10-10 19:08:33 +00:00
Marcus Meissner
9dd5dc2a1e added a sample framework
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11341 67ed7778-7388-44ab-90cf-0a291f65f57c
2008-09-21 19:38:27 +00:00