summaryrefslogtreecommitdiffstats
path: root/Python/pystrcmp.c
blob: f9c2277cb56dc7096c4d8ac460879d6b0d0909c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Cross platform case insensitive string compare functions
 */

#include "Python.h"

int
PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size)
{
    if (size == 0)
        return 0;
    while ((--size > 0) &&
           (tolower((unsigned)*s1) == tolower((unsigned)*s2))) {
        if (!*s1++ || !*s2++)
            break;
    }
    return tolower((unsigned)*s1) - tolower((unsigned)*s2);
}

int
PyOS_mystricmp(const char *s1, const char *s2)
{
    while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) {
        ;
    }
    return (tolower((unsigned)*s1) - tolower((unsigned)*s2));
}
> Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadTest.c
Commit message (Expand)AuthorAgeFilesLines
* test Tcl_GetErrorLine() forwards/backwards compatibility in pkgb.so as well. jan.nijtmans2013-01-021-1/+0
|\
| * test Tcl_GetErrorLine() forwards/backwards compatibility in pkgb.so as well. jan.nijtmans2013-01-021-9/+8
| |\
| | * Don't free ctrl.script if thread creation fails: it is a constant string "tes...jan.nijtmans2013-01-021-1/+0
* | | For [testthread cancel], avoid creating a new Tcl_Obj when the default script...Joe Mistachkin2011-11-181-1/+2
* | | Revise the thread exit handling of the [testthread] command so that itdgp2011-09-211-3/+9
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-9/+9
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ /
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | * Fix [Bug 1562528]dkf2006-09-221-2/+2
| | * * tests/compile.test (compile-12.4): Backport test for Bug 1001997.dgp2004-10-261-2/+2
* | | fix gcc 64-bit warnings: cast from pointer to integer of different sizenijtmans2010-12-011-11/+11
* | | #undef STATIC_BUILD in tclWin(Dde|Reg).c, in order to makenijtmans2009-11-231-37/+31
* | | * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]Kevin B Kenny2009-11-231-2/+2
* | | [Bug 2901803]: Fix silly error.dkf2009-11-231-14/+16
* | | Fix [Bug 2883850]: pkgIndex.tcl doesn'tnijtmans2009-11-181-5/+11
* | | - eliminate some unnessary type castsnijtmans2009-02-101-10/+9
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ...dkf2009-01-091-49/+44
* | | eliminate -Wwrite-strings warnings in enable-threads build.nijtmans2008-12-161-6/+6
* | | Convert Tcl_SetResult(......, TCL_DYNAMIC) tonijtmans2008-11-191-2/+3
* | | Add "const" to many internalnijtmans2008-10-161-3/+3
* | | fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-2/+2
* | | TIP 285 ImplementationJoe Mistachkin2008-06-131-9/+160
|/ /
* | Fix [Bug 1562528]dkf2006-09-221-29/+29
* | ANSIfy the test code (well, strip some of the worst offences!)dkf2005-11-021-274/+292
* | TIP#237 IMPLEMENTATIONdgp2005-10-081-1/+3
* | * generic/tclIO.c: Moved Tcl_{Cut,Splice}Channel toandreas_kupries2005-08-261-1/+7
* | TIP#219 IMPLEMENTATIONandreas_kupries2005-08-241-1/+7
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
* | * generic/tclCompile.h: Move the TclInterpReady() declaration fromdgp2005-03-251-4/+1
* | * generic/tclThreadTest.c (ThreadEventProc): Corrected subtledgp2004-10-201-2/+2
|/
* * Sought out and eliminated instances of CONST-casting that are nodgp2002-01-261-4/+4
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-4/+4
* * generic/tclThreadTest.c:das2002-01-181-2/+2
* correct static-ness of function declshobbs2001-12-291-5/+5
* ** upport to 8.4 of mac code changes for 8.3.3 & various newdas2001-11-231-5/+5
* * generic/tclThreadTest.c (Tcl_ThreadObjCmd): cast fixeshobbs2001-03-311-3/+3
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-021-13/+76
* Added Tcl_CreateThreadType and TCL_RETURN_THREAD_TYPEwelch2000-04-171-14/+5
* 2000-04-08 Andreas Kupries <a.kupries@westend.com>kupries2000-04-09