C Application Framework

Related tags

Utilities caffeine
Overview

Caffeine, C Application Framework

Caffeine is a C language based framework which uses C99, POSIX and SUSv3 standards, and system specific system calls -- Linux and FreeBSD for now -- to support the development of daemons and services. The idea is to have predefined algorithms to help you in some tasks for building your own daemons, command line applications and complex tasks such as integrating plugin interfaces to your applications. The concrete goal of this project is to implement most common algorithms to develop service oriented applications.

Features

  • Process pool support
  • Thread pool support
  • Static state machine support
  • Dynamic state machine support
  • Loadable state machine support
  • Dynamic shared object support
  • Deque support
  • Linked list support
  • Circular list support
  • Hash table support
  • Asynchronous I/O support
  • File descriptor events support
  • Buffer management support
  • SysV IPC support

STEPS FOR BUILDING CAFFEINE

Build Tools:

  • CMake
  • PCRE

CMake is a Makefile generator tool writen in C++. To build Caffeine manually you must run:

cmake .
make

In the bin directory resides a script called cmk.sh, it's script that helps in the compilation of caffeine, setting verbose output and debug binaries generation, written to help in debugging tasks.

To build Caffeine with cmk.sh you must run:

cmk.sh -mcb

To clean the proyect output, usually to get a patch:

cmk.sh -mc

To import the proyect into kdevelop:

cmk.sh -kcb

To clean the project output made by kdevelop:

cmk.sh -kc

Caffeine Coding Style

Indenting and Formatting

The style in Caffeine is a mixture between ISO C 99 calling conventions, K&R blocks breakings and KNF -- Kernel Normal Form -- indenting.

  • Functions in ISO C 99 (ISO/IEC 9899:1999) calling convention.
  • Block must be broken using K&R indenting style.
  • The code must be indented with concrete tabs of width 4.
  • The fill column must set to the column 78.

Concrete tabs are used to speed up the compile time of caffeine, concrete tabs means less tokens to parse.

Naming Conventions

  • Lowercase functions.
  • Lowercase identifiers.
  • Lowercase constants in files and static variables.
  • Uppercase enums.
  • Uppercase macros.
  • Uppercase define constants (in headers).

For core functions, you must use: <module_abbreviation>_<function_name> I.E.: cbuf_create

For caffeine functions, you must use: <module_abbreviation><function_name>

For parameters, and local variables, abbreviations are permitted.

For typedefs, you must use: <module_abbreviation>__t

For structures, you must use: <module_abbreviation>__s

For single variables and parameters, hungarian notation -- type prefix or suffix -- isn't permitted.

Emacs Style

To use emacs during caffeine hacking you must use the next sentence in your .emacs file:

(c-add-style "caffeine"
         '((c-basic-offset . 4)
           (c-comment-only-line-offset . 0)
           (c-offsets-alist . ((statement-block-intro . +)
                   (knr-argdecl-intro . +)
                   (substatement-open . 0)
                   (label . 0)
                   (statement-cont . +)
                   (inline-open . 0)
                   (inexpr-class . 0)
                   ))))

This will ensure that the code is indented under the caffeine rules.

Vim Style

For VIM is needed the cino variable. I'm working on that, but isn't ready yet.

Kate Style

On Kate you must turn off the mixed indenting style and set the tab key to insert concrete tabs. As part of KNF indenting style.

Caffeine Hacking Guide

Before you start

You must read the STYLE guide.

  1. What can I do?

  • Write unitary tests for every algorithm in Caffeine. If you don't have enough time, you can submit the test and we will debug the tests for you.

  • Contribute with modules. Write a module to extend caffeine, something that can be usefull.

  • Wait for the caffeine design specs.

  1. Centralized Development

  • Contributions are received through the development mailing list.
  • Module contributions retain the original copyleft notice (copyright under LGPL), if you write a module, you own the copyleft notice.
  • Patch and patchset contributions that affects up to 50.000001% of a module, means the inclusion of the proper copyleft notice in the module file.
  • Patch and patchset contributions that affects less to 49.00001% of a module, means the inclusion of the author name in the AUTHORS file.
  1. Avoid Compile Warnings

Caffeine is build under strict compilation flags. Common flags to build caffeine are:

-Wall -Wextra -Wshadow -pedantic -std=c99

This means that the code must be 100% C99 (ISO/IEC 9899:1990) compilant. Every compile warning related to this standard, must be removed. To build Caffeine under debugging configuration, see the BUILDING text file.

Related Webpages

The caffeine main web page is located here coder.cl

Authors

You might also like...
An OBS plugin that allows capture of independant application audio streams on Windows, in a similar fashion to OBS's game capture and Discord's application streaming.
An OBS plugin that allows capture of independant application audio streams on Windows, in a similar fashion to OBS's game capture and Discord's application streaming.

win-capture-audio An OBS plugin based on OBS's win-capture/game-capture that hooks WASAPI's audio output functions (rather than the various graphics A

Example-application - Example out-of-tree application that is also a module

Zephyr Example Application This repository contains a Zephyr example application. The main purpose of this repository is to serve as a reference on ho

The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for Vulkan application developers to leverage Vulkan Profiles while developing a Vulkan application
The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for Vulkan application developers to leverage Vulkan Profiles while developing a Vulkan application

Copyright © 2021-2022 LunarG, Inc. Vulkan Profiles Tools (BETA) The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for

Framework for Enterprise Application Development in c++, HTTP1/HTTP2/HTTP3 compliant, Supports multiple server backends

The ffead-cpp Framework ffead-cpp is a web-framework, application framework, utilities all bundled into one. It also provides an embedded HTTP/Web-Soc

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VS

Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows
Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows

English | 简体中文 | 繁體中文 Overview Drogon is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web applicat

Your high performance web application C framework

facil.io is a C micro-framework for web applications. facil.io includes: A fast HTTP/1.1 and Websocket static file + application server. Support for c

🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

C Application Framework

Caffeine, C Application Framework Caffeine is a C language based framework which uses C99, POSIX and SUSv3 standards, and system specific system calls

C++ application development framework, to help developers create and deploy applications quickly and simply

ULib - C++ library Travis CI: Coverity Scan: ULib is a highly optimized class framework for writing C++ applications. I wrote this framework as my too

The Application Framework for the Orion Operating System

Welcome to OrionAPI. Luxury + Linux, for everyone. The Application Framework for the Orion Operating System This toolkit is in development and current

Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows
Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows

English | 简体中文 | 繁體中文 Overview Drogon is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web applicat

🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

The application framework for developer module of EdgeGallery platform

crane-framework crane-framework将可复用的计算和软件功能抽象成插件,APP开发者面向使用插件进行MEC APP开发。这样屏蔽了和MEC平台交互的细节,实现MCE APP和MEC平台的松耦合。而且插件框架基础能力可裁剪,按需提供最小的APP系统。 特性介绍 为了方便开发者

High performance server-side application framework

Seastar Introduction SeaStar is an event-driven framework allowing you to write non-blocking, asynchronous code in a relatively straightforward manner

U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Cross-platform GPU-oriented C++ application/game framework
Cross-platform GPU-oriented C++ application/game framework

Introduction neoGFX is a C++ app/game engine and development platform targeted at app and game developers that wish to leverage modern GPUs for perfor

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework for creating high quality desktop and mobile applications, including VST, VST3, AU, AU

Neutralinojs is a lightweight and portable desktop application development framework
Neutralinojs is a lightweight and portable desktop application development framework

Neutralinojs is a lightweight and portable desktop application development framework. It lets you develop lightweight cross-platform desktop applications using JavaScript, HTML and CSS.

Comments
  • Bugfix: deque_pop did not remove last element

    Bugfix: deque_pop did not remove last element

    deque_pop did not behave correctly when only one element was left in the deque. The last element was returned but not detached from the list, thus the list remained of size 1 and calls to further deque_pop did not change anything.

    I chose to implement deque_pop analogously to cdeque_pop to keep them consistent.

    opened by danielspicar 0
Cheap: customized heaps for improved application performance.

Cheap: a malloc/new optimizer by Emery Berger About Cheap Cheap is a system that makes it easy to improve the performance of memory-intensive C/

Emery Berger 23 Dec 6, 2022
Instant Kubernetes-Native Application Observability

Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code.

Pixie Labs 4.1k Dec 25, 2022
Concept of Dynamic Application

Concept of Dynamic Application This is a basic concept of dynamic software that supports plug-in feature. More information coming soon... Dynamic-Appl

Kambiz Asadzadeh 10 Jul 27, 2022
A simple application that generates animated BTTV emotes from static images

emoteJAM WARNING! The application is in active development and can't do anything yet. A simple application that generates animated BTTV emotes from st

Tsoding 7 Apr 27, 2021
A protocol framework for ZeroMQ

zproto - a protocol framework for ZeroMQ Contents Man Page The Codec Generator The Server Generator Quick Background The State Machine Model The zprot

The ZeroMQ project 225 Dec 28, 2022
Remote Download and Memory Execute for shellcode framework

RmExecute Remote Download and Memory Execute for shellcode framework 远程下载并内存加载的ShellCode框架,暂不支持X64 参(抄)考(袭)项目 windows下shellcode提取模板的实现 主要抄袭来源,直接使用这位大佬

null 52 Dec 25, 2022
Windows kernel hacking framework, driver template, hypervisor and API written on C++

Windows kernel hacking framework, driver template, hypervisor and API written on C++

Александр 1.3k Jan 4, 2023
Edf is an event-driven framework for embedded system (e.g. FreeRTOS) with state machine and subscriber-publisher pattern.

Edf means event-driven framework. Event-driven programming is a common pattern in embedded systems. However, if you develop software directly on top o

Arrow89 7 Oct 16, 2022
TreeFrog Framework : High-speed C++ MVC Framework for Web Application

Small but Powerful and Efficient TreeFrog Framework is a high-speed and full-stack web application framework based on C++ and Qt, which supports HTTP

TreeFrog Framework 1.1k Dec 22, 2022
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

libxo libxo - A Library for Generating Text, XML, JSON, and HTML Output The libxo library allows an application to generate text, XML, JSON, and HTML

Juniper Networks 253 Dec 10, 2022