]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.14
authorfred <fred>
Tue, 26 Mar 2002 21:32:24 +0000 (21:32 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:32:24 +0000 (21:32 +0000)
lily/dimen.cc [deleted file]
lily/include/dimension.hh [deleted file]
lily/include/tex.hh [deleted file]
lily/tex.cc [deleted file]

diff --git a/lily/dimen.cc b/lily/dimen.cc
deleted file mode 100644 (file)
index a03b01c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <ctype.h>
-#include "dimension.hh"
-#include "debug.hh"
-#include "string.hh"
-
-Real
-parse_dimen (String dim)
-{
-  int i=dim.length_i()-1;
-  char const *s = dim.ch_C ();
-  while  (i > 0 && (isspace (s[i]) || isalpha (s[i])))
-    {
-      i--;
-    }
-  String unit (s + i+1);
-  return convert_dimen (dim.value_f(), unit);
-}
-
-
-Real
-convert_dimen (Real quant, String unit)
-{
-  if (unit == "cm")
-    return quant * CM_TO_PT;
-  if (unit == "pt")
-    return quant;
-  if (unit == "mm")
-    return quant*CM_TO_PT/10;
-  if (unit == "in")
-    return quant * INCH_TO_PT;
-  error (_f ("unknown length unit: `%s\'", unit));
-}
-
-String
-print_dimen (Real r)
-{
-  String s = to_str (r, "%.3f");
-  if (s.index_i ("NaN") != -1)
-    {
-      warning (_ ("NaN"));
-      s = "0.0";
-    }
-  s += "pt";
-  return s;
-}
-
diff --git a/lily/include/dimension.hh b/lily/include/dimension.hh
deleted file mode 100644 (file)
index ac8267f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef DIMEN_HH
-#define DIMEN_HH
-
-#include "real.hh"
-#include "string.hh"
-
-const Real INCH_TO_PT=72.270;
-const Real CM_TO_PT=INCH_TO_PT/2.54;
-const Real MM_TO_PT=CM_TO_PT/10;
-const Real PT_TO_PT =1.0;
-
-#define PT  *PT_TO_PT
-#define MM  *MM_TO_PT
-#define CM  *CM_TO_PT
-#define INCH *INCH_TO_PT
-
-Real parse_dimen (String);
-String print_dimen (Real);
-Real convert_dimen (Real, String);
-#endif
-
diff --git a/lily/include/tex.hh b/lily/include/tex.hh
deleted file mode 100644 (file)
index 3d5cf30..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-  tex.hh -- declare various functions for TeX output
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-
-#ifndef TEX_HH
-#define TEX_HH
-
-#include "string.hh"
-#include "box.hh"
-#include "scalar.hh"
-
-/** paratime_signature substitution in TeX_strings.
-  this function provides a simple macro mechanism:
-
-  if source == "tex%bla%", then
-  substitute_args (source, {"X","Y"})  == "texXblaY"
-  */
-String
-substitute_args (String source, Array<String> args);
-
-/// paratime_signature substitution in TeX_strings
-String
-substitute_args (String source, Array<Scalar> args);
-
-/// #h# is in points
-String vstrut (Real h);
-
-
-#endif
diff --git a/lily/tex.cc b/lily/tex.cc
deleted file mode 100644 (file)
index 635b281..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-  tex.cc -- implement TeX related misc functions
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "dimension.hh"
-#include "tex.hh"
-#include "atom.hh"
-#include "array.hh"
-
-String
-vstrut (Real h)
-{
-  return String ("\\vrule height ") + print_dimen (h) + "depth 0pt width 0pt";
-}
-
-
-static void
-substitute_arg (String& r, String arg)
-{
-  int p = r.index_i ('%');
-  if (p < 0)
-       return ;
-
-  r = r.left_str (p) + arg + r.right_str (r.length_i() - p -1);
-}
-
-
-String
-substitute_args (String source, Array<String> args)    
-{
-  String retval (source);
-  for (int i = 0 ; i < args.size(); i++)
-      substitute_arg (retval, args[i]);
-  return retval;
-}
-
-String
-substitute_args (String source, Array<Scalar> args)    
-{
-  Array<String> sv;
-  for (int i = 0 ; i < args.size(); i++)
-       sv.push (args[i]);
-  
-  return substitute_args (source, sv);
-}