sys.p2crc.2
上传用户:upcnvip
上传日期:2007-01-06
资源大小:474k
文件大小:26k
- # %S=name of parent module or procedure.
- ConstFormat # Format for #define names derived from
- # Pascal consts. (Often used: %^s)
- ModuleFormat # Format for program and module names.
- FunctionFormat # Format for procedure and function names.
- VarFormat # Format for variable names.
- TypeFormat # Format for typedef names.
- FieldFormat # Format for fields of records; %S=record type.
- EnumFormat # Format for enumeration constants;
- # %s=enum type name. If not specified,
- # default is ConstFormat, else SymbolFormat.
- ReturnValueName Result # Return value holding variable; [%s=func name]
- UnitInitName _%s_init # Turbo Pascal unit initializer; %s=unit name
- HSymbolName %s_H # Name of "_H" symbol, if any; %s=unit name
- GSymbolName %s_G # Name of "_G" symbol; [%s=unit name]
- StringMaxName MAX_%s # VAR STRING hidden variable; %s=param name
- ArrayMinName %s_LOW # Lower bound hidden variable; %s=param name
- ArrayMaxName %s_HIGH # Upper bound hidden variable; %s=param name
- CopyParName %s_ # Alternate name for parameter %s
- StaticLinkName LINK # Static link parameter name; [%s=func name]
- LocalVarsStruct LOC_%s # Name of struct type for locals; %s=func name
- LocalVarsName V # Name of struct var for locals; [%s=func name]
- FwdStructName %s # Name of forward-used structs; %s=type name
- # (may simply be %s if you don't mind confusion)
- EnumListName %s_NAMES # Name of array to hold names for enum %s
- UnionName UU # Name of variant union
- UnionPartName %s # Name of variant element; %s=tag value name
- FakeStructName _REC_%s # Name of "temporary" structs; %s=base name
- LabelName _L%s # Name of GOTO label; %s=label name
- LabelVarName _JL%s # Name of GOTO label jmp_buf variable; %s=label
- TempName TEMP%s # Name of general temporary vars; %s=unique id
- DummyName DUMMY%s # Name of throwaway "dummy" vars; %s=unique id
- WithName WITH%s # Name of WITH statement temp ptr; %s=unique id
- ForName FORLIM%s # Name of FOR statement temp limit; %s=unique id
- PtrName PTR%s # Name of NIL-checking temp ptr; %s=unique id
- StringName STR%s # Name of temporary string vars; %s=unique id
- SetName SET%s # Name of temporary set vars; %s=unique id
- FNVarName %s_NAME # Name of file-name vars; %s=file var
- FNSizeName _FNSIZE # Maximum length of file name (macro or integer)
- AlternateName1 %s_ # Way to produce a second C symbol for a Pascal
- # symbol, where original symbol was %s. Default
- # is to use AlternateName with %d=1.
- AlternateName2 # A second alternate for %s.
- AlternateName # A %d'th name for %s. %s and %d may appear in
- # either order. Default is %d applications of
- # AlternateName1.
- ExportSymbol # Name of exported symbol %s. E.g.: "P_%s"
- # Default=%s, i.e., don't mess with the name.
- # %s is Pascal symbol name; %S is module name.
- Export_Symbol # Exported-symbol format to be used when the
- # symbol %s contains an '_'. Default=use
- # ExportSymbol format for every symbol.
- Alias # Name of external proc or var; default="%s".
- # If does not contain a "%s", this simply
- # renames the next defined symbol of any kind.
- Synonym # Format: Synonym name = newname
- Synonym # Treat the word "name" in the input file
- Synonym # exactly the same as the keyword or identifier
- Synonym # "newname". If "newname" is omitted, ignore
- Synonym # the word "name" in the input. For example:
- Synonym # "Synonym andthen = and" creates a keyword;
- Synonym # "Synonym allocmem = getmem" simulates a
- Synonym # built-in function "allocmem" which acts like
- Synonym # Turbo's "getmem"; "Synonym segment" ignores
- Synonym # the word "segment" in the input.
- NameOf # Format: NameOf name = newname
- NameOf # Rename the specified symbol. The name may
- NameOf # be of the form "modulename.name" or
- NameOf # "procname.name"; otherwise, all usages of
- NameOf # the symbol are renamed.
- VarMacro # Format: VarMacro varname = C-expression
- VarMacro # Must come before the declaration of variable
- VarMacro # "varname". Causes all references to the
- VarMacro # variable to use the C expression instead.
- VarMacro # In the expr, all C operators are supported;
- VarMacro # all identifier names are used verbatim.
- VarMacro # Also works for Turbo Pascal typed-constants.
- VarMacro # Suppresses declaration of variable unless
- VarMacro # "varname" appears in the C expression.
- VarMacro # Simple algebra is used for assignments to
- VarMacro # vars with expr definitions: if X -> 2*V+1,
- VarMacro # then "X:=Y" translates to "V=(Y-1)/2".
- ConstMacro # Analogous to VarMacro, but for constants and
- ConstMacro # enumeration constants. In an enum constant,
- ConstMacro # if the C-expression is a single name the
- ConstMacro # result is equivalent to Alias or NameOf.
- FieldMacro # Format: FieldMacro rec.field = C-expression
- FieldMacro # where "rec" is a record type name which
- FieldMacro # also appears in the C-expression. For
- FieldMacro # example: FieldMacro obj.foo = bar(obj) causes
- FieldMacro # the field "foo" of record type "obj" to be
- FieldMacro # referenced through the function or macro
- FieldMacro # "bar", rather than using dot notation.
- FuncMacro # Format: FuncMacro foo(a,b,c) = C-expression
- FuncMacro # where "a", "b", "c" are arbitrary arg names
- FuncMacro # also appearing in the C-expression. "Foo"
- FuncMacro # is a procedure or function defined or to be
- FuncMacro # defined in the code, or predefined in Pascal.
- FuncMacro # E.g.: FuncMacro PtInRect(p,r) = PtInRect(p,&r)
- FuncMacro # causes "r" to be treated as a VAR param even
- FuncMacro # though otherwise it would be passed by value.
- WarnMacros # 1=warn if Var/Const/Field/FuncMacro not used
- # 0 or default=don't care.
- SpecialMalloc # Format: SpecialMalloc x.y.z = funcname
- SpecialMalloc # where x is a type name, and y and z are
- SpecialMalloc # optional variant tags for records. The
- SpecialMalloc # statement "new(p,y,z)" where p is a pointer
- SpecialMalloc # to x is converted to p = funcname().
- SpecialFree # Like SpecialMalloc, but defines a special
- SpecialFree # function for freeing things of a given type.
- SpecialSizeOf # Like SpecialMalloc, but defines a name or
- SpecialSizeOf # other integer-valued C expression which is
- SpecialSizeOf # the size of an object of the given type.
- AvoidName getc # If any of these names appear in the code,
- AvoidName putc # use an alternate name so as to avoid
- AvoidName getchar # library conflicts.
- AvoidName putchar
- AvoidName feof # These are typically macro names whose use
- AvoidName ferror # would be disasterous under any
- AvoidName clearerr # circumstances.
- AvoidName fileno
- AvoidName BUFSIZ NULL EOF
- AvoidName stdin stdout stderr
- AvoidName true false assert
- AvoidName Anyptr Void Char PP PV
- AvoidName Signed Const Volatile Register Static Local Inline
- AvoidName cdecl far near huge
- AvoidName isalpha isupper islower isdigit isxdigit isspace ispunct
- AvoidName isalnum isprint isgraph iscntrl isascii toascii
- AvoidName toupper tolower
- AvoidName LINK SEXT
- AvoidGlobalName fopen # These names should be avoided in global
- AvoidGlobalName fclose # contexts, but they are okay as local names.
- AvoidGlobalName fseek
- AvoidGlobalName exit main
- AvoidGlobalName strcpy strcat
- AvoidGlobalName printf fprintf sprintf
- AvoidGlobalName scanf fscanf sscanf
- AvoidGlobalName malloc realloc free
- AvoidGlobalName y0 y1 yn j0 j1 jn # from math.h -- urghhh!
- # ... we should define lots more of these!
- WarnName # A similar list of names to leave alone, but
- WarnName # generate warnings for if they are defined.
- WarnNames # 1=All vars, consts, types, procs, fields
- # defined after this point should generate
- # warnings if used.
- # 0 or default=no warnings for future names
- WarnLibrary # A list of C functions, any calls to which
- WarnLibrary # should generate warnings.
- # TARGET LIBRARY
- QuoteIncludes # 1 or default=write #include "foo.h"
- # 0=write #include <foo.h>
- IncludeFrom # Names of modules which need special
- IncludeFrom # #include file names. Formats:
- IncludeFrom # IncludeFrom foo bar.h => #include <bar.h>
- IncludeFrom # if QuoteIncludes=0 else #include "bar.h"
- IncludeFrom # IncludeFrom foo <bar.h> => #include <bar.h>
- IncludeFrom # IncludeFrom foo "bar.h" => #include "bar.h"
- IncludeFrom # IncludeFrom foo => no #include at all
- IncludeFrom iodeclarations <p2c/iodecl.h>
- IncludeFrom system
- IncludeFrom printer
- IncludeFrom dos
- IncludeFrom crt
- ImportFrom # Names of modules whose import text
- ImportFrom # resides in the specified files.
- ImportFrom # E.g.: ImportFrom mymod /usr/me/mymod.imp
- ImportFrom # These are the Turbo Pascal standard units
- ImportFrom system %H/turbo.imp
- ImportFrom printer %H/turbo.imp
- ImportFrom dos %H/turbo.imp
- ImportFrom crt %H/turbo.imp
- ImportFrom graph %H/turbo.imp
- ImportDir %_s.pas # Search list of other places to look for
- ImportDir %_s.text # the module named %s.
- ImportDir %H/%_s.imp
- IncludeDir %_s # Search list of places to look for the
- IncludeDir %_s.pas # Pascal include file %s.
- IncludeDir %_s.text
- IncludeDir %H/%_s.pas
- LibraryFile %H/system.imp # Names of import-text files to search
- LibraryFile # always (as if "-s name" were used).
- StructFunction sprintf # Names of "structured functions".
- StructFunction memcpy memmove
- StructFunction strcpy strsub strrtrim strrpt
- StructFunction P_addset P_addsetr P_remset
- StrlapFunction P_setunion # Names of "structured functions" which
- StrlapFunction P_setint # allow duplication of their arguments.
- StrlapFunction P_setdiff
- StrlapFunction P_setxor
- StrlapFunction P_expset strlower strupper strpad
- NoSideEffects strcmp memcmp # Names of functions which have absolutely
- NoSideEffects # no side effects on their arguments or
- NoSideEffects # other global state of the program.
- Deterministic abs sin cos # Names of functions which satisfy all
- Deterministic # requirements for NoSideEffects, and
- Deterministic # additionally compute their result
- Deterministic # deterministically (and quickly), without
- Deterministic # any sort of hidden dependencies.
- # (need many more in this list!)
- LeaveAlone # Names of library functions which should
- LeaveAlone # be left alone, rather than translated
- LeaveAlone # into C equivalents. (For example, prevents
- LeaveAlone # converting fwritebytes into C fwrite.)
- HeaderName <p2c/p2c.h> # Name of standard p2c header file
- UCharName uchar # Name of a typedef for "unsigned char";
- # default="char" or "unsigned char".
- SCharName schar # Name of a typedef for "signed char";
- # default="char" or "signed char".
- BooleanName boolean # Name of a typedef for booleans; default=char.
- TrueName true # Name of a boolean "true" constant (optional)
- FalseName false # Name of a boolean "false" constant (opt.)
- NullName NULL # Name of a NULL pointer constant
- ProcTypeName _PROCEDURE # Name of procedure-pointer typedef
- EscapeCodeName P_escapecode # Names of error-handling variables
- IOResultName P_ioresult
- ArgCName P_argc # Name of global copy of argc
- ArgVName P_argv # Name of global copy of argv
- MainName PASCAL_MAIN # Name of program setup function
- EscapeName _Escape # Name of error-generation function
- EscIOName _EscIO # Name of I/O-error-generation function
- CheckIOName _CHKIO # Name of I/O-error-checking function
- SetIOName _SETIO # Name of I/O-error-setting function
- FileNotFoundName FileNotFound # Name or number of "File Not Found" ioresult
- FileNotOpenName FileNotOpen # Name or number of "File Not Open" ioresult
- FileWriteErrorName FileWriteError # Name of num of "File Write Error" ioresult
- BadInputFormatName BadInputFormat # Name or num of "Bad Input Format" ioresult
- EndOfFileName EndOfFile # Name or number of "End of File" ioresult
- OutMemName _OutMem # Name of out-of-memory error function
- CaseCheckName _CaseCheck # Name of case-out-of-range error function
- NilCheckName _NilCheck # Name of nil-pointer error function
- SetBitsName # Name of macro defined equal to SetBits
- # default=compile SetBits in-line
- SprintfValue # 1=sprintf() returns its first argument
- # 0=sprintf() returns a character count
- # default=don't know (unless AnsiC=1)
- # -2=don't know regardless of AnsiC
- # 2=don't use sprintf in expressions
- SprintfName # If SprintfValue != 1, this is the name
- # of a sprintf-like function which returns
- # its first argument. Default=no such
- # function exists.
- MemCpyName # Methods known: "memcpy", "bcopy"
- # default=according to Target, default "memcpy"
- RoundName # Name of function or macro for rounding
- # a real to an integer. Precede name with
- # a '*' if it is a macro that evaluates its
- # arguments more than once. Default=do it
- # by hand.
- DivName # Name of function or macro for Pascal integer
- # division where numerator may be negative.
- # Use '*' if macro; default=use regular '/'.
- ModName # Name of function or macro for Pascal integer
- # modulo where numerator may be negative.
- # Use '*' if macro; default=use regular '%'.
- RemName # Name of function or macro for VAX Pascal
- # REM where numerator or denominator may be
- # negative. Use '*' if macro; default=use MOD.
- AbsName labs # Name of function for computing ABS of a
- # "long" value. Precede with '*' if a
- # macro. Default=by hand, or "labs" in AnsiC.
- OddName # Name of a macro for computing ODD of an
- # integer. Default=x&1.
- EvenName # Name of a macro for computing NOT ODD of
- # an integer. Default=!odd(x).
- SwapName _swap # Name of Turbo-like swap() function.
- StrCpyLeft # 1 or default=strcpy(s1,s2) works even if
- # s1 and s2 overlap, provided s1 <= s2.
- # 0=strcpy(s1,s2) does not allow overlap.
- StrCICmpName strcicmp # Name of a strcicmp-like function; no default
- StrSubName strsub # Name of a strsub-like function; no default
- StrPosName strpos2 # Name of a strpos2-like function; no default
- StrDeleteName strdelete # Name of a strdelete-like function; no default
- StrInsertName strinsert # Name of a strinsert-like function; no default
- StrMoveName strmove # Name of a strmove-like function; no default
- StrLTrimName strltrim # Name of a strltrim-like function; no default
- StrRTrimName strrtrim # Name of a strrtrim-like function; no default
- StrRptName strrpt # Name of a strrpt-like function; no default
- StrPadName strpad # Name of a pad-like function; no default
- MallocName Malloc # Name of a malloc-like function; default=malloc
- FreeName Free # Name of a dispose-like function; default=free
- FreeRvalueName FreeR # Name of a free-like function; default=free
- RandRealName _randreal # Name of a Turbo "random" function; no default
- RandIntName _randint # Name of a Turbo "random()" function; no def
- RandomizeName _randomize # Name of a Turbo "randomize" procedure
- SkipSpaceName _skipspaces # Name of a Turbo seekeof/seekeoln skipper
- ReadlnName # Name of function or macro to skip past eoln.
- # Special names: fgets=use fgets with dummy var
- # scanf=use scanf/fscanf
- # Default=use whichever method works out best
- FreopenName # Name of function or macro that acts like
- # freopen(n,m,f), but if f==NULL acts like
- # fopen(n,m). Default=do it by hand.
- # "fopen"=assume not reopening files.
- # "fclose"=fclose first, then fopen.
- EofName P_eof # Name of "feof" with Pascal semantics.
- EolnName P_eoln # Name of "eoln" function.
- FilePosName ftell # Name of "filepos" function.
- MaxPosName P_maxpos # Name of "maxpos" function.
- SetUnionName P_setunion # Name of a set "+" function; no default
- SetIntName P_setint # Name of a set "*" function; no default
- SetDiffName P_setdiff # Name of a set "-" function; no default
- SetXorName P_setxor # Name of a set "/" function; no default
- SetInName P_inset # Name of a set "IN" function; no default
- SetAddName P_addset # Name of a set "a:=a+[x]" function; no default
- SetAddRangeName P_addsetr # Name of a set "a:=a+[x..y]" function; no def
- SetRemName P_remset # Name of a set "a:=a-[x]" function; no default
- SetEqualName P_setequal # Name of a set "=" function; no default
- SubSetName P_subset # Name of a set "<=" function; no default
- SetCopyName P_setcpy # Name of a set ":=" function; no default
- SetExpandName P_expset # Name of small-set-to-set expander; no default
- SetPackName P_packset # Name of set-to-small-set packer; no default
- SignExtendName SEXT # Name of macro to sign-extend a number.
- GetBitsName *P_getbits_%s # Name of family of array-unpacking functions.
- # Precede name with '*' if a macro. %s will
- # expand to S (for signed) or U (for unsigned),
- # followed by B (big array) or S (small array).
- PutBitsName *P_putbits_%s # Name of family of functions which 'OR' a
- # value into an element of a packed array.
- # %s expands to S or U, followed by B or S.
- # Use '*' if macro. Default=use StoreBits.
- ClrBitsName *P_clrbits_%s # Name of family of functions which zero an
- # element of a packed array. %s expands
- # to B or S only. Use '*' if macro.
- # Default=use StoreBits.
- StoreBitsName # Name of a family of functions or macros
- # which act just like PutBits, but overwrite
- # the array element rather than OR'ing.
- # Default=use ClrBits followed by PutBits.
- # At least StoreBits or both PutBits and
- # ClrBits must be defined.
- DeclBufName FILEBUF # Name of a macro for declaring the file
- # buffer for a file using GET and PUT.
- DeclBufNCName # Name of a DeclBufName-like macro with two
- # arguments (no storage class), in case your
- # compiler can't handle null macro arguments.
- BufferedFile # Names of file variables that use GET/PUT/^
- BufferedFile # notation instead of READ/WRITE notation.
- BufferedFile # Mostly useful for globals; locals are
- BufferedFile # detected automatically. May be a var name,
- BufferedFile # field name, proc.var, type.field, or
- BufferedFile # "1"=use buffers for all files.
- UnBufferedFile # Names of files that will not be buffered,
- UnBufferedFile # even if they would otherwise be. Syntax
- UnBufferedFile # same as for BufferedFile.
- ResetBufName RESETBUF # Name of a macro for setting up a file
- # buffer in "read" mode. (For RESET.)
- SetupBufName SETUPBUF # Name of a macro for setting up a file
- # buffer in read/write mode. (For OPEN, SEEK.)
- GetFBufName GETFBUF # Name of a macro for accessing a file
- # buffer using "file^" notation.
- GetName GET # Name of a macro for advancing
- # to the next element of an input file.
- PutFBufName PUTFBUF # Name of a macro for storing an element
- # of a file using "file^" notation.
- PutName PUT # Name of a macro for advancing
- # to the next element of an output file.
- CharGetFBufName P_peek # A special GetFBuf for text and files of char.
- CharGetName getc # A special Get for text and files of char.
- CharPutFBufName CPUTFBUF # A special PutFBuf for text and files of char.
- CharPutName CPUT # A special Put for text and files of char.
- ArrayGetFBufName AGETFBUF # A special GetFBuf for files of arrays.
- ArrayGetName # A special Get for files of arrays.
- ArrayPutFBufName APUTFBUF # A special PutFBuf for files of arrays.
- ArrayPutName # A special Put for files of arrays.
- # CHECKING
- CaseCheck # 1=check CASE statements without OTHERWISE
- # 0 or default=skip CASE stmt if out of range
- # 2=according to $range$ directives
- ArrayCheck # 1=check array bounds
- # 0 or default=do not check array bounds
- # 2=according to $range$ directives
- # (not yet implemented)
- NilCheck # check pointer dereferences (0, 1, or 2)
- RangeCheck # enable other range checking (0, 1, or 2):
- # string indexing, ...?
- # (not yet implemented)
- MallocCheck # 1=check if malloc returns NULL
- # 0 or default=assume malloc never returns NULL
- # (often used with MallocName; see above)
- CheckFileOpen # 1 or default=check for errors during open,
- # 0=assume file opens successfully
- # 2=check only when $iocheck off$ or {$I-}
- CheckFileIsOpen # 1=check for "file not open" error,
- # 0 or default=eof, etc., assume file is open
- # 2=check only when $iocheck off$ or {$I-}
- CheckFileWrite # 1=check for errors during write
- # 0=ignore write errors
- # 2 or default=only when $iocheck off$ or {$I-}
- CheckReadFormat # 1=check for "bad format" errors during read
- # 0=ignore read format errors
- # 2 or default=only when $iocheck off$ or {$I-}
- CheckFileEOF # 1=check for "past EOF" errors reading files
- # 0=ignore file EOF errors
- # 2 or default=only when $iocheck off$ or {$I-}
- CheckStdinEOF # 1=check for "past EOF" errors reading stdin
- # 0=ignore stdin EOF errors
- # 2 or default=only when $iocheck off$ or {$I-}
- CheckFileSeek # 1=check for errors during seek
- # 0=ignore seek errors
- # 2 or default=only when $iocheck off$ or {$I-}
- Include %H/loc.p2crc # Include any local modifications to this file.
- # End of p2crc