Fixed formatting in the readme

master
Ruben Dahl 2023-01-15 19:52:49 +01:00
parent c663de1197
commit 507fd582bb
No known key found for this signature in database
GPG Key ID: C7838D0300EDEF1B
2 changed files with 106 additions and 58 deletions

@ -1 +1 @@
Subproject commit ccc88d088865952b488eb3282531a48e8e5aae4a
Subproject commit f524c4a84d85fc630b076a77f5cdc29124f7cb6c

View File

@ -20,57 +20,77 @@
```cpp
#define __ceev_version
```
The current version of CeeV
* The current version of CeeV
---
```cpp
#define CONFIG_FILENAME
```
The filename used in `ceev init`
* The filename used in `ceev init`
---
```cpp
#define GIT_COMMIT_HASH
```
The latest git commit hash, defined by cmake.
* The latest git commit hash, defined by cmake.
---
```cpp
#define GIT_COMMIT_MSG
```
The latest git commit message, defined by cmake.
* The latest git commit message, defined by cmake.
---
```cpp
#define GIT_COMMIT_DATE
```
The latest git commit date, defined by cmake.
* The latest git commit date, defined by cmake.
---
```cpp
#define GIT_COMMIT_AUTHOR
```
The author of the latest git commit, defined by cmake.
* The author of the latest git commit, defined by cmake.
---
```cpp
#define GET_PROGRAM_NAME()
```
The program invocation name.
* The program invocation name.
---
```cpp
#define INPROG
```
Shorthand for marking item as in progress in devel_roadmap()
* Shorthand for marking item as in progress in devel_roadmap()
---
```cpp
#define TODO
```
Shorthand for marking item as todo in devel_roadmap()
* Shorthand for marking item as todo in devel_roadmap()
---
```cpp
#define HALTED
```
Shorthand for marking item as halted in devel_roadmap()
* Shorthand for marking item as halted in devel_roadmap()
---
```cpp
#define STATUS
```
Shorthand for the status in devel_roadmap()
* Shorthand for the status in devel_roadmap()
## Structures
@ -82,158 +102,186 @@ struct config_data {
std::string email = "";
};
```
The struct for the configuration
* The struct for the configuration
## Functions
```cpp
static int usage();
```
Returns: int exit_code - Always 1
* Returns: int exit_code - Always 1
Shows the usage of the program.
* Shows the usage of the program.
---
```cpp
static int show_help();
```
Returns: int exit_code - Always 0
* Returns: int exit_code - Always 0
Shows the help for the program when the user runs `ceev -h`.
* Shows the help for the program when the user runs `ceev -h`.
---
```cpp
static int buildinfo();
```
Returns: int exit_code - Always 0
* Returns: int exit_code - Always 0
Shows the build information when the user runs `ceev -B`.
* Shows the build information when the user runs `ceev -B`.
---
```cpp
bool replace(std::string& str, const std::string& from, const std::string& to);
```
Param: std::string& str - The input string to be modifyed
* Param: std::string& str - The input string to be modifyed
Param: const std::string& from - What to replace
* Param: const std::string& from - What to replace
Param: const std::string& to - What to replace with
* Param: const std::string& to - What to replace with
Returns: bool success - Whether it was successful or not.
* Returns: bool success - Whether it was successful or not.
Replaces `from` with `to` within the string.
* Replaces `from` with `to` within the string.
---
```cpp
static std::string query_author();
```
Returns: The string input in the function
* Returns: The string input in the function
Queries the user for a string to be used as the project author.
* Queries the user for a string to be used as the project author.
---
```cpp
struct config_data get_config(bool ignore_err = false)
```
Param: int ignore_err - Normally false
* Param: int ignore_err - Normally false
Returns: struct config_data
* Returns: struct config_data
Reads the config file and builds the config_data struct. Returns an empty struct
* Reads the config file and builds the config_data struct. Returns an empty struct
if it cannot open the file. ignore_err suppresses the error message, used for
`ceev devel sdl2 --use-defaults`.
---
```cpp
int create_fs(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Creates the default file system.
* Creates the default file system.
---
```cpp
int build_project(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Not yet implemented.
* Not yet implemented.
---
```cpp
int run_project(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Not properly implemented yet, but prints out the config data and runs the SDL2
* Not properly implemented yet, but prints out the config data and runs the SDL2
demo.
---
```cpp
int clean_project(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Not yet implemented
* Not yet implemented
---
```cpp
int devel(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
The subcommand `ceev devel`. Parses the inputs and runs supplementary functions.
* The subcommand `ceev devel`. Parses the inputs and runs supplementary functions.
---
```cpp
int devel_help();
```
Returns: int exit_code
* Returns: int exit_code
Shows the help page for `ceev devel`.
* Shows the help page for `ceev devel`.
---
```cpp
int devel_roadmap();
```
Returns: int exit_code
* Returns: int exit_code
Shows the current roadmap.
* Shows the current roadmap.
---
```cpp
int devel_sdl2(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Runs a small demo with SDL2. Running with the `--use-defaults` flag doesn't
* Runs a small demo with SDL2. Running with the `--use-defaults` flag doesn't
require you to use a config file.
---
```cpp
int devel_lang(std::deque<std::string> args);
```
Param: std::deque\<std::string\> args - The arguments from main(), with used
* Param: std::deque\<std::string\> args - The arguments from main(), with used
values stripped out.
Returns: int exit_code
* Returns: int exit_code
Not yet implemented
* Not yet implemented
---
```cpp
int main(int argc, char **argv);
```
Param: int argc - The number of arguments
* Param: int argc - The number of arguments
Param: char \*\*argv - An array of the arguments
* Param: char \*\*argv - An array of the arguments
Returns: int exit_code
* Returns: int exit_code
The entrypoint. Parses the arguments and puts them into a deque. It then runs
* The entrypoint. Parses the arguments and puts them into a deque. It then runs
the other functions based on what has been input in the arguments.