]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.24
authorfred <fred>
Tue, 26 Mar 2002 23:21:14 +0000 (23:21 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:21:14 +0000 (23:21 +0000)
22 files changed:
Documentation/links.texi [deleted file]
lib/GNUmakefile [deleted file]
lib/binary-source-file.cc [deleted file]
lib/include/GNUmakefile [deleted file]
lib/include/binary-source-file.hh [deleted file]
lib/include/file-storage.hh [deleted file]
lib/include/input.hh [deleted file]
lib/include/mapped-file-storage.hh [deleted file]
lib/include/proto.hh [deleted file]
lib/include/simple-file-storage.hh [deleted file]
lib/include/source-file.hh [deleted file]
lib/include/source.hh [deleted file]
lib/include/string-storage.hh [deleted file]
lib/include/warn.hh [deleted file]
lib/input.cc [deleted file]
lib/mapped-file-storage.cc [deleted file]
lib/simple-file-storage.cc [deleted file]
lib/source-file.cc [deleted file]
lib/source.cc [deleted file]
lib/warn.cc [deleted file]
lily/note-head-side.cc [deleted file]
mf/feta-test11.mf [deleted file]

diff --git a/Documentation/links.texi b/Documentation/links.texi
deleted file mode 100644 (file)
index 233bedb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@setfilename links.info
-@settitle links - Links to other related websites
-
-@node Top, , , (dir)
-@top
-
-This page contains links to sites which may be of interest to LilyPond
-users.
-
-@unnumberedsubsec Music
-
-@itemize @bullet
-@item @uref{http://www.geocities.com/Vienna/Studio/1714/} and
-@uref{http://johnsankey.webjump.com/} 
-       John Sankey has taken up the task of recording classical
-       music, and distributing the results at no cost.
-@item @uref{http://sca.uwaterloo.ca/Mutopia/}
-       Mutopia project (under construction).
-@item @uref{http://www4.smart.net/~jcovey/scores/}
-    Jeff Covey's guitar music.
-@item @uref{http://www.pbm.com/~lindahl/ravenscroft/modern}
-    Transcriptions of the music of Thomas Ravenscroft, partly using
-    LilyPond
-@end itemize
-
-@unnumberedsubsec Software
-
-@itemize @bullet
-@item @uref{http://www.zib.de/Visual/software/doc++/index.html}
-    A documentation system for C++ sources, which is used for the
-    LilyPond sources.
-@item @uref{ http://sound.condorow.net}
-    Dave Philips' Linux sound applications page
-@item @uref{http://www.home.fh-karlsruhe.de/~rost0001/web/musik/musik.html}
-    Stochastic composing using LilyPond 
-@end itemize
-
-@unnumberedsubsec Philosophy
-
-@itemize @bullet
-@item @uref{http://www.gnu.org/}
-    LilyPond is part of the GNU Project.  The GNU project is the name 
-    of Richard Stallman's effort to create a freely available 
-    system of software.
-@item @uref{http://www.ram.org/ramblings/philosophy/fmp.html}
-    Musings on free music, plus hints how to record your own (free) music.
-@end itemize
-
-
-@bye
diff --git a/lib/GNUmakefile b/lib/GNUmakefile
deleted file mode 100644 (file)
index d9e0c99..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# lib/Makefile
-
-depth = ..
-
-NAME = lily
-SUBDIRS = include
-# MODULE_LIBS= $(depth)/flower
-MODULE_CXXFLAGS += -D_REENTRANT
-STEPMAKE_TEMPLATES=library c++ po
-
-include $(depth)/make/stepmake.make 
-
-
-bla:
-       echo $(ALL_C_SOURCES)
-       echo $(ALL_C_SOURCES)
diff --git a/lib/binary-source-file.cc b/lib/binary-source-file.cc
deleted file mode 100644 (file)
index eb6cbbb..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-  binary-source-file.cc -- implement Binary_source_file
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--2000 Jan Nieuwenhuizen
-*/
-
-
-#include <limits.h>            // INT_MAX
-#include <assert.h>
-
-#include "proto.hh"
-#include "string.hh"
-#include "source-file.hh"
-#include "binary-source-file.hh"
-#include "string-convert.hh"
-
-Binary_source_file::Binary_source_file (String& filename_str)
-  : Source_file (filename_str)
-{
-}
-
-Binary_source_file::~Binary_source_file ()
-{
-}
-
-String
-Binary_source_file::error_str (char const* pos_ch_C) const
-{
-  assert (this);
-  if (!in_b (pos_ch_C))
-    return "";
-
-  char const* begin_ch_C = pos_ch_C - 8 >? ch_C ();
-  char const* end_ch_C = pos_ch_C + 7 <? ch_C () + length_i ();
-
-  String pre_str ((Byte const*)begin_ch_C, pos_ch_C - begin_ch_C);
-  pre_str = String_convert::bin2hex_str (pre_str);
-  for (int i = 2; i < pre_str.length_i (); i += 3)
-    pre_str = pre_str.left_str (i) + " " + pre_str.cut_str (i, INT_MAX);
-  String post_str ((Byte const*)pos_ch_C, end_ch_C - pos_ch_C);
-  post_str = String_convert::bin2hex_str (post_str);
-  for (int i = 2; i < post_str.length_i (); i += 3)
-    post_str = post_str.left_str (i) + " " + post_str.cut_str (i, INT_MAX);
-
-  String str = pre_str
-    + to_str ('\n')
-    + to_str (' ', pre_str.length_i () + 1) 
-    + post_str;
-  return str;
-}
-
-int
-Binary_source_file::line_i (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return 0;
-
-  return pos_ch_C - ch_C ();
-}
-
-U8
-Binary_source_file::get_U8 ()
-{
-  return *(U8*)forward_ch_C (1);
-}
-
-
-U16
-Binary_source_file::get_U16 ()
-{
-  U16 b;
-
-  b = get_U8 () << 8;
-  b |= get_U8 ();
-
-  return b;
-}
-
-
-U32
-Binary_source_file::get_U32()
-{
-  U32 b;
-  
-  b = get_U8 () << 24;
-  b |= get_U8 () << 16;
-  b |= get_U8 () << 8;
-  b |= get_U8 ();
-
-  return b;
-}
-
-
diff --git a/lib/include/GNUmakefile b/lib/include/GNUmakefile
deleted file mode 100644 (file)
index 7dccdbc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# lib/include/Makefile
-
-depth = ../..
-STEPMAKE_TEMPLATES=c++
-
-include $(depth)/make/stepmake.make
-
-
-
diff --git a/lib/include/binary-source-file.hh b/lib/include/binary-source-file.hh
deleted file mode 100644 (file)
index ee59497..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-//  binary-source-file.hh -- declare Binary_source_file
-//
-//  copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
-
-#ifndef BINARY_SOURCE_FILE_HH
-#define BINARY_SOURCE_FILE_HH
-
-#include "source-file.hh"
-
-class Binary_source_file : public Source_file
-{
-public:
-  Binary_source_file (String& filename_str );
-  virtual ~Binary_source_file ();
-
-  U8 get_U8 (); 
-  U16 get_U16 ();
-  U32 get_U32 ();
-  Byte get_Byte () {return get_U8 (); }
-  int get_int () { return get_U32 (); }
-  
-  virtual String error_str (char const* pos_ch_C ) const;
-  virtual int line_i (char const* pos_ch_C ) const;
-};
-
-#endif // BINARY_SOURCE_FILE_HH
diff --git a/lib/include/file-storage.hh b/lib/include/file-storage.hh
deleted file mode 100644 (file)
index 7fbccca..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  file-storage.hh -- declare File_storage, Mapped_file_storage, Simple_file_storage
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef FILE_STORAGE_HH
-#define FILE_STORAGE_HH
-
-#include "proto.hh"
-
-
-/**
-  store a file in-memory.
- */
-class File_storage
-{
-public:
-  virtual char const* ch_C () const=0;
-  virtual int length_i () const=0;
-  virtual ~File_storage (){}
-};
-
-#endif // FILE_STORAGE_HH
diff --git a/lib/include/input.hh b/lib/include/input.hh
deleted file mode 100644 (file)
index 1c9e61c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-  input.hh -- declare Input
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef INPUT_HH
-#define INPUT_HH
-
-#include "proto.hh"
-
-/**
-  Base class for anything that records its poisition in the parse file.
- */
-class Input {
-  char const *defined_ch_C_ ;
-  Source_file * source_file_l_;
-public:
-    
-  void warning (String) const; // should use member func?
-  void non_fatal_error (String) const;
-  void error (String) const;
-  void message (String) const;
-  void set_spot (Input const &);
-  Input spot () const;
-  String location_str () const;
-  String line_number_str () const;
-  Input (Source_file*, char const*);
-  Input ();
-};
-
-#endif // INPUT_HH
diff --git a/lib/include/mapped-file-storage.hh b/lib/include/mapped-file-storage.hh
deleted file mode 100644 (file)
index 958e0b5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*   
-  mapped-file-storage.hh -- declare Mapped_file_storage
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef MAPPED_FILE_STORAGE_HH
-#define MAPPED_FILE_STORAGE_HH
-
-
-
-#include "file-storage.hh"
-
-/**
-  Use mmap to "copy"  a file into memory
- */
-class Mapped_file_storage:public File_storage
-{
-public:
-  Mapped_file_storage (String);    
-protected:
-  virtual char const* ch_C () const;
-  virtual int length_i () const;
-  virtual ~Mapped_file_storage ();
-private:
-  void open (String name);
-  void close ();
-
-  void map ();
-  void unmap ();
-  int fildes_i_;
-  off_t size_off_;
-  caddr_t data_caddr_;
-};
-
-#endif /* MAPPED_FILE_STORAGE_HH */
-
diff --git a/lib/include/proto.hh b/lib/include/proto.hh
deleted file mode 100644 (file)
index 7ddc874..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-/*
-  proto.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef PROTO_HH
-#define PROTO_HH
-
-#include "flower-proto.hh"
-#include "real.hh"
-struct Duration;
-struct Duration_iterator;
-struct Source_file;
-struct Binary_source_file;
-struct Sources;
-struct File_storage;
-struct Mapped_file_storage;
-struct Simple_file_storage;
-
-#endif // PROTO_HH
diff --git a/lib/include/simple-file-storage.hh b/lib/include/simple-file-storage.hh
deleted file mode 100644 (file)
index 1202670..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*   
-  simple-file-storage.hh -- declare 
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef SIMPLE_FILE_STORAGE_HH
-#define SIMPLE_FILE_STORAGE_HH
-
-#include "file-storage.hh"
-
-/**
-  read file char by char and copy into a malloc array.
- */
-class Simple_file_storage  : public File_storage
-{
-  char * data_p_;
-  int len_i_;
-
-  void load_stdin ();
-  void load_file (String);
-public:
-  virtual char const*ch_C () const;
-  virtual int length_i () const;
-  virtual ~Simple_file_storage ();
-  Simple_file_storage (String);
-};
-
-#endif /* SIMPLE_FILE_STORAGE_HH */
-
diff --git a/lib/include/source-file.hh b/lib/include/source-file.hh
deleted file mode 100644 (file)
index 560ab09..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-//  source-file.hh -- declare Source_file
-//
-//  copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
-
-#ifndef SOURCE_FILE_HH
-#define SOURCE_FILE_HH
-
-#include "proto.hh"
-#include "string.hh"
-#include "interval.hh"
-
-class istream;
-
-
-/**
-  class for reading and mapping a file. 
-
-  duplicates a lot of Data_file and Text_stream.
-  should look at including Data_file's functionality:
-  get_line (), get_word () here.
-*/
-
-class Source_file
-{
-public:
-  /** Ugh! filename gets changed! The path to the opened file may
-    change, since it might be searched in multiple directories.  */
-  Source_file (String filename_str_r );
-
-  Source_file (String name_str, String data_str);
-  virtual ~Source_file ();
-
-  char const* ch_C () const;
-  virtual String error_str (char const* pos_ch_C ) const;
-  istream * istream_l ();
-  bool in_b (char const* pos_ch_C ) const;
-  int length_i () const;
-  virtual int line_i (char const* pos_ch_C ) const;
-  String name_str () const;
-  String file_line_column_str (char const* ch_C ) const;
-
-  // return start + n
-  char const* seek_ch_C (int n);
-  // return here + n bytes
-  char const* forward_ch_C (int n);
-  char const* pos_ch_C () { return pos_ch_C_; }
-  String get_str (int n);
-  void set_pos (char const * pos_ch_C);
-  
-  // tbd
-  // String get_line ();
-  // String get_word ();
-  // only used in binary-source-file, currently
-
-
-protected:
-  Slice line_slice (char const* pos_ch_C) const;
-  String line_str (char const* pos_ch_C) const;
-  int column_i (char const* pos_ch_C) const;
-  int char_i (char const* pos_ch_C) const;
-
-  char const* pos_ch_C_;
-
-private:
-  String name_str_;
-  istream* istream_p_;
-  File_storage * storage_p_;
-};
-
-#endif // SOURCE_FILE_HH //
-
diff --git a/lib/include/source.hh b/lib/include/source.hh
deleted file mode 100644 (file)
index 711f453..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-//  source.hh -- part of LilyPond
-//
-//  copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
-
-#ifndef SOURCE_HH
-#define SOURCE_HH
-#include "cons.hh"
-#include "proto.hh"
-
-/**
-   a set of sourcefiles.
-
-   TODO: 
- */
-class Sources 
-{
-  Sources (Sources const&) {}
-public:
-  Sources ();
-  ~Sources();
-
-  Source_file * get_file_l (String &filename );
-  Source_file* sourcefile_l (char const* ch_C );
-  void add (Source_file* sourcefile_p );
-  void set_path (File_path*p_C);
-  void set_binary (bool);
-
-  const File_path * path_C_;
-private:
-  Cons<Source_file> *sourcefile_p_list_;
-  bool binary_b_ ;
-};
-
-
-
-#endif // SOURCE_HH //
diff --git a/lib/include/string-storage.hh b/lib/include/string-storage.hh
deleted file mode 100644 (file)
index ac48e15..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*   
-  string-storage.hh -- declare String_storage
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-  
- */
-
-#ifndef STRING_STORAGE_HH
-#define STRING_STORAGE_HH
-
-#include "string.hh"
-#include "file-storage.hh"
-
-/**
- Urg, let String act as file storage.
- */
-class String_storage : public File_storage, protected String
-{
-public:
-  String_storage (String s) : String (s) { }
-
-protected:    
-  virtual char const* ch_C () const { return String::ch_C (); }
-  virtual int length_i () const { return String::length_i (); }
-};
-
-#endif /* STRING_STORAGE_HH */
-
diff --git a/lib/include/warn.hh b/lib/include/warn.hh
deleted file mode 100644 (file)
index e63d65c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  warn.hh -- declare Error message functions
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef WARN_HH
-#define WARN_HH
-
-#include "string.hh"
-
-void programming_error (String s);
-void warning (String message_str);
-void error (String message_str);
-void non_fatal_error (String);
-#endif // WARN_HH
diff --git a/lib/input.cc b/lib/input.cc
deleted file mode 100644 (file)
index 9413f7c..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- input.cc -- implement Input
-
- source file of the LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-#include <iostream.h>
-#include "proto.hh"
-#include "input.hh"
-#include "string.hh"
-#include "source.hh"
-#include "source-file.hh"
-
-Input::Input (Source_file*s, char const *cl)
-{
-  source_file_l_=s;
-  defined_ch_C_=cl;
-}
-
-Input::Input ()
-{
-  source_file_l_ = 0;
-  defined_ch_C_ = 0;
-}
-
-Input
-Input::spot () const
-{
-  return *this;
-}
-
-void
-Input::set_spot (Input const &i)
-{
-  *this = i;
-}
-
-/*
-  Produce almost GNU-compliant error message.  Lily used to be rather
-  GNU-compliant in this too, but correcting mudela is such a breeze if 
-  you('re edidor) know(s) the error column too (there's no GNU standard
-  on columns, is there?).
-
-  Format:
-
-    [file:line:column:][warning:]message
-
- */
-void
-Input::message (String message_str) const
-{
-  String str;
-  
-  /*
-    marked "Work in prgress" in GNU iostream 
-      libg++ 2.7.2.8
-      libstdc++ 2.8.1
-
-    why not just return always -1 (unknown), 
-    iso breaking the interface?
-
-  int col = cerr.rdbuf ()->column ();
-
-   */
-
-  // well, we don't want to loose first warning...
-  int col = 1;
-  if (col > 0)
-    str += "\n";
-  
-  if (source_file_l_)
-    str += location_str () + String (": ");
-
-  str += message_str;
-  if (source_file_l_)
-   {
-    str += ":\n";
-    str += source_file_l_->error_str (defined_ch_C_);
-   }
-  cerr << str << endl;
-}
-
-void
-Input::warning (String message_str) const
-{
-  message (_ ("warning: ") + message_str);
-}
-void
-Input::error (String s) const
-{
-  message (_ ("error: ")+ s);
-}
-
-void
-Input::non_fatal_error (String s) const
-{
-  message (_ ("Non fatal error: ") + s);
-}
-String
-Input::location_str () const
-{
-  if (source_file_l_)
-    return source_file_l_->file_line_column_str (defined_ch_C_);
-  else
-    return "(" + _ ("position unknown") + ")";
-}
-
-String
-Input::line_number_str () const
-{
-  if (source_file_l_)
-    return to_str (source_file_l_->line_i (defined_ch_C_));
-  else
-    return "?";
-}
diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc
deleted file mode 100644 (file)
index 329f21e..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifdef HAIRY_STUFF
-
-/*
-  file-storage.cc -- implement Mapped_file_storage
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  Jan Nieuwenhuizen <janneke@gnu.org>.
-
-  Nextstep fixes by tiggr@ics.ele.tue.nl
-*/
-
-#include <sys/types.h>         // open, mmap
-#include <sys/stat.h>          // open
-#include <sys/mman.h>          // mmap
-#include <limits.h>            // INT_MAX
-#include <fcntl.h>             // open
-#include <unistd.h>            // close, stat
-#include <stdio.h>             // fdopen
-#include <string.h>            // strerror
-#include <errno.h>             // errno
-
-
-
-#ifdef __NeXT__
-#include <mach/mach.h>
-#include <mach/mach_traps.h>
-#include <mach/mach_error.h>
-#endif
-
-#include "string.hh"
-#include "proto.hh"
-#include "warn.hh"
-#include "file-storage.hh"
-
-Mapped_file_storage::Mapped_file_storage (String s)
-{
-  data_caddr_ = 0;
-  fildes_i_ = 0;
-  size_off_ = 0;
-  open (s);
-}
-
-char const*
-Mapped_file_storage::ch_C () const
-{
-  return (char const*)data_caddr_;
-}
-
-void
-Mapped_file_storage::map ()
-{
-  if (fildes_i_ == -1)
-    return;
-  
-#ifdef __NeXT__
-   /* Should be #if !HAVE_MMAP && HAVE_MAP_FD...  */
-   {
-     vm_offset_t address;
-     kern_return_t r;
-     r = map_fd (fildes_i_, (vm_offset_t) 0, &address, TRUE, size_off_);
-     if (r != KERN_SUCCESS)
-       warning (String ("map_fd: ") + mach_error_string (r));
-     else
-       data_caddr_ = (char *) address;
-   }
-#else
-
-  data_caddr_ = (caddr_t)mmap ((void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_i_, 0);
-
-  if ((int)data_caddr_ == -1)
-    warning (_ ("Can't map file") + ": " + strerror (errno));
-
-#endif
-}
-
-
-void
-Mapped_file_storage::open (String name_str)
-{
-  fildes_i_ = ::open (name_str.ch_C (), O_RDONLY);
-
-  if (fildes_i_ == -1)
-    {
-      warning (_f ("Can't open file: `%s'", name_str)
-       + ": " + strerror (errno));
-      return;
-    }
-
-  struct stat file_stat;
-  fstat (fildes_i_, &file_stat);
-  size_off_ = file_stat.st_size;
-  map ();
-}
-
-void
-Mapped_file_storage::unmap ()
-{
-  if (data_caddr_)
-    {
-#ifdef __NeXT__
-       kern_return_t r;
-       r = vm_deallocate (task_self (), (vm_address_t) data_caddr_, 
-size_off_);
-       if (r != KERN_SUCCESS)
-       warning (String ("vm_deallocate: ") + mach_error_string (r));
-#else
-       munmap (data_caddr_, size_off_);
-#endif
-       
-      data_caddr_ = 0;
-      size_off_ = 0;
-    }
-}
-
-void
-Mapped_file_storage::close ()
-{
-  unmap ();
-  if (fildes_i_)
-    {
-      ::close (fildes_i_);
-      fildes_i_ = 0;
-    }
-}
-
-int
-Mapped_file_storage::length_i () const
-{
-  return size_off_;
-}
-
-Mapped_file_storage::~Mapped_file_storage ()
-{
-  close ();
-}
-#endif
diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc
deleted file mode 100644 (file)
index b7f94ac..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-  simple-file-storage.cc -- implement Simple_file_storage
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include <stdio.h>
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#include "simple-file-storage.hh"
-#include "array.hh"
-#include "string.hh"
-#include "warn.hh"
-
-void
-Simple_file_storage::load_stdin ()
-{
-  len_i_ = 0;
-
-  int c;
-  Array<char> ch_arr;
-  while ((c = fgetc (stdin)) != EOF)
-    ch_arr.push (c);
-  len_i_ = ch_arr.size ();
-  data_p_ = ch_arr.remove_array_p ();
-}
-
-void
-Simple_file_storage::load_file (String s)
-{
-  /*
-    let's hope that "b" opens anything binary, and does not apply
-    CR/LF translation
-    */
-  FILE * f =  fopen (s.ch_C (), "rb");
-
-  if (!f)
-    {
-      warning (_f ("Can't open file: `%s'", s));
-      return ;
-    }
-
-  int ret = fseek (f, 0, SEEK_END);
-  len_i_ = ftell (f);
-  rewind (f);
-  data_p_ = new char[len_i_+1];
-  data_p_[len_i_] = 0;
-  ret = fread (data_p_, sizeof (char), len_i_, f);
-
-  if  (ret!=len_i_)
-    warning (_f ("Huh?  Got %d, expected %d characters", ret, len_i_));
-
-  fclose (f);
-}
-
-/**
-  Stupid but foolproof way of opening files.
-
-  TODO
-  Should check IO status
-
-  This is of course a build it yourself version of mmap, so we should
-  have been using that..., but this is simple & portable
-  
-*/
-
-Simple_file_storage::Simple_file_storage (String s)
-{
-  data_p_ = 0;
-  len_i_ = 0;
-
-  if (!s.length_i () || (s == "-"))
-    load_stdin ();
-  else
-    load_file (s);
-}
-
-char const*
-Simple_file_storage::ch_C () const
-{
-  return data_p_;
-}
-
-int
-Simple_file_storage::length_i () const
-{
-  return len_i_;
-}
-
-
-Simple_file_storage::~Simple_file_storage ()
-{
-  delete []data_p_;
-}
diff --git a/lib/source-file.cc b/lib/source-file.cc
deleted file mode 100644 (file)
index c5e5b1d..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
-  source-file.cc -- implement Source_file
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-  & Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#include <assert.h>
-#include <strstream.h>
-
-#include "string.hh"
-#include "proto.hh"
-#include "warn.hh"
-#include "source-file.hh"
-#include "simple-file-storage.hh"
-#include "string-storage.hh"
-
-Source_file::Source_file (String filename_str)
-{
-  name_str_ = filename_str;
-  istream_p_ = 0;
-  storage_p_ = new Simple_file_storage (filename_str);
-  pos_ch_C_ = ch_C ();
-}
-
-Source_file::Source_file (String name_str, String data_str)
-{
-  name_str_ = name_str;
-  istream_p_ = 0;
-  storage_p_ = new String_storage (data_str);
-  pos_ch_C_ = ch_C ();
-}
-
-istream*
-Source_file::istream_l ()
-{
-  /*
-    if (!name_str_.length_i ())
-      return &cin;
-    */
-
-  if (!istream_p_)
-    {
-      if (length_i ()) // can-t this be done without such a hack?
-       istream_p_ = new istrstream (ch_C (), length_i ());
-      else
-       {
-         istream_p_ = new istrstream ("", 0);
-         istream_p_->set (ios::eofbit);
-       }
-    }
-  return istream_p_;
-}
-
-String
-Source_file::file_line_column_str (char const *context_ch_C) const
-{
-  if  (!ch_C ())
-    return "(" + _ ("position unknown") + ")";
-  else
-    return name_str () + ":" + to_str (line_i (context_ch_C))
-      + ":" + to_str (char_i (context_ch_C));
-}
-
-String
-Source_file::name_str () const
-{
-  return name_str_;
-}
-
-Source_file::~Source_file ()
-{
-  delete istream_p_;
-  istream_p_ = 0;
-  delete storage_p_;
-}
-
-Slice
-Source_file::line_slice (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return Slice (0,0);
-
-  char const* data_ch_C = ch_C ();
-  char const * eof_C_ = data_ch_C + length_i ();
-
-  if (pos_ch_C == eof_C_)
-    pos_ch_C --;
-  char const* begin_ch_C = pos_ch_C;
-  while (begin_ch_C > data_ch_C)
-    if (*--begin_ch_C == '\n')
-      {
-       begin_ch_C++;
-       break;
-      }
-
-  char const* end_ch_C = pos_ch_C;
-  while (end_ch_C < eof_C_)
-    if (*end_ch_C++ == '\n')
-      {
-       end_ch_C--;
-       break;
-      }
-
-  return Slice (begin_ch_C - data_ch_C, end_ch_C - data_ch_C);
-}
-
-String
-Source_file::line_str (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return "";
-
-  Slice line = line_slice (pos_ch_C);
-  char const* data_ch_C = ch_C ();
-  return String ((Byte const*)data_ch_C + line[LEFT], line.length ());
-}
-
-int
-Source_file::char_i (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return 0;
-
-  char const* data_ch_C = ch_C ();
-  return pos_ch_C - (line_slice (pos_ch_C)[SMALLER] + data_ch_C);
-}
-
-int
-Source_file::column_i (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return 0;
-
-  int ch_i = char_i (pos_ch_C);
-  String line = line_str (pos_ch_C);
-
-  int col_i = 0;
-  for (int i = 0; i < ch_i; i++)
-    if (line[i] == '\t')
-      col_i = (col_i / 8 + 1) * 8;
-    else
-      col_i++;
-
-  return col_i;
-}
-
-String
-Source_file::error_str (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return "(" + _ ("position unknown") + ")";
-
-  int ch_i = char_i (pos_ch_C);
-  String line = line_str (pos_ch_C);
-  String context = line.left_str (ch_i)
-    + to_str ('\n')
-    + to_str (' ', column_i (pos_ch_C))
-    + line.cut_str (ch_i, INT_MAX);
-
-  return context;
-}
-
-bool
-Source_file::in_b (char const* pos_ch_C) const
-{
-  return (pos_ch_C && (pos_ch_C >= ch_C ()) && (pos_ch_C <= ch_C () + length_i ()));
-}
-
-int
-Source_file::line_i (char const* pos_ch_C) const
-{
-  if (!in_b (pos_ch_C))
-    return 0;
-
-  int i = 1;
-  char const* scan_ch_C = ch_C ();
-  if (!scan_ch_C)
-    return 0;
-
-  while (scan_ch_C < pos_ch_C)
-    if (*scan_ch_C++ == '\n')
-      i++;
-  return i;
-}
-
-int
-Source_file::length_i () const
-{
-  return storage_p_->length_i ();
-}
-
-char const *
-Source_file::ch_C () const
-{
-  return storage_p_->ch_C ();
-}
-
-void
-Source_file::set_pos (char const * pos_ch_C)
-{
-  if (in_b (pos_ch_C))
-    pos_ch_C_ = pos_ch_C;
-  else
-    error (error_str (pos_ch_C) + "invalid pos");
-}
-
-char const*
-Source_file::seek_ch_C (int n)
-{
-  char const* new_ch_C = ch_C () + n;
-  if (n < 0)
-    new_ch_C += length_i ();
-  if (in_b (new_ch_C))
-    pos_ch_C_ = new_ch_C;
-  else
-    error (error_str (new_ch_C) + "seek past eof");
-
-  return pos_ch_C_;
-}
-
-char const*
-Source_file::forward_ch_C (int n)
-{
-  char const* old_pos_C = pos_ch_C_;
-  char const* new_ch_C = pos_ch_C_ + n;
-  if (in_b (new_ch_C))
-    pos_ch_C_ = new_ch_C;
-  else
-    error (error_str (new_ch_C)  + "forward past eof");
-
-  return old_pos_C;
-}
-
-String
-Source_file::get_str (int n)
-{
-  String str ((Byte const*)forward_ch_C (n), n);
-  return str;
-}
diff --git a/lib/source.cc b/lib/source.cc
deleted file mode 100644 (file)
index f3b5874..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-  source.cc -- implement Sources
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#include <assert.h>
-#include "killing-cons.tcc"
-#include "binary-source-file.hh"
-#include "string.hh"
-#include "proto.hh"
-#include "source-file.hh"
-#include "source.hh"
-#include "file-path.hh"
-
-Sources::Sources ()
-{
-  sourcefile_p_list_ = 0;
-  path_C_= 0;
-  binary_b_ = false;
-}
-
-void
-Sources::set_binary (bool bo)
-{
-  binary_b_ = bo;
-}
-
-void
-Sources::set_path (File_path *f_C)
-{
-  path_C_ = f_C;
-}
-
-/**
-  open a file
-
-  @param file_str the file to be opened, name might be changed if it
-  is found in a search path. UGH!
-
-  @return 0 if no file found
-  */
-Source_file*
-Sources::get_file_l (String &file_str) //UGH
-{
-  if ((file_str != "-") && path_C_)
-    {
-      String file_str_o = path_C_->find (file_str); 
-      if ((file_str_o == "") && (file_str != ""))
-       return 0;
-      file_str = file_str_o;
-    }
-  Source_file * f_p = (!binary_b_) ?
-    new Source_file (file_str) : new Binary_source_file (file_str);
-  add (f_p);
-  return f_p;
-}
-
-void
-Sources::add (Source_file* sourcefile_p)
-{
-  sourcefile_p_list_ = new Killing_cons<Source_file> (sourcefile_p, sourcefile_p_list_);
-}
-
-Sources::~Sources ()
-{
-  delete sourcefile_p_list_;
-}
-/**
-  search the list for file whose map contains pointer #ch_C#
-
-  @return 0 if not found.
-  */
-Source_file*
-Sources::sourcefile_l (char const* ch_C)
-{
-
-  for (Cons<Source_file> *i = sourcefile_p_list_; i; i = i->next_)
-    if (i->car_->in_b (ch_C))  
-      return i->car_;
-  return 0;
-}
-
diff --git a/lib/warn.cc b/lib/warn.cc
deleted file mode 100644 (file)
index 1df7cda..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <stream.h>
-#include "warn.hh"
-
-
-void
-error (String s)
-{
-  cerr <<  _ ("error: ") << s << '\n';
-
-  exit (1);
-}
-
-void
-non_fatal_error (String s)
-{
-  cerr <<  _ ("error: ") << s << '\n';
-}
-
-void
-warning (String m)
-{
-  cerr << _ ("warning: ") <<m <<endl;
-
-}
-
-void
-message (String m)
-{
-  cerr << m<<endl;
-}
-
-void
-programming_error (String s)
-{
-  cerr << _("programming error: ") << s << _(" (Continuing; cross thumbs)") << '\n';
-}
-
diff --git a/lily/note-head-side.cc b/lily/note-head-side.cc
deleted file mode 100644 (file)
index 273744c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*   
-  note-head-side.cc --  implement Note_head_side
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "directional-element-interface.hh"
-
-#include "side-position-interface.hh"
-#include "note-head-side.hh"
-void
-Note_head_side::add_support (Item*head_l)
-{
-  Side_position_interface s (this);
-  s.add_support (head_l);
-}
-
-
-Note_head_side::Note_head_side()
-{
-  Side_position_interface s(this);
-  s.set_axis (X_AXIS);
-  s.set_direction (LEFT);
-}
-
-bool
-Note_head_side::supported_b ()const
-{
-  Side_position_interface s(this);
-  return s.supported_b ();
-}
diff --git a/mf/feta-test11.mf b/mf/feta-test11.mf
deleted file mode 100644 (file)
index 4bec669..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-% feta-test16
-% part of LilyPond's pretty-but-neat music font
-
-input feta-autometric;
-fet_beginfont("feta-test", 16);
-staffsize#:=11pt#;
-test:=1;
-
-% smoked cheese
-% test := -1;
-
-
-% dem piksels.
-%test := 1;
-
-input feta-generic;
-
-fet_endfont("feta");
-
-end.
-