Browse Source

libgis: G__script(), respect current year in the script-like output

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48389 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 năm trước cách đây
mục cha
commit
97fe635c5c
2 tập tin đã thay đổi với 18 bổ sung14 xóa
  1. 1 0
      lib/gis/Makefile
  2. 17 14
      lib/gis/parser_script.c

+ 1 - 0
lib/gis/Makefile

@@ -3,6 +3,7 @@ MODULE_TOPDIR = ../..
 LIB = GIS
 
 EXTRA_INC = $(ZLIBINCPATH) $(PTHREADINCPATH) $(REGEXINCPATH)
+EXTRA_CFLAGS = -DGRASS_VERSION_DATE=\"'$(GRASS_VERSION_DATE)'\"
 
 DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections
 

+ 17 - 14
lib/gis/parser_script.c

@@ -1,16 +1,16 @@
 /*!
- * \file gis/parser_script.c
- *
- * \brief GIS Library - Argument parsing functions (script)
- *
- * (C) 2001-2009 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public License
- * (>=v2). Read the file COPYING that comes with GRASS for details.
- *
- * \author Original author CERL
- * \author Soeren Gebbert added Dec. 2009 WPS process_description document
- */
+  \file lib/gis/parser_script.c
+  
+  \brief GIS Library - Argument parsing functions (script)
+  
+  (C) 2001-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Original author CERL
+  \author Soeren Gebbert added Dec. 2009 WPS process_description document
+*/
 
 #include <stdio.h>
 
@@ -18,6 +18,9 @@
 
 #include "parser_local_proto.h"
 
+/*!
+  \brief Generate script-like output
+*/
 void G__script(void)
 {
     FILE *fp = stdout;
@@ -29,8 +32,8 @@ void G__script(void)
     fprintf(fp, "# MODULE:       %s_wrapper\n", G_program_name());
     fprintf(fp, "# AUTHOR(S):    %s\n", G_whoami());
     fprintf(fp, "# PURPOSE:      \n");
-    fprintf(fp, "# COPYRIGHT:    (C) 2009 by %s, and The GRASS Development Team\n",
-	    G_whoami());
+    fprintf(fp, "# COPYRIGHT:    (C) %s by %s, and The GRASS Development Team\n",
+	    GRASS_VERSION_DATE, G_whoami());
     fprintf(fp, "#\n");
     fprintf(fp,
 	    "#  This program is free software; you can redistribute it and/or modify\n");