182 Commits (fdfb295cc4882b1641b5f50254d45e91c47bc628)

Author SHA1 Message Date
Luis Díaz Más fdfb295cc4 windows: Trick to get UTF-8 encoded argv in main entry point
- Adapt exifprint to the new wmain strategy
- Delete have_unicode_path
- wmain does not work with MSYS & MinGW
- cmake: entry point via cmake instead of pragma
- cmake: better doc for MSVC flags
- Fix entry point in sample apps
- Adapt CMake code to work with MSVC & MinGW
3 years ago
Luis Díaz Más ac9439e931
Merge pull request #2063 from Exiv2/main_iterators
Modernise code around iterators & smart pointers
3 years ago
Peter 46c329081f
Fix `exiv2`: verbose extract stdout mutli-file (#2068)
When using `exiv2 --verbose --extract` with stdout and multiple files, the output is concatenated together.
3 years ago
Luis Díaz Más 0f03e77634 Simplify code around UniquePtr(s) & use make_unique over new 3 years ago
Facundo b52b6db39f
Output of -PV was not suitable for inputting to -m-, key was missing. (#1970)
* Output of -PV was not suitable for inputting to -m-, key was missing.

Fix #1969

* Make V flag to -P also print the type

This makes -PV work also for non-built-in tags (of which their type is
not known by exiv2).

* Adjust man to accomodate for the V flag change
4 years ago
Peter 797f86c226
Fix minor whitespace formatting
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
4 years ago
postscript-dev 9c294ef4fd
Fix exiv2: verbose extract to stdout (see #1934)
Fix ignores `--verbose` when extracting to stdout.
4 years ago
Kevin Backhouse 7cb65d1e25
Merge pull request #1872 from postscript-dev/update_exiv2_manpage
Update exiv2 program and manpage
4 years ago
Kevin Backhouse e1e7dddfbd
Fix test failure. 4 years ago
postscript-dev 795cfe90ce
Update exiv2 program, --help and usage 4 years ago
Kevin Backhouse 9ff72e5ca5
Make offset=0 the default parameter. 4 years ago
Kevin Backhouse c9d0cf3643
Make fields of DataBuf private. 4 years ago
postscript-dev fbdb38b959
Add missing `--extract` option to exiv2 program
The long option version of `-e` was missing.
4 years ago
Christoph Hasse d6c82b88bc refactor: avoid unused variable warning of regex_error 4 years ago
Christoph Hasse 687b38a130 refactor: use POSIX regex syntax as that is what was used before 4 years ago
Christoph Hasse d82980b563 refactor: replace old linux regex.h with regex from STL. 4 years ago
Kevin Backhouse 944e68fa15
Merge pull request #1787 from Exiv2/mergify/bp/main/pr-1766
Extra checking to prevent loop counter from wrapping around (backport #1766)
4 years ago
Kevin Backhouse 67a46f742d
Type of escapeStart should be size_t. 4 years ago
Kevin Backhouse 69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions. 4 years ago
Kevin Backhouse dc2c77ce81
Safer std::vector indexing. 4 years ago
Luis Díaz Más f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
4 years ago
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 9642e3cceb clang-tidy: remove pointless string init
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 143a1fbbe2 clang-tidy: don't use string compare
Found with readability-string-compare

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8337462032 clang-tidy: use empty() instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 5a9c29303e clang-tidy: remove pointless static
Found with readability-static-definition-in-anonymous-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev bd6a996181 clang-tidy: use using
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más 1b4577904b Fix MSVC build 4 years ago
Rosen Penev 4ceb325c8f clang-tidy: range for loop conversions
Found with modernize-loop-convert

Ran through git clang-format.

Also removed several questionable loops and replaced with simpler
algorithms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Luis Díaz Más 5fcea2b4e2 Use stack variables instead of java style 4 years ago
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 4 years ago
Robin Mills 9da2aed5d2 Use the documented 5 line prolog in every sample application. Tidy up sample prologs and header code. 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
clanmills b983a9db75 Re-awaken obsolete command-line argument --binary and store class Task. 4 years ago
Peter Kovář f0a321dedb [WIP] Base Media File Format 4 years ago
Peter Kovář 92469f4c27 [WIP] Add ISO/IEC Base Media File Format 4 years ago
Jan Tojnar 48f2c9dbba
cmake: Fix paths with absolute GNUInstallDirs
It is not generally true that `CMAKE_INSTALL_<dir>` variables are relative paths:

https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path

Let's join them properly as paths, not strings.

On Windows, the absolute paths will likely remain unsupported as neither the CMake function,
nor the C++ code is able to detect absolute paths.

Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
5 years ago
clanmills 904fa19d1c Code changes 5 years ago
clanmills 82087b58e4 fix_1099_0.27 5 years ago
Robin Mills 7844b11e4b
[xmpsdk] Add XMP Initialisation/Cleanup code to all main() programs
- update documentation
- Removed redundant calls to Exiv2::XmpParser::terminate() (legacy of our
  discusssion with @tester0077).
- this fixes #976
6 years ago
Luis Díaz Más 34e411d2fc Fix 547: option -pR only available in Debug mode.
Note that the method Params::evalPrint() has been clang-formatted.
7 years ago
Robin Mills 8a6cd5d24e Fix -vVg loops 7 years ago
Luis Díaz Más d1c2e2f64f bindtextdomain point to relative path to bin directory 7 years ago
Robin Mills 5f6ef65695 Update PROJECT_VERSION & add install() commands for CPack
- Version updated to 0.27.0.1.
- Release notes for MacOS-X Package, Linux, CYGWIN, win64 and msvc
- Redmine Release Notes Updated.
7 years ago
Luis Díaz Más c43d998457 Fix cppcheck issues: passedByValue 7 years ago