mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-29 04:16:03 +00:00
C99 Compliance (#29)
This pull request brings Cytoplasm up from C89 to C99, which makes it much more portable across platforms. In particular, this pull request solves a number of issues with 32-bit platforms. Closes #28. Closes #12. Closes #20. Reviewed-on: https://git.telodendria.io/Telodendria/Cytoplasm/pulls/29
This commit is contained in:
parent
d0969d0dd7
commit
662696ce12
40 changed files with 384 additions and 1667 deletions
|
@ -24,6 +24,17 @@
|
|||
#ifndef CYTOPLASM_CYTOPLASM_H
|
||||
#define CYTOPLASM_CYTOPLASM_H
|
||||
|
||||
#define CYTOPLASM_VERSION_MAJOR 0
|
||||
#define CYTOPLASM_VERSION_MINOR 4
|
||||
#define CYTOPLASM_VERSION_PATCH 1
|
||||
#define CYTOPLASM_VERSION ((CYTOPLASM_VERSION_MAJOR * 10000) + (CYTOPLASM_VERSION_MINOR * 100) + (CYTOPLASM_VERSION_PATCH))
|
||||
|
||||
#define CYTOPLASM_VERSION_ALPHA 1
|
||||
#define CYTOPLASM_VERSION_BETA 0
|
||||
#define CYTOPLASM_VERSION_STABLE (!CYTOPLASM_VERSION_ALPHA && !CYTOPLASM_VERSION_BETA)
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
|
||||
/***
|
||||
* @Nm Cytoplasm
|
||||
* @Nd A simple API that provides metadata on the library itself.
|
||||
|
@ -34,18 +45,8 @@
|
|||
* currently loaded library.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Get the name that this library was compiled with. In most cases,
|
||||
* this will be hard-coded to "Cytoplasm", but it may differ if, for
|
||||
* some reason, there exists another ABI-compatible library that
|
||||
* wishes to report its name.
|
||||
*
|
||||
* This function really only exists because the information is
|
||||
* available along side of the version information so for
|
||||
* consistency, it made sense to include both.
|
||||
*/
|
||||
extern char * CytoplasmGetName(void);
|
||||
/** */
|
||||
extern int CytoplasmGetVersion(void);
|
||||
|
||||
/**
|
||||
* Get the library version. This will be useful mostly for printing
|
||||
|
@ -55,6 +56,6 @@ extern char * CytoplasmGetName(void);
|
|||
* This function returns a string, which should usually be able to be
|
||||
* parsed using sscanf() if absolutely necessary.
|
||||
*/
|
||||
extern char * CytoplasmGetVersion(void);
|
||||
extern const char * CytoplasmGetVersionStr(void);
|
||||
|
||||
#endif /* CYTOPLASM_CYTOPLASM_H */
|
||||
#endif /* CYTOPLASM_CYTOPLASM_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue