delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/24/15:12:37

X-Authentication-Warning: kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f
Date: Thu, 24 May 2001 13:46:00 -0500
From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp-workers AT delorie DOT com
Subject: CVS revision number in djasm.y
Message-ID: <20010524134600.A78@kendall.sfbr.org>
Mail-Followup-To: djgpp-workers AT delorie DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
Reply-To: djgpp-workers AT delorie DOT com

I think it will be useful (to me, at least ;-) to include the CVS revision
number of djasm.y as the djasm `version' number, written into the header
of the binary and into the SCCS/RCS id strings.  For example, the strings
written into stub.exe would change from this:

stub.exe generated from stub.asm by djasm, on Thu May 24 13:19:25 2001
$Id: stub.asm built 2001-05-24 13:19:25 by djasm $
@(#) stub.asm built 2001-05-24 13:19:25 by djasm

to this:

stub.exe generated from stub.asm by djasm v1.10 on Thu May 24 13:21:34 2001
$Id: stub.asm built 2001-05-24 13:21:34 by djasm v1.10$
@(#) stub.asm built 2001-05-24 13:21:34 by djasm v1.10

Below is a tentative patch.  Comments appreciated.
-- 
TIA/jtw


Index: djasm.y
===================================================================
RCS file: /cvs/djgpp/djgpp/src/stub/djasm.y,v
retrieving revision 1.10
diff -u -r1.10 djasm.y
--- djasm.y	2001/05/22 18:07:12	1.10
+++ djasm.y	2001/05/24 18:25:07
@@ -20,6 +20,8 @@
 #undef _POSIX_SOURCE
 #include "../../include/coff.h"
 
+#define VERSION $Revision$
+
 #define SMALL_EXE_HEADER 0
 #if SMALL_EXE_HEADER
 #define EXE_HEADER_SIZE 32
@@ -1414,7 +1416,7 @@
 
   time(&now);
 
-  sprintf(exe+INFO_TEXT_START, "\r\n%s generated from %s by djasm, on %.24s\r\n", argv[2], argv[1], ctime(&now));
+  sprintf(exe+INFO_TEXT_START, "\r\n%s generated from %s by djasm v%.2f on %.24s\r\n", argv[2], argv[1], VERSION, ctime(&now));
   if (copyright)
     strncat(exe+INFO_TEXT_START, copyright, (512-3-INFO_TEXT_START)-strlen(exe+INFO_TEXT_START)); /* -3 for the following line: */
   strcat(exe+INFO_TEXT_START, "\r\n\032");
@@ -2580,23 +2582,25 @@
   struct tm *tm;
   time(&now);
   tm = localtime(&now);
-  sprintf(tmp, "%cId: %s built %04d-%02d-%02d %02d:%02d:%02d by djasm $\n",
+  sprintf(tmp, "%cId: %s built %04d-%02d-%02d %02d:%02d:%02d by djasm v%.2f$\n",
 	  '$', inname,
 	  tm->tm_year + 1900,
 	  tm->tm_mon + 1,
 	  tm->tm_mday,
 	  tm->tm_hour,
 	  tm->tm_min,
-	  tm->tm_sec);
+	  tm->tm_sec,
+	  VERSION);
   add_copyright(tmp);
-  sprintf(tmp, "@(#) %s built %04d-%02d-%02d %02d:%02d:%02d by djasm\n",
+  sprintf(tmp, "@(#) %s built %04d-%02d-%02d %02d:%02d:%02d by djasm v%.2f\n",
 	  inname,
 	  tm->tm_year + 1900,
 	  tm->tm_mon + 1,
 	  tm->tm_mday,
 	  tm->tm_hour,
 	  tm->tm_min,
-	  tm->tm_sec);
+	  tm->tm_sec,
+	  VERSION);
   add_copyright(tmp);
 }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019