C file header generator
Project description
This tool reads a C source file (.c) and generates the text for the corresponding header file, with function declarations for any non-static function definitions found in the provided C file.
Installation
pip install cheaders
Usage
Execute cheaders through the python interpreter as a module:
python -m cheaders source_file.c
Example output
The following example shows what is generated for a sample .c file. The sample file is called ulist_.c, and contains the following code:
Example C source file
int myfunction(int intvar, float floatvar)
{
// Do important stuff
return 0;
}
void myotherfunction(int intvar, float floatvar, char long_name_variable)
{
// Do other important stuff
}
The header file that will be generated, with doxygen comments enabled (the default) looks like this:
Generated header file
/*
* myfile.h
*
* (Description here)
*
*/
#ifndef MYFILE_H
#define MYFILE_H
/**
* (Description)
*
* @param intvar (description)
* @param floatvar (description)
*
* @return (description)
*/
int myfunction(int intvar, float floatvar);
/**
* (Description)
*
* @param intvar (description)
* @param floatvar (description)
* @param long_name_variable (description)
*/
void myotherfunction(int intvar, float floatvar, char long_name_variable);
#endif /* MYFILE_H */
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cheaders-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cheaders-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.12.4 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.9.0-8-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712f7b55d475d2f10779916960b146128c815379c4cdcfc048443c44aa6656a4
|
|
| MD5 |
7df5bd6d59ffceceb11e4d7632e2ab5e
|
|
| BLAKE2b-256 |
3c376a8b45908d1deaae0726be938e6bbd45c8c8c6f7b17536e61eca452aa9e3
|
File details
Details for the file cheaders-1.0.0-py2-none-any.whl.
File metadata
- Download URL: cheaders-1.0.0-py2-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.12.4 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.9.0-8-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0856629de3837af8cf38af3fb9a381e839b0ab7841d66a4982425a01151e822d
|
|
| MD5 |
0f4b8f90ffcce91ea883b2923aaf0af9
|
|
| BLAKE2b-256 |
2e538de72c3e7cb9bf9a824371e55468f924963e6d91df6f9ff573bfa88cd7bb
|