| 1 |
/* File: banner.c |
| 2 |
* Author: Extracted from xacemain.c by R. Bruskiewich |
| 3 |
* xacemain.c by Jean Thierry-Mieg ([email protected]) |
| 4 |
* Copyright (C) J Thierry-Mieg and R Durbin, 1991 |
| 5 |
* ------------------------------------------------------------------- |
| 6 |
* Acedb is free software; you can redistribute it and/or |
| 7 |
* modify it under the terms of the GNU General Public License |
| 8 |
* as published by the Free Software Foundation; either version 2 |
| 9 |
* of the License, or (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 |
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt |
| 20 |
* ------------------------------------------------------------------- |
| 21 |
* This file is part of the ACEDB genome database package, written by |
| 22 |
* Richard Durbin (MRC LMB, UK) [email protected], and |
| 23 |
* Jean Thierry-Mieg (CRBM du CNRS, France) [email protected] |
| 24 |
* |
| 25 |
* Description: extern String array for introductory banner text |
| 26 |
* which can be modified and used in a flexible manner |
| 27 |
* SCCS: @(#)banner.c 1.2 10/7/96 |
| 28 |
* HISTORY: |
| 29 |
* Last edited: Jul 6 13:20 2000 (edgrif) |
| 30 |
* * Dec 1 15:39 1998 (edgrif): Increase intial array size for bannerMainStrings, |
| 31 |
* change title of banner to show both acedb version/build date & |
| 32 |
* calling applications build date. |
| 33 |
* * Nov 26 10:19 1998 (fw): |
| 34 |
* - thisSession defined locally and exported from DLL |
| 35 |
* * Jun 3 19:28 1996 (rd) |
| 36 |
* Created: Jun 28 00:20 1995 (rbrusk) |
| 37 |
*------------------------------------------------------------------- |
| 38 |
*/ |
| 39 |
|
| 40 |
#include "acedb.h" |
| 41 |
#include "aceio.h" |
| 42 |
#include "dbpath.h" |
| 43 |
#include "session.h" /* for thisSession.subDataRelease */ |
| 44 |
#include "version.h" /* For getting program compile date. */ |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
#ifdef RD_PROPOSAL_9812 |
| 49 |
|
| 50 |
/*------- These comment lines stop the compiler moaning... --------------- |
| 51 |
From rd Thu Dec 17 16:00:32 1998 |
| 52 |
To: Danielle et jean Thierry-Mieg <[email protected]> |
| 53 |
Subject: Re: banner |
| 54 |
|
| 55 |
I think in trying to be specific the banner tends to become unbalanced and out |
| 56 |
of date. Also it is too long to put on stdout - it takes up more than one |
| 57 |
screen. I would prefer something 10 lines long. However, the last thing I want |
| 58 |
to do is get into a debate with you about attributing everyone correctly. What |
| 59 |
about: |
| 60 |
|
| 61 |
****** xace - ACEDB Version 4_6, Release INTERNAL, Link date Nov 2 1998 ****** |
| 62 |
Developers include: Jean Thierry-Mieg ([email protected]), Richard Durbin |
| 63 |
([email protected]), Friedemann Wobus, Ed Griffiths, Michel Potdevin, Danielle |
| 64 |
Thierry-Mieg, Lincoln Stein, Simon Kelley, Richard Bruskiewich, Sam Cartinhour, |
| 65 |
Ian Longden, Erik Sonnhammer, Phil Green, Otto Ritter, Frank Eeckman, Detlef |
| 66 |
Wolf, Cyrus Harmon, John McCarthy, Martin Senger, Petr Kocab, John Morris, Gary |
| 67 |
Aochi, Mike Holman. |
| 68 |
Available under Gnu Public License via http://www.sanger.ac.uk/Software/Acedb/ |
| 69 |
******************************************************************************* |
| 70 |
|
| 71 |
Add anyone you want. I guess we should continue to have two separate lists for |
| 72 |
the graphical and non-graphical (kernel only) versions. If you want to put up a |
| 73 |
mirror of our site, or something comparable, or add anything to it, please |
| 74 |
suggest. |
| 75 |
|
| 76 |
In case this upsets anyone there, dont take it as seriously thought out - I am |
| 77 |
sleep deprived and have lots of other things going on. |
| 78 |
------------------------------------------------------------------------*/ |
| 79 |
|
| 80 |
#endif |
| 81 |
|
| 82 |
|
| 83 |
/* Somehow this seemed to have disappeared from this file ? I've put it back.*/ |
| 84 |
#define ADD(z) array(result, arrayMax(result), char*) = strnew (z,0) |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
Array bannerMainStrings (char *program, BOOL isGraphical, BOOL isAcembly) |
| 89 |
{ |
| 90 |
Array result = arrayCreate (64, char*) ; |
| 91 |
|
| 92 |
/* Header to show application compile date and acedb version. */ |
| 93 |
ADD(messprintf ("\n**** Program %s, %s ****", |
| 94 |
program, utAppGetCompileDate())) ; |
| 95 |
|
| 96 |
ADD(messprintf ("**** Using %s, %s ****\n", |
| 97 |
aceGetVersionString(), |
| 98 |
aceGetLinkDateString())) ; |
| 99 |
|
| 100 |
|
| 101 |
if (isAcembly) |
| 102 |
{ |
| 103 |
ADD("** Acembly: Sequence Assembly and Edition system") ; |
| 104 |
ADD(" by Danielle et Jean Thierry-Mieg and Ulrich Sauvage") ; |
| 105 |
ADD(" (CNRS, France) [email protected]") ; |
| 106 |
ADD(" Built over the acedb data manager, developed by ") ; |
| 107 |
ADD(" Thierry-Mieg and Durbin (1989-...)") ; |
| 108 |
} |
| 109 |
else |
| 110 |
{ |
| 111 |
ADD("Code by: Jean Thierry-Mieg (CNRS, France) [email protected]") ; |
| 112 |
ADD(" Richard Durbin (Sanger Centre, UK) [email protected]") ; |
| 113 |
ADD(" Simon Kelley (Sanger Centre, UK) [email protected]") ; |
| 114 |
ADD(" Ed Griffiths (Sanger Centre, UK) [email protected]") ; |
| 115 |
ADD(" Rob Clack (Sanger Centre, UK) [email protected]"); |
| 116 |
} |
| 117 |
|
| 118 |
#if defined(WIN32) |
| 119 |
ADD("") ; |
| 120 |
ADD("Windows-32 adaptation by:") ; |
| 121 |
ADD(" Richard Bruskiewich (UBC, Canada) [email protected]") ; |
| 122 |
ADD(" funded by the Canadian Genome Analysis and Technology") ; |
| 123 |
ADD(" Program (CGAT) of the Medical Research Council of Canada.") ; |
| 124 |
ADD("") ; |
| 125 |
#endif |
| 126 |
|
| 127 |
if (isGraphical) |
| 128 |
{ |
| 129 |
ADD("with ideas and code contributed from many laboratories including:") ; |
| 130 |
ADD(" Montpellier:") ; |
| 131 |
ADD("\t Danielle Thierry-Mieg on the user interface") ; |
| 132 |
ADD("\t Michel Potdevin on more-info, biblio and debugging") ; |
| 133 |
ADD(" Sanger:") ; |
| 134 |
ADD("\t Erik Sonnhammer for the blixem and dotter packages,") ; |
| 135 |
ADD("\t Friedemann Wobus on AQL and the graphic package") ; |
| 136 |
ADD("\t Ian Longden on graphics applications") ; |
| 137 |
ADD(" DKFZ:") ; |
| 138 |
ADD("\t Otto Ritter on large data sets and the attach mechanism,") ; |
| 139 |
ADD("\t Detlef Wolf for quality control") ; |
| 140 |
ADD("\t Petr Kocab and Martin Senger for rpc layer;") ; |
| 141 |
ADD(" LBL:") ; |
| 142 |
ADD("\t Franck Eeckman for the Mac port ") ; |
| 143 |
ADD("\t John McCarthy on metadata and documentation,") ; |
| 144 |
ADD("\t Gary Aochi for the query interface") ; |
| 145 |
ADD(" UC Berkeley Drosophila Genome group: ") ; |
| 146 |
ADD("\t Cyrus Harmon also for the Mac port ") ; |
| 147 |
ADD("\t Suzana Lewis on the graphic toolbox") ; |
| 148 |
#if !defined(WIN32) |
| 149 |
ADD("University of British Columbia, Canada:") ; |
| 150 |
ADD("\t Richard Bruskiewich on the Microsoft Windows port.") ; |
| 151 |
ADD("") ; |
| 152 |
#endif |
| 153 |
ADD(" and also:") ; |
| 154 |
ADD("\t Phil Green (genefinder), Jaime Prilusky (Mosaic help),") ; |
| 155 |
ADD("\t Sam Cartinhour and John Morris on documentation.") ; |
| 156 |
ADD(" This list is only tentative, we apologise for omissions, and wish to ") ; |
| 157 |
ADD(" stress that these people and others have also helped fix all sorts") ; |
| 158 |
ADD(" of details that cannot be listed individually. ") ; |
| 159 |
ADD(" Thank you et merci.") ; |
| 160 |
} |
| 161 |
|
| 162 |
ADD("") ; |
| 163 |
ADD("You may redistribute this program and database subject to the") ; |
| 164 |
ADD("conditions in the accompanying copyright file. Anyone interested in") ; |
| 165 |
ADD("maintaining an up-to-date version should contact one of the authors") ; |
| 166 |
ADD("at the above email addresses.") ; |
| 167 |
ADD("") ; |
| 168 |
|
| 169 |
return result ; |
| 170 |
} /* bannerMainStrings */ |
| 171 |
|
| 172 |
/************************************************************/ |
| 173 |
|
| 174 |
Array bannerDataInfoStrings (void) |
| 175 |
/* must be called after sessionInit, so thisSession is set */ |
| 176 |
{ |
| 177 |
Array result = arrayCreate (32, char*) ; |
| 178 |
char *fname ; |
| 179 |
|
| 180 |
if ((fname = dbPathStrictFilName("wspec", "datainfo","wrm","r", 0))) |
| 181 |
{ |
| 182 |
ACEIN inf_in; |
| 183 |
char params[256]; |
| 184 |
|
| 185 |
sprintf (params, "%d %d %d", |
| 186 |
aceGetVersion(), aceGetRelease(), |
| 187 |
thisSession.subDataRelease); |
| 188 |
|
| 189 |
inf_in = aceInCreateFromFile (fname, "r", params, 0); |
| 190 |
if (inf_in) |
| 191 |
{ |
| 192 |
while (aceInCard (inf_in)) |
| 193 |
ADD(aceInPos(inf_in)); |
| 194 |
|
| 195 |
aceInDestroy (inf_in); |
| 196 |
} |
| 197 |
messfree(fname); |
| 198 |
} |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
return result ; |
| 203 |
} /* bannerDataInfoStrings */ |
| 204 |
|
| 205 |
/************************************************************/ |
| 206 |
|
| 207 |
void bannerWrite (Array strings) |
| 208 |
{ |
| 209 |
int i ; |
| 210 |
char *banner_line; |
| 211 |
|
| 212 |
if (!getenv("ACEDB_NO_BANNER")) |
| 213 |
for (i = 0 ; i < arrayMax(strings) ; ++i) |
| 214 |
{ |
| 215 |
banner_line = arr(strings, i, char*); |
| 216 |
|
| 217 |
printf ("%s\n", banner_line) ; |
| 218 |
messfree (banner_line); |
| 219 |
} |
| 220 |
|
| 221 |
arrayDestroy (strings) ; |
| 222 |
} /* bannerWrite */ |
| 223 |
|
| 224 |
/**************** end of file *****************/ |