Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abranhe/os.c

Small C library to know your operating system.
https://github.com/abranhe/os.c

c c-library clib clibs freebsd linux macos operating-system os win32 win64 window

Last synced: about 1 month ago
JSON representation

Small C library to know your operating system.

Awesome Lists containing this project

README

        









os.c: Small C library to know your operating system.

















## Installation

*Installing using [Clib](https://github.com/clibs/clib)*

```sh
$ clib install abranhe/os.c
```

## Usage

```c
#include
#include "os.h"

int main()
{
printf("%s\n", operating_system());
// macOS
return 0;
}
```

## API

#### `char *operating_system(void);`

*Return the operating system you are using.*

###### Params:

- `void`: It takes no parameters

###### Available operating systems

| Operating System | `operating_system()` |
|:---------------- | :------------------- |
| macOS | `macOS` |
| Window 32 | `win32` |
| Window 64 | `win64` |
| Unix | `unix` |
| Linux | `linux` |
| Free BSD | `freeBSD` |
| Other | `other` |

## Related

- [os][os]: cli tool for this library.
## Team

|[![Carlos Abraham Logo][abranhe-img]][abranhe]|
| :-: |
| [Carlos Abraham][abranhe] |

## License

[MIT][license] License © [Carlos Abraham][abranhe]

[abranhe]: https://github.com/abranhe
[abranhe-img]: https://avatars3.githubusercontent.com/u/21347264?s=50
[license]: https://github.com/abranhe/os.c/blob/master/license
[example]: https://github.com/abranhe/os.c/blob/master/example.c
[os]: https://github.com/abranhe/os
[travis-badge]: https://img.shields.io/travis/abranhe/os.c.svg
[travis-status]: https://travis-ci.org/abranhe/os.c
[coverage-badge]: https://img.shields.io/coveralls/abranhe/os.c.svg
[coverage-status]: https://coveralls.io/r/abranhe/os.c?branch=master