summaryrefslogtreecommitdiff
path: root/src/win32/dir.c
Commit message (Collapse)AuthorAgeFilesLines
* Make our overflow check look more like gcc/clang'sEdward Thomson2015-02-131-4/+4
| | | | | | | | | Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
* overflow checking: don't make callers set oomEdward Thomson2015-02-121-3/+1
| | | | | | Have the ALLOC_OVERFLOW testing macros also simply set_oom in the case where a computation would overflow, so that callers don't need to.
* allocations: test for overflow of requested sizeEdward Thomson2015-02-121-2/+6
| | | | | Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-191-23/+4
|
* Missed one path for path_as_utf8 typeRussell Belfer2013-08-131-1/+1
|
* Minor win32 fixes and improvementsRussell Belfer2013-08-131-13/+8
| | | | | | | | This is just a bunch of small fixes that I noticed while looking at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking for an empty directory (not exiting loop asap), makes the dir name in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation, and fixes some slightly odd assumptions in the cl_getenv helper.
* Reintroduce type for UTF8 win32 path conversionsRussell Belfer2013-08-131-1/+1
|
* Rename git__win32_path fns to git_win32_pathRussell Belfer2013-08-131-3/+3
|
* windows: Fuck meVicent Marti2013-08-131-1/+1
|
* windows: Require orderVicent Marti2013-08-131-2/+1
|
* windows: Path conversion with better semanticsVicent Marti2013-08-131-5/+5
|
* Discriminate path-specific and general UTF-X conversionsBen Straub2013-08-081-3/+3
|
* Rename git_win_str_utf* to git_win32_path_utf*Ben Straub2013-08-071-2/+2
|
* Add typedefs for win32 utf-8 and utf-16 buffersBen Straub2013-08-071-4/+4
| | | | ...and normalize the signatures of the two conversion functions.
* Split UTF-16 and UTF-8 buffer sizes for win32Ben Straub2013-08-051-6/+6
| | | | | Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
* calloc() to initialize memoryLinquize2013-05-161-1/+1
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add bounds checking to UTF-8 conversionutf8-winVicent Marti2012-08-281-2/+2
|
* windows: Keep UTF-8 on the stack yoVicent Marti2012-08-281-21/+8
|
* Continue error conversionRussell Belfer2012-03-141-33/+55
| | | | | | | This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
* Update diff to use iteratorsRussell Belfer2012-03-021-3/+9
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Fix readdir usage across platformsRussell Belfer2012-02-231-11/+23
| | | | | | This fixes the missing readdir_r from win32 and fixes other platforms to always use the reentrant readdir_r form for reading directory contents.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-7/+7
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* windows: Add support for non-UTF codepagesVicent Marti2011-10-261-4/+5
| | | | | | | | | | | | | | | | Our previous assumption that all paths in Windows are encoded in UTF-8 is rather weak, specially when considering that Git is encoding-agnostic. These set of functions allow the user to change the library's active codepage globally, so it is possible to access paths and files on all international versions of Windows. Note that the default encoding here is UTF-8 because we assume that 99% of all Git repositories will be in UTF-8. Also, if you use non-ascii characters in paths, anywhere, please burn on a fire.
* Fix opendir/readdir and friends on Win32 to use Unicodeutf8-paths-win32Paul Betts2011-09-191-5/+14
|
* Rewrite p_* functions to use Unicode and marshal to UTF8 internallyPaul Betts2011-09-191-0/+1
|
* Cleanup legal dataVicent Marti2011-09-191-0/+6
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* win32: Add a 'git__' prefix to the directory reading routinesRamsay Jones2010-01-201-5/+6
| | | | | | | | This reduces the global namespace pollution and allows for a win32 compiler (eg. Open Watcom) to provide these routines in a header other than <dirent.h> (eg in <io.h>). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Fix some "signed/unsigned mismatch" (msvc) compiler warningsRamsay Jones2009-06-051-1/+1
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
* win32: Add <dirent.h> directory reading routinesRamsay Jones2009-03-201-0/+97
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>