Deleted Added
full compact
cdcontrol.c (107552) cdcontrol.c (112559)
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[] =
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 107552 2002-12-03 15:41:30Z des $";
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
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
584 if (msf) {
585 tm = toc_buffer[tr1].addr.msf.minute;
586 ts = toc_buffer[tr1].addr.msf.second;
587 tf = toc_buffer[tr1].addr.msf.frame;
588 } else
589 lba2msf(ntohl(toc_buffer[tr1].addr.lba),
590 &tm, &ts, &tf);
591 if ((m1 > tm)
592 || ((m1 == tm)
593 && ((s1 > ts)
594 || ((s1 == ts)
595 && (f1 > tf))))) {
596 printf ("Track %d is not that long.\n", tr1);
597 return (0);
598 }
599
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
600 tr1--;
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 ---
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 ---