Skip to content

Commit

Permalink
update c readme
Browse files Browse the repository at this point in the history
  • Loading branch information
omdxp committed Apr 1, 2024
1 parent 713e9db commit e5276d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Algeria's college hierarchy dataset as a C library
- [CMake](https://cmake.org/download/) build system (minimum required version 3.19)
- [Conan](https://conan.io/downloads) package manager
- [Clang](https://clang.llvm.org/get_started.html) or [GCC](https://gcc.gnu.org/releases.html) compiler (on macOS clang comes with the developer tools)
- [Doxygen](https://www.doxygen.nl/download.html) docs generator
- Any IDE out there, preferably [VSCode](https://code.visualstudio.com/download) with the following extensions:
- [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
- [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
Expand All @@ -24,6 +25,11 @@ Algeria's college hierarchy dataset as a C library

https://github.com/dzcode-io/kuliya/assets/48713070/3f693a1c-050d-4ee2-bfce-9ade59e772ed

- To build docs locally:
```sh
cd c && doxygen
```

# Usage

```c
Expand Down
2 changes: 1 addition & 1 deletion c/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void prepend_to_data_file()
fprintf(data_file, "#ifndef DATA_H\n#define DATA_H\n");
fprintf(data_file, "\n#include <stdlib.h>\n#include <string.h>\n");
fprintf(data_file, "\n#define STR_EQ(str1, str2) (strcmp(str1, str2) == 0)\n");
fprintf(data_file, "\n/**\n * Node type.\n */\ntypedef enum\n{\n\t/** University. */\n\t\n\tUNIVERSITY,\n\t/** Academy. */\n\tACADEMY,\n\t/** Private school. */\n\tPRIVATE_SCHOOL,\n\t/** Institute */\n\tINSTITUTE,\n\t/** Faculty */\n\tFACULTY,\n\t/** Department */\n\tDEPARTMENT,\n\t/** Specialty. */\n\tSPECIALTY,\n\t/** Sector. */\n\tSECTOR\n} node_type;\n");
fprintf(data_file, "\n/**\n * Node type.\n */\ntypedef enum\n{\n\t/** University. */\n\tUNIVERSITY,\n\t/** Academy. */\n\tACADEMY,\n\t/** Private school. */\n\tPRIVATE_SCHOOL,\n\t/** Institute */\n\tINSTITUTE,\n\t/** Faculty */\n\tFACULTY,\n\t/** Department */\n\tDEPARTMENT,\n\t/** Specialty. */\n\tSPECIALTY,\n\t/** Sector. */\n\tSECTOR\n} node_type;\n");
fprintf(data_file, "\n/**\n * Kuliya names in Arabic, English and French.\n */\ntypedef struct\n{\n\t/** Arabic name. */\n\tconst char *ar;\n\t/** English name. */\n\tconst char *en;\n\t/** French name. */\n\tconst char *fr;\n} kuliya_name;\n");
fprintf(data_file, "\n/**\n * Kuliya terms.\n */\ntypedef struct\n{\n\t/** Slots per year. */\n\tint per_year;\n\t/** Slots. */\n\tint *slots;\n\t/** Number of slots. */\n\tsize_t number_of_slots;\n} kuliya_terms;\n");
fprintf(data_file, "\n/**\n * Kuliya schema.\n */\ntypedef struct\n{\n\t/** Name. */\n\tkuliya_name name;\n\t/** Node type. */\n\tnode_type type;\n\t/** Terms. */\n\tkuliya_terms *terms;\n} kuliya_schema;\n\n");
Expand Down
1 change: 0 additions & 1 deletion c/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
typedef enum
{
/** University. */

UNIVERSITY,
/** Academy. */
ACADEMY,
Expand Down

0 comments on commit e5276d0

Please sign in to comment.