zach / crcpp Goto Github PK
View Code? Open in Web Editor NEWCRC preprocessor: inserts CRC-32 checksums into C++ code
Home Page: http://www.zachbaker.com/
License: MIT License
CRC preprocessor: inserts CRC-32 checksums into C++ code
Home Page: http://www.zachbaker.com/
License: MIT License
crcpp A CRC preprocessor: inserts CRC-32 checksums into C or C++ code. 1. Status I've tried this on Windows and Mac platforms. It may even compile on others. 2. Download and Source Repository The source and executables are available on my github.com page: http://github.com/zach/crcpp Here is a direct link to a .zip archive of the current release: http://github.com/zach/crcpp/zipball/master 3. Installing from source A Win32 executable as well as a directly-compilable .c version is available at the repository. On other platforms, you'll need to install from source, using Ragel: http://www.cs.queensu.ca/~thurston/ragel/ And you'll need zlib if you don't have it already available: http://zlib.net/ Use Ragel to compile crcpp.rl into crcpp.c: ragel crcpp.rl Then compile the resulting .c file with the zlib library, for instance like so: gcc -o crcpp crcpp.c -lz 3. License The files in this project are licensed under an MIT-style license as explained in the LICENSE file. 4. Rationale I know that it isn't so hard to do this in Perl or a similar language. As an example of a very flexible cpp replacement in Perl, the filepp project is worth looking at. But Ragel compiled to C produces a very fast executable. For a tool designed to run on every file in a very large project before it is compiled, that is essential. Finally, this preprocessor has the very-appreciated functionality that it will leave a file alone (not write or touch it at all) if no updates need to be made. Not only does that account for the overwhelming majority of cases in which it's used (and so spare the disk access that would otherwise occur), it also keeps your source control and dates correct on the source files it's used on. 4. Limitations String concatenation (a string broken up into multiple strings separated by newline) do not work. However, escaped newlines should. Errors are hardly reported on. If you put anything besides a hex number in the place of the CRC value, it will not be updated or flagged for an error. 5. Possibilities for Modification This source can easily be adapted to do other tasks, like different hash algorithms, checking with an external list to detect hash collisions, or more elaborate things such as flexible name-to-asset mapping or lookups into an asset database. 6. Contact Please email me at [email protected] if you have any questions or suggestions. -- Zach Baker.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.