Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve code structure #3

Open
pyperanger opened this issue Jan 22, 2020 · 6 comments
Open

Improve code structure #3

pyperanger opened this issue Jan 22, 2020 · 6 comments
Assignees
Labels
doing enhancement New feature or request

Comments

@pyperanger
Copy link
Owner

No description provided.

@pyperanger pyperanger added the enhancement New feature or request label Jan 22, 2020
@pyperanger pyperanger self-assigned this Jan 22, 2020
@growlnx
Copy link
Collaborator

growlnx commented Jan 23, 2020

What do you think of this structure?
For me, this can be good for maintaining the organization of the code in the project.

+ 
| - README.md
| - Makefile
| - configure
| + src 
| | + header - a separate folder for the headers.
| | | - fuptcha.h
| | | - util.h
| | | - cli.h
| | - main.c - the main function resides here.
| | - fuptcha.c  - the fuptcha functions implementation.
| | - util.c - utilitary things like die, help_msg, sorting ... 
| | - cli.c - comand line interface parser implementation.

For the coding style, we can use the Mozilla style clang format as the default.

@pyperanger
Copy link
Owner Author

pyperanger commented Jan 23, 2020

We already decide to use Mozilla style for this project.
About code organization issue, we'll review the code and try improve the files tree

@growlnx
Copy link
Collaborator

growlnx commented Feb 10, 2020

Pass "EXIT_STATUS_CODE" as arg can make die macro more flexible.

#define die(STR) \

@growlnx
Copy link
Collaborator

growlnx commented Feb 10, 2020

Coding standards

For functions and vars, will we use the camel case or snake case?

A prefix to simulate a "namespace", such as glib. Example:

int
fup_img_init(struct WORD* w) 
{ ... }
int
fupImgInit(struct WORD* w) 
{ ... }

In structs, the first character always being uppercase?

pyperanger added a commit that referenced this issue Feb 10, 2020
@pyperanger
Copy link
Owner Author

pyperanger commented Feb 10, 2020

snake case

pyperanger added a commit that referenced this issue Feb 10, 2020
@pyperanger
Copy link
Owner Author

pyperanger commented Mar 18, 2020

Python Extension

Some piece of the code will change in python extension development process. We set this branch as main developer priority.

Bugs, good practices, vulnerabilities will be commit in the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doing enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants