minor comment fixes for ouiparse.awk

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: pgsql-hackers(at)hub(dot)org
Subject: minor comment fixes for ouiparse.awk
Date: 2000-08-23 12:45:59
Message-ID: 20000823074558.A4110@lerami.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's a quick patch for contrib/mac/ouiparse.awk to fix some commenting
changes due to Thomas' updates.

*** ouiparse.awk.old Wed Aug 23 01:02:23 2000
--- ouiparse.awk Wed Aug 23 07:44:09 2000
***************
*** 10,19 ****
# manufacturer text);
# the table name is set by setting the AWK variable TABLE
#
! # we translate the character apostrophe (') to space inside the company name
! # to avoid SQL errors.
#
- # match ONLY lines that begin with 2 hex numbers, -, and another hex number

BEGIN {
TABLE="macoui";
--- 10,18 ----
# manufacturer text);
# the table name is set by setting the AWK variable TABLE
#
! # we translate the character apostrophe (') to double apostrophe ('') inside
! # the company name to avoid SQL errors.
#

BEGIN {
TABLE="macoui";
***************
*** 27,32 ****
--- 26,32 ----
printf "COMMIT TRANSACTION;";
}

+ # match ONLY lines that begin with 2 hex numbers, -, and another hex number
/^[0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F]/ {
# if (nrec >= 100) {
# printf "COMMIT TRANSACTION;";
***************
*** 47,53 ****
Company=Company " " $i;
# Modify any apostrophes (') to avoid grief below.
gsub("'","''",Company);
! # Print out for the 'C' structure in mac.c
printf "INSERT INTO %s (addr, name) VALUES (trunc(macaddr \'%s\'),\'%s\');\n",
TABLE,OUI,Company;
}
--- 47,53 ----
Company=Company " " $i;
# Modify any apostrophes (') to avoid grief below.
gsub("'","''",Company);
! # Print out for the SQL table insert
printf "INSERT INTO %s (addr, name) VALUES (trunc(macaddr \'%s\'),\'%s\');\n",
TABLE,OUI,Company;
}
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jerome Raupach 2000-08-23 12:51:00 Problem with insert
Previous Message Jules Bean 2000-08-23 12:34:19 Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan