/* AutoGenerated on 29-MAR-2007 15:33:04.35 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. --------------------------------------------------------------------------- Copyright 1989-1992 (c) Chau-Kuang Hung Copyright 1994-1999 (c) Jérôme Lauret */ #ifdef __STDC__ #define __GNU_HACKS_string(foo) #foo #define __GNU_HACKS_const __const #else #define __GNU_HACKS_string(foo) "foo" #define __GNU_HACKS_const #endif #ifdef __GNUC__ # define GLOBALREF(TYPE,NAME) TYPE NAME __asm("_$$PsectAttributes_GLOBALSYMBOL$$" __GNU_HACKS_string(NAME)) # define GLOBALDEF(TYPE,NAME,VALUE) TYPE NAME __asm("_$$PsectAttributes_GLOBALSYMBOL$$" __GNU_HACKS_string(NAME)) = VALUE # define GLOBALVALUEREF(TYPE,NAME) __GNU_HACKS_const TYPE NAME[1] __asm("_$$PsectAttributes_GLOBALVALUE$$" __GNU_HACKS_string(NAME)) # define GLOBALVALUEDEF(TYPE,NAME,VALUE) __GNU_HACKS_const TYPE NAME[1] __asm("_$$PsectAttributes_GLOBALVALUE$$" __GNU_HACKS_string(NAME)) = {VALUE} #else # define GLOBALREF(TYPE,NAME) globalref TYPE NAME # define GLOBALDEF(TYPE,NAME,VALUE) globaldef TYPE NAME = VALUE # define GLOBALVALUEDEF(TYPE,NAME,VALUE) globalvalue TYPE NAME = VALUE # define GLOBALVALUEREF(TYPE,NAME) globalvalue TYPE NAME #endif #pragma nostandard GLOBALVALUEREF(unsigned int,DXM__BADPARSE); GLOBALVALUEREF(unsigned int,DXM__SFC); GLOBALVALUEREF(unsigned int,DXM__NANSITERM); GLOBALVALUEREF(unsigned int,DXM__NONVT100CRT); GLOBALVALUEREF(unsigned int,DXM__PGLEN); GLOBALVALUEREF(unsigned int,DXM__PGWID); GLOBALVALUEREF(unsigned int,DXM__OPENIN); GLOBALVALUEREF(unsigned int,DXM__CLIPAR); GLOBALVALUEREF(unsigned int,DXM__ERRMSG); #pragma standard /* There are 2 ways one can implement the signal handler within both GCC and DEC-C : 1) Still use lib$signal() --> if you get it to work with GCC, let me know 2) Use hack$signal with the _msg_hack symbols. */ #ifndef __GNUC__ /* Use lib$signal() and hack symbols */ # define hack$signal lib$signal # define hack$establish(a) lib$establish(a) # define hack$revert() lib$revert() # define DXM__BADPARSE_msg_hack DXM__BADPARSE # define DXM__SFC_msg_hack DXM__SFC # define DXM__NANSITERM_msg_hack DXM__NANSITERM # define DXM__NONVT100CRT_msg_hack DXM__NONVT100CRT # define DXM__PGLEN_msg_hack DXM__PGLEN # define DXM__PGWID_msg_hack DXM__PGWID # define DXM__OPENIN_msg_hack DXM__OPENIN # define DXM__CLIPAR_msg_hack DXM__CLIPAR # define DXM__ERRMSG_msg_hack DXM__ERRMSG #else /* Extraneous #define is for GCC support only */ # define hack$signal DXM__signal # define hack$establish(a) /* a */ # define hack$revert() /* Missing $revert at link time on AXP */ # define DXM__BADPARSE ((unsigned int) DXM__BADPARSE) # define DXM__BADPARSE_msg_hack "F","BADPARSE","Error parsing command line",0 # define DXM__SFC ((unsigned int) DXM__SFC) # define DXM__SFC_msg_hack "F","SFC","RTL or system service error at line %d in %s" # define DXM__NANSITERM ((unsigned int) DXM__NANSITERM) # define DXM__NANSITERM_msg_hack "E","NANSITERM","SYS$OUTPUT must be an ANSI CRT",0 # define DXM__NONVT100CRT ((unsigned int) DXM__NONVT100CRT) # define DXM__NONVT100CRT_msg_hack "E","NONVT100CRT","SYS$OUTPUT must be a VT-100 CRT",0 # define DXM__PGLEN ((unsigned int) DXM__PGLEN) # define DXM__PGLEN_msg_hack "E","PGLEN","terminal page length too small",0 # define DXM__PGWID ((unsigned int) DXM__PGWID) # define DXM__PGWID_msg_hack "E","PGWID","terminal page width too small",0 # define DXM__OPENIN ((unsigned int) DXM__OPENIN) # define DXM__OPENIN_msg_hack "E","OPENIN","error opening %s as input" # define DXM__CLIPAR ((unsigned int) DXM__CLIPAR) # define DXM__CLIPAR_msg_hack "W","CLIPAR","CLI error : %s" # define DXM__ERRMSG ((unsigned int) DXM__ERRMSG) # define DXM__ERRMSG_msg_hack "I","ERRMSG","returned error was %s" #ifndef DXM_SIGNAL_ROUTINE_HEADER #define DXM_SIGNAL_ROUTINE_HEADER /* provided DXM__signal routine */ #include #include #include void DXM__signal(char *sev,char *typ,char *mess,int id, ...) { char buf[2048]; va_list args; va_start(args,id); vsprintf(buf,mess,args); fprintf(stderr,"%%DXM-%s-%s, %s\n",sev,typ,buf); if (*sev == 'F') abort(); } #endif #endif /* GNUC or not */