diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:39:50 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:39:50 +0000 |
commit | e4836c62b245d618866b6523ec2c892aeb7a76be (patch) | |
tree | 5b5269fb7affb3b20ba8fe0224705bbde98c1614 /include/npf | |
parent | 128e9a1532ce7fa38ddc16de06d213530dc5ce15 (diff) | |
download | lout-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/npf')
-rw-r--r-- | include/npf | 69 |
1 files changed, 47 insertions, 22 deletions
diff --git a/include/npf b/include/npf index 258529d..aa2230f 100644 --- a/include/npf +++ b/include/npf @@ -17,6 +17,7 @@ export @Nonpareil def @NonpareilSetup 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 } } @@ -26,6 +27,7 @@ def @NonpareilSetup 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 @@ -50,6 +52,7 @@ def @NonpareilSetup 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 @@ -74,6 +77,7 @@ def @NonpareilSetup 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 @@ -102,23 +106,25 @@ def @NonpareilSetup @A "$>" def @Nonpareil - 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 @@ -180,16 +186,26 @@ def @NonpareilSetup } } + def wantblanknumbered + { + blanknumbered @Case { + { No no } @Yield "-M" + { NoPrint noprint } @Yield "-N" + { Yes yes } @Yield "" + } + } + pipe @Case { "" @Yield { - "prg2lout -r -lNonpareil" wantnumbered -i{@FilterIn} - -o{@FilterOut} -e{@FilterErr} + "prg2lout -r -lNonpareil" wantblanknumbered wantnumbered + -i{@FilterIn} -o{@FilterOut} -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} } else @Yield { "cat" @FilterIn "|" pipe "|" - "prg2lout -r -lNonpareil" wantnumbered -o{@FilterOut} - -e{@FilterErr} -t{@InitTab} -T{@InitTabWidth} + "prg2lout -r -lNonpareil" wantblanknumbered wantnumbered + -o{@FilterOut} -e{@FilterErr} + -t{@InitTab} -T{@InitTabWidth} } } } @@ -222,6 +238,15 @@ def @NonpareilSetup } + def @InitBLS + { + blanklinescale @Test + iffixed { fixedblanklinescale } + ifvarying { varyingblanklinescale } + ifsymbol { symbolblanklinescale } + } + + def @InitSpace { space @Test @@ -395,7 +420,7 @@ def @NonpareilSetup { @InitFontFamily Base @InitSize } @Font @InitSpace @Space - { @InitLine lines nohyphen } @Break @Body + { @InitLine lines nohyphen "blanklinescale" @InitBLS } @Break @Body @End @Nonpareil |