Skip to content

Commit 9e66243

Browse files
committed
Fixes to pgcvslog for last narrive entry.
1 parent 8ac6d95 commit 9e66243

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

src/tools/pgcvslog

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,40 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
147147
}
148148
}
149149
END {
150-
# dump out the last filename
150+
# If there are a different number of narrative
151+
# lines, they can not possibly be the same.
152+
if (slot != oldslot)
153+
same = "N";
154+
else
155+
{
156+
same = "Y";
157+
for (i=1; i <= slot; i++)
158+
{
159+
if (oldnarr[i] != narr[i])
160+
{
161+
same = "N";
162+
break;
163+
}
164+
}
165+
}
151166

167+
# dump out the old narrative if it is new
168+
if (same == "N")
169+
{
170+
if (oldslot)
171+
for (i=1; i <= oldslot; i++)
172+
{
173+
print oldnarr[i];
174+
if (html == "Y" &&
175+
oldnarr[i] != "<HR>" &&
176+
oldnarr[i] !~ "^<DIV ")
177+
print "<BR>";
178+
}
179+
}
180+
181+
# dump out the last filename
152182
print save_working;
183+
153184
if (html == "Y")
154185
print "<BR>";
155186

@@ -158,8 +189,8 @@ awk ' BEGIN { slot = 0; oldslot=0; save_working = ""; html="'"$HTML"'"}
158189
{
159190
print narr[i];
160191
if (html == "Y" &&
161-
oldnarr[i] != "<HR>" &&
162-
oldnarr[i] !~ "^<DIV ")
192+
narr[i] != "<HR>" &&
193+
narr[i] !~ "^<DIV ")
163194
print "<BR>";
164195
}
165196
}' |

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy