summaryrefslogtreecommitdiff
path: root/libgphoto2
Commit message (Collapse)AuthorAgeFilesLines
* Add TODO comment about possibly using gettext's gettext.hHans Ulrich Niedermann2021-12-091-0/+6
|
* Consistent checks for asm .symver and version-scriptHans Ulrich Niedermann2021-11-071-41/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 i18n stuff into separate i18n.h filesHans Ulrich Niedermann2021-10-256-70/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* filesys: Add gp_filesystem_set_info_dirtyDavid Rosca2021-10-222-0/+32
| | | | Use it in ptp2 PTP_EC_ObjectInfoChanged.
* Avoid accidental include file name collisionsHans Ulrich Niedermann2021-10-116-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 enumHans Ulrich Niedermann2021-10-073-17/+49
| | | | | | | 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.
* Use consistently named non-reserved CPP macros for header filesHans Ulrich Niedermann2021-10-054-12/+13
| | | | | | | | | | | | | | | | | | | | | | | 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 #elifHans Ulrich Niedermann2021-10-031-2/+2
| | | | | | | 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.
* Fixed build in mingwJaroslav Škarvada2021-08-071-1/+1
| | | | Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* Add file extension for Sony ARW filesIngvar Stepanyan2021-07-141-0/+1
|
* gp_camera_exit: Return result of camera exit function if possibleDaniel Schulte2021-03-161-2/+3
|
* Remove stdint.h shim (#625)Zeranoe2021-02-221-2/+0
| | | stdint.h has wide adoption at this point, so it should be safe to use.
* Add _DARWIN_C_SOURCE to most files that use string.h (#615)Rafał Hirsz2021-01-293-0/+3
| | | This change makes it possible to build libgphoto2 on macOS.
* mime type update for CR3Jiri Machalek2020-10-131-0/+1
|
* Fix libgphoto2 compilation warnings.Siim Meerits2020-08-032-7/+7
| | | | Resolves number of signed-unsigned comparison issues.
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-2719-287/+287
|
* Fix typos throughout the codebaseSijawusz Pur Rahnama2020-05-254-8/+8
|
* New set based camlib definition and --with-camlibs handlingHans Ulrich Niedermann2020-02-171-8/+37
| | | | | | | | | | | | | | 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
* added a check on the boundaries of the homo_h processing (ASAN)Marcus Meissner2020-01-251-2/+4
| | | | Otherwise we read 1 entry before the array and 1 entry after.
* free also the files in the root folder on gp_filesystem_resetMarcus Meissner2019-10-121-0/+4
| | | | fixes https://github.com/gphoto/libgphoto2/issues/425
* add some logging, avoid w and h < 2 to avoid division by 0 (AFL)Marcus Meissner2019-06-171-0/+4
|
* fixed including Win32 shlobj.h header when compiling using Visual StudioMichael Fink2019-01-121-0/+3
|
* BSD_SOURCE -> DEFAULT_SOURCEMarcus Meissner2018-06-174-4/+4
| | | | to remove warnings
* added note on ownership of the "data" pointer after gp_file_get_data_and_sizeMarcus Meissner2018-06-031-2/+6
| | | | fixes https://github.com/gphoto/libgphoto2/issues/278
* fixed autodetect returnMarcus Meissner2018-04-301-1/+1
|
* More fixes for support 64bit getpartialobject for Android in read_file_funcFlorent Viard2017-08-282-2/+4
|
* added a note that gp_file_new_from_fd takes over ownership of the file ↵Marcus Meissner2017-08-101-0/+2
| | | | | | descriptor fixes https://github.com/gphoto/libgphoto2/issues/194
* remove use of builtin exif stuff, use libexif directlyMarcus Meissner2017-04-082-790/+33
|
* harden delete_recurse against non-existing folders (AFL)Marcus Meissner2017-03-041-1/+2
|
* Adjust the semantics of gp_widget_changed to not clear the changed state.Marcus Meissner2016-11-201-7/+3
| | | | | | | 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
* store the settings on windows in CSIDL_PROFILE/.gphoto and notpeterbud2016-11-201-5/+15
| | | | in the windows directory anymore
* Use proper format string %hhX for unsigned charHans Ulrich Niedermann2016-10-291-1/+1
| | | | | | The old %hX string was for an unsigned short, but we pass an unsigned char. This silences another compiler warning.
* use 100 increments instead of 50Marcus Meissner2016-09-171-2/+2
|
* increase ability list in 50 entry blocks to make this fasterMarcus Meissner2016-09-061-3/+8
|
* adjust the value description in gp_setting_setMarcus Meissner2016-07-071-2/+2
|
* clarify wait_for_event documentation a bitMarcus Meissner2016-04-251-5/+9
|
* added GP_MIME_NEFMarcus Meissner2016-03-061-0/+1
|
* gp_file_get_name_by_type - support / in filenamesMarcus Meissner2016-03-061-8/+26
|
* emulate the single setter and list config functions viaMarcus Meissner2016-02-191-21/+231
| | | | the regular get_config and set_config if not present
* add new apisMarcus Meissner2016-02-192-0/+101
| | | | gp_camera_list_config, gp_camera_set_single_config, gp_camera_get_single_config
* remove useless time.h sys/time.h fcntl.h inclusionMarcus Meissner2016-01-041-3/+0
|
* remove probably unistd.h include , or protected by ifdef forMarcus Meissner2016-01-033-3/+0
| | | | | | building better with Visual C https://github.com/gphoto/libgphoto2/issues/33
* From: Axel Waggershauser <awagger@web.de>Marcus Meissner2015-03-271-3/+3
| | | | | | | | | | | | 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
* GP_MIME_TXT == text/plain for .txtMarcus Meissner2014-11-052-2/+4
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15233 67ed7778-7388-44ab-90cf-0a291f65f57c
* quieten the delete message (Do not output progress status)Marcus Meissner2014-10-061-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15201 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-09-121-164/+21
| | | | | | | | 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
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-232-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-221-2/+1
| | | | | | | | | | | | 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
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-227-243/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-214-36/+8
| | | | | | | | | | 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