# Everest Linux - Docs

Home About Install Packages Downloads Docs Errata Git ↗

## Developer Documentation

This page contains developer-specific documentation.

## 1 - Coding Style

1.1 File Structure

Files should follow this format:

- Header comment, including program name and LICENSE
- Headers
- Macros
- Types
- Global variables
- Functions
- <cil>main</cil> (if applicable)

Note that function declarations should be defined in a separate header, ex:

<cil>#include "project_name.h"</cil>

Indentations should be a single tab and be equal to 8 characters for better readability.

1.2 Functions

Functions should have their return type on one line, their name and parameters one line down, and the bracket one line under the name and arguments.

Example:

<bigcodehead>CODE: Proper function formatting in C</bigcodehead>

static void

usage(int argc, char *argv[])

{

printf("usage: %s [-a] [-b]\n", argv[0]);

}

1.3 Example Program

<fhead>FILE: prog.c</fhead>

#include <stdio.h>

#include "prog.h"

void

hello()

{

printf("hello\n");

}

int

main()

{

hello();

}

<fhead>FILE: prog.h</fhead>

#ifndef PROG_H_

#define PROG_H_

void hello();

#endif

## 2 - Licensing

2.1 Disclaimer

<warnhead>WARNING:</warnhead>

This is not legal advice. If you are in doubt with licensing, please contact your lawyer.

2.2 Preferred Licenses

For all projects officially released under Everest, the GNU GPL family of licenses is preferred. It provides compatibility with all other existing Everest projects.

Most programs should be licensed under the standard GPL. For libraries, you might want to choose the LGPL, if you want to allow linking within proprietary programs. For web applications, always choose the AGPL.

2.3 Other Licenses

If you wish to use a non-GPL license for your project, that is perfectly permissible.

Before releasing your program, we ask that you add the following disclaimer to your README:

<fhead>FILE: README</fhead>

LICENSING DISCLAIMER:

This program is licensed under (LICENSE), and as such may be incompatible with other GPL-licensed Everest programs.

Please contact the program's maintainer if you have questions.

If you are an Everest developer and host a project on our Git server, but do not want it associated with Everest, please submit an electronically signed form stating the following:

<fhead>FILE: WAIVER</fhead>

Everest Linux Development Group hereby relinquishes all claims of ownership on program "foo" to developer "bar".

Electronically signed by Foobar on 1/1/2024

Electronically signed by Everest Linux head developer on 1/1/2024

2.3 Proprietary Licenses

Programs hosted on our Git servers are never to be released under proprietary licenses.

There will be no further discussion.