From fb48f14fb28f2dd0b1633560091087d54f10dc1e Mon Sep 17 00:00:00 2001 From: das Date: Wed, 19 Feb 2003 16:43:25 +0000 Subject: * generic/tclStringObj.c: restored Tcl_SetObjLength() side-effect of always invalidating unicode rep (if the obj has a string rep). Added hasUnicode flag to String struct, allows decoupling of validity of unicode rep from buffer size allocated to it (improves memory allocation efficiency). [Bugs #686782, #671138, #635200] * macosx/Tcl.pbproj/project.pbxproj: * macosx/Makefile: reworked embedded build to no longer require relinking but to use install_name_tool instead to change the install_names for embedded frameworks. * macosx/Tcl.pbproj/project.pbxproj: preserve mod dates when running 'make install' to build framework (avoids bogus rebuilds of dependent frameworks because tcl headers appear changed). * tests/ioCmd.test (iocmd-1.8): fix failure when system encoding is utf-8: use iso8859-1 encoding explicitly. --- ChangeLog | 20 +++++ generic/tclStringObj.c | 112 +++++++++++--------------- macosx/Makefile | 8 +- macosx/Tcl.pbproj/project.pbxproj | 163 ++++++++++++++++++++++++++++++++++++-- tests/ioCmd.test | 4 +- 5 files changed, 227 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index f881ab4..71f8d45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2003-02-19 Daniel Steffen + + * generic/tclStringObj.c: restored Tcl_SetObjLength() side-effect + of always invalidating unicode rep (if the obj has a string rep). + Added hasUnicode flag to String struct, allows decoupling of + validity of unicode rep from buffer size allocated to it (improves + memory allocation efficiency). [Bugs #686782, #671138, #635200] + + * macosx/Tcl.pbproj/project.pbxproj: + * macosx/Makefile: reworked embedded build to no longer require + relinking but to use install_name_tool instead to change the + install_names for embedded frameworks. + + * macosx/Tcl.pbproj/project.pbxproj: preserve mod dates when + running 'make install' to build framework (avoids bogus rebuilds + of dependent frameworks because tcl headers appear changed). + + * tests/ioCmd.test (iocmd-1.8): fix failure when system encoding + is utf-8: use iso8859-1 encoding explicitly. + 2003-02-18 Miguel Sofer * generic/tclCompile.c (TclCompileExprWords): remove unused diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 1fb7bcd..5925451 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.31 2003/02/19 14:33:42 msofer Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.32 2003/02/19 16:43:28 das Exp $ */ #include "tclInt.h" @@ -95,8 +95,9 @@ typedef struct String { * the termination char). */ size_t uallocated; /* The amount of space actually allocated * for the Unicode string (minus 2 bytes for - * the termination char). 0 means the - * Unicode string rep is invalid. */ + * the termination char). */ + int hasUnicode; /* Boolean determining whether the string + * has a Unicode representation. */ Tcl_UniChar unicode[2]; /* The array of Unicode chars. The actual * size of this field depends on the * 'uallocated' field above. */ @@ -337,6 +338,7 @@ Tcl_NewUnicodeObj(unicode, numChars) stringPtr = (String *) ckalloc(STRING_SIZE(uallocated)); stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; + stringPtr->hasUnicode = (numChars > 0); stringPtr->allocated = 0; memcpy((VOID *) stringPtr->unicode, (VOID *) unicode, uallocated); stringPtr->unicode[numChars] = 0; @@ -401,7 +403,7 @@ Tcl_GetCharLength(objPtr) * unicode string. */ - stringPtr->uallocated = 0; + stringPtr->hasUnicode = 0; } else { @@ -469,7 +471,7 @@ Tcl_GetUniChar(objPtr, index) stringPtr = GET_STRING(objPtr); } - if (stringPtr->uallocated == 0) { + if (stringPtr->hasUnicode == 0) { /* * All of the characters in the Utf string are 1 byte chars, @@ -512,7 +514,7 @@ Tcl_GetUnicode(objPtr) SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if ((stringPtr->numChars == -1) || (stringPtr->uallocated == 0)) { + if ((stringPtr->numChars == -1) || (stringPtr->hasUnicode == 0)) { /* * We haven't yet calculated the length, or all of the characters @@ -565,7 +567,7 @@ Tcl_GetUnicodeFromObj(objPtr, lengthPtr) SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if ((stringPtr->numChars == -1) || (stringPtr->uallocated == 0)) { + if ((stringPtr->numChars == -1) || (stringPtr->hasUnicode == 0)) { /* * We haven't yet calculated the length, or all of the characters @@ -768,8 +770,9 @@ Tcl_SetObjLength(objPtr, length) /* Check that we're not extending a pure unicode string */ if (length > (int) stringPtr->allocated && - (objPtr->bytes != NULL || stringPtr->uallocated == 0)) { + (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { char *new; + /* * Not enough space in current string. Reallocate the string * space and free the old string. @@ -788,7 +791,7 @@ Tcl_SetObjLength(objPtr, length) objPtr->bytes = new; stringPtr->allocated = length; /* Invalidate the unicode data. */ - stringPtr->uallocated = 0; + stringPtr->hasUnicode = 0; } if (objPtr->bytes != NULL) { @@ -797,24 +800,9 @@ Tcl_SetObjLength(objPtr, length) /* Ensure the string is NULL-terminated */ objPtr->bytes[length] = 0; } - if (stringPtr->uallocated > 0) { - /* Shortening a string with unicode representation */ - int numChars = Tcl_NumUtfChars(objPtr->bytes, -1); - size_t uallocated = STRING_UALLOC(numChars); - if (uallocated > stringPtr->uallocated) { - /* Invalidate the unicode data. */ - stringPtr->numChars = -1; - stringPtr->uallocated = 0; - } else { - stringPtr->numChars = numChars; - stringPtr->uallocated = uallocated; - /* Ensure the string is NULL-terminated */ - stringPtr->unicode[numChars] = 0; - } - } else { - /* Invalidate the unicode data. */ - stringPtr->numChars = -1; - } + /* Invalidate the unicode data. */ + stringPtr->numChars = -1; + stringPtr->hasUnicode = 0; } else { /* Changing length of pure unicode string */ size_t uallocated = STRING_UALLOC(length); @@ -825,6 +813,7 @@ Tcl_SetObjLength(objPtr, length) stringPtr->uallocated = uallocated; } stringPtr->numChars = length; + stringPtr->hasUnicode = (length > 0); /* Ensure the string is NULL-terminated */ stringPtr->unicode[length] = 0; stringPtr->allocated = 0; @@ -876,20 +865,20 @@ Tcl_AttemptSetObjLength(objPtr, length) /* Check that we're not extending a pure unicode string */ if (length > (int) stringPtr->allocated && - (objPtr->bytes != NULL || stringPtr->uallocated == 0)) { + (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { char *new; /* * Not enough space in current string. Reallocate the string * space and free the old string. */ - if (objPtr->bytes != tclEmptyStringRep) { + if (objPtr->bytes != tclEmptyStringRep && objPtr->bytes != NULL) { new = (char *) attemptckrealloc((char *)objPtr->bytes, (unsigned)(length+1)); if (new == NULL) { return 0; } - } else { + } else { new = (char *) attemptckalloc((unsigned) (length+1)); if (new == NULL) { return 0; @@ -903,7 +892,7 @@ Tcl_AttemptSetObjLength(objPtr, length) objPtr->bytes = new; stringPtr->allocated = length; /* Invalidate the unicode data. */ - stringPtr->uallocated = 0; + stringPtr->hasUnicode = 0; } if (objPtr->bytes != NULL) { @@ -912,24 +901,9 @@ Tcl_AttemptSetObjLength(objPtr, length) /* Ensure the string is NULL-terminated */ objPtr->bytes[length] = 0; } - if (stringPtr->uallocated > 0) { - /* Shortening a string with unicode representation */ - int numChars = Tcl_NumUtfChars(objPtr->bytes, -1); - size_t uallocated = STRING_UALLOC(numChars); - if (uallocated > stringPtr->uallocated) { - /* Invalidate the unicode data. */ - stringPtr->numChars = -1; - stringPtr->uallocated = 0; - } else { - stringPtr->numChars = numChars; - stringPtr->uallocated = uallocated; - /* Ensure the string is NULL-terminated */ - stringPtr->unicode[numChars] = 0; - } - } else { - /* Invalidate the unicode data. */ - stringPtr->numChars = -1; - } + /* Invalidate the unicode data. */ + stringPtr->numChars = -1; + stringPtr->hasUnicode = 0; } else { /* Changing length of pure unicode string */ size_t uallocated = STRING_UALLOC(length); @@ -943,6 +917,7 @@ Tcl_AttemptSetObjLength(objPtr, length) stringPtr->uallocated = uallocated; } stringPtr->numChars = length; + stringPtr->hasUnicode = (length > 0); /* Ensure the string is NULL-terminated */ stringPtr->unicode[length] = 0; stringPtr->allocated = 0; @@ -1004,6 +979,7 @@ Tcl_SetUnicodeObj(objPtr, unicode, numChars) stringPtr = (String *) ckalloc(STRING_SIZE(uallocated)); stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; + stringPtr->hasUnicode = (numChars > 0); stringPtr->allocated = 0; memcpy((VOID *) stringPtr->unicode, (VOID *) unicode, uallocated); stringPtr->unicode[numChars] = 0; @@ -1060,7 +1036,7 @@ Tcl_AppendToObj(objPtr, bytes, length) */ stringPtr = GET_STRING(objPtr); - if (stringPtr->uallocated > 0) { + if (stringPtr->hasUnicode != 0) { AppendUtfToUnicodeRep(objPtr, bytes, length); stringPtr = GET_STRING(objPtr); @@ -1112,7 +1088,7 @@ Tcl_AppendUnicodeToObj(objPtr, unicode, length) * "unicode" to objPtr's string rep. */ - if (stringPtr->uallocated > 0) { + if (stringPtr->hasUnicode != 0) { AppendUnicodeToUnicodeRep(objPtr, unicode, length); } else { AppendUnicodeToUtfRep(objPtr, unicode, length); @@ -1154,7 +1130,7 @@ Tcl_AppendObjToObj(objPtr, appendObjPtr) */ stringPtr = GET_STRING(objPtr); - if (stringPtr->uallocated > 0) { + if (stringPtr->hasUnicode != 0) { /* * If appendObjPtr is not of the "String" type, don't convert it. @@ -1163,7 +1139,7 @@ Tcl_AppendObjToObj(objPtr, appendObjPtr) if (appendObjPtr->typePtr == &tclStringType) { stringPtr = GET_STRING(appendObjPtr); if ((stringPtr->numChars == -1) - || (stringPtr->uallocated == 0)) { + || (stringPtr->hasUnicode == 0)) { /* * If appendObjPtr is a string obj with no valid Unicode @@ -1425,15 +1401,14 @@ AppendUtfToUtfRep(objPtr, bytes, numBytes) Tcl_SetObjLength(objPtr, newLength + numBytes + TCL_GROWTH_MIN_ALLOC); } - } else { - - /* - * Invalidate the unicode data. - */ - - stringPtr->numChars = -1; - stringPtr->uallocated = 0; } + + /* + * Invalidate the unicode data. + */ + + stringPtr->numChars = -1; + stringPtr->hasUnicode = 0; memcpy((VOID *) (objPtr->bytes + oldLength), (VOID *) bytes, (size_t) numBytes); @@ -1645,8 +1620,9 @@ FillUnicodeRep(objPtr) if (stringPtr->numChars == -1) { stringPtr->numChars = Tcl_NumUtfChars(src, objPtr->length); } + stringPtr->hasUnicode = (stringPtr->numChars > 0); - uallocated = stringPtr->numChars * sizeof(Tcl_UniChar); + uallocated = STRING_UALLOC(stringPtr->numChars); if (uallocated > stringPtr->uallocated) { /* @@ -1718,9 +1694,9 @@ DupStringInternalRep(srcPtr, copyPtr) * internal rep, and invalidate the string rep of the new object. */ - if (srcStringPtr->uallocated == 0) { - copyStringPtr = (String *) ckalloc(STRING_SIZE(0)); - copyStringPtr->uallocated = 0; + if (srcStringPtr->hasUnicode == 0) { + copyStringPtr = (String *) ckalloc(STRING_SIZE(STRING_UALLOC(0))); + copyStringPtr->uallocated = STRING_UALLOC(0); } else { copyStringPtr = (String *) ckalloc( STRING_SIZE(srcStringPtr->uallocated)); @@ -1732,6 +1708,7 @@ DupStringInternalRep(srcPtr, copyPtr) copyStringPtr->unicode[srcStringPtr->numChars] = 0; } copyStringPtr->numChars = srcStringPtr->numChars; + copyStringPtr->hasUnicode = srcStringPtr->hasUnicode; copyStringPtr->allocated = srcStringPtr->allocated; /* @@ -1791,9 +1768,10 @@ SetStringFromAny(interp, objPtr) * Allocate enough space for the basic String structure. */ - stringPtr = (String *) ckalloc(STRING_SIZE(0)); + stringPtr = (String *) ckalloc(STRING_SIZE(STRING_UALLOC(0))); stringPtr->numChars = -1; - stringPtr->uallocated = 0; + stringPtr->uallocated = STRING_UALLOC(0); + stringPtr->hasUnicode = 0; if (objPtr->bytes != NULL) { stringPtr->allocated = objPtr->length; diff --git a/macosx/Makefile b/macosx/Makefile index 27d22b1..fec1e4b 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -3,7 +3,7 @@ # Simple makefile for building on Mac OS X with the # Project Builder command line tool 'pbxbuild' # -# RCS: @(#) $Id: Makefile,v 1.4 2002/09/26 17:06:14 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.5 2003/02/19 16:43:29 das Exp $ # ################################################################################ @@ -25,7 +25,7 @@ DEPBUILD = ${BUILD} -buildstyle "${DEPBUILDSTYLE}" INSTALLOPTS = INSTALL_ROOT="${INSTALL_ROOT}" -EMBEDDEDOPTS = DYLIB_INSTALL_PATH="@executable_path/../Frameworks" +EMBEDDEDOPTS = EMBEDDED_BUILD=1 ################################################################################ @@ -53,10 +53,10 @@ install-develop: install-deploy: ${DEPBUILD} install ${INSTALLOPTS} -embedded-develop: forceRelink +embedded-develop: ${DEVBUILD} ${EMBEDDEDOPTS} -embedded-deploy: forceRelink +embedded-deploy: ${DEPBUILD} ${EMBEDDEDOPTS} install-embedded-develop: diff --git a/macosx/Tcl.pbproj/project.pbxproj b/macosx/Tcl.pbproj/project.pbxproj index 367d6e8..40a9415 100644 --- a/macosx/Tcl.pbproj/project.pbxproj +++ b/macosx/Tcl.pbproj/project.pbxproj @@ -16,7 +16,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# install to ${INSTALL_ROOT} with optional stripping\ncd ${TEMP_DIR}/..\nif test \"${INSTALL_STRIP}\" = \"YES\"; then\nexport INSTALL_PROGRAM='${INSTALL} ${INSTALL_STRIP_PROGRAM}'\nexport INSTALL_LIBRARY='${INSTALL} ${INSTALL_STRIP_LIBRARY}'\nelse\nexport INSTALL_PROGRAM='${INSTALL}'\nexport INSTALL_LIBRARY='${INSTALL}'\nfi\ngnumake install-binaries install-libraries TCL_LIBRARY=\"@TCL_IN_FRAMEWORK@\" INSTALL_ROOT=\"${INSTALL_ROOT}\" SCRIPT_INSTALL_DIR=\"${INSTALL_ROOT}${LIBDIR}/Resources/Scripts\" INSTALL_PROGRAM=\"${INSTALL_PROGRAM}\" INSTALL_LIBRARY=\"${INSTALL_LIBRARY}\""; + shellScript = "# install to ${INSTALL_ROOT} with optional stripping\ncd ${TEMP_DIR}/..\nif test \"${INSTALL_STRIP}\" = \"YES\"; then\nexport INSTALL_PROGRAM='${INSTALL} ${INSTALL_STRIP_PROGRAM}'\nexport INSTALL_LIBRARY='${INSTALL} ${INSTALL_STRIP_LIBRARY}'\nelse\nexport INSTALL_PROGRAM='${INSTALL}'\nexport INSTALL_LIBRARY='${INSTALL}'\nfi\nexport CPPROG='cp -p'\ngnumake install-binaries install-libraries TCL_LIBRARY=\"@TCL_IN_FRAMEWORK@\" INSTALL_ROOT=\"${INSTALL_ROOT}\" SCRIPT_INSTALL_DIR=\"${INSTALL_ROOT}${LIBDIR}/Resources/Scripts\" INSTALL_PROGRAM=\"${INSTALL_PROGRAM}\" INSTALL_LIBRARY=\"${INSTALL_LIBRARY}\""; }; 00530A0E0173CC960ACA28DC = { buildActionMask = 12; @@ -36,6 +36,7 @@ 00E2F847016E82EB0ACA28DC, 00E2F848016E82EB0ACA28DC, ); + hasScannedForEncodings = 1; isa = PBXProject; mainGroup = 00E2F846016E82EB0ACA28DC; productRefGroup = 00E2F84A016E8A830ACA28DC; @@ -48,6 +49,8 @@ }; 00E2F846016E82EB0ACA28DC = { children = ( + F5306CA003CAC9AE016F146B, + F5306C9F03CAC979016F146B, F5C88655017D604601DC9062, F5F24FEE016ED0DF01DC9062, 00E2F855016E922C0ACA28DC, @@ -106,11 +109,11 @@ ); isa = PBXLegacyTarget; name = Configure; + passBuildSettingsInEnvironment = 1; productName = Configure; settingsToExpand = 6; settingsToPassInEnvironment = 287; settingsToPassOnCommandLine = 280; - shouldUseHeadermap = 0; }; 00E2F84C016E8B780ACA28DC = { buildArgumentsString = "-c \"if [ \\\"${ACTION}\\\" != \\\"clean\\\" ]; then gnumake tclsh tcltest TCL_LIBRARY=\\\"@TCL_IN_FRAMEWORK@\\\" TCL_PACKAGE_PATH=\\\"~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks\\\" DYLIB_INSTALL_DIR=\\\"${DYLIB_INSTALL_DIR}\\\" ${EXTRA_MAKE_FLAGS}; else gnumake distclean; fi\""; @@ -131,11 +134,11 @@ ); isa = PBXLegacyTarget; name = Make; + passBuildSettingsInEnvironment = 1; productName = Make; settingsToExpand = 6; settingsToPassInEnvironment = 287; settingsToPassOnCommandLine = 280; - shouldUseHeadermap = 0; }; 00E2F84D016E92110ACA28DC = { isa = PBXFrameworkReference; @@ -202,7 +205,6 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright "; - shouldUseHeadermap = 0; }; 00E2F84F016E92110ACA28DC = { buildActionMask = 2147483647; @@ -434,6 +436,43 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; + F5306C9F03CAC979016F146B = { + children = ( + F5306CA303CAC9DE016F146B, + F5306CA103CAC9DE016F146B, + F5306CA203CAC9DE016F146B, + ); + isa = PBXGroup; + name = "Build System"; + refType = 4; + }; + F5306CA003CAC9AE016F146B = { + fileEncoding = 5; + isa = PBXFileReference; + name = ChangeLog; + path = ../ChangeLog; + refType = 2; + }; + F5306CA103CAC9DE016F146B = { + fileEncoding = 5; + isa = PBXFileReference; + name = configure.in; + path = ../unix/configure.in; + refType = 2; + }; + F5306CA203CAC9DE016F146B = { + fileEncoding = 5; + isa = PBXFileReference; + name = Makefile.in; + path = ../unix/Makefile.in; + refType = 2; + }; + F5306CA303CAC9DE016F146B = { + isa = PBXFileReference; + name = tcl.m4; + path = ../unix/tcl.m4; + refType = 2; + }; F53ACC5C031D9D11016F146B = { isa = PBXExecutableFileReference; name = tclsh8.4; @@ -478,7 +517,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "if [ `echo \"${DYLIB_INSTALL_PATH:-}\" | grep -c \"@executable_path\"` -gt 0 ]; then\n# if we are embedding frameworks, don't install tclsh\nrm -f \"${INSTALL_ROOT}/usr/bin/tclsh${FRAMEWORK_VERSION}\"\nrmdir -p \"${INSTALL_ROOT}/usr/bin\" 2>&-\ntrue\nelse\n# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./usr/bin/tclsh${FRAMEWORK_VERSION}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\n# install tclsh symbolic link\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nln -fs \"tclsh${FRAMEWORK_VERSION}\" \"${INSTALL_ROOT}/usr/bin/tclsh\"\nfi"; + shellScript = "if [ -n \"${EMBEDDED_BUILD:-}\" ]; then\n# if we are embedding frameworks, don't install tclsh\nrm -f \"${INSTALL_ROOT}/usr/bin/tclsh${FRAMEWORK_VERSION}\"\nrmdir -p \"${INSTALL_ROOT}/usr/bin\" 2>&-\ntrue\nelse\n# redo prebinding\ncd \"${INSTALL_ROOT}\"\nif [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr/; RM_USRLIB=1; fi\nif [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi\nredo_prebinding -r . \"./usr/bin/tclsh${FRAMEWORK_VERSION}\"\nif [ -n \"${RM_USRLIB:-}\" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi\nif [ -n \"${RM_SYSTEM:-}\" ]; then rm -f System; fi\n# install tclsh symbolic link\nmkdir -p \"${INSTALL_ROOT}/usr/bin\"\nln -fs \"tclsh${FRAMEWORK_VERSION}\" \"${INSTALL_ROOT}/usr/bin/tclsh\"\nfi"; }; F59AE5E3017AC67A01DC9062 = { buildActionMask = 8; @@ -491,7 +530,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "if [ `echo \"${DYLIB_INSTALL_PATH:-}\" | grep -c \"@executable_path\"` -eq 0 ]; then\n# build html documentation\nif [ \"${BUILD_STYLE}\" = \"Deployment\" ]; then\n cd \"${TEMP_DIR}/..\"\n export DYLD_FRAMEWORK_PATH=${SYMROOT}\n gnumake html DISTDIR=\"${INSTALL_ROOT}${LIBDIR}/Resources/English.lproj/Documentation/Reference\"\n cd \"${INSTALL_ROOT}${LIBDIR}/Resources/English.lproj/Documentation/Reference\"\n ln -fs contents.htm html/TclTOC.html\n rm -fr \"${PRODUCT_NAME}\"; mv -f html \"${PRODUCT_NAME}\"\nfi\nfi"; + shellScript = "if [ -z \"${EMBEDDED_BUILD:-}\" ]; then\n# build html documentation\nif [ \"${BUILD_STYLE}\" = \"Deployment\" ]; then\n cd \"${TEMP_DIR}/..\"\n export DYLD_FRAMEWORK_PATH=${SYMROOT}\n gnumake html DISTDIR=\"${INSTALL_ROOT}${LIBDIR}/Resources/English.lproj/Documentation/Reference\"\n cd \"${INSTALL_ROOT}${LIBDIR}/Resources/English.lproj/Documentation/Reference\"\n ln -fs contents.htm html/TclTOC.html\n rm -fr \"${PRODUCT_NAME}\"; mv -f html \"${PRODUCT_NAME}\"\nfi\nfi"; }; F59D84620338F9CA016F146B = { fileRef = F5F24F72016ECAA401DC9062; @@ -569,9 +608,10 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright }; }; F5A1836F018242A501DC9062 = { + fileEncoding = 5; isa = PBXFileReference; path = tclMacOSXBundle.c; - refType = 4; + refType = 2; }; F5BE9BBF02FB5974016F146B = { buildActionMask = 2147483647; @@ -630,648 +670,756 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright refType = 2; }; F5F24F6B016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regcustom.h; path = ../generic/regcustom.h; refType = 2; }; F5F24F6C016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regerrs.h; path = ../generic/regerrs.h; refType = 2; }; F5F24F6D016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regguts.h; path = ../generic/regguts.h; refType = 2; }; F5F24F6E016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tcl.h; path = ../generic/tcl.h; refType = 2; }; F5F24F6F016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCompile.h; path = ../generic/tclCompile.h; refType = 2; }; F5F24F70016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclDecls.h; path = ../generic/tclDecls.h; refType = 2; }; F5F24F71016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclInitScript.h; path = ../generic/tclInitScript.h; refType = 2; }; F5F24F72016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclInt.h; path = ../generic/tclInt.h; refType = 2; }; F5F24F73016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIntDecls.h; path = ../generic/tclIntDecls.h; refType = 2; }; F5F24F74016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIntPlatDecls.h; path = ../generic/tclIntPlatDecls.h; refType = 2; }; F5F24F75016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIO.h; path = ../generic/tclIO.h; refType = 2; }; F5F24F76016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclMath.h; path = ../generic/tclMath.h; refType = 2; }; F5F24F77016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPlatDecls.h; path = ../generic/tclPlatDecls.h; refType = 2; }; F5F24F78016ECAA401DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclRegexp.h; path = ../generic/tclRegexp.h; refType = 2; }; F5F24F87016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regc_color.c; path = ../generic/regc_color.c; refType = 2; }; F5F24F88016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regc_cvec.c; path = ../generic/regc_cvec.c; refType = 2; }; F5F24F89016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regc_lex.c; path = ../generic/regc_lex.c; refType = 2; }; F5F24F8A016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regc_locale.c; path = ../generic/regc_locale.c; refType = 2; }; F5F24F8B016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regc_nfa.c; path = ../generic/regc_nfa.c; refType = 2; }; F5F24F8C016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regcomp.c; path = ../generic/regcomp.c; refType = 2; }; F5F24F8D016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = rege_dfa.c; path = ../generic/rege_dfa.c; refType = 2; }; F5F24F8E016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regerror.c; path = ../generic/regerror.c; refType = 2; }; F5F24F8F016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regexec.c; path = ../generic/regexec.c; refType = 2; }; F5F24F90016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regfree.c; path = ../generic/regfree.c; refType = 2; }; F5F24F91016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regfronts.c; path = ../generic/regfronts.c; refType = 2; }; F5F24F92016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclAlloc.c; path = ../generic/tclAlloc.c; refType = 2; }; F5F24F93016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclAsync.c; path = ../generic/tclAsync.c; refType = 2; }; F5F24F94016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclBasic.c; path = ../generic/tclBasic.c; refType = 2; }; F5F24F95016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclBinary.c; path = ../generic/tclBinary.c; refType = 2; }; F5F24F96016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCkalloc.c; path = ../generic/tclCkalloc.c; refType = 2; }; F5F24F97016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclClock.c; path = ../generic/tclClock.c; refType = 2; }; F5F24F98016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCmdAH.c; path = ../generic/tclCmdAH.c; refType = 2; }; F5F24F99016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCmdIL.c; path = ../generic/tclCmdIL.c; refType = 2; }; F5F24F9A016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCmdMZ.c; path = ../generic/tclCmdMZ.c; refType = 2; }; F5F24F9B016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCompCmds.c; path = ../generic/tclCompCmds.c; refType = 2; }; F5F24F9C016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCompExpr.c; path = ../generic/tclCompExpr.c; refType = 2; }; F5F24F9D016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclCompile.c; path = ../generic/tclCompile.c; refType = 2; }; F5F24F9E016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclDate.c; path = ../generic/tclDate.c; refType = 2; }; F5F24F9F016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclEncoding.c; path = ../generic/tclEncoding.c; refType = 2; }; F5F24FA0016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclEnv.c; path = ../generic/tclEnv.c; refType = 2; }; F5F24FA1016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclEvent.c; path = ../generic/tclEvent.c; refType = 2; }; F5F24FA2016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclExecute.c; path = ../generic/tclExecute.c; refType = 2; }; F5F24FA3016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclFCmd.c; path = ../generic/tclFCmd.c; refType = 2; }; F5F24FA4016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclFileName.c; path = ../generic/tclFileName.c; refType = 2; }; F5F24FA5016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclGet.c; path = ../generic/tclGet.c; refType = 2; }; F5F24FA6016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclHash.c; path = ../generic/tclHash.c; refType = 2; }; F5F24FA7016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclHistory.c; path = ../generic/tclHistory.c; refType = 2; }; F5F24FA8016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIndexObj.c; path = ../generic/tclIndexObj.c; refType = 2; }; F5F24FA9016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclInterp.c; path = ../generic/tclInterp.c; refType = 2; }; F5F24FAA016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIO.c; path = ../generic/tclIO.c; refType = 2; }; F5F24FAB016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIOCmd.c; path = ../generic/tclIOCmd.c; refType = 2; }; F5F24FAC016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIOGT.c; path = ../generic/tclIOGT.c; refType = 2; }; F5F24FAD016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIOSock.c; path = ../generic/tclIOSock.c; refType = 2; }; F5F24FAE016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIOUtil.c; path = ../generic/tclIOUtil.c; refType = 2; }; F5F24FAF016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclLink.c; path = ../generic/tclLink.c; refType = 2; }; F5F24FB0016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclListObj.c; path = ../generic/tclListObj.c; refType = 2; }; F5F24FB1016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclLiteral.c; path = ../generic/tclLiteral.c; refType = 2; }; F5F24FB2016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclLoad.c; path = ../generic/tclLoad.c; refType = 2; }; F5F24FB3016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclLoadNone.c; path = ../generic/tclLoadNone.c; refType = 2; }; F5F24FB4016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclMain.c; path = ../generic/tclMain.c; refType = 2; }; F5F24FB5016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclNamesp.c; path = ../generic/tclNamesp.c; refType = 2; }; F5F24FB6016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclNotify.c; path = ../generic/tclNotify.c; refType = 2; }; F5F24FB7016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclObj.c; path = ../generic/tclObj.c; refType = 2; }; F5F24FB8016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPanic.c; path = ../generic/tclPanic.c; refType = 2; }; F5F24FB9016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclParse.c; path = ../generic/tclParse.c; refType = 2; }; F5F24FBA016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclParseExpr.c; path = ../generic/tclParseExpr.c; refType = 2; }; F5F24FBB016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPipe.c; path = ../generic/tclPipe.c; refType = 2; }; F5F24FBC016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPosixStr.c; path = ../generic/tclPosixStr.c; refType = 2; }; F5F24FBD016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPreserve.c; path = ../generic/tclPreserve.c; refType = 2; }; F5F24FBE016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclProc.c; path = ../generic/tclProc.c; refType = 2; }; F5F24FBF016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclRegexp.c; path = ../generic/tclRegexp.c; refType = 2; }; F5F24FC0016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclResolve.c; path = ../generic/tclResolve.c; refType = 2; }; F5F24FC1016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclResult.c; path = ../generic/tclResult.c; refType = 2; }; F5F24FC2016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclScan.c; path = ../generic/tclScan.c; refType = 2; }; F5F24FC3016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclStringObj.c; path = ../generic/tclStringObj.c; refType = 2; }; F5F24FC4016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclStubInit.c; path = ../generic/tclStubInit.c; refType = 2; }; F5F24FC5016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclStubLib.c; path = ../generic/tclStubLib.c; refType = 2; }; F5F24FC6016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclTest.c; path = ../generic/tclTest.c; refType = 2; }; F5F24FC7016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclTestObj.c; path = ../generic/tclTestObj.c; refType = 2; }; F5F24FC8016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclTestProcBodyObj.c; path = ../generic/tclTestProcBodyObj.c; refType = 2; }; F5F24FC9016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclThread.c; path = ../generic/tclThread.c; refType = 2; }; F5F24FCA016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclThreadJoin.c; path = ../generic/tclThreadJoin.c; refType = 2; }; F5F24FCB016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclThreadTest.c; path = ../generic/tclThreadTest.c; refType = 2; }; F5F24FCC016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclTimer.c; path = ../generic/tclTimer.c; refType = 2; }; F5F24FCD016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUniData.c; path = ../generic/tclUniData.c; refType = 2; }; F5F24FCE016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUtf.c; path = ../generic/tclUtf.c; refType = 2; }; F5F24FCF016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUtil.c; path = ../generic/tclUtil.c; refType = 2; }; F5F24FD0016ECAFC01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclVar.c; path = ../generic/tclVar.c; refType = 2; }; F5F24FD1016ECB1E01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = regex.h; path = ../generic/regex.h; refType = 2; }; F5F24FD2016ECB1E01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPort.h; path = ../generic/tclPort.h; refType = 2; }; F5F24FD3016ECB4901DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclPkg.c; path = ../generic/tclPkg.c; refType = 2; }; F5F24FD6016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixPort.h; path = ../unix/tclUnixPort.h; refType = 2; }; F5F24FD7016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixThrd.h; path = ../unix/tclUnixThrd.h; refType = 2; }; F5F24FD8016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclAppInit.c; path = ../unix/tclAppInit.c; refType = 2; }; F5F24FD9016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclLoadDyld.c; path = ../unix/tclLoadDyld.c; refType = 2; }; F5F24FDB016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixChan.c; path = ../unix/tclUnixChan.c; refType = 2; }; F5F24FDC016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixEvent.c; path = ../unix/tclUnixEvent.c; refType = 2; }; F5F24FDD016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixFCmd.c; path = ../unix/tclUnixFCmd.c; refType = 2; }; F5F24FDE016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixFile.c; path = ../unix/tclUnixFile.c; refType = 2; }; F5F24FDF016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixInit.c; path = ../unix/tclUnixInit.c; refType = 2; }; F5F24FE0016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixNotfy.c; path = ../unix/tclUnixNotfy.c; refType = 2; }; F5F24FE1016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixPipe.c; path = ../unix/tclUnixPipe.c; refType = 2; }; F5F24FE2016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixSock.c; path = ../unix/tclUnixSock.c; refType = 2; }; F5F24FE3016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixTest.c; path = ../unix/tclUnixTest.c; refType = 2; }; F5F24FE4016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixThrd.c; path = ../unix/tclUnixThrd.c; refType = 2; }; F5F24FE5016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclUnixTime.c; path = ../unix/tclUnixTime.c; refType = 2; }; F5F24FE6016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclXtNotify.c; path = ../unix/tclXtNotify.c; refType = 2; }; F5F24FE7016ECC0F01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclXtTest.c; path = ../unix/tclXtTest.c; @@ -1393,6 +1541,7 @@ MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright refType = 2; }; F5F25007016ED0DF01DC9062 = { + fileEncoding = 5; isa = PBXFileReference; name = tclIndex; path = ../library/tclIndex; diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 807d4bb..9e721e7 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.15 2002/07/10 11:56:44 dgp Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.16 2003/02/19 16:43:30 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -56,7 +56,7 @@ test iocmd-1.7 {puts command} { } 7 test iocmd-1.8 {puts command} { set f [open $path(test1) w] - fconfigure $f -translation lf -eofchar {} + fconfigure $f -translation lf -eofchar {} -encoding iso8859-1 puts -nonewline $f [binary format a4a5 foo bar] close $f file size $path(test1) -- cgit v0.12