-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix build warnings #58
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8f522ad
Add missing files to `make clean`
petercolberg 71230a0
Fix installation of shared library symlinks
petercolberg 548497a
Move common test functions to separate module
petercolberg 6acc41d
Fix implicit function declarations
petercolberg 14b5779
Fix missing static declarations for internal functions
petercolberg 4b16193
Fix sscanf argument type for format %x
petercolberg ca3ceff
Test `make clean`
petercolberg a930086
Test `make install`
petercolberg b10b64d
Fix deprecated warnings with Julia 0.4
petercolberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include/ | ||
include/utf8proc.h | ||
lib/ | ||
lib/libutf8proc.a | ||
lib/libutf8proc.so -> libutf8proc.so.1.3.0 | ||
lib/libutf8proc.so.1 -> libutf8proc.so.1.3.0 | ||
lib/libutf8proc.so.1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* Common functions for our test programs. */ | ||
|
||
#include "tests.h" | ||
|
||
size_t lineno = 0; | ||
|
||
void check(int cond, const char *format, ...) | ||
{ | ||
if (!cond) { | ||
va_list args; | ||
fprintf(stderr, "line %zd: ", lineno); | ||
va_start(args, format); | ||
vfprintf(stderr, format, args); | ||
va_end(args); | ||
fprintf(stderr, "\n"); | ||
exit(1); | ||
} | ||
} | ||
|
||
size_t skipspaces(const char *buf, size_t i) | ||
{ | ||
while (isspace(buf[i])) ++i; | ||
return i; | ||
} | ||
|
||
/* if buf points to a sequence of codepoints encoded as hexadecimal strings, | ||
separated by whitespace, and terminated by any character not in | ||
[0-9a-fA-F] or whitespace, then stores the corresponding utf8 string | ||
in dest, returning the number of bytes read from buf */ | ||
size_t encode(char *dest, const char *buf) | ||
{ | ||
size_t i = 0, j, d = 0; | ||
for (;;) { | ||
int c; | ||
i = skipspaces(buf, i); | ||
for (j=i; buf[j] && strchr("0123456789abcdef", tolower(buf[j])); ++j) | ||
; /* find end of hex input */ | ||
if (j == i) { /* no codepoint found */ | ||
dest[d] = 0; /* NUL-terminate destination string */ | ||
return i + 1; | ||
} | ||
check(sscanf(buf + i, "%x", (unsigned int *)&c) == 1, "invalid hex input %s", buf+i); | ||
i = j; /* skip to char after hex input */ | ||
d += utf8proc_encode_char(c, (utf8proc_uint8_t *) (dest + d)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would be nice to add a comment for why this is needed.
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.
Done.