From: @uproar.enet.DEc.COM (Tim Murnaghan, ime196::tpm)
Newsgroups: gnu.g++.bug
Subject: setjmp problem
Date: 22 Jan 1993 21:25:41 -0500
Organization: GNUs Not Usenet
Distribution: gnu

The following program which calls setjmp causes endless recursion in
setjmp_protect because of a circular block chain.
It's pretty simple to have setjmp_protect protect itself against this; but how
did the block chain get to be circular ?

+ g++ -v -O -g -I. -I../. -I.././inc -I.././clib -DTRACE -c ../vsxconf.cc -o vsxconf.o 
gcc version 2.3.3
 /usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/cpp -lang-c++ -v -I. -I../. 
-I.././inc -I.././clib -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Di386 
-Dunix -D__i386__ -D__unix__ -D__i386 -D__unix -D__OPTIMIZE__ -g -D_M_I386 
-D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT -D_M_UNIX -D_M_XENIX -D_M_SYS5 
-D_M_SYSV -D_M_SYS3 -D_M_SYSIII -D_M_COFF -D_M_BITFIELDS -D_M_WORDSWAP 
-DM_I386 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT -DM_UNIX -DM_XENIX -DM_SYS5 
-DM_SYSV -DM_SYS3 -DM_SYSIII -DM_COFF -DM_BITFIELDS -DM_WORDSWAP -DTRACE 
../vsxconf.cc /usr/tmp/cca14751.i
GNU CPP version 2.3.3 (80386, ATT syntax)
/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/cc1plus /usr/tmp/cca14751.i -quiet
 -dumpbase vsxconf.cc -g -O -version -o /usr/tmp/cca14751.s
GNU C++ version 2.3.3 (80386, ATT syntax) compiled by GNU C version 2.3.3.
..... wait a long time for a core dump
-------------------- cut here --------------------
# 1 "../vsxconf.cc"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
extern yyparse();
extern yydebug;
extern init_lex();

# 1 "/usr/local/lib/g++-include/std.h" 1 3
 
 




















# 1 "/usr/local/lib/g++-include/_G_config.h" 1 3
  






typedef long _G_clock_t;
typedef short _G_dev_t;
typedef long _G_fpos_t;
typedef unsigned short _G_gid_t;
typedef unsigned short _G_ino_t;
typedef unsigned short _G_mode_t;
typedef short _G_nlink_t;
typedef long _G_off_t;
typedef short _G_pid_t;
typedef int _G_ptrdiff_t;
typedef int   _G_sigset_t;
typedef unsigned int _G_size_t;
typedef long _G_time_t;
typedef unsigned short _G_uid_t;
typedef long int _G_wchar_t;
typedef  int   _G_ssize_t;
typedef char * _G_va_list;











 






 
 

# 23 "/usr/local/lib/g++-include/std.h" 2 3

# 1 "/usr/local/lib/g++-include/stddef.h" 1 3


extern "C" {



# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stddef.h" 1 3




 






 




 


 





 

# 43 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stddef.h" 3


 





 

 



















typedef int ptrdiff_t;








 




 

 





















typedef unsigned int size_t;












 




 




















 

typedef __wchar_t wchar_t;














 



# 179 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stddef.h" 3




 









 








# 7 "/usr/local/lib/g++-include/stddef.h" 2 3




}

# 24 "/usr/local/lib/g++-include/std.h" 2 3

# 1 "/usr/local/lib/g++-include/stdlib.h" 1 3







extern "C" {

int       abs(int);


void volatile abort(void);




double    atof(const char*);
int       atoi(const char*);
long      atol(const char*);

int       atexit(auto void (*p) (void));
int       bsearch (const void *, const void *, size_t, 
                   size_t, auto int (*ptf)(const void*, const void*));
void*     calloc(size_t, size_t);
void      cfree(void*);


void volatile exit(int);




char*     fcvt(double, int, int*, int*);
void      free(void*);
char*     getenv(const char*);
int       getopt(int, char * const *, const char*);
int       getpw(int, char*);
char*     gcvt(double, int, char*);
char*     ecvt(double, int, int*, int*);
extern char**   environ;

long      labs(long);
void*     malloc(size_t);
size_t    malloc_usable_size(void*);
int       putenv(const char*);
extern char*    optarg;
extern int      opterr;
extern int      optind;
void      qsort(void*, size_t, size_t, auto int (*ptf)(void*,void*));
int       rand(void);
void*     realloc(void*, size_t);
int       setkey(const char*);
int       srand(unsigned int);
double    strtod(const char*, char**);
long      strtol(const char*, char**, int);
unsigned long stroul(const char**, int);
int       system(const char*);

long      random(void);
void      srandom(int);
char*     setstate(char*);
char*     initstate(unsigned, char*, int);

double    drand48(void);
void      lcong48(short*);
long      jrand48(short*);
long      lrand48(void);
long      mrand48(void);
long      nrand48(short*);
short*    seed48(short*);
void      srand48(long);

char*     ctermid(char*);
char*     cuserid(char*);
char*     tempnam(const char*, const char*);
char*     tmpnam(char*);

}

# 25 "/usr/local/lib/g++-include/std.h" 2 3

# 1 "/usr/local/lib/g++-include/string.h" 1 3














extern "C" {

char*     strcat(char*, const char*);
char*     strchr(const char*, int);
int       strcmp(const char*, const char*);
int       strcoll(const char*, const char*);
char*     strcpy(char*, const char*);
_G_size_t     strcspn(const char*, const char*);
char*     strdup(const char*);
 
 
 
 
_G_size_t     strlen(const char*);
char*     strncat(char*, const char*, _G_size_t );
int       strncmp(const char*, const char*, _G_size_t );
char*     strncpy(char*, const char*, _G_size_t );
char*     strpbrk(const char*, const char*);
char*     strrchr(const char*, int);
_G_size_t     strspn(const char*, const char*);
char*     strstr(const char*, const char *);
char*     strtok(char*, const char*);
_G_size_t     strxfrm(char*, const char*, _G_size_t );

char*     index(const char*, int);
char*     rindex(const char*, int);
}

# 1 "/usr/local/lib/g++-include/memory.h" 1 3







extern "C" {

void*     memalign (...) ;
void*     memccpy (...) ;
void*     memchr (...) ;
int       memcmp (...) ;
void*     memcpy (...) ;
void*     memmove (...) ;
void*     memset (...) ;
int       ffs (...) ;



_G_size_t    getpagesize (...) ;

void*     valloc (...) ;

void      bcopy (...) ;
int       bcmp (...) ;
void      bzero (...) ;
}














# 43 "/usr/local/lib/g++-include/string.h" 2 3



# 26 "/usr/local/lib/g++-include/std.h" 2 3


# 1 "/usr/local/lib/g++-include/unistd.h" 1 3





extern "C" {


















# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/unistd.h" 1 3
 













#pragma comment(exestr, "@(#) unistd.h 7.1 91/08/14 ")




# 1 "/usr/local/lib/g++-include/sys/types.h" 1 3


extern "C"
{










# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/sys/types.h" 1 3



#pragma comment(exestr, "@(#) types.h 23.14 91/11/23 ")



 









 
 

 
 
 

 
 

 
 


















typedef	struct { int r[1]; } *physadr;
typedef	long		daddr_t;	 
typedef	char *		caddr_t;	 

 


typedef	unsigned char	unchar;
typedef unsigned char   u_char;
typedef unsigned char	uchar_t;

typedef	unsigned short	ushort;
typedef unsigned short  u_short;

typedef	unsigned int	uint;
typedef unsigned int    u_int;

typedef	unsigned long	ulong;
typedef unsigned long   u_long;
typedef unsigned long	ulong_t;





typedef	unsigned short		ino_t;		 



	typedef short		cnt_t;		 







	typedef	long		time_t;		 



typedef	int		label_t[6];


typedef unsigned short	mode_t;
typedef short		nlink_t;
typedef	short		dev_t;		 
typedef	long		off_t;		 


typedef	unsigned long	paddr_t;	 
typedef unsigned short	mloc_t;		 



typedef	long		key_t;		 



typedef int		pfn_t;
typedef	unsigned short	use_t;		 







	typedef	char *		faddr_t;








struct saddr {
	unsigned short	sa_seg;
	long			sa_off;
};

typedef	short		sysid_t;
typedef	short		index_t;
typedef	short		lock_t;		 











typedef ushort		sel_t;		 


 


	typedef	long	clock_t;	 










	typedef long	fpos_t;	 




	typedef	int	sig_atomic_t;	 




	typedef	struct {
		int	quot;
		int	rem;
	} div_t;




typedef	struct {
	long	quot;
	long	rem;
} ldiv_t;




typedef unsigned short	uid_t;
typedef unsigned short	gid_t;

typedef short	pid_t;                   




 













typedef long	fd_mask;






typedef	struct fd_set {
	fd_mask	fds_bits[(((150 )+(( (sizeof(fd_mask) * 8		)	)-1))/( (sizeof(fd_mask) * 8		)	)) ];
} fd_set;






							 
typedef unsigned long	mask_t;		 
typedef mask_t		priv_t;		 
							 



# 15 "/usr/local/lib/g++-include/sys/types.h" 2 3






}




# 20 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/unistd.h" 2 3

# 1 "/usr/include/sys/unistd.h" 1 3



#pragma comment(exestr, "@(#) unistd.h 23.6 91/10/01 ")



 









 
 

 
 
 

 

 



  
 












 





 




 


















 












 





















# 21 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/unistd.h" 2 3


# 31 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/unistd.h" 3


# 82 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/unistd.h" 3



extern "C" {
extern int utime(const char *, struct utimbuf *);  


extern int        __hide_chown (const char *, uid_t, gid_t);
extern pid_t      fork(void);
extern gid_t      getegid(void);
extern uid_t      geteuid(void);
extern gid_t      getgid(void);
extern int        getgroups(int, gid_t *);
extern pid_t      getpgrp(void);
extern pid_t      getpid(void);
extern pid_t      getppid(void);
extern uid_t      getuid(void);
extern off_t      lseek(int, off_t, int);
extern int        __hide_setgid (gid_t);
extern int        setpgid(pid_t, pid_t);
extern pid_t      setsid(void);
extern int        __hide_setuid (uid_t);
extern pid_t      tcgetpgrp(int);
extern int        tcsetpgrp(int, pid_t);
extern char*        getcwd(char *, int);
extern char*        getlogin(void);
extern char*        ttyname(int);
extern void         _exit(int);
extern int          access(const char *, int);
extern unsigned int alarm(unsigned int);
extern int          chdir(const char *);
extern int          close(int);
extern char*        ctermid(char *);
extern char*        cuserid(char *);
extern int          dup(int);
extern int          dup2(int, int);
extern int          __hide_execl (const char *, const char *, ...);
extern int          __hide_execle (const char *, const char *, ...);
extern int          __hide_execlp (const char *, const char *, ...);
extern int          execv(const char *, const char *[]);
extern int          execve(const char *, const char * [], const char * []);
extern int          execvp(const char *, const char * []);
extern long         fpathconf(int, int);
extern int          isatty(int);
extern int          link(const char *, const char *);
extern long         pathconf(const char *, int);
extern int          pause(void);
extern int          pipe(int *);
extern int          read(int, void *, unsigned int);
extern int          rename(const char *, const char *);
extern int          rmdir(const char *);
extern unsigned int sleep(unsigned int);
extern long         sysconf(int);
extern int          unlink(const char *);
extern int          write(int, const void *, unsigned int);


};





# 25 "/usr/local/lib/g++-include/unistd.h" 2 3















# 59 "/usr/local/lib/g++-include/unistd.h" 3



extern void volatile _exit(int);




extern unsigned alarm (...) ;
extern int      brk (...) ;
extern int      chdir (...) ;
extern int      chmod  (...) ;
extern int      chown (const char*, _G_uid_t, _G_gid_t);
extern int      close (...) ;
extern char*    crypt (...) ;
extern int      dup (...) ;
extern int      dup2 (...) ;
extern void	encrypt (...) ;
extern int      execl (const char*, const char *, ...);
extern int      execle (const char*, const char *, ...);
extern int      execlp (const char*, const char*, ...);
extern int      exect (...) ;
extern int      execv (...) ;
extern int      execve (...) ;
extern int      execvp (...) ;
extern int      fchown (int, _G_uid_t, _G_gid_t);
extern _G_pid_t fork (...) ;
extern int      fsync (...) ;
extern int      ftruncate (...) ;
extern char*    getcwd (...) ;
extern int      getdomainname (...) ;
extern int      getdtablesize (...) ;
extern int      getgroups (...) ;
extern _G_uid_t geteuid (...) ;
extern _G_gid_t getegid (...) ;
extern _G_gid_t getgid (...) ;
extern long     gethostid (...) ;
extern int      gethostname (...) ;
extern _G_pid_t getpgrp (...) ;
extern _G_pid_t getpid (...) ;
extern _G_pid_t getppid (...) ;
extern char*    getlogin (...) ;
extern char*    getpass (...) ;
extern _G_uid_t getuid (...) ;
extern int      ioctl (int, int, ... );
extern int      isatty (...) ;
extern int      link (...) ;
extern int      mkstemp (...) ;
extern char*    mktemp (...) ;
extern int      nice (...) ;
extern int      pause (...) ;
extern int      pipe (...) ;
extern int      readlink (...) ;
extern int      rename (...) ;
extern int      rmdir (...) ; 



extern void*    sbrk (...) ; 

extern int      syscall (...) ;
extern int      setgid (_G_gid_t);
extern int      sethostname (...) ;




extern _G_pid_t setpgrp (...) ;

extern int      setregid (...) ;
extern int      setreuid (...) ;
extern int      setuid (_G_uid_t);
extern unsigned sleep (...) ;
extern void     swab (...) ;
extern int      symlink (...) ;
extern long     sysconf (...) ;
extern int      truncate (...) ;
extern char*    ttyname (...) ;
extern int      ttyslot (...) ;
 
extern int      unlink (...) ;
extern _G_pid_t vfork (...) ;
extern int      vadvise (...) ;
extern int      vhangup (...) ;
extern _G_off_t lseek (...) ;
extern _G_ssize_t read (...) ;
extern _G_ssize_t write (...) ;
extern int      access (...) ;

extern int      flock (...) ;


}


# 28 "/usr/local/lib/g++-include/std.h" 2 3

# 1 "/usr/local/lib/g++-include/stdio.h" 1 3
 
 


















#pragma interface







 
 
 



extern "C" {

































# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 1 3

# 1 "/usr/local/lib/g++-include/stdarg.h" 1 3
extern "C" {
# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdarg.h" 1 3
 







































 




typedef char *__gnuc_va_list;





 

# 85 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdarg.h" 3










# 137 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdarg.h" 3





# 2 "/usr/local/lib/g++-include/stdarg.h" 2 3

}
# 2 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 2 3



#pragma comment(exestr, "@(#) stdio.h 7.5 91/10/24 ")



 






 


















#pragma comment(exestr, "@(#) stdio.h 7.1 91/08/14 ")








# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/limits.h" 1 3
 


 





 
# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/limits.h" 1 3
 


 

# 99 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/limits.h" 3

# 11 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/limits.h" 2 3





 



 



 



 





 



 












 





 



 





 



 






 




 





 






 



# 44 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 2 3













		














typedef   char         *__va_list__;












 





















typedef struct {

	int            __cnt;
	unsigned char   *__ptr;




	unsigned char   *__base;
	char            __flag;
	char            __file;
} FILE;




































extern "C" {


# 229 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 3

extern   int            remove(const char *);
extern   int            rename(const char *, const char *);
extern   FILE           *tmpfile(void);
extern   char           *tmpnam(char *);
extern   int            fclose(FILE *);
extern   int            fflush(FILE *);
extern   FILE           *__hide_fopen (const char *, const char *);
extern   FILE           *__hide_freopen (const char *, const char *, FILE *);
extern   void           __hide_setbuf (FILE *, char *);
extern   int            __hide_setvbuf (FILE *, char *, int, _G_size_t );
extern   int            __hide_fprintf (FILE *, const char *, ...);
extern   int            __hide_fscanf (FILE *, const char *, ...); 
extern   int            __hide_printf (const char *, ...);
extern   int            __hide_scanf (const char *, ...);
extern   int            __hide_sprintf (char *, const char *, ...);
extern   int            __hide_sscanf (const char *, const char *, ...);

extern   int            __hide_vfprintf (FILE *, const char *, __va_list__);
extern   int            __hide_vprintf (const char *, __va_list__);
extern   int            __hide_vsprintf (char *, const char *, __va_list__);





extern   int            fgetc(FILE *);
extern   char           *fgets(char *, int, FILE *);
extern   int            fputc(int, FILE *);
extern   int            __hide_fputs (const char *, FILE *);
extern   int            getc(FILE *);
extern   int            getchar(void);
extern   char           *gets(char *);
extern   int            putc(int, FILE *);
extern   int            putchar(int);
extern   int            __hide_puts (const char *);
extern   int            ungetc(int, FILE *);




extern   _G_size_t          __hide_fread (void *, _G_size_t , _G_size_t , FILE *);
extern   _G_size_t          __hide_fwrite (const void *, _G_size_t , _G_size_t , FILE *);

extern   int            fgetpos(FILE *, fpos_t *);
extern   int            fseek(FILE *, long int, int);
extern   int            fsetpos(FILE *, const fpos_t *);
extern   long           __hide_ftell (const FILE *);
extern   void           __hide_rewind (FILE *);
extern   void           clearerr(FILE *);
extern   int            feof(FILE *);
extern   int            ferror(FILE *);
extern   void           __hide_perror (const char *);

extern   int            unlink(const char *);
extern   int            _filbuf(FILE *);
extern   int            __hide__flsbuf (unsigned char, FILE *);
extern   char           *ctermid(char *);
extern   char           *cuserid(char *);
extern   int            system(const char *);





















extern   unsigned char  *    _bufendtab [];
extern   FILE           _iob [       60 ];


};












# 1 "/usr/local/lib/g++-include/errno.h" 1 3


extern "C" {





# 1 "/usr/include/errno.h" 1 3
 





















 




#pragma comment(exestr, "@(#) errno.h 6.1 91/06/06 ")




# 1 "/usr/include/sys/errno.h" 1 3



#pragma comment(exestr, "@(#) errno.h 23.4 91/05/03 ")



 









 
 

 
 
 

 









# 76 "/usr/include/sys/errno.h" 3










# 95 "/usr/include/sys/errno.h" 3







# 133 "/usr/include/sys/errno.h" 3






# 150 "/usr/include/sys/errno.h" 3






# 211 "/usr/include/sys/errno.h" 3






# 246 "/usr/include/sys/errno.h" 3



# 33 "/usr/include/errno.h" 2 3



extern "C" {


extern int errno;

# 49 "/usr/include/errno.h" 3



};



# 9 "/usr/local/lib/g++-include/errno.h" 2 3




extern char*    sys_errlist[];
extern int      sys_nerr;

extern int      errno;

void      __hide_perror (const char*);
char*     strerr(int);


}


# 327 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 2 3


















# 353 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/stdio.h" 3
















# 69 "/usr/local/lib/g++-include/stdio.h" 2 3







































}

extern "C" {

int    fclose(FILE*);
FILE*  fdopen(int, const char*);
int    fflush(FILE*);
int    fgetc(FILE*);
char*  fgets(char*, int, FILE *);
FILE*  fopen(const char*, const char*);
int    fprintf(FILE*, const char* ...);
int    fputc(int, FILE*);
int    fputs(const char*, FILE*);
_G_size_t  fread(void*, _G_size_t , _G_size_t , FILE*);



FILE*  freopen(const char*, const char*, FILE*);

int    fscanf(FILE*, const char* ...);
int    fseek(FILE*, long, int);
long   ftell(FILE *);
_G_size_t  fwrite(const void*, _G_size_t , _G_size_t , FILE*);
char*  gets(char*);
int    getw(FILE*);
int    pclose(FILE*);
void   perror(const char*);
FILE*  popen(const char*, const char*);
int    printf(const char* ...);
int    puts(const char*);
int    putw(int, FILE*);
int    rewind(FILE*);
int    scanf(const char* ...);
void   setbuf(FILE*, char*);
void   setbuffer(FILE*, char*, int);
int    setlinebuf(FILE*);
int    setvbuf(FILE*, char*, int, _G_size_t );
int    sscanf(char*, const char* ...);
FILE*  tmpfile();
int    ungetc(int, FILE*);
int    vfprintf (...) ;
int    vprintf (...) ;
int  sprintf (...) ;
int  vsprintf (...) ;

extern int _filbuf (...) ;
extern int _flsbuf (...) ;

}


















# 29 "/usr/local/lib/g++-include/std.h" 2 3


# 1 "/usr/local/lib/g++-include/fcntl.h" 1 3


extern "C" {










# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/fcntl.h" 1 3
 
























#pragma comment(exestr, "@(#) fcntl.h 7.1 91/08/14 ")




# 1 "/usr/local/lib/g++-include/sys/fcntl.h" 1 3


extern "C"
{




# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/sys/fcntl.h" 1 3



#pragma comment(exestr, "@(#) fcntl.h 23.8 91/10/15 ")



 









 
 

 
 
 

 
 

 
 

 























 
 






















 





 

















 




 






 












 
struct flock {
	short	l_type;
	short	l_whence;
	off_t	l_start;
	off_t	l_len;		 




	short   l_sysid;

	pid_t  	l_pid;




};

 















# 9 "/usr/local/lib/g++-include/sys/fcntl.h" 2 3



}



# 31 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/fcntl.h" 2 3












extern "C" {





extern int __hide_creat (const char *, unsigned short);

extern int __hide_fcntl (int, int, ...);



extern int  __hide_open (const char *, int, int mode = 0666);







};













# 14 "/usr/local/lib/g++-include/fcntl.h" 2 3








int       fcntl(int, int, ...);
int	  creat (...) ;

int       open (...) ;


}

# 31 "/usr/local/lib/g++-include/std.h" 2 3


extern "C" {
int strcasecmp (...) ;
}


# 24 "../vsxconf.cc" 2

# 1 "/usr/local/lib/g++-include/time.h" 1 3


extern "C" {








 


















# 44 "/usr/local/lib/g++-include/time.h" 3





# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/time.h" 1 3
 
























#pragma comment(exestr, "@(#) time.h 7.2 91/08/14 ")




# 39 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/time.h" 3


 















struct tm {                      
 int tm_sec;                     
 int tm_min;                     
 int tm_hour;                    
 int tm_mday;                    
 int tm_mon;                     
 int tm_year;                    
 int tm_wday;                    
 int tm_yday;                    
 int tm_isdst;                   

 long __tm_tzadj;                  

   char __tm_name[50 ];        





};

# 88 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/time.h" 3



extern "C" {


extern clock_t __hide_clock (void);
extern double __hide_difftime (time_t, time_t);
extern time_t __hide_mktime (struct tm *);
extern time_t __hide_time (time_t *);
extern char *__hide_asctime (const struct tm *);
extern char  *__hide_ctime (const time_t *);
extern struct tm *__hide_gmtime (const time_t *);
extern struct tm *__hide_localtime (const time_t *);
extern _G_size_t  __hide_strftime (char *, _G_size_t , const char *, const struct tm *);


};




 




# 136 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/time.h" 3







# 49 "/usr/local/lib/g++-include/time.h" 2 3






















extern char* asctime (...) ;
extern char* ctime (...) ;
double difftime (...) ;
extern struct tm* gmtime (...) ;
extern struct tm* localtime (...) ;
extern _G_time_t mktime(struct tm*);
extern _G_size_t strftime (...) ;
extern void tzset();
extern void tzsetwall();

extern int getitimer(int, struct itimerval*);
extern int setitimer (...) ;
extern int gettimeofday(struct timeval*, struct timezone*);
extern int settimeofday (...) ;
extern int stime (...) ;
extern int dysize(int);






long      clock(void);

_G_time_t      time(_G_time_t*);
unsigned  ualarm(unsigned, unsigned);
unsigned  usleep(unsigned);
void      profil (...) ;


}

# 25 "../vsxconf.cc" 2


# 1 ".././inc/CurCU.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



class ControlUnit;
class Diu;
class Scu;
class sym_ent;
class CpuHw;
class SmIdent;
# 1 ".././inc/Fixup.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


# 1 ".././inc/Stamp.h" 1
 
 



# 1 "./istring.h" 1
 
 


 
 
 
 
 
 
 
 

# 1 "/usr/local/lib/g++-include/std.h" 1 3
 
 

















# 37 "/usr/local/lib/g++-include/std.h" 3

# 14 "./istring.h" 2

# 1 "/usr/local/lib/g++-include/stdio.h" 1 3
 
 
















# 174 "/usr/local/lib/g++-include/stdio.h" 3

# 15 "./istring.h" 2

# 1 "./istr_buf.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



class istr_buf
{
  unsigned int buf_len;
  void resize(unsigned int min);
 public:
  void *string;
  unsigned int len;
  istr_buf() { string = 0; len = 0, buf_len = 0; };
  void clear() { if (string) delete string; string = 0; len = 0; buf_len = 0; };
  ~istr_buf() { clear(); }
  void put(const void *p, unsigned int l, int offset = 0);
};

# 16 "./istring.h" 2


class istring : public istr_buf
{
public:
  istring();
  void puts() { ::fputs((char *)string,        (&_iob [2]) ); ::fputc('\n',        (&_iob [2]) );};
  operator char *() { return (char *)string; };
  operator const char *() { return (const char *)string; };
  istring & operator <<(const char *);
  istring & operator <<(const int );
  istring & operator <<(const unsigned int );
  istring & operator <<(const char );
  istring & operator <<(const void *);
  istring & operator <<(istring &p) { return *this << (char *)p.string; };
};

# 6 ".././inc/Stamp.h" 2

# 1 ".././inc/trace.h" 1
 
 


# 1 ".././inc/Object.h" 1
 
 


 
 
 
 
 
 
 

class Object
{
  int j;       
               
public:
	int operator == (Object &x) { return this == &x; };
};

# 5 ".././inc/trace.h" 2


class trace
{
public:

	int con;  
	trace() { con = 0; };



};


# 1 "/usr/local/lib/g++-include/std.h" 1 3
 
 

















# 37 "/usr/local/lib/g++-include/std.h" 3

# 19 ".././inc/trace.h" 2


void trputs(int, char *);
extern int Trace_Indent;















# 46 ".././inc/trace.h"


















# 1 "./istring.h" 1
 
 
# 32 "./istring.h"

# 64 ".././inc/trace.h" 2










# 7 ".././inc/Stamp.h" 2


class Stamp : public trace
{
public:
    const char *file;
    int line;
    Stamp();
    friend istring & operator << (istring &, const Stamp &);
};

# 53 ".././inc/Fixup.h" 2

# 1 "./List.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 


# 1 "/usr/local/lib/g++-include/std.h" 1 3
 
 

















# 37 "/usr/local/lib/g++-include/std.h" 3

# 138 "./List.h" 2




class ListEnt
{
public:
    void  *car;
    ListEnt *cdr;
    ListEnt(void  *a) : car(a) { cdr = 0; };
    ListEnt(void  *a, ListEnt *d) : car(a), cdr(d) { } ;
};

class ListBase {
public:
	int len;
};

class List : public ListBase {
public:
	ListEnt *cdr;
	List() { cdr = 0; len = 0; };
	void  *& operator>>=(void  *);	 
	void *& operator<<=(void  *p)	 
	{ cdr = new ListEnt (p, cdr);
	  len++;
	  return cdr->car;
	};
	void clear();			 
	void *& operator [] (int);	 
	List & operator = (List &l) {
	  clear();
	  cdr = l.cdr;
	  len = l.len;
	  return  *this;
	};
    	~List() { clear(); };
};



class ListIterator
{
	ListEnt *Iterator;
public:
	ListIterator(List &);
	void *& operator()();	     
	int operator()(void *&);     
	void operator =(List &);     
};

class SpliceListIterator
{
    ListEnt *Iterator;
    ListEnt **splice_before;
    ListEnt **splice_after;
    List *list;
public:
    SpliceListIterator(List &l);
    void operator = (List &l);	     
    void operator >>= (void *p);     
    void operator <<= (void *p);     
    int operator () (void *&);	     
    void *& operator ()();	     
    void operator ! ();		     
};





# 248 "./List.h"


# 262 "./List.h"











# 297 "./List.h"



# 54 ".././inc/Fixup.h" 2


 

 

 
 
class Cdecl;
class baseCdecl;
class sym_ent;

 
class Fixer
{
private:
protected:
public:
	Stamp stamp;
	Fixer();
	virtual void callback();
};

class Fixup : public Stamp
{
private:
protected:
	sym_ent *sy;         
	void **where; 	     
	char *type;          
	Fixer *who;          
public:
	Fixup(sym_ent *s, char *t, void **w, Fixer *wh = 0);
	friend istring & operator << (istring &, Fixup &);
	void fixit();         
	void callit();       
};

class FixupList : public List {public:	FixupList () : List() {};
	FixupList & operator =(List &l) { *(List *)this = l; return *this; };
	Fixup *& operator[](int i) { return *(Fixup **)&((*(List*)this)[i]); }; };
class FixupListIterator : public ListIterator {public:	FixupListIterator ( FixupList &l) : ListIterator(l) {};
	Fixup *& operator()() { return *(Fixup **)&((*(ListIterator *)this)()); };
	int operator()(Fixup *&p) { return (*(ListIterator *)this)(*( void **)&p); };
	void operator =(FixupList &l) { *(ListIterator *)this = *(List *)&l; };};
class FixupSpliceListIterator : public SpliceListIterator {public:	FixupSpliceListIterator ( FixupList &l) : SpliceListIterator(l) {};
	Fixup *& operator()() { return *(Fixup **)&((*(SpliceListIterator *)this)()); };
	int operator()(Fixup *&p) { return (*(SpliceListIterator *)this)(*(void **)&p); };
	void operator =(FixupList &l) { *(SpliceListIterator *)this = *(List *)&l; };
}  ;

void FixList(List &, sym_ent *, char*);



# 41 ".././inc/CurCU.h" 2


class CurCU {
 private:
  ControlUnit *cu;
 protected:
  FixupList      fixups;        
                                
  void doFixups();              
 public:
  CurCU();

  int parsing() { return (int)cu; }      
  int isDiu();
  int isScu();

  ControlUnit * Cu();                    
  Diu * getDiu();                        
  Scu * getScu();                        

  void newCu(sym_ent *Nam, CpuHw *Hw, int Type, SmIdent *smid);
					 
  void makeDiu(sym_ent *Nam, CpuHw *Hw, SmIdent *smid); 
  void makeScu(sym_ent *Nam, CpuHw *Hw, SmIdent *smid); 

  ~CurCU() {}

  void doCurCU();                        

  friend void operator >>= (CurCU &, Fixup *);
};

extern CurCU * ccu;


# 27 "../vsxconf.cc" 2

# 1 ".././inc/Hardware.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


# 1 "./istring.h" 1
 
 
# 32 "./istring.h"

# 40 ".././inc/Hardware.h" 2

# 1 ".././inc/Port.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


# 1 ".././inc/Fixup.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# 96 ".././inc/Fixup.h"


# 38 ".././inc/Port.h" 2

# 1 ".././inc/Index.h" 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


# 1 "./istring.h" 1
 
 
# 32 "./istring.h"

# 39 ".././inc/Index.h" 2



 

 

 
 

 
class Index
{
	int val;
public:
	Index(int);

	Index(const Index &i) : val(i.val) {};

	Index() : val(0) {};
	operator int() const { return val; };
	Index & operator ++()  { val++; return * this; };
	Index & operator = (int i) { val = i; return * this; };
	friend istring & operator <<(istring &s, const Index &i)
	{ s << i.val + 1; return s; };
};


# 39 ".././inc/Port.h" 2

class Card;
class Dsac;
class Sac;
class sym_ent;
class Service;
class ser_cars;

enum PortUserType { _Illegal,
		    _Line, _Connect, _Ded,
		    _Mouse_In, _Mouse_Out, _Miu, _Pcu };


enum multproto {
  NONE,
  RMJ,
  MABON
};



 
 
 
 
 
 
 
class Port : public Fixer
{
private:
  void  con_sub();                        
  static PortUserType CurUse;             
                                          
  static ser_cars *CurSC;                 
                                          
protected:
  Card *card;                             
  Index ssbd_index;                       
  int   vsx_addr;                         
  PortUserType t;                         
  ser_cars *SerCars;                      
  int   comi_indx;                        
                                          
  virtual void PortName(istring &);       
                                          
public:
  Port(sym_ent*, int);                    
                                          
  Port(int);                              
                                          
  Port(Port &);                           
  virtual ~Port() {}
  void callback();                        
                                          
                                          


  static void setCurUse(PortUserType T);
  static PortUserType getCurUse();
  static ser_cars * getCurSerC();

  int getAddr();                          
  int isSwitchingLine(Service *s);        
  int setVideoPortUsed();                 
  const char *getCardName();              
  int getCardType();                      
  int onSwitchCard();                     
  Dsac * getDsacCard();                   
  Sac  * getSacCard();                    
  int getCardAddr();                      
  Index getSSBDIndex();                   
  PortUserType getUserType();             
  int getComiIndx() { return comi_indx; }
  ser_cars * getSerC() { return SerCars; }
  virtual multproto getProtocol();        
  virtual int getStation();               
                                          
  friend istring & operator << (istring &, Port &);
  
};

 
 
 
 
 
 
 
class PortList : public List {public:	PortList () : List() {};
	PortList & operator =(List &l) { *(List *)this = l; return *this; };
	Port *& operator[](int i) { return *(Port **)&((*(List*)this)[i]); }; };
class PortListIterator : public ListIterator {public:	PortListIterator ( PortList &l) : ListIterator(l) {};
	Port *& operator()() { return *(Port **)&((*(ListIterator *)this)()); };
	int operator()(Port *&p) { return (*(ListIterator *)this)(*( void **)&p); };
	void operator =(PortList &l) { *(ListIterator *)this = *(List *)&l; };};
class PortSpliceListIterator : public SpliceListIterator {public:	PortSpliceListIterator ( PortList &l) : SpliceListIterator(l) {};
	Port *& operator()() { return *(Port **)&((*(SpliceListIterator *)this)()); };
	int operator()(Port *&p) { return (*(SpliceListIterator *)this)(*(void **)&p);
 };
	void operator =(PortList &l) { *(SpliceListIterator *)this = *(List *)&l; };}  ;

class MultiPort;
 
 
 
 
 
 
 
class MultiPortList : public List {public:	MultiPortList () : List() {};
	MultiPortList & operator =(List &l) { *(List *)this = l; return *this; };
	MultiPort *& operator[](int i) { return *(MultiPort **)&((*(List*)this)[i]); }; };
class MultiPortListIterator : public ListIterator {public:	MultiPortListIterator ( MultiPortList &l) : ListIterator(l) {};
	MultiPort *& operator()() { return *(MultiPort **)&((*(ListIterator *)this)()); };
	int operator()(MultiPort *&p) { return (*(ListIterator *)this)(*( void **)&p); };
	void operator =(MultiPortList &l) { *(ListIterator *)this = *(List *)&l; };};
class MultiPortSpliceListIterator : public SpliceListIterator {public:	MultiPortSpliceListIterator ( MultiPortList &l) : SpliceListIterator(l) {};
	MultiPort *& operator()() { return *(MultiPort **)&((*(SpliceListIterator *)this)()); };
	int operator()(MultiPort *&p) { return (*(SpliceListIterator *)this)(*(void **)&p); };
	void operator =(MultiPortList &l) { *(SpliceListIterator *)this = *(List *)&l; };}  ;

 
 
 
 
 
 
 
 
 
class MultiPort : public Port
{
private:
  static MultiPortList * mps;            
                                         
                                         
                                         

  Index station;                         
  multproto protocol;                    
  int p_p_addr;                          
protected:
public:
  static void initMultiPorts();           
  static void gvalidMultiPorts();         
                                          
                                          
  MultiPort(multproto p, sym_ent *s, int port, int stat);

  void callback();                        
                                          

  virtual multproto getProtocol() { return protocol; }
  virtual int getStation() { return station; }

  ~MultiPort() {};
};

class mpCheck
{
private:
  int bca;              
  int numlog;           
  MultiPort * as[16];   
                        
                        
public:
  mpCheck(int b);
  int getBCA() { return bca; }
  void setStation(MultiPort * mp, int s, int pp);
  ~mpCheck();

  friend class MultiPort;
};

class mpCheckList : public List {public:	mpCheckList () : List() {};
	mpCheckList & operator =(List &l) { *(List *)this = l; return *this; };
	mpCheck *& operator[](int i) { return *(mpCheck **)&((*(List*)this)[i]); };
 friend mpCheck * operator >> (mpCheckList &, int);  
};
class mpCheckListIterator : public ListIterator {public:
	mpCheckListIterator ( mpCheckList &l) : ListIterator(l) {};
	mpCheck *& operator()() { return *(mpCheck **)&((*(ListIterator *)this)()); };
	int operator()(mpCheck *&p) { return (*(ListIterator *)this)(*( void **)&p); };
	void operator =(mpCheckList &l) { *(ListIterator *)this = *(List *)&l; };};
class mpCheckSpliceListIterator : public SpliceListIterator {public:
	mpCheckSpliceListIterator ( mpCheckList &l) : SpliceListIterator(l) {};
	mpCheck *& operator()() { return *(mpCheck **)&((*(SpliceListIterator *)this)()); };
	int operator()(mpCheck *&p) { return (*(SpliceListIterator *)this)(*(void **)&p); };
	void operator =(mpCheckList &l) { *(SpliceListIterator *)this = *(List *)&l; };} ;




 
 
 
 
 
 
 
 
 
class PortMap
{
private:
protected:
public:
  PortMap();
  virtual void doPortMap() = 0;           
  virtual ~PortMap() {}
};

 
 
 
 
 
 
 
 
class PortMapList : public List {public:	PortMapList () : List() {};
	PortMapList & operator =(List &l) { *(List *)this = l; return *this; };
	PortMap *& operator[](int i) { return *(PortMap **)&((*(List*)this)[i]); }; };
class PortMapListIterator : public ListIterator {public:	PortMapListIterator ( PortMapList &l) : ListIterator(l) {};
	PortMap *& operator()() { return *(PortMap **)&((*(ListIterator *)this)()); };
	int operator()(PortMap *&p) { return (*(ListIterator *)this)(*( void **)&p); };
	void operator =(PortMapList &l) { *(ListIterator *)this = *(List *)&l; };};
class PortMapSpliceListIterator : public SpliceListIterator {public:	PortMapSpliceListIterator ( PortMapList &l) : SpliceListIterator(l) {};
	PortMap *& operator()() { return *(PortMap **)&((*(SpliceListIterator *)this)()); };
	int operator()(PortMap *&p) { return (*(SpliceListIterator *)this)(*(void **)&p); };
	void operator =(PortMapList &l) { *(SpliceListIterator *)this = *(List *)&l; };}  ;




 
 
 
 
 
 
 
 
 
 
 
class ServerPort : public Port, virtual public PortMap
{
private:
protected:
public:
  ServerPort();
  ~ServerPort() {};
};


 
 
 
 
 
 
class TtyPort : virtual public ServerPort
{
private:
  istring *tty;          
protected:
public:
  TtyPort(istring *ttyn);
  ~TtyPort() {};
  virtual void PortName(istring &);          
  void doPortMap();                          
};


 
 
 
 
 
 
 
 
class NetPort : virtual public ServerPort
{
private:
  char *netaddrs;      
  int   sckt;          
  int   sess;          
protected:
public:
  NetPort(char *neta, int sk, int se);
  ~NetPort();
  virtual void PortName(istring &);        
  void doPortMap();                        
};


 
 
 
 
 
 
 
 
class DcuPort : virtual public PortMap
{
private:
  istring *tty;          
protected:
public:
  DcuPort(istring *ttyn);
  ~DcuPort() {};
  void doPortMap();                          
};



# 41 ".././inc/Hardware.h" 2





 
 
 
 
 
enum CpuType{
  I8086,             
  I80286,            
  UHOST              
};

enum RamSize {
  RAM256K,
  RAM512K,
  RAM1M,
  URAM
};

enum HramSize {
  NOHRAM,
  HRAM2M,
  HRAM4M,
  UFILE
};
    


 
 
 
 
 
 
 
 
class CpuHw {
private:
  static int rev;          
  static int rel;          
  static int iss;          
  static char *vs;         
  static int getvd(char **);

  CpuType  Cpu;
  RamSize  Ram;
  HramSize Hram;
protected:
public:
  CpuHw(CpuType c, RamSize r, HramSize h);       
  CpuHw();                                       
  ~CpuHw() {}

  static void setVsxRel(char *rs);   
  static int  postVsxRel(int rel);   

  int atleastV6();                   
  int atleast512K();                 
  int hasHram();                     
  int isUnixHost();                  

  istring & prntHw(istring &s);

  friend istring & operator << (istring &s, CpuHw  &c) 
      { c.prntHw(s); return s; };
};

extern void syntax();
class SmConnect;

 
 
 
 
 
 
 
 
 
class SmIdent
{
private:
  int  port;         
  char *na;          
protected:
public:
  SmIdent(int ttyp);
  SmIdent(char *neta, int tsp);
  void validate(CpuHw *);                  
  ~SmIdent();
  friend class SmConnect;
};

 
 
 
 
 
 
 
 
 
class SmConnect : virtual public PortMap
{
private:
  int  sckt;         
  int  ses;          
  char *na;          
protected:
public:
  SmConnect();
  void setSmCon(char *neta, int so, int se);
  void doPortMap();                        
  ~SmConnect();
};



# 28 "../vsxconf.cc" 2



# 1 ".././inc/Error.h" 1
 
 



extern int errors;
extern int error_limit;
extern void Error();

# 1 "./except.h" 1
 
 


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# 1 "/usr/local/lib/g++-include/setjmp.h" 1


extern "C" {











# 1 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/setjmp.h" 1 3
 
























#pragma comment(exestr, "@(#) setjmp.h 7.1 91/08/14 ")
















































 






# 95 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/setjmp.h" 3


typedef int jmp_buf[6 ];







extern "C" {


extern int  C_header_setjmp (jmp_buf);
extern void C_header_longjmp (jmp_buf, int);


};




# 136 "/usr/local/lib/gcc-lib/i386-sco3.2v4.0/2.3.3/include/setjmp.h" 3

  

# 15 "/usr/local/lib/g++-include/setjmp.h" 2








extern int setjmp(jmp_buf);
extern void longjmp(jmp_buf, int);


}


# 77 "./except.h" 2









jmp_buf except_stack[10 ];
int except_lev = 0;
volatile int except_val;















# 10 ".././inc/Error.h" 2






# 31 "../vsxconf.cc" 2


int rep_level=1;                           
char * p_nam;
char * p_ver = "Pre-Rel-1.2.1";

void syntax();
int opt_text_output = 0;
int opt_binary_output = 1;

main(int argc, char ** argv)
{
  p_nam = argv[0];

  CpuHw::setVsxRel("6.7.7" );

  while ( (--argc) ) {
    if ( argv[argc][0] == '-' ) {
      switch( argv[argc][1] ) {
      case 'v' :
	rep_level = atoi( &argv[argc][2] );
	break;
      case 'r' :
	CpuHw::setVsxRel(&argv[argc][2]);
	break;
      case 't' :
	opt_text_output = 1;
	break;
      default :
	syntax();
	break;
      }
    } else
      syntax();
  }




	init_lex();               
	if ((except_val = setjmp(except_stack[except_lev++])) == 0)  {
	  yyparse();                
	  ccu->doCurCU();           
	}
	else if (1  == except_val)  {
	  exit(1);
	}
	else if (2  == except_val)  { exit(1); }
	else { if (--except_lev) { { longjmp(except_stack[except_lev-1], except_val); }  } else { fprintf(       (&_iob [2]) , "unhandled exception %d\n", except_val); exit(1); }} except_lev--; ;
	exit(0);
}

void syntax()
{
  printf("\n\n%s [-t] [-rn.n.n] [-vn]\n\n",p_nam);
  puts("Where :");
  puts("\t-t      Sets the text configuration output option on");
  puts("\t-rn.n.n Sets the VSX software release to generate config for");
  puts("\t-vn     Sets verbose mode to level n where :");
  puts("\t        \t0 - Errors 1 - & Warnings 2 - & Information");
  exit(1);
}

void write_file_hd(FILE *f, char c)
{
  time_t l;
  char ts[30];
  strcpy(ts,ctime(&(l = time((time_t *)0))));
  ts[23]='\0';                  

  fprintf(f, "%c/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */\n",c);
  fprintf(f, "%c/* Generated by  : %s \tV%s */\n",c,p_nam,p_ver);
  fprintf(f, "%c/* Creation date : %s */\n",c,ts);
}