| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the same checks for asm .symver and -Wl,--version-script
support for both libgphoto2.la and libgphoto2_port.la.
This also reorganizes the Makefile.am files for libgphoto2.la
and libgphoto2_port.la so that things belonging together are
actually grouped together, so that inconsistencies can become
more visible.
This does not change what actually happens with when linking
the libraries:
* libgphoto2.la is still linked with just a
--export-symbols libgphoto2.sym
list of exported symbols.
* libgphoto2_port.la is still linked with a
-Wl,--version-script=libgphoto2_port.ver
version script.
However, the two library Makefile.am are now organized
in such a way that you can actually see that.
We should examine what those two symbol export methods actually
do on Linux/ELF (complete support for version script semantics),
and on non-ELF systems such as MacOSX dylib or Windows DLL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Factor out the i18n definitions into i18n.h include files:
One include file each for libgphoto2 and for libgphoto2_port.
This removes the complete
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (GETTEXT_PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
block (which in some occasions defines even more macros)
and replaces it with a single line
#include "libgphoto2/i18n.h"
for camlibs and libgphoto2 itself and with
#include "libgphoto2_port/i18n.h"
for iolibs and libgphoto2_port itself.
This gives us two central locations to change the defintions.
|
|
|
|
| |
Use it in ptp2 PTP_EC_ObjectInfoChanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are five libgphoto2 internal *.h include files inside the
source tree's `libgphoto2/` folder. Internal means they are part
of the libgphoto2 implementation, and are not part of the public
libgphoto2 API or ABI. These files have names which are so
generic that it is difficult to see from a `#include` statement
that the included file is actually part of libgphoto2:
bayer-types.h
bayer.h
exif.h
gamma.h
jpeg.h
While building, an additional file is created inside the `libgphoto2/`
folder with a name which does hint to its relationship with libgphoto2:
gphoto2-endian.h
To reduce the probability of accidental conflicts with include files
which might also be called the same very generic name, this changes
the use of these include files to a preprocessor directive like
#include "libgphoto2/bayer.h>
instead of
#include "bayer.h"
To enforce the need for the "libgphoto2/" part in the #include
preprocessor directive, this also removes the respective `-I`
arguments for the `libgphoto2` subdir (both in source tree and in
build tree) from `*_CPPFLAGS`.
This change was inspired by `libgphoto2/` and `camlibs/stv0680/`
containing very different include files both called `bayer.h`.
|
|
|
|
|
|
|
| |
Use a single definition of BayerTile enum inside a new
include file bayer-types.h instead of (conditionally!)
duplicating the definition from libgphoto2/bayer.h to
camlibs/stv680-demosaic-sharpen.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Fix broken check of CPP macro definition after #elif.
The fact that this has not been caught yet is indicative
of this configuration probably being relatively rare.
|
|
|
|
| |
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
| |
|
| |
|
|
|
| |
stdint.h has wide adoption at this point, so it should be safe to use.
|
|
|
| |
This change makes it possible to build libgphoto2 on macOS.
|
| |
|
|
|
|
| |
Resolves number of signed-unsigned comparison issues.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses proper set operations both for GP_CAMLIB and for handling
the --with-camlibs value. This allows all GP_CAMLIB definitions to
be present at autoreconf time (as m4 code) time while some camlib
definitions being conditional at the time of the configure run (in
the sh code).
The ./configure output is still a bit verbose, but we can reduce that
verbosity later when we have found out that this works well on people's
different systems.
Fixes: https://github.com/gphoto/libgphoto2/issues/467
|
|
|
|
| |
Otherwise we read 1 entry before the array and 1 entry after.
|
|
|
|
| |
fixes https://github.com/gphoto/libgphoto2/issues/425
|
| |
|
| |
|
|
|
|
| |
to remove warnings
|
|
|
|
| |
fixes https://github.com/gphoto/libgphoto2/issues/278
|
| |
|
| |
|
|
|
|
|
|
| |
descriptor
fixes https://github.com/gphoto/libgphoto2/issues/194
|
| |
|
| |
|
|
|
|
|
|
|
| |
Adjust the camlibs that use it
(As this is mostly a internal function it should be ok to change.)
Fixes https://github.com/gphoto/libgphoto2/issues/73
|
|
|
|
| |
in the windows directory anymore
|
|
|
|
|
|
| |
The old %hX string was for an unsigned short, but we pass an unsigned char.
This silences another compiler warning.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
the regular get_config and set_config if not present
|
|
|
|
| |
gp_camera_list_config, gp_camera_set_single_config, gp_camera_get_single_config
|
| |
|
|
|
|
|
|
| |
building better with Visual C
https://github.com/gphoto/libgphoto2/issues/33
|
|
|
|
|
|
|
|
|
|
|
|
| |
3) I got heaps of error messages from a failed attempt to read the settings
file. The code in gphoto_settings.c could need some proper cleanup but I
only improved the logging messages a bit and made the usage of the
log-level consistent (report the unproblematic failed read as a DEBUG
level message consistently).
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15405 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15233 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15201 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
| |
make gpi_vsnprintf internal export
and use it in gphoto2-context.c too
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15178 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rewrote the ptp_opensession error retry code
changed some more error logging handling
detailed:
a) yet another logging/cleanup patch improving the code and error log
readability in this specific situation:
* extend translate_ptp_results to better handle PTP_ERROR_IO
* log the failure of ptp_opensession
* make the ptp_opensession error handling code clearer
* don't report a 'ptp_port' error inside the CHECK_INIT macro
when gp_camera_init fails in gphoto-camera.c. There is no
port error string mechanism involved and the original error has
been reported already from inside camera_init
* don't report the source location when logging the error string
inside gp_context_error(). interesting would be the original
source location but that is not available there.
* remove one of two different strings conveying the same
information: 'No additional information available.' and
'No error description available'
* improve logging in existing CHECK_RESULT_OPEN_CLOSE macro
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15110 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had something 'prepared' for this situation, here you go.. ;)
The patch does not, however, actually remove the GP_LOG_VERBOSE enum,
since that would change the interface for all clients, which might not
be worth it. If you don't think that is a problem, please remove it...
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15107 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) introduce C_PARAMS and C_PARAMS_MSG along the lines of C_MEM
2) replace CHECK_NULL with C_PARAMS
3) replace the pattern
if ( something ) return GP_ERROR_BAD_PARAMETERS;
with
C_PARAMS ( !something );
I went over the whole patch again to check that each 'something'
condition is really inverted, so I dare to suggest you don't have to
do that again ;).
4) replaced CHECK_LIST and CHECK_INDEX_RANGE with simple one-line
C_PARAMS(...) expressions
5) a couple of hunks look like this
- if (!inet_aton (buffer, &inp)) {
- fprintf(stderr,"failed to scan for addr in %s\n", buffer);
- return GP_ERROR_BAD_PARAMETERS;
- }
+ C_PARAMS_MSG (inet_aton (buffer, &inp),
so some 'lost' error messages get now properly piped into the gp_log
mechanism.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15103 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
| |
3) use the fact that realloc() is defined to simply malloc if the
first param is NULL, no need to manually distinguish between first and
later allocations.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15098 67ed7778-7388-44ab-90cf-0a291f65f57c
|