[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2009-09-18, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On Thu September 17 2009, Peter Wang wrote:
> >
> > My guess is that in preprocess_page.awk, the initial block to load the
> > prototypes into the array isn't working correctly. Can you try putting
> > some print commands there to check?
>
> I don't speak awk, I took a look, but I'm not sure whats going on, or where I
> should place the prints.
Here's the annotated version:
# Before executing the rest of the script, do this:
BEGIN {
# Assign the value of environment variable `PROTOS' to a variable.
PROTOS = ENVIRON["PROTOS"]
# Read the next line from the protos file into a variable.
# Until the end-of-file:
while ((getline line < PROTOS) > 0) {
# Split the line into words, treating the string colon-space
# as a separator.
split(line, arr, /: /)
# Name the array elements.
name = arr[1]
text = arr[2]
# Append the new text to whatever text already is in the
# array for the given entry.
protos[name] = protos[name] "\n " text
}
# Close the file.
close(PROTOS)
}
> > Also, which version of awk are you using?
>
> apt-show-versions says: mawk/stable uptodate 1.3.3-11.1
>
> mawk itself doesn't seem to have a way to ask it to show its version.
I've tested with the same version.
Peter