1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00
Commit Graph

73 Commits

Author SHA1 Message Date
olafvdspek@gmail.com
74d2631351 Rename google-ctemplate.sln to ctemplate.sln 2012-02-29 16:25:46 +00:00
olafvdspek@gmail.com
99a5f9dfc1 Use data() and size() 2012-02-25 17:36:12 +00:00
olafvdspek@gmail.com
6e5ac274c9 Use data() and size() 2012-02-25 17:14:52 +00:00
olafvdspek@gmail.com
60be3f041b Refactor Refactor template_string.h 2012-02-25 16:43:33 +00:00
olafvdspek@gmail.com
9f7baaec47 Add begin(), end(), data() and size() to TemplateString 2012-02-25 16:28:13 +00:00
olafvdspek@gmail.com
9c4e28e06f Refactor template_string.h 2012-02-14 14:52:29 +00:00
csilvers
57b0f4407c Fix an incorrect email address. 2012-02-02 22:44:16 +00:00
csilvers
6f7d6f6754 Tue Jan 24 16:00:51 2012 Google Inc. <google-ctemplate@googlegroups.com>
* ctemplate: version 2.0 release
        * Changed the 'official' ctemplate email in setup.py/etc
        * Rewrote docs to refer to Ctemplate, not Google Template
        * Renamed google-ctemplate.sln to ctemplate.sln
        * Changed copyright text to reflect Google's relinquished ownership
2012-01-25 01:28:24 +00:00
csilvers
48312e9ad3 Thu Dec 22 14:03:27 2011 Google Inc. <opensource@google.com>
* ctemplate: version 1.1 release
	* Make reloads always prefer files earlier on the search patch (ssas)
	* PORTING: Add a default BSWAP32, needed for AIX (csilvers)
	* Die at configure-time when g++ isn't installed
2011-12-22 22:40:30 +00:00
csilvers+ctemplate@google.com
d400edea99 ctemplate defines a dummy version of LOG() in
util.h.  We need to override that version with a 'real' (but
simplistic) version in template.cc.  The other option would be
to have a 'real' definition everywhere, but that's not
necessary at this juncture.

R=jad
DELTA=2  (1 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3980
2011-12-15 19:07:50 +00:00
csilvers+ctemplate@google.com
37db0db4ac Rid the Makefile of a mention of a file that no longer
exists.

R=jad
DELTA=1  (0 added, 1 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3979
2011-12-15 19:07:00 +00:00
csilvers+ctemplate@google.com
d251759a40 Add a 0-parameter construct() overload for C++11-compatibility,
using the default constructor of T.

Tested:
blaze test //base/...
blaze test --compiler=gcc-4.6.x-cxx0x //base/...

R=csilvers
DELTA=3  (3 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3961
2011-12-14 21:34:40 +00:00
csilvers+ctemplate@google.com
5dd3eb8ace Fixed the example code (example.cc) to match the one at
http://code.google.com/p/google-ctemplate/
c.f.
http://code.google.com/p/google-ctemplate/issues/detail?id=83


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3960
2011-12-14 21:33:32 +00:00
csilvers+ctemplate@google.com
760d83b13a Change the behavior of template cache so that it reloads the template if
another template has been added with the same name earlier in the search path,
even if the original file is NOT updated(touched, updated, deleted etc).

Tested:
blaze test template:all

R=panicker,csilvers
DELTA=45  (6 added, 24 deleted, 15 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3885
2011-12-01 17:54:59 +00:00
csilvers+ctemplate@google.com
ba3cc774b8 LOG(FATAL) << "message" is preferred over CHECK("message" == NULL).
See http://wiki/Main/LogFatalVsCheckFalse for details. While I'm here,
fix a couple of cases of CHECK("message" != NULL) and remove some dead
code that our compilers are now smart enough to not need.

R=falmeida
DELTA=5  (0 added, 2 deleted, 3 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3617
2011-11-05 11:34:19 +00:00
csilvers+ctemplate@google.com
17339f2f43 Add a default BSWAP32, at the request of
http://code.google.com/p/google-ctemplate/issues/detail?id=76
(needed for AIX)

R=jad
DELTA=19  (13 added, 6 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3513
2011-10-26 11:35:23 +00:00
csilvers+ctemplate@google.com
ee80fa44b9 Move ALIGNED_CHAR_ARRAY from a separate file to ManualConstructor.
R=jrosenstock
DELTA=113  (13 added, 99 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3440
2011-10-12 11:33:24 +00:00
csilvers+ctemplate@google.com
44c56df8eb Noop, it looks like.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=3428
2011-10-07 21:30:27 +00:00
csilvers+ctemplate@google.com
f89df1dacd Noop, it looks like.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=3427
2011-10-07 21:29:48 +00:00
csilvers+ctemplate@google.com
640ca19b46 Moving aligned_char_array into manual_constructor.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=3426
2011-10-07 21:28:23 +00:00
csilvers+ctemplate@google.com
008949d389 Now that arena has moved from CHECK(0) to LOG(FATAL), change
the opensource shims to be able to compile that.  This is a
bit of a hack.

R=chandlerc
DELTA=5  (5 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3313
2011-09-23 17:06:24 +00:00
csilvers+ctemplate@google.com
703d401961 Replace all uses of '[DQ]?CHECK(false)' with more idiomatic 'D?LOG(Q?FATAL)',
which properly indicates a no-return point in the CFG. This should have no
functional change.

R=csilvers
DELTA=16  (0 added, 0 deleted, 16 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3300
2011-09-23 17:03:56 +00:00
csilvers+ctemplate@google.com
f8c58ff816 A user reported a bug that configure should die when g++ isn't
installed, but wasn't:
http://code.google.com/p/google-perftools/issues/detail?id=217

This turned out to be a bug in autoconf:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357378

The workaround is simple: check for CXX before checking for
CC.  This means that if g++ is installed but gcc isn't, we
won't die (at cc-checking time), but I tested, and the
configure script dies later.  In any case, it seems unlikely
someone would have a c++ compiler installed but not a c
compiler.

This fixes the 4 opensource projects I work on that are
susceptible to this.

R=iant
DELTA=1437  (694 added, 694 deleted, 49 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3221
2011-09-10 11:33:35 +00:00
csilvers
52e93f8ca7 Fri Aug 26 13:10:46 2011 Google Inc. <opensource@google.com>
* ctemplate: version 1.0 release
	* No changes since 1.0rc2
2011-08-26 21:21:15 +00:00
csilvers+ctemplate@google.com
91a6d720de Ready to release ctemplate 1.0rc2 :-/
* ctemplate: version 1.0rc2 release
* BUGFIX: removed #includes of non-installed headers from installed ones
* BUGFIX: Make compile-test test against an install

R=jad
DELTA=30  (26 added, 0 deleted, 4 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2822
2011-07-29 20:00:44 +00:00
csilvers+ctemplate@google.com
92d6f935bc Change on 2011-07-29 12:10:58-07:00 by csilvers
mingw fixes:

	1) mingw needs an #include to have access to mkdir.

	2) It needs to always #include port.h (this is an identical
	bit of code, in configure.ac, that I have in other opensource
	projects for mingw support.)

	3) I moved some code from port.cc to port.h, so I didn't have
	to add logic to link in port.cc for mingw.

	Last change before new release!  (*knock on wood*)  Submitting
	TBR so I can get the release out today.  This isn't exactly a
	trivial change, so I'm chary to submit TBR, but it's pretty
	isolated to windows and mingw, and I've tested on those
	platforms to make sure they compile and all tests pass.

	DELTA=70  (37 added, 30 deleted, 3 changed)

Change on 2011-07-29 12:21:55-07:00 by csilvers

	Small change to get tests passing on mingw -- using /tmp is
	causing problems with our diffs, since sometimes it follows
	the /tmp (built-in msys) symlink, and sometimes it doesn't.

	R=jad
	DELTA=10  (8 added, 0 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2821
2011-07-29 19:58:48 +00:00
csilvers+ctemplate@google.com
fd02964e99 Annotalysis fix for ctemplate template_cache.
R=csilvers
DELTA=3  (1 added, 0 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2804
2011-07-29 19:52:30 +00:00
csilvers+ctemplate@google.com
3aed9df68d A major build bug, discovered in
http://code.google.com/p/google-ctemplate/issues/detail?id=79
:

The installed header files were #including header files that
were not installed.  The build could not function as a result.

In one case I could resolve the problem by forward-declaring
(better anyway).

In another case, I just commented out all the relevant code for
the opensource version.  The code was for thread-safety
analysis, which is a noop in opensource-land anyway, so it's
pretty safe (albeit ugly) to remove it.

R=ribrdb
DELTA=48  (22 added, 4 deleted, 22 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2768
2011-07-28 07:47:52 +00:00
csilvers+ctemplate@google.com
eac74d19c8 Put Mutex in the same namespace as the other template code. I don't see
a good reason not to, and it's making it hard to
forward-declare Mutex otherwise.

Note that with this change, Mutex is not available from the
global namespace (which it was before due to the using
statement), which I think is a good thing.

R=ribrdb
DELTA=16  (1 added, 9 deleted, 6 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2767
2011-07-28 07:45:57 +00:00
csilvers+ctemplate@google.com
6dd1aabba0 compile_test wasn't testing what I wanted: because it ran in
the main ctemplate source tree, it had access to files that
weren't going to be installed, when the whole point it to test
this can compile against the installed ctemplate.

To resolve this, I added a new rule that's executed at install
time (or the 'install' done during 'make distcheck').  I've
verified that this finds the problems with the current
ctemplate distribution that compile_test was supposed to
capture, and that are reported in
http://code.google.com/p/google-ctemplate/issues/detail?id=79

While in the area, add a few files that aren't in the dist
tarball but should be.  MOE noticed these.

R=jad
DELTA=11  (10 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2766
2011-07-28 07:45:12 +00:00
csilvers
44a35c64f0 Oops, r70 did this backwards (the old code was correct). Get back to
#including windows/config.h for the port.* files.
2011-07-27 02:39:50 +00:00
csilvers
0b97bfccf0 Always load files in binary mode, so \r isn't silently eaten on windows. 2011-07-27 01:03:35 +00:00
csilvers
aabfe7bc61 A small change to make sure that windows doesn't #include the wrong
(unix) config file.  Probably only a problem on mingw, which is the
only platform that wants the windows config.h but still runs
automake.
2011-07-27 01:03:02 +00:00
csilvers
9ae9c1b2a6 Make sure we open files for reading or writing in binary mode. That
way, \r isn't silently stripped on windows.

R=jad
2011-07-27 01:01:06 +00:00
csilvers
9475e9fd4a Fix a longstanding bug when dpkg isn't present. The idea is
we silently continue in that case, but we run sh -e, which
	causes the script to abort on error, even if the error is
	inside backticks (``).  So we make sure the dpkg command never
	gives an error, even when it's not installed.
	
	Reported in
	   http://code.google.com/p/google-ctemplate/issues/detail?id=79
2011-07-27 00:56:05 +00:00
csilvers
bd58467193 Apparently mkinstalldirs is no longer needed by newer versions of
autotools, so get rid of it from svn.
2011-07-27 00:47:45 +00:00
csilvers
2c10037dee The 'real' libtool.m4 lives in the m4 directory; this is an old,
obsolete version of the file.
2011-07-27 00:43:20 +00:00
csilvers
a71db8e80c A new test file. 2011-07-27 00:41:51 +00:00
csilvers
a969692caa Forgot to update this file when I updated the rest for ctemplate-1.0rc1. 2011-07-27 00:39:12 +00:00
csilvers
2de042ce00 Don't commit these auto-generated files to svn; it's too tricky to try
to keep them in sync with the .config files they're generated from.

This means that you will need python to build ctemplate from source
via svn.  We'll still include these files in the dist tarball, so
python isn't needed for that.
2011-07-27 00:29:31 +00:00
csilvers
9c0b6999e2 I don't know how this file got left out of svn, but it did.
Discovered in
   http://code.google.com/p/google-ctemplate/issues/detail?id=79
2011-07-26 23:16:07 +00:00
csilvers
f2ec3b085d Fri Jul 22 15:31:05 2011 Google Inc. <opensource@google.com>
* ctemplate: version 1.0rc1 release
	* BUGFIX: Dumpers were ignoring a tpl-string 'length' (csilvers)
	* BUGFIX: Add a needed $(top_srcdir) to Makefile.am
	* Replace 0x00-0x1F with space in xml_escape (alexvod)
	* Fix xml encoding to handle form-feed properly (ghurley)
	* DOCUMENTATION: Wer missing some docs in the tarball (csilvers)
	* BUILD: Update acx_pthread.m4 for nostdlib (Kacper)
	* BUGFIX: Make CreateSectionIterator check tpl-globals (williasr)
	* PORTING: Fix solaris build by getting rid of PATH_MAX (csilvers)
2011-07-22 22:56:35 +00:00
csilvers
f597056c4f * Update acx_pthread.m4 for nostdlib (liuujisi)
* Fix xml encoding to handle form feed properly (ghurley)
        * Better alignment in manual_constructor (nlewycky)
        * Allow template specialization for Aligner (edk)
        * Create ALIGN_BY_TYPE for manual_constructor (nlewycky)
        * Add 5-param constructor to manual_constructor (herb)
        * Remove a redundant c_str() call (qrczak)
        * Add cstddef to get ptrdiff_t in global ns (csilvers)
	* Add missing documentation to the tarball (csilvers)
	* Replace 0x00-0x1F with space in xml_escape (alexvod)
2011-05-19 21:31:50 +00:00
csilvers
98bea48e37 Mon Jan 24 15:38:31 2011 Google Inc. <opensource@google.com>
* ctemplate: version 0.99 release
	* Accept . as part of tag/attr names when autoescaping (falmeida)
	* Optimize javascript template escaping (blount)
	* Allow <span dir=...> inside :H=snippet modifiers (jdtang)
	* make_tpl_varnames can write multiple tpls to one file (jad)
	* Add a few escaping modifier equivalences (jad)
	* BUGFIX: Fix ReloadAllIfChanged() with path (panicker)
	* PORTING: Relace tr with more portable sed, in tests (csilvers)
	* Updated from autoconf 2.64 to autoconf 2.65
2011-01-25 03:45:13 +00:00
csilvers
602a5c132d * Accept . as part of tag/attr names (falmeida)
* Optimize javascript template escaping (blount)
	* Allow <span dir=...> inside :H=snippet modifiers (jdtang)
	* Bug fix for ReloadAllIfChanged() with path (panicker)
	* make_tpl_varnames can write multiple tpls to one file (jad)
	* Add proper libarry version numbers for ctemplate libraries (csilvers)
	* Replace tr with the more portable sed in tests (csilvers)
	* Add a few escaping modifier equivalences (jad)
2011-01-14 22:12:21 +00:00
csilvers
9f086a9da1 Fri Sep 24 11:38:27 PDT 2010 Google Inc. <opensource@google.com>
* ctemplate: version 0.98 release
	* Add new image URL modifier: :I=html, :I=css, etc (jshneier, dougy)
	* Allow lowercase words in pragma contexts (csilvers)
	* Enable full-word matching for tpl filenames (aneeshnaman)
	* Performance improvements for small_map (wonchun)
	* Avoid some compiler warnings (mac)
	* Fix a c++ conformance bug involving const (chandlerc)
	* BUGFIX: never reload string templates (panicker)
	* BUGFIX: Fix refcounting to avoid accessing freed memory (panicker)
	* PORTING: Avoid SIBGUS on sparc by aligning memory more (csilvers)
	* PORTING: Use isascii_is*() to avoid langtype issues (csilvers)
	* PORTING: Fix 'class not properly dll-epxorted' warnings (csilvers)
	* PORTING: Rename README.windows to README_windows.txt (csilvers)
	* Made NEWS file non-empty.
	* Added ctemplate.pc + ctemplate_nothreads.pc for pkg-config (csilvers)
2010-09-25 04:05:20 +00:00
csilvers
2f5f4b7baa * BUGFIX: was reloading string tpls in some situations (panicker)
* BUGFIX: fix recounting to avoid accessing freed memory (panicker)
	* Performance improvements for small_map (wonchun)
	* PORTING: Avoid SIGBUS on sparc by better aligning memory (csilvers)
	* Allow lowercase words in pragma contexts (csilvers)
	* BUGFIX: Fix a C++ conformance bug involving const (chandlerc)
	* Enable full word matching for tpl filenames (aneeshnaman)
2010-09-16 18:43:33 +00:00
csilvers
8c338f322e * Avoid "unused var" warning in opt mode (mec)
* Use ascii_is*() to avoid langtype issues (csilvers)
	* Fix 'class not properly dll-exported' warnings (csilvers)
	* mv README.windows to windows-friendly README-windows.txt (csilvers)
	* Update README.windows to emphasize $IncludeDir a bit more (csilvers)
	* Add :I=html, :I=css image URL modifiers (jshneier)
	* Document the new image URL modifier (dougy)
	* Update NEWS file to be non-empty (csilvers)
2010-06-18 23:14:04 +00:00
csilvers
b3b532aa19 Mon Apr 19 15:55:23 2010 Google Inc. <opensource@google.com>
* ctemplate: version 0.97 release
	* Major API revamp: +TemplateCache, -Template (panicker, csilvers)
	* Major documentation revamp: howto -> guide + reference (csilvers)
	* Protect auto-generated #include files with header guard (dnovillo)
	* Allow ftp:// in ValidateUrl modifier (martone)
	* Speed up template modifiers (turnidge)
	* BUGFIX: Fix a dnagling pointer in template-modifiers (csilvers)
	* PORTING: cygwin/mingw now compile (due to autoconf macros) (csilvers)
	* PORTING: improve generate_fs_test on windows (csilvers)
2010-04-20 18:06:46 +00:00
csilvers
3f759b57cb * Major API revamp: +TemplateCache, -Template (panicker, csilvers)
* Major documentation revamp: howto -> guide + reference (csilvers)
	* Protect auto-generated #include files with header guard (dnovillo)
	* PORTING: autoconf macros to get cygwin/mingw to compile (csilvers)
2010-04-19 21:06:37 +00:00