Commit 9c2bbad8 authored by Robert Ricci's avatar Robert Ricci

Some changes to handle hand-edited schema files. Allow whitespace in

TYPE= lines, and strip whitespace out of keys.
parent 3c08dd00
......@@ -158,7 +158,7 @@ sub read_schema($) {
# what this line is trying to do...
#
if (/^\) TYPE=(\w+);/) {
if (/^\) TYPE\s*=\s*(\w+);/) {
# The end of the table definition
my $type = $1;
......@@ -194,6 +194,8 @@ sub read_schema($) {
# A primary key
my $key = $1;
# Strip whitespace
$key =~ s/\s+//g;
debug("Putting primary key $key in table $table_name\n");
$tables{$table_name}{PRIMARY}{$key} = 1;
......@@ -201,6 +203,8 @@ sub read_schema($) {
# A key/index (synonmyms)
my ($name, $key) = ($2, $3);
# Strip whitespace
$key =~ s/\s+//g;
debug("Putting key $key in table $table_name\n");
if ($name) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment