Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
fb6ddf3e
Commit
fb6ddf3e
authored
18 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
tweaks
parent
66d46d69
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
runoff
+1
-1
1 addition, 1 deletion
runoff
runoff1
+11
-2
11 additions, 2 deletions
runoff1
with
12 additions
and
3 deletions
runoff
+
1
−
1
View file @
fb6ddf3e
...
@@ -10,7 +10,7 @@ pad()
...
@@ -10,7 +10,7 @@ pad()
# create formatted (numbered) files
# create formatted (numbered) files
mkdir
-p
fmt
mkdir
-p
fmt
rm fmt
/
*
rm
-f
fmt
/
*
cp
README
fmt
cp
README
fmt
files
=
`
grep
-v
'^#'
runoff.list |
awk
'{print $1}'
`
files
=
`
grep
-v
'^#'
runoff.list |
awk
'{print $1}'
`
n
=
99
n
=
99
...
...
This diff is collapsed.
Click to expand it.
runoff1
+
11
−
2
View file @
fb6ddf3e
#!/usr/bin/perl
#!/usr/bin/perl
$n
=
0
;
$n
=
0
;
$v
=
0
;
if
(
$ARGV
[
0
]
eq
"
-v
")
{
$v
=
1
;
shift
@ARGV
;
}
if
(
$ARGV
[
0
]
eq
"
-n
")
{
if
(
$ARGV
[
0
]
eq
"
-n
")
{
$n
=
$ARGV
[
1
];
$n
=
$ARGV
[
1
];
shift
@ARGV
;
shift
@ARGV
;
...
@@ -38,12 +43,13 @@ for($i=0; $i<@lines; ){
...
@@ -38,12 +43,13 @@ for($i=0; $i<@lines; ){
$breaksize
=
15
;
# 15 lines to get to function
$breaksize
=
15
;
# 15 lines to get to function
for
(
$j
=
$i
;
$j
<
$i
+
50
&&
$j
<
@lines
;
$j
++
){
for
(
$j
=
$i
;
$j
<
$i
+
50
&&
$j
<
@lines
;
$j
++
){
if
(
$lines
[
$j
]
=~
/PAGEBREAK:\s*([0-9]+)/
){
if
(
$lines
[
$j
]
=~
/PAGEBREAK:\s*([0-9]+)/
){
$breaksize
=
int
(
$
2
)
;
$breaksize
=
$
1
;
$breakbefore
=
$j
;
$breakbefore
=
$j
;
$lines
[
$j
]
=
"";
$lines
[
$j
]
=
"";
}
}
if
(
$lines
[
$j
]
=~
/^};?$/
){
if
(
$lines
[
$j
]
=~
/^};?$/
){
$breakbefore
=
$j
+
1
;
$breakbefore
=
$j
+
1
;
$breaksize
=
15
;
}
}
if
(
$lines
[
$j
]
=~
/^{$/
){
if
(
$lines
[
$j
]
=~
/^{$/
){
$sawbrace
=
1
;
$sawbrace
=
1
;
...
@@ -59,9 +65,12 @@ for($i=0; $i<@lines; ){
...
@@ -59,9 +65,12 @@ for($i=0; $i<@lines; ){
if
(
$j
<
@lines
&&
$lines
[
$j
]
=~
/^$/
){
if
(
$j
<
@lines
&&
$lines
[
$j
]
=~
/^$/
){
$lastblank
=
$j
;
$lastblank
=
$j
;
}
}
# If we are not putting enough on a page, try a blank line.
# If we are not putting enough on a page, try a blank line.
if
(
$breakbefore
-
$i
<
50
-
$breaksize
&&
$lastblank
>
$breakbefore
&&
$lastblank
>=
$i
+
50
-
5
){
if
(
$breakbefore
-
$i
<
50
-
$breaksize
&&
$lastblank
>
$breakbefore
&&
$lastblank
>=
$i
+
50
-
5
){
if
(
$v
){
print
STDERR
"
breakbefore
$breakbefore
i
$i
breaksize
$breaksize
\n
";
}
$breakbefore
=
$lastblank
;
$breakbefore
=
$lastblank
;
$breaksize
=
5
;
# only 5 lines to get to blank line
$breaksize
=
5
;
# only 5 lines to get to blank line
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment