Skip to content
it4e edited this page Dec 12, 2016 · 5 revisions

Name

<chl/chl.h>

chl_func, CHL function

Declaration

char chl_func(char * name, char * args);

Description

The chl_func function is used to call a CHL function with the alias [name] and with the arguments [args].

Arguments

  • name: the alias for the function that will be called.
  • args: the arguments that will be passed to the function [name].

Return value

1 if function is found, 0 if function is not found.


Examples

main.c

#include <chl/chl.h>
#include <stdio.h>

void print(char * args) {
    char * arg = chl_next_arg(args);
    fputs(arg, stdout);
}

int main() {
    chl_func_append("print", print);
    chl_func("print", "'Hello'");
}

Output: Hello

As CHL is open-source, people are able to contribute with their own APIs, plugins and code which means that CHL is constantly upgraded and provided with new features. Do you have an idea for a new CHL feature and want to contribute?

See contribute.

Setup. API. Tutorial. Examples. FastCGI.

Clone this wiki locally