Displaying 20 results from an estimated 63 matches for "isupper".
2012 Oct 08
1
Effect of the R framework on ctype.c
Dear all,
I'm facing a strange behavior in the the C code of a R package. This package, "rcqp", is a wrapper on an existing program that I did not write, "CWB".
In this package, on a linux (ubuntu and debian) system, the code :
printf(%d\n", isupper('A'));
outputs :
0
When compiled with the R framework (It behaves correctly when CWB is compiled as a standalone program).
On mac osx, the code produce the expected output.
This unexpected output is observed only in the context of CWB compiled through rcqp, only on linux (not mac osx)...
2002 Aug 02
3
[Bug 377] New: Reduce compiler warnings. Use unsigned args to the ctype.h is*() macros.
...arning: subscript has type `char'
Given the possibility of characters outside of the 0 thru 0x7f range
and the implementation of the is*() macros as using an index into an
array, negative arguments could lead to unexpected behavior.
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...
2001 Sep 28
0
openssh-2.9.9p2 subscript violation problems with ctype macros
...ing revision 2.9.9.2
retrieving revision 2.9.9.2.0.1
diff -pu -r2.9.9.2 -r2.9.9.2.0.1
--- canohost.c 2001/06/25 05:01:24 2.9.9.2
+++ canohost.c 2001/09/28 18:48:11 2.9.9.2.0.1
@@ -87,8 +87,8 @@ get_remote_hostname(int socket, int reve
* of this software).
*/
for (i = 0; name[i]; i++)
- if (isupper(name[i]))
- name[i] = tolower(name[i]);
+ if (isupper((unsigned char)name[i]))
+ name[i] = tolower((unsigned char)name[i]);
if (!reverse_mapping_check)
return xstrdup(name);
===================================================================
RCS file: match.c,v
retrieving revision 2.9.9...
2009 Jul 07
1
Non-standard conformant usage of ctype functions
...d the chance that the ctype functions return a wrong value is rather
tiny. Nevertheless, for the sake of correctness, and to avoid potential
problems in some later, locale-aware version of OpenSSH, I'd like to
propose to change all calls of ctype functions in OpenSSH from, for
instance:
if (isupper(c))
c = (char)tolower(c);
to:
if (isupper((u_char)c))
c = (char)tolower((u_char)c);
If that's ok with you, I'd create a matching patch.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
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
2011 Sep 23
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...these two structures
is the same, but is there something more that I could do? I'd also like to
use some kind of static assert instead of runtime assert.
I've also noticed that function LowercaseString (the same applies to
UppercaseString) doesn't work with UTF8 input. It's calling isupper and
tolower and these functions can't handle UTF8. This should get a new issue
probably?
On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com>
> wrote:
> > OK since t...
2011 Sep 27
3
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...structures is the same, but is there something more that I could do? I'd also like to use some kind of static assert instead of runtime assert.
>
> I've also noticed that function LowercaseString (the same applies to UppercaseString) doesn't work with UTF8 input. It's calling isupper and tolower and these functions can't handle UTF8. This should get a new issue probably?
>
> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> > OK si...
2011 Sep 29
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...es is the same, but is there something more that I could do? I'd also like to use some kind of static assert instead of runtime assert.
>>
>> I've also noticed that function LowercaseString (the same applies to UppercaseString) doesn't work with UTF8 input. It's calling isupper and tolower and these functions can't handle UTF8. This should get a new issue probably?
>>
>> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
>...
2011 Sep 20
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> OK since this approach makes sense I'll shoot with my questions :)
> 1. Where should get_utf8_argv go and is the name of this function OK? Right
> now the function is inside llvm::sys::fs namespace because I need access to
> Windows.h, should I leave it there.
I don't think it belongs
2017 Mar 21
4
Clang -O0 performs optimizations that undermine dynamic bug-finding tools
...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 can be indexed by values between -128 and
255. Thus, I expected that, when compiling with -O0, the calls above would
result in out-of-bounds accesses that...
2011 Sep 29
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...; is the same, but is there something more that I could do? I'd also like to
> use some kind of static assert instead of runtime assert.
>
> I've also noticed that function LowercaseString (the same applies to
> UppercaseString) doesn't work with UTF8 input. It's calling isupper and
> tolower and these functions can't handle UTF8. This should get a new issue
> probably?
>
> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
>
>> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com>
>&...
2011 Sep 30
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...e same, but is there something more that I could do? I'd also like to use some kind of static assert instead of runtime assert.
>>>
>>> I've also noticed that function LowercaseString (the same applies to UppercaseString) doesn't work with UTF8 input. It's calling isupper and tolower and these functions can't handle UTF8. This should get a new issue probably?
>>>
>>> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at gmail.com>...
2011 Sep 30
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...ut is there something more that I could do? I'd also like to
>> use some kind of static assert instead of runtime assert.
>>
>> I've also noticed that function LowercaseString (the same applies to
>> UppercaseString) doesn't work with UTF8 input. It's calling isupper and
>> tolower and these functions can't handle UTF8. This should get a new issue
>> probably?
>>
>> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
>>
>>> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizde...
2002 Sep 08
1
%L substitution...
...;, local_machine,l);
else {
char *ns = p;
string_sub(p,"%L", global_myname,l);
while (*ns)
{
if (isupper(*ns))
*ns = tolower(*ns);
ns++;
}
}
break;
Thanks
Glen Gibb
2003 Nov 24
1
[PATCH] fix off-by-one correction in ctypes
...}
__ctype_inline int ispunct(int __c)
{
- return __ctypes[__c+1] & __ctype_punct;
+ return __ctypes[__c] & __ctype_punct;
}
__ctype_inline int isspace(int __c)
{
- return __ctypes[__c+1] & __ctype_space;
+ return __ctypes[__c] & __ctype_space;
}
__ctype_inline int isupper(int __c)
{
- return __ctypes[__c+1] & __ctype_upper;
+ return __ctypes[__c] & __ctype_upper;
}
__ctype_inline int isxdigit(int __c)
{
- return __ctypes[__c+1] & __ctype_xdigit;
+ return __ctypes[__c] & __ctype_xdigit;
}
#define _toupper(__c) ((__c) & ~0x20)
2004 Jan 24
1
get rid of various warnings, errors in io.h
...ype
for `isprint'
/home/mesa/boot/klibc/klibc/include/ctype.h:85: warning: no previous prototype
for `ispunct'
/home/mesa/boot/klibc/klibc/include/ctype.h:90: warning: no previous prototype
for `isspace'
/home/mesa/boot/klibc/klibc/include/ctype.h:95: warning: no previous prototype
for `isupper'
/home/mesa/boot/klibc/klibc/include/ctype.h:100: warning: no previous prototype
for `isxdigit'
/home/mesa/boot/klibc/klibc/include/ctype.h:109: warning: no previous prototype
for `toupper'
/home/mesa/boot/klibc/klibc/include/ctype.h:114: warning: no previous prototype
for `tolower'...
2002 May 20
0
Openssh 3.2.2p1 KRB5 addition
...xstrdup(ntop);
+ }
+
+ /* Got host name. */
+ name[sizeof(name) - 1] = '\0';
+ /*
+ * Convert it to all lowercase (which is expected by the rest
+ * of this software).
+ */
+ for (i = 0; name[i]; i++)
+ if (isupper(name[i]))
+ name[i] = tolower(name[i]);
+
+ debug("Resolved local address %.100s to hostname %s", ntop,name);
+
+ return xstrdup(name);
+ }
+
+ /*
* Return the canonical name of the host at the other end of the socket. The
* caller should f...
2011 Oct 03
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...thing more that I could do? I'd also like to
>>> use some kind of static assert instead of runtime assert.
>>>
>>> I've also noticed that function LowercaseString (the same applies to
>>> UppercaseString) doesn't work with UTF8 input. It's calling isupper and
>>> tolower and these functions can't handle UTF8. This should get a new issue
>>> probably?
>>>
>>> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
>>>
>>>> On Tue, Sep 20, 2011 at 4:15 PM, Niko...
2011 Oct 03
5
[LLVMdev] [cfe-dev] Unicode path handling on Windows
...but is there something more that I could do? I'd also like to use some kind of static assert instead of runtime assert.
>>>>
>>>> I've also noticed that function LowercaseString (the same applies to UppercaseString) doesn't work with UTF8 input. It's calling isupper and tolower and these functions can't handle UTF8. This should get a new issue probably?
>>>>
>>>> On Wed, Sep 21, 2011 at 1:41 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>>> On Tue, Sep 20, 2011 at 4:15 PM, Nikola Smiljanic <popizdeh at...
2007 Nov 23
3
[LLVMdev] Getting rid of the DoesntAccessMemoryFns and OnlyReadsMemoryFns tables
...c 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 readnone readonly
iswdigit readnone readonly
iswgraph readnone readonly
iswlower readnone readonly
iswprint readnone readonly
iswpunct readnone readonly
iswspace r...