~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Style/Environment/std_environment.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2009-04-26 19:35:14 UTC
  • mfrom: (1.1.10 upstream) (4.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090426193514-9yo3oggdslgdls4b
Tags: 1:1.0.7.2-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* texmacs crashes if /usr/share/texmacs/TeXmacs/misc/pixmaps/unknown.ps
  is not present. Do not remove it. (Closes: #484073, #497021)
* update patches 03_mupad.dpatch, 04_axiom.dpatch, 11-desktop-file.dpatch
* fix the mime problem in gnome. Thanks to Andrea Gamba for the fix.
[kohda]
* Refined a fix for the mime problem in gnome a bit.
* Try to fix /bin/sh problem (debian/fixsh) but it is not complete fix yet.
* Try to fix hard coded settings for ipa fonts(patches/09_ipa.dpatch), 
  especially for Debian where no ipa fonts exist yet.
* Fixed obsolete Build-Depends: changed libltdl3-dev to 
  libltdl-dev | libltdl7-dev (the latter for Ubuntu?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
* DESCRIPTION: environments for standard TeXmacs style rewriting mechanism
5
5
* COPYRIGHT  : (C) 2006  Joris van der Hoeven
6
6
*******************************************************************************
7
 
* This software falls under the GNU general public license and comes WITHOUT
8
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
9
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
10
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
7
* This software falls under the GNU general public license version 3 or later.
 
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
11
10
******************************************************************************/
12
11
 
13
12
#include "list_environment.hpp"
68
67
inline std_environment::std_environment
69
68
  (bool pure, list_environment env, std_environment next,
70
69
   list_environment accel, list_environment args):
71
 
     rep (new std_environment_rep (pure, env, next, accel, args)) {}
 
70
     rep (tm_new<std_environment_rep> (pure, env, next, accel, args)) {}
72
71
ABSTRACT_NULL_CODE(std_environment);
73
72
 
74
73
void
152
151
 
153
152
void
154
153
assign (environment& env, assoc_environment local) {
155
 
  memorizer mem= new assign_memorizer_rep (env, local);
 
154
  memorizer mem= tm_new<assign_memorizer_rep> (env, local);
156
155
  if (!is_memorized (mem)) mem->compute ();
157
156
  env= mem->get_environment ();
158
157
}
194
193
 
195
194
void
196
195
begin_with (environment& env, assoc_environment local) {
197
 
  memorizer mem= new begin_with_memorizer_rep (env, local);
 
196
  memorizer mem= tm_new<begin_with_memorizer_rep> (env, local);
198
197
  if (!is_memorized (mem)) mem->compute ();
199
198
  env= mem->get_environment ();
200
199
}
206
205
std_environment
207
206
end_with_environment (std_environment env) {
208
207
  if (env->pure) return env->next;
209
 
  if (!env->next->pure)
210
 
    fatal_error ("Pure environment expected", "end_with_environment");
 
208
  ASSERT (env->next->pure, "pure environment expected");
211
209
  basic_environment patch= flatten (env->env);
212
210
  basic_environment with_env= flatten (env->next->env);
213
211
  patch->multiple_remove (with_env->a, with_env->n);
243
241
 
244
242
void
245
243
end_with (environment& env) {
246
 
  memorizer mem= new end_with_memorizer_rep (env);
 
244
  memorizer mem= tm_new<end_with_memorizer_rep> (env);
247
245
  if (!is_memorized (mem)) mem->compute ();
248
246
  env= mem->get_environment ();
249
247
}
313
311
 
314
312
void
315
313
macro_down (environment& env, assoc_environment local) {
316
 
  memorizer mem= new macro_down_memorizer_rep (env, local);
 
314
  memorizer mem= tm_new<macro_down_memorizer_rep> (env, local);
317
315
  if (!is_memorized (mem)) mem->compute ();
318
316
  env= mem->get_environment ();
319
317
}
320
318
 
321
319
void
322
320
macro_redown (environment& env, basic_environment local) {
323
 
  memorizer mem= new macro_redown_memorizer_rep (env, local);
 
321
  memorizer mem= tm_new<macro_redown_memorizer_rep> (env, local);
324
322
  if (!is_memorized (mem)) mem->compute ();
325
323
  env= mem->get_environment ();
326
324
}
375
373
 
376
374
void
377
375
macro_up (environment& env) {
378
 
  memorizer mem= new macro_up_memorizer_rep (env);
 
376
  memorizer mem= tm_new<macro_up_memorizer_rep> (env);
379
377
  if (!is_memorized (mem)) mem->compute ();
380
378
  env= mem->get_environment ();
381
379
}