r62335 - in /trunk/libhtml-template-pro-perl: ./ debian/ lib/HTML/Template/ lib/HTML/Template/Pro/ t/ t/HTML/ templates-Pro/
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Sun Sep 5 19:48:26 UTC 2010
Author: periapt-guest
Date: Sun Sep 5 19:48:12 2010
New Revision: 62335
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62335
Log:
New upstream release
Added:
trunk/libhtml-template-pro-perl/t/HTML/
- copied from r62334, branches/upstream/libhtml-template-pro-perl/current/t/HTML/
trunk/libhtml-template-pro-perl/t/error_output.t
- copied unchanged from r62334, branches/upstream/libhtml-template-pro-perl/current/t/error_output.t
Removed:
trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro/CommonTest.pm
Modified:
trunk/libhtml-template-pro-perl/.gitignore
trunk/libhtml-template-pro-perl/Changes
trunk/libhtml-template-pro-perl/MANIFEST
trunk/libhtml-template-pro-perl/META.yml
trunk/libhtml-template-pro-perl/README
trunk/libhtml-template-pro-perl/calc.h
trunk/libhtml-template-pro-perl/callback_stubs.inc
trunk/libhtml-template-pro-perl/debian/changelog
trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm
trunk/libhtml-template-pro-perl/loadfile.inc
trunk/libhtml-template-pro-perl/pconst.h
trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec
trunk/libhtml-template-pro-perl/procore.c
trunk/libhtml-template-pro-perl/procore.h
trunk/libhtml-template-pro-perl/t/HTML-Template-Expr.t
trunk/libhtml-template-pro-perl/t/HTML-Template-Pro.t
trunk/libhtml-template-pro-perl/tags.inc
trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.out
trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.tmpl
Modified: trunk/libhtml-template-pro-perl/.gitignore
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/.gitignore?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/.gitignore (original)
+++ trunk/libhtml-template-pro-perl/.gitignore Sun Sep 5 19:48:12 2010
@@ -14,6 +14,7 @@
Makefile.old
semantic.cache
templates-Pro/json
+templates-Pro/json-cs
getoptint.re2c.inc
resetopt0.inc
resetoptnot0.inc
Modified: trunk/libhtml-template-pro-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/Changes?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/Changes (original)
+++ trunk/libhtml-template-pro-perl/Changes Sun Sep 5 19:48:12 2010
@@ -293,3 +293,9 @@
09502 Fri Jun 18 18:02:28 EEST 2010
- bugfix release: segfault for string operetions
with undefined variables. Thanks to Mike Shogin.
+
+09503 Sat Aug 28 18:00:49 EEST 2010
+ - log file is not truncated now in tmplpro_set_log_file.
+ - freed memory access error fixed.
+ - perl: CommonTest.pm hidden from installation
+ - tests: added generic json-packed test data
Modified: trunk/libhtml-template-pro-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/MANIFEST?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/MANIFEST (original)
+++ trunk/libhtml-template-pro-perl/MANIFEST Sun Sep 5 19:48:12 2010
@@ -27,7 +27,6 @@
exprval.h
lib/HTML/Template/PerlInterface.pod
lib/HTML/Template/Pro.pm
-lib/HTML/Template/Pro/CommonTest.pm
lib/HTML/Template/Pro/WrapAssociate.pm
lib/HTML/Template/SYNTAX.pod
loadfile.h
@@ -65,9 +64,11 @@
t/04register.t
t/05path_like_variable_scope.t
t/06loop_var.t
+t/error_output.t
t/HTML-Template-Expr.t
t/HTML-Template-Pro.t
t/HTML-Template.t
+t/HTML/Template/Pro/CommonTest.pm
t/magic.t
t/pod.t
t/realloc.t
Modified: trunk/libhtml-template-pro-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/META.yml?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/META.yml (original)
+++ trunk/libhtml-template-pro-perl/META.yml Sun Sep 5 19:48:12 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: HTML-Template-Pro
-version: 0.9502
+version: 0.9503
abstract: Perl/XS module to use HTML Templates from CGI scripts
author:
- I. Yu. Vlasenko <viy at altlinux.org>
Modified: trunk/libhtml-template-pro-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/README?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/README (original)
+++ trunk/libhtml-template-pro-perl/README Sun Sep 5 19:48:12 2010
@@ -1,4 +1,4 @@
-HTML-Template-Pro version 0.9502
+HTML-Template-Pro version 0.9503
==============================
DESCRIPTION
Modified: trunk/libhtml-template-pro-perl/calc.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/calc.h?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/calc.h (original)
+++ trunk/libhtml-template-pro-perl/calc.h Sun Sep 5 19:48:12 2010
@@ -14,7 +14,7 @@
struct symrec_const
{
char *name; /* name of symbol */
- int len; /* symbol length */;
+ int len; /* symbol length */
int type; /* type of symbol: either VAR or FNCT */
double var; /* value of a VAR */
void* fnctptr; /* value of a FNCT */
Modified: trunk/libhtml-template-pro-perl/callback_stubs.inc
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/callback_stubs.inc?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/callback_stubs.inc (original)
+++ trunk/libhtml-template-pro-perl/callback_stubs.inc Sun Sep 5 19:48:12 2010
@@ -37,7 +37,7 @@
}
static ABSTRACT_USERFUNC* BACKCALL stub_is_expr_userfnc_func (ABSTRACT_FUNCMAP* af, PSTRING name) {
- tmpl_log(TMPL_LOG_ERROR,"is_expr_userfnc_func stub: EXPR is not initialized properly. user func dispatcher was not supplied.");
+ tmpl_log(TMPL_LOG_DEBUG,"is_expr_userfnc_func stub: EXPR is not initialized properly. user func dispatcher was not supplied.\n");
return NULL;
}
Modified: trunk/libhtml-template-pro-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/debian/changelog?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/debian/changelog (original)
+++ trunk/libhtml-template-pro-perl/debian/changelog Sun Sep 5 19:48:12 2010
@@ -1,3 +1,9 @@
+libhtml-template-pro-perl (0.9503-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk> Sun, 05 Sep 2010 20:47:43 +0100
+
libhtml-template-pro-perl (0.9502-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm (original)
+++ trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm Sun Sep 5 19:48:12 2010
@@ -12,7 +12,7 @@
use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(DynaLoader Exporter);
-$VERSION = '0.9502';
+$VERSION = '0.9503';
@EXPORT_OK = qw/ASK_NAME_DEFAULT ASK_NAME_AS_IS ASK_NAME_LOWERCASE ASK_NAME_UPPERCASE ASK_NAME_MASK/;
%EXPORT_TAGS = (const => [qw/ASK_NAME_DEFAULT ASK_NAME_AS_IS ASK_NAME_LOWERCASE ASK_NAME_UPPERCASE ASK_NAME_MASK/]);
Modified: trunk/libhtml-template-pro-perl/loadfile.inc
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/loadfile.inc?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/loadfile.inc (original)
+++ trunk/libhtml-template-pro-perl/loadfile.inc Sun Sep 5 19:48:12 2010
@@ -139,8 +139,8 @@
stream = fopen(filepath, "r");
if (stream == NULL) return memarea; /* {NULL,NULL} */
/* mmap size_in_bytes+1 to avoid crash with empty file */
- memarea.begin=(char*) malloc(memsize+1);
- writepoint=memarea.begin;
+ memarea.begin=(const char*) malloc(memsize+1);
+ writepoint=(char*)memarea.begin;
while (1) {
realsize=fread(writepoint, 1, chunksize, stream);
@@ -149,8 +149,8 @@
writepoint+=chunksize;
if (size_in_bytes+chunksize>memsize) {
memsize*=2;
- memarea.begin=(char*) realloc(memarea.begin, memsize+1);
- writepoint=memarea.begin+size_in_bytes;
+ memarea.begin=(char*) realloc((char*)memarea.begin, memsize+1);
+ writepoint=((char*)memarea.begin)+size_in_bytes;
}
} else {
fclose(stream);
@@ -164,7 +164,7 @@
int
mmap_unload_file (PSTRING memarea) {
/* destroying */
- free(memarea.begin);
+ free((char*)memarea.begin);
return 0;
}
Modified: trunk/libhtml-template-pro-perl/pconst.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/pconst.h?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/pconst.h (original)
+++ trunk/libhtml-template-pro-perl/pconst.h Sun Sep 5 19:48:12 2010
@@ -7,6 +7,7 @@
#define ERR_PRO_FILE_NOT_FOUND 2
#define ERR_PRO_CANT_OPEN_FILE 3
#define ERR_PRO_TEMPLATE_SYNTAX_ERROR 4
+#define ERR_PRO_NOT_ENOUGH_MEMORY 5
#endif /* pconst.h */
Modified: trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec (original)
+++ trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec Sun Sep 5 19:48:12 2010
@@ -6,7 +6,7 @@
%define module HTML-Template-Pro
Name: perl-%module
-Version: 0.9502
+Version: 0.9503
Release: alt1
Packager: Igor Yu. Vlasenko <viy at altlinux.org>
@@ -54,6 +54,9 @@
%perl_vendor_man3dir/*
%changelog
+* Sat Aug 28 2010 Igor Vlasenko <viy at altlinux.ru> 0.9503-alt1
+- new version; see Changes
+
* Thu Jun 17 2010 Igor Vlasenko <viy at altlinux.ru> 0.9502-alt1
- new version; see Changes
Modified: trunk/libhtml-template-pro-perl/procore.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/procore.c?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/procore.c (original)
+++ trunk/libhtml-template-pro-perl/procore.c Sun Sep 5 19:48:12 2010
@@ -429,6 +429,7 @@
int mmapstatus;
PSTRING memarea;
int retval = 0;
+ const char* saved_masterpath;
/*
* param->masterpath is path to upper level template
* (or NULL in toplevel) which called <include filename>.
@@ -439,7 +440,8 @@
if (NULL==filepath) return ERR_PRO_FILE_NOT_FOUND;
/* filepath should be alive for every nested template */
filepath = strdup(filepath);
-
+ if (NULL==filepath) return ERR_PRO_NOT_ENOUGH_MEMORY;
+ saved_masterpath=param->masterpath; /* saving current file name */
param->masterpath=filepath;
if (param->filters) memarea=(param->LoadFileFuncPtr)(param->ext_filter_state,filepath);
else memarea=mmap_load_file(filepath);
@@ -460,6 +462,7 @@
else mmapstatus=mmap_unload_file(memarea);
cleanup_filepath:
if (filepath!=NULL) free((void*) filepath);
+ param->masterpath=saved_masterpath;
return retval;
}
@@ -468,12 +471,16 @@
tmplpro_exec_tmpl_scalarref (struct tmplpro_param *param, PSTRING memarea)
{
struct tmplpro_state state;
+ const char* saved_masterpath=param->masterpath; /* saving current file name */
param->masterpath=NULL; /* no upper file */
state.top = memarea.begin;
state.next_to_end=memarea.endnext;
- if (memarea.begin == memarea.endnext) return 0;
- init_state(&state,param);
- process_state(&state);
+ if (memarea.begin != memarea.endnext) {
+ init_state(&state,param);
+ process_state(&state);
+ }
+ /* exit cleanup code */
+ param->masterpath=saved_masterpath;
return 0;
}
@@ -694,7 +701,7 @@
tmpl_log_set_callback(tmpl_log_default_callback);
return 0;
}
- file_p = fopen(logfilename, "w");
+ file_p = fopen(logfilename, "a");
if (!file_p) {
tmpl_log(TMPL_LOG_ERROR,"tmplpro_set_log_file: can't create log file [%s]\n",logfilename);
return ERR_PRO_FILE_NOT_FOUND;
Modified: trunk/libhtml-template-pro-perl/procore.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/procore.h?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/procore.h (original)
+++ trunk/libhtml-template-pro-perl/procore.h Sun Sep 5 19:48:12 2010
@@ -12,7 +12,11 @@
"invalid argument",
"file not found",
"can't open file",
- "syntax error in template"
+ "syntax error in template",
+ "not enough memory (allocation error)",
+ "",
+ "",
+ ""
};
/*
Modified: trunk/libhtml-template-pro-perl/t/HTML-Template-Expr.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/t/HTML-Template-Expr.t?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/t/HTML-Template-Expr.t (original)
+++ trunk/libhtml-template-pro-perl/t/HTML-Template-Expr.t Sun Sep 5 19:48:12 2010
@@ -8,6 +8,7 @@
use Test;
BEGIN { plan tests => 1+4*8+2*7 };
use HTML::Template::Pro;
+use lib "t";
use HTML::Template::Pro::CommonTest;
ok(1); # If we made it this far, we're ok.
Modified: trunk/libhtml-template-pro-perl/t/HTML-Template-Pro.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/t/HTML-Template-Pro.t?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/t/HTML-Template-Pro.t (original)
+++ trunk/libhtml-template-pro-perl/t/HTML-Template-Pro.t Sun Sep 5 19:48:12 2010
@@ -14,6 +14,7 @@
}
use File::Spec;
use HTML::Template::Pro;
+use lib "t";
use HTML::Template::Pro::CommonTest;
ok(1); # If we made it this far, we're ok.
Modified: trunk/libhtml-template-pro-perl/tags.inc
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/tags.inc?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/tags.inc (original)
+++ trunk/libhtml-template-pro-perl/tags.inc Sun Sep 5 19:48:12 2010
@@ -184,7 +184,6 @@
{
struct tmplpro_param* param;
char* filename;
- const char* masterpath;
int x;
PSTRING varvalue;
PSTRING defvalue;
@@ -209,16 +208,17 @@
};
if (varvalue.begin==varvalue.endnext && defvalue.begin!=defvalue.endnext) varvalue=defvalue;
/* pstrdup */
- filename =(char*) malloc(varvalue.endnext-varvalue.begin+1);
- for (x=0;x<varvalue.endnext-varvalue.begin;x++) {
- *(filename+x)=*(varvalue.begin+x);
- }
- *(filename+(varvalue.endnext-varvalue.begin))=0;
+ {
+ const long len = varvalue.endnext-varvalue.begin;
+ filename =(char*) malloc(len+1);
+ for (x=0;x<len;x++) {
+ *(filename+x)=*(varvalue.begin+x);
+ }
+ *(filename+len)=0;
+ }
/* end pstrdup */
- masterpath=param->masterpath; /* saving current file name */
tmplpro_exec_tmpl_filename (param,filename);
free (filename);
- param->masterpath=masterpath;
param->cur_includes--;
return;
}
Modified: trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.out
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.out?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.out (original)
+++ trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.out Sun Sep 5 19:48:12 2010
@@ -1,3 +1,5 @@
<H1> test_esc4 </H1>
\\<>\"; %FAhidden:\r\nend
+VAR1
+Some"' Txt'
Modified: trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.tmpl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.tmpl?rev=62335&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.tmpl (original)
+++ trunk/libhtml-template-pro-perl/templates-Pro/test_esc4.tmpl Sun Sep 5 19:48:12 2010
@@ -2,3 +2,5 @@
<tmpl_iF VAR4> <tmpl_var escape="JS" DEFAULT="test failed" NAME="STUFF1">
<tmpl_else> <tmpl_var DEFault="test failed" name="STUFF1" ESCApe='js'>
</tmpl_if>
+<tmpl_var name='VAR1' escape='html'>
+<tmpl_var name='STUFF2' escape='html'>
More information about the Pkg-perl-cvs-commits
mailing list