summaryrefslogtreecommitdiff
path: root/runoff
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-08 09:29:18 +0000
committerrsc <rsc>2007-08-08 09:29:18 +0000
commit35a24c8318dd784b62c57b1933ded6e880faaa55 (patch)
tree9ac5878c77d690b7640e49716cb6b3e12cbc6601 /runoff
parent2e51e12f0917229ff2bc8dfca22c9b35172e9445 (diff)
downloadxv6-labs-35a24c8318dd784b62c57b1933ded6e880faaa55.tar.gz
xv6-labs-35a24c8318dd784b62c57b1933ded6e880faaa55.tar.bz2
xv6-labs-35a24c8318dd784b62c57b1933ded6e880faaa55.zip
fix index bug
Diffstat (limited to 'runoff')
-rwxr-xr-xrunoff26
1 files changed, 14 insertions, 12 deletions
diff --git a/runoff b/runoff
index 46c63d1..919d837 100755
--- a/runoff
+++ b/runoff
@@ -2,6 +2,8 @@
echo This script takes a minute to run. Be patient. 1>&2
+LC_CTYPE=C export LC_CTYPE
+
# pad stdin to multiple of 120 lines
pad()
{
@@ -61,20 +63,11 @@ perl -e '
if (/^[0-9]+ struct [a-zA-Z0-9_]+;/) {
next;
}
- if (/\(/) {
- next;
- }
-
- if (/^([0-9]+) (((static|struct|extern|union|enum) +)*([A-Za-z0-9_]+))( .*)? +([A-Za-z_][A-Za-z0-9_]*)[,;]/) {
-
- print "$1 $7\n"
- }
-
- elsif (/^([0-9]+) #define +([A-za-z0-9_]+) +?\(.*/) {
+ if (/^([0-9]+) #define +([A-za-z0-9_]+) +?\(.*/) {
print "$1 $2\n"
}
- elsif (/^([0-9]+) #define +([A-Za-z0-9_]+) +([^ ]+)$/) {
+ elsif (/^([0-9]+) #define +([A-Za-z0-9_]+) +([^ ]+)/) {
print "$1 $2 $3\n";
}
@@ -82,6 +75,15 @@ perl -e '
print "$1 $2\n";
}
+ if (/\(/) {
+ next;
+ }
+
+ if (/^([0-9]+) (((static|struct|extern|union|enum) +)*([A-Za-z0-9_]+))( .*)? +([A-Za-z_][A-Za-z0-9_]*)[,;]/) {
+
+ print "$1 $7\n"
+ }
+
elsif(/^([0-9]+) (enum|struct|union) +([A-Za-z0-9_]+) +{/){
print "$1 $3\n";
}
@@ -130,7 +132,7 @@ awk '
grep Pages: all.ps
# if we have the nice font, use it
-nicefont=~rsc/plan9/sys/lib/postscript/font/LucidaSans-Typewriter83
+nicefont=~rsc/lib/postscript/LucidaSans-Typewriter83
if [ -f $nicefont ]
then
(sed 1q all.ps; cat $nicefont; sed '1d; s/Courier/LucidaSans-Typewriter83/' all.ps) >allf.ps