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

Refactoring and cleanup #164

Merged
merged 3 commits into from
Oct 4, 2016
Merged

Refactoring and cleanup #164

merged 3 commits into from
Oct 4, 2016

Conversation

mptre
Copy link
Owner

@mptre mptre commented Oct 3, 2016

Changes to min_match, strcasechr and UTF-8 functions.

Copy link
Collaborator

@calleluks calleluks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to merge! Thanks for working on this.

I'm going to make a patch release since the 1.5.0 Arch Linux build is broken due to the error fixed in 60fb41e: https://aur.archlinux.org/packages/pick/

@@ -851,11 +848,11 @@ delete_between(char *string, size_t length, size_t start, size_t end)
int
isu8cont(unsigned char c)
{
return (c & (0x80 | 0x40)) == 0x80;
return MB_CUR_MAX > 1 && (c & (0x80 | 0x40)) == 0x80;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I didn't know about MB_CUR_MAX.

@mptre
Copy link
Owner Author

mptre commented Oct 4, 2016

Thanks, you probably want to release prior merging this?

@calleluks
Copy link
Collaborator

Sure, I'll release tonight and then I'll merge this.

- Remove space after tab

- Make loop-condition explicit

- Join conditionals
Removes the need to calculate the length twice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants