
! Use these patterns to convert "winerror.h" for use as "auto-err.dylan".
! Extracts the error codes pertaining to OLE Automation and emits
! corresponding Dylan definitions for them.


! Copyright: 1997, 1998 Functional Objects, Inc.  All rights reserved.


@set-switch{line;1}
@set-switch{match;1}

\B=Module\:    OLE-Automation\n@copyright{\:}\n\
  \n\/\/ This file is automatically generated from @file\; do not edit.\n\n

! OLE Automation error codes:

\N\#define <automation-error-name> <number>\W\n=\
	define constant @export{\$$1} @tab{38}\=\
	@wrap{\ as(<machine-word>, $2)}\;\n

! Preserve message text comments because some of these error codes are not
! documented anywhere other than in the header file.
\/\/ MessageId\: <automation-error-name>\W\n\/\/\n\/\/ MessageText\:\n\
	<message-text>\G\P\#define $1 <number>=\n$2

message-text:\/\/\W\n=
message-text:\/\/\W*\n=\/\/ *\n
message-text:=@terminate

automation-error-name:DISP_E_<I>=$0
automation-error-name:TYPE_E_<I>=$0
automation-error-name:=@fail

number:(<number>)=$1@end
number:0x<X8><optL>=\#x$1@end
!number:0<O><optL>=\#o$1@end
!number:<D><optL>=$1@end
number:_HRESULT_TYPEDEF_\W(<number>)=$1@end
number:(HRESULT)\W=
number:=@fail
optL:\CL=@end;=@end

\/\*<comment>\*\/=
comment:\/\*<comment>\*\/=
\/\/*\n=
