From 1b08d9868e737a64e622d6ed89e1072da5a4ebc7 Mon Sep 17 00:00:00 2001 From: edgrif <edgrif> Date: Tue, 21 Feb 2006 15:05:31 +0000 Subject: [PATCH] add some extra application information functions to return copyright strings etc. --- src/include/ZMap/zmapUtils.h | 7 +++++-- src/zmapUtils/zmapUtils.c | 28 +++++++++++++++++++++++--- src/zmapUtils/zmapUtils_P.h | 38 ++++++++++++++++++++++++++++++------ 3 files changed, 62 insertions(+), 11 deletions(-) diff --git a/src/include/ZMap/zmapUtils.h b/src/include/ZMap/zmapUtils.h index 59b00045d..368a41e05 100755 --- a/src/include/ZMap/zmapUtils.h +++ b/src/include/ZMap/zmapUtils.h @@ -24,9 +24,9 @@ * * Description: Utility functions for ZMap. * HISTORY: - * Last edited: Jan 27 08:00 2006 (edgrif) + * Last edited: Feb 20 11:28 2006 (edgrif) * Created: Thu Feb 26 10:33:10 2004 (edgrif) - * CVS info: $Id: zmapUtils.h,v 1.19 2006-02-02 11:20:17 edgrif Exp $ + * CVS info: $Id: zmapUtils.h,v 1.20 2006-02-21 15:05:31 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_UTILS_H @@ -127,6 +127,9 @@ gboolean zMapFileEmpty(char *filepath) ; /* routines to return basic version/information about zmap. */ char *zMapGetAppName(void) ; char *zMapGetAppTitle(void) ; +char *zMapGetCopyrightString(void) ; + char *zMapGetCommentsString(void) ; + char *zMapGetLicenseString(void) ; int zMapGetVersion(void) ; char *zMapGetVersionString(void) ; gboolean zMapCompareVersionStings(char *reference_version, char *test_version) ; diff --git a/src/zmapUtils/zmapUtils.c b/src/zmapUtils/zmapUtils.c index 977b7afe0..16aaf2031 100755 --- a/src/zmapUtils/zmapUtils.c +++ b/src/zmapUtils/zmapUtils.c @@ -26,9 +26,9 @@ * * Exported functions: See ZMap/zmapUtils.h * HISTORY: - * Last edited: Nov 17 10:40 2005 (edgrif) + * Last edited: Feb 20 11:15 2006 (edgrif) * Created: Fri Mar 12 08:16:24 2004 (edgrif) - * CVS info: $Id: zmapUtils.c,v 1.14 2005-11-18 10:55:49 edgrif Exp $ + * CVS info: $Id: zmapUtils.c,v 1.15 2006-02-21 15:05:31 edgrif Exp $ *------------------------------------------------------------------- */ @@ -187,7 +187,29 @@ char *zMapGetAppTitle(void) * */ char *zMapGetCopyrightString(void) { - return ZMAP_COPYRIGHT_STRING(ZMAP_TITLE, ZMAP_VERSION, ZMAP_RELEASE, ZMAP_UPDATE, ZMAP_DESCRIPTION) ; + return ZMAP_COPYRIGHT_STRING() ; +} + +/*! + * Returns a comments string for the ZMap application. + * + * @param void None. + * @return The comments as a string. + * */ +char *zMapGetCommentsString(void) +{ + return ZMAP_COMMENTS_STRING(ZMAP_TITLE, ZMAP_VERSION, ZMAP_RELEASE, ZMAP_UPDATE) ; +} + +/*! + * Returns a license string for the ZMap application. + * + * @param void None. + * @return The license as a string. + * */ +char *zMapGetLicenseString(void) +{ + return ZMAP_LICENSE_STRING() ; } diff --git a/src/zmapUtils/zmapUtils_P.h b/src/zmapUtils/zmapUtils_P.h index f852a26cb..8d231e79e 100755 --- a/src/zmapUtils/zmapUtils_P.h +++ b/src/zmapUtils/zmapUtils_P.h @@ -25,9 +25,9 @@ * Description: * Exported functions: See XXXXXXXXXXXXX.h * HISTORY: - * Last edited: Nov 10 11:28 2005 (edgrif) + * Last edited: Feb 20 11:27 2006 (edgrif) * Created: Wed Mar 31 11:53:45 2004 (edgrif) - * CVS info: $Id: zmapUtils_P.h,v 1.9 2005-11-11 12:08:51 edgrif Exp $ + * CVS info: $Id: zmapUtils_P.h,v 1.10 2006-02-21 15:05:31 edgrif Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_UTILS_P_H @@ -58,25 +58,51 @@ ZMAP_MAKESTRING(VERSION) "." ZMAP_MAKESTRING(RELEASE) "." ZMAP_MAKESTRING(UPDATE TITLE " - " ZMAP_MAKE_VERSION_STRING(VERSION, RELEASE, UPDATE) + + +/* Create a copyright string for dialogs etc. */ +#define ZMAP_COPYRIGHT_STRING() \ +"Copyright (c): Sanger Institute, 2006" + + +/* Create a comments string for dialogs etc. */ +#define ZMAP_COMMENTS_STRING(TITLE, VERSION, RELEASE, UPDATE) \ +"("ZMAP_MAKE_TITLE_STRING(TITLE, VERSION, RELEASE, UPDATE)", " \ +"compiled on - "__DATE__" "__TIME__")\n" \ +"\n" \ +"This application is part of the ZMap genome viewer/annotation package originally written by\n" \ +"Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk\n" \ +"and Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk)\n" + + +/* Create a copyright string for dialogs etc. */ +#define ZMAP_LICENSE_STRING() \ +"ZMap is distributed under the GNU Public License, see http://www.gnu.org/copyleft/gpl.txt" + + + /* Create a copyright string to insert in the compiled application, this will show * up if someone looks through the executable or does a "what" on the executable. */ -#define ZMAP_COPYRIGHT_STRING(TITLE, VERSION, RELEASE, UPDATE, DESCRIPTION_STRING) \ +#define ZMAP_OBJ_COPYRIGHT_STRING(TITLE, VERSION, RELEASE, UPDATE, DESCRIPTION_STRING) \ "@(#) \n" \ "@(#) ------------------------------------------------------------------------------------------ \n" \ "@(#) Title/Version: "ZMAP_MAKE_TITLE_STRING(TITLE, VERSION, RELEASE, UPDATE)"\n" \ "@(#) Compiled: "__DATE__" "__TIME__"\n" \ "@(#) Description: " DESCRIPTION_STRING"\n" \ -"@(#) Copyright (c): Sanger Institute, 2004\n" \ +"@(#) Copyright (c): Sanger Institute, 2006\n" \ "@(#) \n" \ -"@(#) This application is part of the ZMap genome database package originally written by \n" \ +"@(#) This application is part of the ZMap genome viewer/annotation package originally written by \n" \ "@(#) Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk, \n" \ -"@(#) and Rob Clack (Sanger Institute, UK) rnc@sanger.ac.uk \n" \ +"@(#) and Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk \n" \ "@(#) \n" \ "@(#) ZMap is distributed under the GNU Public License, see http://www.gnu.org/copyleft/gpl.txt \n" \ "@(#) ------------------------------------------------------------------------------------------ \n" \ "@(#) \n" + + + #define ZMAP_SEPARATOR "/" /* WE SHOULD BE ABLE TO CALL A FUNC FOR THIS..... */ -- GitLab