diff options
author | jozan <jozan@noemail.net> | 2020-11-12 18:28:47 +0000 |
---|---|---|
committer | jozan <jozan@noemail.net> | 2020-11-12 18:28:47 +0000 |
commit | ed993cd7c1d87215a93df5e262e4fba3ce57c442 (patch) | |
tree | bc142f62248c8f22ebe8b4f626c786bab2e45794 /src/u_utils.c | |
parent | In progress (diff) | |
download | unixize-ed993cd7c1d87215a93df5e262e4fba3ce57c442.tar.gz unixize-ed993cd7c1d87215a93df5e262e4fba3ce57c442.tar.bz2 unixize-ed993cd7c1d87215a93df5e262e4fba3ce57c442.tar.xz unixize-ed993cd7c1d87215a93df5e262e4fba3ce57c442.tar.zst unixize-ed993cd7c1d87215a93df5e262e4fba3ce57c442.zip |
In progress
FossilOrigin-Name: 67a34a272b1dbb5370844efe2378b87c51c0e56c856cf7554993367bab6bfa47
Diffstat (limited to 'src/u_utils.c')
-rw-r--r-- | src/u_utils.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/u_utils.c b/src/u_utils.c index c5dc869..88f768c 100644 --- a/src/u_utils.c +++ b/src/u_utils.c @@ -114,6 +114,11 @@ u_get_extra_args(char args[], struct opts_s* opts) null_char += 2; i++; } + if (opts->preserve == TRUE) { + memcpy((char*)args + (i * 2), "k:", 3 * sizeof(char)); + null_char += 2; + i++; + } if (opts->hyphen == TRUE) { memcpy((char*)args + (i * 2), "n:", 3 * sizeof(char)); null_char += 2; @@ -237,7 +242,7 @@ u_decrease_subpath(char subp[]) bool_t u_ischarset -(int c, +(const int c, const char cs[]) { char *p; @@ -251,3 +256,20 @@ u_ischarset } return (FALSE); } + +bool_t +u_isucharset +(const unsigned char c, + const unsigned char cs[]) +{ + char *p; + + p = (char*)cs; + while (*p != 0x00 && *p != c) { + p++; + } + if (*p != 0x00) { + return (TRUE); + } + return (FALSE); +} |