Deleted Added
sdiff udiff text old ( 107552 ) new ( 112559 )
full compact
1/*
2 * Compact Disc Control Utility by Serge V. Vakulenko <vak@cronyx.ru>.
3 * Based on the non-X based CD player by Jean-Marc Zucconi and
4 * Andrey A. Chernov.
5 *
6 * Fixed and further modified on 5-Sep-1995 by Jukka Ukkonen <jau@funet.fi>.
7 *
8 * 11-Sep-1995: Jukka A. Ukkonen <jau@funet.fi>

--- 6 unchanged lines hidden (view full) ---

15 *
16 * 11-Oct-1995: Serge V.Vakulenko <vak@cronyx.ru>
17 * New eject algorithm.
18 * Some code style reformatting.
19 */
20
21#ifndef lint
22static const char rcsid[] =
23 "$FreeBSD: head/usr.sbin/cdcontrol/cdcontrol.c 112559 2003-03-24 20:54:30Z eivind $";
24#endif /* not lint */
25
26#include <sys/cdio.h>
27#include <sys/cdrio.h>
28#include <sys/file.h>
29#include <sys/ioctl.h>
30#include <sys/param.h>
31#include <arpa/inet.h>

--- 544 unchanged lines hidden (view full) ---

576 goto Try_Absolute_Timed_Addresses;
577
578Play_Relative_Addresses:
579 if (! tr1)
580 tr1 = 1;
581 else if (tr1 > n)
582 tr1 = n;
583
584 tr1--;
585
586 if (msf) {
587 tm = toc_buffer[tr1].addr.msf.minute;
588 ts = toc_buffer[tr1].addr.msf.second;
589 tf = toc_buffer[tr1].addr.msf.frame;
590 } else
591 lba2msf(ntohl(toc_buffer[tr1].addr.lba),
592 &tm, &ts, &tf);
593 if ((m1 > tm)
594 || ((m1 == tm)
595 && ((s1 > ts)
596 || ((s1 == ts)
597 && (f1 > tf))))) {
598 printf ("Track %d is not that long.\n", tr1);
599 return (0);
600 }
601
602 f1 += tf;
603 if (f1 >= 75) {
604 s1 += f1 / 75;
605 f1 %= 75;
606 }
607
608 s1 += ts;
609 if (s1 >= 60) {

--- 661 unchanged lines hidden ---