rbcdio 0.03 → 0.04

Sign up to get free protection for your applications and to get access to all the features.
data/missing CHANGED
@@ -1,9 +1,9 @@
1
1
  #! /bin/sh
2
2
  # Common stub for a few missing GNU programs while installing.
3
3
 
4
- scriptversion=2005-06-08.21
4
+ scriptversion=2006-05-10.23
5
5
 
6
- # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
6
+ # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
7
7
  # Free Software Foundation, Inc.
8
8
  # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
9
 
@@ -33,6 +33,8 @@ if test $# -eq 0; then
33
33
  fi
34
34
 
35
35
  run=:
36
+ sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
37
+ sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
36
38
 
37
39
  # In the cases where this matters, `missing' is being run in the
38
40
  # srcdir already.
@@ -44,7 +46,7 @@ fi
44
46
 
45
47
  msg="missing on your system"
46
48
 
47
- case "$1" in
49
+ case $1 in
48
50
  --run)
49
51
  # Try to run requested program, and just exit if it succeeds.
50
52
  run=
@@ -77,6 +79,7 @@ Supported PROGRAM values:
77
79
  aclocal touch file \`aclocal.m4'
78
80
  autoconf touch file \`configure'
79
81
  autoheader touch file \`config.h.in'
82
+ autom4te touch the output file, or create a stub one
80
83
  automake touch all \`Makefile.in' files
81
84
  bison create \`y.tab.[ch]', if possible, from existing .[ch]
82
85
  flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@ esac
106
109
  # Now exit if we have it, but it failed. Also exit now if we
107
110
  # don't have it and --version was passed (most likely to detect
108
111
  # the program).
109
- case "$1" in
112
+ case $1 in
110
113
  lex|yacc)
111
114
  # Not GNU programs, they don't have --version.
112
115
  ;;
@@ -135,7 +138,7 @@ esac
135
138
 
136
139
  # If it does not exist, or fails to run (possibly an outdated version),
137
140
  # try to emulate it.
138
- case "$1" in
141
+ case $1 in
139
142
  aclocal*)
140
143
  echo 1>&2 "\
141
144
  WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
164
167
  test -z "$files" && files="config.h"
165
168
  touch_files=
166
169
  for f in $files; do
167
- case "$f" in
170
+ case $f in
168
171
  *:*) touch_files="$touch_files "`echo "$f" |
169
172
  sed -e 's/^[^:]*://' -e 's/:.*//'`;;
170
173
  *) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
192
195
  You can get \`$1' as part of \`Autoconf' from any GNU
193
196
  archive site."
194
197
 
195
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
196
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
198
+ file=`echo "$*" | sed -n "$sed_output"`
199
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
197
200
  if test -f "$file"; then
198
201
  touch $file
199
202
  else
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
214
217
  in order for those modifications to take effect. You can get
215
218
  \`Bison' from any GNU archive site."
216
219
  rm -f y.tab.c y.tab.h
217
- if [ $# -ne 1 ]; then
220
+ if test $# -ne 1; then
218
221
  eval LASTARG="\${$#}"
219
- case "$LASTARG" in
222
+ case $LASTARG in
220
223
  *.y)
221
224
  SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
222
- if [ -f "$SRCFILE" ]; then
225
+ if test -f "$SRCFILE"; then
223
226
  cp "$SRCFILE" y.tab.c
224
227
  fi
225
228
  SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
226
- if [ -f "$SRCFILE" ]; then
229
+ if test -f "$SRCFILE"; then
227
230
  cp "$SRCFILE" y.tab.h
228
231
  fi
229
232
  ;;
230
233
  esac
231
234
  fi
232
- if [ ! -f y.tab.h ]; then
235
+ if test ! -f y.tab.h; then
233
236
  echo >y.tab.h
234
237
  fi
235
- if [ ! -f y.tab.c ]; then
238
+ if test ! -f y.tab.c; then
236
239
  echo 'main() { return 0; }' >y.tab.c
237
240
  fi
238
241
  ;;
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
244
247
  in order for those modifications to take effect. You can get
245
248
  \`Flex' from any GNU archive site."
246
249
  rm -f lex.yy.c
247
- if [ $# -ne 1 ]; then
250
+ if test $# -ne 1; then
248
251
  eval LASTARG="\${$#}"
249
- case "$LASTARG" in
252
+ case $LASTARG in
250
253
  *.l)
251
254
  SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
252
- if [ -f "$SRCFILE" ]; then
255
+ if test -f "$SRCFILE"; then
253
256
  cp "$SRCFILE" lex.yy.c
254
257
  fi
255
258
  ;;
256
259
  esac
257
260
  fi
258
- if [ ! -f lex.yy.c ]; then
261
+ if test ! -f lex.yy.c; then
259
262
  echo 'main() { return 0; }' >lex.yy.c
260
263
  fi
261
264
  ;;
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
267
270
  \`Help2man' package in order for those modifications to take
268
271
  effect. You can get \`Help2man' from any GNU archive site."
269
272
 
270
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
271
- if test -z "$file"; then
272
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
273
- fi
274
- if [ -f "$file" ]; then
273
+ file=`echo "$*" | sed -n "$sed_output"`
274
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
275
+ if test -f "$file"; then
275
276
  touch $file
276
277
  else
277
278
  test -z "$file" || exec >$file
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
289
290
  DU, IRIX). You might want to install the \`Texinfo' package or
290
291
  the \`GNU make' package. Grab either from any GNU archive site."
291
292
  # The file to touch is that specified with -o ...
292
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
293
+ file=`echo "$*" | sed -n "$sed_output"`
294
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
293
295
  if test -z "$file"; then
294
296
  # ... or it is the one specified with @setfilename ...
295
297
  infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
296
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
298
+ file=`sed -n '
299
+ /^@setfilename/{
300
+ s/.* \([^ ]*\) *$/\1/
301
+ p
302
+ q
303
+ }' $infile`
297
304
  # ... or it is derived from the source name (dir/f.texi becomes f.info)
298
305
  test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
299
306
  fi
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
317
324
  fi
318
325
  firstarg="$1"
319
326
  if shift; then
320
- case "$firstarg" in
327
+ case $firstarg in
321
328
  *o*)
322
329
  firstarg=`echo "$firstarg" | sed s/o//`
323
330
  tar "$firstarg" "$@" && exit 0
324
331
  ;;
325
332
  esac
326
- case "$firstarg" in
333
+ case $firstarg in
327
334
  *h*)
328
335
  firstarg=`echo "$firstarg" | sed s/h//`
329
336
  tar "$firstarg" "$@" && exit 0
data/swig/Makefile CHANGED
@@ -1,5 +1,5 @@
1
1
  #=============================================================
2
- # $Id: Makefile,v 1.1.1.1 2006/11/13 05:13:32 rocky Exp $
2
+ # $Id: Makefile,v 1.1 2006/11/13 05:13:32 rocky Exp $
3
3
  #=============================================================
4
4
  # Whatever it is you want to do, it should be handled by the
5
5
  # by the main (parent) Makefile. So reissue make from there.
data/swig/cdtext.swg ADDED
@@ -0,0 +1,67 @@
1
+ /* -*- c -*-
2
+ $Id: cdtext.swg,v 1.4 2008/05/01 16:55:05 karl Exp $
3
+
4
+ Copyright (C) 2009, Thomas Vander Stichele <thomas at apestaart dot org>
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+ /* See <cdio/cdtext.h> For more extensive documentation */
21
+
22
+ %constant long int CDTEXT_ARRANGER = CDTEXT_ARRANGER;
23
+ %constant long int CDTEXT_COMPOSER = CDTEXT_COMPOSER;
24
+ %constant long int CDTEXT_DISCID = CDTEXT_DISCID;
25
+ %constant long int CDTEXT_GENRE = CDTEXT_GENRE;
26
+ %constant long int CDTEXT_MESSAGE = CDTEXT_MESSAGE;
27
+ %constant long int CDTEXT_ISRC = CDTEXT_ISRC;
28
+ %constant long int CDTEXT_PERFORMER = CDTEXT_PERFORMER;
29
+ %constant long int CDTEXT_SIZE_INFO = CDTEXT_SIZE_INFO;
30
+ %constant long int CDTEXT_SONGWRITER = CDTEXT_SONGWRITER;
31
+ %constant long int CDTEXT_TITLE = CDTEXT_TITLE;
32
+ %constant long int CDTEXT_TOC_INFO = CDTEXT_TOC_INFO;
33
+ %constant long int CDTEXT_TOC_INFO2 = CDTEXT_TOC_INFO2;
34
+ %constant long int CDTEXT_UPC_EAN = CDTEXT_UPC_EAN;
35
+
36
+ %constant long int CDTEXT_INVALID = CDTEXT_INVALID;
37
+ %constant long int MIN_CDTEXT_FIELD = MIN_CDTEXT_FIELD;
38
+ %constant long int MAX_CDTEXT_FIELDS = MAX_CDTEXT_FIELDS;
39
+
40
+ typedef unsigned long int cdtext_field_t;
41
+
42
+ %feature("autodoc",
43
+ "cdtext_field2str(key)->string
44
+ Get the name of the key.");
45
+
46
+ const char *cdtext_field2str (cdtext_field_t key);
47
+
48
+ %feature("autodoc",
49
+ "cdtext_get(key, p_cdtext)->string
50
+ Get the value associated with key.");
51
+
52
+ const char *cdtext_get (cdtext_field_t key, const cdtext_t *cdtext);
53
+
54
+ %feature("autodoc",
55
+ "cdtext_is_keyword(string)->int
56
+ Returns enum value of keyword if the key is a CD-Text keyword,
57
+ returns MAX_CDTEXT_FIELDS otherwise.");
58
+
59
+ cdtext_field_t cdtext_is_keyword (const char *key);
60
+
61
+ %feature("autodoc",
62
+ "cdtext_set(key, string, p_cdtext)
63
+ Set the value associated with key.");
64
+
65
+ void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext);
66
+
67
+
data/swig/device.swg CHANGED
@@ -1,5 +1,5 @@
1
1
  /* -*- c -*-
2
- $Id: device.swg,v 1.12 2008/05/02 13:05:40 karl Exp $
2
+ $Id: device.swg,v 1.13 2008/11/30 15:45:23 rocky Exp $
3
3
 
4
4
  Copyright (C) 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
5
5
 
@@ -31,9 +31,9 @@ typedef char ** DeviceList_t;
31
31
 
32
32
  %typemap(out) DeviceList_t {
33
33
  // $1 is of type DeviceList_t
34
- char **p = result;
34
+ char **p = result;
35
35
 
36
- if (result) {
36
+ if (result && *result) {
37
37
  VALUE aDevices = rb_ary_new();
38
38
  for (p = $1; *p; p++) {
39
39
  rb_ary_push(aDevices, rb_str_new2(*p));
data/swig/disc.swg CHANGED
@@ -1,5 +1,5 @@
1
1
  /* -*- c -*-
2
- $Id: disc.swg,v 1.2 2008/05/02 13:05:40 karl Exp $
2
+ $Id: disc.swg,v 1.3 2008/11/30 14:17:24 rocky Exp $
3
3
 
4
4
  Copyright (C) 2006, 2008 Rocky Bernstein <rocky@gnu.org>
5
5
 
@@ -38,7 +38,7 @@
38
38
  "get_disc_last_lsn(cdio)->lsn
39
39
  Get the LSN of the end of the CD.
40
40
 
41
- perlcdio.INVALID_LSN is returned on error.");
41
+ rubycdio.INVALID_LSN is returned on error.");
42
42
  lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio);
43
43
 
44
44
 
data/swig/rubycdio.swg CHANGED
@@ -1,7 +1,7 @@
1
1
  /* -*- c -*-
2
2
  $Id: rubycdio.swg,v 1.4 2008/05/02 13:05:40 karl Exp $
3
3
 
4
- Copyright (C) 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
4
+ Copyright (C) 2006, 2007, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
5
5
 
6
6
  This program is free software: you can redistribute it and/or modify
7
7
  it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@ use this library."
32
32
 
33
33
  #include <cdio/cdio.h>
34
34
  #include <cdio/audio.h>
35
+ #include <cdio/cdtext.h>
35
36
 
36
37
  %include "compat.swg"
37
38
 
@@ -45,6 +46,7 @@ use this library."
45
46
  %include "audio.swg"
46
47
  %include "read.swg"
47
48
  %include "track.swg"
49
+ %include "cdtext.swg"
48
50
 
49
51
  /* In the presence of the exception handling, the order is important.
50
52
  The below use %exception.
data/swig/track.swg CHANGED
@@ -1,7 +1,5 @@
1
1
  /* -*- c -*-
2
- $Id: track.swg,v 1.5 2008/05/02 13:05:41 karl Exp $
3
-
4
- Copyright (C) 2006, 2008 Rocky Bernstein <rocky@gnu.org>
2
+ Copyright (C) 2006, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
5
3
 
6
4
  This program is free software: you can redistribute it and/or modify
7
5
  it under the terms of the GNU General Public License as published by
@@ -49,6 +47,14 @@
49
47
 
50
48
  typedef int track_flag_t;
51
49
 
50
+ %rename cdio_get_cdtext get_cdtext;
51
+ %feature("autodoc",
52
+ "cdio_get_cdtext(track)->cdtext
53
+ Get the CDText object for the given track number.
54
+ Use track 0 for the disc's CDText object.");
55
+
56
+ cdtext_t *cdio_get_cdtext (CdIo_t *p_cdio, track_t i_track);
57
+
52
58
  %rename cdio_get_first_track_num get_first_track_num;
53
59
  %feature("autodoc",
54
60
  "get_first_track_num(p_cdio) -> int
@@ -202,4 +208,3 @@ const char
202
208
  }
203
209
  %}
204
210
 
205
-