[comp.sources.unix] v24i085: Manipulate data on the chemical elements, Patch2

rsalz@uunet.uu.net (Rich Salz) (03/27/91)

Submitted-by: "J.E. King" <jek5036@ultb.isc.rit.edu>
Posting-number: Volume 24, Issue 85
Archive-name: chemtab/patch2

	I recently received a little SYSV help from someone out on the
net.  Unfortunately, I cannot get back to him.  Therefore, going upon
what he says, I am sending you the patches to Chemtab to make it SYSV
compatible.  I do not have a SYSV machine to test these on, so if you
know someone who would do it for me, that would be great.  If you don't,
then I guess you could just release the patch and pray for the best.
>From what this guy said, only minor changes were it order.  So, you can
put this at the top of your release:

	This patch will bring Chemtab 2.02 up to version 2.03.  Some
of the things changed in this version are the following:

	SYSV compatibility
	#defines can be commented out without errors
	Job stopping now calls for a SIGSTOP, not a system("/bin/sh");

	Things you can expect to see later:

	Neat little options such as color saving for the ReGIS graphs.
	Compatibility for more printers.
	A better designed program, all around (V3). (#defines, etc)

							- Jim

- cut here -- cut here -- cut here -- cut here -- cut here -- cut here --
#!/bin/sh
# to extract, remove the header and type "sh filename"
if `test ! -s ./patch02`
then
echo "writing ./patch02"
cat > ./patch02 << '\End\Of\Shar\'
diff -c Chem202/Makefile Chem203/Makefile
*** Chem202/Makefile	Thu Mar 21 09:07:14 1991
--- Chem203/Makefile	Thu Mar 21 09:08:59 1991
***************
*** 1,10 ****
  #
! # Makefile for Chemtab, current version 2.02, Makefile version 1.1
  # Makefile author: Jim King (jek5036@ultb.isc.rit.edu)
  # Makefile additions: Jon Kamens (jik@pit-manager.mit.edu)
  #
  CC            = cc
! CFLAGS        = -O -DReGIS
  # Define ReGIS if you want to program to prompt the user to answer y/n
  # to the question of if they have a ReGIS compatible terminal
  BINDIR		= .
--- 1,11 ----
  #
! # Makefile for Chemtab, current version 2.03, Makefile version 1.2
  # Makefile author: Jim King (jek5036@ultb.isc.rit.edu)
  # Makefile additions: Jon Kamens (jik@pit-manager.mit.edu)
+ # SYSV port diffs: Ronard Joe Record (rr@sco.com)
  #
  CC            = cc
! CFLAGS        = -O -DReGIS #-DSYSV
  # Define ReGIS if you want to program to prompt the user to answer y/n
  # to the question of if they have a ReGIS compatible terminal
  BINDIR		= .
diff -c Chem202/README Chem203/README
*** Chem202/README	Thu Mar 21 09:07:15 1991
--- Chem203/README	Thu Mar 21 09:09:00 1991
***************
*** 31,33 ****
--- 31,34 ----
  Chemtab V2.01; (overlay from V1) written in C (1991) by Jim King
  						(jek5036@ultb.isc.rit.edu)
  Chemtab V2.02; (patch #1) with help from Jon Kamens (jik@pit-manager.mit.edu)
+ Chemtab V2.03; (patch #2) with help from Ronald Joe Record (rr@sco.com)
diff -c Chem202/README.FIRST Chem203/README.FIRST
*** Chem202/README.FIRST	Thu Mar 21 09:03:32 1991
--- Chem203/README.FIRST	Thu Mar 21 09:09:01 1991
***************
*** 12,23 ****
  
  How to setup Chemtab to work at your site..
  
- WARNING: Chemtab has only been tested under Ultrix 3.1 on a VAX 11/780,
- 	 and a DEC 5810 RISC Ultrix 4.1 machine.  Chemtab, as is, will
- 	 probably only work for BSD compatible systems.  SYSV compatibility
-          is on it's way!  I promise!  Since chemtab uses curses, it should
- 	 prove to be portable.
- 
  Any comments, suggestions, bugs can be reported to:
  	jek5036@ultb.isc.rit.edu (formerly pulsar@xait.xerox.com!lsrhs)
  
--- 12,17 ----
***************
*** 39,44 ****
--- 33,39 ----
      element list (faster to read in)).  Please make this so.  I would
      have incorporated it into the Makefile but some people would rather
      make sure it worked for them...
+     (The make install command should put these where they belong.)
  
  That SHOULD be the extent of it.. but don't quote me on that.  I am the
  author, and I am not held responsible for any damage the program might cause,
diff -c Chem202/README.PATCH Chem203/README.PATCH
*** Chem202/README.PATCH	Thu Mar 21 09:04:19 1991
--- Chem203/README.PATCH	Thu Mar 21 09:09:01 1991
***************
*** 15,17 ****
--- 15,21 ----
  (yes there are probably bound to be more patches.. but this is all I could
   find.  You MAY have to tweak your Makefile to work for your system.)
  
+ ------------------------------------------------------------------------------
+ 	Patch #2 will bring Chemtab 2.02 up to version 2.03.  Included are
+ SYSV defines only tested for SCO Unix (SYSV compatible).  If you encounter
+ any other problems, please send them to me.
diff -c Chem202/VERSION Chem203/VERSION
*** Chem202/VERSION	Thu Mar 21 09:07:15 1991
--- Chem203/VERSION	Thu Mar 21 09:09:02 1991
***************
*** 1,4 ****
! Currently, you have Chemtab Version 2.01, Patchlevel 0.
  
  Version History:
  
--- 1,4 ----
! Currently, you have Chemtab Version 2.03, Patchlevel 2.
  
  Version History:
  
***************
*** 32,34 ****
--- 32,40 ----
  						(jik@pit-manager.MIT.EDU)
  			Problems when undefining ReGIS and TRANSCRIPT fixed.
  			A couple of minor screen display changes.
+ 
+ 	Chemtab V2.03	Patch to V2.02
+ 			SYSV help from Ronald Joe Record (rr@sco.com)
+ 			More #define problems fixed.
+ 			^Z does not call sh through a system call but
+ 			rather saves terminal stats and issues a SIGSTOP.
diff -c Chem202/cleanup.c Chem203/cleanup.c
*** Chem202/cleanup.c	Thu Mar 21 09:07:15 1991
--- Chem203/cleanup.c	Thu Mar 21 09:09:03 1991
***************
*** 22,32 ****
  	char	c, str[80];			/* input */
  #ifdef	PRINTQ
  	char	que[80];			/* print queue */
! #endif	PRINTQ
  
  #ifdef	ReGIS
  	if (regis) endregis();
! #endif	ReGIS
  	if (trans) {				/* transcript flag */
  l1:		mvwaddstr(btm, 0, 0, "Would you like your transcript printed out? ");
  		wrefresh(btm);
--- 22,33 ----
  	char	c, str[80];			/* input */
  #ifdef	PRINTQ
  	char	que[80];			/* print queue */
! #endif	/* PRINTQ */
  
  #ifdef	ReGIS
  	if (regis) endregis();
! #endif	/* ReGIS */
! #ifdef	PRINTER
  	if (trans) {				/* transcript flag */
  l1:		mvwaddstr(btm, 0, 0, "Would you like your transcript printed out? ");
  		wrefresh(btm);
***************
*** 52,60 ****
  			cur = btm; xp = 21; yp = 0;
  			gets(que);
  			sprintf(str, "%s%s %d.chemtab", PRINTER, que, getpid());
! #else	PRINTQ
  			sprintf(str, "%s %d.chemtab", PRINTER, getpid());
! #endif	PRINTQ
  			fclose(fp);
  			wclear(btm);
  			wrefresh(btm);
--- 53,61 ----
  			cur = btm; xp = 21; yp = 0;
  			gets(que);
  			sprintf(str, "%s%s %d.chemtab", PRINTER, que, getpid());
! #else	/* PRINTQ */
  			sprintf(str, "%s %d.chemtab", PRINTER, getpid());
! #endif	/* PRINTQ */
  			fclose(fp);
  			wclear(btm);
  			wrefresh(btm);
***************
*** 62,67 ****
--- 63,69 ----
  			system(str);
  		}
  	}
+ #endif	/* PRINTER */
  	fclose(fp);				/* close things up */
  	echo();
  	nocrmode();
***************
*** 78,95 ****
  #ifdef	USERSHELL
  stop()	/* Handle a ^Z */
  {
- 	char	sh[80];
- 
- 	strcpy(sh, getenv("SHELL"));
- 	if (!strlen(sh))
- 		strcpy(sh, USERSHELL);
- #ifdef	ReGIS
- 	if (regis) endregis();
- #endif  ReGIS
  	clear(); refresh();
  	signal(SIGTSTP, SIG_DFL);
  	printf("Type 'exit' to return to chemtab...\n");
! 	system(sh);
  	clear(); refresh();
  	signal(SIGTSTP, stop);
  	if (needsit(stdscr)) { touchwin(stdscr); wrefresh(stdscr); }
--- 80,91 ----
  #ifdef	USERSHELL
  stop()	/* Handle a ^Z */
  {
  	clear(); refresh();
  	signal(SIGTSTP, SIG_DFL);
  	printf("Type 'exit' to return to chemtab...\n");
! 	gtty(0, &new);
! 	kill(getpid(), SIGSTOP);	/* stop the program */
! 	stty(0, &orig);
  	clear(); refresh();
  	signal(SIGTSTP, stop);
  	if (needsit(stdscr)) { touchwin(stdscr); wrefresh(stdscr); }
***************
*** 102,105 ****
  	wrefresh(mn);
  	crmode();
  }
! #endif	USERSHELL
--- 98,101 ----
  	wrefresh(mn);
  	crmode();
  }
! #endif	/* USERSHELL */
diff -c Chem202/dogph.c Chem203/dogph.c
*** Chem202/dogph.c	Thu Mar 21 09:07:16 1991
--- Chem203/dogph.c	Thu Mar 21 09:13:34 1991
***************
*** 128,134 ****
--- 128,138 ----
  	wrefresh(mn);
  	cur = mn; xp = 24; yp = 13;
  	echo(); nocrmode();
+ #ifdef	SYSV
+ 	wgetstr(mn, str);
+ #else   /* SYSV */
  	gets(str);
+ #endif  /* SYSV */
  	if (str[0] == '?') { help(4); goto l4; }
  	if (!strlen(str)) {
  		xmin = -999;
***************
*** 140,146 ****
--- 144,154 ----
  	wrefresh(mn);
  	cur = mn; xp = 48; yp = 13;
  	echo(); nocrmode();
+ #ifdef	SYSV
+ 	wgetstr(mn, str);
+ #else   /* SYSV */
  	gets(str);
+ #endif  /* SYSV */
  	if (strlen(str))
  		xmax = atof(str);
  	fixup(mn);
diff -c Chem202/doregisgph.c Chem203/doregisgph.c
*** Chem202/doregisgph.c	Thu Mar 21 09:07:16 1991
--- Chem203/doregisgph.c	Thu Mar 21 09:09:06 1991
***************
*** 68,74 ****
  	
  #ifdef	USERSHELL
  	signal(SIGTSTP, SIG_IGN);
! #endif	USERSHELL
  
  	for (i = 0; i < XAXISDEF; i++)
  		xaxis[i] = 0;
--- 68,74 ----
  	
  #ifdef	USERSHELL
  	signal(SIGTSTP, SIG_IGN);
! #endif	/* USERSHELL */
  
  	for (i = 0; i < XAXISDEF; i++)
  		xaxis[i] = 0;
***************
*** 102,108 ****
  	if (c1 == '\n') {
  #ifdef	USERSHELL
  		signal(SIGTSTP, stop);
! #endif	USERSHELL
  		wclear(mn);
  		return;
  	}
--- 102,108 ----
  	if (c1 == '\n') {
  #ifdef	USERSHELL
  		signal(SIGTSTP, stop);
! #endif	/* USERSHELL */
  		wclear(mn);
  		return;
  	}
***************
*** 141,147 ****
--- 141,151 ----
  	wrefresh(mn);
  	cur = mn; xp = 23; yp = 13;
  	echo(); nocrmode();
+ #ifdef	SYSV
+ 	wgetstr(mn, str);
+ #else	/* SYSV */
  	gets(str);
+ #endif	/* SYSV */
  	if (str[0] == '?') { help(4); goto rl4; }
  	if (!strlen(str)) {
  		xmin = -999;
***************
*** 153,159 ****
--- 157,167 ----
  	wrefresh(mn);
  	cur = mn; xp = 49; yp = 13;
  	echo(); nocrmode();
+ #ifdef	SYSV
+ 	wgetstr(mn, str);
+ #else	/* SYSV */
  	gets(str);
+ #endif	/* SYSV */
  	if (strlen(str))
  		xmax = atof(str);
  	fixup(mn);
***************
*** 289,295 ****
  		bot("A copy will be found in the file 'laser' when you exit chemtab.");
  		sleep(2);
  	}
! #endif	LASERPRT
  	bot("Initializing for graphics...");
  	wclear(mn); wrefresh(mn);
  	wclear(btm); wrefresh(btm);
--- 297,303 ----
  		bot("A copy will be found in the file 'laser' when you exit chemtab.");
  		sleep(2);
  	}
! #endif	/* LASERPRT */
  	bot("Initializing for graphics...");
  	wclear(mn); wrefresh(mn);
  	wclear(btm); wrefresh(btm);
***************
*** 298,304 ****
  	initregis();
  	regisgoto(450, 10);
  	chcolor(RED_3);
! 	text(3, 0, -5, "Chemtab V2.01");
  	regisgoto(400 - (strlen(gname[numr(c1)]) * 10), YMAXDEF + 20);
  	text(2, 0, 0, gname[numr(c1)]);
  	regisgoto(YMINDEF - 46, 200 + (strlen(gname[numr(c2)]) * 10));
--- 306,312 ----
  	initregis();
  	regisgoto(450, 10);
  	chcolor(RED_3);
! 	text(3, 0, -5, "Chemtab V2.03");
  	regisgoto(400 - (strlen(gname[numr(c1)]) * 10), YMAXDEF + 20);
  	text(2, 0, 0, gname[numr(c1)]);
  	regisgoto(YMINDEF - 46, 200 + (strlen(gname[numr(c2)]) * 10));
***************
*** 426,437 ****
  #ifdef	LASERPRT
  	if (laser)
  		fclose(lsr);
! #endif	LASERPRT
  	clear(); refresh();
  	wclear(graph); wrefresh(graph);
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #endif	USERSHELL
  	return(0);
! #endif ReGIS
  }
--- 434,445 ----
  #ifdef	LASERPRT
  	if (laser)
  		fclose(lsr);
! #endif	/* LASERPRT */
  	clear(); refresh();
  	wclear(graph); wrefresh(graph);
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #endif	/* USERSHELL */
  	return(0);
! #endif /* ReGIS */
  }
diff -c Chem202/element.c Chem203/element.c
*** Chem202/element.c	Thu Mar 21 09:03:24 1991
--- Chem203/element.c	Thu Mar 21 09:09:07 1991
***************
*** 94,97 ****
  	
  	fclose(fp);
  }
- 
--- 94,96 ----
diff -c Chem202/graph.h Chem203/graph.h
*** Chem202/graph.h	Thu Mar 21 09:03:28 1991
--- Chem203/graph.h	Thu Mar 21 09:09:11 1991
***************
*** 40,46 ****
  #define RED_3	2
  #define BLU_3	1
  #define BLK_3	0
! #endif	ReGIS
  
  double	xmax,		/* X axis maximum value */
  	xmin,		/* X axis minimum value */
--- 40,46 ----
  #define RED_3	2
  #define BLU_3	1
  #define BLK_3	0
! #endif	/* ReGIS */
  
  double	xmax,		/* X axis maximum value */
  	xmin,		/* X axis minimum value */
diff -c Chem202/graphlib.c Chem203/graphlib.c
*** Chem202/graphlib.c	Thu Mar 21 09:03:29 1991
--- Chem203/graphlib.c	Thu Mar 21 09:09:11 1991
***************
*** 2,8 ****
--- 2,14 ----
  
  #include <stdio.h>
  #include <curses.h>
+ 
+ #ifdef	SYSV
+ #include <string.h>
+ #else	/* SYSV */
  #include <strings.h>
+ #endif	/* SYSV */
+ 
  #include "variables.h"
  #include "element.h"
  #include "graph.h"
***************
*** 42,48 ****
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "\033Pp");
! #endif	LASERPRT
  	chcolor(6);
  }
  
--- 48,54 ----
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "\033Pp");
! #endif	/* LASERPRT */
  	chcolor(6);
  }
  
***************
*** 51,57 ****
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "\033\\");
! #endif	LASERPRT
  	printf("\033\\"); 
  }
  
--- 57,63 ----
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "\033\\");
! #endif	/* LASERPRT */
  	printf("\033\\"); 
  }
  
***************
*** 61,67 ****
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "P[%d,%d]", x, y);
! #endif	LASERPRT
  	printf("P[%d,%d]", x, y);
  }
  
--- 67,73 ----
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "P[%d,%d]", x, y);
! #endif	/* LASERPRT */
  	printf("P[%d,%d]", x, y);
  }
  
***************
*** 73,79 ****
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "V[%d,%d]", x2, y2);
! #endif	LASERPRT
  	}
  
  mybox(width, x1, y1, x2, y2)
--- 79,85 ----
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "V[%d,%d]", x2, y2);
! #endif	/* LASERPRT */
  	}
  
  mybox(width, x1, y1, x2, y2)
***************
*** 98,104 ****
  #ifdef	LASERPRT
  		if (laser)
  			fprintf(lsr, "W(S1)C[+2]W(S0)");
! #endif	LASERPRT
  	} else {
  		line(x1, y1-2, x1, y1+2);
  		line(x1-2, y1, x1+2, y1);
--- 104,110 ----
  #ifdef	LASERPRT
  		if (laser)
  			fprintf(lsr, "W(S1)C[+2]W(S0)");
! #endif	/* LASERPRT */
  	} else {
  		line(x1, y1-2, x1, y1+2);
  		line(x1-2, y1, x1+2, y1);
***************
*** 115,121 ****
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "T(D%d)(S%d)(D%d)(I%d)'%s'", dir, size, dir, angle, string);
! #endif	LASERPRT
  }
  
  regispc()
--- 121,127 ----
  #ifdef	LASERPRT
  	if (laser)
  		fprintf(lsr, "T(D%d)(S%d)(D%d)(I%d)'%s'", dir, size, dir, angle, string);
! #endif	/* LASERPRT */
  }
  
  regispc()
***************
*** 127,130 ****
  	getchar();
  	echo(); nocrmode();
  }
! #endif	ReGIS
--- 133,136 ----
  	getchar();
  	echo(); nocrmode();
  }
! #endif	/* ReGIS */
diff -c Chem202/looke.c Chem203/looke.c
*** Chem202/looke.c	Thu Mar 21 09:03:30 1991
--- Chem203/looke.c	Thu Mar 21 09:09:12 1991
***************
*** 50,56 ****
--- 50,60 ----
  	char	input[80];
  	int	i;
  
+ #ifdef	SYSV
+ 	wgetstr(mn, input);
+ #else	/* SYSV */
  	gets(input);
+ #endif	/* SYSV */
  	for (i = 0; i < strlen(input); i++)
  		input[i] = tolower(input[i]);
  
***************
*** 199,205 ****
--- 203,213 ----
  		cur = mn; xp = 17; yp = 11;
  		echo();
  		nocrmode();
+ #ifdef	SYSV
+ 		wgetstr(mn, srch);
+ #else	/* SYSV */
  		gets(srch);
+ #endif	/* SYSV */
  		if (srch[0] == '?') { help(11); goto l11; }
  		if (atoi(srch) < 1) looke();
  	}
***************
*** 212,218 ****
--- 220,230 ----
  		cur = mn; xp = 17; yp = 11;
  		echo();
  		nocrmode();
+ #ifdef	SYSV
+ 		wgetstr(mn, srch);
+ #else	/* SYSV */
  		gets(srch);
+ #endif	/* SYSV */
  		if (srch[0] == '?') { help(12); goto l12; }
  	}
  	
diff -c Chem202/main.c Chem203/main.c
*** Chem202/main.c	Thu Mar 21 09:08:00 1991
--- Chem203/main.c	Thu Mar 21 09:09:13 1991
***************
*** 54,61 ****
  		sleep(2);
  	}
  
! #endif ReGIS
  
  	if (stat(PERTABLE, f1) == -1) {
  		printf("Element data (text) is unavailable.\n");
  		exit(1);
--- 54,65 ----
  		sleep(2);
  	}
  
! #endif /* ReGIS */
  
+ #ifdef	USERSHELL
+ 	gtty(0, &orig);
+ #endif	/* USERSHELL */
+ 
  	if (stat(PERTABLE, f1) == -1) {
  		printf("Element data (text) is unavailable.\n");
  		exit(1);
***************
*** 93,99 ****
  		sleep(1);
  		unlink(LOCKFILE);
  	}
! next:	rebuild = 0;  closetext = 0;
  
  	initscr();			/* start curses */
  	hlp = NULL;			/* help screen init */
--- 97,103 ----
  		sleep(1);
  		unlink(LOCKFILE);
  	}
! next:	rebuild = 0;  closetext = 0; eopage = 0;
  
  	initscr();			/* start curses */
  	hlp = NULL;			/* help screen init */
***************
*** 116,122 ****
  		sleep(5);
  		cleanup();
  	}
! #endif	TRANSCRIPT
  
  	clear();
  	mvaddstr(5, 37, "Chemtab");
--- 120,126 ----
  		sleep(5);
  		cleanup();
  	}
! #endif	/* TRANSCRIPT */
  
  	clear();
  	mvaddstr(5, 37, "Chemtab");
***************
*** 123,132 ****
  	mvaddstr(9, 28, "Periodic Table Data Base");
  	mvaddstr(10, 30, "Of the Known Elements");
  	standout();
! 	mvaddstr(15, 21, "Chemtab 2.02 incorporates online help");
  	mvaddstr(16, 13, "Answer with a question mark at any question for help.");
  	standend();
! 	mvaddstr(18, 18, "Version 2.02, March 13th, 1991 by Jim King");
  	mvaddstr(19, 16, "Developed at Lincoln-Sudbury Regional High School");
  	mvaddstr(20, 12, "(and) ReGIS package at Rochester Institute of Technology");
  	refresh();				/* Title page */
--- 127,136 ----
  	mvaddstr(9, 28, "Periodic Table Data Base");
  	mvaddstr(10, 30, "Of the Known Elements");
  	standout();
! 	mvaddstr(15, 21, "Chemtab 2.03 incorporates online help");
  	mvaddstr(16, 13, "Answer with a question mark at any question for help.");
  	standend();
! 	mvaddstr(18, 18, "Version 2.03, March 19th, 1991 by Jim King");
  	mvaddstr(19, 16, "Developed at Lincoln-Sudbury Regional High School");
  	mvaddstr(20, 12, "(and) ReGIS package at Rochester Institute of Technology");
  	refresh();				/* Title page */
***************
*** 176,184 ****
  	signal(SIGINT, cleanup);
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #else	USERSHELL
  	signal(SIGTSTP, SIG_IGN);
! #endif	USERSHELL
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGTERM, cleanup);
  	
--- 180,188 ----
  	signal(SIGINT, cleanup);
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #else	/* USERSHELL */
  	signal(SIGTSTP, SIG_IGN);
! #endif	/* USERSHELL */
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGTERM, cleanup);
  	
***************
*** 195,207 ****
  			wmove(mn, i+1, 0);
  			wprintw(mn, "%d] %s", i, mopts[i]);
  		}	/* give me choices, then branch off */
! 		menu("Chemtab 2.02 MAIN MENU");
  #ifdef	ReGIS
  		mvwaddstr(mn, 11, 0, "^R toggles ReGIS mode which is currently ");
  		wstandout(mn);
  		wprintw(mn, "%s", regis ? "on." : "off");
  		wstandend(mn);
! #endif	ReGIS
  loop:		mvwaddstr(mn, 9, 0, "Your choice? ");
  		wclrtoeol(mn);
  		wrefresh(mn);
--- 199,211 ----
  			wmove(mn, i+1, 0);
  			wprintw(mn, "%d] %s", i, mopts[i]);
  		}	/* give me choices, then branch off */
! 		menu("Chemtab 2.03 MAIN MENU");
  #ifdef	ReGIS
  		mvwaddstr(mn, 11, 0, "^R toggles ReGIS mode which is currently ");
  		wstandout(mn);
  		wprintw(mn, "%s", regis ? "on." : "off");
  		wstandend(mn);
! #endif	/* ReGIS */
  loop:		mvwaddstr(mn, 9, 0, "Your choice? ");
  		wclrtoeol(mn);
  		wrefresh(mn);
***************
*** 217,225 ****
  #ifdef ReGIS
  			case '5': wclear(mn); wclear(srt); if (regis) doregisgph(); else dogph(); break;
  			case '\022': /* ^R */ if (regis) regis = 0; else regis = 1; break;
! #else ReGIS
  			case '5': wclear(mn); wclear(srt); dogph(); break; /* Do a graph for us..... */
! #endif ReGIS
  			case '6': cleanup(); break; /* Exit */
  			case '\026': /* ^V */ version(); break;
  			default: goto loop;
--- 221,229 ----
  #ifdef ReGIS
  			case '5': wclear(mn); wclear(srt); if (regis) doregisgph(); else dogph(); break;
  			case '\022': /* ^R */ if (regis) regis = 0; else regis = 1; break;
! #else /* ReGIS */
  			case '5': wclear(mn); wclear(srt); dogph(); break; /* Do a graph for us..... */
! #endif /* ReGIS */
  			case '6': cleanup(); break; /* Exit */
  			case '\026': /* ^V */ version(); break;
  			default: goto loop;
diff -c Chem202/ptabl.c Chem203/ptabl.c
*** Chem202/ptabl.c	Thu Mar 21 09:07:18 1991
--- Chem203/ptabl.c	Thu Mar 21 09:09:16 1991
***************
*** 55,61 ****
  		case 'Y':
  #ifdef	USERSHELL
  			signal(SIGTSTP, SIG_IGN);
! #endif	USERSHELL
  			strcat(foo, "_graphic"); ics = 1; break;
  		default: ics = 0; break;
  	}
--- 55,61 ----
  		case 'Y':
  #ifdef	USERSHELL
  			signal(SIGTSTP, SIG_IGN);
! #endif	/* USERSHELL */
  			strcat(foo, "_graphic"); ics = 1; break;
  		default: ics = 0; break;
  	}
***************
*** 107,112 ****
  	refresh();
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #endif	USERSHELL
  	return(0);
  }
--- 107,112 ----
  	refresh();
  #ifdef	USERSHELL
  	signal(SIGTSTP, stop);
! #endif	/* USERSHELL */
  	return(0);
  }
diff -c Chem202/scrmisc.c Chem203/scrmisc.c
*** Chem202/scrmisc.c	Thu Mar 21 09:07:18 1991
--- Chem203/scrmisc.c	Thu Mar 21 09:09:18 1991
***************
*** 12,22 ****
   * will USUALLY work for most print queues WITHOUT end-of-page form-feeding,
   * meaning the print command doesn't care about upper and lower margins.  If
   * so, a lower value may be needed. */
  #define	SPACING		2
  
- /* V2.02 uses a ^L to scroll to the end of page.. SPACING at 2 should work
-  * peachy.. :> */
-  
  menu(str)
  char	*str;
  {
--- 12,22 ----
   * will USUALLY work for most print queues WITHOUT end-of-page form-feeding,
   * meaning the print command doesn't care about upper and lower margins.  If
   * so, a lower value may be needed. */
+ /* V2.03 uses a ^L to scroll to the end of page.. SPACING at 2 should work
+  * peachy.. :> - Jim */
+  
  #define	SPACING		2
  
  menu(str)
  char	*str;
  {
***************
*** 191,197 ****
  	clear(); refresh();
  
  	standout();
! 	mvaddstr(0, 30, "Chemtab V2.02 (patch 1)");
  	standend();
  	mvaddstr(2, 0, "Element data (text): ");
  	printw("%s", PERTABLE);
--- 191,197 ----
  	clear(); refresh();
  
  	standout();
! 	mvaddstr(0, 30, "Chemtab V2.03 (patch 2)");
  	standend();
  	mvaddstr(2, 0, "Element data (text): ");
  	printw("%s", PERTABLE);
***************
*** 213,219 ****
  	mvaddstr(12, 0, "Job stopping is enabled.");
  #else
  	mvaddstr(12, 0, "Job stopping is disabled.");
! #endif	USERSHELL
  
  #ifdef	PRINTER
  	mvaddstr(13, 0, "Printing is enabled through the ");
--- 213,219 ----
  	mvaddstr(12, 0, "Job stopping is enabled.");
  #else
  	mvaddstr(12, 0, "Job stopping is disabled.");
! #endif	/* USERSHELL */
  
  #ifdef	PRINTER
  	mvaddstr(13, 0, "Printing is enabled through the ");
***************
*** 221,233 ****
  	printw("command.");
  #else
  	mvaddstr(13, 0, "Printing is disabled.");
! #endif	PRINTER
  
  #ifdef	PRINTQ
  	mvaddstr(14, 0, "User is prompted for a print queue.");
! #else	PRINTQ
  	mvaddstr(14, 0, "Print queue is coded into program.");
! #endif	PRINTQ
  
  #ifdef	TRANSCRIPT
  	mvaddstr(15, 0, "User logs are kept in ");
--- 221,233 ----
  	printw("command.");
  #else
  	mvaddstr(13, 0, "Printing is disabled.");
! #endif	/* PRINTER */
  
  #ifdef	PRINTQ
  	mvaddstr(14, 0, "User is prompted for a print queue.");
! #else
  	mvaddstr(14, 0, "Print queue is coded into program.");
! #endif	/* PRINTQ */
  
  #ifdef	TRANSCRIPT
  	mvaddstr(15, 0, "User logs are kept in ");
***************
*** 234,246 ****
  	printw("%s.", TRANSCRIPT);
  #else
  	mvaddstr(15, 0, "User logs are disabled.");
! #endif	TRANSCRIPT
  
  #ifdef	ReGIS
  	mvaddstr(16, 0, "ReGIS graphics module is installed.");
  #else
  	mvaddstr(16, 0, "ReGIS graphics module is not installed.");
! #endif	ReGIS
  
  	refresh();
  	spc();
--- 234,246 ----
  	printw("%s.", TRANSCRIPT);
  #else
  	mvaddstr(15, 0, "User logs are disabled.");
! #endif	/* TRANSCRIPT */
  
  #ifdef	ReGIS
  	mvaddstr(16, 0, "ReGIS graphics module is installed.");
  #else
  	mvaddstr(16, 0, "ReGIS graphics module is not installed.");
! #endif	/* ReGIS */
  
  	refresh();
  	spc();
diff -c Chem202/tune.h Chem203/tune.h
*** Chem202/tune.h	Thu Mar 21 09:07:18 1991
--- Chem203/tune.h	Thu Mar 21 09:17:03 1991
***************
*** 42,48 ****
     with a ^Z if you do NOT want the program to stop, comment this out */
  /* Obviously, this was not written on a SYSV system..  If you have SYSV
     it is advised you comment this out */
! /*#define USERSHELL	"/bin/csh" */
  
  /* TRANSCRIPT is the path to the logfile which lists who uses the program.
                if it is not defined, then no log is made. */
--- 42,48 ----
     with a ^Z if you do NOT want the program to stop, comment this out */
  /* Obviously, this was not written on a SYSV system..  If you have SYSV
     it is advised you comment this out */
! #define USERSHELL	"/bin/csh"
  
  /* TRANSCRIPT is the path to the logfile which lists who uses the program.
                if it is not defined, then no log is made. */
***************
*** 71,76 ****
  					       printer */
  
  /* ------------------------------------------------------------- */
! #define PRINTER		"prvms -q "
  #define	PRINTQ
  
--- 71,81 ----
  					       printer */
  
  /* ------------------------------------------------------------- */
! #define PRINTER		"lpr -h -Pprinter_name"
  #define	PRINTQ
  
+ /* don't touch! */
+ 
+ #ifdef	SYSV
+ #undef	USERSHELL
+ #endif  /* SYSV */
diff -c Chem202/variables.h Chem203/variables.h
*** Chem202/variables.h	Thu Mar 21 09:07:19 1991
--- Chem203/variables.h	Thu Mar 21 09:09:20 1991
***************
*** 4,9 ****
--- 4,10 ----
   * variables.h	Include file - basically a global file
   */
  
+ #include <sgtty.h>			/* gtty and stty calls */
  #include <stdio.h>
  #include "tune.h"
  
***************
*** 12,28 ****
  	xp, yp,				/* Stop job handling */
  #ifdef	LASERPRT
  	laser,				/* Laser print? */
! #endif	LASERPRT
  #ifdef  ReGIS
  	regis,				/* regis on/off flag */
! #endif 	ReGIS
  	trans,				/* transcript flag */
  	eopage,				/* end of page flag */
  	gtot;				/* total of sorted elements */
  #ifdef	LASERPRT
  FILE	*lsr;
! #endif	LASERPRT
  FILE	*fp;				/* File pointer for the transcript */
  
  char	lnm[80];			/* User's last name for transcript */
  
--- 13,33 ----
  	xp, yp,				/* Stop job handling */
  #ifdef	LASERPRT
  	laser,				/* Laser print? */
! #endif	/* LASERPRT */
  #ifdef  ReGIS
  	regis,				/* regis on/off flag */
! #endif 	/* ReGIS */
  	trans,				/* transcript flag */
  	eopage,				/* end of page flag */
  	gtot;				/* total of sorted elements */
  #ifdef	LASERPRT
  FILE	*lsr;
! #endif	/* LASERPRT */
  FILE	*fp;				/* File pointer for the transcript */
+ 
+ #ifdef	USERSHELL
+ struct	sgttyb	orig, new;
+ #endif	/* USERSHELL */
  
  char	lnm[80];			/* User's last name for transcript */
  
\End\Of\Shar\
else
  echo "will not over write ./patch02"
fi
if `test ! -s ./patchlevel.h`
then
echo "writing ./patchlevel.h"
cat > ./patchlevel.h << '\End\Of\Shar\'
#define	VERSION		2.03
#define	PATCHLEVEL	2
\End\Of\Shar\
else
  echo "will not over write ./patchlevel.h"
fi
echo "Finished archive 1 of 1"
exit

exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.