diff --git a/Mac/scripts/errors.txt b/Mac/scripts/errors.txt index 4d8649b9fb5..afdbc4de8f4 100644 --- a/Mac/scripts/errors.txt +++ b/Mac/scripts/errors.txt @@ -1,592 +1,626 @@ -1 dsBusError bus error -2 dsAddressErr address error -3 dsIllInstErr illegal instruction error -4 dsZeroDivErr zero divide error -5 dsChkErr check trap error -6 dsOvflowErr overflow trap error -7 dsPrivErr privilege violation error -8 dsTraceErr trace mode error -9 dsLineAErr line 1010 trap error -10 dsLineFErr line 1111 trap error -11 dsMiscErr miscellaneous hardware exception error -12 dsCoreErr unimplemented core routine error -13 dsIrqErr uninstalled interrupt error -14 dsIOCoreErr IO Core Error -15 dsLoadErr Segment Loader Error -16 dsFPErr Floating point error -17 dsNoPackErr package 0 not present [List Manager] -18 dsNoPk1 package 1 not present [Reserved by Apple] -19 dsNoPk2 package 2 not present [Disk Initialization] -20 dsNoPk3 package 3 not present [Standard File] -21 dsNoPk4 package 4 not present [Floating-Point Arithmetic] -22 dsNoPk5 package 5 not present [Transcendental Functions] -23 dsNoPk6 package 6 not present [International Utilities] -24 dsNoPk7 package 7 not present [Binary/Decimal Conversion] -25 dsMemFullErr out of memory! -26 dsBadLaunch can't launch file -27 dsFSErr file system map has been trashed -28 dsStknHeap stack has moved into application heap -30 dsReinsert request user to reinsert off-line volume -31 dsNotThe1 not the disk I wanted (obsolete) -33 negZcbFreeErr ZcbFree has gone negative -40 dsGreeting welcome to Macintosh greeting -41 dsFinderErr can't load the Finder error -42 shutDownAlert handled like a shutdown error (obsolete) -43 dsSystemFileErr canÕt find System file to open (obsolete) -51 dsBadSlotInt unserviceable slot interrupt -81 dsBadSANEopcode bad opcode given to SANE Pack4 -84 menuPrgErr happens when a menu is purged -85 dsMBarNFnd SysErr -- cannot find MBDF -86 dsHMenuFindErr SysErr -- recursively defined HMenus -87 dsWDEFnFnd Could not load WDEF -88 dsCDEFnFnd Could not load CDEF -89 dsMDEFnFnd Could not load MDEF -98 dsNoPatch Can't patch for particular Model Mac -99 dsBadPatch Can't load patch resource -101 dsParityErr memory parity error -102 dsOldSystem System is too old for this ROM -103 ds32BitMode booting in 32-bit on a 24-bit sys -20000 dsShutDownOrRestart user choice between ShutDown and Restart -20001 dsSwitchOffOrRestart user choice between switching off and Restart -20002 dsForcedQuit allow the user to ExitToShell, return if Cancel -32767 dsSysErr general system error (catch-all used in DSAT)General System Errors (VBL Mgr, Queue, Etc.) -0 noErr No Error --1 qErr queue element not found during deletion --2 vTypErr invalid queue element --3 corErr core routine number out of range --4 unimpErr unimplemented core routine --5 SlpTypeErr invalid queue element --8 seNoDB no debugger installed to handle debugger command --17 controlErr Driver can't respond to Control call --18 statusErr Driver can't respond to Status call --19 readErr Driver can't respond to Read call --20 writErr Driver can't respond to Write call --21 badUnitErr Driver ref num doesn't match unit table --22 unitEmptyErr Driver ref num specifies NIL handle in unit table --23 openErr Requested read/write permission doesn't match - driver's open permission, or - Attempt to open RAM serial Driver failed --24 closErr Close failed; Permission to close .MPP driver - was denied --25 dRemovErr tried to remove an open driver --26 dInstErr DrvrInstall couldn't find driver in resources --27 abortErr IO call aborted by KillIO; Publisher has written - a new edition *OR* IO abort error (Printing Manager) --28 notOpenErr Couldn't rd/wr/ctl/sts cause driver not opened --29 unitTblFullErr Unit table has no more entries --30 dceExtErr dce extension error --33 dirFulErr Directory full --34 dskFulErr Disk full --35 nsvErr No such volume; volume not found --36 ioErr I/O error (bummers) --37 bdNamErr Bad file name; there may be no bad names - in the final system! --38 fnOpnErr File not open --39 eofErr End of file; no additional data in the format --40 posErr Tried to position to before start of file (r/w) --41 mFulErr Memory full (open) or file won't fit (load) --42 tmfoErr too many files open --43 fnfErr File not found; Folder not found; - Edition container not found; Target not found --44 wPrErr Diskette is write protected; Volume is locked - through hardware --45 fLckdErr File is locked *OR* Publisher writing to an edition --46 vLckdErr Volume is locked through software --47 fBsyErr File is busy (delete); Section doing I/O --48 dupFNErr Duplicate filename (rename); File found - instead of folder --49 opWrErr File already open with with write permission --50 paramErr Error in user parameter list --51 rfNumErr Reference number invalid --52 gfpErr Get file position error --53 volOffLinErr Volume is off line --54 permErr Software lock on file; Not a subscriber - [permissions error on file open] --55 volOnLinErr drive volume already on-line at MountVol --56 nsDrvErr no such drive (tried to mount a bad drive num) --57 noMacDskErr not a mac diskette (sig bytes are wrong) --58 extFSErr External file system Ń file system identifier is nonzero --59 fsRnErr file system internal error: during rename the old - entry was deleted but could not be restoredÉ --60 badMDBErr bad master directory block --61 wrPermErr Write permissions error; Not a publisher --64 fontDecError error during font declaration *OR* drive not installed --65 fontNotDeclared font not declared *OR* r/w requested for an off-line drive --66 fontSubErr font substitution occured *OR* couldn't find 5 nybbles in 200 tries --67 noAdrMkErr couldn't find valid addr mark --68 dataVerErr read verify compare failed --69 badCksmErr addr mark checksum didn't check --70 badBtSlpErr bad addr mark bit slip nibbles --71 noDtaMkErr couldn't find a data mark header --72 badDCksum bad data mark checksum --73 badDBtSlp bad data mark bit slip nibbles --74 wrUnderrun write underrun occurred --75 cantStepErr step handshake failed --76 tk0BadErr track 0 detect doesn't change --77 initIWMErr unable to initialize IWM --78 twoSideErr tried to read 2nd side on a 1-sided drive --79 spdAdjErr unable to correctly adjust disk speed --80 seekErr track number wrong on address mark --81 sectNFErr sector number never found on a track --82 fmt1Err can't find sector 0 after track format --83 fmt2Err can't get enough sync --84 verErr track failed to verify --85 clkRdErr unable to read same clock value twice --86 clkWrErr time written did not verify --87 prWrErr parameter ram written didn't read-verify --88 prInitErr InitUtil found the parameter ram uninitialized --89 rcvrErr SCC receiver error (framing, parity, OR) --90 breakRecd Break received (SCC) --91 ddpSktErr Error opening socket *OR* Invalid address or table is full --92 ddpLenErr Data length too big *OR* Packet too large or first entry of the write-data - structure did not contain the full 14-byte header --93 noBridgeErr No router available [for non-local send] --94 lapProtErr error in attaching/detaching protocol *OR* Protocol handler is already attached, nodeÕs - protocol table is full, protocol not attached, - or protocol handler pointer was not 0 --95 excessCollsns Hardware error [excessive collisions on write] --97 portInUse driver Open error code (port is in use) --98 portNotCf driver Open error code (parameter RAM not - configured for this connection) --99 memROZErr hard error in ROZ --100 noScrapErr No scrap exists error --102 noTypeErr Format not available [no object of that type in scrap] --108 memFullErr Ran out of memory [not enough room in heap zone] --109 nilHandleErr GetHandleSize fails on baseText or substitutionText; - NIL master pointer [handle was NIL in HandleZone - or other] --110 memAdrErr Address was odd, or out of range --111 memWZErr Attempted to operate on a free block; GetHandleSize - fails on baseText or substitutionText - [WhichZone failed (applied to free block)] --112 memPurErr Trying to purge a locked or non-purgeable block --113 memAZErr Address in zone check failed --114 memPCErr Pointer Check failed --115 memBCErr Block Check failed --116 memSCErr Size Check failed --117 memLockedErr Trying to move a locked block (MoveHHi) --120 dirNFErr Directory not found --121 tmwdoErr No free WDCB available --122 badMovErr Move into offspring error --123 wrgVolTypErr Not an HFS volume [wrong volume type error - or (obsolete) operation not supported for MFS] --124 volGoneErr Server volume has been disconnected. --125 updPixMemErr Insufficient memory to update a pixmap --127 fsDSIntErr Internal file system error *OR* Could not find HMenu's parent in MenuKey --126 dsMBarNFnd System error code for MBDF not found --128 userCanceledErr User canceled an operation --130 fidNotFound no file thread exists --131 fidNotAFile directory specified --132 fidExists file id already exists --147 regionTooBigError Region too big or complex --148 pixMapTooBigErr Pixel map record is deeper than 1 bit per pixel - [passed pixelmap is too large] --149 notEnoughStack Not enough stack space for the necessary buffers *OR* Insufficient stack --150 cMatchErr Color2Index failed to find an index --151 cTempMemErr Failed to allocate memory for temporary structures --152 cNoMemErr Failed to allocate memory for structure --153 cRangeErr Range error on colorTable request --154 cProtectErr ColorTable entry protection violation --155 cDevErr Invalid type of graphics device --156 cResErr Invalid resolution for MakeITable --157 cDepthErr Invalid pixel depth --158 cParmErr Invalid parameter --185 badExtResource Extended resource has a bad format. --186 CantDecompress Resource bent ("the bends") - can't decompress a compressed resource --188 resourceInMemory Resource already in memory --189 writingPastEnd Writing past end of file --190 inputOutOfBounds Offset or count out of bounds --192 resNotFound Resource not found --193 resFNotFound Resource file not found --194 addResFailed AddResource failed --195 addRefFailed AddReference failed --196 rmvResFailed RmveResource failed --197 rmvRefFailed RmveReference failed --198 resAttrErr Attribute inconsistent with operation --199 mapReadErr Map inconsistent with operation --200 noHardware Required sound hardware not available - [no hardware support for the specified synthesizer] --201 notEnoughHardware Insufficient hardware available - [no more channels for the specified synthesizer] --203 queueFull No room in the queue --204 resProblem Problem loading the resource --205 badChannel Channel is corrupt or unusable - [invalid channel queue length] --206 badFormat Resource is corrupt or unusable - [handle to 'snd ' resource was invalid] --207 notEnoughBufferSpace Insufficient memory available --208 badFileFormat File is corrupt or unusable, or not AIFF or AIFF-C --209 channel Channel is busy --210 buffersTooSmall Buffer is too small --211 channelNotBusy Channel not currently used --212 noMoreRealTime Not enough CPU time available --213 badParam A parameter is incorrect --220 siNoSoundInHardware No sound input hardware available --221 siBadSoundInDevice Invalid sound input device --222 siNoBufferSpecified No buffer specified --223 siInvalidCompression Invalid compression type --224 siHardDiskTooSlow Hard drive too slow to record --225 siInvalidSampleRate Invalid sample rate --226 siInvalidSampleSize Invalid sample size --227 siDeviceBusyErr Sound input device is busy --228 siBadDeviceName Invalid device name --229 siBadRefNum Invalid reference number --230 siInputDeviceErr Input device hardware failure --231 siUnknownInfoType Unknown type of information --232 siUnknownQuality Unknown quality --250 midiNoClientErr no client with that ID found --251 midiNoPortErr no port with that ID found --252 midiTooManyPortsErr too many ports already installed in the system --253 midiTooManyConsErr too many connections made --254 midiVConnectErr pending virtual connection created --255 midiVConnectMade pending virtual connection resolved --256 midiVConnectRmvd pending virtual connection removed --257 midiNoConErr no connection exists between specified ports --258 midiWriteErr couldn't write to all connected ports --259 midiNameLenErr name supplied is longer than 31 characters --260 midiDupIDErr duplicate client ID --261 midiInvalidCmdErr command not supported for port type --299 nmTypErr Invalid qTypeŃmust be ORD(nmType) --290 smSDMInitErr SDM could not be initialized. --291 smSRTInitErr Slot Resource Table could not be initialized. --292 smPRAMInitErr Slot Resource Table could not be initialized. --293 smPriInitErr Cards could not be initialized. --300 smEmptySlot No card in slot --301 smCRCFail CRC check failed for declaration data --302 smFormatErr FHeader Format is not Apple's --303 smRevisionErr Wrong revison level --304 smNoDir Directory offset is Nil --305 smLWTstBad Long Word test field <> $5A932BC7. --306 smNosInfoArray No sInfoArray. Memory Mgr error. --307 smResrvErr Fatal reserved error. Reserved field <> 0. --308 smUnExBusErr Unexpected Bus Error --309 smBLFieldBad ByteLanes field was bad. --310 smFHBlockRdErr Error occured during _sGetFHeader. --311 smFHBlkDispErr Error occured during _sDisposePtr (Dispose of - FHeader block). --312 smDisposePErr _DisposePointer error --313 smNoBoardsRsrc No Board sResource. --314 smGetPRErr Error occured during _sGetPRAMRec (See SIMStatus). --315 smNoBoardId No Board Id. --316 smIntStatVErr The InitStatusV field was negative after primary - or secondary init. --317 smIntTblVErr An error occured while trying to initialize the - Slot Resource Table. --318 smNoJmpTbl SDM jump table could not be created. --319 smBadBoardId BoardId was wrong, re-init the PRAM record. --320 smBusErrTO BusError time out. --330 smBadRefId Reference Id not found in list --331 smBadsList Bad sResource [sList] structure: - Id1 0. +-306 smNosInfoArray No sInfoArray. Memory Mgr error. +-305 smDisabledSlot This slot is disabled (-305 use to be smLWTstBad) +-304 smNoDir Directory offset is Nil +-303 smRevisionErr Wrong revison level +-302 smFormatErr FHeader Format is not Apple's +-301 smCRCFail CRC check failed for declaration data +-300 smEmptySlot No card in slot +-299 nmTypErr wrong queue type +-293 smPriInitErr Error; Cards could not be initialized. +-292 smPRAMInitErr Error; Slot Resource Table could not be initialized. +-291 smSRTInitErr Error; Slot Resource Table could not be initialized. +-290 smSDMInitErr Error; SDM could not be initialized. +-261 midiInvalidCmdErr command not supported for port type +-260 midiDupIDErr duplicate client ID +-259 midiNameLenErr name supplied is longer than 31 characters +-258 midiWriteErr MIDIWritePacket couldn't write to all connected ports +-257 midiNoConErr no connection exists between specified ports +-256 midiVConnectRmvd pending virtual connection removed +-255 midiVConnectMade pending virtual connection resolved +-254 midiVConnectErr pending virtual connection created +-253 midiTooManyConsErr too many connections made +-252 midiTooManyPortsErr too many ports already installed in the system +-251 midiNoPortErr no port with that ID found +-250 midiNoClientErr no client with that ID found +-232 siUnknownQuality invalid quality selector (returned by driver) +-231 siUnknownInfoType invalid info type selector (returned by driver) +-230 siInputDeviceErr input device hardware failure +-229 siBadRefNum invalid input device reference number +-228 siBadDeviceName input device could not be opened +-227 siDeviceBusyErr input device already in use +-226 siInvalidSampleSize invalid sample size +-225 siInvalidSampleRate invalid sample rate +-224 siHardDriveTooSlow hard drive too slow to record to disk +-223 siInvalidCompression invalid compression type +-222 siNoBufferSpecified returned by synchronous SPBRecord if nil buffer passed +-221 siBadSoundInDevice invalid index passed to SoundInGetIndexedDevice +-220 siNoSoundInHardware no Sound Input hardware +-212 noMoreRealTime not enough CPU cycles left to add another task +-210 buffersTooSmall can not operate in the memory allowed +-209 channelBusy the Channel is being used for a PFD already +-208 badFileFormat was not type AIFF or was of bad format,corrupt +-207 notEnoughBufferSpace could not allocate enough memory +-206 badFormat Sound Manager Error Returns +-205 badChannel Sound Manager Error Returns +-204 resProblem Sound Manager Error Returns +-203 queueFull Sound Manager Error Returns +-201 notEnoughHardwareErr Sound Manager Error Returns +-200 noHardwareErr Sound Manager Error Returns +-199 mapReadErr map inconsistent with operation +-198 resAttrErr attribute inconsistent with operation +-197 rmvRefFailed RmveReference failed +-196 rmvResFailed RmveResource failed +-195 addRefFailed AddReference failed +-194 addResFailed AddResource failed +-193 resFNotFound Resource file not found +-192 resNotFound Resource not found +-190 inputOutOfBounds Offset of Count out of bounds +-189 writingPastEnd Writing past end of file +-188 resourceInMemory Resource already in memory +-186 CantDecompress resource bent ("the bends") - can't decompress a compressed resource +-185 badExtResource extended resource has a bad format. +-157 cDepthErr invalid pixel depth +-156 cResErr invalid resolution for MakeITable +-155 cDevErr invalid type of graphics device +-154 cProtectErr colorTable entry protection violation +-153 cRangeErr range error on colorTable request +-152 cNoMemErr failed to allocate memory for structure +-151 cTempMemErr failed to allocate memory for temporary structures +-150 cMatchErr Color2Index failed to find an index +-127 hMenuFindErr could not find HMenu's parent in MenuKey +-126 mBarNFnd system error code for MBDF not found +-125 updPixMemErr insufficient memory to update a pixmap +-124 volGoneErr Server volume has been disconnected. +-123 wrgVolTypErr Wrong volume type error [operation not supported for MFS] +-122 badMovErr Move into offspring error +-121 tmwdoErr No free WDCB available +-120 dirNFErr Directory not found +-117 memLockedErr trying to move a locked block (MoveHHi) +-116 memSCErr Size Check failed +-115 memBCErr Block Check failed +-114 memPCErr Pointer Check failed +-113 memAZErr Address in zone check failed +-112 memPurErr trying to purge a locked or non-purgeable block +-111 memWZErr WhichZone failed (applied to free block) +-110 memAdrErr address was odd; or out of range +-109 nilHandleErr Master Pointer was NIL in HandleZone or other +-108 memFullErr Not enough room in heap zone +-102 noTypeErr No object of that type in scrap +-100 noScrapErr No scrap exists error +-99 memROZWarn soft error in ROZ +-98 portNotCf driver Open error code (parameter RAM not configured for this connection) +-97 portInUse driver Open error code (port is in use) +-96 portNotPwr serial port not currently powered +-95 excessCollsns excessive collisions on write +-94 lapProtErr error in attaching/detaching protocol +-93 noBridgeErr no network bridge for non-local send +-92 ddpLenErr data length too big +-91 ddpSktErr error in soket number +-90 breakRecd Break received (SCC) +-89 rcvrErr SCC receiver error (framing; parity; OR) +-88 prInitErr InitUtil found the parameter ram uninitialized +-87 prWrErr parameter ram written didn't read-verify +-86 clkWrErr time written did not verify +-85 clkRdErr unable to read same clock value twice +-84 firstDskErr I/O System Errors +-83 fmt2Err can't get enough sync +-82 fmt1Err can't find sector 0 after track format +-81 sectNFErr sector number never found on a track +-80 seekErr track number wrong on address mark +-79 spdAdjErr unable to correctly adjust disk speed +-78 twoSideErr tried to read 2nd side on a 1-sided drive +-77 initIWMErr unable to initialize IWM +-76 tk0BadErr track 0 detect doesn't change +-75 cantStepErr step handshake failed +-74 wrUnderrun write underrun occurred +-73 badDBtSlp bad data mark bit slip nibbles +-72 badDCksum bad data mark checksum +-71 noDtaMkErr couldn't find a data mark header +-70 badBtSlpErr bad addr mark bit slip nibbles +-69 badCksmErr addr mark checksum didn't check +-68 dataVerErr read verify compare failed +-67 noAdrMkErr couldn't find valid addr mark +-66 fontSubErr font substitution occured +-65 fontNotDeclared font not declared +-64 fontDecError error during font declaration +-61 wrPermErr write permissions error +-60 badMDBErr bad master directory block +-59 fsRnErr file system internal error:during rename the old entry was deleted but could not be restored. +-58 extFSErr volume in question belongs to an external fs +-57 noMacDskErr not a mac diskette (sig bytes are wrong) +-56 nsDrvErr no such drive (tried to mount a bad drive num) +-55 volOnLinErr drive volume already on-line at MountVol +-54 permErr permissions error (on file open) +-53 volOffLinErr volume not on line error (was Ejected) +-52 gfpErr get file position error +-51 rfNumErr refnum error +-50 paramErr error in user parameter list +-49 opWrErr file already open with with write permission +-48 dupFNErr duplicate filename (rename) +-47 fBsyErr File is busy (delete) +-46 vLckdErr volume is locked +-45 fLckdErr file is locked +-44 wPrErr diskette is write protected. +-43 fnfErr File not found +-42 tmfoErr too many files open +-41 mFulErr memory full (open) or file won't fit (load) +-40 posErr tried to position to before start of file (r/w) +-39 eofErr End of file +-38 fnOpnErr File not open +-37 bdNamErr there may be no bad names in the final system! +-36 ioErr I/O error (bummers) +-35 nsvErr no such volume +-34 dskFulErr disk full +-33 dirFulErr Directory full +-30 dceExtErr dce extension error +-29 unitTblFullErr unit table has no more entries +-28 notOpenErr Couldn't rd/wr/ctl/sts cause driver not opened +-27 abortErr IO call aborted by KillIO +-26 dInstErr DrvrInstall couldn't find driver in resources +-25 dRemovErr tried to remove an open driver +-24 closErr I/O System Errors +-23 openErr I/O System Errors +-22 unitEmptyErr I/O System Errors +-21 badUnitErr I/O System Errors +-20 writErr I/O System Errors +-19 readErr I/O System Errors +-18 statusErr I/O System Errors +-17 controlErr I/O System Errors +-13 dsExtensionsDisabled say ³Extensions Disabled² +-12 dsHD20Installed say ³HD20 Startup² +-11 dsDisassemblerInstalled say ³Disassembler Installed² +-10 dsMacsBugInstalled say ³MacsBug Installed² +-8 seNoDB no debugger installed to handle debugger command +-5 SlpTypeErr invalid queue element +-4 unimpErr unimplemented core routine +-3 corErr core routine number out of range +-2 vTypErr invalid queue element +-1 qErr queue element not found during deletion +0 tsmComponentNoErr component result = no error +1 EPERM Operation not permitted +2 ENOENT No such file or directory +3 ESRCH No such process +4 EINTR Interrupted system call +5 EIO Input/output error +6 ENXIO Device not configured +7 E2BIG Argument list too long +8 ENOEXEC Exec format error +9 EBADF Bad file descriptor +10 ECHILD No child processes +11 EDEADLK Resource deadlock avoided +12 ENOMEM Cannot allocate memory +13 EACCES Permission denied +14 EFAULT Bad address +15 ENOTBLK Block device required +16 EBUSY Device busy +17 EEXIST File exists +18 EXDEV Cross-device link +19 ENODEV Operation not supported by device +20 ENOTDIR Not a directory +21 EISDIR Is a directory +22 EINVAL Invalid argument +23 ENFILE Too many open files in system +24 EMFILE Too many open files +25 ENOTTY Inappropriate ioctl for device +26 ETXTBSY Text file busy +27 EFBIG File too large +28 ENOSPC No space left on device +29 ESPIPE Illegal seek +30 EROFS Read-only file system +31 EMLINK Too many links +32 EPIPE Broken pipe +33 EDOM Numerical argument out of domain +34 ERANGE Result too large +35 EAGAIN Resource temporarily unavailable +36 EINPROGRESS Operation now in progress +37 EALREADY Operation already in progress +38 ENOTSOCK Socket operation on non-socket +39 EDESTADDRREQ Destination address required +40 EMSGSIZE Message too long +41 EPROTOTYPE Protocol wrong type for socket +42 ENOPROTOOPT Protocol not available +43 EPROTONOSUPPORT Protocol not supported +44 ESOCKTNOSUPPORT Socket type not supported +45 EOPNOTSUPP Operation not supported on socket +46 EPFNOSUPPORT Protocol family not supported +47 EAFNOSUPPORT Address family not supported by protocol family +48 EADDRINUSE Address already in use +49 EADDRNOTAVAIL Can't assign requested address +50 ENETDOWN Network is down +51 ENETUNREACH Network is unreachable +52 ENETRESET Network dropped connection on reset +53 ECONNABORTED Software caused connection abort +54 ECONNRESET Connection reset by peer +55 ENOBUFS No buffer space available +56 EISCONN Socket is already connected +57 ENOTCONN Socket is not connected +58 ESHUTDOWN Can't send after socket shutdown +59 ETOOMANYREFS Too many references: can't splice +60 ETIMEDOUT Connection timed out +61 ECONNREFUSED Connection refused +62 ELOOP Too many levels of symbolic links +63 ENAMETOOLONG File name too long +64 EHOSTDOWN Host is down +65 EHOSTUNREACH No route to host +66 ENOTEMPTY Directory not empty +67 EPROCLIM Too many processes +68 EUSERS Too many users +69 EDQUOT Disc quota exceeded +70 ESTALE Stale NFS file handle +71 EREMOTE Too many levels of remote in path +72 EBADRPC RPC struct is bad +73 ERPCMISMATCH RPC version wrong +74 EPROGUNAVAIL RPC prog. not avail +75 EPROGMISMATCH Program version wrong +76 EPROCUNAVAIL Bad procedure for program +77 ENOLCK No locks available +78 ENOSYS Function not implemented +79 EFTYPE Inappropriate file type or format diff --git a/Mac/scripts/mkestrres.py b/Mac/scripts/mkestrres.py index ae9114b8b62..56fec989900 100644 --- a/Mac/scripts/mkestrres.py +++ b/Mac/scripts/mkestrres.py @@ -1,15 +1,31 @@ -# -# Create 'Estr' resource from error dictionary -from Res import * -import Res -from Resources import * -import MacOS +"""Parse sys/errno.h and Errors.h and create Estr resource""" + +import regex +import macfs import string +import Res +import os READ = 1 WRITE = 2 smAllScripts = -3 +ERRNO_PROG="#define[ \t]+" \ + "\([A-Z0-9a-z_]+\)" \ + "[ \t]+" \ + "\([0-9]+\)" \ + "[ \t]*/\*[ \t]*" \ + "\(.*\)" \ + "[ \t]*\*/" + +ERRORS_PROG="[ \t]*" \ + "\([A-Z0-9a-z_]+\)" \ + "[ \t]*=[ \t]*" \ + "\([-0-9]+\)" \ + "[, \t]*/\*[ \t]*" \ + "\(.*\)" \ + "[ \t]*\*/" + def Pstring(str): if len(str) > 255: raise ValueError, 'String too large' @@ -18,45 +34,93 @@ def Pstring(str): def writeestr(dst, edict): """Create Estr resource file given a dictionary of errors.""" - - FSpCreateResFile(dst, 'RSED', 'rsrc', smAllScripts) - output = FSpOpenResFile(dst, WRITE) - UseResFile(output) + os.unlink(dst.as_pathname()) + Res.FSpCreateResFile(dst, 'RSED', 'rsrc', smAllScripts) + output = Res.FSpOpenResFile(dst, WRITE) + Res.UseResFile(output) for num in edict.keys(): - res = Resource(Pstring(edict[num])) + res = Res.Resource(Pstring(edict[num][0])) res.AddResource('Estr', num, '') res.WriteResource() - CloseResFile(output) + Res.CloseResFile(output) -def parsefile(src): - fp = open(src) - lines = [] - while 1: - x = fp.readline() - if not x: - break - x = x[:-1] - words = string.split(x) - if x[0] in (' ', '\t'): - # continuation line - x = string.join(words) - lines[-1] = lines[-1] + ' ' + x - else: - x = string.join(words) - lines.append(x) - dict = {} - for line in lines: - words = string.split(line) - index = eval(words[0]) - if dict.has_key(index): - print '** Duplicate key:', index - x = string.join(words[2:]) - if not x: - x = words[1] - dict[index] = x - return dict +def writepython(fp, dict): + k = dict.keys() + k.sort() + for i in k: + fp.write("%s\t=\t%d\t#%s\n"%(dict[i][1], i, dict[i][0])) + + +def parse_errno_h(fp, dict): + errno_prog = regex.compile(ERRNO_PROG) + for line in fp.readlines(): + if errno_prog.match(line) > 0: + number = string.atoi(errno_prog.group(2)) + name = errno_prog.group(1) + desc = string.strip(errno_prog.group(3)) + if not dict.has_key(number): + dict[number] = desc, name + else: + print 'DUPLICATE', number + print '\t', dict[number] + print '\t', (desc, name) + +def parse_errors_h(fp, dict): + errno_prog = regex.compile(ERRORS_PROG) + for line in fp.readlines(): + if errno_prog.match(line) > 0: + number = string.atoi(errno_prog.group(2)) + name = errno_prog.group(1) + desc = string.strip(errno_prog.group(3)) + if number > 0: continue + + if not dict.has_key(number): + dict[number] = desc, name + else: + print 'DUPLICATE', number + print '\t', dict[number] + print '\t', (desc, name) + +def main(): + dict = {} + fss, ok = macfs.PromptGetFile("Where is errno.h?") + if not ok: return + fp = open(fss.as_pathname()) + parse_errno_h(fp, dict) + fp.close() + + fss, ok = macfs.PromptGetFile("Where is Errors.h?") + if not ok: return + fp = open(fss.as_pathname()) + parse_errors_h(fp, dict) + fp.close() + + if not dict: + return + + fss, ok = macfs.StandardPutFile("Resource output file?", "errors.rsrc") + if ok: + writeestr(fss, dict) + + fss, ok = macfs.StandardPutFile("Python output file?", "macerrors.py") + if ok: + fp = open(fss.as_pathname(), "w") + writepython(fp, dict) + fp.close() + fss.SetCreatorType('Pyth', 'TEXT') + + fss, ok = macfs.StandardPutFile("Text output file?", "errors.txt") + if ok: + fp = open(fss.as_pathname(), "w") + + k = dict.keys() + k.sort() + for i in k: + fp.write("%d\t%s\t%s\n"%(i, dict[i][1], dict[i][0])) + fp.close() + if __name__ == '__main__': - dict = parsefile('errors.txt') - writeestr('errors.rsrc', dict) + main() +