~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/grob-interface-scheme.cc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  grob-interface-scheme.cc -- implement grob interface bindings.
 
3
 
 
4
  source file of the GNU LilyPond music typesetter
 
5
 
 
6
  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
7
*/
 
8
 
 
9
#include "lily-guile.hh"
 
10
#include "std-string.hh"
 
11
 
 
12
static SCM all_ifaces;
 
13
 
 
14
LY_DEFINE (ly_add_interface, "ly:add-interface",
 
15
           3, 0, 0, (SCM a, SCM b, SCM c),
 
16
           "Add an interface description.")
 
17
{
 
18
  SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol");
 
19
  SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");
 
20
  SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
 
21
  if (!all_ifaces)
 
22
    {
 
23
      SCM tab = scm_c_make_hash_table (59);
 
24
      all_ifaces = tab;
 
25
      scm_permanent_object (tab);
 
26
    }
 
27
  
 
28
  SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
 
29
 
 
30
  scm_hashq_set_x (all_ifaces, a, entry);
 
31
 
 
32
  return SCM_UNSPECIFIED;
 
33
}
 
34
 
 
35
LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
 
36
           0, 0, 0, (),
 
37
           "Get a hash table with all interface descriptions.")
 
38
{
 
39
  return all_ifaces;
 
40
}
 
41