aboutsummaryrefslogtreecommitdiffstats
path: root/include/perlf
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:39:50 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:39:50 +0000
commite4836c62b245d618866b6523ec2c892aeb7a76be (patch)
tree5b5269fb7affb3b20ba8fe0224705bbde98c1614 /include/perlf
parent128e9a1532ce7fa38ddc16de06d213530dc5ce15 (diff)
downloadlout-e4836c62b245d618866b6523ec2c892aeb7a76be.tar.gz
Lout 3.32.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@33 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/perlf')
-rw-r--r--include/perlf69
1 files changed, 47 insertions, 22 deletions
diff --git a/include/perlf b/include/perlf
index 8a12ceb..28b699a 100644
--- a/include/perlf
+++ b/include/perlf
@@ -18,6 +18,7 @@ export @Perl
def @PerlSetup
named pipe { } # pipe through this
named numbered { No } # numbered lines?
+ named blanknumbered { Yes } # blanks numbered?
named style
named @OrIfPlain left x right y
{ @BackEnd @Case { PlainText @Yield y else @Yield x } }
@@ -27,6 +28,7 @@ def @PerlSetup
named fixedfont { Courier }# font family
named fixedsize { -1.0p } # font size
named fixedline { 1.0vx } # line-space
+ named fixedblanklinescale { 1.0 } # blank-line scale
named fixedspace { lout } # spacing mode
named fixedtabin { 8 } # tab interval
named fixedtabout { 8s } # tab width
@@ -51,6 +53,7 @@ def @PerlSetup
named varyingfont { } # font family
named varyingsize { 1.0f } # font size
named varyingline { 1.0vx } # line-space
+ named varyingblanklinescale { 1.0 } # blank-line scale
named varyingspace { lout } # spacing mode
named varyingtabin { 8 } # tab interval
named varyingtabout { 3f } # tab width
@@ -75,6 +78,7 @@ def @PerlSetup
named symbolfont { } # font family
named symbolsize { 1.0f } # font size
named symbolline { 1.0vx } # line-space
+ named symbolblanklinescale { 1.0 } # blank-line scale
named symbolspace { lout } # spacing mode
named symboltabin { 8 } # tab interval
named symboltabout { 3f } # tab width
@@ -103,23 +107,25 @@ def @PerlSetup
@A "$>"
def @Perl
- named style { style } # style
- named numbered { numbered } # want numbered lines?
- named pipe { pipe } # pipe through this first
- named font { dft } # font family
- named size { dft } # font size
- named line { dft } # line-space
- named space { dft } # spacing mode
- named tabin { dft } # tab interval
- named tabout { dft } # tab width
- named identifiers { dft } # ident. font
- named keywords { dft } # keyword font
- named operators { dft } # operator font
- named numbers { dft } # number font
- named strings { dft } # string font
- named comments { dft } # comment font
- named linenumbers { dft } # line numbers font
- body @Body # filtered, see below
+ named style { style } # style
+ named numbered { numbered } # want numbered lines?
+ named blanknumbered { blanknumbered } # numbered blank lines?
+ named pipe { pipe } # pipe through this first
+ named font { dft } # font family
+ named size { dft } # font size
+ named line { dft } # line-space
+ named blanklinescale { dft } # blank-line scale
+ named space { dft } # spacing mode
+ named tabin { dft } # tab interval
+ named tabout { dft } # tab width
+ named identifiers { dft } # ident. font
+ named keywords { dft } # keyword font
+ named operators { dft } # operator font
+ named numbers { dft } # number font
+ named strings { dft } # string font
+ named comments { dft } # comment font
+ named linenumbers { dft } # line numbers font
+ body @Body # filtered, see below
@Begin
def @Test # returns x unless x is dft
@@ -181,16 +187,26 @@ def @PerlSetup
}
}
+ def wantblanknumbered
+ {
+ blanknumbered @Case {
+ { No no } @Yield "-M"
+ { NoPrint noprint } @Yield "-N"
+ { Yes yes } @Yield ""
+ }
+ }
+
pipe @Case {
"" @Yield {
- "prg2lout -r -lPerl" wantnumbered -i{@FilterIn}
- -o{@FilterOut} -e{@FilterErr}
+ "prg2lout -r -lPerl" wantblanknumbered wantnumbered
+ -i{@FilterIn} -o{@FilterOut} -e{@FilterErr}
-t{@InitTab} -T{@InitTabWidth}
}
else @Yield {
"cat" @FilterIn "|" pipe "|"
- "prg2lout -r -lPerl" wantnumbered -o{@FilterOut}
- -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth}
+ "prg2lout -r -lPerl" wantblanknumbered wantnumbered
+ -o{@FilterOut} -e{@FilterErr}
+ -t{@InitTab} -T{@InitTabWidth}
}
}
}
@@ -223,6 +239,15 @@ def @PerlSetup
}
+ def @InitBLS
+ {
+ blanklinescale @Test
+ iffixed { fixedblanklinescale }
+ ifvarying { varyingblanklinescale }
+ ifsymbol { symbolblanklinescale }
+ }
+
+
def @InitSpace
{
space @Test
@@ -396,7 +421,7 @@ def @PerlSetup
{ @InitFontFamily Base @InitSize } @Font @InitSpace @Space
- { @InitLine lines nohyphen } @Break @Body
+ { @InitLine lines nohyphen "blanklinescale" @InitBLS } @Break @Body
@End @Perl