[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qsos-commits] qsos/tools/createemptysheet createemptysheet.pl
From: |
Goneri Le Bouder |
Subject: |
[Qsos-commits] qsos/tools/createemptysheet createemptysheet.pl |
Date: |
Thu, 19 Jul 2007 21:24:23 +0000 |
CVSROOT: /sources/qsos
Module name: qsos
Changes by: Goneri Le Bouder <goneri> 07/07/19 21:24:23
Modified files:
tools/createemptysheet: createemptysheet.pl
Log message:
add <!-- BEGIN include: includename -->
<!-- END include: includename --> at the beginning and the end of the
included part
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/tools/createemptysheet/createemptysheet.pl?cvsroot=qsos&r1=1.7&r2=1.8
Patches:
Index: createemptysheet.pl
===================================================================
RCS file: /sources/qsos/qsos/tools/createemptysheet/createemptysheet.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- createemptysheet.pl 28 Jun 2007 10:33:18 -0000 1.7
+++ createemptysheet.pl 19 Jul 2007 21:24:22 -0000 1.8
@@ -58,13 +58,16 @@
while (my $line = shift @buff) {
if ($line =~ /<include\W+section="([-\w]+)"\W*(|\/)>/ || $line =~
/<include\W+section="([-\w]+)"\W*>\W*<\/include>/) { # this is an include
+ my $include = $1;
if ($lang ne 'en' && -f "$includedir/$1_$lang.qin" ) {
- open INCLUDE, "<$includedir/$1_$lang.qin" or die "Failed to open ".
+ open INCLUDE, "<$includedir/".$include."_"."$lang.qin" or die "Failed to
open ".
"localised includefile"
} else {
- open INCLUDE, "<$includedir/$1.qin" or die "Failed to open includefile"
+ open INCLUDE, "<$includedir/$include.qin" or die "Failed to open
includefile"
}
- unshift @buff, <INCLUDE>;
+
+ # I put the new document on the top of the buffer
+ unshift @buff, ("<!-- BEGIN include: $include -->\n", <INCLUDE>, "<!-- END
include: $include -->\n");
close INCLUDE;
} else {
print $line;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qsos-commits] qsos/tools/createemptysheet createemptysheet.pl,
Goneri Le Bouder <=