summaryrefslogtreecommitdiff
path: root/libgphoto2/gphoto2-file.c
Commit message (Collapse)AuthorAgeFilesLines
* added some apparent missijng include unistd.h to make it build for ↵Marcus Meissner2023-02-141-0/+1
| | | | mingw/llvm . fixes https://github.com/gphoto/libgphoto2/issues/890
* Add file extension for Sony ARW filesIngvar Stepanyan2021-07-141-0/+1
|
* Add _DARWIN_C_SOURCE to most files that use string.h (#615)Rafał Hirsz2021-01-291-0/+1
| | | 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-031-5/+5
| | | | Resolves number of signed-unsigned comparison issues.
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-271-14/+14
|
* BSD_SOURCE -> DEFAULT_SOURCEMarcus Meissner2018-06-171-1/+1
| | | | 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
* 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
* added GP_MIME_NEFMarcus Meissner2016-03-061-0/+1
|
* gp_file_get_name_by_type - support / in filenamesMarcus Meissner2016-03-061-8/+26
|
* remove probably unistd.h include , or protected by ifdef forMarcus Meissner2016-01-031-1/+0
| | | | | | building better with Visual C https://github.com/gphoto/libgphoto2/issues/33
* GP_MIME_TXT == text/plain for .txtMarcus Meissner2014-11-051-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15233 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-221-40/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-5/+1
| | | | | | | | | | 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
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-211-12/+7
| | | | | | | | | 2) don't check the pointer for NULL before calling free(), because free() checks it again. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15097 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-211-45/+14
| | | | | | | | | | | here is a patch for (mostly) consistent usage of a generalized C_MEM macro for checking the return values of memory allocating functions, i.e. malloc, calloc, realloc and strdup. It is the C_MEM from libusb1.c, moved to gphoto2-port-log.h. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15096 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: Axel Waggershauser <awagger@web.de> ↵Marcus Meissner2014-07-191-45/+38
| | | | | | | | | | | | | | | | | 7, 8, 9) same 3,4,5 but for libgphoto core 3, 4) strictly replacing gp_log( GP_LOG_DEBUG/ERROR, ... with GP_LOG_D/E in the libgphoto2 code. they are simple regex-replace patches. 5) fix some whitespace issues caused by 3 and 4 and remove any _(...) gettext macro usage for log messages git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15085 67ed7778-7388-44ab-90cf-0a291f65f57c
* added SONY ARW file mime typesMarcus Meissner2014-03-141-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14822 67ed7778-7388-44ab-90cf-0a291f65f57c
* use ssize_t instead of size_tMarcus Meissner2014-01-061-8/+8
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14676 67ed7778-7388-44ab-90cf-0a291f65f57c
* updated fsf addressMarcus Meissner2014-01-011-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14610 67ed7778-7388-44ab-90cf-0a291f65f57c
* added a missing fclose in an errorcase (Coverity)Marcus Meissner2013-10-081-1/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14561 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed two memory leaks reported by dcbMarcus Meissner2013-05-011-1/+4
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14372 67ed7778-7388-44ab-90cf-0a291f65f57c
* added avhd video supportMarcus Meissner2010-09-191-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13324 67ed7778-7388-44ab-90cf-0a291f65f57c
* match GP_MIME_RAW -> .rawMarcus Meissner2010-02-061-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12691 67ed7778-7388-44ab-90cf-0a291f65f57c
* add suffix if there is noneMarcus Meissner2010-01-031-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12570 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed 1 ftrucnateMarcus Meissner2009-10-111-1/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12489 67ed7778-7388-44ab-90cf-0a291f65f57c
* Fixed a bunch of C89 and SUS portability issues.Dan Fandrich2009-07-301-4/+0
| | | | | | | Fixed a buffer overflow in the AOX driver. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12305 67ed7778-7388-44ab-90cf-0a291f65f57c
* handle cr2Marcus Meissner2009-04-141-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11990 67ed7778-7388-44ab-90cf-0a291f65f57c
* first implementation of CameraFile programmaticMarcus Meissner2009-04-131-0/+119
| | | | | | | handler implementation git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11976 67ed7778-7388-44ab-90cf-0a291f65f57c
* handle easy case by just returning strdup(basename)Marcus Meissner2009-02-281-4/+8
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11833 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed moreMarcus Meissner2009-02-181-1/+4
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11824 67ed7778-7388-44ab-90cf-0a291f65f57c
* redid basename converterMarcus Meissner2009-02-181-10/+13
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11823 67ed7778-7388-44ab-90cf-0a291f65f57c
* Batch commit from weekend work:Marcus Meissner2009-02-161-61/+90
| | | | | | | | | | | | | | - removed "type" from CameraFile handling: - all put_file functions and hooks get "type" as argument now - added type to the set_file_info_noop call - started removal of "name" from CameraFile - generate new filename from original filename + camerafile type + mimetype - new gp_camera_autodetect() helper function - adapted all drivers. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11818 67ed7778-7388-44ab-90cf-0a291f65f57c
* added some casts to quiet signedness warnings.Marcus Meissner2007-12-301-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10915 67ed7778-7388-44ab-90cf-0a291f65f57c
* added comment about lifetimeMarcus Meissner2007-10-261-0/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10819 67ed7778-7388-44ab-90cf-0a291f65f57c
* missing return GP_OK; added.Marcus Meissner2006-12-291-1/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9775 67ed7778-7388-44ab-90cf-0a291f65f57c
* use size_t as argumets to gp_file_slurpMarcus Meissner2006-12-291-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9764 67ed7778-7388-44ab-90cf-0a291f65f57c
* added _BSD_SOURCE and _POSIX_SOURCE to make it build.Marcus Meissner2006-12-281-0/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9755 67ed7778-7388-44ab-90cf-0a291f65f57c
* added gp_file_slurp() (camlib internal)Marcus Meissner2006-12-281-46/+69
| | | | | | | | | fixed all lseek arguments to be in the correct order (OFFSET,TYPE). changed gp_file_open() to supply the filedescriptor to "fd" based CameraFiles. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9754 67ed7778-7388-44ab-90cf-0a291f65f57c
* Make it possible to associate CameraFile with UNIX fds.Marcus Meissner2006-12-211-90/+452
| | | | | | | New API gp_file_new_from_fd(). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9695 67ed7778-7388-44ab-90cf-0a291f65f57c
* removed CameraFile based bayer conversion.Marcus Meissner2006-12-161-261/+0
| | | | | | | This is only API removal, no changes. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9620 67ed7778-7388-44ab-90cf-0a291f65f57c
* Consistently use #include <gphoto2/gphoto2-foo.h> everywhere.Hans Ulrich Niedermann2006-09-281-4/+4
| | | | | | | | | | This moves the header files to a new subdirectory gphoto2 in both libgphoto2 and libphoto2_port/libgphoto2. All references are adapted appropriately. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9221 67ed7778-7388-44ab-90cf-0a291f65f57c
* comment cosmeticsHans Ulrich Niedermann2006-08-181-16/+45
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9098 67ed7778-7388-44ab-90cf-0a291f65f57c
* another set of doxygen annotation changes from Steve Fox.Marcus Meissner2006-05-251-1/+1
| | | | | | | removed the literal (c) symbol. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8818 67ed7778-7388-44ab-90cf-0a291f65f57c
* added doxygen markupMarcus Meissner2006-05-241-11/+169
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8816 67ed7778-7388-44ab-90cf-0a291f65f57c
* added mpeg for completeness.Marcus Meissner2006-03-251-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8666 67ed7778-7388-44ab-90cf-0a291f65f57c
* added some more mime types and map them in gp_file_open()Marcus Meissner2006-03-251-0/+4
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8664 67ed7778-7388-44ab-90cf-0a291f65f57c
* use 256 bytes for filenames. (binary compatible, since internal struct).Marcus Meissner2006-01-211-1/+6
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8511 67ed7778-7388-44ab-90cf-0a291f65f57c
* added/tuned/updated doxygen docsHans Ulrich Niedermann2005-06-151-7/+12
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8099 67ed7778-7388-44ab-90cf-0a291f65f57c