-
Notifications
You must be signed in to change notification settings - Fork 5
My version of the program. #3
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi @Bibliocar-ng, thanks for taking an interest in this project. I haven't revisited it in a long time, but I will take a look at your changes. I will add a permissive license to this as well so you can use it as you please |
|
Wow, thank you! I'm having a lot of fun hacking at this! |
line.c
Outdated
| s->size = LINE_SIZE; | ||
| s->line = (char *)malloc(LINE_SIZE * sizeof(char)); | ||
| s->line[0] = '\0'; | ||
| void init_line(LINE *s){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the curly brace to its own line
| } // init_line | ||
|
|
||
| // Insert char into string. | ||
| void insert_char(LINE *s, char c, int index){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the curly brace to its own line
text.c
Outdated
| return EXIT_SUCCESS; | ||
| } // main | ||
|
|
||
| int in_range(int integer, int floor, int ceil){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this to 'clamp'
text.h
Outdated
| void move_right(PAGE *p, int *x, int *y); | ||
| void move_up(PAGE *p, int *x, int *y); | ||
| void move_down(PAGE *p, int *x, int *y); | ||
| int in_range(int, int, int); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the parameter names to the function signature
|
In addition to the above, could you squash these commits to a single commit? Please put the commit description in this format Other than that, the changes look good to me |
|
Thank you! Yes I can! I didn't put as much effort into it as I should have, I wasn't expecting a response! Now that I know there's a person on the other hand, I'll polish it up a bit! |
|
Hi @Bibliocar-ng sorry I think I lost track of this. I think your PR is good to go and I had no issue with the effort. It's just there were some minor details that would make the code style more in-line with the rest of the codebase. If you are still interested in working on this, feel free to update this PR with the above changes and this will be 100% good to go. If you need any assistance with updating the PR let me know |
|
Sorry. I've been occupied with a major move and haven't been able to work on it. I just got my laptop with this project on it unpacked and running. It's a fun little code base to work on, and I'll have my pull request spiff and polished in no time. |
I rewrote large parts of the code as a learning experience, but think that it has resulted in a much more complete editor. I would like to see your branch put under a permissive license, as right now it seems my project can't be used for anything.
Sorry about the whitespace changes, it's mostly a result of your editor.
Changes include: