search for: isdigit

Displaying 20 results from an estimated 108 matches for "isdigit".

2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
...r[0]) || CurPtr[0] == '-' || CurPtr[0] == '$' || CurPtr[0] == '.' || CurPtr[0] == '_') ++CurPtr; llvmAsmlval.StrVal = new std::string(TokStart+1, CurPtr); // Skip @ return GLOBALVAR; } - + // Handle GlobalVarID: @[0-9]+ if (isdigit(CurPtr[0])) { - for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr); - + for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) + ; + uint64_t Val = atoull(TokStart+1, CurPtr); if ((unsigned)Val != Val) GenerateError("Invalid value number (too large)!"); llvmAsmlval.UI...
2007 Dec 15
4
[LLVMdev] fix warning with newer g++ compilers
...ok like it goes with the for. Thoughts? Index: lib/AsmParser/LLLexer.cpp =================================================================== --- lib/AsmParser/LLLexer.cpp (revision 45058) +++ lib/AsmParser/LLLexer.cpp (working copy) @@ -284,7 +284,7 @@ // Handle GlobalVarID: @[0-9]+ if (isdigit(CurPtr[0])) { - for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr); + for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) ; uint64_t Val = atoull(TokStart+1, CurPtr); if ((unsigned)Val != Val) @@ -335,7 +335,7 @@ // Handle LocalVarID: %[0-9]+ if (isdigit(CurPtr[0])) { - for (++Cur...
2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
On Dec 15, 2007, at 2:13 AM, Duncan Sands wrote: > Hi, > >> - for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr); >> + for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) ; > > personally I like > > for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) {} > > better since it is more explicit. I think the bikeshed should be orange: for (++CurPtr; isdigit(CurPtr[0]); ++CurPt...
2016 Aug 03
2
trunk check-all failing on Linux using compiler-rt and libcxx
...t \ -DLLVM_ENABLE_ASSERTIONS=true \ -DLLVM_ENABLE_LIBCXX=yes \ -DLLVM_ENABLE_LIBCXXABI=yes The check-all target is failing to compile the interception tests: /home/sdowney/bld/llvm-master/llvm/projects/compiler-rt/lib/interception/tests/interception_linux_test.cc:26:18: error: redefinition of 'isdigit' INTERCEPTOR(int, isdigit, int d) { ^ /usr/include/ctype.h:185:1: note: previous definition is here __isctype_f (digit) ^ /usr/include/ctype.h:93:3: note: expanded from macro '__isctype_f' is##type (int __c) __THROW \ ^ <scratch space>:835:1: note: expanded...
2007 Dec 15
0
[LLVMdev] fix warning with newer g++ compilers
Hi, > - for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr); > + for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) ; personally I like for (++CurPtr; isdigit(CurPtr[0]); ++CurPtr) {} better since it is more explicit. Ciao, Duncan.
2001 Sep 28
0
openssh-2.9.9p2 subscript violation problems with ctype macros
In several places, openssh-2.9.9p2 passes a 'char' value to a ctype macro like 'isdigit'. This has undefined behavior on hosts with signed characters, if the character value happens to be negative. For example, isdigit('\200') expands to an array access that is a subscript error on hosts with signed characters where '\200' == -128. This leads to incorrect results...
2000 Dec 11
2
Point in usernames / scp
...cessary to patch the source to make the "scp" command work with those usernames. Cheers Kai --- openssh-2.2.0p1/scp.c Wed Aug 30 01:11:30 2000 +++ withpoint/scp.c Mon Dec 11 02:06:35 2000 @@ -1042,7 +1042,7 @@ c = *cp; if (c & 0200) goto bad; - if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-') + if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-' && c != '.') goto bad; } while (*++cp); return (1);
2002 Aug 02
3
[Bug 377] New: Reduce compiler warnings. Use unsigned args to the ctype.h is*() macros.
...havior. log: * canohost.c (get_remote_hostname): Argument to macro isupper() should be unsigned. * clientloop.c (process_cmdlin): Argument to macro isspace() should be unsigned. * match.c (match_pattern_list): Argument to macro isupper() should be unsigned. * scp.c (sink): Argument to macro isdigit() should be unsigned. * sshconnect.c (ssh_login): Argument to macro isupper() should be unsigned. * openbsd-compat/inet_aton.c (inet_aton): Arguments to the isdigit(), isxdigit(), islower() and isspace() macros should be unsigned. * openbsd-compat/mktemp.c (_gettemp): The isdigit() macro arg...
2006 Oct 03
2
strverscmp, scandir, alphasort and versionsort
...*/ j1, j2, /* pointers to the beginning of the digit strings */ k1, k2; /* pointers to after the digit strings */ for (i = 0; s1[i] && s1[i] == s2[i]; i++); if (s1[i] == s2[i]) return 0; /* s1[i] != s2[i] */ /* s1[i] or s2[i] not in a digit string, normal cmp */ if ((!isdigit(s1[i]) && (i == 0 || !isdigit(s1[i-1]))) || (!isdigit(s2[i]) && (i == 0 || !isdigit(s2[i-1])))) return (s1[i] - s2[i]); /* find v1 */ for (j1 = i - 1; j1 >= 0 && isdigit(s1[j1]); j1--); j1++; /* j1 now points to first digit */ /* find leading zeros */ for (z1 =...
2008 May 27
2
[PATCH] Fixes bug which strips every other digit in klibc-utils dmesg output
...; } - while (buf[i] && i < len) - switch (buf[i]) { - case '<': - if (i == 0 || buf[i-1] == '\n') - i++; - case '0' ... '9': - if (i > 0 && buf[i-1] == '<') - i++; - case '>': - if (i > 0 && isdigit(buf[i-1])) - i++; - default: - putchar(buf[i++]); - } + while (buf[i] && i < len) { + if (i == 0 || buf[i-1] == '\n') + if (buf[i] == '<') + if (isdigit(buf[++i])) + if (buf[++i] == '>') + i++; + putchar(buf[i++]); + } if (buf[i-1]...
2013 May 14
5
tools/libxl: fix compilation and link errors on NetBSD
...tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index 35da71c..0c039b1 100644 --- a/tools/libxl/libxl_utils.c +++ b/tools/libxl/libxl_utils.c @@ -95,7 +95,7 @@ int libxl_domain_qualifier_to_domid(libxl_ctx *ctx, const char *name, { int i, rv; for (i=0; name[i]; i++) { - if (!isdigit(name[i])) { + if (!isdigit((unigned char)name[i])) { goto nondigit_found; } }
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...eaddir(d); di; di = readdir(d)) { + char *dname = d_name(di); + char *p = name; + char *q = dname; + STRUCT_STAT st; + /* are files version-stripped names identical? */ + while (*p && *q && *p==*q) { + if ((*p=='-'||*p=='.'||*p==';') && isdigit(p[1])) /* skip version part */ + do ++p; while (*p && (*p!='-' || isdigit(p[1])||p[1]=='t'||p[1]=='p'||p[1]=='r') && (*p!='.' || isdigit(p[1]))); + if ((*q=='-'||*q=='.'||*q==';') && isdigit(q[1]))...
2005 Apr 25
2
How about a --min-size option, next to --max-size
There's a rather old bug report in Debian's bug tracking system (see http://bugs.debian.org/27126) about wanting to be able to specify the maximum file size, as well as the minimum file size. Here's the text: Sometimes, it's useful to specify a file size range one is interested in. For example, I'd like to keep an up-to-date mirror of Debian, but I currently
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
2017 Nov 21
2
[PATCH REPOST 1/2] common/mlstdutils: Add return statement.
No change, just reposting without the "for discussion" tag. I think we should allow this as it seems like a nice coding style for a limited subset of imperative-style code. Rich.
2017 Nov 05
2
[PATCH 0/2] (mainly for discussion) Add ‘return’ statement.
When rewriting the heavily imperative original inspection code, I longed for a ‘return’ statement so I could keep the new code as close as possible to the original. OCaml of course does not have such a statement, but it's relatively simply to implement it in the language. The first patch does so, and the second patch rewrites a sample of the inspection code to use it. Rich.
2017 May 26
0
Wine release 2.9
...isplays black rectangles ---------------------------------------------------------------- Changes since 2.8: Akihiro Sagawa (15): oleaut32: Fix parse error when converting non-ascii string to VT_DATE. crypt32: Use isspaceW() instead of isspace() for WCHARs. midimap: Avoid using isdigit() for WCHARs. dbghelp: Avoid using isdigit() for WCHARs. ntdll: Avoid using isdigit() for WCHARs. secur32: Use isspaceW() instead of isspace() for WCHARs. shell32: Avoid using isspace() for WCHARs. shlwapi: Use isalnumW() instead of isalnum() for WCHARs. msstyles...
2000 Mar 09
1
Patch for scp (openssh 1.2.2p1)
...quot;Invalid user name". The following patch fixed that behaviour: diff -ru scp.c-save scp.c --- scp.c-save Thu Mar 9 12:21:43 2000 +++ scp.c Thu Mar 9 12:22:25 2000 @@ -1062,7 +1062,7 @@ c = *cp; if (c & 0200) goto bad; - if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-') + if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-' && c != '.') goto bad; } while (*++cp); return (1); Hope that this can be applied (so i don't h...
1998 Nov 24
0
2 small authentication problems
Hello, I've had those annoyances with the new beta: - in source/passdb/smbpass.c, you have : /* Get smb uid. */ p++; /* Go past ':' */ if (!isdigit(*p)) { DEBUG(0, ("getsmbfilepwent: malformed password entry (uid not number)\n")); continue; } I got stuck there by this entry : nobody:-2:XXX... The '-' made the test fail. I suggest to had a preliminary test, and deliver a warning message ( uid should be positive...
2016 Aug 29
2
[PATCH] Make "ssh" try different configuration filenames
..., host, host_arg, + &options, SSHCONF_CHECKPERM | SSHCONF_USERCONF | + (post_canon ? SSHCONF_POSTCANON : 0))) + break; + + /* Nothing to look at */ + if (!len) + break; + + /* Try a smaller fit; skip last digits, then non-digits. */ + len--; + while (len && isdigit(version_postfix[len-1])) + len--; + while (len && !isdigit(version_postfix[len-1])) + len--; + } /* Read systemwide configuration file after user config. */ (void)read_config_file(_PATH_HOST_CONFIG_FILE, pw, -- 2.9.3