root@ames.arc.nasa.gov@lsrhs.UUCP (Mr System) (08/30/90)
Posting-number: Volume 14, Issue 63 Submitted-by: root@ames.arc.nasa.gov@lsrhs.UUCP (Mr System) Archive-name: chemtab-1.2/part03 [Side comment: I think I need a new network connection.... ++bsa] These are the manual pages which are supposed to go with the sources.. These were written for version 1.0. For better man pages, use Manual.User that came with the Chemtab 1.2 sources. Create a directory called 'Mans' and unpack this file there. ---- Cut Here and unpack ---- #!/bin/sh # shar: Shell Archiver (v1.22) # # Run the following text with /bin/sh to create: # 1a # 1b # 1c # 1d # 1e # 1f # 2a1 # 2a2 # 2b1 # 2b2 # 2c # 2d # contents # sed 's/^X//' << 'SHAR_EOF' > 1a && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 1 X X1a. Starting the Program X X The program is set up to provide the user with an easy access Xroutine. Most system administrators (hopefully) will make an account solely Xfor the purpose of running this program. At lsrhs, the account name is X'chemtab'. To start the program, find a VT100 or VT220 terminal anywhere in Xthe school which has 'login:' on the screen. This is the login prompt. At Xthis prompt you type, "chemtab", and hit RETURN. The program should only Xtake a matter of seconds to start running. After reading the credits page, Xhit SPACE. The program then asks you two questions, the first of which asks Xyou if you need extra explanations. This means that, if all goes well, the Xprogram will tell you what it wants for input. Type "y" or "n" for your Xpreference. The next question asks you if you would like your lists and Xgraphs recorded for printout. If you type "y", the program asks you your Xlast name so that you can identify your printout from everybody else's. The Xonly other answer is "n", and once you type either you move to section 1b. SHAR_EOF chmod 0755 1a || echo "restore of 1a fails" set `wc -c 1a`;Sum=$1 if test "$Sum" != "1144" then echo original size 1144, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 1b && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 2 X X1b. Looking at a specific element X X The first MAIN MENU option is 'List information regarding one Xelement'. This is what you should choose. The screen will clear and you Xare given four options. Type "1" if you wish to locate the element by name. XType "2" if you wish to locate the element by atomic number. Type "3" if Xyou wish to locate the element by symbol. Type "4" to return to the MAIN XMENU. Once you see the information, hit SPACE to return to the MAIN MENU. SHAR_EOF chmod 0755 1b || echo "restore of 1b fails" set `wc -c 1b`;Sum=$1 if test "$Sum" != "551" then echo original size 551, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 1c && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 3 X X1c. Choosing chararacteristics to select elements X X a. Selecting X X The main reason for having this database is to view relationships Xbetween elements and characteristics of the elements, such as Xelectronegativity or boiling point. The process is quite simple, however. XFirst, at the MAIN MENU, select number 2. It says, 'Choose elements Xcharacteristics'. You are now at a sub-menu of characteristics. You can Xsort elements on a maximum of three characteristics. Go through this Xprocess to choose one. First, decide which characteristic to sort from. XType in the appropriate number, hit RETURN, and another sub-menu will appear. XAt this sub-menu you are choosing whether you want to select elements with a Xvalue greater than, less than, or equal to an amount which you type in Xnext. You can choose option four at this sub-menu to return to the previous Xsub-menu. Once you decide which option you want, type in the number. If Xyou do not decide to return to the last sub-menu, you will be asked, 'What XAmount?' Here you can type any number that you wish. Hit RETURN when you Xare done and the selection characteristic appears near the top of the Xscreen. X X b. Erasing X X To erase all of the characteristics you have showing at the top of Xthe screen, use option 15 in the MAIN MENU sub-menu 2. To erase one Xcharacteristic, go to the MAIN MENU sub-menu 2. Type in the number of the Xcharacteristic you want to erase. Answer "y" to the first question it asks. XThen type 4. This feature currently has some bugs. For now, please use Xcommand 15 and start from the beginning. X X c. Creating two X X You can limit the list to a defined limit on one characteristic by Xchoosing MAIN MENU sub-menu 2. Then type the number of the characteristic Xyou want to define. Choose the minimum value as described above. Then, at Xthe sub-menu, choose the SAME number, answer "n" to the first question, and Xanswer "y" to the second one. Then, set the maximum limit. X X d. Changing X X You can change one characteristic by typing it's number in the MAIN XMENU sub-menu 2 and answering "y" to the first question that appears. SHAR_EOF chmod 0755 1c || echo "restore of 1c fails" set `wc -c 1c`;Sum=$1 if test "$Sum" != "2189" then echo original size 2189, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 1d && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 4 X X1d. Viewing the selected elements X X Once you have chosen some characteristics to select elements from X(1c), the program automagically picks out the elements you want to look at. XBy choosing numbers 3 or 4 in the MAIN MENU, you can list elements or view Xtheir positions in the periodic table, respectively. SHAR_EOF chmod 0755 1d || echo "restore of 1d fails" set `wc -c 1d`;Sum=$1 if test "$Sum" != "384" then echo original size 384, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 1e && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 5 X X1e. Graphing elemental characteristics X X MAIN MENU choice #5 is labelled 'Use the graphing module'. Go into Xthis section of the program (by typing 5 at the MAIN MENU) and you will see Xa list of ten characteristics to sort from. IMP: Read all text at the Xbottom of the screen with '***' in front of it. It is important Xinformation. If it is instructions, follow them carefully. The first Xletter you choose will determine what characteristic lies along the x-axis. XAfter choosing this, the program prompts you for an 'X Minimum?' Here, you Xcan set the minimum value on the x-axis. If you want to look at all values Xfor every element, hit RETURN here. Else, type a value. Then the program Xwill ask you for a maximum. Now the program will ask you what you would Xlike to graph against (up the y-axis). Type in the letter of your choice Xand do NOT hit RETURN. Wait for the whole graph to appear, and when you are Xdone with it, hit SPACE to return to the MAIN MENU. SHAR_EOF chmod 0755 1e || echo "restore of 1e fails" set `wc -c 1e`;Sum=$1 if test "$Sum" != "1048" then echo original size 1048, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 1f && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Page 6 X X1f. Exiting the program X X To exit the program, you can type ^C at any time. This means hold Xdown the key labelled "CTRL" while you type "c". Or, if you prefer to exit Xthe nice way, you can type 6 at the MAIN MENU. SHAR_EOF chmod 0755 1f || echo "restore of 1f fails" set `wc -c 1f`;Sum=$1 if test "$Sum" != "294" then echo original size 294, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2a1 && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P1 X X2a1. Variables X XVariable | Type | Defined in | Use X---------------------------------------------------------------------------- Xhlp | int | variables.h | Extra explanations flag (1=YES) Xtrans | int | variables.h | Transcript flag (1=YES) Xfp | FILE | variables.h | File pointer for transcript Xsub1[MAXLM] | int | variables.h | Stores the element numbers that X were selected by esort() Xgtot | int | variables.h | Total number in sub1[] Xfoo[160],str[80]| char | variables.h | Slave character arrays Xlnm[80] | char | variables.h | User's last name for transcript Xi, j, k | int | variables.h | Slave integers Xx | float | variables.h | Slave floating point integer Xdosort[3] | struc | variables.h | Holds selected characteristics X*mopts[] | char | variables.h | Main menu option strings Xsopts[] | struc | variables.h | Characteristic characteristics XEQUAL | def | variables.h | Constant XGREATER | def | variables.h | Constant XLESS | def | variables.h | Constant Xsort_list[MAXLM]| int | variables.h | Final sort list XPERTABLE | def | tune.h | Location of element list XMAXLM | def | tune.h | Number of elements in above + 1 XTABLE | def | tune.h | Location of periodic table XTRANSCRIPT | def | tune.h | Path of the logfile Xsecs | long | main.c | Time stamp for logfile Xc | char | main.c | Input choice in MAIN MENU Xhorz[10] | int | ptabl.c | Hoz. position of elements on scr. Xfd | FILE | ptabl.c | File pointer for the per. table Xsift[3][MAXLM] | int | esort.c | [3] sift spaces Xsftc[3] | int | esort.c | Total in sift[x] = sftc[x] Xtmp[MAXLM] | int | esort.c | Place to put compared elements Xtc | int | esort.c | Total in tmp[] Xflg | int | vdata.c | Flag in vdata Xfactor | int | vdata.c | Times to wrap the screen Xl, m | int | vdata.c | Slave integers X*ptr | char | dogph.c | Pointer for wgetnum Xstopfl | char | dogph.c | Stop flag for strings XDO graph.h SHAR_EOF chmod 0644 2a1 || echo "restore of 2a1 fails" set `wc -c 2a1`;Sum=$1 if test "$Sum" != "2005" then echo original size 2005, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2a2 && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P2 X X2a2. Subroutines (Input / c = char, W = window, i = int, F = file, s=struct) X XSubroutine | Loc | Input | Use X---------------------------------------------------------------------------- Xmain() | main.c | | Main program procedure Xbot(str) | scrmisc.c | c | Display a line of text on line 23 Xcapture(win,f,z)| scrmisc.c | Wii | Put graph window in trans. file Xcleanup() | cleanup.c | | Handle ^C as quit Xdisp(l) | looke.c | i | Display element #l on screen Xdogph() | dogph.c | | Graphing module Xesort() | esort.c | | Select elements by characteristics Xlooke() | looke.c | | Main routine to look at 1 element Xnumr(ch) | dogph.c | c | Return a number for a character Xptabl() | ptabl.c | | Print periodic table Xreadelem() | element.c | | Read elements from PERTABLE file Xschar() | schar.c | | Select characteristics for element Xspc() | scrmisc.c | | Prompt user to hit SPACE to cont. Xtablsort() | schar.c | | Put characteristics on ptabl win. Xtopline() | vdata.c | | Display list index Xupsort() | schar.c | | Update selection window Xvdata() | vdata.c | | View selections in a list Xwgetnum(win) | dogph.c | W | My getnum for curses (BROKEN) Xwhichone() | schar.c | | Returns how many chars are current SHAR_EOF chmod 0644 2a2 || echo "restore of 2a2 fails" set `wc -c 2a2`;Sum=$1 if test "$Sum" != "1356" then echo original size 1356, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2b1 && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P3 X X2b1a. Adding an element to the program X X 1. Add the element to PERTABLE X X 2. Update tune.h (add one to MAXLM) X X 3. make install X X2b1b. Changing an element's figures X X 1. Update PERTABLE X X 2. no make is needed X SHAR_EOF chmod 0755 2b1 || echo "restore of 2b1 fails" set `wc -c 2b1`;Sum=$1 if test "$Sum" != "306" then echo original size 306, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2b2 && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P4 X X2b2. Adding a characteristic to the program X X 1. Choose a four-letter abbreviation for the characteristic. X We will call this the 4LC. X X 2. Choose a negative value for the characteristic which is NOT X a value for ANY element. We will call this UNDF. X X 3. Add the line to undefs.h: X 4LC = UNDF; X where appropriate. X X 4. Edit looke.c, dogph.c, vdata.c, and esort.c appropriately X X 5. Edit variables.h->sopts[] appropriately, and schar.c X X 6. If there's anything I missed, put it here. X X 7. Oh yeah, change PERTABLE X X 8. make install SHAR_EOF chmod 0755 2b2 || echo "restore of 2b2 fails" set `wc -c 2b2`;Sum=$1 if test "$Sum" != "644" then echo original size 644, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2c && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P6 X X2c. Bugs to fix X X 1. Make all gets() routines VERY SMART X 2. wgetnum doesn't accept delete X 3. Erase all redefined variables X 4. Make it faster! SHAR_EOF chmod 0755 2c || echo "restore of 2c fails" set `wc -c 2c`;Sum=$1 if test "$Sum" != "240" then echo original size 240, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > 2d && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Programmer's Manual X Page P7 X X2d. Version Logs X XVERSION 1.0 X X First program - buggy X Elements part of program. Change element, have to recompile. X That is bad .. must change. X Menu is driven by arrow keys and a light-up bar. I like it, but X it is cumbersome. Maybe I'll remove it. Only 20 elements in here. X Get to work! X XVERSION 1.1 X X Fixed up all the messy screens. X XVERSION 2.0 X X Re-Written with curses. Now have 36 elements. X They are located in a separate file, so that compilation is not X necessary. This slows down startup time, however. The light-up X menu bar works better & faster, does not leave a trail. X XVERSION 2.1 X X Added all the elements. Now I can work with the whole program. X Re-wrote the sorting subroutine. Now it works fast and ALWAYS X works! X XVERSION 2.2a X X Bug fixes X XVERSION 2.2b X X Bug fixes X XVERSION 3.0 X X Added a graphing module! (tough) X Added 'undefines' and highlights to the vdata routine. X Took out the light-up menu bar and replaced with letter/number X driven cbreak() menus. Changed all wmove() wprintw() to mvwaddstr() X XVERSION 3.1 X X Added a 'look at one element' menu option X Added a title screen X XVERSION 3.2a X X Changed the main menu around so it fit the curriculum X XVERSION 3.2b - CURRENT X X Minor bug fixed, manual pages written SHAR_EOF chmod 0755 2d || echo "restore of 2d fails" set `wc -c 2d`;Sum=$1 if test "$Sum" != "1342" then echo original size 1342, current size $Sum;fi sed 's/^X//' << 'SHAR_EOF' > contents && XChemTab - A Periodic Table Data Base (C) 1989 Jim King - Table of Contents X X1. Operator's Manual X X a. Starting the program...............................................1 X X b. Looking at a specific element......................................2 X X c. Choosing characteristics to select elements........................3 X X d. Viewing the selected elements......................................4 X X e. Graphing elemental characteristics.................................5 X X f. Exiting the program................................................6 X X2. Programmer's Manual X X a. Dynamics X X 1. Variables.......................................................P1 X X 2. Subroutines.....................................................P2 X X b. (Vague step-by-step instructions on) How to: X X 1. Changing elements X X a. Add an element to the program................................P3 X X b. Changing part of an element..................................P3 X X 2. Add a characteristic to the program.............................P4 X X 3. Add a main menu selection.......................................P5 X X c. Bugs to fix........................................................P6 X X d. Version Logs.......................................................P7 SHAR_EOF chmod 0755 contents || echo "restore of contents fails" set `wc -c contents`;Sum=$1 if test "$Sum" != "1275" then echo original size 1275, current size $Sum;fi exit 0