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

« back to all changes in this revision

Viewing changes to src/Kernel/Types/path.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:
5
5
*              which are for instance useful to select subtrees in trees
6
6
* COPYRIGHT  : (C) 1999  Joris van der Hoeven
7
7
*******************************************************************************
8
 
* This software falls under the GNU general public license and comes WITHOUT
9
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
10
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
11
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
8
* This software falls under the GNU general public license version 3 or later.
 
9
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
10
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12
11
******************************************************************************/
13
12
 
14
13
#include "path.hpp"
82
81
 
83
82
path
84
83
path_up (path p) {
85
 
  if (is_nil (p)) fatal_error ("path too short", "path_up", "path.cpp");
 
84
  ASSERT (!is_nil (p), "path is too short");
86
85
  if (is_nil (p->next)) return path ();
87
86
  return path (p->item, path_up (p->next));
88
87
}
130
129
path
131
130
operator - (path p, path q) {
132
131
  if (is_nil (q)) return p;
133
 
  else if (is_nil (p) || (p->item != q->item))
134
 
    fatal_error ("Path did not start with required path", "path::operator -");
 
132
  else if (is_nil (p) || (p->item != q->item)) {
 
133
    FAILED ("path did not start with required path"); }
135
134
  else return p->next - q-> next;
136
135
  return path (); // NOT REACHED
137
136
}
155
154
 
156
155
tree&
157
156
parent_subtree (tree& t, path p) {
158
 
  if (is_nil (p)) fatal_error ("path too short", "parent_subtree");
 
157
  ASSERT (!is_nil (p), "path too short");
159
158
  if (is_nil (p->next)) return t;
160
159
  else return parent_subtree (t[p->item], p->next);
161
160
}