This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: wwwdocs/ml-request -- simplify


On Thu, Nov 25, 1999 at 04:34:08PM +0100, Gerald Pfeifer wrote:

> I checked in the following patch to wwwdocs/ml-request. In my opinion,
> this should make the output of the script easier to understand for less
> experienced users, while no relevant information is lost for experienced
> ones.

Good idea, this is something I always intended to clean up but never
got around to.

I think we can do a bit better, even.  What do you think about the
patch below?  I can apply it if you think it is OK.  I'm using your
patch plus this one on the sourceware side of the site right now.


Jason
Free the Software!


Index: ml-request
===================================================================
RCS file: /cvs/gcc/wwwdocs/cgi-bin/ml-request,v
retrieving revision 1.4
diff -u -p -r1.4 ml-request
--- ml-request	1999/11/25 15:30:41	1.4
+++ ml-request	1999/11/29 03:12:26
@@ -134,11 +134,21 @@ fi
 
 if [ -n "$email" -a "$hasat" -eq 1 -a "$hasdot" -eq 1 -a "$has_listname" -eq 1 ]
 then
+
+  if [ "$operation" = "subscribe" ]
+  then
+    sub_prefix=""
+    sub_direction="to"
+  else
+    sub_prefix="un"
+    sub_direction="from"
+  fi
+
   echo "Content-type: text/html"
   echo ""
   echo "<HTML>"
   echo "<head>"
-  echo "<TITLE>Your subscription request is being sent in...</TITLE>"
+  echo "<TITLE>Your ${sub_prefix}subscribe request is being sent in...</TITLE>"
   echo "</head>"
   echo "$HEADER"
 
@@ -148,15 +158,9 @@ then
   email="`echo ${email} | sed 's,@,=,g'`"
   echo "" | $MAIL "${listname}-${digest}${operation}-${email}@gcc.gnu.org"
 
-  echo '<h2>Your (un)subscription request is being sent in...</h2>'
+  echo "<h2>Your ${sub_prefix}subscribe request is being sent in...</h2>"
 
-
-  if [ "$operation" = "subscribe" ]
-  then
-    echo "<p>Your request to subscribe the address ${orig_email} to"
-  else
-    echo "<p>Your request to unsubscribe the address ${orig_email} from"
-  fi
+  echo "<p>Your request to ${sub_prefix}subscribe the address ${orig_email} ${sub_direction}"
 
   echo "the mailing list <code>\"${listname}\""
   if [ "$digest" = "digest-" ]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]