path: root/goo
AgeCommit message (Collapse)AuthorFilesLines
2019-12-02Enable modernize-use-equals-deleteAlbert Astals Cid4-15/+17
Not claiming copyright since the change is mechanical
2019-12-02Enable modernize-use-overrideAlbert Astals Cid4-4/+4
not claiming copyright for this since it's a mechanical change
2019-11-29Enable modernize-deprecated-headersAlbert Astals Cid10-20/+20
2019-11-29Enable readability-inconsistent-declaration-parameter-nameAlbert Astals Cid2-2/+4
2019-11-24Update (C) of few past commitsAlbert Astals Cid2-0/+2
2019-11-20Allow to append a std::stringOliver Sander1-0/+1
This is helpful in situations that mix GooString and std::string.
2019-11-19fix commentAlbert Astals Cid1-1/+1
2019-11-19Remove GooString::upperCaseOliver Sander2-11/+0
It is never used.
2019-11-18Replace GooString::fromInt by std::to_stringOliver Sander2-12/+0
2019-08-24GfxDeviceNColorSpace: Port to std::vector<std::string>Albert Astals Cid1-1/+2
I was tired of having two constructors for GfxDeviceNColorSpace, both taking GooString ** but one copying those strings and the other keeping them for itself. Moved to std::vector<std::string> without much fallout in the rest of the code
2019-08-20Remove USE_FIXEDPOINT supportAdrian Bunk2-321/+0
This was already non-compiling for some time. Closes #821
2019-07-17gfree: No need to check for p != nullptr, std::free already does thatAlbert Astals Cid1-4/+2
2019-07-04TextOuputDev: Fix crash when grealloc would overflowAlbert Astals Cid1-4/+8
Introduces a new greallocn variant that doesn't free the pointer passed in case of error, since the pointer holds pointers inside, that would lead to leak of all those pointers
2019-04-10avoid warning C4310: cast truncates constant valuehimajin1000001-2/+3
2019-04-02Fix MSVC compileAlbert Astals Cid1-6/+7
Windows.h defines max/min macros, these extra parentheses makes it happy enough ...
2019-03-31ofz-8443: Integer-overflow in identifyCFFLE GARREC Vincent1-11/+15
2019-03-31Integer-overflow in Gfx::doAxialShFillLE GARREC Vincent1-0/+11
2019-03-30(C) of previous commitsAlbert Astals Cid1-0/+1
2019-03-28document: Handle UTF16-LE annotationsChristophe Fergeau1-0/+1
I can produce such annotations when adding annotations to a PDF attachement from the standard mail app on my iPhone (iOS 12.1). They currently all show as "ÿþÚ" rather than the actual string content. UTF16-BE vs UTF16-LE is detected by inferring the endianness from the first two bytes of the string (0xFF 0xFE and 0xFE 0xFF aka Byte Order Marker).
2019-03-21Remove GooList completelyOliver Sander1-53/+0
2019-03-21Remove method GooList::getOliver Sander1-4/+0
Use operator[] instead. This is another move towards discarding GooList in favor of std::vector.
2019-03-21Remove method deleteGooListOliver Sander1-8/+0
2019-03-21Make GooList a template typeOliver Sander1-6/+7
One more step towards getting rid of it completely.
2019-03-21Remove method GooList::getLengthOliver Sander1-3/+0
Use method 'size' (from std::vector) instead.
2019-02-10gbasename: Include stdlib for freeAlbert Astals Cid1-0/+2
fixes macos build
2019-02-10Update (C)Albert Astals Cid1-1/+1
2019-02-10MSVC build fix: gbasename: basename()/libgen.h don't exist in MSVC-land. ↵1-1/+9
Instead, use _splitpath_s.
2019-02-10Introduce gbase64Greg Knight2-0/+78
2019-02-10Introduce gbasenameGreg Knight2-0/+73
2019-01-19Update (C)Albert Astals Cid1-0/+1
2019-01-18all: Remove support for obsolete systemsChristian Persch3-184/+10
2019-01-05gfile: Fix the build on WIN32Christian Persch2-0/+8
The openFileDescriptor function is not user in the WIN32 codepaths, so just #ifdef it out on WIN32.
2019-01-05Update (C) of previous commitsAlbert Astals Cid2-0/+2
2019-01-03gfile: Open files with CLOEXEC flag setChristian Persch1-2/+45
First try to atomically open the file using O_CLOEXEC for open() and the "e" mode for fopen(), and if that doesn't work or O_CLOEXEC isn't defined, fall back to opening the file first and applying the FD_CLOEXEC flag afterwards.
2019-01-03gfile: Add wrapper for open(3p) and use it instead of directly calling openChristian Persch2-1/+8
This is in preparation to making the wrapper enforce the O_CLOEXEC flag.
2018-12-06Remove the file gtypes.h completelyOliver Sander7-39/+0
2018-12-06Replace Gulong by unsigned longOliver Sander2-7/+2
2018-12-06Replace Guint by unsigned intOliver Sander2-3/+2
2018-12-06Replace Gushort by unsigned shortOliver Sander1-1/+0
2018-12-06Replace Guchar by unsigned charOliver Sander3-4/+3
2018-12-06Move definition of type Goffset from gtypes.h to gfile.hOliver Sander2-1/+3
Because it is used for file-related stuff.
2018-11-28Update (C)Albert Astals Cid1-0/+1
2018-11-27gooString::fromInt: Repair the return value.Greg Knight1-1/+1
formatInt renders from "right to left" and returns the position of the most significant digit in 'p' - which is not generally equal to 'buf' in the case of GooString::fromInt (unless you're rendering a 24-digit number.) This repairs several issues in pdftohtml
2018-11-16Make GooString constructible and assignable from null pointers again since ↵Adam Reichold1-6/+6
some of the code expects it.
2018-11-11Rename GooString::getCString GooString::c_strOliver Sander3-18/+18
This is the name used by std::string.
2018-10-29Update (C)Albert Astals Cid1-0/+1
2018-10-29Replace the implementation of GooString by std::string but keep the exact ↵Adam Reichold2-365/+128
interface intact. The approach is slightly different to GooList as it reimplements GooString in terms of std::string but keeps its interface intact and does expose any std::string functionality as of now. This is done since GooString has a significantly larger API surface and exposing both API would be quite confusing with with some overloads from GooString and some from std::string being visible. But it does mean we can align the API (they are already pretty close) and expose new things like a reserve method piece by piece. It also already helps in that the implementation of GooString is gone except for the original parts, i.e. the formatting, and we have zero cost conversion from/to std::string which should help in making more use of it elsewhere. It also gives us do-nothing-access to optimizations done for the standard library, e.g. word-level implementations of cmp and friends. (Note that the resulting is a bit funny as the formatting helper are now local to the translation unit, but I had to redeclare them to keep the diff small as I did not change them at all. But if this is done, they could probably just be moved to where the declarations are to make the source file more readable.)
2018-10-23Replace GBool, gTrue, and gFalse by bool, true, false, resp.Oliver Sander8-66/+54
These are just non-standard names for bool, true, false, respectively. Getting rid of these names saves on layer of mental redirection, and enables proper syntax highlighting in editors.
2018-10-21Update (C)Albert Astals Cid3-1/+4
2018-10-10Remove usage of pragmas interface and implementationAdam Reichold6-24/+0
GCC recommends not using them for a long time and its documentation says: > These #pragmas have been superceded as of GCC 2.7.2 by COMDAT support > and the “key method” heuristic mentioned in Vague Linkage. > Using them can actually cause your program to grow due to > unnecessary out-of-line copies of inline functions. Also nobody seems to set USE_GCC_PRAGMAS and sometimes they were guarded by just __GNUC__ which upsets Clang.