Commit Graph

8 Commits

Author SHA1 Message Date
easyaspi314 (Devin)
c994f5c9ef Fix copyright years
- Replace '-present' with '-2020' (fixes #329)
 - Use correct format: Copyright (C) <year> <name of author>
 - Fix some obviously incorrect years from copy/paste i.e. avoid time travel
2020-03-08 21:28:43 -04:00
Yann Collet
ff5df558b7 changed xxhash.com links to https 2020-03-04 18:36:13 -08:00
easyaspi314 (Devin)
87e7d8b999 More typos, add some more documentation
- Remove most remaining spaces before punctuation
 - Fix a few missed copyright messages
 - Document the timer resolution workaround
 - Document XXH_mult32to64
   - I compiled GCC 3.2 and 4.2 just to test this, both are affected.
   - Make sure we downcast for __emulu
 - Other minor fixes
2020-03-03 12:10:19 -05:00
easyaspi314 (Devin)
6fdff4b423 Fix copyright message formatting, update copyright years
- Add missing copyright for generate_unicode_test.c
   - use my real name, whatever
 - Fix blatantly incorrect copyright years
 - Update copyright years in xxhash.c/xxhash.h
 - Fix formatting
 - More typo fixes in multiInclude.c
2020-03-02 15:52:43 -05:00
easyaspi314 (Devin)
9eb91a3b53 Let the Great Typo Hunt commence!
Work in progress.

 - Fix many spelling/grammar issues, primarily in comments
 - Remove most spaces before punctuation
 - Update XXH3 comment
 - Wrap most comments to 80 columns
 - Unify most comments to use the same style
 - Use hexadecimal in the xxhash spec
 - Update help messages to better match POSIX/GNU conventions
 - Use HTML escapes in README.md to avoid UTF-8
 - Mark outdated benchmark/scores
2020-03-02 15:20:49 -05:00
easyaspi314 (Devin)
cac3ca4d5d Implement a safer Unicode test
This new test doesn't use any Unicode in the source files, instead
encoding all UTF-8 and UTF-16 as hex.

The test script will be generated from a C file, in which both a shell
script and a batch script will be generated, as well as the Unicode file
to test.

On Cygwin, MinGW, and MSYS, we will automatically bail from the shell
script to the batch script, as cmd.exe has more reliable Unicode
support, at least on Windows 7 and later.

When the make rule is called, it first checks if `$LANG` contains UTF-8,
defining the (overridable) ENABLE_UNICODE flag. If so, it will skip the
test with a warning.

Also fixed an issue with printf in multiInclude.c causing warnings on
old MinGW versions which expect %I64, and updated the .gitignore.
2020-02-14 19:08:09 -05:00
Yann Collet
dadf1ef766 fix xxhash.h include from xxh3.h 2020-02-12 14:36:11 -08:00
Yann Collet
19cd4ffed3 xxhash can be inlined even if it was previously included
Inlining hash functions is generally beneficial for performance.
It becomes extremely beneficial whenever input size is a compile-time constant.

To inline xxhash functions, one just needs to include it this way :

One potential issue is that "xxhash.h" may have already been included previously,
typically as part of another included `*.h` .
In which case, the second `#include` statement will have no effect.

This patch fixes this situation :
now, when XXH_INLINE_ALL is defined, all identifiers are renamed,
in order to avoid name collision and confusion with already included indentifiers.

The renaming process uses XXH_NAMESPACE.
XXH_NAMESPACE must be available (i.e. not already used) for renaming to work.

A test has been added in `tests/` to ensure this scenario works correctly.
2020-02-12 11:43:33 -08:00