mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-08-01 00:50:35 +02:00
Fixed autogenerate.awk so that it outputs unix-stile line endings even
with DOS-style input line endings.
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
BEGIN { FS = "," ; RS = "\n"
|
||||
print "/* This script is auto-generated - do not edit"
|
||||
print " :License: 3-clause BSD. See LICENSE. */"
|
||||
printf "\nTHREAD_TABLE = [" }
|
||||
/^[GPM]/ { print "[\"" $1 "\", [" $2 ", " $3 ", " $4 ", [[" $5 ", " $6 "], [" $7 ", " $8 "], [" $9 ", " $10 "], [" $11 ", " $12 "]]]],"}
|
||||
BEGIN {
|
||||
FS = ",";
|
||||
print "/* This script is auto-generated - do not edit"
|
||||
print " :License: 3-clause BSD. See LICENSE. */"
|
||||
printf "\nTHREAD_TABLE = ["
|
||||
}
|
||||
|
||||
/^[GPM]/ {
|
||||
gsub(/\r/, "");
|
||||
print "[\"" $1 "\", [" $2 ", " $3 ", " $4 ", [[" $5 ", " $6 "], [" \
|
||||
$7 ", " $8 "], [" $9 ", " $10 "], [" $11 ", " $12 "]]]],";
|
||||
}
|
||||
|
||||
END { print "];" }
|
||||
|
Reference in New Issue
Block a user