Skip to content

ychnlgy/StdC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StdC

Coverage Status Build Status License

C Standard Library. Synergizes with CakeBaker.

Documentation

Class Description
Memory Acts like a memory stack to reduce use of free and decref.
List Dynamically-resizing arraylist.
String String class for easy and safe string manipulation.
Path Navigation and tools for filesystems. Wrapper around Os.
Os Various low-level operating system commands.
File Easy parsing and writing files.
Socket Wrapper class for C socket calls.
Feature Description
Garbage Collection Reference-counting for dynamically allocated objects.
Utility Collection of useful functions for dealing with C.
Types Several predefined types wrapped in typedef for ease of use.
Unittest Small set of functions for nice looking unittests.

Installation using git-install

git-install.py ychnlgy/StdC

Uninstall using git-install

git-install.py --uninstall ychnlgy/StdC

Quickstart

  1. Write main.c:
// include all headers in stdc:
#include "stdc/lib.h"

int main() {
  return 0;
}
  1. Write the file cake.ini (copy-paste the following):
BUILD_ARGS         = -coverage
COMPILER           = gcc
COMPILE_ARGS       = -Wall -iquote ./ -coverage
DEFAULT_OUTPUTFILE = 
DEFAULT_SOURCEFILE = 
TEST_INCLUDE       = *_test.c
TEST_OMIT          = cake .git
  1. Compile with CakeBaker:
bakecake.py main.c app.exe

Examples

Feature Description
Memory How to use Memory to track, allocate and make memory blocks.
List Basic and advanced demonstrations of List methods.
String A demonstration of String methods.
Unittest How to write a unittest using StdC framework.

Note

All code in this package compiled without errors or warnings on my machine. If you encountered any compilation problems, please write a GitHub issue so I can fix it.

About

C Standard Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published