Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More isspace() callers. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
41acfe91eae4a425fa99d8d60b26e32d |
User & Date: | dgp 2011-04-28 16:02:09 |
Context
2011-04-29
| ||
01:05 | Fix issue with library stripping in install-sh check-in: b269db5d3e user: kevin_walzer tags: trunk | |
2011-04-28
| ||
16:02 | More isspace() callers. check-in: 41acfe91ea user: dgp tags: trunk | |
16:00 | More isspace() callers. check-in: 88095bbde0 user: dgp tags: core-8-5-branch | |
14:44 | New utility routines: TclIsSpaceProc() and TclCountSpaceRuns() Use to replace calls to isspace() and... check-in: ef10af814d user: dgp tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 8 9 10 11 12 | 2011-04-28 Don Porter <[email protected]> * generic/tclInt.h: New utility routines: * generic/tclParse.c: TclIsSpaceProc() and * generic/tclUtil.c: TclCountSpaceRuns() * generic/tclCmdMZ.c: Use new routines to replace calls to * generic/tclListObj.c: isspace() and their /* INTL */ risk. * generic/tclStrToD.c: * generic/tclStringObj.c: Improved reaction to out of memory. | > > < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 2011-04-28 Don Porter <[email protected]> * generic/tclInt.h: New utility routines: * generic/tclParse.c: TclIsSpaceProc() and * generic/tclUtil.c: TclCountSpaceRuns() * generic/tclCmdMZ.c: Use new routines to replace calls to * generic/tclListObj.c: isspace() and their /* INTL */ risk. * generic/tclStrToD.c: * generic/tclUtf.c: * unix/tclUnixFile.c: * generic/tclStringObj.c: Improved reaction to out of memory. 2011-04-27 Don Porter <[email protected]> * generic/tclCmdMZ.c: TclFreeIntRep() correction & cleanup. * generic/tclExecute.c: * generic/tclIndexObj.c: * generic/tclInt.h: * generic/tclListObj.c: |
︙ | ︙ |
Changes to generic/tclUtf.c.
︙ | ︙ | |||
1523 1524 1525 1526 1527 1528 1529 | /* * If the character is within the first 127 characters, just use the * standard C function, otherwise consult the Unicode table. */ if (ch < 0x80) { | | | 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 | /* * If the character is within the first 127 characters, just use the * standard C function, otherwise consult the Unicode table. */ if (ch < 0x80) { return TclIsSpaceProc((char)ch); } else { category = (GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK); return ((SPACE_BITS >> category) & 1); } } /* |
︙ | ︙ |
Changes to generic/tclUtil.c.
︙ | ︙ | |||
2726 2727 2728 2729 2730 2731 2732 | bytes = TclGetStringFromObj(objPtr, &length); /* * Leading whitespace is acceptable in an index. */ | | | | 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 | bytes = TclGetStringFromObj(objPtr, &length); /* * Leading whitespace is acceptable in an index. */ while (length && TclIsSpaceProc(*bytes)) { bytes++; length--; } if (TclParseNumber(NULL, NULL, NULL, bytes, length, (const char **)&opPtr, TCL_PARSE_INTEGER_ONLY | TCL_PARSE_NO_WHITESPACE) == TCL_OK) { int code, first, second; char savedOp = *opPtr; if ((savedOp != '+') && (savedOp != '-')) { goto parseError; } if (TclIsSpaceProc(opPtr[1])) { goto parseError; } *opPtr = '\0'; code = Tcl_GetInt(interp, bytes, &first); *opPtr = savedOp; if (code == TCL_ERROR) { goto parseError; |
︙ | ︙ | |||
2886 2887 2888 2889 2890 2891 2892 | offset = 0; } else if ((length > 4) && ((bytes[3] == '-') || (bytes[3] == '+'))) { /* * This is our limited string expression evaluator. Pass everything * after "end-" to Tcl_GetInt, then reverse for offset. */ | | | 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 | offset = 0; } else if ((length > 4) && ((bytes[3] == '-') || (bytes[3] == '+'))) { /* * This is our limited string expression evaluator. Pass everything * after "end-" to Tcl_GetInt, then reverse for offset. */ if (TclIsSpaceProc(bytes[4])) { goto badIndexFormat; } if (Tcl_GetInt(interp, bytes+4, &offset) != TCL_OK) { return TCL_ERROR; } if (bytes[3] == '-') { offset = -offset; |
︙ | ︙ | |||
2953 2954 2955 2956 2957 2958 2959 | register const char *p = value; /* * A frequent mistake is invalid octal values due to an unwanted leading * zero. Try to generate a meaningful error message. */ | | | | 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 | register const char *p = value; /* * A frequent mistake is invalid octal values due to an unwanted leading * zero. Try to generate a meaningful error message. */ while (TclIsSpaceProc(*p)) { p++; } if (*p == '+' || *p == '-') { p++; } if (*p == '0') { if ((p[1] == 'o') || p[1] == 'O') { p += 2; } while (isdigit(UCHAR(*p))) { /* INTL: digit. */ p++; } while (TclIsSpaceProc(*p)) { p++; } if (*p == '\0') { /* * Reached end of string. */ |
︙ | ︙ |
Changes to unix/tclUnixFile.c.
︙ | ︙ | |||
78 79 80 81 82 83 84 | /* * Search through all the directories named in the PATH variable to see if * argv[0] is in one of them. If so, use that file name. */ while (1) { | | | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /* * Search through all the directories named in the PATH variable to see if * argv[0] is in one of them. If so, use that file name. */ while (1) { while (TclIsSpaceProc(*p)) { p++; } name = p; while ((*p != ':') && (*p != 0)) { p++; } Tcl_DStringSetLength(&buffer, 0); |
︙ | ︙ |