search for: iscntrl

Displaying 20 results from an estimated 26 matches for "iscntrl".

Did you mean: iswcntrl
2014 Sep 27
2
[PATCH 1/2] Implement realpath()
....o chmod.o chown.o dup2.o mknod.o poll.o rename.o stat.o \ lchown.o link.o rmdir.o unlink.o utimes.o lstat.o mkdir.o \ - readlink.o select.o symlink.o pipe.o \ + readlink.o realpath.o select.o symlink.o pipe.o \ ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ --- /dev/null +++ b/usr/klibc/realpath.c @@ -0,0 +1,147 @@ +#include <errno.h> +#include <limits.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <unistd.h> + +static char *__realpath(con...
2017 Mar 21
4
Clang -O0 performs optimizations that undermine dynamic bug-finding tools
...t Clang printed a warning and then optimized the invalid access away (which is legit since it is UB). However, note that that cases exist where no warning is printed. For example, consider the following program: #include <ctype.h> int main() { isalnum(1000000); isalpha(1000000); iscntrl(1000000); isdigit(1000000); isgraph(1000000); islower(1000000); isprint(1000000); ispunct(1000000); isspace(1000000); isupper(1000000); isxdigit(1000000); } The glibc (on my system) implements the macros by calling __ctype_b_loc() which returns a lookup array that c...
2003 Nov 24
1
[PATCH] fix off-by-one correction in ctypes
...return __ctypes[__c+1] & + return __ctypes[__c] & (__ctype_upper|__ctype_lower|__ctype_digit); } __ctype_inline int isalpha(int __c) { - return __ctypes[__c+1] & + return __ctypes[__c] & (__ctype_upper|__ctype_lower); } @@ -57,48 +57,48 @@ __ctype_inline int iscntrl(int __c) { - return (__c >= 0) && !(__ctypes[__c+1] & __ctype_print); + return (__c >= 0) && !(__ctypes[__c] & __ctype_print); } __ctype_inline int isdigit(int __c) { - return __ctypes[__c+1] & __ctype_digit; + return __ctypes[__c] & __ctype_digit; }...
2014 Sep 29
0
[PATCH v2 1/2] Implement realpath()
....o chmod.o chown.o dup2.o mknod.o poll.o rename.o stat.o \ lchown.o link.o rmdir.o unlink.o utimes.o lstat.o mkdir.o \ - readlink.o select.o symlink.o pipe.o \ + readlink.o realpath.o select.o symlink.o pipe.o \ ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ --- /dev/null +++ b/usr/klibc/realpath.c @@ -0,0 +1,45 @@ +#include <fcntl.h> +#include <limits.h> +#include <stdlib.h> +#include <sys/types.h> +#include <unistd.h> + +/* + * Note that this requi...
2004 Jan 24
1
get rid of various warnings, errors in io.h
...ype for `isalpha' /home/mesa/boot/klibc/klibc/include/ctype.h:49: warning: no previous prototype for `isascii' /home/mesa/boot/klibc/klibc/include/ctype.h:54: warning: no previous prototype for `isblank' /home/mesa/boot/klibc/klibc/include/ctype.h:59: warning: no previous prototype for `iscntrl' /home/mesa/boot/klibc/klibc/include/ctype.h:64: warning: no previous prototype for `isdigit' /home/mesa/boot/klibc/klibc/include/ctype.h:69: warning: no previous prototype for `isgraph' /home/mesa/boot/klibc/klibc/include/ctype.h:75: warning: no previous prototype for `islower' /ho...
2016 Jan 06
0
[klibc:master] Implement realpath()
....o chmod.o chown.o dup2.o mknod.o poll.o rename.o stat.o \ lchown.o link.o rmdir.o unlink.o utimes.o lstat.o mkdir.o \ - readlink.o select.o symlink.o pipe.o \ + readlink.o realpath.o select.o symlink.o pipe.o \ ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ diff --git a/usr/klibc/realpath.c b/usr/klibc/realpath.c new file mode 100644 index 0000000..1474b1e --- /dev/null +++ b/usr/klibc/realpath.c @@ -0,0 +1,49 @@ +#include <fcntl.h> +#include <limits.h> +#include &lt...
2007 Nov 23
3
[LLVMdev] Getting rid of the DoesntAccessMemoryFns and OnlyReadsMemoryFns tables
...the following differences (using -ffast-math, otherwise gcc says that a bunch of math ones are readonly because they depend on the floating point mode; I think gcc is correct to say this): function LLVM says gcc says -------- --------- -------- isalnum readnone readonly isalpha readnone readonly iscntrl readnone readonly isgraph readnone readonly islower readnone readonly isprint readnone readonly ispunct readnone readonly isspace readnone readonly isupper readnone readonly tolower readnone readonly toupper readnone readonly iswalnum readnone readonly iswalpha readnone readonly iswcntrl r...
2007 Sep 03
2
[git patch] minor fixes
...revious prototype for 'isalpha' usr/klibc/../include/ctype.h:127: warning: no previous prototype for 'isascii' usr/klibc/../include/ctype.h:128: warning: no previous prototype for 'isblank' usr/klibc/../include/ctype.h:129: warning: no previous prototype for 'iscntrl' usr/klibc/../include/ctype.h:130: warning: no previous prototype for 'isdigit' usr/klibc/../include/ctype.h:131: warning: no previous prototype for 'isgraph' usr/klibc/../include/ctype.h:132: warning: no previous prototype for 'islower' usr/klibc/../incl...
1999 Jan 04
0
Tripwire mess..
...hey might be interested in following detail: Chuck Campbell (campbell@neosoft.com) pointed me out that tripwire dies with coredump on R.H. linux, if it hits a filename containing 128-255 characters. Playing a bit with debugger I found out that the problem sits around the line 417: else if (iscntrl(*pcin)) { *pcout++ = '\\'; *pcout++ = *(pccopy = octal_array[(int)(*pcin)]); *pcout++ = *++pccopy; *pcout++ = *++pccopy; } iscntrl here would return 'true' not only for [0-31] arg, but also for [128-255]. It cause two problems...
2007 Aug 15
0
[git patch] fstype support + minor stuff
...ort.o bsearch.o \ - lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \ - inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \ - inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o \ - send.o recv.o \ - ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ - ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ - ctype/isgraph.o ctype/islower.o ctype/isprint.o \ - ctype/ispunct.o ctype/isspace.o ctype/isupper.o \ - ctype/isxdigit.o ctype/tolower.o ctype/toupper.o \ - userdb/getgrgid.o userdb/getgrnam.o userdb/getpwnam.o \ - userdb/getpwuid.o userdb/root_group.o userdb/root_us...
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and 'mount -o defaults' to work. The first two patches were previously submitted but not applied. Ben. Ben Hutchings (3): Implement realpath() readlink: Add -f option mount: Implement -o defaults usr/include/stdlib.h | 2 ++ usr/klibc/Kbuild | 2 +- usr/klibc/realpath.c | 49
2000 Jan 06
1
bsd-snprintf.c and NeXT.
I'm wonder if anyone happens to have a simplier (slower) version of bsd-snprintf.c. It seems NeXT 3.3 (unsure about 4.2) is missing mprotect(). If I could get something to replace that for a while and fix some of theses utmp in login.c issues I may have a rough port NeXT to black hardware.=) Thanks
1999 Dec 10
0
snprintf from postgresql
...0); while (padlen < 0) { dopr_outch(' '); ++padlen; } } static void dostr(char *str, int cut) { if (cut) { while (*str && cut-- > 0) dopr_outch(*str++); } else { while (*str) dopr_outch(*str++); } } static void dopr_outch(int c) { #ifdef NOT_USED if (iscntrl(c) && c != '\n' && c != '\t') { c = '@' + (c & 0x1F); if (end == 0 || output < end) *output++ = '^'; } #endif if (end == 0 || output < end) *output++ = c; else SnprfOverflow++; }
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...inet/bindresvport.o \ send.o recv.o \ + access.o chmod.o chown.o dup2.o mknod.o poll.o rename.o stat.o \ + lchown.o link.o rmdir.o unlink.o utimes.o lstat.o mkdir.o \ + readlink.o select.o symlink.o open64.o \ ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 4630d14..c2f36e7 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -106,31 +106,31 @@ int swapoff(const char *); /* * Inode-related syste...
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...o inet/bindresvport.o \ send.o recv.o \ + access.o chmod.o chown.o dup2.o mknod.o poll.o rename.o stat.o \ + lchown.o link.o rmdir.o unlink.o utimes.o lstat.o mkdir.o \ + readlink.o select.o symlink.o pipe.o \ ctype/isalnum.o ctype/isalpha.o ctype/isascii.o \ ctype/isblank.o ctype/iscntrl.o ctype/isdigit.o \ ctype/isgraph.o ctype/islower.o ctype/isprint.o \ diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 55d8e36..12f57ac 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -106,34 +106,34 @@ int swapoff(const char *); /* * Inode-related syste...
2009 Aug 03
1
use gnulib, and begin to pass its "make syntax-check" tests
...$$($(VC_LIST_EXCEPT) \ + | grep -E '\.[ch](\.in)?$$' \ + | grep -v '^gnulib/') && \ + { echo '$(ME): found TAB(s) used for indentation in C sources;'\ + 'use spaces' 1>&2; exit 1; } || : + +ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\ +|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper + +sc_avoid_ctype_macros: + @grep -E '\b($(ctype_re)) *\(' /dev/null \ + $$($(VC_LIST_EXCEPT)) && \ + { echo "$(ME): don't use ctype macros (use c-ctype.h)" \ + 1>&...
2010 Aug 09
8
Call for testing: OpenSSH-5.6
Hi, OpenSSH 5.6 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This is a moderately large release, with a number of new features and bug fixes. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH
2013 Nov 11
5
[PATCH V2 0/3] Introduce arm64 support
Hello, Here is V2 of the arm64 support for klibc patch set. Notable changes since the original series: * fp regs dropped from setjmp/longjmp * chmod, lstat and stat re-implemented with *at functions. * open64 merged into open. As with the original, this series is to be applied against the latest klibc, just after 25a66fa README.klibc: update build information V2 has been tested on x86_64
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello, This series introduces arm64 support to klibc. I've rebased the work from Neil Williams and Anil Singhar into the following three patches. Most of the code changes are due to new syscall implementations being needed for arm64 as a only a minimal set of syscalls are defined in the arm64 kernel. This series is to be applied against the latest klibc, just after 25a66fa README.klibc:
2003 Oct 08
4
OS/390 openssh
...r)c >> 3 & 07) + '0'; @@ -118,16 +122,20 @@ } if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; - if (c & 0200) { + if (ASC(c) & 0200) { +#ifdef CHARSET_EBCDIC + c = CHR(ASC(c) & 0177); +#else c &= 0177; +#endif *dst++ = 'M'; } if (iscntrl(c)) { *dst++ = '^'; - if (c == 0177) + if (ASC(c) == 0177) *dst++ = '?'; else - *dst++ = c + '@'; + *dst++ = CHR(ASC(c) + ASC('@')); } else { *dst++ = '-'; *dst++ = c; diff -bur openssh-3.7.1p2.orig/packet.c openssh-3.7.1p2/packet.c --...