From 75b3e9a53d957d5761f0944fbf613c1738747500 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 16 May 2019 21:06:57 +0200 Subject: [PATCH] :fire: remove useless docs folder --- docs/BUILDING.md | 105 -------------------------------------------- docs/Testing.md | 28 ------------ docs/WIP_Driver.md | 9 ---- docs/WIP_Plugins.md | 65 --------------------------- 4 files changed, 207 deletions(-) delete mode 100644 docs/BUILDING.md delete mode 100644 docs/Testing.md delete mode 100644 docs/WIP_Driver.md delete mode 100644 docs/WIP_Plugins.md diff --git a/docs/BUILDING.md b/docs/BUILDING.md deleted file mode 100644 index ad73c6a3..00000000 --- a/docs/BUILDING.md +++ /dev/null @@ -1,105 +0,0 @@ -# Build / Configure Gwion - -## Table Of Content - * [Configure](#configure) - * [Build](#build) - * [Install](#install) - -## Configure - -### float precision - -Gwion can be built using either `float`or `double` as floating point type size. -By default, precision is set to `float` type. -You can change this behavior by passing `--double` to `configure`. - -> `--no-double` also sets precision to `float` type. - -### Drivers - -> for examples, we use `xxx` as the driver name. - -drivers can be enabled using `--xxx` as argument. -Similarly, they can be disabled with `--no-xxx` - -You can also set library path: `--xxx_lib=/path/to/driver/library` -Set driver include path using `--xxx_inc=/path/to/driver/include/dir` - -### Driver list - -| driver name | default | -|-------------|---------| -| spa | on | -| sndfile | on | -| alsa | on | -| jack | off | -| portaudio | off | -| soundio | off | - -there are also two mandatory drivers, which output no sound :astonished: - * `dummy` : computes as fast as possible. - * `silent` : computes as slow as realtime. - -#### IMPORTANT -set default driver, otherwise Gwion will use `dummy`. -To do so, use the `--d_func` flag, e.g.: `--d_func=alsa` to use alsa driver by default. - -### Common options - - * program name: `--prog=xx` (default *gwion*) - * compiler : `--cc=xxx` (default *gcc*, but *clang* also works) - * parser : `--yacc=xxx` (default *yacc*) - * lexer : `--lex=xxx` (default *bison*) - * prefix : `--prefix=xxx` (default */usr/local*) - - -### Instrumentation options -compile with debug flags (`-g`) using: `--memcheck` -add coverage instrumentation to the code with `--coverage` - - -### Directories - -Gwion uses a few directories at runtime -These options **need** argument, e.g.: `--xxx=dir_name` - - * the place of plugins: `add` - -All directories will be prefixed with `$PREFIX/lib/Gwion/` - ------------------ - -## Make -Basically, all that is left to do is -```sh -make -``` -The only environment variable affecting the operation is `PREFIX` - -Except `--(no-)double`, everything can be set when running make, -using environment variables. - -Drivers can be set on using, e.g. for *alsa* : `ALSA_D=1` or `ALSA_D=on`. -In the same way, then can be disabled with `ALSA_D=0` or `ALSA_D=off` - -> Just capitalize the options name - -> to set instrumentation flags at make time, capitalize those and prefix them -with "USE_", e.g.: `USE_MEMCHECK=1` or `USE_COVERAGE=on` - -### Running tests -```bash -make tests -``` -to run all tests, or -```bash -bash util/test.sh my_file_or_directory (.. other files/dirs ...) -``` -to run specific ones. -look [here](#testing.md) for more. -## Install -*maybe as root* -```sh -make install -``` -The only environment variable affecting the operation is `PREFIX` diff --git a/docs/Testing.md b/docs/Testing.md deleted file mode 100644 index 3c3a79dd..00000000 --- a/docs/Testing.md +++ /dev/null @@ -1,28 +0,0 @@ -# Tests -[test.sh](https://github.com/fennecdjay/Gwion/blob/dev/util/test.sh) -requires [valgrind](http://valgrind.org/) -there are two kinds of tests: - * [gwion](#gwion-tests) - * [bash](#bash-tests) - -## Gwion tests -those tests are just gwion (.gw) files, handling special comments: - * `// [skip]` (*optionally* followed by reason to skip) - * `// [todo]` (*optionally* followed by reason to delay testing) - * `// [contains]` followed by string to match - * `// [excludes]` followed by string not to match - -## Shell test -those tests are just bash (.sh) files. -they should start with this snippet -```bash -#!/bin/bash -# [test] #5 -n=0 -[ "$1" ] && n="$1" -[ "$n" -eq 0 ] && n=1 -source tests/sh/common.sh -``` - -## TODO - [ ] `bailout` system for early exit on failure diff --git a/docs/WIP_Driver.md b/docs/WIP_Driver.md deleted file mode 100644 index 20478632..00000000 --- a/docs/WIP_Driver.md +++ /dev/null @@ -1,9 +0,0 @@ -# Giving gwion a new driver - -## basics - -> in order to use GWION_CTL ... - -# concept - -# upd driver diff --git a/docs/WIP_Plugins.md b/docs/WIP_Plugins.md deleted file mode 100644 index a2ee54f6..00000000 --- a/docs/WIP_Plugins.md +++ /dev/null @@ -1,65 +0,0 @@ -# Writing a Gwion plugin - * [getting started] - -## Getting started -use the script - -### headers -``` -#include "vm.h" -#include "instr.h" -#include "import.h -``` - - -### Class -Define the type: -``` -struct Type_ t_mytype = { "MyType", SZ_INT, &t_object}; -``` -> every type extending t_object should have SZ_INT - -### Handling Constructors and Destructors -#### CTOR -``` -CTOR(mytype_ctor) { - /* constructor code here */ -} -``` -#### DTOR -``` -DTOR(mytype_dtor) { - /* destructor code here */ -} -``` - -those macros provide two variables: - * `o`: the *M_Object* for the (con/des)tructor - * `shred`: the *VM_Shred* for the (con/des)tructor - -``` -CHECK_BB(import_class_begin(env, &t_mytpe, env->global_nspc, mytype_ctor, mytype_dtor)) -``` -#### variable -declare a `m_int`. coding convention require - * a leading *_o* - * a following *_type_* -```c -m_int o_mytype_myvaroffset; -``` -#### function -```c -/* declare a member function */ -MFUN(mytype_memberfunction) { - /* code here */ -} - -SFUN(mtype_staticfunction) { - /* code here */ -} -``` - -#### operator - -### Import function - -- 2.43.0