X-Delivery-Notice:  SMTP MAIL FROM does not correspond to sender.
Via:      UK.AC.AFRC.ARCB; 30 JUL 92 11:15:00 BST
Newsgroups: bit.listserv.info-gcg
Date:         Thu, 30 Jul 1992 11:16:00 GMT
Reply-To:     Cary O'Donnell <ODONNELL@ARCB.AFRC.AC.UK>
              <INFO-GCG@UTORONTO.BITNET>
From:         Cary O'Donnell <ODONNELL@ARCB.AFRC.AC.UK>
Subject:      GCG graphics libraries and other stuff

> Dear Sir,
> I would like to know which are the graphics libraries used in the GCG package,
> and what I have to do to get them
> I would like to develop a program according to the gcg standards and thus
> I am very interested in these information.
>
>  Thank you in advance
>
> Dr Sabino Liuni


You will find the Device-independant graphics primitives are well described
in the System Support Manual procedure library (page 77 on). This is a

Have a good look at GENSOURCE:PLOTTEST.FOR too.

The source files for the different graphics routines are in
   uwgcgdisk:[gcgsource.library.genlib], under the logical GENLIB.
If you want to trace the primitive to a lower level, then you can start
chasing around from this point, though I don't recommend it :-)

I append my own notes which I refer to for making individual
library and application program amendments. This avoids doing a
complete NEWBUILD each time.

Cary


To add a new device driver to GCG (eg: driver for UNIGKS)
=========================================================

1) Using the VAXGKS driver as a template: All drivers are in
   GENDRIVERS:drivernameDD*.FOR, plus a blank file
   GENDRIVERS:drivernameAAA.FOR The rebuilding process concatenates to
   this file.

2) Create a new file GENINCLUDE:UNIGKS.INC, again based on VAXGKS.INC in the
   same directory.

3) Edit PLOT.OPT to include UNIGKS_EXE/SHARE ie: link external shared
   libraries.

4) Edit Genmakefiles:Drivers.txt to include UNIGKS.

   If only rebuilding the UNIGKS driver, copy DRIVERS.TXT
   to DRIVERS_BAK.TXT, then edit DRIVERS.TXT again to pling (!) exclude the
   names of all drivers that don;t require rebuilding. Don't forget to copy
   DRIVERS_BAK.TXT back later in case of a later NEWBUILD.

5) Place a (blank) file named UNIGKS.OLB in GENOBLIB
   Place a (blank) file named UNIGKSSHARE.EXE in GENIMAGE

   These have to be done in order to get over an apparently impossible
   bind : cannot make new driver .exe or olb without files of the same name
   already present in GENIMAGE and GENOBLIB

6) Re-create the list of shared drivers in GENMAKEFILES:DRIVERS.TXT by:

      $ gcgsupport
      $ Plotrebuild Nodi


Editing a library routine
=========================

1)  eg: GENLIB:DBOPENINDEX.FOR

    This holds the file-extension names for the databases
    ,NAMES, .NUMBERS, .OFFSET (Not .SEQCAT). In version 7 the .NUMBERS file
    is new. NAMES and .NUMBERS have the same names as for version 6 but are
    in a very different format. To allow version 6 and 7 to share the same
    data, must have new names for these files. Without amending this library
    routine we would have to duplicate entire database and give it a new name.
    So - just substitues .7_NAMES, .7_NUMBERS and .7_OFFSET for
    .NAMES, .NUMBERS, .OFFSET respectively.

    $ gcgsupport
    $ Copy genlib:dbopenindex.for *
    $ edit ..
    $ fortran/extend dbopenindex
    $ TOgenlib dbopenindex
    $ Makeshare/noplot
    $ copy dbopenindex.for genlib


2) Introduce a /QUeue=quename parameter to programs that have the
   /BATCH parameter added. Program prompts for the parameter if it is
   omitted. Amendments to GENLIB:CLSUBMIT.FOR and the addition of
   GCGSUBMIT.COM to cope with a LOG file placement. (Advice of Don Katz GCG)
   Also - based .COM, .INIT file on output file name.

    $ gcgsupport
    $ Copy genlib:clsubmit.for *
    $ edit ..
    $ fortran/extend clsubmit
    $ TOgenlib clsubmit
    $ Makeshare/noplot
    $ copy clsubmit.for genlib


   For any GENLIB alterations - rename or copy the original to
   libname.BAK_FOR. DO NOT name to libname_BAK.FOR, as the library is
   assembled from *.FOR by the REMAKELIB.COM file in GENSYSCOM


3) Edited GENLIB:FINDDATAFILE.FOR

    GCG provided PROSITE 6 in its own directory, but I already had Prosite7.
    I want to keep this data in the PUBLICSEQ directory, or rather in the
    SWISS$DISK division. So - I reformatted the database using PROSITETOGCG
    placing ALL the output files in the redefined PROSITEDIR directory.

    As provided MOTIFS looked for PROSITE.PATTERNS in Genrundata, but not
    anywhere else. I tracked down FINDDATAFILE.FOR as being responsible
    and changed the search-bit to look in PROSITEDIR in addition to genrundata.

    As before - compile, then TOGENLIB, then MAKESHARE/noplot.

{    In fact I first tried it by substituting the search in genrundata for
    searching all the data directories defined by GCGDATAFILEDIRS.
    Bear the following in mind if this is later adopted:

    Advantage: You can move/add any other data using only the GCGDATAFILEDIRS
    definition in SITELOGICALS.COM

    Disadvantage: Two data files with the same names in different data
    directories could potentially cause problems for some progs. I have
    no idea at the moment:

}


4)  A bug in a routine affecting FASTA.

    $ Copy Genlib:SQNext.for []
    $ Edit SQNext.For
    $ Fortran /Extend SqNext.For
    $ ToGenlib SQNext
    $ Copy SQNext.for GenLib

     Now, remake the shareable image.

    $ MakeShare /noplot

     If your shared images are installed, you need to do the following.
     (If you are on a VAXCluster, make sure they get re-installed on all
     nodes in the cluster)

     $ GCGImage replace


5) Modifying an application program:

  eg: PRETTY.FOR (see amendments below)
      A new command line parameter added to PRETTY, /NODIFF=" ". This is the
      reverse of the /DIFF option, in which ONLY the winners of the consensus
      are displayed.

    $ gcgsupport
    $ Copy gensource:pretty.for *
    $ edit pretty.for
    $ fortran/extend pretty
    $ sharelink pretty
   Test the program ....
    $ copy pretty.for gensource
    $ copy pretty.exe GenUtil

======================================================================
o 18th October 1991

A new command line parameter added to PRETTY, /NODIFF=" ". This is the
reverse of the /DIFF option, in which ONLY the winners of the consensus
are displayed.

The following is a differences on the two files:

************
File GENSOURCE:PRETTY.FOR;1
   12   !*
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
   12   !*
   13   !*              Modified AFRC 18-Oct-1991 with addition of
 /NODifferences option
   14   !*
************
************
File GENSOURCE:PRETTY.FOR;1
   30   	Logical Consensus, Differences, Case
   31   	Logical Identity/.FALSE./, CharIdent, Interact
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
   32   	Logical Consensus, Differences, Case, NoDiff
   33   	Logical Identity/.FALSE./, CharIdent, Interact
************
************
File GENSOURCE:PRETTY.FOR;1
   46   	Differences = CLRetBool('DIFferences')
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
   48   	NoDiff = CLRetBool('NODifferences')
   49   	Differences = CLRetBool('DIFferences')
************
************
File GENSOURCE:PRETTY.FOR;1
  105        &	       Case ) then
  106   	    If ( .not.CLGetReal('PLUrality', -100.0, 1000.0, MinCon)
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  108        &	       Case .or. NoDiff ) then
  109   	    If ( .not.CLGetReal('PLUrality', -100.0, 1000.0, MinCon)
************
************
File GENSOURCE:PRETTY.FOR;1
  131   	  If ( Consensus .or. Case .or. Differences ) then
  132   	    Call VoteConsensus(Strand, StrandPtr, StrandNo, Strandlen,
  133        &			       Weights, InFName, Begin, End, MaxLength,
  134        &			       MinCon, Case, Differences, Identity,
  135        &			       IdentSym, CharIdent, WildFName,
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  134   	  If ( Consensus .or. Case .or. NoDiff .or. Differences ) then
  135   	    Call VoteConsensus(Strand, StrandPtr, StrandNo, Strandlen,
  136        &			       Weights, InFName, Begin, End, MaxLength,
  137        &			       MinCon, Case, NoDiff, Differences, Identity,
  138        &			       IdentSym, CharIdent, WildFName,
************
************
File GENSOURCE:PRETTY.FOR;1
  138   	    If ( (Consensus .and. .not.Identity) .or. Case .or.
  139        &		 Differences ) Call FWriteF(OutFile,
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  141   	    If ( (Consensus .and. .not.Identity) .or. Case .or. NoDiff .or.
  142        &		 Differences ) Call FWriteF(OutFile,
************
************
File GENSOURCE:PRETTY.FOR;1
  454        &				 Mincon, Case, Differences, Identity,
  455        &				 IdentSym, CharIdent, WildName,
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  457        &				 Mincon, Case, NoDiff, Differences, Identity,
  458        &				 IdentSym, CharIdent, WildName,
************
************
File GENSOURCE:PRETTY.FOR;1
  468   	Logical Case, Differences, Identity, CharIdent
  469   	Character IdentSym(*), WildName(*)
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  471   	Logical Case, NoDiff, Differences, Identity, CharIdent
  472   	Character IdentSym(*), WildName(*)
************
************
File GENSOURCE:PRETTY.FOR;1
  525        &		      Case, Differences, Identity, IdentSym, CharIdent)
  526   	  do j = 1, StrandNo+1
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  528        &		      Case, NoDiff, Differences, Identity, IdentSym,
  529        &    CharIdent)
  530   	  do j = 1, StrandNo+1
************
************
File GENSOURCE:PRETTY.FOR;1
  546        &				Weights, Case, Differences,
  547        &				Identity, IdentSym, CharIdent )
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  550        &				Weights, Case, NoDiff, Differences,
  551        &				Identity, IdentSym, CharIdent )
************
************
File GENSOURCE:PRETTY.FOR;1
  554    	Logical Case, Differences, Identity, CharIdent
  555
  556   	character Str(MAXSEQNUM+1), Str2(MAXSEQNUM+1)
  557   	Character DiffStr(132), CountChars(2)
  558   	Character NumToAlpha, ChToUpper, ChToLower, MatchChar
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  558    	Logical Case, NoDiff, Differences, Identity, CharIdent
  559
  560   	character Str(MAXSEQNUM+1), Str2(MAXSEQNUM+1)
  561   	Character DiffStr(132), Diffstr2(132), CountChars(2)
  562   	Character NumToAlpha, ChToUpper, ChToLower, MatchChar
************
************
File GENSOURCE:PRETTY.FOR;1
  570   	  Call CLGetStr('DIFferences', DiffStr)
  571   	  Calls = -1
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  574   	  DiffStr2(1) = ' '
  575   	  Call CLGetStr('DIFferences', DiffStr)
  576   	  Call CLGetStr('NODifferences', DiffStr2)
  577   	  Calls = -1
************
************
File GENSOURCE:PRETTY.FOR;1
  617   	    if ( Case .or. Differences ) Strand(i) = ChToLower(Strand(i))
  618   	    MatchVector(i) = .false.
******
File SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
  623   	    if ( Case .or. Differences ) then
  624                   Strand(i) = ChToLower(Strand(i))
  625               else if ( NoDiff ) then
  626   	      Strand(i) = DiffStr2(1)
  627               End If
  628   	    MatchVector(i) = .false.
************

Number of difference sections found: 13
Number of difference records found: 27

DIFFERENCES
 /IGNORE=()/MERGED=1/OUTPUT=SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTYDIFF.LIS;5-
    GENSOURCE:PRETTY.FOR;1-
    SYS$ARCDEVICE:[ODONNELL.TESTGCG7]PRETTY.FOR;8
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU