stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r637301 - /stdcxx/trunk/bin/xcomp.awk
Date Fri, 14 Mar 2008 23:20:34 GMT
Author: sebor
Date: Fri Mar 14 16:20:32 2008
New Revision: 637301

URL: http://svn.apache.org/viewvc?rev=637301&view=rev
Log:
2008-03-14  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (get_gzlogfname): New function to removed directory
	prefix from log file and replace the temporary PID suffix with the
	original .gz extension.
	(print_logtable, print_timingstable): Called get_gzlogfname().

Modified:
    stdcxx/trunk/bin/xcomp.awk

Modified: stdcxx/trunk/bin/xcomp.awk
URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/xcomp.awk?rev=637301&r1=637300&r2=637301&view=diff
==============================================================================
--- stdcxx/trunk/bin/xcomp.awk (original)
+++ stdcxx/trunk/bin/xcomp.awk Fri Mar 14 16:20:32 2008
@@ -1723,6 +1723,26 @@
 }
 
 
+function get_gzlogfname(fname)
+{
+    # strip directory prefix from file name
+    pos = match(fname, ".*/")
+    if (0 < pos)
+        fref = substr(fname, RLENGTH + 1)
+    else
+        fref = fname
+
+    # replace the temporary PID suffix with ".gz"
+    pos = match(fref, "\\.[1-9][0-9]*$")
+    if (0 < pos)
+        fref = substr(fref, 1, pos - 1)
+
+    fref = fref ".gz"
+
+    return fref
+}
+
+
 function print_logtable()
 {
     thead =                                                             \
@@ -1801,7 +1821,9 @@
         else
             print "        <tr>"
 
-        print "          <td><a href=\"" fname "\">" i "</a></td>"
+        # strip directory prefix from file name
+        loghref = get_gzlogfname(fname)
+        print "          <td><a href=\"" loghref "\">" i "</a></td>"
 
         ################################################################
         # extract and format the operating system name and version
@@ -1995,7 +2017,9 @@
         else
             print "        <tr>"
 
-        print "          <td><a href=\"" fname "\">" i "</a></td>"
+        # strip directory prefix from file name
+        loghref = get_gzlogfname(fname)
+        print "          <td><a href=\"" loghref "\">" i "</a></td>"
 
         buildtype = get_buildtype(fname)
         print "          <td>" buildtype "</td>"



Mime
View raw message