83 Commits (8337462032c87d0aacc0e4172bf1f8516934584c)

Author SHA1 Message Date
Rosen Penev bd6a996181 clang-tidy: use using
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
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 94b87a8dec Remove deprecated SSH support 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Robin Mills 9e2ac47cf9
Merge pull request #1475 from 1div0/BMFF
Base Media File Format
4 years ago
Robin Mills 02477faf4e Following review by @hassec, I use static base64_encoding vector in both Exiv2::base64encode() and Exiv2::base64decode().
I'm a little uneasy about changes to the API of the shared object/DLL.  I will investigate #890 during the release process.  So I have a plan to identify this if it's an issue.  I think it's OK.

```
703 rmills@rmillsmm-local:~/gnu/github/exiv2/bmff/build $ nm --demangle lib/libexiv2.dylib  | grep base64
00000000000384a0 T Exiv2::base64decode(char const*, char*, unsigned long)
0000000000038340 T Exiv2::base64encode(void const*, unsigned long, char*, unsigned long)
00000000001c33a0 s Exiv2::base64_encode
704 rmills@rmillsmm-local:~/gnu/github/exiv2/bmff/build $ nm -g --demangle lib/libexiv2.dylib  | grep base64
00000000000384a0 T Exiv2::base64decode(char const*, char*, unsigned long)
0000000000038340 T Exiv2::base64encode(void const*, unsigned long, char*, unsigned long)
705 rmills@rmillsmm-local:~/gnu/github/exiv2/bmff/build $
```
4 years ago
clanmills 4c52861a74 Fix msvc build breaker. 4 years ago
clanmills f1303cbcda Another effort to fix base64decode and associated unit test. 4 years ago
clanmills 87e536dadf Fix #1358. This should be in a different PR. Keep changes to base64 encode/decode together. 4 years ago
clanmills 21c610e952 Restoring i < dataLength trigraph that I should not have removed. 4 years ago
clanmills c59c53acf5 Trick to avoid msvc issue with final line of base64 data. 4 years ago
clanmills 1eeeecea50 Replaced Exiv2::base64encode() because last effort failed unit test on msvc. 4 years ago
clanmills 80e20304cb Fix Linux build breakers. 4 years ago
clanmills 5410395576 Replaced the ugly code in Exiv2::base64encode() and update the test suite. 4 years ago
Ingo Weyrich a6a47346a8 Use a.rfind(b, 0) == 0 instead of a.find(b) == 0 to reduce processing time when checking that a starts wit b, #1459 4 years ago
Luis Díaz Más b9164d9f8b Revert "change implementation of Exiv2::base64encode() to adopt implementation from same URL as base64decode()."
This reverts commit b596f311f4.
5 years ago
clanmills b596f311f4 change implementation of Exiv2::base64encode() to adopt implementation from same URL as base64decode(). 5 years ago
clanmills c7bcfcfbf8 replace base64encode in src/futils.cpp 5 years ago
clanmills 0a06dc9ee4 Issue identified in #1101 master/MinGW/Qt. Apply the change here (although this is working on 0.27-maintenance) 5 years ago
clanmills 13565be3d2 Change for solaris. 5 years ago
clanmills d8a513b7df Updated following code review. 6 years ago
clanmills 742cd5885b Fixing Windows build-breaker for EXV_UNICODE_PATH in `Protocol fileProtocol(const std::wstring& path)` 6 years ago
clanmills ab0b97c729 fix895-ICCProfile-FalseWarning 6 years ago
Robin Mills b0a9cb5624 NetBSD/FreeBSD Support 6 years ago
clanmills 282e99b6b0 Fix #610
(cherry picked from commit 54367e18ed0bf8bae6d8449341a6f82779f6d3c7)
6 years ago
Luis Diaz Mas acc9fa012d Reliable detection of strerror_r variants 7 years ago
Natanael Copa 480430d397 Fix usage of strerror_r
Only GNU libc has implementation of the GNU variant of strerror_r, so
also for __GLIBC__ to determine which strerror_r implemenation to use.

This fixes build with musl libc, which makes some, but not all, GNU
extensions available with _GNU_SOURCE.
7 years ago
Robin Mills 23483dff86 #571 Restore the original windows getProcessCode() because Microsoft's GetModuleFileName isn't effective! 7 years ago
Robin Mills 108509a089 Correction to Microsoft sample code! https://docs.microsoft.com/en-gb/windows/desktop/Services/installing-a-service 7 years ago
Robin Mills 9cb6c1e4c9 Correction in futils.cpp 7 years ago
Robin Mills 22e49cc78b Try to fix https://github.com/Exiv2/exiv2/issues/572 7 years ago
clanmills c5cd09bebe Fix getProcessPath() on Cygwin 7 years ago
clanmills 2f70ae4305 Fix getProcessPath() 7 years ago
Luis Díaz Más aae84e4643 Add missing inclusions of cstdio and cstdarg 7 years ago
Luis Díaz Más 38ed6de05d MSVC: Move compile definitions from config.h to CMake.
+ Also remove inclusion of <Windows.h> from config.h
7 years ago
Luis Díaz Más 7485bb54d7 Create function getProcessPath and add unit test for it
Debugging: Relative and Absolute path alternatives
7 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Dan Čermák 9f1a5a1ebb [futils] Change signature of getEnv to take an int
While taking an EnVar as the parameter is more clear it has the
disadvantage, that passing anything outside of the range of the
enumeration is undefined behavior. The compiler could then optimize
the range check in getEnv away (perfectly legal due to UB), leading
to buffer overreads.
7 years ago
Luis Diaz Mas eb306fdbae Substitute malloc/free with new/delete 7 years ago
Luis Diaz Mas eefee8125b to_hex and from_hex removed from API 7 years ago
tbeu bb9034e029 Do not implicitly cast enum to Boolean
V768 The expression 'fileProtocol(path)' is of enum type. It is odd that it is used as an expression of a Boolean-type. futils.cpp 288
7 years ago
tbeu 75cdbc8b91 Use pre-increment on iterators
V803 Decreased performance. In case 'userEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 405
V803 Decreased performance. In case 'authEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 410
V803 Decreased performance. In case 'hostEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 428
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 711
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 841
V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 958
V803 Decreased performance. In case 'i' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 855
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. jpgimage.cpp 817
V803 Decreased performance. In case 'lib' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 508
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 563
V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. xmpsidecar.cpp 138
7 years ago
Luis Díaz Más e32323d7c7 Simplify usage of strerror_r.
- Define STRERROR_R_CHAR_P properly on CMake and use it on futils.cpp
- We use now _GNU_SOURCE to determine which version of strerror_r to use
- strError only throws if ret==ERANGE
- Remove STRERROR_R_CHAR_P. It has been never used
- sort defines in config.h.cmake
- Remove EXV_HAVE_DECL_STRERROR_R that is not used anymore
- Remove EXV_HAVE_STRERROR. C++98 always will have it
7 years ago
Luis Díaz Más f36bea3801 exiv2::getEnv throws std::out_of_range on unexpected EnVar
This change define explicitly the behavior that exiv2::getEnv should have
on response to unexpected inputs.

There are some other minor changes:

- Use _putenv_s for the unit tests on Windows
- Add todo comment
- Remove deprecated note about freeing memory
8 years ago
Luis Díaz Más 8dc3c1f0a0 Replace malloc/free by new/delete. Use const char* for input arg 8 years ago
Luis Díaz Más bfe057ca20 Auto-formatting done by the IDE while touching code in the previous commits 8 years ago
Luis Díaz Más 8b049922d7 Change exiv2::urlencode signature to return std::string
The goal of this change is to remove the responsibility from the client code to
free the memory of the returned string.
8 years ago
tbeu 5b5987a596 Remove obsolete EXIV2_RCSID 8 years ago
tbeu 5df8b01b77 Remove obsolete svn revision 8 years ago
Robin Mills 192a2a83cf #1279 Cleaned up doxygen warnings for doc and website. 8 years ago