[BACK]Return to support.awk CVS log [TXT][DIR] Up to [local] / www

Diff for /www/Attic/support.awk between version 1.3 and 1.4

version 1.3, 1999/09/20 14:30:53 version 1.4, 1999/09/23 21:54:57
Line 1 
Line 1 
 #!/usr/bin/nawk -f  #!/usr/bin/nawk -f
   
 # used both by support.bld and by groups.bld, since the formats are similar  # used by support.bld to generate the table in support.html
   
 # convert data like this (order doesn't matter except 0 at front)  # convert data like this (order doesn't matter except 0 at front)
 # 0  # 0
Line 8 
Line 8 
 # P Ontario  # P Ontario
 # T Palgrave  # T Palgrave
 # A R R # 1  # A R R # 1
   # Z L0N 1P0
 # O Consultant  # O Consultant
 # I Ian F. Darwin  # I Ian F. Darwin
 # M ian@darwinsys.com  # M ian@darwinsys.com
Line 28 
Line 29 
   
 $1 == "C" { country = substr($0, 2);  $1 == "C" { country = substr($0, 2);
         if (country != oldCountry) {          if (country != oldCountry) {
                 print "<TR><TD BGCOLOR=\"#FFFF00\" COLSPAN=6 ALIGN=CENTER><B>" country "</B>"                  print "<TR><TD BGCOLOR=\"#FFFF00\" COLSPAN=2 ALIGN=CENTER><B>" country "</B>"
          }           }
         oldCountry = country          oldCountry = country
         next          next
Line 36 
Line 37 
 $1 == "P" { prov = substr($0, 2); next }  $1 == "P" { prov = substr($0, 2); next }
 $1 == "T" { city = substr($0, 2); next }  $1 == "T" { city = substr($0, 2); next }
 $1 == "A" { addr = substr($0, 2); next }  $1 == "A" { addr = substr($0, 2); next }
   $1 == "Z" { zip = substr($0, 2); next }
 $1 == "O" { org = substr($0, 2); next }  $1 == "O" { org = substr($0, 2); next }
 $1 == "I" { indv = substr($0, 2); next }  $1 == "I" { indv = substr($0, 2); next }
 $1 == "B" { phone = substr($0, 2); next }  $1 == "B" { phone = substr($0, 2); next }
Line 54 
Line 56 
         print "<TR>"          print "<TR>"
         print "<TD>"          print "<TD>"
                 if (indv != "")                  if (indv != "")
                         print indv "<BR>"                          print "Name: " indv "<BR>"
                 print org "<BR>" addr                  if (org != "")
         print " <TD>" city "<BR>" prov                          print "Organization: " org "<BR>"
         print " <TD>"                  if (addr != "")
                           print "Address: " addr "<BR>"
                   if (city != "") {
                           print "City: " city
                           if (prov != "")
                                   print ", " prov
                           if (zip != "")
                                   print " " zip
                           print "<BR>"
                   }
                 if (phone != "")                  if (phone != "")
                         print phone "<BR>"                          print "Phone: " phone "<BR>"
                 print fax                  if (fax != "")
         print " <TD>"                          print "FAX: " fax "<BR>"
                 if (email != "")                  if (email != "")
                         print "<A HREF=\"mailto:" email "\">" email "</A>" "<BR>"                          print "Email: <A HREF=\"mailto:" email "\">" email "</A>" "<BR>"
                 print "<A HREF=\"" url "\">" url "</A>"                  if (url != "")
                           print "URL: <A HREF=\"" url "\">" url "</A>"
         print " <TD>" note          print " <TD>" note
 }  }
   
Line 72 
Line 84 
         prov = ""          prov = ""
         city = ""          city = ""
         addr = ""          addr = ""
           zip = ""
         org = ""          org = ""
         indv = ""          indv = ""
         email = ""          email = ""

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4