Skip to content

KumarjitDas/types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TYPES

A single-header C library for common types to be used all other C projects.

Table of Contents

Description

This is a simple header-only c library for common types which is used in all of my other C projcets.

See the list of features and functions implemented till now in Project Status.

Installation

To get started with this project, download and install the following.

  • Download and install git

    • If you use Windows, then go to this link and download and install the suitable version.

    • If you use any stable version of Debian/Ubuntu then run this command in your terminal

      sudo apt-get install git
    • If you use macOS then install homebrew if you don't already have it, then run this command in your terminal

      brew install git
  • Run the command to clone this repository

    git clone https://github.com/KumarjitDas/types.git
  • Download and install a C compiler (clang or gcc)

    • If you use Windows 10 then download and install a suitable version of clang from this link. For gcc, use the suitable MinGW version from this link.

    • If you use any stable version of Debian/Ubuntu then run these commands in your terminal to download and install clang and gcc compilers

      sudo apt install clang
      sudo apt install gcc
    • In macOS, clang is the default C compiler. To download and install gcc, run this command in your terminal

      brew install gcc

Roadmap

See the open issues for a list of proposed features/functionalities (and known issues).

The list of features and functions implemented till now is given in Project Status.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  • Fork this Project

  • Create your Feature Branch

    git checkout -b feature/AmazingFeature
  • Commit your Changes

    git commit -m 'Add some AmazingFeature'
  • Push to the Branch

    git push origin feature/AmazingFeature
  • Create a Pull Request

Naming Convension

  • Signed integers starts with i followed by the size (i.e. 8, 16, 32, 64)
  • Unsigned integers starts with u followed by the size (i.e. 8, 16, 32, 64)
  • Most macros start with TYPES_.
  • Type macros have TYPES_DEFINED_TYPE_ prefix followed by <TYPE_NAME>.
  • Type value macros have TYPES_DEFINED_TYPEVAL_ prefix followed by <VALUE_NAME>.
  • Minumum value macros have MIN_ prefix followed by <TYPE_NAME>.
  • Maximum value macros have MAX_ prefix followed by <TYPE_NAME>.
  • Size macros have SZ_ prefix followed by <TYPE_NAME>.

License

This project is distributed under the BSD 2-Clause License. See LICENSE for more information.

Project Status

List of functionalities/features implemented so far...

  • Type definitions: bool, i8, i16, i32, i64, imin, imax, u8, u16, u32, u64, umin, umax, byte, charcode, f32, f64, fmin, fmax, and any
  • Add TYPES_PRETEND_UNDEFINED above 'types.h' inclusion to make 64-bit types act as 32-bit types.
  • Check if a type is defined by using TYPES_DEFINED_TYPE_<TYPE_NAME>.
  • Check if a constnat value of a type is defined by using TYPES_DEFINED_TYPEVAL_<VALUE_NAME>.
  • Check if the compiler, OS, and CPU support 64-bit integers using TYPES_64BIT_INTEGER.
  • Check if the compiler, OS, and CPU support 64-bit pointers using TYPES_64BIT_POINTER.
  • Get the minimum value of a type using MIN_<TYPE_NAME>.
  • Get the maximum value of a type using MAX_<TYPE_NAME>.
  • Get the size of a type using SZ_<TYPE_NAME>.

Acknowledgment

I appreciate these websites which helped me to make such good README file, and helped me to learn about project versioning and keeping CHANGELOG.

Contact

Twitter: @kumarjitdas1999

LinkedIn: Kumarjit Das | কুমারজিৎ দাস

E-mail: kumarjitdas1999@gmail.com

Project link: GitHub-KumarjitDas-types

Versioning

This project uses MAJOR, MINOR, and PATCH version numbers for versioning (vMAJOR.MINOR.PATCH).

  • MAJOR version number indicates new changes which may be incompatible with older versions.
  • MINOR version number indicates addition of backwards-compatible features.
  • PATCH version number indicates backwards-compatible bug fixes, or minor mistake fixes like spelling, character cases, punctuations, and indentation.

Changelog

The Changelog file contains all the information about the changes made to this project till now.