[Debburn-changes] r248 - in nonameyet/branches/cleanup: . btcflash
cdda2wav cdrecord libdeflt libedc libhfs_iso libparanoia readcd
Eduard Bloch
blade at costa.debian.org
Mon Sep 11 07:18:04 UTC 2006
Author: blade
Date: 2006-09-11 07:17:29 +0000 (Mon, 11 Sep 2006)
New Revision: 248
Modified:
nonameyet/branches/cleanup/Changelog
nonameyet/branches/cleanup/btcflash/btcflash.c
nonameyet/branches/cleanup/btcflash/skel.c
nonameyet/branches/cleanup/cdda2wav/aifc.c
nonameyet/branches/cleanup/cdda2wav/aiff.c
nonameyet/branches/cleanup/cdda2wav/base64.c
nonameyet/branches/cleanup/cdda2wav/cd_extra.c
nonameyet/branches/cleanup/cdda2wav/cd_text.c
nonameyet/branches/cleanup/cdda2wav/cdda2wav.c
nonameyet/branches/cleanup/cdda2wav/interface.c
nonameyet/branches/cleanup/cdda2wav/interface.h
nonameyet/branches/cleanup/cdda2wav/ioctl.c
nonameyet/branches/cleanup/cdda2wav/md5c.c
nonameyet/branches/cleanup/cdda2wav/raw.c
nonameyet/branches/cleanup/cdda2wav/resample.c
nonameyet/branches/cleanup/cdda2wav/ringbuff.c
nonameyet/branches/cleanup/cdda2wav/scsi_cmds.c
nonameyet/branches/cleanup/cdda2wav/semshm.c
nonameyet/branches/cleanup/cdda2wav/setuid.c
nonameyet/branches/cleanup/cdda2wav/sha_func.c
nonameyet/branches/cleanup/cdda2wav/sndconfig.c
nonameyet/branches/cleanup/cdda2wav/sun.c
nonameyet/branches/cleanup/cdda2wav/toc.c
nonameyet/branches/cleanup/cdda2wav/wav.c
nonameyet/branches/cleanup/cdrecord/audiosize.c
nonameyet/branches/cleanup/cdrecord/auinfo.c
nonameyet/branches/cleanup/cdrecord/cd_misc.c
nonameyet/branches/cleanup/cdrecord/cdr_drv.c
nonameyet/branches/cleanup/cdrecord/cdrecord.c
nonameyet/branches/cleanup/cdrecord/cdrecord.h
nonameyet/branches/cleanup/cdrecord/cdtext.c
nonameyet/branches/cleanup/cdrecord/clone.c
nonameyet/branches/cleanup/cdrecord/crc16.c
nonameyet/branches/cleanup/cdrecord/cue.c
nonameyet/branches/cleanup/cdrecord/diskid.c
nonameyet/branches/cleanup/cdrecord/drv_7501.c
nonameyet/branches/cleanup/cdrecord/drv_jvc.c
nonameyet/branches/cleanup/cdrecord/drv_mmc.c
nonameyet/branches/cleanup/cdrecord/drv_philips.c
nonameyet/branches/cleanup/cdrecord/drv_simul.c
nonameyet/branches/cleanup/cdrecord/drv_sony.c
nonameyet/branches/cleanup/cdrecord/fifo.c
nonameyet/branches/cleanup/cdrecord/getnum.c
nonameyet/branches/cleanup/cdrecord/isosize.c
nonameyet/branches/cleanup/cdrecord/misc.c
nonameyet/branches/cleanup/cdrecord/modes.c
nonameyet/branches/cleanup/cdrecord/movesect.c
nonameyet/branches/cleanup/cdrecord/scsi_cdr.c
nonameyet/branches/cleanup/cdrecord/scsi_cdr_mmc4.c
nonameyet/branches/cleanup/cdrecord/scsi_mmc.c
nonameyet/branches/cleanup/cdrecord/scsi_mmc4.c
nonameyet/branches/cleanup/cdrecord/scsi_scan.c
nonameyet/branches/cleanup/cdrecord/sector.c
nonameyet/branches/cleanup/cdrecord/subchan.c
nonameyet/branches/cleanup/cdrecord/wm_packet.c
nonameyet/branches/cleanup/cdrecord/wm_session.c
nonameyet/branches/cleanup/cdrecord/wm_track.c
nonameyet/branches/cleanup/cdrecord/xio.c
nonameyet/branches/cleanup/libdeflt/default.c
nonameyet/branches/cleanup/libedc/edc_ecc.c
nonameyet/branches/cleanup/libedc/edcspeed.c
nonameyet/branches/cleanup/libhfs_iso/block.c
nonameyet/branches/cleanup/libhfs_iso/btree.c
nonameyet/branches/cleanup/libhfs_iso/data.c
nonameyet/branches/cleanup/libhfs_iso/file.c
nonameyet/branches/cleanup/libhfs_iso/hfs.c
nonameyet/branches/cleanup/libhfs_iso/low.c
nonameyet/branches/cleanup/libhfs_iso/node.c
nonameyet/branches/cleanup/libhfs_iso/record.c
nonameyet/branches/cleanup/libhfs_iso/volume.c
nonameyet/branches/cleanup/libparanoia/gap.c
nonameyet/branches/cleanup/libparanoia/isort.c
nonameyet/branches/cleanup/libparanoia/overlap.c
nonameyet/branches/cleanup/libparanoia/p_block.c
nonameyet/branches/cleanup/libparanoia/paranoia.c
nonameyet/branches/cleanup/libparanoia/pmalloc.c
nonameyet/branches/cleanup/readcd/io.c
Log:
[ Christian Fromme ]
* big cleanup, phase I, getting rid from Cstyle function definitions in
applications
Modified: nonameyet/branches/cleanup/Changelog
===================================================================
--- nonameyet/branches/cleanup/Changelog 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/Changelog 2006-09-11 07:17:29 UTC (rev 248)
@@ -1,9 +1,13 @@
cdrkit (1.0pre4) RELEASED; urgency=low
+ [ Christian Fromme ]
+ * big cleanup, phase I, getting rid from Cstyle function definitions in
+ applications
+ [ Eduard Bloch ]
* added better check for capability.h and FATAL_ERROR if it's missing on Linux
* wodim.1 updates, ie. moved suid howto to README.suidroot, Linux bashing to
README.linux, more notes about non-root usage (corrections by Peter)
- * better parser
+ * config parser rewrite; more user-friendly, flexibel, tolerant now
-- Eduard Bloch <blade at debian.org> Wed, 6 Sep 2006 22:05:30 +0200
Modified: nonameyet/branches/cleanup/btcflash/btcflash.c
===================================================================
--- nonameyet/branches/cleanup/btcflash/btcflash.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/btcflash/btcflash.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -50,7 +50,7 @@
unsigned char *loadfirmware(const char *);
int getbyte(char **);
unsigned short calcsum(unsigned char *);
-LOCAL int btcmain __PR((SCSI *scgp, const char *fwfile));
+static int btcmain __PR((SCSI *scgp, const char *fwfile));
unsigned char *
@@ -198,10 +198,8 @@
return ((flashsum & 0xffff));
}
-LOCAL int
-btcmain(scgp, fwfile)
- SCSI *scgp;
- const char *fwfile;
+static int
+btcmain(SCSI *scgp, const char *fwfile)
{
char confirm[5];
unsigned char *fwbuf;
Modified: nonameyet/branches/cleanup/btcflash/skel.c
===================================================================
--- nonameyet/branches/cleanup/btcflash/skel.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/btcflash/skel.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -74,15 +74,15 @@
char oerr[3];
} exargs;
-LOCAL void usage __PR((int ret));
-EXPORT int main __PR((int ac, char **av));
-LOCAL void intr __PR((int sig));
-LOCAL void exscsi __PR((int excode, void *arg));
-LOCAL void excdr __PR((int excode, void *arg));
-LOCAL int prstats __PR((void));
-LOCAL int prstats_silent __PR((void));
-LOCAL void doit __PR((SCSI *scgp));
-LOCAL void dofile __PR((SCSI *scgp, char *filename));
+static void usage __PR((int ret));
+int main __PR((int ac, char **av));
+static void intr __PR((int sig));
+static void exscsi __PR((int excode, void *arg));
+static void excdr __PR((int excode, void *arg));
+static int prstats __PR((void));
+static int prstats_silent __PR((void));
+static void doit __PR((SCSI *scgp));
+static void dofile __PR((SCSI *scgp, char *filename));
struct timeval starttime;
struct timeval stoptime;
@@ -98,7 +98,7 @@
int quiet;
BOOL is_suid;
-LOCAL void
+static void
usage(ret)
int ret;
{
@@ -121,10 +121,7 @@
char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,ts&,f*";
-EXPORT int
-main(ac, av)
- int ac;
- char *av[];
+int main(argc, char *argv[])
{
char *dev = NULL;
int fcount;
@@ -143,10 +140,10 @@
SCSI *scgp;
char *filename = NULL;
- save_args(ac, av);
+ save_args(argc, argv);
- cac = --ac;
- cav = ++av;
+ cac = --arcc;
+ cav = ++argv;
if (getallargs(&cac, &cav, opts,
&debug, &debug,
@@ -176,8 +173,8 @@
}
fcount = 0;
- cac = ac;
- cav = av;
+ cac = argc;
+ cav = argv;
while (getfiles(&cac, &cav, opts) > 0) {
fcount++;
@@ -341,9 +338,8 @@
* XXX da meistens das letzte SCSI Kommando noch laeuft.
* XXX Eine Loesung waere ein Abort Callback in SCSI *.
*/
-LOCAL void
-intr(sig)
- int sig;
+static void
+intr(int sig)
{
didintr++;
exsig = sig;
@@ -351,7 +347,7 @@
}
/* ARGSUSED */
-LOCAL void
+static void
exscsi(excode, arg)
int excode;
void *arg;
@@ -389,10 +385,8 @@
}
}
-LOCAL void
-excdr(excode, arg)
- int excode;
- void *arg;
+static void
+excdr(int excode, void *arg)
{
exscsi(excode, arg);
@@ -404,7 +398,7 @@
/*
* Return milliseconds since start time.
*/
-LOCAL int
+static int
prstats()
{
int sec;
@@ -432,7 +426,7 @@
/*
* Return milliseconds since start time, but be silent this time.
*/
-LOCAL int
+static int
prstats_silent()
{
int sec;
@@ -456,9 +450,8 @@
return (1000*sec + (usec / 1000));
}
-LOCAL void
-doit(scgp)
- SCSI *scgp;
+static void
+doit(SCSI *scgp)
{
int i = 0;
@@ -482,12 +475,10 @@
}
}
-LOCAL int btcmain __PR((SCSI *scgp, const char *fwfile));
+static int btcmain __PR((SCSI *scgp, const char *fwfile));
-LOCAL void
-dofile(scgp, filename)
- SCSI *scgp;
- char *filename;
+static void
+dofile(SCSI *scgp, char *filename)
{
if (btcmain(scgp, filename) != 0)
exit(EX_BAD);
Modified: nonameyet/branches/cleanup/cdda2wav/aifc.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/aifc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/aifc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -89,9 +89,7 @@
*/
static int Format_samplerate __PR((unsigned long rate, unsigned char the_rate[10]));
-static int Format_samplerate(rate, the_rate)
- unsigned long rate;
- unsigned char the_rate[10];
+static int Format_samplerate(unsigned long rate, unsigned char the_rate[10])
{
int i;
@@ -119,12 +117,8 @@
static int InitSound __PR(( int audio, long channels, unsigned long rate, long nBitsPerSample, unsigned long expected_bytes ));
-static int InitSound ( audio, channels, rate, nBitsPerSample, expected_bytes)
- int audio;
- long channels;
- unsigned long rate;
- long nBitsPerSample;
- unsigned long expected_bytes;
+static int InitSound(int audio, long channels, unsigned long rate,
+ long nBitsPerSample, unsigned long expected_bytes)
{
UINT4 tmp;
@@ -173,9 +167,7 @@
static int ExitSound __PR(( int audio, unsigned long nBytesDone ));
-static int ExitSound ( audio, nBytesDone )
- int audio;
- unsigned long nBytesDone;
+static int ExitSound(int audio, unsigned long nBytesDone)
{
UINT4 tmp;
@@ -203,15 +195,14 @@
static unsigned long GetHdrSize __PR(( void ));
-static unsigned long GetHdrSize( )
+static unsigned long GetHdrSize()
{
return sizeof( AifcHdr );
}
static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo ));
-static unsigned long InSizeToOutSize ( BytesToDo )
- unsigned long BytesToDo;
+static unsigned long InSizeToOutSize(unsigned long BytesToDo)
{
return BytesToDo;
}
Modified: nonameyet/branches/cleanup/cdda2wav/aiff.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/aiff.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/aiff.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -75,9 +75,7 @@
*/
static int Format_samplerate __PR((unsigned long rate, unsigned char the_rate[10]));
-static int Format_samplerate(rate, the_rate)
- unsigned long rate;
- unsigned char the_rate[10];
+static int Format_samplerate(unsigned long rate, unsigned char the_rate[10])
{
int i;
@@ -105,12 +103,8 @@
static int InitSound __PR(( int audio, long channels, unsigned long rate, long nBitsPerSample, unsigned long expected_bytes ));
-static int InitSound ( audio, channels, rate, nBitsPerSample, expected_bytes)
- int audio;
- long channels;
- unsigned long rate;
- long nBitsPerSample;
- unsigned long expected_bytes;
+static int InitSound(int audio, long channels, unsigned long rate,
+ long nBitsPerSample, unsigned long expected_bytes)
{
UINT4 tmp;
@@ -146,9 +140,7 @@
static int ExitSound __PR(( int audio, unsigned long nBytesDone ));
-static int ExitSound ( audio, nBytesDone )
- int audio;
- unsigned long nBytesDone;
+static int ExitSound(int audio, unsigned long nBytesDone )
{
UINT4 tmp;
@@ -176,15 +168,14 @@
static unsigned long GetHdrSize __PR(( void ));
-static unsigned long GetHdrSize( )
+static unsigned long GetHdrSize()
{
return sizeof( AiffHdr );
}
static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo ));
-static unsigned long InSizeToOutSize ( BytesToDo )
- unsigned long BytesToDo;
+static unsigned long InSizeToOutSize(unsigned long BytesToDo)
{
return BytesToDo;
}
Modified: nonameyet/branches/cleanup/cdda2wav/base64.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/base64.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/base64.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -98,10 +98,7 @@
* Returns: destination as BASE64
*/
-unsigned char *rfc822_binary (src, srcl, len)
- char *src;
- unsigned long srcl;
- unsigned long *len;
+unsigned char *rfc822_binary(char *src, unsigned long srcl, unsigned long *len)
{
unsigned char *ret,*d;
unsigned char *s = (unsigned char *) src;
Modified: nonameyet/branches/cleanup/cdda2wav/cd_extra.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/cd_extra.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/cd_extra.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -20,9 +20,7 @@
static unsigned long Read_CD_Extra_File __PR((unsigned char *Extra_buf, unsigned long sector));
static unsigned long
-Read_CD_Extra_File(Extra_buf, sector)
- unsigned char *Extra_buf;
- unsigned long sector;
+Read_CD_Extra_File(unsigned char *Extra_buf, unsigned long sector)
{
unsigned long mysec;
@@ -105,8 +103,7 @@
* As an alternative method, we try reading through the iso9660 file system...
*/
static int Read_CD_Extra_Info __PR(( unsigned long sector));
-static int Read_CD_Extra_Info(sector)
- unsigned long sector;
+static int Read_CD_Extra_Info(unsigned long sector)
{
unsigned i;
static int offsets[] = {
@@ -153,9 +150,7 @@
}
static void Read_Subinfo __PR(( unsigned pos, unsigned length));
-static void Read_Subinfo(pos, length)
- unsigned pos;
- unsigned length;
+static void Read_Subinfo(unsigned pos, unsigned length)
{
unsigned num_infos, num;
unsigned char *Subp, *orgSubp;
Modified: nonameyet/branches/cleanup/cdda2wav/cd_text.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/cd_text.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/cd_text.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -63,10 +63,8 @@
register unsigned char *cp,
register size_t cnt));
-static unsigned short updcrc(p_crc, cp, cnt)
- unsigned int p_crc;
- register unsigned char *cp;
- register size_t cnt;
+static unsigned short updcrc(unsigned int p_crc, register unsigned char *cp,
+ register size_t cnt)
{
register unsigned short crc = (unsigned short)p_crc;
while( cnt-- ) {
@@ -77,9 +75,7 @@
static unsigned short calcCRC __PR((unsigned char *buf, unsigned bsize));
-static unsigned short calcCRC(buf, bsize)
- unsigned char *buf;
- unsigned bsize;
+static unsigned short calcCRC(unsigned char *buf, unsigned bsize)
{
return updcrc( 0x0, (unsigned char *)buf, bsize );
}
@@ -97,9 +93,7 @@
static int flip_error_corr __PR((unsigned char *b, int crc));
-static int flip_error_corr(b, crc)
- unsigned char *b;
- int crc;
+static int flip_error_corr(unsigned char *b, int crc)
{
if (crc != 0) {
int i;
@@ -120,8 +114,7 @@
static int cdtext_crc_ok __PR((cdtextpackdata *c));
-static int cdtext_crc_ok (c)
- cdtextpackdata *c;
+static int cdtext_crc_ok(cdtextpackdata *c)
{
int crc;
int retval;
@@ -163,8 +156,7 @@
#if DETAILED
static void dump_binary __PR((cdtextpackdata *c));
-static void dump_binary(c)
- cdtextpackdata *c;
+static void dump_binary(cdtextpackdata *c)
{
fprintf(stderr, ": header fields %02x %02x %02x ",
c->headerfield[1], c->headerfield[2], c->headerfield[3]);
@@ -188,11 +180,8 @@
static int process_header __PR((cdtextpackdata *c, unsigned tracknr, int dbcc, unsigned char *line));
-static int process_header(c, tracknr, dbcc, line)
- cdtextpackdata *c;
- unsigned tracknr;
- int dbcc;
- unsigned char *line;
+static int process_header(cdtextpackdata *c, unsigned tracknr, int dbcc,
+ unsigned char *line)
{
switch ((int)c->headerfield[0]) {
Modified: nonameyet/branches/cleanup/cdda2wav/cdda2wav.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/cdda2wav.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/cdda2wav.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -138,7 +138,6 @@
#endif
#include "defaults.h"
-EXPORT int main __PR((int argc, char **argv));
static void RestrictPlaybackRate __PR((long newrate));
static void output_indices __PR((FILE *fp, index_list *p, unsigned trackstart));
static int write_info_file __PR((char *fname_baseval, unsigned int track, unsigned long SamplesDone, int numbered));
@@ -196,8 +195,7 @@
return current_track;
}
-static void RestrictPlaybackRate( newrate )
- long newrate;
+static void RestrictPlaybackRate(long newrate)
{
global.playback_rate = newrate;
@@ -209,9 +207,7 @@
}
-long SamplesNeeded( amount, undersampling_val)
- long amount;
- long undersampling_val;
+long SamplesNeeded(long amount, long undersampling_val)
{
long retval = ((undersampling_val * 2 + Halved)*amount)/2;
if (Halved && (*nSamplesToDo & 1))
@@ -231,7 +227,7 @@
}
static char *get_next_name __PR((void));
-static char *get_next_name ()
+static char *get_next_name()
{
if (argc2 > 0) {
argc2--;
@@ -243,9 +239,7 @@
static char *cut_extension __PR(( char * fname ));
-static char
-*cut_extension (fname)
- char *fname;
+static char *cut_extension(char *fname)
{
char *pp;
@@ -260,10 +254,7 @@
}
#ifdef INFOFILES
-static void output_indices(fp, p, trackstart)
- FILE *fp;
- index_list *p;
- unsigned trackstart;
+static void output_indices(FILE *fp, index_list *p, unsigned trackstart)
{
int ci;
@@ -297,11 +288,8 @@
*
* uglyfied for Joerg Schillings ultra dumb line parser
*/
-static int write_info_file(fname_baseval, track, SamplesDone, numbered)
- char *fname_baseval;
- unsigned int track;
- unsigned long int SamplesDone;
- int numbered;
+static int write_info_file(char *fname_baseval, unsigned int track,
+ unsigned long int SamplesDone, int numbered)
{
FILE *info_fp;
char fname[200];
@@ -433,10 +421,8 @@
}
#endif
-static void CloseAudio(channels_val, nSamples, audio_out)
- int channels_val;
- unsigned long nSamples;
- struct soundfile *audio_out;
+static void CloseAudio(int channels_val, unsigned long nSamples,
+ struct soundfile *audio_out)
{
/* define length */
audio_out->ExitSound( global.audio, (nSamples-global.SkippedSamples)*global.OutSampleSize*channels_val );
@@ -449,7 +435,7 @@
/* On terminating:
* define size-related entries in audio file header, update and close file */
-static void CloseAll ()
+static void CloseAll()
{
WAIT_T chld_return_status;
int amiparent;
@@ -549,9 +535,7 @@
#ifdef PROTOTYPES
static void usage2 (const char *szMessage, ...)
#else
-static void usage2 (szMessage, va_alist)
- const char *szMessage;
- va_dcl
+static void usage2(const char *szMessage, va_dcl va_alist)
#endif
{
va_list marker;
@@ -575,9 +559,7 @@
#ifdef PROTOTYPES
void FatalError (const char *szMessage, ...)
#else
-void FatalError (szMessage, va_alist)
- const char *szMessage;
- va_dcl
+void FatalError(const char *szMessage, va_dcl va_alist)
#endif
{
va_list marker;
@@ -614,13 +596,9 @@
* is known). So hitting the interrupt key leaves an intact
* file.
*/
-static void OpenAudio (fname, rate, nBitsPerSample, channels_val, expected_bytes, audio_out)
- char *fname;
- double rate;
- long nBitsPerSample;
- long channels_val;
- unsigned long expected_bytes;
- struct soundfile * audio_out;
+static void OpenAudio(char *fname, double rate, long nBitsPerSample,
+ long channels_val, unsigned long expected_bytes,
+ struct soundfile *audio_out)
{
if (global.audio == -1) {
@@ -652,9 +630,7 @@
static int RealEnd __PR((SCSI *scgp, UINT4 *buff));
-static int RealEnd(scgp, buff)
- SCSI *scgp;
- UINT4 *buff;
+static int RealEnd(SCSI *scgp, UINT4 *buff)
{
if (scg_cmd_err(scgp) != 0) {
int c,k,q;
@@ -689,9 +665,7 @@
return 0;
}
-static void set_offset(p, offset)
- myringbuff *p;
- int offset;
+static void set_offset(myringbuff *p, int offset)
{
#ifdef DEBUG_SHM
fprintf(stderr, "Write offset %d at %p\n", offset, &p->offset);
@@ -700,8 +674,7 @@
}
-static int get_offset(p)
-myringbuff *p;
+static int get_offset(myringbuff *p)
{
#ifdef DEBUG_SHM
fprintf(stderr, "Read offset %d from %p\n", p->offset, &p->offset);
@@ -710,7 +683,7 @@
}
-static void usage( )
+static void usage()
{
fputs(
"usage: cdda2wav [OPTIONS ...] [trackfilenames ...]\n\
@@ -878,9 +851,7 @@
#if !defined (HAVE_STRCASECMP) || (HAVE_STRCASECMP != 1)
#include <ctype.h>
static int strcasecmp __PR(( const char *s1, const char *s2 ));
-static int strcasecmp(s1, s2)
- const char *s1;
- const char *s2;
+static int strcasecmp(const char *s1, const char *s2)
{
if (s1 && s2) {
while (*s1 && *s2 && (tolower(*s1) - tolower(*s2) == 0)) {
@@ -896,8 +867,7 @@
}
#endif
-static int is_fifo(filename)
- char * filename;
+static int is_fifo(char *filename)
{
#if defined S_ISFIFO
struct stat statstruct;
@@ -921,10 +891,7 @@
#if !defined (HAVE_STRTOUL) || (HAVE_STRTOUL != 1)
static unsigned int strtoul __PR(( const char *s1, char **s2, int base ));
-static unsigned int strtoul(s1, s2, base)
- const char *s1;
- char **s2;
- int base;
+static unsigned int strtoul(const char *s1, char **s2, int base)
{
long retval;
@@ -956,8 +923,7 @@
#include <sys/priocntl.h>
#include <sys/rtpriocntl.h>
-static void
-switch_to_realtime_priority()
+static void switch_to_realtime_priority()
{
pcinfo_t info;
pcparms_t param;
@@ -997,8 +963,7 @@
#ifdef USE_POSIX_PRIORITY_SCHEDULING
#include <sched.h>
-static void
-switch_to_realtime_priority()
+static void switch_to_realtime_priority()
{
#ifdef _SC_PRIORITY_SCHEDULING
if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) {
@@ -1046,8 +1011,7 @@
#undef format
#undef interface
-static void
-switch_to_realtime_priority()
+static void switch_to_realtime_priority()
{
/* set priority class */
if (FALSE == SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS)) {
@@ -1061,8 +1025,7 @@
}
}
#else
-static void
-switch_to_realtime_priority()
+static void switch_to_realtime_priority()
{
}
#endif
@@ -1072,9 +1035,7 @@
/* SCSI cleanup */
int on_exitscsi __PR((void *status));
-int
-on_exitscsi(status)
- void *status;
+int on_exitscsi(void *status)
{
exit((int)status);
return 0;
@@ -1083,8 +1044,7 @@
/* wrapper for signal handler exit needed for Mac-OS-X */
static void exit_wrapper __PR((int status));
-static void exit_wrapper(status)
- int status;
+static void exit_wrapper(int status)
{
#if defined DEBUG_CLEANUP
fprintf( stderr, "Exit(%d) for %s\n", status, child_pid == 0 ? "Child" : "Parent");
@@ -1108,8 +1068,7 @@
static void set_nonforked __PR((int status));
/* ARGSUSED */
-static void set_nonforked(status)
- int status;
+static void set_nonforked(int status)
{
global.parent_died = 1;
#if defined DEBUG_CLEANUP
@@ -1190,9 +1149,7 @@
static void paranoia_callback __PR((long inpos, int function));
-static void paranoia_callback(inpos, function)
- long inpos;
- int function;
+static void paranoia_callback(long inpos, int function)
{
struct timeval thistime;
long test;
@@ -1348,9 +1305,7 @@
#define PERCENTAGE_PER_TRACK
static int do_read __PR((myringbuff *p, unsigned *total_unsuccessful_retries));
-static int do_read (p, total_unsuccessful_retries)
- myringbuff *p;
- unsigned *total_unsuccessful_retries;
+static int do_read(myringbuff *p, unsigned *total_unsuccessful_retries)
{
unsigned char *newbuf;
int offset;
@@ -1534,10 +1489,7 @@
static void
print_percentage __PR((unsigned *poper, int c_offset));
-static void
-print_percentage(poper, c_offset)
- unsigned *poper;
- int c_offset;
+static void print_percentage(unsigned *poper, int c_offset)
{
unsigned per;
#ifdef PERCENTAGE_PER_TRACK
@@ -1570,8 +1522,7 @@
}
static unsigned long do_write __PR((myringbuff *p));
-static unsigned long do_write (p)
- myringbuff *p;
+static unsigned long do_write(myringbuff *p)
{
int current_offset;
unsigned int InSamples;
@@ -1807,8 +1758,7 @@
/* This function does all audio cdrom reads
* until there is nothing more to do
*/
-static void
-forked_read()
+static void forked_read()
{
unsigned total_unsuccessful_retries = 0;
@@ -1834,8 +1784,7 @@
static void forked_write __PR((void));
-static void
-forked_write()
+static void forked_write()
{
/* don't need these anymore. Good security policy says we get rid
@@ -1869,8 +1818,7 @@
*/
static void nonforked_loop __PR((void));
-static void
-nonforked_loop()
+static void nonforked_loop()
{
unsigned total_unsuccessful_retries = 0;
@@ -1929,10 +1877,7 @@
int
handle_verbose_opts __PR((char *optstr, long *flagp));
-int
-handle_verbose_opts(optstr, flagp)
- char *optstr;
- long *flagp;
+int handle_verbose_opts(char *optstr, long *flagp)
{
char *ep;
char *np;
@@ -2001,10 +1946,7 @@
int
handle_paranoia_opts __PR((char *optstr, long *flagp));
-int
-handle_paranoia_opts(optstr, flagp)
- char *optstr;
- long *flagp;
+int handle_paranoia_opts(char *optstr, long *flagp)
{
#ifdef USE_PARANOIA
char *ep;
@@ -2081,9 +2023,7 @@
/* and finally: the MAIN program */
-int main( argc, argv )
- int argc;
- char *argv [];
+int main(int argc, char *argv[])
{
long lSector_p1;
long sector_offset = 0;
Modified: nonameyet/branches/cleanup/cdda2wav/interface.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/interface.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/interface.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -99,9 +99,9 @@
int trackindex_disp = 0;
-EXPORT void priv_init __PR((void));
-EXPORT void priv_on __PR((void));
-EXPORT void priv_off __PR((void));
+void priv_init __PR((void));
+void priv_on __PR((void));
+void priv_off __PR((void));
void (*EnableCdda) __PR((SCSI *, int Switch, unsigned uSectorsize));
unsigned (*doReadToc) __PR(( SCSI *scgp ));
@@ -175,10 +175,8 @@
static void trash_cache_SCSI __PR((UINT4 *p, unsigned lSector, unsigned SectorBurstVal));
-static void trash_cache_SCSI(p, lSector, SectorBurstVal)
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static void
+trash_cache_SCSI(UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
/* trash the cache */
ReadCdRom(get_scsi_p(), p, find_an_off_sector(lSector, SectorBurstVal), min(global.nsectors,6));
@@ -420,8 +418,7 @@
* device, issue an inquiry. If they both succeed, there's a good
* chance that the device works... */
#if defined(__linux__)
-static int check_linux_scsi_interface(pdev_name)
- char *pdev_name;
+static int check_linux_scsi_interface(char *pdev_name)
{
SCSI *dev = NULL;
unsigned char *p = NULL;
@@ -447,9 +444,7 @@
adjust nsectors, overlap, and interface for the first time here.
Any unnecessary privileges (setuid, setgid) are also dropped here.
*/
-static void Check_interface_for_device( statstruct, pdev_name)
- struct stat *statstruct;
- char *pdev_name;
+static void Check_interface_for_device(struct stat *statstruct, char *pdev_name)
{
int is_scsi = 1;
@@ -569,8 +564,7 @@
}
/* open the cdrom device */
-static int OpenCdRom ( pdev_name )
- char *pdev_name;
+static int OpenCdRom(char *pdev_name)
{
int retval = 0;
struct stat fstatstruct;
@@ -721,11 +715,8 @@
* to Buffer '*p' beginning at sector 'lSector'
*/
static int ReadCdRom_sim __PR(( SCSI *x, UINT4 *p, unsigned lSector, unsigned SectorBurstVal));
-static int ReadCdRom_sim (x, p, lSector, SectorBurstVal )
- SCSI *x;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static int
+ReadCdRom_sim(SCSI *x, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
unsigned int loop=0;
Int16_t *q = (Int16_t *) p;
@@ -761,10 +752,7 @@
}
static int Play_at_sim __PR(( SCSI *x, unsigned int from_sector, unsigned int sectors));
-static int Play_at_sim( x, from_sector, sectors)
- SCSI *x;
- unsigned int from_sector;
- unsigned int sectors;
+static int Play_at_sim(SCSI *x, unsigned int from_sector, unsigned int sectors)
{
sim_pos = from_sector*CD_FRAMESAMPLES;
return 0;
@@ -775,7 +763,7 @@
/* read the table of contents (toc) via the ioctl interface */
static unsigned ReadToc_sim __PR(( SCSI *x, TOC *toc));
-static unsigned ReadToc_sim ( x, toc )
+static unsigned ReadToc_sim(SCSI *x, TOC *toc)
SCSI *x;
TOC *toc;
{
@@ -868,10 +856,8 @@
/* request sub-q-channel information. This function may cause confusion
* for a drive, when called in the sampling process.
*/
-static subq_chnl *ReadSubQ_sim ( scgp, sq_format, track )
- SCSI *scgp;
- unsigned char sq_format;
- unsigned char track;
+static subq_chnl *
+ReadSubQ_sim(SCSI *scgp, unsigned char sq_format, unsigned char track)
{
subq_chnl *SQp = (subq_chnl *) (SubQbuffer);
subq_position *SQPp = (subq_position *) &SQp->data;
@@ -903,19 +889,14 @@
static void SelectSpeed_sim __PR(( SCSI *x, unsigned sp));
/* ARGSUSED */
-static void SelectSpeed_sim(x, sp)
- SCSI *x;
- unsigned sp;
+static void SelectSpeed_sim(SCSI *x, unsigned sp)
{
}
static void trash_cache_sim __PR((UINT4 *p, unsigned lSector, unsigned SectorBurstVal));
/* ARGSUSED */
-static void trash_cache_sim(p, lSector, SectorBurstVal)
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static void trash_cache_sim(UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
}
@@ -1019,7 +1000,7 @@
#include <priv.h>
#endif
-EXPORT void
+void
priv_init()
{
#ifdef HAVE_PRIV_SET
@@ -1037,7 +1018,7 @@
#endif
}
-EXPORT void
+void
priv_on()
{
#ifdef HAVE_PRIV_SET
@@ -1052,7 +1033,7 @@
#endif
}
-EXPORT void
+void
priv_off()
{
#ifdef HAVE_PRIV_SET
Modified: nonameyet/branches/cleanup/cdda2wav/interface.h
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/interface.h 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/interface.h 2006-09-11 07:17:29 UTC (rev 248)
@@ -126,6 +126,6 @@
void SetupInterface __PR(( void ));
int Toshiba3401 __PR(( void ));
-EXPORT void priv_init __PR((void));
-EXPORT void priv_on __PR((void));
-EXPORT void priv_off __PR((void));
+void priv_init __PR((void));
+void priv_on __PR((void));
+void priv_off __PR((void));
Modified: nonameyet/branches/cleanup/cdda2wav/ioctl.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/ioctl.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/ioctl.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -83,10 +83,7 @@
static void EnableCdda_cooked __PR((SCSI *scgp, int fAudioMode, unsigned uSectorsize));
/* ARGSUSED */
-static void EnableCdda_cooked (scgp, fAudioMode, uSectorsize)
- SCSI *scgp;
- int fAudioMode;
- unsigned uSectorsize;
+static void EnableCdda_cooked(SCSI *scgp, int fAudioMode, unsigned uSectorsize)
{
#if (defined(__FreeBSD__) && __FreeBSD_version >= 400014) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
if (scgp && scgp->verbose)
@@ -118,8 +115,7 @@
static unsigned ReadToc_cooked __PR(( SCSI *x ));
/* read the table of contents (toc) via the ioctl interface */
-static unsigned ReadToc_cooked ( x )
- SCSI *x;
+static unsigned ReadToc_cooked(SCSI *x)
{
unsigned i;
unsigned tracks;
@@ -217,10 +213,8 @@
static void trash_cache_cooked __PR((UINT4 *p, unsigned lSector, unsigned SectorBurstVal));
-static void trash_cache_cooked(p, lSector, SectorBurstVal)
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static void trash_cache_cooked(UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
/* trash the cache */
@@ -265,11 +259,8 @@
/* read 'SectorBurst' adjacent sectors of data sectors
* to Buffer '*p' beginning at sector 'lSector'
*/
-static void ReadCdRomData_cooked (x, p, lSector, SectorBurstVal )
- SCSI *x;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static void ReadCdRomData_cooked(SCSI *x, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
int retval;
@@ -289,11 +280,8 @@
/* read 'SectorBurst' adjacent sectors of audio sectors
* to Buffer '*p' beginning at sector 'lSector'
*/
-static int ReadCdRom_cooked (x, p, lSector, SectorBurstVal )
- SCSI *x;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+static int ReadCdRom_cooked(SCSI *x, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
int retry_count=0;
static int nothing_read = 1;
@@ -381,8 +369,7 @@
}
static int StopPlay_cooked __PR(( SCSI *x));
-static int StopPlay_cooked( x )
- SCSI *x;
+static int StopPlay_cooked(SCSI *x)
{
if (x && x->verbose) {
fprintf(stderr, "StopPlay_cooked (CDROMSTOP)...\n");
@@ -392,10 +379,8 @@
}
static int Play_at_cooked __PR(( SCSI *x, unsigned int from_sector, unsigned int sectors));
-static int Play_at_cooked( x, from_sector, sectors)
- SCSI *x;
- unsigned int from_sector;
- unsigned int sectors;
+static int Play_at_cooked(SCSI *x, unsigned int from_sector,
+ unsigned int sectors)
{
struct cdrom_msf cmsf;
int retval;
@@ -432,10 +417,7 @@
/* request sub-q-channel information. This function may cause confusion
* for a drive, when called in the sampling process.
*/
-static subq_chnl *ReadSubQ_cooked ( x, sq_format, track )
- SCSI *x;
- unsigned char sq_format;
- unsigned char track;
+static subq_chnl *ReadSubQ_cooked(SCSI *x, unsigned char sq_format, unsigned char track)
#endif
{
struct cdrom_subchnl sub_ch;
@@ -520,9 +502,7 @@
/* Speed control */
static void SpeedSelect_cooked __PR(( SCSI *x, unsigned speed));
/* ARGSUSED */
-static void SpeedSelect_cooked( x, speed )
- SCSI *x;
- unsigned speed;
+static void SpeedSelect_cooked(SCSI *x, unsigned speed)
{
if (x && x->verbose) {
fprintf(stderr, "SpeedSelect_cooked (CDROM_SELECT_SPEED)...\n");
@@ -545,8 +525,7 @@
}
/* set function pointers to use the ioctl routines */
-void SetupCookedIoctl( pdev_name )
- char *pdev_name;
+void SetupCookedIoctl(char *pdev_name)
{
#if (HAVE_ST_RDEV == 1)
struct stat statstruct;
Modified: nonameyet/branches/cleanup/cdda2wav/md5c.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/md5c.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/md5c.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -115,8 +115,7 @@
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
-void MD5Init (context)
-MD5_CTX *context; /* context */
+void MD5Init (MD5_CTX *context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
@@ -131,10 +130,7 @@
operation, processing another message block, and updating the
context.
*/
-void MD5Update (context, input, inputLen)
-MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
+void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
{
unsigned int i, indx, partLen;
@@ -173,9 +169,7 @@
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
-void MD5Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD5_CTX *context; /* context */
+void MD5Final(unsigned char digest[16], MD5_CTX *context)
{
unsigned char bits[8];
unsigned int indx, padLen;
@@ -201,9 +195,7 @@
/* MD5 basic transformation. Transforms state based on block.
*/
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+static void MD5Transform(UINT4 state[4], unsigned char block[64])
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@@ -294,10 +286,7 @@
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
{
unsigned int i, j;
@@ -312,10 +301,7 @@
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
-static void Decode (output, input, len)
-UINT4 *output;
-unsigned char *input;
-unsigned int len;
+static void Decode(UINT4 *output, unsigned char *input, unsigned int len)
{
unsigned int i, j;
@@ -327,10 +313,7 @@
/* Note: Replace "for loop" with standard memcpy if possible.
*/
-static void MD5_memcpy (output, input, len)
-POINTER output;
-POINTER input;
-unsigned int len;
+static void MD5_memcpy(POINTER output, POINTER input, unsigned int len)
{
unsigned int i;
@@ -340,10 +323,7 @@
/* Note: Replace "for loop" with standard memset if possible.
*/
-static void MD5_memset (output, value, len)
-POINTER output;
-int value;
-unsigned int len;
+static void MD5_memset(POINTER output, int value, unsigned int len)
{
unsigned int i;
Modified: nonameyet/branches/cleanup/cdda2wav/raw.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/raw.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/raw.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -43,8 +43,7 @@
static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo ));
-static unsigned long InSizeToOutSize ( BytesToDo )
- unsigned long BytesToDo;
+static unsigned long InSizeToOutSize(unsigned long BytesToDo)
{
return BytesToDo;
}
Modified: nonameyet/branches/cleanup/cdda2wav/resample.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/resample.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/resample.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -84,12 +84,8 @@
static void
check_mem __PR((const unsigned char *p, unsigned long amount, const unsigned char *q, unsigned line, char *file));
-static void check_mem(p, amount, q, line, file)
- const unsigned char *p;
- unsigned long amount;
- const unsigned char *q;
- unsigned line;
- char *file;
+static void check_mem(const unsigned char *p, unsigned long amount,
+ const unsigned char *q, unsigned line, char *file)
{
if (p < q || p+amount > q + ENTRY_SIZE) {
fprintf(stderr, "file %s, line %u: invalid buffer range (%p - %p), allowed is (%p - %p)\n",
@@ -108,11 +104,8 @@
#endif
static const unsigned char *
-my_symmemmem (HAYSTACK, HAYSTACK_LEN, NEEDLE, NEEDLE_LEN)
- const unsigned char * HAYSTACK;
- const size_t HAYSTACK_LEN;
- const unsigned char * const NEEDLE;
- const size_t NEEDLE_LEN;
+my_symmemmem(const unsigned char *HAYSTACK, const size_t HAYSTACK_LEN,
+ const unsigned char * const NEEDLE, const size_t NEEDLE_LEN)
{
const unsigned char * const UPPER_LIMIT = HAYSTACK + HAYSTACK_LEN - NEEDLE_LEN - 1;
const unsigned char * HAYSTACK2 = HAYSTACK-1;
@@ -139,11 +132,8 @@
}
static const unsigned char *
-my_memmem (HAYSTACK, HAYSTACK_LEN, NEEDLE, NEEDLE_LEN)
- const unsigned char * HAYSTACK;
- const size_t HAYSTACK_LEN;
- const unsigned char * const NEEDLE;
- const size_t NEEDLE_LEN;
+my_memmem(const unsigned char *HAYSTACK, const size_t HAYSTACK_LEN,
+ const unsigned char * const NEEDLE, const size_t NEEDLE_LEN)
{
const unsigned char * const UPPER_LIMIT = HAYSTACK + HAYSTACK_LEN - NEEDLE_LEN;
@@ -165,11 +155,8 @@
}
static const unsigned char *
-my_memrmem (HAYSTACK, HAYSTACK_LEN, NEEDLE, NEEDLE_LEN)
- const unsigned char * HAYSTACK;
- const size_t HAYSTACK_LEN;
- const unsigned char * const NEEDLE;
- const size_t NEEDLE_LEN;
+my_memrmem(const unsigned char *HAYSTACK, const size_t HAYSTACK_LEN,
+ const unsigned char * const NEEDLE, const size_t NEEDLE_LEN)
{
const unsigned char * const LOWER_LIMIT = HAYSTACK - (HAYSTACK_LEN - 1);
@@ -192,8 +179,7 @@
/* find continuation in new buffer */
static const unsigned char *
-sync_buffers(newbuf)
- const unsigned char * const newbuf;
+sync_buffers(const unsigned char * const newbuf)
{
const unsigned char *retval = newbuf;
@@ -272,10 +258,7 @@
/* quadratic interpolation
* p1, p3 span the interval 0 - 2. give interpolated value for 1/2 */
static long int
-interpolate( p1, p2, p3)
- long int p1;
- long int p2;
- long int p3;
+interpolate(long int p1, long int p2, long int p3)
{
return (3L*p1 + 6L*p2 - p3)/8L;
}
@@ -286,10 +269,7 @@
* Write the filtered sample into the output buffer.
*/
static void
-emit_sample( lsumval, rsumval, channels )
- long lsumval;
- long rsumval;
- long channels;
+emit_sample(long lsumval, long rsumval, long channels)
{
if (global.findminmax) {
if (rsumval > global.maxamp[0]) global.maxamp[0] = rsumval;
@@ -369,9 +349,7 @@
}
}
-static void change_endianness(pSam, Samples)
- UINT4 *pSam;
- unsigned int Samples;
+static void change_endianness(UINT4 *pSam, unsigned int Samples)
{
UINT4 *pend = (pSam + Samples);
@@ -432,9 +410,7 @@
#endif
}
-static void swap_channels(pSam, Samples)
- UINT4 *pSam;
- unsigned int Samples;
+static void swap_channels(UINT4 *pSam, unsigned int Samples)
{
UINT4 *pend = (pSam + Samples);
@@ -497,11 +473,8 @@
#ifdef ECHO_TO_SOUNDCARD
static long ReSampleBuffer __PR((unsigned char *p, unsigned char *newp, long samples, int samplesize));
-static long ReSampleBuffer( p, newp, samples, samplesize)
- unsigned char *p;
- unsigned char *newp;
- long samples;
- int samplesize;
+static long ReSampleBuffer(unsigned char *p, unsigned char *newp,
+ long samples, int samplesize)
{
double idx=0.0;
UINT4 di=0,si=0;
@@ -519,10 +492,7 @@
}
#endif
-static int guess_endianess(p, p2, SamplesToDo)
- UINT4 *p;
- Int16_t *p2;
- unsigned SamplesToDo;
+static int guess_endianess(UINT4 *p, Int16_t *p2, unsigned SamplesToDo)
{
/* analyse samples */
int vote_for_little = 0;
@@ -573,9 +543,7 @@
int jitterShift = 0;
-void handle_inputendianess(p, SamplesToDo)
- UINT4 *p;
- unsigned SamplesToDo;
+void handle_inputendianess(UINT4 *p, unsigned SamplesToDo)
{
/* if endianess is unknown, guess endianess based on
differences between succesive samples. If endianess
@@ -626,10 +594,8 @@
}
}
-unsigned char *synchronize(p, SamplesToDo, TotSamplesDone)
- UINT4 *p;
- unsigned SamplesToDo;
- unsigned TotSamplesDone;
+unsigned char *
+synchronize(UINT4 *p, unsigned SamplesToDo, unsigned TotSamplesDone)
{
static int jitter = 0;
char *pSrc; /* start of cdrom buffer */
@@ -664,10 +630,7 @@
*
*/
long
-SaveBuffer (p, SamplesToDo, TotSamplesDone)
- UINT4 *p;
- unsigned long SamplesToDo;
- unsigned long *TotSamplesDone;
+SaveBuffer(UINT4 *p, unsigned long SamplesToDo, unsigned long *TotSamplesDone)
{
UINT4 *pSrc; /* start of cdrom buffer */
UINT4 *pSrcStop; /* end of cdrom buffer */
Modified: nonameyet/branches/cleanup/cdda2wav/ringbuff.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/ringbuff.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/ringbuff.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -62,9 +62,7 @@
#define occupied_buffers() (defined_buffers())
/* ARGSUSED */
-void set_total_buffers(num_buffers, mysem_id)
- unsigned int num_buffers;
- int mysem_id;
+void set_total_buffers(unsigned int num_buffers, int mysem_id)
{
#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES)
union my_semun mysemun;
Modified: nonameyet/branches/cleanup/cdda2wav/scsi_cmds.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/scsi_cmds.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/scsi_cmds.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -61,8 +61,7 @@
static unsigned ReadFullTOCMMC __PR(( SCSI *scgp ));
-int SCSI_emulated_ATAPI_on(scgp)
- SCSI *scgp;
+int SCSI_emulated_ATAPI_on(SCSI *scgp)
{
/* return is_atapi;*/
if (scg_isatapi(scgp) > 0)
@@ -72,8 +71,7 @@
return (allow_atapi(scgp, TRUE));
}
-int heiko_mmc(scgp)
- SCSI *scgp;
+int heiko_mmc(SCSI *scgp)
{
unsigned char mode[0x100];
int was_atapi;
@@ -107,11 +105,8 @@
/* get current sector size from SCSI cdrom drive */
unsigned int
-get_orig_sectorsize(scgp, m4, m10, m11)
- SCSI *scgp;
- unsigned char *m4;
- unsigned char *m10;
- unsigned char *m11;
+get_orig_sectorsize(SCSI *scgp, unsigned char *m4, unsigned char *m10,
+ unsigned char *m11)
{
/* first get current values for density, etc. */
@@ -153,9 +148,7 @@
/* switch CDROM scsi drives to given sector size */
-int set_sectorsize (scgp, secsize)
- SCSI *scgp;
- unsigned int secsize;
+int set_sectorsize(SCSI *scgp, unsigned int secsize)
{
static unsigned char mode [4 + 8];
int retval;
@@ -184,10 +177,7 @@
/* switch Toshiba/DEC and HP drives from/to cdda density */
-void EnableCddaModeSelect (scgp, fAudioMode, uSectorsize)
- SCSI *scgp;
- int fAudioMode;
- unsigned uSectorsize;
+void EnableCddaModeSelect(SCSI *scgp, int fAudioMode, unsigned uSectorsize)
{
/* reserved, Medium type=0, Dev spec Parm = 0, block descriptor len 0 oder 8,
Density (cd format)
@@ -237,8 +227,7 @@
/* read CD Text information from the table of contents */
-void ReadTocTextSCSIMMC ( scgp )
- SCSI *scgp;
+void ReadTocTextSCSIMMC(SCSI *scgp)
{
short datalength;
@@ -320,8 +309,7 @@
}
/* read the full TOC */
-static unsigned ReadFullTOCSony ( scgp )
- SCSI *scgp;
+static unsigned ReadFullTOCSony(SCSI *scgp)
{
/* READTOC, MSF, format, res, res, res, Start track/session, len msb,
len lsb, control */
@@ -372,8 +360,7 @@
#ifdef WARN_FULLTOC
static unsigned lba __PR((struct msf_address *ad));
-static unsigned lba(ad)
- struct msf_address *ad;
+static unsigned lba(struct msf_address *ad)
{
return ad->mins*60*75 + ad->secs*75 + ad->frame;
}
@@ -381,8 +368,7 @@
static unsigned dvd_lba __PR((struct zmsf_address *ad));
-static unsigned dvd_lba(ad)
- struct zmsf_address *ad;
+static unsigned dvd_lba(struct zmsf_address *ad)
{
return ad->zero*1053696 + ad->mins*60*75 + ad->secs*75 + ad->frame;
}
@@ -408,10 +394,8 @@
static unsigned collect_tracks __PR((struct outer *po, unsigned entries, BOOL bcd_flag));
-static unsigned collect_tracks(po, entries, bcd_flag)
- struct outer *po;
- unsigned entries;
- BOOL bcd_flag;
+static unsigned collect_tracks(struct outer *po, unsigned entries,
+ BOOL bcd_flag)
{
unsigned tracks = 0;
int i;
@@ -713,8 +697,7 @@
}
/* read the table of contents from the cd and fill the TOC array */
-unsigned ReadTocSony ( scgp )
- SCSI *scgp;
+unsigned ReadTocSony(SCSI *scgp)
{
unsigned tracks = 0;
unsigned return_length;
@@ -736,8 +719,7 @@
}
/* read the start of the lead-out from the first session TOC */
-unsigned ReadFirstSessionTOCSony ( scgp )
- SCSI *scgp;
+unsigned ReadFirstSessionTOCSony(SCSI *scgp)
{
unsigned return_length;
@@ -772,8 +754,7 @@
}
/* read the full TOC */
-static unsigned ReadFullTOCMMC ( scgp )
- SCSI *scgp;
+static unsigned ReadFullTOCMMC(SCSI *scgp)
{
/* READTOC, MSF, format, res, res, res, Start track/session, len msb,
@@ -813,8 +794,7 @@
}
/* read the start of the lead-out from the first session TOC */
-unsigned ReadFirstSessionTOCMMC ( scgp )
- SCSI *scgp;
+unsigned ReadFirstSessionTOCMMC(SCSI *scgp)
{
unsigned off;
unsigned return_length;
@@ -838,8 +818,7 @@
}
/* read the table of contents from the cd and fill the TOC array */
-unsigned ReadTocMMC ( scgp )
- SCSI *scgp;
+unsigned ReadTocMMC(SCSI *scgp)
{
unsigned tracks = 0;
unsigned return_length;
@@ -855,8 +834,7 @@
}
/* read the table of contents from the cd and fill the TOC array */
-unsigned ReadTocSCSI ( scgp )
- SCSI *scgp;
+unsigned ReadTocSCSI(SCSI *scgp)
{
unsigned tracks;
int result;
@@ -982,12 +960,9 @@
via standard SCSI-2 Read(10) command */
static int ReadStandardLowlevel __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal, unsigned secsize ));
-static int ReadStandardLowlevel (scgp, p, lSector, SectorBurstVal, secsize )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
- unsigned secsize;
+static int
+ReadStandardLowlevel(SCSI *scgp, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal, unsigned secsize)
{
/* READ10, flags, block1 msb, block2, block3, block4 lsb, reserved,
transfer len msb, transfer len lsb, block addressing mode */
@@ -1015,31 +990,21 @@
}
-int ReadStandard (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int
+ReadStandard(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
return ReadStandardLowlevel(scgp, p, lSector, SectorBurstVal, CD_FRAMESIZE_RAW);
}
-int ReadStandardData (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int
+ReadStandardData(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
return ReadStandardLowlevel(scgp, p, lSector, SectorBurstVal, CD_FRAMESIZE);
}
/* Read max. SectorBurst of cdda sectors to buffer
via vendor-specific ReadCdda(10) command */
-int ReadCdda10 (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCdda10(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
/* READ10, flags, block1 msb, block2, block3, block4 lsb, reserved,
transfer len msb, transfer len lsb, block addressing mode */
@@ -1069,11 +1034,7 @@
/* Read max. SectorBurst of cdda sectors to buffer
via vendor-specific ReadCdda(12) command */
-int ReadCdda12 (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCdda12(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1106,11 +1067,8 @@
> normal and the number of sectors is coded in Byte 8 and 9 (begining with 0).
*/
-int ReadCdda12Matsushita (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCdda12Matsushita(SCSI *scgp, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1138,11 +1096,8 @@
/* Read max. SectorBurst of cdda sectors to buffer
via MMC standard READ CD command */
-int ReadCddaMMC12 (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCddaMMC12(SCSI *scgp, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
register struct scg_cmd *scmd;
scmd = scgp->scmd;
@@ -1170,11 +1125,8 @@
return SectorBurstVal - scg_getresid(scgp)/CD_FRAMESIZE_RAW;
}
-int ReadCddaFallbackMMC (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCddaFallbackMMC(SCSI *scgp, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
static int ReadCdda12_unknown = 0;
int retval = -999;
@@ -1202,10 +1154,8 @@
#ifdef PROTOTYPES
static subq_chnl *ReadSubQFallback (SCSI *scgp, unsigned char sq_format, unsigned char track)
#else
-static subq_chnl *ReadSubQFallback ( scgp, sq_format, track )
- SCSI *scgp;
- unsigned char sq_format;
- unsigned char track;
+static subq_chnl *
+ReadSubQFallback(SCSI *scgp, unsigned char sq_format, unsigned char track)
#endif
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1250,10 +1200,8 @@
#ifdef PROTOTYPES
subq_chnl *ReadSubQSCSI (SCSI *scgp, unsigned char sq_format, unsigned char track)
#else
-subq_chnl *ReadSubQSCSI ( scgp, sq_format, track )
- SCSI *scgp;
- unsigned char sq_format;
- unsigned char track;
+subq_chnl *
+ReadSubQSCSI(SCSI *scgp, unsigned char sq_format, unsigned char track)
#endif
{
int resp_size;
@@ -1307,8 +1255,7 @@
static subq_chnl sc;
static subq_chnl* fill_subchannel __PR((unsigned char bufferwithQ[]));
-static subq_chnl* fill_subchannel(bufferwithQ)
- unsigned char bufferwithQ[];
+static subq_chnl* fill_subchannel(unsigned char bufferwithQ[])
{
sc.subq_length = 0;
sc.control_adr = bufferwithQ[CD_FRAMESIZE_RAW + 0];
@@ -1317,11 +1264,8 @@
return ≻
}
-int ReadCddaSubSony (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int
+ReadCddaSubSony(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1350,11 +1294,8 @@
int ReadCddaSub96Sony __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal ));
-int ReadCddaSub96Sony (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCddaSub96Sony(SCSI *scgp, UINT4 *p, unsigned lSector,
+ unsigned SectorBurstVal)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1381,9 +1322,7 @@
return scg_getresid(scgp) != 0;
}
-subq_chnl *ReadSubChannelsSony(scgp, lSector)
- SCSI *scgp;
- unsigned lSector;
+subq_chnl *ReadSubChannelsSony(SCSI *scgp, unsigned lSector)
{
/*int retval = ReadCddaSub96Sony(scgp, (UINT4 *)bufferTOC, lSector, 1);*/
int retval = ReadCddaSubSony(scgp, (UINT4 *)bufferTOC, lSector, 1);
@@ -1394,11 +1333,7 @@
/* Read max. SectorBurst of cdda sectors to buffer
via MMC standard READ CD command */
-int ReadCddaSubMMC12 (scgp, p, lSector, SectorBurstVal )
- SCSI *scgp;
- UINT4 *p;
- unsigned lSector;
- unsigned SectorBurstVal;
+int ReadCddaSubMMC12(SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)
{
register struct scg_cmd *scmd;
scmd = scgp->scmd;
@@ -1428,9 +1363,7 @@
}
static subq_chnl *ReadSubChannelsMMC __PR((SCSI *scgp, unsigned lSector));
-static subq_chnl *ReadSubChannelsMMC(scgp, lSector)
- SCSI *scgp;
- unsigned lSector;
+static subq_chnl *ReadSubChannelsMMC(SCSI *scgp, unsigned lSector)
{
int retval = ReadCddaSubMMC12(scgp, (UINT4 *)bufferTOC, lSector, 1);
if (retval != 0) return NULL;
@@ -1438,9 +1371,7 @@
return fill_subchannel(bufferTOC);
}
-subq_chnl *ReadSubChannelsFallbackMMC(scgp, lSector)
- SCSI *scgp;
- unsigned lSector;
+subq_chnl *ReadSubChannelsFallbackMMC(SCSI *scgp, unsigned lSector)
{
static int ReadSubSony_unknown = 0;
subq_chnl *retval = NULL;
@@ -1485,9 +1416,7 @@
}
/********* non standardized speed selects ***********************/
-void SpeedSelectSCSIToshiba (scgp, speed)
- SCSI *scgp;
- unsigned speed;
+void SpeedSelectSCSIToshiba(SCSI *scgp, unsigned speed)
{
static unsigned char mode [4 + 3];
unsigned char *page = mode + 4;
@@ -1508,9 +1437,7 @@
scgp->silent--;
}
-void SpeedSelectSCSINEC (scgp, speed)
- SCSI *scgp;
- unsigned speed;
+void SpeedSelectSCSINEC(SCSI *scgp, unsigned speed)
{
static unsigned char mode [4 + 8];
unsigned char *page = mode + 4;
@@ -1544,9 +1471,7 @@
fprintf(stderr ,"speed select NEC failed\n");
}
-void SpeedSelectSCSIPhilipsCDD2600 (scgp, speed)
- SCSI *scgp;
- unsigned speed;
+void SpeedSelectSCSIPhilipsCDD2600(SCSI *scgp, unsigned speed)
{
/* MODE_SELECT, page = SCSI-2 save page disabled, reserved, reserved,
parm list len, flags */
@@ -1567,9 +1492,7 @@
fprintf (stderr, "speed select PhilipsCDD2600 failed\n");
}
-void SpeedSelectSCSISony (scgp, speed)
- SCSI *scgp;
- unsigned speed;
+void SpeedSelectSCSISony(SCSI *scgp, unsigned speed)
{
static unsigned char mode [4 + 4];
unsigned char *page = mode + 4;
@@ -1609,9 +1532,7 @@
fprintf (stderr, "speed select Yamaha failed\n");
}
-void SpeedSelectSCSIMMC (scgp, speed)
- SCSI *scgp;
- unsigned speed;
+void SpeedSelectSCSIMMC(SCSI *scgp, unsigned speed)
{
int spd;
register struct scg_cmd *scmd = scgp->scmd;
@@ -1649,8 +1570,7 @@
}
/* request vendor brand and model */
-unsigned char *Inquiry ( scgp )
- SCSI *scgp;
+unsigned char *Inquiry(SCSI *scgp)
{
static unsigned char *Inqbuffer = NULL;
register struct scg_cmd *scmd = scgp->scmd;
@@ -1697,8 +1617,7 @@
#define NO_MEDIA_SC 0x3a
#define NO_MEDIA_SCQ 0x00
-int TestForMedium ( scgp )
- SCSI *scgp;
+int TestForMedium(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1738,8 +1657,7 @@
}
}
-int StopPlaySCSI ( scgp )
- SCSI *scgp;
+int StopPlaySCSI(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1760,10 +1678,7 @@
return scg_cmd(scgp) >= 0 ? 0 : -1;
}
-int Play_atSCSI ( scgp, from_sector, sectors)
- SCSI *scgp;
- unsigned int from_sector;
- unsigned int sectors;
+int Play_atSCSI(SCSI *scgp, unsigned int from_sector, unsigned int sectors)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1794,9 +1709,7 @@
void init_scsibuf __PR((SCSI *, unsigned));
-void init_scsibuf(scgp, amt)
- SCSI *scgp;
- unsigned amt;
+void init_scsibuf(SCSI *scgp, unsigned amt)
{
if (scsibuffer != NULL) {
fprintf(stderr, "the SCSI transfer buffer has already been allocated!\n");
Modified: nonameyet/branches/cleanup/cdda2wav/semshm.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/semshm.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/semshm.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -113,9 +113,7 @@
int sem_id;
static int seminstall __PR((key_t key, int amount));
-static int seminstall(key, amount)
- key_t key;
- int amount;
+static int seminstall(key_t key, int amount)
{
int ret_val;
int semflag;
@@ -136,9 +134,7 @@
}
/*-----------------------------------------------------------------*/
-int semrequest(semid, semnum)
- int semid;
- int semnum;
+int semrequest(int semid, int semnum)
{
struct sembuf sops[1];
int ret_val;
@@ -163,10 +159,7 @@
}
/*-----------------------------------------------------------------*/
-int semrelease(semid, semnum, amount)
- int semid;
- int semnum;
- int amount;
+int semrelease(int semid, int semnum, int amount)
{
struct sembuf sops[1];
int ret_val;
@@ -219,9 +212,7 @@
close(pipefdc2p[0]);
}
-int semrequest(dummy, semnum)
- int dummy;
- int semnum;
+int semrequest(int dummy, int semnum)
{
if (semnum == FREE_SEM /* 0 */) {
@@ -246,10 +237,7 @@
}
/* ARGSUSED */
-int semrelease(dummy, semnum, amount)
- int dummy;
- int semnum;
- int amount;
+int semrelease(int dummy, int semnum, int amount)
{
if (semnum == FREE_SEM /* 0 */) {
if (*parent_waits == 1) {
@@ -289,9 +277,7 @@
static int shm_request_nommap __PR((int size, unsigned char **memptr));
/* request a shared memory block */
-static int shm_request_nommap(size, memptr)
- int size;
- unsigned char **memptr;
+static int shm_request_nommap(int size, unsigned char **memptr)
{
int ret_val;
int shmflag;
@@ -348,9 +334,7 @@
#ifdef USE_USGSHM
/* request a shared memory block */
-static int shm_request(size, memptr)
- int size;
- unsigned char **memptr;
+static int shm_request(int size, unsigned char **memptr)
{
return shm_request_nommap(size, memptr);
}
@@ -381,9 +365,7 @@
int shm_id;
/* request a shared memory block */
-static int shm_request(size, memptr)
- int size;
- unsigned char **memptr;
+static int shm_request(int size, unsigned char **memptr)
{
int f;
char *addr;
@@ -418,9 +400,7 @@
#ifdef USE_OS2SHM
/* request a shared memory block */
-static int shm_request(size, memptr)
- int size;
- unsigned char **memptr;
+static int shm_request(int size, unsigned char **memptr)
{
char *addr;
@@ -442,9 +422,7 @@
#ifdef USE_BEOS_AREAS
/* request a shared memory block */
-static int shm_request(size, memptr)
- int size;
- unsigned char **memptr;
+static int shm_request(int size, unsigned char **memptr)
{
char *addr;
area_id aid; /* positive id of the mapping */
@@ -471,9 +449,7 @@
}
#endif
-void *request_shm_sem(amount_of_sh_mem, pointer)
- unsigned amount_of_sh_mem;
- unsigned char **pointer;
+void *request_shm_sem(unsigned amount_of_sh_mem, unsigned char **pointer)
{
#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES)
/* install semaphores for double buffer usage */
Modified: nonameyet/branches/cleanup/cdda2wav/setuid.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/setuid.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/setuid.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -85,8 +85,7 @@
int setegid __PR((gid_t guid));
#endif
-void needroot(necessary)
- int necessary;
+void needroot(int necessary)
{
#ifdef DEBUG
fprintf(stderr, "call to needroot (_euid_=%d, uid=%d), current=%d/%d, pid=%d\n",
@@ -215,8 +214,7 @@
/* Temporarily gain group privileges. */
-void needgroup(necessary)
- int necessary;
+void needgroup(int necessary)
{
#ifdef DEBUG
fprintf(stderr, "call to needgroup (egid=%d, gid=%d), current=%d/%d, pid=%d\n",
@@ -322,22 +320,17 @@
}
#if defined (HPUX)
-int seteuid(uid)
- uid_t uid;
+int seteuid(uid_t uid)
{
return setresuid(-1, uid, -1);
}
-int setreuid(uid1, uid2)
- uid_t uid1;
- uid_t uid2;
+int setreuid(uid_t uid1, uid_t uid2)
{
return setresuid(uid2, uid2, uid1 == uid2 ? uid2 : 0);
}
-int setregid(gid1, gid2)
- gid_t gid1;
- gid_t gid2;
+int setregid(gid_t gid1, gid_t gid2)
{
return setresgid(gid2, gid2, gid1 == gid2 ? gid2 : 0);
}
Modified: nonameyet/branches/cleanup/cdda2wav/sha_func.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/sha_func.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/sha_func.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -110,8 +110,7 @@
static void sha_transform __PR((SHA_INFO *sha_info));
-static void sha_transform(sha_info)
- SHA_INFO *sha_info;
+static void sha_transform(SHA_INFO *sha_info)
{
int i;
BYTE *dp;
@@ -227,8 +226,7 @@
void sha_init __PR((SHA_INFO *sha_info));
-void sha_init(sha_info)
- SHA_INFO *sha_info;
+void sha_init(SHA_INFO *sha_info)
{
sha_info->digest[0] = ULONG_C(0x67452301);
sha_info->digest[1] = ULONG_C(0xefcdab89);
@@ -244,10 +242,7 @@
void sha_update __PR((SHA_INFO *sha_info, BYTE *buffer, int count));
-void sha_update(sha_info, buffer, count)
- SHA_INFO *sha_info;
- BYTE *buffer;
- int count;
+void sha_update(SHA_INFO *sha_info, BYTE *buffer, int count)
{
int i;
ULONG clo;
@@ -287,9 +282,7 @@
void sha_final __PR((unsigned char digest[20], SHA_INFO *sha_info));
-void sha_final(digest, sha_info)
- unsigned char digest[20];
- SHA_INFO *sha_info;
+void sha_final(unsigned char digest[20], SHA_INFO *sha_info)
{
int count;
ULONG lo_bit_count, hi_bit_count;
@@ -345,10 +338,7 @@
void sha_stream __PR((unsigned char digest[20], SHA_INFO *sha_info, FILE *fin));
-void sha_stream(digest, sha_info, fin)
- unsigned char digest[20];
- SHA_INFO *sha_info;
- FILE *fin;
+void sha_stream(unsigned char digest[20], SHA_INFO *sha_info, FILE *fin)
{
int i;
BYTE data[BLOCK_SIZE];
@@ -364,8 +354,7 @@
void sha_print __PR((unsigned char digest[20]));
-void sha_print(digest)
- unsigned char digest[20];
+void sha_print(unsigned char digest[20])
{
int i, j;
Modified: nonameyet/branches/cleanup/cdda2wav/sndconfig.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/sndconfig.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/sndconfig.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -84,8 +84,7 @@
static char snd_device[200] = SOUND_DEV;
-int set_snd_device(devicename)
- const char *devicename;
+int set_snd_device(const char *devicename)
{
strncpy(snd_device, devicename, sizeof(snd_device));
return 0;
@@ -99,10 +98,7 @@
static int check_winsound_caps __PR((int bits, double rate, int channels));
-static int check_winsound_caps(bits, rate, channels)
- int bits;
- double rate;
- int channels;
+static int check_winsound_caps(int bits, double rate, int channels)
{
int result = 0;
@@ -155,9 +151,7 @@
audio_buf_info abinfo;
#endif
-int init_soundcard(rate, bits)
- double rate;
- int bits;
+int init_soundcard(double rate, int bits)
{
#ifdef ECHO_TO_SOUNDCARD
if (global.echo) {
@@ -525,9 +519,7 @@
#endif /* ifdef ECHO_TO_SOUNDCARD */
}
-int write_snd_device (buffer, todo)
- char *buffer;
- unsigned todo;
+int write_snd_device(char *buffer, unsigned todo)
{
int result = 0;
#ifdef ECHO_TO_SOUNDCARD
Modified: nonameyet/branches/cleanup/cdda2wav/sun.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/sun.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/sun.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -47,12 +47,9 @@
static int InitSound __PR(( int audio, long channels, unsigned long rate, long nBitsPerSample, unsigned long expected_bytes ));
-static int InitSound ( audio, channels, rate, nBitsPerSample, expected_bytes)
- int audio;
- long channels;
- unsigned long rate;
- long nBitsPerSample;
- unsigned long expected_bytes;
+static int
+InitSound(int audio, long channels, unsigned long rate, long nBitsPerSample,
+ unsigned long expected_bytes)
{
unsigned long format = nBitsPerSample > 8 ? 0x03 : 0x02;
@@ -68,9 +65,7 @@
static int ExitSound __PR(( int audio, unsigned long nBytesDone ));
-static int ExitSound ( audio, nBytesDone )
- int audio;
- unsigned long nBytesDone;
+static int ExitSound(int audio, unsigned long nBytesDone)
{
sunHdr.size = cpu_to_be32(nBytesDone);
@@ -90,8 +85,7 @@
static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo ));
-static unsigned long InSizeToOutSize ( BytesToDo )
- unsigned long BytesToDo;
+static unsigned long InSizeToOutSize(unsigned long BytesToDo)
{
return BytesToDo;
}
Modified: nonameyet/branches/cleanup/cdda2wav/toc.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/toc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/toc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -125,11 +125,7 @@
/* Conversion function: from logical block adresses to minute,second,frame
*/
-int lba_2_msf (lba, m, s, f)
- long lba;
- int *m;
- int *s;
- int *f;
+int lba_2_msf(long lba, int *m, int *s, int *f)
{
#ifdef __follow_redbook__
if (lba >= -150 && lba < 405000) { /* lba <= 404849 */
@@ -152,8 +148,7 @@
}
/* print the track currently read */
-static void UpdateTrackData (p_num)
- int p_num;
+static void UpdateTrackData(int p_num)
{
if (global.quiet == 0) {
fprintf (stderr, "\ntrack: %.2d, ", p_num); fflush(stderr);
@@ -163,8 +158,7 @@
/* print the index currently read */
-static void UpdateIndexData (p_num)
- int p_num;
+static void UpdateIndexData(int p_num)
{
if (global.quiet == 0) {
fprintf (stderr, "index: %.2d\n", p_num); fflush(stderr);
@@ -174,10 +168,7 @@
/* print the time of track currently read */
-static void UpdateTimeData (p_min, p_sec, p_frm)
- int p_min;
- int p_sec;
- int p_frm;
+static void UpdateTimeData(int p_min, int p_sec, int p_frm)
{
if (global.quiet == 0) {
fprintf (stderr, "time: %.2d:%.2d.%.2d\r", p_min, p_sec, p_frm);
@@ -185,8 +176,7 @@
}
}
-void AnalyzeQchannel ( frame )
- unsigned frame;
+void AnalyzeQchannel(unsigned frame)
{
subq_chnl *sub_ch;
@@ -257,9 +247,7 @@
unsigned
find_an_off_sector __PR((unsigned lSector, unsigned SectorBurstVal));
-unsigned find_an_off_sector(lSector, SectorBurstVal)
- unsigned lSector;
- unsigned SectorBurstVal;
+unsigned find_an_off_sector(unsigned lSector, unsigned SectorBurstVal)
{
long track_of_start = Get_Track(lSector);
long track_of_end = Get_Track(lSector + SectorBurstVal -1);
@@ -277,9 +265,9 @@
#endif
-int handle_cdtext __PR(( void ));
+int handle_cdtext __PR(( void ));
-int handle_cdtext ()
+int handle_cdtext()
{
#ifdef CD_TEXT
if (bufferTOC[0] == 0 && bufferTOC[1] == 0) {
@@ -381,8 +369,7 @@
the start of the leadout. If this is not supported, we subtract
a constant of SESSIONSECTORS sectors (found heuristically).
*/
-static unsigned get_end_of_last_audio_track(mult_off)
- unsigned mult_off;
+static unsigned get_end_of_last_audio_track(unsigned mult_off)
{
unsigned retval;
@@ -477,8 +464,7 @@
So the length of the last track in case of Cd-Extra
has to be fixed.
*/
-unsigned FixupTOC(no_tracks)
- unsigned no_tracks;
+unsigned FixupTOC(unsigned no_tracks)
{
unsigned mult_off;
unsigned offset = 0;
@@ -569,8 +555,7 @@
return offset;
}
-static int cddb_sum(n)
- int n;
+static int cddb_sum(int n)
{
int ret;
@@ -684,10 +669,7 @@
static void escape_and_split(FILE *channel, const char *args, ...)
#else
/*VARARGS3*/
-static void escape_and_split(channel, args, va_alist)
- FILE *channel;
- const char *args;
- va_dcl
+static void escape_and_split(FILE *channel, const char *args, va_dcl va_alist)
#endif
{
va_list marker;
@@ -734,8 +716,7 @@
va_end(marker);
}
-static void emit_cddb_form(fname_baseval)
- char *fname_baseval;
+static void emit_cddb_form(char *fname_baseval)
{
static struct iterator i;
unsigned first_audio;
@@ -841,10 +822,7 @@
int readn __PR((register int fd, register char *ptr, register int nbytes));
int writen __PR((register int fd, register char *ptr, register int nbytes));
-int readn(fd, ptr, nbytes)
- register int fd;
- register char *ptr;
- register int nbytes;
+int readn(register int fd, register char *ptr, register int nbytes)
{
int nread;
@@ -863,10 +841,7 @@
return nread;
}
-int writen(fd, ptr, nbytes)
- register int fd;
- register char *ptr;
- register int nbytes;
+int writen(register int fd, register char *ptr, register int nbytes)
{
int nleft, nwritten;
@@ -892,10 +867,7 @@
int
process_cddb_titles __PR((int sock_fd, char *inbuff, int readbytes));
int
-process_cddb_titles(sock_fd, inbuff, readbytes)
- int sock_fd;
- char *inbuff;
- int readbytes;
+process_cddb_titles(int sock_fd, char *inbuff, int readbytes)
{
int finished = 0;
char *p = inbuff;
@@ -1050,9 +1022,7 @@
static int handle_userchoice __PR((char *p, unsigned size));
-static int handle_userchoice(p, size)
- char *p;
- unsigned size;
+static int handle_userchoice(char *p, unsigned size)
{
unsigned nr = 0;
unsigned user_choice;
@@ -1558,9 +1528,7 @@
static char *
ascii2html __PR((unsigned char *inp));
-static char *
-ascii2html(inp)
- unsigned char *inp;
+static char *ascii2html(unsigned char *inp)
{
static unsigned char outline[300];
unsigned char *outp = outline;
@@ -1588,8 +1556,7 @@
}
#undef copy_translation
-static void emit_cdindex_form(fname_baseval)
- char *fname_baseval;
+static void emit_cdindex_form(char *fname_baseval)
{
FILE *cdindex_form;
char fname[200];
@@ -1778,8 +1745,7 @@
-static void dump_extra_info(from)
- unsigned int from;
+static void dump_extra_info(unsigned int from)
{
#ifdef CD_EXTRA
unsigned char *p;
@@ -1816,8 +1782,7 @@
static char *quote __PR((unsigned char *string));
-static char *quote(string)
- unsigned char * string;
+static char *quote(unsigned char *string)
{
static char result[200];
unsigned char *p = (unsigned char *)result;
@@ -1837,8 +1802,7 @@
static void DisplayToc_with_gui __PR(( unsigned long dw ));
-static void DisplayToc_with_gui( dw )
- unsigned long dw;
+static void DisplayToc_with_gui(unsigned long dw)
{
unsigned mins;
unsigned secnds;
@@ -2008,8 +1972,7 @@
static void DisplayToc_no_gui __PR(( unsigned long dw ));
-static void DisplayToc_no_gui( dw )
- unsigned long dw;
+static void DisplayToc_no_gui(unsigned long dw)
{
unsigned mins;
unsigned secnds;
@@ -2256,7 +2219,7 @@
}
}
-void DisplayToc ( )
+void DisplayToc()
{
unsigned long dw;
@@ -2326,8 +2289,7 @@
static void Read_MCN_toshiba __PR(( subq_chnl **sub_ch ));
-static void Read_MCN_toshiba( sub_ch )
- subq_chnl **sub_ch;
+static void Read_MCN_toshiba(subq_chnl **sub_ch)
{
if (Toshiba3401() != 0 && global.quiet == 0
&& ((*sub_ch) != 0
@@ -2429,9 +2391,7 @@
static void Read_ISRC_toshiba __PR(( subq_chnl **sub_ch, unsigned tr ));
-static void Read_ISRC_toshiba( sub_ch, tr )
- subq_chnl **sub_ch;
- unsigned tr;
+static void Read_ISRC_toshiba(subq_chnl **sub_ch, unsigned tr)
{
if (Toshiba3401() != 0) {
int j;
@@ -2454,8 +2414,7 @@
static void Get_Set_ISRC __PR(( unsigned tr ));
-static void Get_Set_ISRC( tr )
- unsigned tr;
+static void Get_Set_ISRC(unsigned tr)
{
subq_chnl *sub_ch;
subq_track_isrc * subq_tr;
@@ -2706,8 +2665,7 @@
static subq_chnl *ReadSubChannel __PR((unsigned sec));
-static subq_chnl *ReadSubChannel(sec)
- unsigned sec;
+static subq_chnl *ReadSubChannel(unsigned sec)
{
subq_chnl *sub_ch;
@@ -2778,8 +2736,7 @@
}
static int ReadSubControl __PR((unsigned sec));
-static int ReadSubControl(sec)
- unsigned sec;
+static int ReadSubControl(unsigned sec)
{
subq_chnl *sub_ch = ReadSubChannel(sec);
if (sub_ch == NULL) return -1;
@@ -2788,8 +2745,7 @@
}
static int HaveSCMS __PR((unsigned StartSector));
-static int HaveSCMS(StartSector)
- unsigned StartSector;
+static int HaveSCMS(unsigned StartSector)
{
int i;
int cr;
@@ -2810,9 +2766,7 @@
/* detect tracks */
}
-static int GetIndexOfSector( sec, track )
- unsigned sec;
- unsigned track;
+static int GetIndexOfSector(unsigned sec, unsigned track)
{
subq_chnl *sub_ch = ReadSubChannel(sec);
if (sub_ch == NULL) {
@@ -2896,11 +2850,8 @@
static int
ScanBackwardFrom __PR((unsigned sec, unsigned limit, int *where, unsigned track));
-static int ScanBackwardFrom(sec, limit, where, track)
- unsigned sec;
- unsigned limit;
- int *where;
- unsigned track;
+static int
+ScanBackwardFrom(unsigned sec, unsigned limit, int *where, unsigned track)
{
unsigned lastindex = 0;
unsigned mysec = sec;
@@ -2967,11 +2918,8 @@
#ifdef USE_LINEAR_SEARCH
static int linear_search __PR((int searchInd, unsigned int Start, unsigned int End, unsigned track));
-static int linear_search(searchInd, Start, End, track)
- int searchInd;
- unsigned Start;
- unsigned End;
- unsigned track;
+static int
+linear_search(int searchInd, unsigned Start, unsigned End, unsigned track)
{
int l = Start;
int r = End;
@@ -2996,11 +2944,8 @@
#ifndef USE_LINEAR_SEARCH
#undef DEBUG_BINSEARCH
static int binary_search __PR((int searchInd, unsigned int Start, unsigned int End, unsigned track));
-static int binary_search(searchInd, Start, End, track)
- int searchInd;
- unsigned Start;
- unsigned End;
- unsigned track;
+static int
+binary_search(int searchInd, unsigned Start, unsigned End, unsigned track)
{
int l = Start;
int r = End;
@@ -3056,9 +3001,7 @@
register_index_position __PR((int IndexOffset, index_list **last_index_entry));
static void
-register_index_position(IndexOffset, last_index_entry)
- int IndexOffset;
- index_list **last_index_entry;
+register_index_position(int IndexOffset, index_list **last_index_entry)
{
index_list *indexentry;
@@ -3085,10 +3028,7 @@
#undef DEBUG_INDLIST
/* experimental code */
/* search for indices (audio mode required) */
-unsigned ScanIndices( track, cd_index, bulk )
- unsigned track;
- unsigned cd_index;
- int bulk;
+unsigned ScanIndices(unsigned track, unsigned cd_index, int bulk)
{
/* scan for indices. */
/* look at last sector of track. */
@@ -3285,8 +3225,7 @@
static unsigned char MCN[14];
-static void Set_MCN( MCN_arg )
- unsigned char *MCN_arg;
+static void Set_MCN(unsigned char *MCN_arg)
{
memcpy(MCN, MCN_arg, 14);
MCN[13] = '\0';
@@ -3302,11 +3241,8 @@
/*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/
-int TOC_entries ( tracks, a, b, binvalid )
- unsigned tracks;
- unsigned char *a;
- unsigned char *b;
- int binvalid;
+int
+TOC_entries(unsigned tracks, unsigned char *a, unsigned char *b, int binvalid)
{
int i;
for (i = 1; i <= (int)tracks; i++) {
@@ -3343,15 +3279,8 @@
return 0;
}
-void toc_entry( nr, flag, tr, ISRC, lba, m, s, f )
- unsigned nr;
- unsigned flag;
- unsigned tr;
- unsigned char *ISRC;
- unsigned long lba;
- int m;
- int s;
- int f;
+void toc_entry(unsigned nr, unsigned flag, unsigned tr, unsigned char *ISRC,
+ unsigned long lba, int m, int s, int f)
{
if (nr > MAXTRK) return;
@@ -3368,16 +3297,13 @@
g_toc[nr].frms = f;
}
-int patch_real_end (sector)
- unsigned long sector;
+int patch_real_end(unsigned long sector)
{
g_toc[cdtracks+1].dwStartSector = sector;
return 0;
}
-static int patch_cd_extra (track, sector)
- unsigned track;
- unsigned long sector;
+static int patch_cd_extra(unsigned track, unsigned long sector)
{
if (track <= cdtracks)
g_toc[track].dwStartSector = sector;
@@ -3398,9 +3324,7 @@
return 0;
}
-static void Set_ISRC ( track, ISRC_arg )
- int track;
- const unsigned char *ISRC_arg;
+static void Set_ISRC(int track, const unsigned char *ISRC_arg)
{
if (track <= (int)cdtracks) {
memcpy(Get_ISRC(track), ISRC_arg, 16);
@@ -3408,77 +3332,67 @@
}
-unsigned char *Get_ISRC ( p_track )
- unsigned long p_track;
+unsigned char *Get_ISRC(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].ISRC;
return NULL;
}
-static void patch_to_audio ( p_track )
- unsigned long p_track;
+static void patch_to_audio(unsigned long p_track)
{
if (p_track <= cdtracks)
g_toc[p_track].bFlags &= ~0x40;
}
-int Get_Flags ( p_track )
- unsigned long p_track;
+int Get_Flags(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].bFlags;
return -1;
}
-int Get_Mins ( p_track )
- unsigned long p_track;
+int Get_Mins(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].mins;
return -1;
}
-int Get_Secs ( p_track )
- unsigned long p_track;
+int Get_Secs(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].secs;
return -1;
}
-int Get_Frames ( p_track )
- unsigned long p_track;
+int Get_Frames(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].frms;
return -1;
}
-int Get_Preemphasis ( p_track )
- unsigned long p_track;
+int Get_Preemphasis(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].bFlags & 0x10;
return -1;
}
-static void Set_SCMS ( p_track )
- unsigned long p_track;
+static void Set_SCMS(unsigned long p_track)
{
g_toc[p_track].SCMS = 1;
}
-int Get_SCMS ( p_track )
- unsigned long p_track;
+int Get_SCMS(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].SCMS;
return -1;
}
-int Get_Copyright ( p_track )
- unsigned long p_track;
+int Get_Copyright(unsigned long p_track)
{
if (p_track <= cdtracks) {
if (g_toc[p_track].SCMS) return 1;
@@ -3487,24 +3401,21 @@
return -1;
}
-int Get_Datatrack ( p_track )
- unsigned long p_track;
+int Get_Datatrack(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].bFlags & 0x40;
return -1;
}
-int Get_Channels ( p_track )
- unsigned long p_track;
+int Get_Channels(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].bFlags & 0x80;
return -1;
}
-int Get_Tracknumber ( p_track )
- unsigned long p_track;
+int Get_Tracknumber(unsigned long p_track)
{
if (p_track <= cdtracks)
return g_toc[p_track].bTrack;
@@ -3513,7 +3424,7 @@
int useHiddenTrack __PR(( void ));
-int useHiddenTrack ()
+int useHiddenTrack()
{
return 0;
}
@@ -3522,8 +3433,7 @@
static void it_reset __PR(( struct iterator *this ));
-static void it_reset( this )
- struct iterator *this;
+static void it_reset(struct iterator *this)
{
this->index = this->startindex;
}
@@ -3532,16 +3442,14 @@
static int it_hasNextTrack __PR(( struct iterator *this ));
static struct TOC *it_getNextTrack __PR(( struct iterator *this ));
-static int it_hasNextTrack( this )
- struct iterator *this;
+static int it_hasNextTrack(struct iterator *this)
{
return this->index <= (int)cdtracks+1;
}
-static struct TOC *it_getNextTrack( this )
- struct iterator *this;
+static struct TOC *it_getNextTrack(struct iterator *this)
{
/* if ( (*this->hasNextTrack)(this) == 0 ) return NULL; */
if ( this->index > (int)cdtracks+1 ) return NULL;
@@ -3550,9 +3458,7 @@
}
-static void InitIterator ( iter, p_track )
- struct iterator *iter;
- unsigned long p_track;
+static void InitIterator(struct iterator *iter, unsigned long p_track)
{
if (iter == NULL) return;
@@ -3577,8 +3483,7 @@
}
#endif
-long Get_AudioStartSector ( p_track )
- unsigned long p_track;
+long Get_AudioStartSector(unsigned long p_track)
{
#if 1
if (p_track == CDROM_LEADOUT)
@@ -3609,8 +3514,7 @@
}
-long Get_StartSector ( p_track )
- unsigned long p_track;
+long Get_StartSector(unsigned long p_track)
{
#if 1
if (p_track == CDROM_LEADOUT)
@@ -3637,8 +3541,7 @@
}
-long Get_EndSector ( p_track )
- unsigned long p_track;
+long Get_EndSector(unsigned long p_track)
{
#if 1
if (p_track <= cdtracks)
@@ -3664,7 +3567,7 @@
return -1;
}
-long FirstTrack ( )
+long FirstTrack()
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3676,7 +3579,7 @@
return -1;
}
-long FirstAudioTrack ( )
+long FirstAudioTrack()
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3694,7 +3597,7 @@
return -1;
}
-long FirstDataTrack ( )
+long FirstDataTrack()
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3709,12 +3612,12 @@
return -1;
}
-long LastTrack ( )
+long LastTrack()
{
return g_toc[cdtracks].bTrack;
}
-long LastAudioTrack ( )
+long LastAudioTrack()
{
long j = -1;
static struct iterator i;
@@ -3730,8 +3633,7 @@
return j;
}
-long Get_LastSectorOnCd( p_track )
- unsigned long p_track;
+long Get_LastSectorOnCd(unsigned long p_track)
{
long LastSec = 0;
static struct iterator i;
@@ -3757,8 +3659,7 @@
return LastSec;
}
-int Get_Track( sector )
- unsigned long sector;
+int Get_Track(unsigned long sector)
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3781,9 +3682,7 @@
return -1;
}
-int CheckTrackrange( from, upto )
- unsigned long from;
- unsigned long upto;
+int CheckTrackrange(unsigned long from, unsigned long upto)
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, from);
@@ -3809,60 +3708,49 @@
#ifdef USE_PARANOIA
long cdda_disc_firstsector __PR((void *d));
-long cdda_disc_firstsector(d)
- void *d;
+long cdda_disc_firstsector(void *d)
{
return Get_StartSector(FirstAudioTrack());
}
int cdda_tracks __PR((void *d));
-int cdda_tracks(d)
- void *d;
+int cdda_tracks(void *d)
{
return LastAudioTrack() - FirstAudioTrack() +1;
}
int cdda_track_audiop __PR((void *d, int track));
-int cdda_track_audiop(d, track)
- void *d;
- int track;
+int cdda_track_audiop(void *d, int track)
{
return Get_Datatrack(track) == 0;
}
long cdda_track_firstsector __PR((void *d, int track));
-long cdda_track_firstsector (d, track)
- void *d;
- int track;
+long cdda_track_firstsector(void *d, int track)
{
return Get_AudioStartSector(track);
}
long cdda_track_lastsector __PR((void *d, int track));
-long cdda_track_lastsector (d, track)
- void *d;
- int track;
+long cdda_track_lastsector(void *d, int track)
{
return Get_EndSector(track);
}
long cdda_disc_lastsector __PR((void *d));
-long cdda_disc_lastsector(d)
- void *d;
+long cdda_disc_lastsector(void *d)
{
return Get_LastSectorOnCd(cdtracks) - 1;
}
int cdda_sector_gettrack __PR((void *d,long sector));
-int cdda_sector_gettrack (d, sector)
- void *d;
- long sector;
+int cdda_sector_gettrack(void *d, long sector)
{
return Get_Track(sector);
}
Modified: nonameyet/branches/cleanup/cdda2wav/wav.c
===================================================================
--- nonameyet/branches/cleanup/cdda2wav/wav.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdda2wav/wav.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -93,12 +93,8 @@
static int _InitSound __PR(( int audio, long channels, unsigned long rate, long nBitsPerSample, unsigned long expected_bytes ));
-static int _InitSound ( audio , channels , rate , nBitsPerSample , expected_bytes )
- int audio;
- long channels;
- unsigned long rate;
- long nBitsPerSample;
- unsigned long expected_bytes;
+static int _InitSound(int audio, long channels, unsigned long rate,
+ long nBitsPerSample, unsigned long expected_bytes)
{
unsigned long nBlockAlign = channels * ((nBitsPerSample + 7) / 8);
unsigned long nAvgBytesPerSec = nBlockAlign * rate;
@@ -123,9 +119,7 @@
static int _ExitSound __PR(( int audio, unsigned long nBytesDone ));
-static int _ExitSound ( audio , nBytesDone )
- int audio;
- unsigned long nBytesDone;
+static int _ExitSound(int audio, unsigned long nBytesDone)
{
unsigned long temp = nBytesDone + sizeof(WAVEHDR) - sizeof(CHUNKHDR);
@@ -141,15 +135,14 @@
static unsigned long _GetHdrSize __PR(( void ));
-static unsigned long _GetHdrSize( )
+static unsigned long _GetHdrSize()
{
return sizeof( waveHdr );
}
static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo ));
-static unsigned long InSizeToOutSize ( BytesToDo )
- unsigned long BytesToDo;
+static unsigned long InSizeToOutSize(unsigned long BytesToDo)
{
return BytesToDo;
}
Modified: nonameyet/branches/cleanup/cdrecord/audiosize.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/audiosize.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/audiosize.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -117,14 +117,13 @@
(((unsigned char *)a)[3] << 24 & 0xFF000000)))
#endif
-EXPORT BOOL is_auname __PR((const char *name));
-EXPORT off_t ausize __PR((int f));
-EXPORT BOOL is_wavname __PR((const char *name));
-EXPORT off_t wavsize __PR((int f));
+BOOL is_auname __PR((const char *name));
+off_t ausize __PR((int f));
+BOOL is_wavname __PR((const char *name));
+off_t wavsize __PR((int f));
-EXPORT BOOL
-is_auname(name)
- const char *name;
+BOOL
+is_auname(const char *name)
{
const char *p;
@@ -136,9 +135,8 @@
/*
* Read Sun audio header, leave file seek pointer past auheader.
*/
-EXPORT off_t
-ausize(f)
- int f;
+off_t
+ausize(int f)
{
sun_au_t hdr;
struct stat sb;
@@ -197,9 +195,8 @@
return ((off_t)ret);
}
-EXPORT BOOL
-is_wavname(name)
- const char *name;
+BOOL
+is_wavname(const char *name)
{
const char *p;
@@ -211,9 +208,8 @@
/*
* Read WAV header, leave file seek pointer past WAV header.
*/
-EXPORT off_t
-wavsize(f)
- int f;
+off_t
+wavsize(int f)
{
chunk_t chunk;
riff_chunk riff;
Modified: nonameyet/branches/cleanup/cdrecord/auinfo.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/auinfo.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/auinfo.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -50,21 +50,19 @@
extern int debug;
extern int xdebug;
-EXPORT BOOL auinfosize __PR((char *name, track_t *trackp));
-EXPORT void auinfo __PR((char *name, int track, track_t *trackp));
-EXPORT textptr_t *gettextptr __PR((int track, track_t *trackp));
-LOCAL char *savestr __PR((char *name));
-LOCAL char *readtag __PR((char *name));
-LOCAL char *readtstr __PR((char *name));
-EXPORT void setmcn __PR((char *mcn, track_t *trackp));
-LOCAL void isrc_illchar __PR((char *isrc, int c));
-EXPORT void setisrc __PR((char *isrc, track_t *trackp));
-EXPORT void setindex __PR((char *tindex, track_t *trackp));
+BOOL auinfosize __PR((char *name, track_t *trackp));
+void auinfo __PR((char *name, int track, track_t *trackp));
+textptr_t *gettextptr __PR((int track, track_t *trackp));
+static char *savestr __PR((char *name));
+static char *readtag __PR((char *name));
+static char *readtstr __PR((char *name));
+void setmcn __PR((char *mcn, track_t *trackp));
+static void isrc_illchar __PR((char *isrc, int c));
+void setisrc __PR((char *isrc, track_t *trackp));
+void setindex __PR((char *tindex, track_t *trackp));
#ifdef XXX
-main(ac, av)
- int ac;
- char *av[];
+int main(int argc, char *argv[])
{
/* auinfo("/etc/default/cdrecord");*/
/* auinfo("/mnt2/CD3/audio_01.inf");*/
@@ -72,10 +70,8 @@
}
#endif
-EXPORT BOOL
-auinfosize(name, trackp)
- char *name;
- track_t *trackp;
+BOOL
+auinfosize(char *name, track_t *trackp)
{
const char *p;
const char *tlp;
@@ -151,11 +147,8 @@
return (TRUE);
}
-EXPORT void
-auinfo(name, track, trackp)
- char *name;
- int track;
- track_t *trackp;
+void
+auinfo(char *name, int track, track_t *trackp)
{
char infname[1024];
char *p;
@@ -312,10 +305,8 @@
}
-EXPORT textptr_t *
-gettextptr(track, trackp)
- int track;
- track_t *trackp;
+textptr_t *
+gettextptr(int track, track_t *trackp)
{
register textptr_t *txp;
@@ -330,9 +321,8 @@
return (txp);
}
-LOCAL char *
-savestr(str)
- char *str;
+static char *
+savestr(char *str)
{
char *ret;
@@ -344,9 +334,8 @@
return (ret);
}
-LOCAL char *
-readtag(name)
- char *name;
+static char *
+readtag(char *name)
{
register char *p;
@@ -360,9 +349,8 @@
return (p);
}
-LOCAL char *
-readtstr(name)
- char *name;
+static char *
+readtstr(char *name)
{
register char *p;
register char *p2;
@@ -384,10 +372,8 @@
/*
* Media catalog number is a 13 digit number.
*/
-EXPORT void
-setmcn(mcn, trackp)
- char *mcn;
- track_t *trackp;
+void
+setmcn(char *mcn, track_t *trackp)
{
register char *p;
@@ -406,12 +392,10 @@
printf("Track %d MCN: '%s'\n", (int)trackp->trackno, trackp->isrc);
}
-LOCAL char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+static char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-LOCAL void
-isrc_illchar(isrc, c)
- char *isrc;
- int c;
+static void
+isrc_illchar(char *isrc, int c)
{
errmsgno(EX_BAD, "ISRC '%s' contains illegal character '%c'.\n", isrc, c);
}
@@ -426,10 +410,8 @@
*
* CC-OOO-YY-SSSSS
*/
-EXPORT void
-setisrc(isrc, trackp)
- char *isrc;
- track_t *trackp;
+void
+setisrc(char *isrc, track_t *trackp)
{
char ibuf[13];
char *ip;
@@ -506,10 +488,8 @@
exit(EX_BAD);
}
-EXPORT void
-setindex(tindex, trackp)
- char *tindex;
- track_t *trackp;
+void
+setindex(char *tindex, track_t *trackp)
{
char *p;
int i;
Modified: nonameyet/branches/cleanup/cdrecord/cd_misc.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cd_misc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cd_misc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -43,33 +43,27 @@
#include "cdrecord.h"
-EXPORT int from_bcd __PR((int b));
-EXPORT int to_bcd __PR((int i));
-EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive));
-EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp));
-EXPORT void sec_to_msf __PR((long sec, msf_t *mp));
-EXPORT void print_min_atip __PR((long li, long lo));
+int from_bcd __PR((int b));
+int to_bcd __PR((int i));
+long msf_to_lba __PR((int m, int s, int f, BOOL force_positive));
+BOOL lba_to_msf __PR((long lba, msf_t *mp));
+void sec_to_msf __PR((long sec, msf_t *mp));
+void print_min_atip __PR((long li, long lo));
-EXPORT int
-from_bcd(b)
- int b;
+int
+from_bcd(int b)
{
return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F));
}
-EXPORT int
-to_bcd(i)
- int i;
+int
+to_bcd(int i)
{
return (i % 10 | ((i / 10) % 10) << 4);
}
-EXPORT long
-msf_to_lba(m, s, f, force_positive)
- int m;
- int s;
- int f;
- BOOL force_positive;
+long
+msf_to_lba(int m, int s, int f, BOOL force_positive)
{
long ret = m * 60 + s;
@@ -82,10 +76,8 @@
return (ret);
}
-EXPORT BOOL
-lba_to_msf(lba, mp)
- long lba;
- msf_t *mp;
+BOOL
+lba_to_msf(long lba, msf_t *mp)
{
int m;
int s;
@@ -121,10 +113,8 @@
return (TRUE);
}
-EXPORT void
-sec_to_msf(sec, mp)
- long sec;
- msf_t *mp;
+void
+sec_to_msf(long sec, msf_t *mp)
{
int m;
int s;
@@ -139,10 +129,8 @@
mp->msf_frame = f;
}
-EXPORT void
-print_min_atip(li, lo)
- long li;
- long lo;
+void
+print_min_atip(long li, long lo)
{
msf_t msf;
Modified: nonameyet/branches/cleanup/cdrecord/cdr_drv.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cdr_drv.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cdr_drv.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -73,18 +73,18 @@
extern cdr_t cdr_cdr_simul;
extern cdr_t cdr_dvd_simul;
-EXPORT cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *ip));
-EXPORT int drive_attach __PR((SCSI *scgp, cdr_t *));
-EXPORT int attach_unknown __PR((void));
-EXPORT int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype));
-EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags));
-EXPORT int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp));
-EXPORT int cmd_ill __PR((SCSI *scgp));
-EXPORT int cmd_dummy __PR((SCSI *scgp, cdr_t *));
-EXPORT int no_sendcue __PR((SCSI *scgp, cdr_t *, track_t *trackp));
-EXPORT int buf_dummy __PR((SCSI *scgp, long *sp, long *fp));
-EXPORT BOOL set_cdrcmds __PR((char *name, cdr_t **dpp));
-EXPORT cdr_t *get_cdrcmds __PR((SCSI *scgp));
+cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *ip));
+int drive_attach __PR((SCSI *scgp, cdr_t *));
+int attach_unknown __PR((void));
+int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype));
+int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags));
+int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp));
+int cmd_ill __PR((SCSI *scgp));
+int cmd_dummy __PR((SCSI *scgp, cdr_t *));
+int no_sendcue __PR((SCSI *scgp, cdr_t *, track_t *trackp));
+int buf_dummy __PR((SCSI *scgp, long *sp, long *fp));
+BOOL set_cdrcmds __PR((char *name, cdr_t **dpp));
+cdr_t *get_cdrcmds __PR((SCSI *scgp));
/*
* List of CD-R drivers
@@ -115,99 +115,74 @@
(cdr_t *)NULL,
};
-EXPORT cdr_t *
-drive_identify(scgp, dp, ip)
- SCSI *scgp;
- cdr_t *dp;
- struct scsi_inquiry *ip;
+cdr_t *
+drive_identify(SCSI *scgp, cdr_t *dp, struct scsi_inquiry *ip)
{
return (dp);
}
-EXPORT int
-drive_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+drive_attach(SCSI *scgp, cdr_t *dp)
{
return (0);
}
-EXPORT int
+int
attach_unknown()
{
errmsgno(EX_BAD, "Unsupported drive type\n");
return (-1);
}
-EXPORT int
-blank_dummy(scgp, dp, addr, blanktype)
- SCSI *scgp;
- cdr_t *dp;
- long addr;
- int blanktype;
+int
+blank_dummy(SCSI *scgp, cdr_t *dp, long addr, int blanktype)
{
printf("This drive or media does not support the 'BLANK media' command\n");
return (-1);
}
-EXPORT int
-format_dummy(scgp, dp, fmtflags)
- SCSI *scgp;
- cdr_t *dp;
- int fmtflags;
+int
+format_dummy(SCSI *scgp, cdr_t *dp, int fmtflags)
{
printf("This drive or media does not support the 'FORMAT media' command\n");
return (-1);
}
-EXPORT int
-drive_getdisktype(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+drive_getdisktype(SCSI *scgp, cdr_t *dp)
{
/* dstat_t *dsp = dp->cdr_dstat;*/
return (0);
}
-EXPORT int
-cmd_ill(scgp)
- SCSI *scgp;
+int
+cmd_ill(SCSI *scgp)
{
errmsgno(EX_BAD, "Unspecified command not implemented for this drive.\n");
return (-1);
}
-EXPORT int
-cmd_dummy(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+cmd_dummy(SCSI *scgp, cdr_t *dp)
{
return (0);
}
-EXPORT int
-no_sendcue(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+int
+no_sendcue(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
errmsgno(EX_BAD, "SAO writing not available or not implemented for this drive.\n");
return (-1);
}
-EXPORT int
-buf_dummy(scgp, sp, fp)
- SCSI *scgp;
- long *sp;
- long *fp;
+int
+buf_dummy(SCSI *scgp, long *sp, long *fp)
{
return (-1);
}
-EXPORT BOOL
-set_cdrcmds(name, dpp)
- char *name;
- cdr_t **dpp;
+BOOL
+set_cdrcmds(char *name, cdr_t **dpp)
{
cdr_t **d;
int n;
@@ -239,9 +214,8 @@
return (FALSE); /* Make lint happy */
}
-EXPORT cdr_t *
-get_cdrcmds(scgp)
- SCSI *scgp;
+cdr_t *
+get_cdrcmds(SCSI *scgp)
{
cdr_t *dp = (cdr_t *)0;
cdr_t *odp = (cdr_t *)0;
Modified: nonameyet/branches/cleanup/cdrecord/cdrecord.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cdrecord.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cdrecord.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -143,8 +143,8 @@
/*
* Map write modes into names.
*/
-LOCAL char wm_none[] = "unknown";
-LOCAL char wm_ill[] = "illegal";
+static char wm_none[] = "unknown";
+static char wm_ill[] = "illegal";
char *wm2name[] = {
wm_none,
@@ -170,24 +170,24 @@
};
int debug; /* print debug messages */
-LOCAL int kdebug; /* print kernel debug messages */
-LOCAL int scsi_verbose; /* SCSI verbose flag */
-LOCAL int silent; /* SCSI silent flag */
-int lverbose; /* local verbose flag */
+static int kdebug; /* print kernel debug messages */
+static int scsi_verbose; /* SCSI verbose flag */
+static int silent; /* SCSI silent flag */
+int lverbose; /* static verbose flag */
int xdebug; /* extended debug flag */
char *buf; /* The transfer buffer */
long bufsize = -1; /* The size of the transfer buffer */
-LOCAL int gracetime = GRACE_TIME;
-LOCAL int raw_speed = -1;
-LOCAL int dma_speed = -1;
-LOCAL int dminbuf = -1; /* XXX Hack for now drive min buf fill */
-EXPORT BOOL isgui;
-LOCAL int didintr;
-EXPORT char *driveropts;
-LOCAL char *cuefilename;
-LOCAL uid_t oeuid = (uid_t)-1;
+static int gracetime = GRACE_TIME;
+static int raw_speed = -1;
+static int dma_speed = -1;
+static int dminbuf = -1; /* XXX Hack for now drive min buf fill */
+BOOL isgui;
+static int didintr;
+char *driveropts;
+static char *cuefilename;
+static uid_t oeuid = (uid_t)-1;
struct timeval starttime;
struct timeval wstarttime;
@@ -196,81 +196,80 @@
static long fs = -1L; /* fifo (ring buffer) size */
-EXPORT int main __PR((int ac, char **av));
-LOCAL int gracewait __PR((cdr_t *dp, BOOL *didgracep));
-LOCAL void cdrstats __PR((cdr_t *dp));
-LOCAL void susage __PR((int));
-LOCAL void usage __PR((int));
-LOCAL void blusage __PR((int));
-LOCAL void formattypeusage __PR((int));
-LOCAL void intr __PR((int sig));
-LOCAL void catchsig __PR((int sig));
-LOCAL int scsi_cb __PR((void *arg));
-LOCAL void intfifo __PR((int sig));
-LOCAL void exscsi __PR((int excode, void *arg));
-LOCAL void excdr __PR((int excode, void *arg));
-EXPORT int read_buf __PR((int f, char *bp, int size));
-EXPORT int fill_buf __PR((int f, track_t *trackp, long secno,
+static int gracewait __PR((cdr_t *dp, BOOL *didgracep));
+static void cdrstats __PR((cdr_t *dp));
+static void susage __PR((int));
+static void usage __PR((int));
+static void blusage __PR((int));
+static void formattypeusage __PR((int));
+static void intr __PR((int sig));
+static void catchsig __PR((int sig));
+static int scsi_cb __PR((void *arg));
+static void intfifo __PR((int sig));
+static void exscsi __PR((int excode, void *arg));
+static void excdr __PR((int excode, void *arg));
+int read_buf __PR((int f, char *bp, int size));
+int fill_buf __PR((int f, track_t *trackp, long secno,
char *bp, int size));
-EXPORT int get_buf __PR((int f, track_t *trackp, long secno,
+int get_buf __PR((int f, track_t *trackp, long secno,
char **bpp, int size));
-EXPORT int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp,
+int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp,
long startsec, int bytespt,
int secspt, BOOL islast));
-LOCAL int write_track_data __PR((SCSI *scgp, cdr_t *, track_t *));
-EXPORT int pad_track __PR((SCSI *scgp, cdr_t *dp,
+static int write_track_data __PR((SCSI *scgp, cdr_t *, track_t *));
+int pad_track __PR((SCSI *scgp, cdr_t *dp,
track_t *trackp,
long startsec, Llong amt,
BOOL dolast, Llong *bytesp));
-EXPORT int write_buf __PR((SCSI *scgp, cdr_t *dp,
+int write_buf __PR((SCSI *scgp, cdr_t *dp,
track_t *trackp,
char *bp, long startsec, Llong amt,
int secsize,
BOOL dolast, Llong *bytesp));
-LOCAL void printdata __PR((int, track_t *));
-LOCAL void printaudio __PR((int, track_t *));
-LOCAL void checkfile __PR((int, track_t *));
-LOCAL int checkfiles __PR((int, track_t *));
-LOCAL void setleadinout __PR((int, track_t *));
-LOCAL void setpregaps __PR((int, track_t *));
-LOCAL long checktsize __PR((int, track_t *));
-LOCAL void opentracks __PR((track_t *));
-LOCAL void checksize __PR((track_t *));
-LOCAL BOOL checkdsize __PR((SCSI *scgp, cdr_t *dp,
+static void printdata __PR((int, track_t *));
+static void printaudio __PR((int, track_t *));
+static void checkfile __PR((int, track_t *));
+static int checkfiles __PR((int, track_t *));
+static void setleadinout __PR((int, track_t *));
+static void setpregaps __PR((int, track_t *));
+static long checktsize __PR((int, track_t *));
+static void opentracks __PR((track_t *));
+static void checksize __PR((track_t *));
+static BOOL checkdsize __PR((SCSI *scgp, cdr_t *dp,
long tsize, int flags));
-LOCAL void raise_fdlim __PR((void));
-LOCAL void raise_memlock __PR((void));
-LOCAL int gargs __PR((int, char **, int *, track_t *, char **,
+static void raise_fdlim __PR((void));
+static void raise_memlock __PR((void));
+static int gargs __PR((int, char **, int *, track_t *, char **,
int *, cdr_t **,
int *, long *, int *, int *));
-LOCAL void set_trsizes __PR((cdr_t *, int, track_t *));
-EXPORT void load_media __PR((SCSI *scgp, cdr_t *, BOOL));
-EXPORT void unload_media __PR((SCSI *scgp, cdr_t *, int));
-EXPORT void reload_media __PR((SCSI *scgp, cdr_t *));
-EXPORT void set_secsize __PR((SCSI *scgp, int secsize));
-LOCAL int get_dmaspeed __PR((SCSI *scgp, cdr_t *));
-LOCAL BOOL do_opc __PR((SCSI *scgp, cdr_t *, int));
-LOCAL void check_recovery __PR((SCSI *scgp, cdr_t *, int));
+static void set_trsizes __PR((cdr_t *, int, track_t *));
+void load_media __PR((SCSI *scgp, cdr_t *, BOOL));
+void unload_media __PR((SCSI *scgp, cdr_t *, int));
+void reload_media __PR((SCSI *scgp, cdr_t *));
+void set_secsize __PR((SCSI *scgp, int secsize));
+static int get_dmaspeed __PR((SCSI *scgp, cdr_t *));
+static BOOL do_opc __PR((SCSI *scgp, cdr_t *, int));
+static void check_recovery __PR((SCSI *scgp, cdr_t *, int));
void audioread __PR((SCSI *scgp, cdr_t *, int));
-LOCAL void print_msinfo __PR((SCSI *scgp, cdr_t *));
-LOCAL void print_toc __PR((SCSI *scgp, cdr_t *));
-LOCAL void print_track __PR((int, long, struct msf *, int, int, int));
+static void print_msinfo __PR((SCSI *scgp, cdr_t *));
+static void print_toc __PR((SCSI *scgp, cdr_t *));
+static void print_track __PR((int, long, struct msf *, int, int, int));
#if !defined(HAVE_SYS_PRIOCNTL_H)
-LOCAL int rt_raisepri __PR((int));
+static int rt_raisepri __PR((int));
#endif
-EXPORT void raisepri __PR((int));
-LOCAL void wait_input __PR((void));
-LOCAL void checkgui __PR((void));
-LOCAL int getbltype __PR((char *optstr, long *typep));
-LOCAL int getformattype __PR((char *optstr, long *typep));
-LOCAL void print_drflags __PR((cdr_t *dp));
-LOCAL void print_wrmodes __PR((cdr_t *dp));
-LOCAL BOOL check_wrmode __PR((cdr_t *dp, int wmode, int tflags));
-LOCAL void set_wrmode __PR((cdr_t *dp, int wmode, int tflags));
-LOCAL void linuxcheck __PR((void));
+void raisepri __PR((int));
+static void wait_input __PR((void));
+static void checkgui __PR((void));
+static int getbltype __PR((char *optstr, long *typep));
+static int getformattype __PR((char *optstr, long *typep));
+static void print_drflags __PR((cdr_t *dp));
+static void print_wrmodes __PR((cdr_t *dp));
+static BOOL check_wrmode __PR((cdr_t *dp, int wmode, int tflags));
+static void set_wrmode __PR((cdr_t *dp, int wmode, int tflags));
+static void linuxcheck __PR((void));
#ifdef __linux__
-LOCAL int get_cap __PR((cap_value_t cap_array));
+static int get_cap __PR((cap_value_t cap_array));
#endif
struct exargs {
@@ -281,10 +280,8 @@
int exflags;
} exargs;
-EXPORT int
-main(ac, av)
- int ac;
- char *av[];
+int
+main(int argc, char *argv[])
{
char *dev = NULL;
int timeout = 40; /* Set default timeout to 40s CW-7502 is slow*/
@@ -310,8 +307,8 @@
/* workaround for k3b */
int acpos;
- for(acpos=0;acpos<ac;acpos++) {
- if(!strcmp(av[acpos],"-version") || !strcmp(av[acpos],"--version"))
+ for(acpos=0;acpos<argc;acpos++) {
+ if(!strcmp(argv[acpos],"-version") || !strcmp(argv[acpos],"--version"))
fprintf(stderr, "Cdrecord-yelling-line-to-tell-frontends-to-use-it-like-version 2.01.01a03-dvd \n");
}
@@ -325,9 +322,9 @@
#ifdef __EMX__
/* This gives wildcard expansion with Non-Posix shells with EMX */
- _wildcard(&ac, &av);
+ _wildcard(&argc, &argv);
#endif
- save_args(ac, av);
+ save_args(argc, argv);
oeuid = geteuid(); /* Remember saved set uid */
fillbytes(track, sizeof (track), '\0');
@@ -335,7 +332,7 @@
track[i].track = track[i].trackno = i;
track[0].tracktype = TOC_MASK;
raise_fdlim();
- ispacket = gargs(ac, av, &tracks, track, &dev, &timeout, &dp, &speed, &flags,
+ ispacket = gargs(argc, argv, &tracks, track, &dev, &timeout, &dp, &speed, &flags,
&blanktype, &formattype);
if ((track[0].tracktype & TOC_MASK) == TOC_MASK)
comerrno(EX_BAD, "Internal error: Bad TOC type.\n");
@@ -1491,10 +1488,8 @@
return (0);
}
-LOCAL int
-gracewait(dp, didgracep)
- cdr_t *dp;
- BOOL *didgracep;
+static int
+gracewait(cdr_t *dp, BOOL *didgracep)
{
int i;
BOOL didgrace = FALSE;
@@ -1564,9 +1559,8 @@
return (0);
}
-LOCAL void
-cdrstats(dp)
- cdr_t *dp;
+static void
+cdrstats(cdr_t *dp)
{
float secsps = 75.0;
int nsecs;
@@ -1641,9 +1635,8 @@
/*
* Short usage
*/
-LOCAL void
-susage(ret)
- int ret;
+static void
+susage(int ret)
{
error("Usage: %s [options] track1...trackn\n", get_progname());
error("\nUse\t%s -help\n", get_progname());
@@ -1658,9 +1651,8 @@
/* NOTREACHED */
}
-LOCAL void
-usage(excode)
- int excode;
+static void
+usage(int excode)
{
error("Usage: %s [options] track1...trackn\n", get_progname());
error("Options:\n");
@@ -1754,9 +1746,8 @@
exit(excode);
}
-LOCAL void
-blusage(ret)
- int ret;
+static void
+blusage(int ret)
{
error("Blanking options:\n");
error("\tall\t\tblank the entire disk\n");
@@ -1774,9 +1765,8 @@
/* NOTREACHED */
}
-LOCAL void
-formattypeusage(ret)
- int ret;
+static void
+formattypeusage(int ret)
{
error("Formating options:\n");
error("\tfull\t\tstandard formating\n");
@@ -1788,9 +1778,8 @@
}
/* ARGSUSED */
-LOCAL void
-intr(sig)
- int sig;
+static void
+intr(int sig)
{
sig = 0; /* Fake usage for gcc */
@@ -1799,25 +1788,22 @@
didintr++;
}
-LOCAL void
-catchsig(sig)
- int sig;
+static void
+catchsig(int sig)
{
signal(sig, catchsig);
}
-LOCAL int
-scsi_cb(arg)
- void *arg;
+static int
+scsi_cb(void *arg)
{
comexit(EX_BAD);
/* NOTREACHED */
return (0); /* Keep lint happy */
}
-LOCAL void
-intfifo(sig)
- int sig;
+static void
+intfifo(int sig)
{
errmsgno(EX_BAD, "Caught interrupt.\n");
if (exargs.scgp) {
@@ -1837,10 +1823,8 @@
}
/* ARGSUSED */
-LOCAL void
-exscsi(excode, arg)
- int excode;
- void *arg;
+static void
+exscsi(int excode, void *arg)
{
struct exargs *exp = (struct exargs *)arg;
@@ -1865,10 +1849,8 @@
}
}
-LOCAL void
-excdr(excode, arg)
- int excode;
- void *arg;
+static void
+excdr(int excode, void *arg)
{
struct exargs *exp = (struct exargs *)arg;
@@ -1888,11 +1870,8 @@
#endif
}
-EXPORT int
-read_buf(f, bp, size)
- int f;
- char *bp;
- int size;
+int
+read_buf(int f, char *bp, int size)
{
char *p = bp;
int amount = 0;
@@ -1911,13 +1890,8 @@
return (amount);
}
-EXPORT int
-fill_buf(f, trackp, secno, bp, size)
- int f;
- track_t *trackp;
- long secno;
- char *bp;
- int size;
+int
+fill_buf(int f, track_t *trackp, long secno, char *bp, int size)
{
int amount = 0;
int nsecs;
@@ -1992,13 +1966,8 @@
return (amount);
}
-EXPORT int
-get_buf(f, trackp, secno, bpp, size)
- int f;
- track_t *trackp;
- long secno;
- char **bpp;
- int size;
+int
+get_buf(int f, track_t *trackp, long secno, char **bpp, int size)
{
if (fs > 0) {
/* return (faio_read_buf(f, *bpp, size));*/
@@ -2008,15 +1977,9 @@
}
}
-EXPORT int
-write_secs(scgp, dp, bp, startsec, bytespt, secspt, islast)
- SCSI *scgp;
- cdr_t *dp;
- char *bp;
- long startsec;
- int bytespt;
- int secspt;
- BOOL islast;
+int
+write_secs(SCSI *scgp, cdr_t *dp, char *bp, long startsec, int bytespt,
+ int secspt, BOOL islast)
{
int amount;
@@ -2054,11 +2017,8 @@
return (amount);
}
-LOCAL int
-write_track_data(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+write_track_data(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int track = trackp->trackno;
int f = -1;
@@ -2340,15 +2300,9 @@
return (0);
}
-EXPORT int
-pad_track(scgp, dp, trackp, startsec, amt, dolast, bytesp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
- long startsec;
- Llong amt;
- BOOL dolast;
- Llong *bytesp;
+int
+pad_track(SCSI *scgp, cdr_t *dp, track_t *trackp, long startsec, Llong amt,
+ BOOL dolast, Llong *bytesp)
{
int track = trackp->trackno;
Llong bytes = 0;
@@ -2480,17 +2434,9 @@
}
#ifdef USE_WRITE_BUF
-EXPORT int
-write_buf(scgp, dp, trackp, bp, startsec, amt, secsize, dolast, bytesp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
- char *bp;
- long startsec;
- Llong amt;
- int secsize;
- BOOL dolast;
- Llong *bytesp;
+int
+write_buf(SCSI *scgp, cdr_t *dp, track_t *trackp, char *bp, long startsec,
+ Llong amt, int secsize, BOOL dolast, Llong *bytesp)
{
int track = trackp->trackno;
Llong bytes = 0;
@@ -2551,10 +2497,8 @@
}
#endif /* USE_WRITE_BUF */
-LOCAL void
-printdata(track, trackp)
- int track;
- track_t *trackp;
+static void
+printdata(int track, track_t *trackp)
{
if (trackp->itracksize >= 0) {
printf("Track %02d: data %4lld MB ",
@@ -2580,10 +2524,8 @@
printf("\n");
}
-LOCAL void
-printaudio(track, trackp)
- int track;
- track_t *trackp;
+static void
+printaudio(int track, track_t *trackp)
{
if (trackp->itracksize >= 0) {
printf("Track %02d: audio %4lld MB (%02d:%02d.%02d) %spreemp%s%s",
@@ -2630,10 +2572,8 @@
printf("\n");
}
-LOCAL void
-checkfile(track, trackp)
- int track;
- track_t *trackp;
+static void
+checkfile(int track, track_t *trackp)
{
if (trackp->itracksize > 0 &&
is_audio(trackp) &&
@@ -2661,10 +2601,8 @@
printdata(track, trackp);
}
-LOCAL int
-checkfiles(tracks, trackp)
- int tracks;
- track_t *trackp;
+static int
+checkfiles(int tracks, track_t *trackp)
{
int i;
int isaudio = 1;
@@ -2688,10 +2626,8 @@
return (isaudio);
}
-LOCAL void
-setleadinout(tracks, trackp)
- int tracks;
- track_t *trackp;
+static void
+setleadinout(int tracks, track_t *trackp)
{
/*
* Set some values for track 0 (the lead-in)
@@ -2725,10 +2661,8 @@
trackp[tracks+1].flags = trackp[tracks].flags;
}
-LOCAL void
-setpregaps(tracks, trackp)
- int tracks;
- track_t *trackp;
+static void
+setpregaps(int tracks, track_t *trackp)
{
int i;
int sectype;
@@ -2770,10 +2704,8 @@
/*
* Check total size of the medium
*/
-LOCAL long
-checktsize(tracks, trackp)
- int tracks;
- track_t *trackp;
+static long
+checktsize(int tracks, track_t *trackp)
{
int i;
Llong curr;
@@ -2849,9 +2781,8 @@
return (total);
}
-LOCAL void
-opentracks(trackp)
- track_t *trackp;
+static void
+opentracks(track_t *trackp)
{
track_t *tp;
int i;
@@ -2924,9 +2855,8 @@
}
}
-LOCAL void
-checksize(trackp)
- track_t *trackp;
+static void
+checksize(track_t *trackp)
{
struct stat st;
Llong lsize;
@@ -2982,12 +2912,8 @@
}
}
-LOCAL BOOL
-checkdsize(scgp, dp, tsize, flags)
- SCSI *scgp;
- cdr_t *dp;
- long tsize;
- int flags;
+static BOOL
+checkdsize(SCSI *scgp, cdr_t *dp, long tsize, int flags)
{
long startsec = 0L;
long endsec = 0L;
@@ -3155,7 +3081,7 @@
return (FALSE);
}
-LOCAL void
+static void
raise_fdlim()
{
#ifdef RLIMIT_NOFILE
@@ -3179,7 +3105,7 @@
#endif /* RLIMIT_NOFILE */
}
-LOCAL void
+static void
raise_memlock()
{
#ifdef RLIMIT_MEMLOCK
@@ -3202,20 +3128,10 @@
#define M_SAO 2 /* Session at Once mode (also known as DAO) */
#define M_RAW 4 /* Raw mode */
#define M_PACKET 8 /* Packed mode */
-
-LOCAL int
-gargs(ac, av, tracksp, trackp, devp, timeoutp, dpp, speedp, flagsp, blankp, formatp)
- int ac;
- char **av;
- int *tracksp;
- track_t *trackp;
- cdr_t **dpp;
- char **devp;
- int *timeoutp;
- int *speedp;
- long *flagsp;
- int *blankp;
- int *formatp;
+static int
+gargs(int ac, char **av, int *tracksp, track_t *trackp, char **devp,
+ int *timeoutp, cdr_t **dpp, int *speedp, long *flagsp, int *blankp,
+ int *formatp)
{
int cac;
char * const*cav;
@@ -3920,11 +3836,8 @@
return ispacket;
}
-LOCAL void
-set_trsizes(dp, tracks, trackp)
- cdr_t *dp;
- int tracks;
- track_t *trackp;
+static void
+set_trsizes(cdr_t *dp, int tracks, track_t *trackp)
{
int i;
int secsize;
@@ -3978,11 +3891,8 @@
printf("Set Transfersizes end\n");
}
-EXPORT void
-load_media(scgp, dp, doexit)
- SCSI *scgp;
- cdr_t *dp;
- BOOL doexit;
+void
+load_media(SCSI *scgp, cdr_t *dp, BOOL doexit)
{
int code;
int key;
@@ -4027,11 +3937,8 @@
wait_unit_ready(scgp, 120);
}
-EXPORT void
-unload_media(scgp, dp, flags)
- SCSI *scgp;
- cdr_t *dp;
- int flags;
+void
+unload_media(SCSI *scgp, cdr_t *dp, int flags)
{
scsi_prevent_removal(scgp, 0);
if ((flags & F_EJECT) != 0) {
@@ -4040,10 +3947,8 @@
}
}
-EXPORT void
-reload_media(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+void
+reload_media(SCSI *scgp, cdr_t *dp)
{
char ans[2];
#ifdef F_GETFL
@@ -4097,10 +4002,8 @@
load_media(scgp, dp, TRUE);
}
-EXPORT void
-set_secsize(scgp, secsize)
- SCSI *scgp;
- int secsize;
+void
+set_secsize(SCSI *scgp, int secsize)
{
if (secsize > 0) {
/*
@@ -4112,10 +4015,8 @@
}
}
-LOCAL int
-get_dmaspeed(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+get_dmaspeed(SCSI *scgp, cdr_t *dp)
{
int i;
long t;
@@ -4161,11 +4062,8 @@
}
-LOCAL BOOL
-do_opc(scgp, dp, flags)
- SCSI *scgp;
- cdr_t *dp;
- int flags;
+static BOOL
+do_opc(SCSI *scgp, cdr_t *dp, int flags)
{
if ((flags & F_DUMMY) == 0 && dp->cdr_opc) {
if (debug || lverbose) {
@@ -4181,11 +4079,8 @@
return (TRUE);
}
-LOCAL void
-check_recovery(scgp, dp, flags)
- SCSI *scgp;
- cdr_t *dp;
- int flags;
+static void
+check_recovery(SCSI *scgp, cdr_t *dp, int flags)
{
if ((*dp->cdr_check_recovery)(scgp, dp)) {
errmsgno(EX_BAD, "Recovery needed.\n");
@@ -4198,10 +4093,7 @@
#define DEBUG
#endif
void
-audioread(scgp, dp, flags)
- SCSI *scgp;
- cdr_t *dp;
- int flags;
+audioread(SCSI *scgp, cdr_t *dp, int flags)
{
#ifdef DEBUG
int speed = 1;
@@ -4225,10 +4117,8 @@
#endif
}
-LOCAL void
-print_msinfo(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static void
+print_msinfo(SCSI *scgp, cdr_t *dp)
{
long off;
long fa;
@@ -4247,10 +4137,8 @@
printf("%ld,%ld\n", off, fa);
}
-LOCAL void
-print_toc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static void
+print_toc(SCSI *scgp, cdr_t *dp)
{
int first;
int last;
@@ -4297,14 +4185,8 @@
}
}
-LOCAL void
-print_track(track, lba, msp, adr, control, mode)
- int track;
- long lba;
- struct msf *msp;
- int adr;
- int control;
- int mode;
+static void
+print_track(int track, long lba, struct msf *msp, int adr, int control, int mode)
{
long lba_512 = lba*4;
@@ -4327,9 +4209,8 @@
#include <sys/priocntl.h>
#include <sys/rtpriocntl.h>
-EXPORT void
-raisepri(pri)
- int pri;
+void
+raisepri(int pri)
{
int pid;
int classes;
@@ -4382,9 +4263,8 @@
#undef _P
#endif
-LOCAL int
-rt_raisepri(pri)
- int pri;
+static int
+rt_raisepri(int pri)
{
struct sched_param scp;
@@ -4414,7 +4294,7 @@
*/
/*
* NOTE: Base.h from Cygwin-B20 has a second typedef for BOOL.
- * We define BOOL to make all local code use BOOL
+ * We define BOOL to make all static code use BOOL
* from Windows.h and use the hidden __SBOOL for
* our global interfaces.
*
@@ -4434,9 +4314,8 @@
#undef format
#undef interface
-LOCAL int
-rt_raisepri(pri)
- int pri;
+static int
+rt_raisepri(int pri)
{
int prios[] = {THREAD_PRIORITY_TIME_CRITICAL, THREAD_PRIORITY_HIGHEST};
@@ -4458,9 +4337,8 @@
/*
* This OS does not support real time scheduling.
*/
-LOCAL int
-rt_raisepri(pri)
- int pri;
+static int
+rt_raisepri(int pri)
{
return (-1);
}
@@ -4469,9 +4347,8 @@
#endif /* _POSIX_PRIORITY_SCHEDULING */
-EXPORT void
-raisepri(pri)
- int pri;
+void
+raisepri(int pri)
{
if (rt_raisepri(pri) >= 0)
return;
@@ -4524,7 +4401,7 @@
#include <sys/socket.h>
#endif
-LOCAL void
+static void
wait_input()
{
#ifdef HAVE_SELECT
@@ -4543,7 +4420,7 @@
#endif
}
-LOCAL void
+static void
checkgui()
{
struct stat st;
@@ -4555,10 +4432,8 @@
}
}
-LOCAL int
-getbltype(optstr, typep)
- char *optstr;
- long *typep;
+static int
+getbltype(char *optstr, long *typep)
{
if (streql(optstr, "all")) {
*typep = BLANK_DISC;
@@ -4590,10 +4465,8 @@
return (TRUE);
}
-LOCAL int
-getformattype(optstr, typep)
- char *optstr;
- long *typep;
+static int
+getformattype(char *optstr, long *typep)
{
if (streql(optstr, "full")) {
*typep = FULL_FORMAT;
@@ -4610,9 +4483,8 @@
}
return (TRUE);
}
-LOCAL void
-print_drflags(dp)
- cdr_t *dp;
+static void
+print_drflags(cdr_t *dp)
{
printf("Driver flags : ");
@@ -4649,9 +4521,8 @@
printf("\n");
}
-LOCAL void
-print_wrmodes(dp)
- cdr_t *dp;
+static void
+print_wrmodes(cdr_t *dp)
{
BOOL needblank = FALSE;
@@ -4697,11 +4568,8 @@
printf("\n");
}
-LOCAL BOOL
-check_wrmode(dp, wmode, tflags)
- cdr_t *dp;
- int wmode;
- int tflags;
+static BOOL
+check_wrmode(cdr_t *dp, int wmode, int tflags)
{
int cdflags = dp->cdr_flags;
@@ -4770,11 +4638,8 @@
return (FALSE);
}
-LOCAL void
-set_wrmode(dp, wmode, tflags)
- cdr_t *dp;
- int wmode;
- int tflags;
+static void
+set_wrmode(cdr_t *dp, int wmode, int tflags)
{
dstat_t *dsp = dp->cdr_dstat;
int profile;
@@ -4829,9 +4694,8 @@
#endif
#ifdef __linux__
-LOCAL int
-get_cap(cap_array)
- cap_value_t cap_array;
+static int
+get_cap(cap_value_t cap_array)
{
int ret;
cap_t capa;
Modified: nonameyet/branches/cleanup/cdrecord/cdrecord.h
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cdrecord.h 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cdrecord.h 2006-09-11 07:17:29 UTC (rev 248)
@@ -1061,7 +1061,7 @@
extern int attach_unknown __PR((void));
#ifdef _SCG_SCSITRANSP_H
extern int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype));
-EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags));
+int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags));
extern int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp));
extern int cmd_ill __PR((SCSI *scgp));
extern int cmd_dummy __PR((SCSI *scgp, cdr_t *));
Modified: nonameyet/branches/cleanup/cdrecord/cdtext.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cdtext.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cdtext.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -117,24 +117,23 @@
} txtarg_t;
-EXPORT Uchar *textsub;
-EXPORT int textlen;
+Uchar *textsub;
+int textlen;
-EXPORT BOOL checktextfile __PR((char *fname));
-LOCAL void setuptextdata __PR((Uchar *bp, int len));
-LOCAL BOOL cdtext_crc_ok __PR((struct textpack *p));
-EXPORT void packtext __PR((int tracks, track_t *trackp));
-LOCAL BOOL anytext __PR((int pack_type, int tracks, track_t *trackp));
-LOCAL void fillup_pack __PR((txtarg_t *ap));
-LOCAL void fillpacks __PR((txtarg_t *ap, char *from, int len, int track_no, int pack_type));
-EXPORT int write_cdtext __PR((SCSI *scgp, cdr_t *dp, long startsec));
-LOCAL void eight2six __PR((Uchar *in, Uchar *out));
-LOCAL void six2eight __PR((Uchar *in, Uchar *out));
+BOOL checktextfile __PR((char *fname));
+static void setuptextdata __PR((Uchar *bp, int len));
+static BOOL cdtext_crc_ok __PR((struct textpack *p));
+void packtext __PR((int tracks, track_t *trackp));
+static BOOL anytext __PR((int pack_type, int tracks, track_t *trackp));
+static void fillup_pack __PR((txtarg_t *ap));
+static void fillpacks __PR((txtarg_t *ap, char *from, int len, int track_no, int pack_type));
+int write_cdtext __PR((SCSI *scgp, cdr_t *dp, long startsec));
+static void eight2six __PR((Uchar *in, Uchar *out));
+static void six2eight __PR((Uchar *in, Uchar *out));
-EXPORT BOOL
-checktextfile(fname)
- char *fname;
+BOOL
+checktextfile(char *fname)
{
FILE *f;
Uchar hbuf[4];
@@ -215,10 +214,8 @@
return (TRUE);
}
-LOCAL void
-setuptextdata(bp, len)
- Uchar *bp;
- int len;
+static void
+setuptextdata(Uchar *bp, int len)
{
int n;
int i;
@@ -285,9 +282,8 @@
#endif
}
-LOCAL BOOL
-cdtext_crc_ok(p)
- struct textpack *p;
+static BOOL
+cdtext_crc_ok(struct textpack *p)
{
int crc;
struct textpack new;
@@ -306,10 +302,8 @@
}
-EXPORT void
-packtext(tracks, trackp)
- int tracks;
- track_t *trackp;
+void
+packtext(int tracks, track_t *trackp)
{
int type;
int i;
@@ -387,11 +381,8 @@
#endif
}
-LOCAL BOOL
-anytext(pack_type, tracks, trackp)
- int pack_type;
- int tracks;
- track_t *trackp;
+static BOOL
+anytext(int pack_type, int tracks, track_t *trackp)
{
register int i;
register char *p;
@@ -406,9 +397,8 @@
return (FALSE);
}
-LOCAL void
-fillup_pack(ap)
- register txtarg_t *ap;
+static void
+fillup_pack(register txtarg_t *ap)
{
if (ap->p) {
fillbytes(ap->p, &ap->tp->text[12] - ap->p, '\0');
@@ -418,13 +408,9 @@
}
}
-LOCAL void
-fillpacks(ap, from, len, track_no, pack_type)
- register txtarg_t *ap;
- register char *from;
- register int len;
- register int track_no;
- register int pack_type;
+static void
+fillpacks(register txtarg_t *ap, register char *from, int len,
+ int track_no, int pack_type)
{
register int charpos;
register char *p;
@@ -462,11 +448,8 @@
ap->p = p;
}
-EXPORT int
-write_cdtext(scgp, dp, startsec)
- SCSI *scgp;
- cdr_t *dp;
- long startsec;
+int
+write_cdtext(SCSI *scgp, cdr_t *dp, long startsec)
{
char *bp = (char *)textsub;
int buflen = textlen;
@@ -535,10 +518,8 @@
/*
* 3 input bytes (8 bit based) are converted into 4 output bytes (6 bit based).
*/
-LOCAL void
-eight2six(in, out)
- register Uchar *in;
- register Uchar *out;
+static void
+eight2six(register Uchar *in, register Uchar *out)
{
register int c;
@@ -558,10 +539,8 @@
/*
* 4 input bytes (6 bit based) are converted into 3 output bytes (8 bit based).
*/
-LOCAL void
-six2eight(in, out)
- register Uchar *in;
- register Uchar *out;
+static void
+six2eight(register Uchar *in, register Uchar *out)
{
register int c;
Modified: nonameyet/branches/cleanup/cdrecord/clone.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/clone.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/clone.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -56,8 +56,8 @@
/*#define SAO_RAW*/
-EXPORT void clone_toc __PR((track_t *trackp));
-EXPORT void clone_tracktype __PR((track_t *trackp));
+void clone_toc __PR((track_t *trackp));
+void clone_tracktype __PR((track_t *trackp));
extern int lverbose;
extern int xdebug;
@@ -66,19 +66,18 @@
extern int _nsubh;
-LOCAL int ctrl_first;
-LOCAL int ctrl_last;
-LOCAL int sectype_first;
-LOCAL int sectype_last;
-LOCAL int disktype;
-LOCAL long loutstart;
+static int ctrl_first;
+static int ctrl_last;
+static int sectype_first;
+static int sectype_last;
+static int disktype;
+static long loutstart;
/*
* Read Clone TOC description from full toc file.
*/
-EXPORT void
-clone_toc(trackp)
- track_t *trackp;
+void
+clone_toc(track_t *trackp)
{
char filename[1024];
msf_t m;
@@ -214,9 +213,8 @@
* Control 4 = data
* Control 5 = packet data
*/
-EXPORT void
-clone_tracktype(trackp)
- track_t *trackp;
+void
+clone_tracktype(track_t *trackp)
{
int tracks = trackp->tracks;
int sectype;
Modified: nonameyet/branches/cleanup/cdrecord/crc16.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/crc16.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/crc16.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -44,11 +44,11 @@
#include <utypes.h>
#include "crc16.h"
-LOCAL UInt16_t updcrc __PR((Uint p_crc, UInt8_t *cp, Uint cnt));
-/*LOCAL UInt16_t calcCRC __PR((Uchar *buf, Uint bsize));*/
-EXPORT UInt16_t calcCRC __PR((Uchar *buf, Uint bsize));
-EXPORT UInt16_t fillcrc __PR((Uchar *buf, Uint bsize));
-EXPORT UInt16_t flip_crc_error_corr __PR((Uchar *b, Uint bsize, Uint p_crc));
+static UInt16_t updcrc __PR((Uint p_crc, UInt8_t *cp, Uint cnt));
+/*static UInt16_t calcCRC __PR((Uchar *buf, Uint bsize));*/
+UInt16_t calcCRC __PR((Uchar *buf, Uint bsize));
+UInt16_t fillcrc __PR((Uchar *buf, Uint bsize));
+UInt16_t flip_crc_error_corr __PR((Uchar *b, Uint bsize, Uint p_crc));
/* number of bits in CRC: don't change it. */
@@ -57,7 +57,7 @@
/* this the number of bits per char: don't change it. */
#define BPB 8
-LOCAL UInt16_t crctab[1<<BPB] = {
+static UInt16_t crctab[1<<BPB] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
@@ -94,11 +94,8 @@
#define SUBSIZE 96 /* 12 bytes with 8 bits */
-LOCAL UInt16_t
-updcrc(p_crc, cp, cnt)
- Uint p_crc;
- register UInt8_t *cp;
- register Uint cnt;
+static UInt16_t
+updcrc(Uint p_crc, register UInt8_t *cp, register Uint cnt)
{
register UInt16_t crc = p_crc;
@@ -108,11 +105,9 @@
return (crc);
}
-/*LOCAL UInt16_t*/
-EXPORT UInt16_t
-calcCRC(buf, bsize)
- Uchar *buf;
- Uint bsize;
+/*static UInt16_t*/
+UInt16_t
+calcCRC(Uchar *buf, Uint bsize)
{
return (updcrc(0x0000, (UInt8_t *)buf, bsize));
}
@@ -120,10 +115,8 @@
/*
* CRC für Q-Sub füllen
*/
-EXPORT UInt16_t
-fillcrc(buf, bsize)
- Uchar *buf;
- Uint bsize;
+UInt16_t
+fillcrc(Uchar *buf, Uint bsize)
{
UInt16_t crc = calcCRC(buf, bsize-2);
@@ -137,7 +130,7 @@
return (crc);
}
-LOCAL UInt8_t fliptab[BPB] = {
+static UInt8_t fliptab[BPB] = {
0x01,
0x02,
0x04,
@@ -148,11 +141,8 @@
0x80,
};
-EXPORT UInt16_t
-flip_crc_error_corr(b, bsize, p_crc)
- Uchar *b;
- Uint bsize;
- Uint p_crc;
+UInt16_t
+flip_crc_error_corr(Uchar *b, Uint bsize, Uint p_crc)
{
register UInt16_t crc = p_crc;
register Uint btsize = bsize * BPB;
Modified: nonameyet/branches/cleanup/cdrecord/cue.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/cue.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/cue.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -93,17 +93,17 @@
* Keywords (first word on line):
* CATALOG - global CATALOG <MCN>
* CDTEXTFILE - global CDTEXTFILE <fname>
- * FILE - track local FILE <fame> <type>
- * FLAGS - track local FLAGS <flag> ...
- * INDEX - track local INDEX <#> <mm:ss:ff>
- * ISRC - track local ISRC <ISRC>
- * PERFORMER - global/local PERFORMER <string>
+ * FILE - track static FILE <fame> <type>
+ * FLAGS - track static FLAGS <flag> ...
+ * INDEX - track static INDEX <#> <mm:ss:ff>
+ * ISRC - track static ISRC <ISRC>
+ * PERFORMER - global/static PERFORMER <string>
* POSTGAP - track locak POSTGAP <mm:ss:ff>
- * PREGAP - track local PREGAP <mm:ss:ff>
+ * PREGAP - track static PREGAP <mm:ss:ff>
* REM - anywhere REM <comment>
- * SONGWRITER - global/local SONGWRITER <string>
- * TITLE - global/local TITLE <string>
- * TRACK - track local TRACK <#> <datatype>
+ * SONGWRITER - global/static SONGWRITER <string>
+ * TITLE - global/static TITLE <string>
+ * TRACK - track static TRACK <#> <datatype>
*
* Order of keywords:
* CATALOG
@@ -118,8 +118,8 @@
*/
#define K_G 0x10000 /* Global */
-#define K_T 0x20000 /* Track local */
-#define K_A (K_T | K_G) /* Global & Track local */
+#define K_T 0x20000 /* Track static */
+#define K_A (K_T | K_G) /* Global & Track static */
#define K_MCN (0 | K_G) /* Media catalog number */
#define K_TEXTFILE (1 | K_G) /* CD-Text binary file */
@@ -136,7 +136,7 @@
#define K_TRACK (12| K_T) /* Track marker */
-LOCAL keyw_t keywords[] = {
+static keyw_t keywords[] = {
{ "CATALOG", K_MCN },
{ "CDTEXTFILE", K_TEXTFILE },
{ "FILE", K_FILE },
@@ -172,7 +172,7 @@
#define K_MP3 105
#define K_OGG 106
-LOCAL keyw_t filetypes[] = {
+static keyw_t filetypes[] = {
{ "BINARY", K_BINARY },
{ "MOTOROLA", K_MOTOROLA },
{ "AIFF", K_AIFF },
@@ -195,7 +195,7 @@
#define K_PRE 1002
#define K_SCMS 1003
-LOCAL keyw_t flags[] = {
+static keyw_t flags[] = {
{ "DCP", K_DCP },
{ "4CH", K_4CH },
{ "PRE", K_PRE },
@@ -220,7 +220,7 @@
#define K_MODE2 10003
#define K_CDI 10004
-LOCAL keyw_t dtypes[] = {
+static keyw_t dtypes[] = {
{ "AUDIO", K_AUDIO },
{ "CDG", K_CDG },
{ "MODE1", K_MODE1 },
@@ -231,45 +231,45 @@
#ifdef CUE_MAIN
-EXPORT int main __PR((int ac, char **av));
+int main __PR((int ac, char **av));
#endif
-EXPORT int parsecue __PR((char *cuefname, track_t trackp[]));
-EXPORT void fparsecue __PR((FILE *f, track_t trackp[]));
-LOCAL void parse_mcn __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_textfile __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_file __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_flags __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_index __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_isrc __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_performer __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_postgap __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_pregap __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_songwriter __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_title __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_track __PR((track_t trackp[], state_t *sp));
-LOCAL void parse_offset __PR((long *lp));
-LOCAL void newtrack __PR((track_t trackp[], state_t *sp));
+int parsecue __PR((char *cuefname, track_t trackp[]));
+void fparsecue __PR((FILE *f, track_t trackp[]));
+static void parse_mcn __PR((track_t trackp[], state_t *sp));
+static void parse_textfile __PR((track_t trackp[], state_t *sp));
+static void parse_file __PR((track_t trackp[], state_t *sp));
+static void parse_flags __PR((track_t trackp[], state_t *sp));
+static void parse_index __PR((track_t trackp[], state_t *sp));
+static void parse_isrc __PR((track_t trackp[], state_t *sp));
+static void parse_performer __PR((track_t trackp[], state_t *sp));
+static void parse_postgap __PR((track_t trackp[], state_t *sp));
+static void parse_pregap __PR((track_t trackp[], state_t *sp));
+static void parse_songwriter __PR((track_t trackp[], state_t *sp));
+static void parse_title __PR((track_t trackp[], state_t *sp));
+static void parse_track __PR((track_t trackp[], state_t *sp));
+static void parse_offset __PR((long *lp));
+static void newtrack __PR((track_t trackp[], state_t *sp));
-LOCAL keyw_t *lookup __PR((char *word, keyw_t table[]));
-LOCAL void wdebug __PR((void));
-LOCAL FILE *cueopen __PR((char *name));
-LOCAL char *cuename __PR((void));
-LOCAL char *nextline __PR((FILE *f));
-LOCAL void ungetline __PR((void));
-LOCAL char *skipwhite __PR((const char *s));
-LOCAL char *peekword __PR((void));
-LOCAL char *lineend __PR((void));
-LOCAL char *markword __PR((char *delim));
-LOCAL char getdelim __PR((void));
-LOCAL char *getnextitem __PR((char *delim));
-LOCAL char *neednextitem __PR((char *delim));
-LOCAL char *nextword __PR((void));
-LOCAL char *needword __PR((void));
-LOCAL char *curword __PR((void));
-LOCAL char *nextitem __PR((void));
-LOCAL char *needitem __PR((void));
-LOCAL void checkextra __PR((void));
-LOCAL void cueabort __PR((const char *fmt, ...));
+static keyw_t *lookup __PR((char *word, keyw_t table[]));
+static void wdebug __PR((void));
+static FILE *cueopen __PR((char *name));
+static char *cuename __PR((void));
+static char *nextline __PR((FILE *f));
+static void ungetline __PR((void));
+static char *skipwhite __PR((const char *s));
+static char *peekword __PR((void));
+static char *lineend __PR((void));
+static char *markword __PR((char *delim));
+static char getdelim __PR((void));
+static char *getnextitem __PR((char *delim));
+static char *neednextitem __PR((char *delim));
+static char *nextword __PR((void));
+static char *needword __PR((void));
+static char *curword __PR((void));
+static char *nextitem __PR((void));
+static char *needitem __PR((void));
+static void checkextra __PR((void));
+static void cueabort __PR((const char *fmt, ...));
#ifdef CUE_MAIN
int debug;
@@ -278,15 +278,13 @@
int write_secs __PR((void));
int write_secs() { return (-1); }
-EXPORT int
-main(ac, av)
- int ac;
- char *av[];
+int
+main(int argc, char *argv[])
{
int i;
track_t track[MAX_TRACK+2]; /* Max tracks + track 0 + track AA */
- save_args(ac, av);
+ save_args(argc, argv);
fillbytes(track, sizeof (track), '\0');
for (i = 0; i < MAX_TRACK+2; i++)
@@ -294,17 +292,15 @@
track[0].tracktype = TOC_MASK;
- parsecue(av[1], track);
+ parsecue(argv[1], track);
return (0);
}
#else
extern int xdebug;
#endif
-EXPORT int
-parsecue(cuefname, trackp)
- char *cuefname;
- track_t trackp[];
+int
+parsecue(char *cuefname, track_t trackp[])
{
FILE *f = cueopen(cuefname);
@@ -312,10 +308,8 @@
return (0);
}
-EXPORT void
-fparsecue(f, trackp)
- FILE *f;
- track_t trackp[];
+void
+fparsecue(FILE *f, track_t trackp[])
{
char *word;
struct keyw *kp;
@@ -403,10 +397,8 @@
} while (1);
}
-LOCAL void
-parse_mcn(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_mcn(track_t trackp[], state_t *sp)
{
char *word;
textptr_t *txp;
@@ -422,10 +414,8 @@
checkextra();
}
-LOCAL void
-parse_textfile(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_textfile(track_t trackp[], state_t *sp)
{
char *word;
@@ -449,10 +439,8 @@
checkextra();
}
-LOCAL void
-parse_file(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_file(track_t trackp[], state_t *sp)
{
char cname[1024];
char newname[1024];
@@ -550,10 +538,8 @@
#endif
}
-LOCAL void
-parse_flags(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_flags(track_t trackp[], state_t *sp)
{
struct keyw *kp;
char *word;
@@ -584,10 +570,8 @@
printf("Track %d flags 0x%08X\n", sp->track, sp->flags);
}
-LOCAL void
-parse_index(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_index(track_t trackp[], state_t *sp)
{
char *word;
long l;
@@ -645,10 +629,8 @@
checkextra();
}
-LOCAL void
-parse_isrc(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_isrc(track_t trackp[], state_t *sp)
{
char *word;
textptr_t *txp;
@@ -670,10 +652,8 @@
checkextra();
}
-LOCAL void
-parse_performer(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_performer(track_t trackp[], state_t *sp)
{
char *word;
textptr_t *txp;
@@ -685,10 +665,8 @@
checkextra();
}
-LOCAL void
-parse_postgap(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_postgap(track_t trackp[], state_t *sp)
{
long l;
@@ -702,10 +680,8 @@
checkextra();
}
-LOCAL void
-parse_pregap(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_pregap(track_t trackp[], state_t *sp)
{
long l;
@@ -720,10 +696,8 @@
checkextra();
}
-LOCAL void
-parse_songwriter(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_songwriter(track_t trackp[], state_t *sp)
{
char *word;
textptr_t *txp;
@@ -735,10 +709,8 @@
checkextra();
}
-LOCAL void
-parse_title(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_title(track_t trackp[], state_t *sp)
{
char *word;
textptr_t *txp;
@@ -750,10 +722,8 @@
checkextra();
}
-LOCAL void
-parse_track(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+parse_track(track_t trackp[], state_t *sp)
{
struct keyw *kp;
char *word;
@@ -866,9 +836,8 @@
checkextra();
}
-LOCAL void
-parse_offset(lp)
- long *lp;
+static void
+parse_offset(long *lp)
{
char *word;
char *p;
@@ -904,10 +873,8 @@
}
/*--------------------------------------------------------------------------*/
-LOCAL void
-newtrack(trackp, sp)
- track_t trackp[];
- state_t *sp;
+static void
+newtrack(track_t trackp[], state_t *sp)
{
register int i;
register int track = sp->track;
@@ -1013,10 +980,8 @@
}
/*--------------------------------------------------------------------------*/
-LOCAL keyw_t *
-lookup(word, table)
- char *word;
- keyw_t table[];
+static keyw_t *
+lookup(char *word, keyw_t table[])
{
register keyw_t *kp = table;
@@ -1033,19 +998,19 @@
* Parser low level functions start here...
*/
-LOCAL char linebuf[4096];
-LOCAL char *fname;
-LOCAL char *linep;
-LOCAL char *wordendp;
-LOCAL char wordendc;
-LOCAL int olinelen;
-LOCAL int linelen;
-LOCAL int lineno;
+static char linebuf[4096];
+static char *fname;
+static char *linep;
+static char *wordendp;
+static char wordendc;
+static int olinelen;
+static int linelen;
+static int lineno;
-LOCAL char worddelim[] = "=:,/";
-LOCAL char nulldelim[] = "";
+static char worddelim[] = "=:,/";
+static char nulldelim[] = "";
-LOCAL void
+static void
wdebug()
{
/* printf("WORD: '%s' rest '%s'\n", word, peekword());*/
@@ -1054,9 +1019,8 @@
(long)linep, (long)peekword(), (long)&linebuf[linelen]);
}
-LOCAL FILE *
-cueopen(name)
- char *name;
+static FILE *
+cueopen(char *name)
{
FILE *f;
@@ -1068,15 +1032,14 @@
return (f);
}
-LOCAL char *
+static char *
cuename()
{
return (fname);
}
-LOCAL char *
-nextline(f)
- FILE *f;
+static char *
+nextline(FILE *f)
{
register int len;
@@ -1101,7 +1064,7 @@
return (linep);
}
-LOCAL void
+static void
ungetline()
{
linelen = olinelen;
@@ -1111,9 +1074,8 @@
wordendc = *linep;
}
-LOCAL char *
-skipwhite(s)
- const char *s;
+static char *
+skipwhite(const char *s)
{
register const Uchar *p = (const Uchar *)s;
@@ -1125,21 +1087,20 @@
return ((char *)p);
}
-LOCAL char *
+static char *
peekword()
{
return (&wordendp[1]);
}
-LOCAL char *
+static char *
lineend()
{
return (&linebuf[linelen]);
}
-LOCAL char *
-markword(delim)
- char *delim;
+static char *
+markword(char *delim)
{
register BOOL quoted = FALSE;
register Uchar c;
@@ -1173,15 +1134,14 @@
return (linep);
}
-LOCAL char
+static char
getdelim()
{
return (wordendc);
}
-LOCAL char *
-getnextitem(delim)
- char *delim;
+static char *
+getnextitem(char *delim)
{
*wordendp = wordendc;
@@ -1189,9 +1149,8 @@
return (markword(delim));
}
-LOCAL char *
-neednextitem(delim)
- char *delim;
+static char *
+neednextitem(char *delim)
{
char *olinep = linep;
char *nlinep;
@@ -1204,37 +1163,37 @@
return (nlinep);
}
-LOCAL char *
+static char *
nextword()
{
return (getnextitem(worddelim));
}
-LOCAL char *
+static char *
needword()
{
return (neednextitem(worddelim));
}
-LOCAL char *
+static char *
curword()
{
return (linep);
}
-LOCAL char *
+static char *
nextitem()
{
return (getnextitem(nulldelim));
}
-LOCAL char *
+static char *
needitem()
{
return (neednextitem(nulldelim));
}
-LOCAL void
+static void
checkextra()
{
if (peekword() < lineend())
@@ -1243,13 +1202,11 @@
/* VARARGS1 */
#ifdef PROTOTYPES
-LOCAL void
+static void
cueabort(const char *fmt, ...)
#else
-LOCAL void
-cueabort(fmt, va_alist)
- char *fmt;
- va_dcl
+static void
+cueabort(char *fmt, va_dcl va_alist)
#endif
{
va_list args;
Modified: nonameyet/branches/cleanup/cdrecord/diskid.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/diskid.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/diskid.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -43,10 +43,10 @@
#include "cdrecord.h"
-EXPORT void pr_manufacturer __PR((msf_t *mp, BOOL rw, BOOL audio));
-LOCAL struct disk_man * man_ptr __PR((msf_t *mp));
-EXPORT int manufacturer_id __PR((msf_t *mp));
-EXPORT long disk_rcap __PR((msf_t *mp, long maxblock, BOOL rw, BOOL audio));
+void pr_manufacturer __PR((msf_t *mp, BOOL rw, BOOL audio));
+static struct disk_man * man_ptr __PR((msf_t *mp));
+int manufacturer_id __PR((msf_t *mp));
+long disk_rcap __PR((msf_t *mp, long maxblock, BOOL rw, BOOL audio));
struct disk_man {
msf_t mi_msf;
@@ -57,102 +57,102 @@
/*
* Illegal (old) Manufacturer.
*/
-LOCAL char m_ill[] = "Unknown old Manufacturer code";
-LOCAL char m_illrw[] = "Illegal Manufacturer code";
+static char m_ill[] = "Unknown old Manufacturer code";
+static char m_illrw[] = "Illegal Manufacturer code";
/*
* Permanent codes.
*/
-LOCAL char m_kingpro[] = "King Pro Mediatek Inc.";
-LOCAL char m_custpo[] = "Customer Pressing Oosterhout";
-LOCAL char m_taeil[] = "Taeil Media Co.,Ltd.";
-LOCAL char m_doremi[] = "Doremi Media Co., Ltd.";
-LOCAL char m_xcitec[] = "Xcitec Inc.";
-LOCAL char m_leaddata[] = "Lead Data Inc.";
-LOCAL char m_fuji[] = "FUJI Photo Film Co., Ltd.";
-LOCAL char m_hitachi[] = "Hitachi Maxell, Ltd.";
-LOCAL char m_kodakjp[] = "Kodak Japan Limited";
-LOCAL char m_mitsui[] = "Mitsui Chemicals, Inc.";
-LOCAL char m_pioneer[] = "Pioneer Video Corporation";
-LOCAL char m_plasmon[] = "Plasmon Data systems Ltd.";
-LOCAL char m_princo[] = "Princo Corporation";
-LOCAL char m_ricoh[] = "Ricoh Company Limited";
-LOCAL char m_skc[] = "SKC Co., Ltd.";
-LOCAL char m_tyuden[] = "Taiyo Yuden Company Limited";
-LOCAL char m_tdk[] = "TDK Corporation";
-LOCAL char m_mitsubishi[] = "Mitsubishi Chemical Corporation";
-LOCAL char m_auvistar[] = "Auvistar Industry Co.,Ltd.";
-LOCAL char m_gigastore[] = "GIGASTORAGE CORPORATION";
-LOCAL char m_fornet[] = "FORNET INTERNATIONAL PTE LTD.";
-LOCAL char m_cmc[] = "CMC Magnetics Corporation";
-LOCAL char m_odm[] = "Optical Disc Manufacturing Equipment";
-LOCAL char m_ritek[] = "Ritek Co.";
+static char m_kingpro[] = "King Pro Mediatek Inc.";
+static char m_custpo[] = "Customer Pressing Oosterhout";
+static char m_taeil[] = "Taeil Media Co.,Ltd.";
+static char m_doremi[] = "Doremi Media Co., Ltd.";
+static char m_xcitec[] = "Xcitec Inc.";
+static char m_leaddata[] = "Lead Data Inc.";
+static char m_fuji[] = "FUJI Photo Film Co., Ltd.";
+static char m_hitachi[] = "Hitachi Maxell, Ltd.";
+static char m_kodakjp[] = "Kodak Japan Limited";
+static char m_mitsui[] = "Mitsui Chemicals, Inc.";
+static char m_pioneer[] = "Pioneer Video Corporation";
+static char m_plasmon[] = "Plasmon Data systems Ltd.";
+static char m_princo[] = "Princo Corporation";
+static char m_ricoh[] = "Ricoh Company Limited";
+static char m_skc[] = "SKC Co., Ltd.";
+static char m_tyuden[] = "Taiyo Yuden Company Limited";
+static char m_tdk[] = "TDK Corporation";
+static char m_mitsubishi[] = "Mitsubishi Chemical Corporation";
+static char m_auvistar[] = "Auvistar Industry Co.,Ltd.";
+static char m_gigastore[] = "GIGASTORAGE CORPORATION";
+static char m_fornet[] = "FORNET INTERNATIONAL PTE LTD.";
+static char m_cmc[] = "CMC Magnetics Corporation";
+static char m_odm[] = "Optical Disc Manufacturing Equipment";
+static char m_ritek[] = "Ritek Co.";
/*
* Tentative codes.
*/
-LOCAL char m_bestdisk[] = "Bestdisc Technology Corporation";
-LOCAL char m_wealth_fair[] = "WEALTH FAIR INVESTMENT LIMITED";
-LOCAL char m_general_mag[] = "General Magnetics Ld";
-LOCAL char m_mpo[] = "MPO";
-LOCAL char m_jvc[] = "VICTOR COMPANY OF JAPAN, LIMITED";
-LOCAL char m_vivistar[] = "VIVASTAR AG";
-LOCAL char m_taroko[] = "TAROKO INTERNATIONAL CO.,LTD.";
-LOCAL char m_unidisc[] = "UNIDISC TECHNOLOGY CO.,LTD";
-LOCAL char m_hokodig[] = "Hong Kong Digital Technology Co., Ltd.";
-LOCAL char m_viva[] = "VIVA MAGNETICS LIMITED";
-LOCAL char m_hile[] = "Hile Optical Disc Technology Corp.";
-LOCAL char m_friendly[] = "Friendly CD-Tek Co.";
-LOCAL char m_soundsound[] = "Sound Sound Multi-Media Development Limited";
-LOCAL char m_kdg[] = "kdg mediatech AG";
-LOCAL char m_seantram[] = "Seantram Technology Inc.";
-LOCAL char m_eximpo[] = "EXIMPO";
-LOCAL char m_delphi[] = "DELPHI TECHNOLOGY INC.";
-LOCAL char m_harmonic[] = "Harmonic Hall Optical Disc Ltd.";
-LOCAL char m_guannyinn[] = "Guann Yinn Co.,Ltd.";
-LOCAL char m_optime[] = "Opti.Me.S. S.p.A.";
-LOCAL char m_nacar[] = "Nacar Media srl";
-LOCAL char m_optrom[] = "OPTROM.INC.";
-LOCAL char m_audiodis[] = "AUDIO DISTRIBUTORS CO., LTD.";
-LOCAL char m_acer[] = "Acer Media Technology, Inc.";
-LOCAL char m_woongjin[] = "Woongjin Media corp";
-LOCAL char m_infodisk[] = "INFODISC Technology Co., Ltd.";
-LOCAL char m_unitech[] = "UNITECH JAPAN INC.";
-LOCAL char m_ams[] = "AMS Technology Inc.";
-LOCAL char m_vanguard[] = "Vanguard Disc Inc.";
-LOCAL char m_grandadv[] = "Grand Advance Technology Ltd.";
-LOCAL char m_digitalstor[] = "DIGITAL STORAGE TECHNOLOGY CO.,LTD";
-LOCAL char m_matsushita[] = "Matsushita Electric Industrial Co.,Ltd.";
-LOCAL char m_albrechts[] = "CDA Datenträger Albrechts GmbH.";
-LOCAL char m_xalbrechts[] = "??? CDA Datenträger Albrechts GmbH.";
+static char m_bestdisk[] = "Bestdisc Technology Corporation";
+static char m_wealth_fair[] = "WEALTH FAIR INVESTMENT LIMITED";
+static char m_general_mag[] = "General Magnetics Ld";
+static char m_mpo[] = "MPO";
+static char m_jvc[] = "VICTOR COMPANY OF JAPAN, LIMITED";
+static char m_vivistar[] = "VIVASTAR AG";
+static char m_taroko[] = "TAROKO INTERNATIONAL CO.,LTD.";
+static char m_unidisc[] = "UNIDISC TECHNOLOGY CO.,LTD";
+static char m_hokodig[] = "Hong Kong Digital Technology Co., Ltd.";
+static char m_viva[] = "VIVA MAGNETICS LIMITED";
+static char m_hile[] = "Hile Optical Disc Technology Corp.";
+static char m_friendly[] = "Friendly CD-Tek Co.";
+static char m_soundsound[] = "Sound Sound Multi-Media Development Limited";
+static char m_kdg[] = "kdg mediatech AG";
+static char m_seantram[] = "Seantram Technology Inc.";
+static char m_eximpo[] = "EXIMPO";
+static char m_delphi[] = "DELPHI TECHNOLOGY INC.";
+static char m_harmonic[] = "Harmonic Hall Optical Disc Ltd.";
+static char m_guannyinn[] = "Guann Yinn Co.,Ltd.";
+static char m_optime[] = "Opti.Me.S. S.p.A.";
+static char m_nacar[] = "Nacar Media srl";
+static char m_optrom[] = "OPTROM.INC.";
+static char m_audiodis[] = "AUDIO DISTRIBUTORS CO., LTD.";
+static char m_acer[] = "Acer Media Technology, Inc.";
+static char m_woongjin[] = "Woongjin Media corp";
+static char m_infodisk[] = "INFODISC Technology Co., Ltd.";
+static char m_unitech[] = "UNITECH JAPAN INC.";
+static char m_ams[] = "AMS Technology Inc.";
+static char m_vanguard[] = "Vanguard Disc Inc.";
+static char m_grandadv[] = "Grand Advance Technology Ltd.";
+static char m_digitalstor[] = "DIGITAL STORAGE TECHNOLOGY CO.,LTD";
+static char m_matsushita[] = "Matsushita Electric Industrial Co.,Ltd.";
+static char m_albrechts[] = "CDA Datenträger Albrechts GmbH.";
+static char m_xalbrechts[] = "??? CDA Datenträger Albrechts GmbH.";
-LOCAL char m_prodisc[] = "Prodisc Technology Inc.";
-LOCAL char m_postech[] = "POSTECH Corporation";
+static char m_prodisc[] = "Prodisc Technology Inc.";
+static char m_postech[] = "POSTECH Corporation";
#ifdef used
-LOCAL char m_ncolumbia[] = "NIPPON COLUMBIA CO.,LTD.";
+static char m_ncolumbia[] = "NIPPON COLUMBIA CO.,LTD.";
#endif
-LOCAL char m_odc[] = "OPTICAL DISC CORPRATION";
-LOCAL char m_sony[] = "SONY Corporation";
-LOCAL char m_cis[] = "CIS Technology Inc.";
-LOCAL char m_csitaly[] = "Computer Support Italy s.r.l.";
-LOCAL char m_mmmm[] = "Multi Media Masters & Machinary SA";
+static char m_odc[] = "OPTICAL DISC CORPRATION";
+static char m_sony[] = "SONY Corporation";
+static char m_cis[] = "CIS Technology Inc.";
+static char m_csitaly[] = "Computer Support Italy s.r.l.";
+static char m_mmmm[] = "Multi Media Masters & Machinary SA";
/*
* Guessed codes.
*/
-/*LOCAL char m_seantram[] = "Seantram Technology Inc.";*/
-LOCAL char m_advanced[] = "Advanced Digital Media";
-LOCAL char m_moser[] = "Moser Baer India Limited";
-LOCAL char m_nanya[] = "NAN-YA Plastics Corporation";
-LOCAL char m_shenzen[] = "SHENZEN SG&GAST DIGITAL OPTICAL DISCS";
+/*static char m_seantram[] = "Seantram Technology Inc.";*/
+static char m_advanced[] = "Advanced Digital Media";
+static char m_moser[] = "Moser Baer India Limited";
+static char m_nanya[] = "NAN-YA Plastics Corporation";
+static char m_shenzen[] = "SHENZEN SG&GAST DIGITAL OPTICAL DISCS";
-LOCAL struct disk_man notable =
+static struct disk_man notable =
{{00, 00, 00}, -1, "unknown (not in table)" };
/*
* Old (illegal) code table. It lists single specific codes (97:xx:yy).
*/
-LOCAL struct disk_man odman[] = {
+static struct disk_man odman[] = {
/*
* Illegal (old) codes.
*/
@@ -187,7 +187,7 @@
* Note that dp->mi_msf.msf_frame needs to be always rounded down
* to 0 even for media that has e.g. 97:27/01 in the official table.
*/
-LOCAL struct disk_man dman[] = {
+static struct disk_man dman[] = {
/*
* Permanent codes.
*/
@@ -331,9 +331,8 @@
#define ndman (sizeof (dman)/sizeof (dman[0]))
-LOCAL struct disk_man *
-man_ptr(mp)
- msf_t *mp;
+static struct disk_man *
+man_ptr(msf_t *mp)
{
struct disk_man * dp;
int frame;
@@ -368,11 +367,8 @@
return (NULL);
}
-EXPORT void
-pr_manufacturer(mp, rw, audio)
- msf_t *mp;
- BOOL rw;
- BOOL audio;
+void
+pr_manufacturer(msf_t *mp, BOOL rw, BOOL audio)
{
struct disk_man * dp;
struct disk_man xdman;
@@ -426,9 +422,8 @@
}
}
-EXPORT int
-manufacturer_id(mp)
- msf_t *mp;
+int
+manufacturer_id(msf_t *mp)
{
struct disk_man * dp;
@@ -444,7 +439,7 @@
long ci_rcap; /* Abs max lead out start */
};
-LOCAL struct disk_rcap rcap[] = {
+static struct disk_rcap rcap[] = {
#ifdef __redbook_only__
{{97, 35, 44}, 359849, 404700 }, /*! Unknown 99 min (89:58/00)*/
@@ -515,12 +510,8 @@
{{00, 00, 00}, 0L, 0L },
};
-EXPORT long
-disk_rcap(mp, maxblock, rw, audio)
- msf_t *mp;
- long maxblock;
- BOOL rw;
- BOOL audio;
+long
+disk_rcap(msf_t *mp, long maxblock, BOOL rw, BOOL audio)
{
struct disk_rcap * dp;
Modified: nonameyet/branches/cleanup/cdrecord/drv_7501.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_7501.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_7501.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -225,28 +225,28 @@
};
-LOCAL int cw7501_attach __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int cw7501_init __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int cw7501_getdisktype __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int cw7501_speed_select __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int cw7501_next_wr_addr __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int cw7501_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int cw7501_write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_open_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_close_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_open_session __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_gen_cue __PR((track_t *trackp, void *vcuep, BOOL needgap));
-LOCAL void fillcue __PR((struct cw7501_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
-LOCAL int cw7501_send_cue __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_fixate __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int cw7501_rezero __PR((SCSI *scgp, int reset, int dwreset));
-LOCAL int cw7501_read_trackinfo __PR((SCSI *scgp, Uchar *bp, int count, int track, int mode));
-LOCAL int cw7501_write_dao __PR((SCSI *scgp, Uchar *bp, int len, int disktype));
-LOCAL int cw7501_reserve_track __PR((SCSI *scgp, unsigned long));
-LOCAL int cw7501_set_mode __PR((SCSI *scgp, int phys_form, int control,
+static int cw7501_attach __PR((SCSI *scgp, cdr_t *dp));
+static int cw7501_init __PR((SCSI *scgp, cdr_t *dp));
+static int cw7501_getdisktype __PR((SCSI *scgp, cdr_t *dp));
+static int cw7501_speed_select __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int cw7501_next_wr_addr __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int cw7501_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int cw7501_write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_open_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_close_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_open_session __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_gen_cue __PR((track_t *trackp, void *vcuep, BOOL needgap));
+static void fillcue __PR((struct cw7501_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
+static int cw7501_send_cue __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_fixate __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int cw7501_rezero __PR((SCSI *scgp, int reset, int dwreset));
+static int cw7501_read_trackinfo __PR((SCSI *scgp, Uchar *bp, int count, int track, int mode));
+static int cw7501_write_dao __PR((SCSI *scgp, Uchar *bp, int len, int disktype));
+static int cw7501_reserve_track __PR((SCSI *scgp, unsigned long));
+static int cw7501_set_mode __PR((SCSI *scgp, int phys_form, int control,
int subc, int alt, int trackno, int tindex,
int packet_size, int write_mode));
-LOCAL int cw7501_finalize __PR((SCSI *scgp, int pad, int fixed));
+static int cw7501_finalize __PR((SCSI *scgp, int pad, int fixed));
cdr_t cdr_cw7501 = {
@@ -328,27 +328,21 @@
NULL
};
-LOCAL int
-cw7501_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+cw7501_attach(SCSI *scgp, cdr_t *dp)
{
scg_setnonstderrs(scgp, sd_cw7501_error_str);
return (0);
}
-LOCAL int
-cw7501_init(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+cw7501_init(SCSI *scgp, cdr_t *dp)
{
return (cw7501_speed_select(scgp, dp, NULL));
}
-LOCAL int
-cw7501_getdisktype(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+cw7501_getdisktype(SCSI *scgp, cdr_t *dp)
{
Ulong maxb = 0;
Uchar buf[256];
@@ -410,11 +404,8 @@
}
-LOCAL int
-cw7501_speed_select(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+cw7501_speed_select(SCSI *scgp, cdr_t *dp, int *speedp)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -470,11 +461,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-cw7501_next_wr_addr(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+cw7501_next_wr_addr(SCSI *scgp, track_t *trackp, long *ap)
{
struct cw7501_nwa *nwa;
Uchar buf[256];
@@ -518,14 +506,13 @@
return (0);
}
-LOCAL int
-cw7501_write(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+static int
+cw7501_write(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
if (lverbose > 1 && islast)
printf("\nWriting last record for this track.\n");
@@ -533,11 +520,8 @@
return (write_xg0(scgp, bp, 0, size, blocks));
}
-LOCAL int
-cw7501_write_leadin(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_write_leadin(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uint i;
long startsec = 0L;
@@ -569,7 +553,7 @@
return (0);
}
-LOCAL Uchar db2phys[] = {
+static Uchar db2phys[] = {
0x00, /* 0 2352 bytes of raw data */
0xFF, /* 1 2368 bytes (raw data + P/Q Subchannel) */
0xFF, /* 2 2448 bytes (raw data + P-W Subchannel) */
@@ -588,11 +572,8 @@
0xFF, /* 15 - Vendor specific */
};
-LOCAL int
-cw7501_open_track(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_open_track(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct scsi_mode_page_header *mp;
Uchar mode[256];
@@ -651,11 +632,8 @@
}
-LOCAL int
-cw7501_close_track(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_close_track(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (!is_tao(trackp) && !is_packet(trackp)) {
return (0);
@@ -663,11 +641,8 @@
return (scsi_flush_cache(scgp, FALSE));
}
-LOCAL int
-cw7501_open_session(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_open_session(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct cw7501_mode_data md;
int count;
@@ -720,11 +695,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-cw7501_fixate(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_fixate(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (!is_tao(trackp) && !is_packet(trackp)) {
return (scsi_flush_cache(scgp, FALSE));
@@ -739,11 +711,8 @@
/*--------------------------------------------------------------------------*/
-LOCAL int
-cw7501_gen_cue(trackp, vcuep, needgap)
- track_t *trackp;
- void *vcuep;
- BOOL needgap;
+static int
+cw7501_gen_cue(track_t *trackp, void *vcuep, BOOL needgap)
{
int tracks = trackp->tracks;
int i;
@@ -845,15 +814,14 @@
return (ncue);
}
-LOCAL void
-fillcue(cp, ca, tno, idx, dataform, scms, mp)
- struct cw7501_cue *cp; /* The target cue entry */
- int ca; /* Control/adr for this entry */
- int tno; /* Track number for this entry */
- int idx; /* Index for this entry */
- int dataform; /* Data format for this entry */
- int scms; /* Serial copy management */
- msf_t *mp; /* MSF value for this entry */
+static void
+fillcue(struct cw7501_cue *cp /* The target cue entry */,
+ int ca /* Control/adr for this entry */,
+ int tno /* Track number for this entry */,
+ int idx /* Index for this entry */,
+ int dataform /* Data format for this entry */,
+ int scms /* Serial copy management */,
+ msf_t *mp /* MSF value for this entry */)
{
cp->cs_ctladr = ca;
if (tno <= 99)
@@ -870,11 +838,8 @@
cp->cs_frame = to_bcd(mp->msf_frame);
}
-LOCAL int
-cw7501_send_cue(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+cw7501_send_cue(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct cw7501_cue *cp;
int ncue;
@@ -917,11 +882,8 @@
}
/*--------------------------------------------------------------------------*/
-LOCAL int
-cw7501_rezero(scgp, reset, dwreset)
- SCSI *scgp;
- int reset;
- int dwreset;
+static int
+cw7501_rezero(SCSI *scgp, int reset, int dwreset)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -942,13 +904,8 @@
}
-LOCAL int
-cw7501_read_trackinfo(scgp, bp, count, track, mode)
- SCSI *scgp;
- Uchar *bp;
- int count;
- int track;
- int mode;
+static int
+cw7501_read_trackinfo(SCSI *scgp, Uchar *bp, int count, int track, int mode)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -972,12 +929,8 @@
return (0);
}
-LOCAL int
-cw7501_write_dao(scgp, bp, len, disktype)
- SCSI *scgp;
- Uchar *bp;
- int len;
- int disktype;
+static int
+cw7501_write_dao(SCSI *scgp, Uchar *bp, int len, int disktype)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1003,10 +956,8 @@
* XXX CW-7501 also needs "control", so we need to make a different
* XXX driver interface.
*/
-LOCAL int
-cw7501_reserve_track(scgp, len)
- SCSI *scgp;
- unsigned long len;
+static int
+cw7501_reserve_track(SCSI *scgp, unsigned long len)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1028,17 +979,9 @@
return (0);
}
-LOCAL int
-cw7501_set_mode(scgp, phys_form, control, subc, alt, trackno, tindex, packet_size, write_mode)
- SCSI *scgp;
- int phys_form;
- int control;
- int subc;
- int alt;
- int trackno;
- int tindex;
- int packet_size;
- int write_mode;
+static int
+cw7501_set_mode(SCSI *scgp, int phys_form, int control, int subc, int alt,
+ int trackno, int tindex, int packet_size, int write_mode)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1064,11 +1007,8 @@
return (0);
}
-LOCAL int
-cw7501_finalize(scgp, pad, fixed)
- SCSI *scgp;
- int pad;
- int fixed;
+static int
+cw7501_finalize(SCSI *scgp, int pad, int fixed)
{
register struct scg_cmd *scmd = scgp->scmd;
Modified: nonameyet/branches/cleanup/cdrecord/drv_jvc.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_jvc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_jvc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -220,39 +220,39 @@
#endif
-LOCAL int teac_attach __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int teac_init __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int teac_getdisktype __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int speed_select_teac __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int select_secsize_teac __PR((SCSI *scgp, track_t *trackp));
-LOCAL int next_wr_addr_jvc __PR((SCSI *scgp, track_t *, long *ap));
-LOCAL int write_teac_xg1 __PR((SCSI *scgp, caddr_t, long, long, int, BOOL));
-LOCAL int cdr_write_teac __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int open_track_jvc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int teac_fixation __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int close_track_teac __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int teac_open_session __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int initsub_teac __PR((SCSI *scgp, int toctype, int multi));
-LOCAL int teac_doopc __PR((SCSI *scgp));
-LOCAL int teac_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
-LOCAL int opt_power_judge __PR((SCSI *scgp, int judge));
-LOCAL int clear_subcode __PR((SCSI *scgp));
-LOCAL int set_limits __PR((SCSI *scgp, long lba, long length));
-LOCAL int set_subcode __PR((SCSI *scgp, Uchar *subcode_data, int length));
-LOCAL int read_disk_info_teac __PR((SCSI *scgp, Uchar *data, int length, int type));
-LOCAL int teac_freeze __PR((SCSI *scgp, int bp_flag));
-LOCAL int teac_wr_pma __PR((SCSI *scgp));
-LOCAL int teac_rd_pma __PR((SCSI *scgp));
-LOCAL int next_wr_addr_teac __PR((SCSI *scgp, long start_lba, long last_lba));
-LOCAL int blank_jvc __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype));
-LOCAL int buf_cap_teac __PR((SCSI *scgp, long *sp, long *fp));
-LOCAL long read_peak_buffer_cap_teac __PR((SCSI *scgp));
-LOCAL int buffer_inquiry_teac __PR((SCSI *scgp, int fmt));
+static int teac_attach __PR((SCSI *scgp, cdr_t *dp));
+static int teac_init __PR((SCSI *scgp, cdr_t *dp));
+static int teac_getdisktype __PR((SCSI *scgp, cdr_t *dp));
+static int speed_select_teac __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int select_secsize_teac __PR((SCSI *scgp, track_t *trackp));
+static int next_wr_addr_jvc __PR((SCSI *scgp, track_t *, long *ap));
+static int write_teac_xg1 __PR((SCSI *scgp, caddr_t, long, long, int, BOOL));
+static int cdr_write_teac __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int open_track_jvc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int teac_fixation __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int close_track_teac __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int teac_open_session __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int initsub_teac __PR((SCSI *scgp, int toctype, int multi));
+static int teac_doopc __PR((SCSI *scgp));
+static int teac_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
+static int opt_power_judge __PR((SCSI *scgp, int judge));
+static int clear_subcode __PR((SCSI *scgp));
+static int set_limits __PR((SCSI *scgp, long lba, long length));
+static int set_subcode __PR((SCSI *scgp, Uchar *subcode_data, int length));
+static int read_disk_info_teac __PR((SCSI *scgp, Uchar *data, int length, int type));
+static int teac_freeze __PR((SCSI *scgp, int bp_flag));
+static int teac_wr_pma __PR((SCSI *scgp));
+static int teac_rd_pma __PR((SCSI *scgp));
+static int next_wr_addr_teac __PR((SCSI *scgp, long start_lba, long last_lba));
+static int blank_jvc __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype));
+static int buf_cap_teac __PR((SCSI *scgp, long *sp, long *fp));
+static long read_peak_buffer_cap_teac __PR((SCSI *scgp));
+static int buffer_inquiry_teac __PR((SCSI *scgp, int fmt));
#ifdef XXBUFFER
-LOCAL void check_buffer_teac __PR((SCSI *scgp));
+static void check_buffer_teac __PR((SCSI *scgp));
#endif
#ifdef XXDEBUG
-LOCAL void xxtest_teac __PR((SCSI *scgp));
+static void xxtest_teac __PR((SCSI *scgp));
#endif
@@ -299,18 +299,14 @@
cmd_dummy, /* opt2 */
};
-LOCAL int
-teac_init(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+teac_init(SCSI *scgp, cdr_t *dp)
{
return (speed_select_teac(scgp, dp, NULL));
}
-LOCAL int
-teac_getdisktype(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+teac_getdisktype(SCSI *scgp, cdr_t *dp)
{
dstat_t *dsp = dp->cdr_dstat;
struct scsi_mode_data md;
@@ -336,11 +332,8 @@
return (drive_getdisktype(scgp, dp));
}
-LOCAL int
-speed_select_teac(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_teac(SCSI *scgp, cdr_t *dp, int *speedp)
{
struct cdd_52x_mode_data md;
int count;
@@ -380,10 +373,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-select_secsize_teac(scgp, trackp)
- SCSI *scgp;
- track_t *trackp;
+static int
+select_secsize_teac(SCSI *scgp, track_t *trackp)
{
struct scsi_mode_data md;
int count = sizeof (struct scsi_mode_header) +
@@ -413,11 +404,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-next_wr_addr_jvc(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_jvc(SCSI *scgp, track_t *trackp, long *ap)
{
if (trackp != 0 && trackp->track > 0) {
*ap = lba_addr;
@@ -432,14 +420,13 @@
return (0);
}
-LOCAL int
-write_teac_xg1(scgp, bp, sectaddr, size, blocks, extwr)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL extwr; /* is an extended write */
+static int
+write_teac_xg1(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL extwr /* is an extended write */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -463,14 +450,13 @@
return (size - scg_getresid(scgp));
}
-LOCAL int
-cdr_write_teac(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+static int
+cdr_write_teac(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
int ret;
@@ -488,11 +474,8 @@
return (ret);
}
-LOCAL int
-open_track_jvc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_jvc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int status;
long blocks;
@@ -617,13 +600,10 @@
return (status);
}
-LOCAL char sector[3000];
+static char sector[3000];
-LOCAL int
-close_track_teac(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_teac(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int ret = 0;
@@ -708,10 +688,8 @@
NULL
};
-LOCAL int
-teac_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+teac_attach(SCSI *scgp, cdr_t *dp)
{
scg_setnonstderrs(scgp, sd_teac50_error_str);
#ifdef XXDEBUG
@@ -721,11 +699,8 @@
return (0);
}
-LOCAL int
-teac_fixation(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+teac_fixation(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
long lba;
int status;
@@ -837,11 +812,8 @@
}
-LOCAL int
-teac_open_session(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+teac_open_session(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uint i;
@@ -860,11 +832,8 @@
track_base(trackp)->tracktype & TOCF_MULTI));
}
-LOCAL int
-initsub_teac(scgp, toctype, multi)
- SCSI *scgp;
- int toctype;
- int multi;
+static int
+initsub_teac(SCSI *scgp, int toctype, int multi)
{
int status;
@@ -880,9 +849,8 @@
return (0);
}
-LOCAL int
-teac_doopc(scgp)
- SCSI *scgp;
+static int
+teac_doopc(SCSI *scgp)
{
int status;
@@ -916,12 +884,8 @@
return (status);
}
-LOCAL int
-teac_opc(scgp, bp, cnt, doopc)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int doopc;
+static int
+teac_opc(SCSI *scgp, caddr_t bp, int cnt, int doopc)
{
int status;
int count = 0;
@@ -951,10 +915,8 @@
/*
* Optimum power calibration for Teac Drives.
*/
-LOCAL int
-opt_power_judge(scgp, judge)
- SCSI *scgp;
- int judge;
+static int
+opt_power_judge(SCSI *scgp, int judge)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -978,9 +940,8 @@
/*
* Clear subcodes for Teac Drives.
*/
-LOCAL int
-clear_subcode(scgp)
- SCSI *scgp;
+static int
+clear_subcode(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1003,11 +964,8 @@
/*
* Set limits for command linking for Teac Drives.
*/
-LOCAL int
-set_limits(scgp, lba, length)
- SCSI *scgp;
- long lba;
- long length;
+static int
+set_limits(SCSI *scgp, long lba, long length)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1031,11 +989,8 @@
/*
* Set subcode for Teac Drives.
*/
-LOCAL int
-set_subcode(scgp, subcode_data, length)
- SCSI *scgp;
- Uchar *subcode_data;
- int length;
+static int
+set_subcode(SCSI *scgp, Uchar *subcode_data, int length)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1055,12 +1010,8 @@
return (scg_cmd(scgp));
}
-LOCAL int
-read_disk_info_teac(scgp, data, length, type)
- SCSI *scgp;
- Uchar *data;
- int length;
- int type;
+static int
+read_disk_info_teac(SCSI *scgp, Uchar *data, int length, int type)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1085,10 +1036,8 @@
/*
* Perform the freeze command for Teac Drives.
*/
-LOCAL int
-teac_freeze(scgp, bp_flag)
- SCSI *scgp;
- int bp_flag;
+static int
+teac_freeze(SCSI *scgp, int bp_flag)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1109,9 +1058,8 @@
return (scg_cmd(scgp));
}
-LOCAL int
-teac_wr_pma(scgp)
- SCSI *scgp;
+static int
+teac_wr_pma(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1133,9 +1081,8 @@
/*
* Read PMA for Teac Drives.
*/
-LOCAL int
-teac_rd_pma(scgp)
- SCSI *scgp;
+static int
+teac_rd_pma(SCSI *scgp)
{
unsigned char xx[256];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1180,11 +1127,8 @@
/*
* Next writable address for Teac Drives.
*/
-LOCAL int
-next_wr_addr_teac(scgp, start_lba, last_lba)
- SCSI *scgp;
- long start_lba;
- long last_lba;
+static int
+next_wr_addr_teac(SCSI *scgp, long start_lba, long last_lba)
{
unsigned char xx[256];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1220,12 +1164,8 @@
return (0);
}
-LOCAL int
-blank_jvc(scgp, dp, addr, blanktype)
- SCSI *scgp;
- cdr_t *dp;
- long addr;
- int blanktype;
+static int
+blank_jvc(SCSI *scgp, cdr_t *dp, long addr, int blanktype)
{
extern char *blank_types[];
@@ -1237,11 +1177,8 @@
return (scsi_blank(scgp, addr, blanktype, FALSE));
}
-LOCAL int
-buf_cap_teac(scgp, sp, fp)
- SCSI *scgp;
- long *sp; /* Size pointer */
- long *fp; /* Free pointer */
+static int
+buf_cap_teac(SCSI *scgp, long *sp, long *fp)
{
Ulong freespace;
Ulong bufsize;
@@ -1271,9 +1208,8 @@
return (per);
}
-LOCAL long
-read_peak_buffer_cap_teac(scgp)
- SCSI *scgp;
+static long
+read_peak_buffer_cap_teac(SCSI *scgp)
{
Uchar xx[4];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1311,10 +1247,8 @@
#define BI_448_BYTE 0x40
#define BI_APP_CODE 0x10
-LOCAL int
-buffer_inquiry_teac(scgp, fmt)
- SCSI *scgp;
- int fmt;
+static int
+buffer_inquiry_teac(SCSI *scgp, int fmt)
{
Uchar xx[448];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1363,9 +1297,8 @@
}
#ifdef XXBUFFER
-LOCAL void
-check_buffer_teac(scgp)
- SCSI *scgp;
+static void
+check_buffer_teac(SCSI *scgp)
{
printf("-------\n");
buffer_inquiry_teac(scgp, 0);
@@ -1380,12 +1313,11 @@
#ifdef XXDEBUG
#include "scsimmc.h"
-LOCAL int g7_teac __PR((SCSI *scgp));
-LOCAL int g6_teac __PR((SCSI *scgp));
+static int g7_teac __PR((SCSI *scgp));
+static int g6_teac __PR((SCSI *scgp));
-LOCAL int
-g7_teac(scgp)
- SCSI *scgp;
+static int
+g7_teac(SCSI *scgp)
{
Uchar xx[2048];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1424,9 +1356,8 @@
return (0);
}
-LOCAL int
-g6_teac(scgp)
- SCSI *scgp;
+static int
+g6_teac(SCSI *scgp)
{
Uchar xx[2048];
register struct scg_cmd *scmd = scgp->scmd;
@@ -1464,9 +1395,8 @@
return (0);
}
-LOCAL void
-xxtest_teac(scgp)
- SCSI *scgp;
+static void
+xxtest_teac(SCSI *scgp)
{
read_peak_buffer_cap_teac(scgp);
Modified: nonameyet/branches/cleanup/cdrecord/drv_mmc.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_mmc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_mmc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -70,113 +70,109 @@
extern int lverbose;
extern int xdebug;
-LOCAL int curspeed = 1;
+static int curspeed = 1;
-LOCAL char clv_to_speed[16] = {
+static char clv_to_speed[16] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
0, 2, 4, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-LOCAL char hs_clv_to_speed[16] = {
+static char hs_clv_to_speed[16] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
0, 2, 4, 6, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-LOCAL char us_clv_to_speed[16] = {
+static char us_clv_to_speed[16] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
0, 2, 4, 8, 0, 0, 16, 0, 24, 32, 40, 48, 0, 0, 0, 0
};
#ifdef __needed__
-LOCAL int mmc_load __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int mmc_unload __PR((SCSI *scgp, cdr_t *dp));
+static int mmc_load __PR((SCSI *scgp, cdr_t *dp));
+static int mmc_unload __PR((SCSI *scgp, cdr_t *dp));
#endif
-EXPORT void mmc_opthelp __PR((cdr_t *dp, int excode));
-EXPORT char *hasdrvopt __PR((char *optstr, char *optname));
-LOCAL cdr_t *identify_mmc __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *));
-LOCAL int attach_mmc __PR((SCSI *scgp, cdr_t *));
-LOCAL int attach_mdvd __PR((SCSI *scgp, cdr_t *));
-EXPORT int check_writemodes_mmc __PR((SCSI *scgp, cdr_t *dp));
-EXPORT int check_writemodes_mdvd __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int deflt_writemodes_mmc __PR((SCSI *scgp, BOOL reset_dummy));
-LOCAL int deflt_writemodes_mdvd __PR((SCSI *scgp, BOOL reset_dummy));
-LOCAL int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip));
-LOCAL void di_to_dstat __PR((struct disk_info *dip, dstat_t *dsp));
-LOCAL int get_atip __PR((SCSI *scgp, struct atipinfo *atp));
+void mmc_opthelp __PR((cdr_t *dp, int excode));
+char *hasdrvopt __PR((char *optstr, char *optname));
+static cdr_t *identify_mmc __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *));
+static int attach_mmc __PR((SCSI *scgp, cdr_t *));
+static int attach_mdvd __PR((SCSI *scgp, cdr_t *));
+int check_writemodes_mmc __PR((SCSI *scgp, cdr_t *dp));
+ int check_writemodes_mdvd __PR((SCSI *scgp, cdr_t *dp));
+static int deflt_writemodes_mmc __PR((SCSI *scgp, BOOL reset_dummy));
+static int deflt_writemodes_mdvd __PR((SCSI *scgp, BOOL reset_dummy));
+static int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip));
+static void di_to_dstat __PR((struct disk_info *dip, dstat_t *dsp));
+static int get_atip __PR((SCSI *scgp, struct atipinfo *atp));
#ifdef PRINT_ATIP
-LOCAL int get_pma __PR((SCSI *scgp));
+static int get_pma __PR((SCSI *scgp));
#endif
-LOCAL int init_mmc __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int getdisktype_mmc __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int getdisktype_mdvd __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int speed_select_mmc __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int speed_select_mdvd __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int mmc_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl));
-LOCAL int next_wr_addr_mmc __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int next_wr_addr_mdvd __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int write_leadin_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_track_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_track_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int close_track_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int close_track_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_session_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_session_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int waitfix_mmc __PR((SCSI *scgp, int secs));
-LOCAL int fixate_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int fixate_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int blank_mmc __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype));
-LOCAL int format_mdvd __PR((SCSI *scgp, cdr_t *dp, int formattype));
-LOCAL int send_opc_mmc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
-LOCAL int opt1_mmc __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int opt1_mdvd __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int opt2_mmc __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int scsi_sony_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int gen_cue_mmc __PR((track_t *trackp, void *vcuep, BOOL needgap));
-LOCAL void fillcue __PR((struct mmc_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
-LOCAL int send_cue_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int stats_mmc __PR((SCSI *scgp, cdr_t *dp));
-LOCAL BOOL mmc_isplextor __PR((SCSI *scgp));
-LOCAL BOOL mmc_isyamaha __PR((SCSI *scgp));
-LOCAL void do_varirec_plextor __PR((SCSI *scgp));
-LOCAL int do_gigarec_plextor __PR((SCSI *scgp));
-LOCAL int drivemode_plextor __PR((SCSI *scgp, caddr_t bp, int cnt, int modecode, void *modeval));
-LOCAL int drivemode2_plextor __PR((SCSI *scgp, caddr_t bp, int cnt, int modecode, void *modeval));
-LOCAL int check_varirec_plextor __PR((SCSI *scgp));
-LOCAL int check_gigarec_plextor __PR((SCSI *scgp));
-LOCAL int varirec_plextor __PR((SCSI *scgp, BOOL on, int val));
-LOCAL int gigarec_plextor __PR((SCSI *scgp, int val));
-LOCAL Int32_t gigarec_mult __PR((int code, Int32_t val));
-LOCAL int check_ss_hide_plextor __PR((SCSI *scgp));
-LOCAL int check_speed_rd_plextor __PR((SCSI *scgp));
-LOCAL int check_powerrec_plextor __PR((SCSI *scgp));
-LOCAL int ss_hide_plextor __PR((SCSI *scgp, BOOL do_ss, BOOL do_hide));
-LOCAL int speed_rd_plextor __PR((SCSI *scgp, BOOL do_speedrd));
-LOCAL int powerrec_plextor __PR((SCSI *scgp, BOOL do_powerrec));
-LOCAL int get_speeds_plextor __PR((SCSI *scgp, int *selp, int *maxp, int *lastp));
-LOCAL int bpc_plextor __PR((SCSI *scgp, int mode, int *bpp));
-LOCAL int set_audiomaster_yamaha __PR((SCSI *scgp, cdr_t *dp, BOOL keep_mode));
+static int init_mmc __PR((SCSI *scgp, cdr_t *dp));
+static int getdisktype_mmc __PR((SCSI *scgp, cdr_t *dp));
+static int getdisktype_mdvd __PR((SCSI *scgp, cdr_t *dp));
+static int speed_select_mmc __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int speed_select_mdvd __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int mmc_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl));
+static int next_wr_addr_mmc __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int next_wr_addr_mdvd __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int write_leadin_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_track_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_track_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int close_track_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int close_track_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_session_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_session_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int waitfix_mmc __PR((SCSI *scgp, int secs));
+static int fixate_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int fixate_mdvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int blank_mmc __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype));
+static int format_mdvd __PR((SCSI *scgp, cdr_t *dp, int formattype));
+static int send_opc_mmc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
+static int opt1_mmc __PR((SCSI *scgp, cdr_t *dp));
+static int opt1_mdvd __PR((SCSI *scgp, cdr_t *dp));
+static int opt2_mmc __PR((SCSI *scgp, cdr_t *dp));
+static int scsi_sony_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int gen_cue_mmc __PR((track_t *trackp, void *vcuep, BOOL needgap));
+static void fillcue __PR((struct mmc_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
+static int send_cue_mmc __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int stats_mmc __PR((SCSI *scgp, cdr_t *dp));
+static BOOL mmc_isplextor __PR((SCSI *scgp));
+static BOOL mmc_isyamaha __PR((SCSI *scgp));
+static void do_varirec_plextor __PR((SCSI *scgp));
+static int do_gigarec_plextor __PR((SCSI *scgp));
+static int drivemode_plextor __PR((SCSI *scgp, caddr_t bp, int cnt, int modecode, void *modeval));
+static int drivemode2_plextor __PR((SCSI *scgp, caddr_t bp, int cnt, int modecode, void *modeval));
+static int check_varirec_plextor __PR((SCSI *scgp));
+static int check_gigarec_plextor __PR((SCSI *scgp));
+static int varirec_plextor __PR((SCSI *scgp, BOOL on, int val));
+static int gigarec_plextor __PR((SCSI *scgp, int val));
+static Int32_t gigarec_mult __PR((int code, Int32_t val));
+static int check_ss_hide_plextor __PR((SCSI *scgp));
+static int check_speed_rd_plextor __PR((SCSI *scgp));
+static int check_powerrec_plextor __PR((SCSI *scgp));
+static int ss_hide_plextor __PR((SCSI *scgp, BOOL do_ss, BOOL do_hide));
+static int speed_rd_plextor __PR((SCSI *scgp, BOOL do_speedrd));
+static int powerrec_plextor __PR((SCSI *scgp, BOOL do_powerrec));
+static int get_speeds_plextor __PR((SCSI *scgp, int *selp, int *maxp, int *lastp));
+static int bpc_plextor __PR((SCSI *scgp, int mode, int *bpp));
+static int set_audiomaster_yamaha __PR((SCSI *scgp, cdr_t *dp, BOOL keep_mode));
-EXPORT struct ricoh_mode_page_30 * get_justlink_ricoh __PR((SCSI *scgp, Uchar *mode));
-LOCAL int force_speed_yamaha __PR((SCSI *scgp, int readspeed, int writespeed));
-LOCAL BOOL get_tattoo_yamaha __PR((SCSI *scgp, BOOL print, Int32_t *irp, Int32_t *orp));
-LOCAL int do_tattoo_yamaha __PR((SCSI *scgp, FILE *f));
-LOCAL int yamaha_write_buffer __PR((SCSI *scgp, int mode, int bufferid, long offset,
+struct ricoh_mode_page_30 * get_justlink_ricoh __PR((SCSI *scgp, Uchar *mode));
+static int force_speed_yamaha __PR((SCSI *scgp, int readspeed, int writespeed));
+static BOOL get_tattoo_yamaha __PR((SCSI *scgp, BOOL print, Int32_t *irp, Int32_t *orp));
+static int do_tattoo_yamaha __PR((SCSI *scgp, FILE *f));
+static int yamaha_write_buffer __PR((SCSI *scgp, int mode, int bufferid, long offset,
long parlen, void *buffer, long buflen));
-LOCAL int dvd_dual_layer_split __PR((SCSI *scgp, cdr_t *dp, long tsize));
+static int dvd_dual_layer_split __PR((SCSI *scgp, cdr_t *dp, long tsize));
#ifdef __needed__
-LOCAL int
-mmc_load(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+mmc_load(SCSI *scgp, cdr_t *dp)
{
return (scsi_load_unload(scgp, 1));
}
-LOCAL int
-mmc_unload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+mmc_unload(SCSI *scgp, cdr_t *dp)
{
return (scsi_load_unload(scgp, 0));
}
@@ -445,10 +441,8 @@
cmd_dummy, /* opt2 */
};
-EXPORT void
-mmc_opthelp(dp, excode)
- cdr_t *dp;
- int excode;
+void
+mmc_opthelp(cdr_t *dp, int excode)
{
BOOL haveopts = FALSE;
@@ -501,10 +495,8 @@
exit(excode);
}
-EXPORT char *
-hasdrvopt(optstr, optname)
- char *optstr;
- char *optname;
+char *
+hasdrvopt(char *optstr, char *optname)
{
char *ep;
char *np;
@@ -562,11 +554,8 @@
return (ret);
}
-LOCAL cdr_t *
-identify_mmc(scgp, dp, ip)
- SCSI *scgp;
- cdr_t *dp;
- struct scsi_inquiry *ip;
+static cdr_t *
+identify_mmc(SCSI *scgp, cdr_t *dp, struct scsi_inquiry *ip)
{
BOOL cdrr = FALSE; /* Read CD-R */
BOOL cdwr = FALSE; /* Write CD-R */
@@ -749,10 +738,8 @@
return (dp);
}
-LOCAL int
-attach_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+attach_mmc(SCSI *scgp, cdr_t *dp)
{
int ret;
Uchar mode[0x100];
@@ -951,10 +938,8 @@
return (0);
}
-LOCAL int
-attach_mdvd(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+attach_mdvd(SCSI *scgp, cdr_t *dp)
{
struct cd_mode_page_2A *mp;
@@ -988,10 +973,8 @@
return (0);
}
-EXPORT int
-check_writemodes_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+check_writemodes_mmc(SCSI *scgp, cdr_t *dp)
{
Uchar mode[0x100];
int len;
@@ -1135,10 +1118,8 @@
return (0);
}
-EXPORT int
-check_writemodes_mdvd(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+check_writemodes_mdvd(SCSI *scgp, cdr_t *dp)
{
Uchar mode[0x100];
int len;
@@ -1206,10 +1187,8 @@
return (0);
}
-LOCAL int
-deflt_writemodes_mmc(scgp, reset_dummy)
- SCSI *scgp;
- BOOL reset_dummy;
+static int
+deflt_writemodes_mmc(SCSI *scgp, BOOL reset_dummy)
{
Uchar mode[0x100];
int len;
@@ -1280,10 +1259,8 @@
return (0);
}
-LOCAL int
-deflt_writemodes_mdvd(scgp, reset_dummy)
- SCSI *scgp;
- BOOL reset_dummy;
+static int
+deflt_writemodes_mdvd(SCSI *scgp, BOOL reset_dummy)
{
Uchar mode[0x100];
int len;
@@ -1336,15 +1313,13 @@
}
#ifdef PRINT_ATIP
-LOCAL void print_di __PR((struct disk_info *dip));
-LOCAL void atip_printspeed __PR((char *fmt, int speedindex, char speedtab[]));
-LOCAL void print_atip __PR((SCSI *scgp, struct atipinfo *atp));
+static void print_di __PR((struct disk_info *dip));
+static void atip_printspeed __PR((char *fmt, int speedindex, char speedtab[]));
+static void print_atip __PR((SCSI *scgp, struct atipinfo *atp));
#endif /* PRINT_ATIP */
-LOCAL int
-get_diskinfo(scgp, dip)
- SCSI *scgp;
- struct disk_info *dip;
+static int
+get_diskinfo(SCSI *scgp, struct disk_info *dip)
{
int len;
int ret;
@@ -1369,10 +1344,8 @@
return (ret);
}
-LOCAL void
-di_to_dstat(dip, dsp)
- struct disk_info *dip;
- dstat_t *dsp;
+static void
+di_to_dstat(struct disk_info *dip, dstat_t *dsp)
{
dsp->ds_diskid = a_to_u_4_byte(dip->disk_id);
if (dip->did_v)
@@ -1409,10 +1382,8 @@
dsp->ds_trfirst_ls=dip->first_track_ls;
}
-LOCAL int
-get_atip(scgp, atp)
- SCSI *scgp;
- struct atipinfo *atp;
+static int
+get_atip(SCSI *scgp, struct atipinfo *atp)
{
int len;
int ret;
@@ -1465,10 +1436,9 @@
#ifdef PRINT_ATIP
-LOCAL int
+static int
/*get_pma(atp)*/
-get_pma(scgp)
- SCSI *scgp;
+get_pma(SCSI *scgp)
/* struct atipinfo *atp;*/
{
int len;
@@ -1508,18 +1478,14 @@
#endif /* PRINT_ATIP */
-LOCAL int
-init_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+init_mmc(SCSI *scgp, cdr_t *dp)
{
return (speed_select_mmc(scgp, dp, NULL));
}
-LOCAL int
-getdisktype_mdvd(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+getdisktype_mdvd(SCSI *scgp, cdr_t *dp)
{
int ret = 0;
dstat_t *dsp = dp->cdr_dstat;
@@ -1540,10 +1506,8 @@
}
-LOCAL int
-getdisktype_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+getdisktype_mmc(SCSI *scgp, cdr_t *dp)
{
extern char *buf;
dstat_t *dsp = dp->cdr_dstat;
@@ -1700,9 +1664,8 @@
#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]);
#define SVAL(what, val) printf(" %s: %s\n", what, val);
-LOCAL void
-print_di(dip)
- struct disk_info *dip;
+static void
+print_di(struct disk_info *dip)
{
static char *ds_name[] = { "empty", "incomplete/appendable", "complete", "illegal" };
static char *ss_name[] = { "empty", "incomplete/appendable", "illegal", "complete", };
@@ -1770,11 +1733,8 @@
"Medium Type C, high Beta category (C+)",
};
-LOCAL void
-atip_printspeed(fmt, speedindex, speedtab)
- char *fmt;
- int speedindex;
- char speedtab[];
+static void
+atip_printspeed(char *fmt, int speedindex, char speedtab[])
{
printf("%s:", fmt);
if (speedtab[speedindex] == 0) {
@@ -1785,10 +1745,8 @@
}
}
-LOCAL void
-print_atip(scgp, atp)
- SCSI *scgp;
- struct atipinfo *atp;
+static void
+print_atip(SCSI *scgp, struct atipinfo *atp)
{
char *sub_type;
char *speedvtab = clv_to_speed;
@@ -1879,11 +1837,8 @@
}
#endif /* PRINT_ATIP */
-LOCAL int
-speed_select_mmc(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_mmc(SCSI *scgp, cdr_t *dp, int *speedp)
{
Uchar mode[0x100];
Uchar moder[0x100];
@@ -2003,12 +1958,8 @@
* the minimum write speed of the drive is higher. Try to increment
* the write speed unti it gets accepted by the drive.
*/
-LOCAL int
-mmc_set_speed(scgp, readspeed, writespeed, rotctl)
- SCSI *scgp;
- int readspeed;
- int writespeed;
- int rotctl;
+static int
+mmc_set_speed(SCSI *scgp, int readspeed, int writespeed, int rotctl)
{
int rs;
int ws;
@@ -2052,11 +2003,8 @@
return (ret);
}
-LOCAL int
-speed_select_mdvd(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_mdvd(SCSI *scgp, cdr_t *dp, int *speedp)
{
int retcode;
unsigned char perf_desc[28];
@@ -2114,11 +2062,8 @@
return retcode;
}
-LOCAL int
-next_wr_addr_mmc(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_mmc(SCSI *scgp, track_t *trackp, long *ap)
{
struct track_info track_info;
long next_addr;
@@ -2158,11 +2103,8 @@
return (0);
}
-LOCAL int
-write_leadin_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+write_leadin_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uint i;
long startsec = 0L;
@@ -2213,8 +2155,8 @@
#endif
}
/* if (flags & F_RAW) {*/
- if (wm_base(dp->cdr_dstat->ds_wrmode) == WM_RAW) {
- /*
+ if (wm_base(dp->cdr_dstat->ds_wrmode) == WM_RAW) {
+ /*
* In RAW write mode, we now write the lead in (TOC).
*/
(*dp->cdr_next_wr_address)(scgp, &trackp[0], &startsec);
@@ -2250,11 +2192,8 @@
0, /* 7 */
};
-LOCAL int
-next_wr_addr_mdvd(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_mdvd(SCSI *scgp, track_t *trackp, long *ap)
{
int track=0;
struct track_info track_info;
@@ -2293,11 +2232,8 @@
return (0);
}
-LOCAL int
-open_track_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uchar mode[0x100];
int len;
@@ -2373,11 +2309,8 @@
return (0);
}
-LOCAL int
-open_track_mdvd(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_mdvd(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uchar mode[0x100];
int len;
@@ -2412,11 +2345,8 @@
return (0);
}
-LOCAL int
-close_track_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int ret;
@@ -2438,11 +2368,8 @@
return (0);
}
-LOCAL int
-close_track_mdvd(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_mdvd(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int ret;
if (!is_packet(trackp))
@@ -2472,11 +2399,8 @@
SES_DA_ROM, /* Invalid - use default */
};
-LOCAL int
-open_session_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_session_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uchar mode[0x100];
int len;
@@ -2544,11 +2468,8 @@
return (0);
}
-LOCAL int
-open_session_mdvd(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_session_mdvd(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uchar mode[0x100];
int tracks = trackp->tracks;
@@ -2622,10 +2543,8 @@
return (0);
}
-LOCAL int
-waitfix_mmc(scgp, secs)
- SCSI *scgp;
- int secs;
+static int
+waitfix_mmc(SCSI *scgp, int secs)
{
char dibuf[16];
int i;
@@ -2648,11 +2567,8 @@
#undef W_SLEEP
}
-LOCAL int
-fixate_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+fixate_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int ret = 0;
int key = 0;
@@ -2756,11 +2672,8 @@
return (ret);
}
-LOCAL int
-fixate_mdvd(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+fixate_mdvd(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
/*set a really BIG timeout and call fixate_mmc
The BIG timeout is needed in case there was a very short rzone to write at the
@@ -2797,12 +2710,8 @@
"forced format",
};
-LOCAL int
-blank_mmc(scgp, dp, addr, blanktype)
- SCSI *scgp;
- cdr_t *dp;
- long addr;
- int blanktype;
+static int
+blank_mmc(SCSI *scgp, cdr_t *dp, long addr, int blanktype)
{
BOOL cdrr = FALSE; /* Read CD-R */
BOOL cdwr = FALSE; /* Write CD-R */
@@ -2833,11 +2742,8 @@
return (ret);
}
-LOCAL int
-format_mdvd(scgp, dp, formattype)
- SCSI *scgp;
- cdr_t *dp;
- int formattype;
+static int
+format_mdvd(SCSI *scgp, cdr_t *dp, int formattype)
{
extern char *buf;
BOOL dvdwr = FALSE; /* Write DVD */
@@ -2907,12 +2813,8 @@
return (ret);
}
-LOCAL int
-send_opc_mmc(scgp, bp, cnt, doopc)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int doopc;
+static int
+send_opc_mmc(SCSI *scgp, caddr_t bp, int cnt, int doopc)
{
int ret;
@@ -2969,10 +2871,8 @@
return (0);
}
-LOCAL int
-opt1_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+opt1_mmc(SCSI *scgp, cdr_t *dp)
{
int oflags = dp->cdr_dstat->ds_cdrflags;
@@ -3052,10 +2952,8 @@
return (0);
}
-LOCAL int
-opt2_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+opt2_mmc(SCSI *scgp, cdr_t *dp)
{
Uchar mode[0x100];
Uchar moder[0x100];
@@ -3136,10 +3034,8 @@
return (0);
}
-LOCAL int
-opt1_mdvd(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+opt1_mdvd(SCSI *scgp, cdr_t *dp)
{
int oflags = dp->cdr_dstat->ds_cdrflags;
@@ -3173,14 +3069,13 @@
return (0);
}
-LOCAL int
-scsi_sony_write(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+static int
+scsi_sony_write(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
return (write_xg5(scgp, bp, sectaddr, size, blocks));
}
@@ -3204,11 +3099,8 @@
0xFF, /* 15 - Vendor specific */
};
-LOCAL int
-gen_cue_mmc(trackp, vcuep, needgap)
- track_t *trackp;
- void *vcuep;
- BOOL needgap;
+static int
+gen_cue_mmc(track_t *trackp, void *vcuep, BOOL needgap)
{
int tracks = trackp->tracks;
int i;
@@ -3344,15 +3236,14 @@
return (ncue);
}
-LOCAL void
-fillcue(cp, ca, tno, idx, dataform, scms, mp)
- struct mmc_cue *cp; /* The target cue entry */
- int ca; /* Control/adr for this entry */
- int tno; /* Track number for this entry */
- int idx; /* Index for this entry */
- int dataform; /* Data format for this entry */
- int scms; /* Serial copy management */
- msf_t *mp; /* MSF value for this entry */
+static void
+fillcue(struct mmc_cue *cp /* The target cue entry */,
+ int ca /* Control/adr for this entry */,
+ int tno /* Track number for this entry */,
+ int idx /* Index for this entry */,
+ int dataform /* Data format for this entry */,
+ int scms /* Serial copy management */,
+ msf_t *mp /* MSF value for this entry */)
{
cp->cs_ctladr = ca; /* XXX wie lead in */
cp->cs_tno = tno;
@@ -3364,11 +3255,8 @@
cp->cs_frame = mp->msf_frame;
}
-LOCAL int
-send_cue_mmc(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+send_cue_mmc(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct mmc_cue *cp;
int ncue;
@@ -3400,10 +3288,8 @@
return (ret);
}
-LOCAL int
-stats_mmc(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+stats_mmc(SCSI *scgp, cdr_t *dp)
{
Uchar mode[256];
struct ricoh_mode_page_30 *rp;
@@ -3469,9 +3355,8 @@
return (0);
}
/*--------------------------------------------------------------------------*/
-LOCAL BOOL
-mmc_isplextor(scgp)
- SCSI *scgp;
+static BOOL
+mmc_isplextor(SCSI *scgp)
{
if (scgp->inq != NULL &&
strncmp(scgp->inq->vendor_info, "PLEXTOR", 7) == 0) {
@@ -3480,9 +3365,8 @@
return (FALSE);
}
-LOCAL BOOL
-mmc_isyamaha(scgp)
- SCSI *scgp;
+static BOOL
+mmc_isyamaha(SCSI *scgp)
{
if (scgp->inq != NULL &&
strncmp(scgp->inq->vendor_info, "YAMAHA", 6) == 0) {
@@ -3491,9 +3375,8 @@
return (FALSE);
}
-LOCAL void
-do_varirec_plextor(scgp)
- SCSI *scgp;
+static void
+do_varirec_plextor(SCSI *scgp)
{
char *p;
int voff;
@@ -3531,9 +3414,8 @@
{ 0x00, 0, NULL, },
};
-LOCAL int
-do_gigarec_plextor(scgp)
- SCSI *scgp;
+static int
+do_gigarec_plextor(SCSI *scgp)
{
char *p;
int val = 0; /* Make silly GCC happy */
@@ -3561,13 +3443,8 @@
return (0);
}
-LOCAL int
-drivemode_plextor(scgp, bp, cnt, modecode, modeval)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int modecode;
- void *modeval;
+static int
+drivemode_plextor(SCSI *scgp, caddr_t bp, int cnt, int modecode, void *modeval)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -3612,13 +3489,9 @@
#define MBbb_SPEAD_READ 0x01 /* Spead Read */
/* Danach Speed auf 0xFFFF 0xFFFF setzen */
-LOCAL int
-drivemode2_plextor(scgp, bp, cnt, modecode, modeval)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int modecode;
- void *modeval;
+static int
+drivemode2_plextor(SCSI *scgp, caddr_t bp, int cnt, int modecode,
+ void *modeval)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -3649,9 +3522,8 @@
return (0);
}
-LOCAL int
-check_varirec_plextor(scgp)
- SCSI *scgp;
+static int
+check_varirec_plextor(SCSI *scgp)
{
int modecode = 2;
Uchar getmode[8];
@@ -3667,9 +3539,8 @@
return (0);
}
-LOCAL int
-check_gigarec_plextor(scgp)
- SCSI *scgp;
+static int
+check_gigarec_plextor(SCSI *scgp)
{
int modecode = 4;
Uchar getmode[8];
@@ -3685,11 +3556,8 @@
return (0);
}
-LOCAL int
-varirec_plextor(scgp, on, val)
- SCSI *scgp;
- BOOL on;
- int val;
+static int
+varirec_plextor(SCSI *scgp, BOOL on, int val)
{
int modecode = 2;
Uchar setmode[8];
@@ -3736,10 +3604,8 @@
return (0);
}
-LOCAL int
-gigarec_plextor(scgp, val)
- SCSI *scgp;
- int val;
+static int
+gigarec_plextor(SCSI *scgp, int val)
{
int modecode = 4;
Uchar setmode[8];
@@ -3785,10 +3651,8 @@
return (getmode[3]);
}
-LOCAL Int32_t
-gigarec_mult(code, val)
- int code;
- Int32_t val;
+static Int32_t
+gigarec_mult(int code, Int32_t val)
{
Int32_t add;
struct gr *gp = gr;
@@ -3804,9 +3668,8 @@
return (val + add);
}
-LOCAL int
-check_ss_hide_plextor(scgp)
- SCSI *scgp;
+static int
+check_ss_hide_plextor(SCSI *scgp)
{
int modecode = 1;
Uchar getmode[8];
@@ -3822,9 +3685,8 @@
return (getmode[2] & 0x03);
}
-LOCAL int
-check_speed_rd_plextor(scgp)
- SCSI *scgp;
+static int
+check_speed_rd_plextor(SCSI *scgp)
{
int modecode = 0xBB;
Uchar getmode[8];
@@ -3840,9 +3702,8 @@
return (getmode[2] & 0x01);
}
-LOCAL int
-check_powerrec_plextor(scgp)
- SCSI *scgp;
+static int
+check_powerrec_plextor(SCSI *scgp)
{
int modecode = 0;
Uchar getmode[8];
@@ -3861,11 +3722,8 @@
return (0);
}
-LOCAL int
-ss_hide_plextor(scgp, do_ss, do_hide)
- SCSI *scgp;
- BOOL do_ss;
- BOOL do_hide;
+static int
+ss_hide_plextor(SCSI *scgp, BOOL do_ss, BOOL do_hide)
{
int modecode = 1;
Uchar setmode[8];
@@ -3926,10 +3784,8 @@
return (0);
}
-LOCAL int
-speed_rd_plextor(scgp, do_speedrd)
- SCSI *scgp;
- BOOL do_speedrd;
+static int
+speed_rd_plextor(SCSI *scgp, BOOL do_speedrd)
{
int modecode = 0xBB;
Uchar setmode[8];
@@ -3984,10 +3840,8 @@
return (0);
}
-LOCAL int
-powerrec_plextor(scgp, do_powerrec)
- SCSI *scgp;
- BOOL do_powerrec;
+static int
+powerrec_plextor(SCSI *scgp, BOOL do_powerrec)
{
int modecode = 0;
Uchar setmode[8];
@@ -4041,12 +3895,8 @@
return (0);
}
-LOCAL int
-get_speeds_plextor(scgp, selp, maxp, lastp)
- SCSI *scgp;
- int *selp;
- int *maxp;
- int *lastp;
+static int
+get_speeds_plextor(SCSI *scgp, int *selp, int *maxp, int *lastp)
{
register struct scg_cmd *scmd = scgp->scmd;
char buf[10];
@@ -4085,11 +3935,8 @@
return (0);
}
-LOCAL int
-bpc_plextor(scgp, mode, bpp)
- SCSI *scgp;
- int mode;
- int *bpp;
+static int
+bpc_plextor(SCSI *scgp, int mode, int *bpp)
{
register struct scg_cmd *scmd = scgp->scmd;
char buf[4];
@@ -4126,11 +3973,8 @@
return (0);
}
-LOCAL int
-set_audiomaster_yamaha(scgp, dp, keep_mode)
- SCSI *scgp;
- cdr_t *dp;
- BOOL keep_mode;
+static int
+set_audiomaster_yamaha(SCSI *scgp, cdr_t *dp, BOOL keep_mode)
{
Uchar mode[0x100];
int len;
@@ -4188,10 +4032,8 @@
return (ret);
}
-EXPORT struct ricoh_mode_page_30 *
-get_justlink_ricoh(scgp, mode)
- SCSI *scgp;
- Uchar *mode;
+struct ricoh_mode_page_30 *
+get_justlink_ricoh(SCSI *scgp, Uchar *mode)
{
Uchar modec[0x100];
int len;
@@ -4234,11 +4076,8 @@
return (mp);
}
-LOCAL int
-force_speed_yamaha(scgp, readspeed, writespeed)
- SCSI *scgp;
- int readspeed;
- int writespeed;
+static int
+force_speed_yamaha(SCSI *scgp, int readspeed, int writespeed)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -4267,12 +4106,8 @@
return (0);
}
-LOCAL BOOL
-get_tattoo_yamaha(scgp, print, irp, orp)
- SCSI *scgp;
- BOOL print;
- Int32_t *irp;
- Int32_t *orp;
+static BOOL
+get_tattoo_yamaha(SCSI *scgp, BOOL print, Int32_t *irp, Int32_t *orp)
{
Uchar mode[0x100];
int len;
@@ -4323,10 +4158,8 @@
return (TRUE);
}
-LOCAL int
-do_tattoo_yamaha(scgp, f)
- SCSI *scgp;
- FILE *f;
+static int
+do_tattoo_yamaha(SCSI *scgp, FILE *f)
{
Int32_t ival = 0;
Int32_t oval = 0;
@@ -4403,15 +4236,9 @@
* Yamaha specific version of 'write buffer' that offers an additional
* Parameter Length 'parlen' parameter.
*/
-LOCAL int
-yamaha_write_buffer(scgp, mode, bufferid, offset, parlen, buffer, buflen)
- SCSI *scgp;
- int mode;
- int bufferid;
- long offset;
- long parlen;
- void *buffer;
- long buflen;
+static int
+yamaha_write_buffer(SCSI *scgp, int mode, int bufferid, long offset,
+ long parlen, void *buffer, long buflen)
{
register struct scg_cmd *scmd = scgp->scmd;
Uchar *CDB;
@@ -4437,11 +4264,8 @@
return (0);
}
-LOCAL int
-dvd_dual_layer_split(scgp, dp, tsize)
- SCSI *scgp;
- cdr_t *dp;
- long tsize;
+static int
+dvd_dual_layer_split(SCSI *scgp, cdr_t *dp, long tsize)
{
unsigned char xb[12];
int i;
Modified: nonameyet/branches/cleanup/cdrecord/drv_philips.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_philips.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_philips.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -54,38 +54,38 @@
extern int debug;
extern int lverbose;
-LOCAL int load_unload_philips __PR((SCSI *scgp, int));
-LOCAL int philips_load __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int philips_unload __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int philips_dumbload __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int philips_dumbunload __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int plasmon_buf __PR((SCSI *, long *, long *));
-LOCAL int recover_philips __PR((SCSI *scgp, cdr_t *dp, int));
-LOCAL int speed_select_yamaha __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int speed_select_philips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int speed_select_oldphilips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int speed_select_dumbphilips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int speed_select_pioneer __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int philips_init __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int philips_getdisktype __PR((SCSI *scgp, cdr_t *dp));
-LOCAL BOOL capacity_philips __PR((SCSI *scgp, long *lp));
-LOCAL int first_writable_addr_philips __PR((SCSI *scgp, long *, int, int, int, int));
-LOCAL int next_wr_addr_philips __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int reserve_track_philips __PR((SCSI *scgp, unsigned long));
-LOCAL int scsi_cdr_write_philips __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int write_track_info_philips __PR((SCSI *scgp, int));
-LOCAL int write_track_philips __PR((SCSI *scgp, long, int));
-LOCAL int open_track_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_track_plasmon __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_track_oldphilips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_track_yamaha __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int close_track_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int fixation_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int load_unload_philips __PR((SCSI *scgp, int));
+static int philips_load __PR((SCSI *scgp, cdr_t *dp));
+static int philips_unload __PR((SCSI *scgp, cdr_t *dp));
+static int philips_dumbload __PR((SCSI *scgp, cdr_t *dp));
+static int philips_dumbunload __PR((SCSI *scgp, cdr_t *dp));
+static int plasmon_buf __PR((SCSI *, long *, long *));
+static int recover_philips __PR((SCSI *scgp, cdr_t *dp, int));
+static int speed_select_yamaha __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int speed_select_philips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int speed_select_oldphilips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int speed_select_dumbphilips __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int speed_select_pioneer __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int philips_init __PR((SCSI *scgp, cdr_t *dp));
+static int philips_getdisktype __PR((SCSI *scgp, cdr_t *dp));
+static BOOL capacity_philips __PR((SCSI *scgp, long *lp));
+static int first_writable_addr_philips __PR((SCSI *scgp, long *, int, int, int, int));
+static int next_wr_addr_philips __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int reserve_track_philips __PR((SCSI *scgp, unsigned long));
+static int scsi_cdr_write_philips __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int write_track_info_philips __PR((SCSI *scgp, int));
+static int write_track_philips __PR((SCSI *scgp, long, int));
+static int open_track_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_track_plasmon __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_track_oldphilips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_track_yamaha __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int close_track_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int fixation_philips __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int philips_attach __PR((SCSI *scgp, cdr_t *));
-LOCAL int plasmon_attach __PR((SCSI *scgp, cdr_t *));
-LOCAL int ricoh_attach __PR((SCSI *scgp, cdr_t *));
-LOCAL int philips_getlilo __PR((SCSI *scgp, long *lilenp, long *lolenp));
+static int philips_attach __PR((SCSI *scgp, cdr_t *));
+static int plasmon_attach __PR((SCSI *scgp, cdr_t *));
+static int ricoh_attach __PR((SCSI *scgp, cdr_t *));
+static int philips_getlilo __PR((SCSI *scgp, long *lilenp, long *lolenp));
struct cdd_52x_mode_page_21 { /* write track information */
@@ -595,10 +595,8 @@
};
-LOCAL int
-load_unload_philips(scgp, load)
- SCSI *scgp;
- int load;
+static int
+load_unload_philips(SCSI *scgp, int load)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -617,26 +615,20 @@
return (0);
}
-LOCAL int
-philips_load(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_load(SCSI *scgp, cdr_t *dp)
{
return (load_unload_philips(scgp, 1));
}
-LOCAL int
-philips_unload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_unload(SCSI *scgp, cdr_t *dp)
{
return (load_unload_philips(scgp, 0));
}
-LOCAL int
-philips_dumbload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_dumbload(SCSI *scgp, cdr_t *dp)
{
int ret;
@@ -648,10 +640,8 @@
return (0);
}
-LOCAL int
-philips_dumbunload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_dumbunload(SCSI *scgp, cdr_t *dp)
{
int ret;
@@ -663,11 +653,10 @@
return (0);
}
-LOCAL int
-plasmon_buf(scgp, sp, fp)
- SCSI *scgp;
- long *sp; /* Size pointer */
- long *fp; /* Free space pointer */
+static int
+plasmon_buf(SCSI *scgp,
+ long *sp /* Size pointer */,
+ long *fp /* Free space pointer */)
{
/*
* There's no way to obtain these values from the
@@ -687,11 +676,8 @@
return (100); /* 100 % */
}
-LOCAL int
-recover_philips(scgp, dp, track)
- SCSI *scgp;
- cdr_t *dp;
- int track;
+static int
+recover_philips(SCSI *scgp, cdr_t *dp, int track)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -709,11 +695,8 @@
return (0);
}
-LOCAL int
-speed_select_yamaha(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_yamaha(SCSI *scgp, cdr_t *dp, int *speedp)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -759,11 +742,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-speed_select_philips(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_philips(SCSI *scgp, cdr_t *dp, int *speedp)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -808,11 +788,8 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-speed_select_pioneer(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_pioneer(SCSI *scgp, cdr_t *dp, int *speedp)
{
if (speedp != 0 && *speedp < 2) {
*speedp = 2;
@@ -822,11 +799,8 @@
return (speed_select_philips(scgp, dp, speedp));
}
-LOCAL int
-speed_select_oldphilips(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_oldphilips(SCSI *scgp, cdr_t *dp, int *speedp)
{
BOOL dummy = (dp->cdr_cmdflags & F_DUMMY) != 0;
@@ -839,21 +813,16 @@
return (0);
}
-LOCAL int
-speed_select_dumbphilips(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_dumbphilips(SCSI *scgp, cdr_t *dp, int *speedp)
{
if (speed_select_philips(scgp, dp, speedp) < 0)
return (speed_select_oldphilips(scgp, dp, speedp));
return (0);
}
-LOCAL int
-philips_init(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_init(SCSI *scgp, cdr_t *dp)
{
return ((*dp->cdr_set_speed_dummy)(scgp, dp, NULL));
}
@@ -861,10 +830,8 @@
#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what);
-LOCAL int
-philips_getdisktype(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_getdisktype(SCSI *scgp, cdr_t *dp)
{
dstat_t *dsp = dp->cdr_dstat;
char sbuf[16];
@@ -942,10 +909,8 @@
return (drive_getdisktype(scgp, dp));
}
-LOCAL BOOL
-capacity_philips(scgp, lp)
- SCSI *scgp;
- long *lp;
+static BOOL
+capacity_philips(SCSI *scgp, long *lp)
{
long l = 0L;
BOOL succeed = TRUE;
@@ -977,14 +942,9 @@
char res;
};
-LOCAL int
-first_writable_addr_philips(scgp, ap, track, isaudio, preemp, npa)
- SCSI *scgp;
- long *ap;
- int track;
- int isaudio;
- int preemp;
- int npa;
+static int
+first_writable_addr_philips(SCSI *scgp, long *ap, int track, int isaudio,
+ int preemp, int npa)
{
struct fwa fwa;
register struct scg_cmd *scmd = scgp->scmd;
@@ -1014,11 +974,8 @@
return (0);
}
-LOCAL int
-next_wr_addr_philips(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_philips(SCSI *scgp, track_t *trackp, long *ap)
{
/* if (first_writable_addr_philips(scgp, ap, 0, 0, 0, 1) < 0)*/
@@ -1027,10 +984,8 @@
return (0);
}
-LOCAL int
-reserve_track_philips(scgp, len)
- SCSI *scgp;
- unsigned long len;
+static int
+reserve_track_philips(SCSI *scgp, unsigned long len)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1049,22 +1004,19 @@
return (0);
}
-LOCAL int
-scsi_cdr_write_philips(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+static int
+scsi_cdr_write_philips(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
return (write_xg0(scgp, bp, 0, size, blocks));
}
-LOCAL int
-write_track_info_philips(scgp, sectype)
- SCSI *scgp;
- int sectype;
+static int
+write_track_info_philips(SCSI *scgp, int sectype)
{
struct cdd_52x_mode_data md;
int count = sizeof (struct scsi_mode_header) +
@@ -1080,11 +1032,9 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-LOCAL int
-write_track_philips(scgp, track, sectype)
- SCSI *scgp;
- long track; /* track number 0 == new track */
- int sectype;
+static int
+write_track_philips(SCSI *scgp, long track /* track number 0 == new track */,
+ int sectype)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1105,11 +1055,8 @@
return (0);
}
-LOCAL int
-open_track_philips(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_philips(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (select_secsize(scgp, trackp->secsize) < 0)
return (-1);
@@ -1123,11 +1070,8 @@
return (0);
}
-LOCAL int
-open_track_plasmon(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_plasmon(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (select_secsize(scgp, trackp->secsize) < 0)
return (-1);
@@ -1138,11 +1082,8 @@
return (0);
}
-LOCAL int
-open_track_oldphilips(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_oldphilips(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (write_track_philips(scgp, 0, trackp->sectype) < 0)
return (-1);
@@ -1150,11 +1091,8 @@
return (0);
}
-LOCAL int
-open_track_yamaha(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_yamaha(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (select_secsize(scgp, trackp->secsize) < 0)
return (-1);
@@ -1165,20 +1103,14 @@
return (0);
}
-LOCAL int
-close_track_philips(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_philips(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
return (scsi_flush_cache(scgp, FALSE));
}
-LOCAL int
-fixation_philips(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+fixation_philips(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1353,19 +1285,15 @@
NULL
};
-LOCAL int
-philips_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+philips_attach(SCSI *scgp, cdr_t *dp)
{
scg_setnonstderrs(scgp, sd_cdd_521_error_str);
return (0);
}
-LOCAL int
-plasmon_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+plasmon_attach(SCSI *scgp, cdr_t *dp)
{
scgp->inq->data_format = 1; /* Correct the ly */
@@ -1373,10 +1301,8 @@
return (0);
}
-LOCAL int
-ricoh_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+ricoh_attach(SCSI *scgp, cdr_t *dp)
{
if (dp == &cdr_ricoh_ro1060) {
errmsgno(EX_BAD, "No support for Ricoh RO-1060C\n");
@@ -1386,11 +1312,8 @@
return (0);
}
-LOCAL int
-philips_getlilo(scgp, lilenp, lolenp)
- SCSI *scgp;
- long *lilenp;
- long *lolenp;
+static int
+philips_getlilo(SCSI *scgp, long *lilenp, long *lolenp)
{
char buf[4];
long li, lo;
Modified: nonameyet/branches/cleanup/cdrecord/drv_simul.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_simul.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_simul.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -64,32 +64,28 @@
extern int verbose;
extern int lverbose;
-LOCAL int simul_load __PR((SCSI *scgp, cdr_t *));
-LOCAL int simul_unload __PR((SCSI *scgp, cdr_t *));
-LOCAL cdr_t *identify_simul __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *));
-LOCAL int init_simul __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int getdisktype_simul __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int speed_select_simul __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int next_wr_addr_simul __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int cdr_write_simul __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int open_track_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int close_track_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_session_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int fixate_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL void tv_sub __PR((struct timeval *tvp1, struct timeval *tvp2));
+static int simul_load __PR((SCSI *scgp, cdr_t *));
+static int simul_unload __PR((SCSI *scgp, cdr_t *));
+static cdr_t *identify_simul __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *));
+static int init_simul __PR((SCSI *scgp, cdr_t *dp));
+static int getdisktype_simul __PR((SCSI *scgp, cdr_t *dp));
+static int speed_select_simul __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int next_wr_addr_simul __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int cdr_write_simul __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int open_track_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int close_track_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_session_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int fixate_simul __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static void tv_sub __PR((struct timeval *tvp1, struct timeval *tvp2));
-LOCAL int
-simul_load(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+simul_load(SCSI *scgp, cdr_t *dp)
{
return (0);
}
-LOCAL int
-simul_unload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+simul_unload(SCSI *scgp, cdr_t *dp)
{
return (0);
}
@@ -176,36 +172,29 @@
cmd_dummy, /* opt2 */
};
-LOCAL cdr_t *
-identify_simul(scgp, dp, ip)
- SCSI *scgp;
- cdr_t *dp;
- struct scsi_inquiry *ip;
+static cdr_t *
+identify_simul(SCSI *scgp, cdr_t *dp, struct scsi_inquiry *ip)
{
return (dp);
}
-LOCAL long simul_nwa;
-LOCAL int simul_speed = 1;
-LOCAL int simul_dummy;
-LOCAL int simul_isdvd;
-LOCAL int simul_bufsize = 1024;
-LOCAL Uint sleep_rest;
-LOCAL Uint sleep_max;
-LOCAL Uint sleep_min;
+static long simul_nwa;
+static int simul_speed = 1;
+static int simul_dummy;
+static int simul_isdvd;
+static int simul_bufsize = 1024;
+static Uint sleep_rest;
+static Uint sleep_max;
+static Uint sleep_min;
-LOCAL int
-init_simul(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+init_simul(SCSI *scgp, cdr_t *dp)
{
return (speed_select_simul(scgp, dp, NULL));
}
-LOCAL int
-getdisktype_simul(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+getdisktype_simul(SCSI *scgp, cdr_t *dp)
{
dstat_t *dsp = dp->cdr_dstat;
@@ -222,11 +211,8 @@
}
-LOCAL int
-speed_select_simul(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_simul(SCSI *scgp, cdr_t *dp, int *speedp)
{
long val;
char *p;
@@ -267,11 +253,8 @@
return (0);
}
-LOCAL int
-next_wr_addr_simul(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_simul(SCSI *scgp, track_t *trackp, long *ap)
{
/*
* This will most likely not 100% correct for TAO CDs
@@ -282,20 +265,19 @@
return (0);
}
-LOCAL int
-cdr_write_simul(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+
+static int
+cdr_write_simul(SCSI *scgp, caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
Uint sleep_time;
Uint sleep_diff;
struct timeval tv1;
-static struct timeval tv2;
+ static struct timeval tv2;
if (lverbose > 1 && islast)
printf("\nWriting last record for this track.\n");
@@ -367,21 +349,15 @@
return (size);
}
-LOCAL int
-open_track_simul(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_simul(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
sleep_min = 999 * 1000000;
return (0);
}
-LOCAL int
-close_track_simul(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_simul(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (lverbose) {
printf("Remaining reserve time in drive buffer: %d.%3.3d ms\n",
@@ -396,29 +372,21 @@
return (0);
}
-LOCAL int
-open_session_simul(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_session_simul(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
simul_nwa = 0L;
return (0);
}
-LOCAL int
-fixate_simul(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+fixate_simul(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
return (0);
}
-LOCAL void
-tv_sub(tvp1, tvp2)
- struct timeval *tvp1;
- struct timeval *tvp2;
+static void
+tv_sub(struct timeval *tvp1, struct timeval *tvp2)
{
tvp1->tv_sec -= tvp2->tv_sec;
tvp1->tv_usec -= tvp2->tv_usec;
Modified: nonameyet/branches/cleanup/cdrecord/drv_sony.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/drv_sony.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/drv_sony.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -212,37 +212,37 @@
#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2))
-LOCAL int write_start_sony __PR((SCSI *scgp, caddr_t bp, int size));
-LOCAL int write_continue_sony __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-LOCAL int discontinue_sony __PR((SCSI *scgp));
-LOCAL int write_track_sony __PR((SCSI *scgp, long track, int sectype));
-LOCAL int close_track_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int flush_sony __PR((SCSI *scgp, int track));
-LOCAL int finalize_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int recover_sony __PR((SCSI *scgp, cdr_t *dp, int track));
-LOCAL int set_wr_parameter_sony __PR((SCSI *scgp, caddr_t bp, int size));
-LOCAL int next_wr_addr_sony __PR((SCSI *scgp, track_t *trackp, long *ap));
-LOCAL int reserve_track_sony __PR((SCSI *scgp, unsigned long len));
-LOCAL int init_sony __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int getdisktype_sony __PR((SCSI *scgp, cdr_t *dp));
-LOCAL void di_to_dstat_sony __PR((struct sony_924_mode_page_22 *dip, dstat_t *dsp));
-LOCAL int speed_select_sony __PR((SCSI *scgp, cdr_t *dp, int *speedp));
-LOCAL int next_writable_address_sony __PR((SCSI *scgp, long *ap, int track, int sectype, int tracktype));
-LOCAL int new_track_sony __PR((SCSI *scgp, int track, int sectype, int tracktype));
-LOCAL int open_track_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int open_session_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int abort_session_sony __PR((SCSI *scgp, cdr_t *dp));
-LOCAL int get_page22_sony __PR((SCSI *scgp, char *mode));
-LOCAL int gen_cue_sony __PR((track_t *trackp, void *vcuep, BOOL needgap));
-LOCAL void fillcue __PR((struct sony_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
-LOCAL int send_cue_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int write_leadin_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-LOCAL int sony_attach __PR((SCSI *scgp, cdr_t *dp));
+static int write_start_sony __PR((SCSI *scgp, caddr_t bp, int size));
+static int write_continue_sony __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+static int discontinue_sony __PR((SCSI *scgp));
+static int write_track_sony __PR((SCSI *scgp, long track, int sectype));
+static int close_track_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int flush_sony __PR((SCSI *scgp, int track));
+static int finalize_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int recover_sony __PR((SCSI *scgp, cdr_t *dp, int track));
+static int set_wr_parameter_sony __PR((SCSI *scgp, caddr_t bp, int size));
+static int next_wr_addr_sony __PR((SCSI *scgp, track_t *trackp, long *ap));
+static int reserve_track_sony __PR((SCSI *scgp, unsigned long len));
+static int init_sony __PR((SCSI *scgp, cdr_t *dp));
+static int getdisktype_sony __PR((SCSI *scgp, cdr_t *dp));
+static void di_to_dstat_sony __PR((struct sony_924_mode_page_22 *dip, dstat_t *dsp));
+static int speed_select_sony __PR((SCSI *scgp, cdr_t *dp, int *speedp));
+static int next_writable_address_sony __PR((SCSI *scgp, long *ap, int track, int sectype, int tracktype));
+static int new_track_sony __PR((SCSI *scgp, int track, int sectype, int tracktype));
+static int open_track_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int open_session_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int abort_session_sony __PR((SCSI *scgp, cdr_t *dp));
+static int get_page22_sony __PR((SCSI *scgp, char *mode));
+static int gen_cue_sony __PR((track_t *trackp, void *vcuep, BOOL needgap));
+static void fillcue __PR((struct sony_cue *cp, int ca, int tno, int idx, int dataform, int scms, msf_t *mp));
+static int send_cue_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int write_leadin_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+static int sony_attach __PR((SCSI *scgp, cdr_t *dp));
#ifdef SONY_DEBUG
-LOCAL void print_sony_mp22 __PR((struct sony_924_mode_page_22 *xp, int len));
-LOCAL void print_sony_mp23 __PR((struct sony_924_mode_page_23 *xp, int len));
+static void print_sony_mp22 __PR((struct sony_924_mode_page_22 *xp, int len));
+static void print_sony_mp23 __PR((struct sony_924_mode_page_23 *xp, int len));
#endif
-LOCAL int buf_cap_sony __PR((SCSI *scgp, long *, long *));
+static int buf_cap_sony __PR((SCSI *scgp, long *, long *));
cdr_t cdr_sony_cdu924 = {
0, 0,
@@ -285,11 +285,8 @@
cmd_dummy, /* opt2 */
};
-LOCAL int
-write_start_sony(scgp, bp, size)
- SCSI *scgp;
- caddr_t bp; /* address of CUE buffer */
- int size; /* number of bytes in CUE buffer */
+static int
+write_start_sony(SCSI *scgp, caddr_t bp, int size)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -311,14 +308,13 @@
return (0);
}
-LOCAL int
-write_continue_sony(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+static int
+write_continue_sony(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -344,9 +340,8 @@
return (size - scg_getresid(scgp));
}
-LOCAL int
-discontinue_sony(scgp)
- SCSI *scgp;
+static int
+discontinue_sony(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -364,11 +359,10 @@
return (0);
}
-LOCAL int
-write_track_sony(scgp, track, sectype)
- SCSI *scgp;
- long track; /* track number 0 == new track */
- int sectype; /* no sectype for Sony write track */
+static int
+write_track_sony(SCSI *scgp,
+ long track /* track number 0 == new track */,
+ int sectype /* no sectype for Sony write track */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -388,11 +382,8 @@
}
/* XXX NOCH NICHT FERTIG */
-LOCAL int
-close_track_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+close_track_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
register struct scg_cmd *scmd = scgp->scmd;
int track = 0;
@@ -428,11 +419,8 @@
return (0);
}
-LOCAL int
-finalize_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+finalize_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
register struct scg_cmd *scmd = scgp->scmd;
int dummy = track_base(trackp)->tracktype & TOCF_DUMMY;
@@ -462,10 +450,8 @@
return (0);
}
-LOCAL int
-flush_sony(scgp, track)
- SCSI *scgp;
- int track;
+static int
+flush_sony(SCSI *scgp, int track)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -488,11 +474,8 @@
return (0);
}
-LOCAL int
-recover_sony(scgp, dp, track)
- SCSI *scgp;
- cdr_t *dp;
- int track;
+static int
+recover_sony(SCSI *scgp, cdr_t *dp, int track)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -511,11 +494,8 @@
return (0);
}
-LOCAL int
-set_wr_parameter_sony(scgp, bp, size)
- SCSI *scgp;
- caddr_t bp;
- int size;
+static int
+set_wr_parameter_sony(SCSI *scgp, caddr_t bp, int size)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -536,21 +516,16 @@
return (0);
}
-LOCAL int
-next_wr_addr_sony(scgp, trackp, ap)
- SCSI *scgp;
- track_t *trackp;
- long *ap;
+static int
+next_wr_addr_sony(SCSI *scgp, track_t *trackp, long *ap)
{
if (next_writable_address_sony(scgp, ap, 0, 0, 0) < 0)
return (-1);
return (0);
}
-LOCAL int
-reserve_track_sony(scgp, len)
- SCSI *scgp;
- unsigned long len;
+static int
+reserve_track_sony(SCSI *scgp, unsigned long len)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -569,10 +544,8 @@
return (0);
}
-LOCAL int
-init_sony(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+init_sony(SCSI *scgp, cdr_t *dp)
{
return (speed_select_sony(scgp, dp, NULL));
}
@@ -580,10 +553,8 @@
#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what);
-LOCAL int
-getdisktype_sony(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+getdisktype_sony(SCSI *scgp, cdr_t *dp)
{
dstat_t *dsp = dp->cdr_dstat;
long dummy;
@@ -652,10 +623,8 @@
return (drive_getdisktype(scgp, dp));
}
-LOCAL void
-di_to_dstat_sony(dip, dsp)
- struct sony_924_mode_page_22 *dip;
- dstat_t *dsp;
+static void
+di_to_dstat_sony(struct sony_924_mode_page_22 *dip, dstat_t *dsp)
{
msf_t msf;
@@ -715,11 +684,8 @@
3, /* Quad speed */
};
-LOCAL int
-speed_select_sony(scgp, dp, speedp)
- SCSI *scgp;
- cdr_t *dp;
- int *speedp;
+static int
+speed_select_sony(SCSI *scgp, cdr_t *dp, int *speedp)
{
struct cdd_52x_mode_data md;
int count;
@@ -767,13 +733,9 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, 1));
}
-LOCAL int
-next_writable_address_sony(scgp, ap, track, sectype, tracktype)
- SCSI *scgp;
- long *ap;
- int track;
- int sectype;
- int tracktype;
+static int
+next_writable_address_sony(SCSI *scgp, long *ap, int track, int sectype,
+ int tracktype)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -809,12 +771,8 @@
}
-LOCAL int
-new_track_sony(scgp, track, sectype, tracktype)
- SCSI *scgp;
- int track;
- int sectype;
- int tracktype;
+static int
+new_track_sony(SCSI *scgp, int track, int sectype, int tracktype)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -882,11 +840,8 @@
return (0);
}
-LOCAL int
-open_track_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_track_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
if (!is_tao(trackp) && !is_packet(trackp)) {
if (trackp->pregapsize > 0 && (trackp->flags & TI_PREGAP) == 0) {
@@ -918,11 +873,8 @@
return (0);
}
-LOCAL int
-open_session_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+open_session_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct scsi_mode_page_header *mp;
char mode[256];
@@ -982,18 +934,14 @@
return (0);
}
-LOCAL int
-abort_session_sony(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+abort_session_sony(SCSI *scgp, cdr_t *dp)
{
return (discontinue_sony(scgp));
}
-LOCAL int
-get_page22_sony(scgp, mode)
- SCSI *scgp;
- char *mode;
+static int
+get_page22_sony(SCSI *scgp, char *mode)
{
struct scsi_mode_page_header *mp;
int len = 0x30;
@@ -1026,7 +974,7 @@
/*--------------------------------------------------------------------------*/
-LOCAL Uchar db2df[] = {
+static Uchar db2df[] = {
0x01, /* 0 2352 bytes of raw data */
0xFF, /* 1 2368 bytes (raw data + P/Q Subchannel) */
0xFF, /* 2 2448 bytes (raw data + P-W Subchannel) */
@@ -1045,11 +993,8 @@
0xFF, /* 15 - Vendor specific */
};
-LOCAL int
-gen_cue_sony(trackp, vcuep, needgap)
- track_t *trackp;
- void *vcuep;
- BOOL needgap;
+static int
+gen_cue_sony(track_t *trackp, void *vcuep, BOOL needgap)
{
int tracks = trackp->tracks;
int i;
@@ -1158,15 +1103,14 @@
}
-LOCAL void
-fillcue(cp, ca, tno, idx, dataform, scms, mp)
- struct sony_cue *cp; /* The target cue entry */
- int ca; /* Control/adr for this entry */
- int tno; /* Track number for this entry */
- int idx; /* Index for this entry */
- int dataform; /* Data format for this entry */
- int scms; /* Serial copy management */
- msf_t *mp; /* MSF value for this entry */
+static void
+fillcue(struct sony_cue *cp /* The target cue entry */,
+ int ca /* Control/adr for this entry */,
+ int tno /* Track number for this entry */,
+ int idx /* Index for this entry */,
+ int dataform /* Data format for this entry */,
+ int scms /* Serial copy management */,
+ msf_t *mp /* MSF value for this entry */)
{
cp->cs_ctladr = ca;
if (tno <= 99)
@@ -1181,11 +1125,8 @@
cp->cs_frame = to_bcd(mp->msf_frame);
}
-LOCAL int
-send_cue_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+send_cue_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
struct sony_cue *cp;
int ncue;
@@ -1227,11 +1168,8 @@
return (ret);
}
-LOCAL int
-write_leadin_sony(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+static int
+write_leadin_sony(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
Uint i;
long startsec = 0L;
@@ -1327,10 +1265,8 @@
NULL
};
-LOCAL int
-sony_attach(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+static int
+sony_attach(SCSI *scgp, cdr_t *dp)
{
if (scgp->inq != NULL) {
if (strbeg("CD-R CDU94", scgp->inq->prod_ident)) {
@@ -1342,10 +1278,8 @@
}
#ifdef SONY_DEBUG
-LOCAL void
-print_sony_mp22(xp, len)
- struct sony_924_mode_page_22 *xp;
- int len;
+static void
+print_sony_mp22(struct sony_924_mode_page_22 *xp, int len)
{
printf("disk style: %X\n", xp->disk_style);
printf("disk type: %X\n", xp->disk_type);
@@ -1362,10 +1296,8 @@
printf("lead in start: %lX\n", a_to_u_4_byte(xp->lead_in_start));
}
-LOCAL void
-print_sony_mp23(xp, len)
- struct sony_924_mode_page_23 *xp;
- int len;
+static void
+print_sony_mp23(struct sony_924_mode_page_23 *xp, int len)
{
printf("len: %d\n", len);
@@ -1388,11 +1320,8 @@
}
#endif
-LOCAL int
-buf_cap_sony(scgp, sp, fp)
- SCSI *scgp;
- long *sp; /* Size pointer */
- long *fp; /* Free pointer */
+static int
+buf_cap_sony(SCSI *scgp, long *sp, long *fp)
{
char resp[8];
Ulong freespace;
Modified: nonameyet/branches/cleanup/cdrecord/fifo.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/fifo.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/fifo.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -175,49 +175,48 @@
#define READER_DELAY (80*MSECS)
#define READER_MAXWAIT (240*SECS) /* 240 seconds max wait for reader */
-LOCAL char *buf;
-LOCAL char *bufbase;
-LOCAL char *bufend;
-LOCAL long buflen; /* The size of the FIFO buffer */
+static char *buf;
+static char *bufbase;
+static char *bufend;
+static long buflen; /* The size of the FIFO buffer */
extern int debug;
extern int lverbose;
-EXPORT void init_fifo __PR((long));
+void init_fifo __PR((long));
#ifdef USE_MMAP
-LOCAL char *mkshare __PR((int size));
+static char *mkshare __PR((int size));
#endif
#ifdef USE_USGSHM
-LOCAL char *mkshm __PR((int size));
+static char *mkshm __PR((int size));
#endif
#ifdef USE_OS2SHM
-LOCAL char *mkos2shm __PR((int size));
+static char *mkos2shm __PR((int size));
#endif
#ifdef USE_BEOS_AREAS
-LOCAL char *mkbeosshm __PR((int size));
-LOCAL void beosshm_child __PR((void));
+static char *mkbeosshm __PR((int size));
+static void beosshm_child __PR((void));
#endif
-EXPORT BOOL init_faio __PR((track_t *trackp, int));
-EXPORT BOOL await_faio __PR((void));
-EXPORT void kill_faio __PR((void));
-EXPORT int wait_faio __PR((void));
-LOCAL void faio_reader __PR((track_t *trackp));
-LOCAL void faio_read_track __PR((track_t *trackp));
-LOCAL void faio_wait_on_buffer __PR((faio_t *f, fowner_t s,
+BOOL init_faio __PR((track_t *trackp, int));
+BOOL await_faio __PR((void));
+void kill_faio __PR((void));
+int wait_faio __PR((void));
+static void faio_reader __PR((track_t *trackp));
+static void faio_read_track __PR((track_t *trackp));
+static void faio_wait_on_buffer __PR((faio_t *f, fowner_t s,
unsigned long delay,
unsigned long max_wait));
-LOCAL int faio_read_segment __PR((int fd, faio_t *f, track_t *track, long secno, int len));
-LOCAL faio_t *faio_ref __PR((int n));
-EXPORT int faio_read_buf __PR((int f, char *bp, int size));
-EXPORT int faio_get_buf __PR((int f, char **bpp, int size));
-EXPORT void fifo_stats __PR((void));
-EXPORT int fifo_percent __PR((BOOL addone));
+static int faio_read_segment __PR((int fd, faio_t *f, track_t *track, long secno, int len));
+static faio_t *faio_ref __PR((int n));
+int faio_read_buf __PR((int f, char *bp, int size));
+int faio_get_buf __PR((int f, char **bpp, int size));
+void fifo_stats __PR((void));
+int fifo_percent __PR((BOOL addone));
-EXPORT void
-init_fifo(fs)
- long fs;
+void
+init_fifo(long fs)
{
int pagesize;
@@ -265,9 +264,8 @@
}
#ifdef USE_MMAP
-LOCAL char *
-mkshare(size)
- int size;
+static char *
+mkshare(int size)
{
int f;
char *addr;
@@ -297,9 +295,8 @@
#ifdef USE_USGSHM
#include <sys/ipc.h>
#include <sys/shm.h>
-LOCAL char *
-mkshm(size)
- int size;
+static char *
+mkshm(int size)
{
int id;
char *addr;
@@ -345,9 +342,8 @@
#endif
#ifdef USE_OS2SHM
-LOCAL char *
-mkos2shm(size)
- int size;
+static char *
+mkos2shm(int size)
{
char *addr;
@@ -367,13 +363,12 @@
#endif
#ifdef USE_BEOS_AREAS
-LOCAL area_id faio_aid;
-LOCAL void *faio_addr;
-LOCAL char faio_name[32];
+static area_id faio_aid;
+static void *faio_addr;
+static char faio_name[32];
-LOCAL char *
-mkbeosshm(size)
- int size;
+static char *
+mkbeosshm(int size)
{
snprintf(faio_name, sizeof (faio_name), "cdrecord FIFO %lld",
(Llong)getpid());
@@ -391,7 +386,7 @@
return (faio_addr);
}
-LOCAL void
+static void
beosshm_child()
{
/*
@@ -411,14 +406,14 @@
}
#endif
-LOCAL int faio_buffers;
-LOCAL int faio_buf_size;
-LOCAL int buf_idx = 0; /* Initialize to fix an Amiga bug */
-LOCAL int buf_idx_reader = 0; /* Separate var to allow vfork() */
+static int faio_buffers;
+static int faio_buf_size;
+static int buf_idx = 0; /* Initialize to fix an Amiga bug */
+static int buf_idx_reader = 0; /* Separate var to allow vfork() */
/* buf_idx_reader is for the process */
/* that fills the FIFO */
-LOCAL pid_t faio_pid;
-LOCAL BOOL faio_didwait;
+static pid_t faio_pid;
+static BOOL faio_didwait;
#ifdef AMIGA
/*
@@ -437,10 +432,8 @@
/*#define faio_ref(n) (&((faio_t *)buf)[n])*/
-EXPORT BOOL
-init_faio(trackp, bufsize)
- track_t *trackp;
- int bufsize; /* The size of a single transfer buffer */
+BOOL
+init_faio(track_t *trackp, int bufsize)
{
int n;
faio_t *f;
@@ -547,7 +540,7 @@
return (TRUE);
}
-EXPORT BOOL
+BOOL
await_faio()
{
int n;
@@ -584,14 +577,14 @@
return (TRUE);
}
-EXPORT void
+void
kill_faio()
{
if (faio_pid > 0)
kill(faio_pid, SIGKILL);
}
-EXPORT int
+int
wait_faio()
{
if (faio_pid > 0 && !faio_didwait)
@@ -600,9 +593,8 @@
return (0);
}
-LOCAL void
-faio_reader(trackp)
- track_t *trackp;
+static void
+faio_reader(track_t *trackp)
{
/* This function should not return, but _exit. */
Uint trackno;
@@ -634,18 +626,16 @@
}
#ifndef faio_ref
-LOCAL faio_t *
-faio_ref(n)
- int n;
+static faio_t *
+faio_ref(int n)
{
return (&((faio_t *)buf)[n]);
}
#endif
-LOCAL void
-faio_read_track(trackp)
- track_t *trackp;
+static void
+faio_read_track(track_t *trackp)
{
int fd = -1;
int bytespt = trackp->secsize * trackp->secspt;
@@ -687,17 +677,13 @@
xclose(trackp->xfp); /* Don't keep files open longer than neccesary */
}
-LOCAL void
+static void
#ifdef PROTOTYPES
faio_wait_on_buffer(faio_t *f, fowner_t s,
unsigned long delay,
unsigned long max_wait)
#else
-faio_wait_on_buffer(f, s, delay, max_wait)
- faio_t *f;
- fowner_t s;
- unsigned long delay;
- unsigned long max_wait;
+faio_wait_on_buffer(faio_t *f, fowner_t *s, unsigned long delay, unsigned long max_wait)
#endif
{
unsigned long max_loops;
@@ -729,13 +715,8 @@
(s > owner_reader || s < owner_none) ? "bad_owner" : onames[s-owner_none]);
}
-LOCAL int
-faio_read_segment(fd, f, trackp, secno, len)
- int fd;
- faio_t *f;
- track_t *trackp;
- long secno;
- int len;
+static int
+faio_read_segment(int fd, faio_t *f, track_t *trackp, long secno, int len)
{
int l;
@@ -753,11 +734,8 @@
return (l);
}
-EXPORT int
-faio_read_buf(fd, bp, size)
- int fd;
- char *bp;
- int size;
+int
+faio_read_buf(int fd, char *bp, int size)
{
char *bufp;
@@ -768,11 +746,8 @@
return (len);
}
-EXPORT int
-faio_get_buf(fd, bpp, size)
- int fd;
- char **bpp;
- int size;
+int
+faio_get_buf(int fd, char **bpp, int size)
{
faio_t *f;
int len;
@@ -822,7 +797,7 @@
return (len);
}
-EXPORT void
+void
fifo_stats()
{
if (sp == NULL) /* We might not use a FIFO */
@@ -834,9 +809,8 @@
sp->empty, sp->full, (100L*sp->cont_low)/faio_buffers);
}
-EXPORT int
-fifo_percent(addone)
- BOOL addone;
+int
+fifo_percent(BOOL addone)
{
int percent;
@@ -858,75 +832,57 @@
#include "cdrecord.h"
-EXPORT void init_fifo __PR((long));
-EXPORT BOOL init_faio __PR((track_t *track, int));
-EXPORT BOOL await_faio __PR((void));
-EXPORT void kill_faio __PR((void));
-EXPORT int wait_faio __PR((void));
-EXPORT int faio_read_buf __PR((int f, char *bp, int size));
-EXPORT int faio_get_buf __PR((int f, char **bpp, int size));
-EXPORT void fifo_stats __PR((void));
-EXPORT int fifo_percent __PR((BOOL addone));
+void init_fifo __PR((long));
+BOOL init_faio __PR((track_t *track, int));
+BOOL await_faio __PR((void));
+void kill_faio __PR((void));
+int wait_faio __PR((void));
+int faio_read_buf __PR((int f, char *bp, int size));
+int faio_get_buf __PR((int f, char **bpp, int size));
+void fifo_stats __PR((void));
+int fifo_percent __PR((BOOL addone));
-EXPORT void
-init_fifo(fs)
- long fs;
+void init_fifo(long fs)
{
errmsgno(EX_BAD, "Fifo not supported.\n");
}
-EXPORT BOOL
-init_faio(track, bufsize)
- track_t *track;
- int bufsize;
+BOOL init_faio(track_t *track,
+ int bufsize /* The size of a single transfer buffer */)
{
return (FALSE);
}
-EXPORT BOOL
-await_faio()
+BOOL await_faio()
{
return (TRUE);
}
-EXPORT void
-kill_faio()
+void kill_faio()
{
}
-EXPORT int
-wait_faio()
+int wait_faio()
{
return (0);
}
-EXPORT int
-faio_read_buf(fd, bp, size)
- int fd;
- char *bp;
- int size;
+int faio_read_buf(int fd, char *bp, int size)
{
return (0);
}
-EXPORT int
-faio_get_buf(fd, bpp, size)
- int fd;
- char **bpp;
- int size;
+int faio_get_buf(int fd, char **bpp, int size)
{
return (0);
}
-EXPORT void
-fifo_stats()
+void fifo_stats()
{
}
-EXPORT int
-fifo_percent(addone)
- BOOL addone;
+int fifo_percent(BOOL addone)
{
return (-1);
}
Modified: nonameyet/branches/cleanup/cdrecord/getnum.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/getnum.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/getnum.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -40,14 +40,12 @@
#include <utypes.h>
#include <schily.h>
-LOCAL Llong number __PR((char *arg, int *retp));
-EXPORT int getnum __PR((char *arg, long *valp));
-EXPORT int getllnum __PR((char *arg, Llong *lvalp));
+static Llong number __PR((char *arg, int *retp));
+int getnum __PR((char *arg, long *valp));
+int getllnum __PR((char *arg, Llong *lvalp));
-LOCAL Llong
-number(arg, retp)
- register char *arg;
- int *retp;
+static Llong
+number(register char *arg, int *retp)
{
Llong val = 0;
@@ -102,10 +100,8 @@
return (val);
}
-EXPORT int
-getnum(arg, valp)
- char *arg;
- long *valp;
+int
+getnum(char *arg, long *valp)
{
Llong llval;
int ret = 1;
@@ -121,10 +117,8 @@
return (ret);
}
-EXPORT int
-getllnum(arg, lvalp)
- char *arg;
- Llong *lvalp;
+int
+getllnum(char *arg, Llong *lvalp)
{
int ret = 1;
Modified: nonameyet/branches/cleanup/cdrecord/isosize.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/isosize.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/isosize.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -46,8 +46,7 @@
Llong isosize __PR((int f));
Llong
-isosize(f)
- int f;
+isosize(int f)
{
struct iso9660_voldesc vd;
struct iso9660_pr_voldesc *vp;
Modified: nonameyet/branches/cleanup/cdrecord/misc.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/misc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/misc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -41,15 +41,13 @@
#include <standard.h>
#include <schily.h>
-EXPORT void timevaldiff __PR((struct timeval *start, struct timeval *stop));
-EXPORT void prtimediff __PR((const char *fmt,
+void timevaldiff __PR((struct timeval *start, struct timeval *stop));
+void prtimediff __PR((const char *fmt,
struct timeval *start,
struct timeval *stop));
-EXPORT void
-timevaldiff(start, stop)
- struct timeval *start;
- struct timeval *stop;
+void
+timevaldiff(struct timeval *start, struct timeval *stop)
{
struct timeval tv;
@@ -66,11 +64,8 @@
*stop = tv;
}
-EXPORT void
-prtimediff(fmt, start, stop)
- const char *fmt;
- struct timeval *start;
- struct timeval *stop;
+void
+prtimediff(const char *fmt, struct timeval *start, struct timeval *stop)
{
struct timeval tv;
Modified: nonameyet/branches/cleanup/cdrecord/modes.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/modes.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/modes.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -45,25 +45,21 @@
#include "cdrecord.h"
-EXPORT int scsi_compliant;
+int scsi_compliant;
-LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp));
-EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename,
+static BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp));
+BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename,
Uchar *modep, Uchar *cmodep,
Uchar *dmodep, Uchar *smodep,
int *lenp));
-EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep,
+BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep,
int len, int save, int secsize));
#define XXX
#ifdef XXX
-LOCAL BOOL
-has_mode_page(scgp, page, pagename, lenp)
- SCSI *scgp;
- int page;
- char *pagename;
- int *lenp;
+static BOOL
+has_mode_page(SCSI *scgp, int page, char *pagename, int *lenp)
{
Uchar mode[0x100];
int hdlen;
@@ -180,16 +176,9 @@
}
#endif
-EXPORT BOOL
-get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp)
- SCSI *scgp;
- int page;
- char *pagename;
- Uchar *modep;
- Uchar *cmodep;
- Uchar *dmodep;
- Uchar *smodep;
- int *lenp;
+BOOL
+get_mode_params(SCSI *scgp, int page, char *pagename, Uchar *modep,
+ Uchar *cmodep, Uchar *dmodep, Uchar *smodep, int *lenp)
{
int len;
BOOL ret = TRUE;
@@ -266,14 +255,9 @@
return (ret);
}
-EXPORT BOOL
-set_mode_params(scgp, pagename, modep, len, save, secsize)
- SCSI *scgp;
- char *pagename;
- Uchar *modep;
- int len;
- int save;
- int secsize;
+BOOL
+set_mode_params(SCSI *scgp, char *pagename, Uchar *modep, int len, int save,
+ int secsize)
{
int i;
Modified: nonameyet/branches/cleanup/cdrecord/movesect.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/movesect.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/movesect.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -41,7 +41,7 @@
#include "cdrecord.h"
#include "movesect.h"
-EXPORT void scatter_secs __PR((track_t *trackp, char *bp, int nsecs));
+void scatter_secs __PR((track_t *trackp, char *bp, int nsecs));
/*
* Scatter input sector size records over buffer to make them
@@ -72,11 +72,8 @@
*
* Sector_0 must never be moved.
*/
-EXPORT void
-scatter_secs(trackp, bp, nsecs)
- track_t *trackp;
- char *bp;
- int nsecs;
+void
+scatter_secs(track_t *trackp, char *bp, int nsecs)
{
char *from;
char *to;
Modified: nonameyet/branches/cleanup/cdrecord/scsi_cdr.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/scsi_cdr.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/scsi_cdr.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -74,98 +74,97 @@
#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2))
-EXPORT BOOL unit_ready __PR((SCSI *scgp));
-EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs));
-EXPORT BOOL scsi_in_progress __PR((SCSI *scgp));
-EXPORT BOOL cdr_underrun __PR((SCSI *scgp));
-EXPORT int test_unit_ready __PR((SCSI *scgp));
-EXPORT int rezero_unit __PR((SCSI *scgp));
-EXPORT int request_sense __PR((SCSI *scgp));
-EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt));
-EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int));
-EXPORT int read_capacity __PR((SCSI *scgp));
-EXPORT void print_capacity __PR((SCSI *scgp, FILE *f));
-EXPORT int scsi_load_unload __PR((SCSI *scgp, int));
-EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int));
-EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed));
-EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl));
-EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp));
-EXPORT int qic02 __PR((SCSI *scgp, int));
-EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int));
-EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int));
-EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int));
-EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int));
-EXPORT int seek_scsi __PR((SCSI *scgp, long addr));
-EXPORT int seek_g0 __PR((SCSI *scgp, long addr));
-EXPORT int seek_g1 __PR((SCSI *scgp, long addr));
-EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed));
-EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode));
-EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset));
-EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track,
+BOOL unit_ready __PR((SCSI *scgp));
+BOOL wait_unit_ready __PR((SCSI *scgp, int secs));
+BOOL scsi_in_progress __PR((SCSI *scgp));
+BOOL cdr_underrun __PR((SCSI *scgp));
+int test_unit_ready __PR((SCSI *scgp));
+int rezero_unit __PR((SCSI *scgp));
+int request_sense __PR((SCSI *scgp));
+int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt));
+int inquiry __PR((SCSI *scgp, caddr_t, int));
+int read_capacity __PR((SCSI *scgp));
+void print_capacity __PR((SCSI *scgp, FILE *f));
+int scsi_load_unload __PR((SCSI *scgp, int));
+int scsi_prevent_removal __PR((SCSI *scgp, int));
+int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed));
+int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl));
+int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp));
+int qic02 __PR((SCSI *scgp, int));
+int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int));
+int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int));
+int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int));
+int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int));
+int seek_scsi __PR((SCSI *scgp, long addr));
+int seek_g0 __PR((SCSI *scgp, long addr));
+int seek_g1 __PR((SCSI *scgp, long addr));
+int scsi_flush_cache __PR((SCSI *scgp, BOOL immed));
+int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode));
+int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset));
+int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track,
int cnt, int msf, int subq, int fmt));
-EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int));
-EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int));
-EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int));
-EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int));
-EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt));
-EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt));
-EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size));
-EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int addr, int layer, int fmt));
-EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int layer, int fmt));
-EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
-EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int));
-EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed));
-EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt));
-EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size));
-EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *));
-EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed));
-EXPORT int scsi_format __PR((SCSI *scgp, caddr_t addr, int size, BOOL background));
-EXPORT int scsi_set_streaming __PR((SCSI *scgp, caddr_t addr, int size));
-EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new));
-EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int));
-EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
-EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int));
-EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
-EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int));
-EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int));
-EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
-EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
-EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *));
-EXPORT int read_cdtext __PR((SCSI *scgp));
-EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *));
-EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop));
-EXPORT int read_session_offset __PR((SCSI *scgp, long *));
-EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *));
-EXPORT int sense_secsize __PR((SCSI *scgp, int current));
-EXPORT int select_secsize __PR((SCSI *scgp, int));
-EXPORT BOOL is_cddrive __PR((SCSI *scgp));
-EXPORT BOOL is_unknown_dev __PR((SCSI *scgp));
-EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int));
-EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int));
-EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int));
-EXPORT BOOL getdev __PR((SCSI *scgp, BOOL));
-EXPORT void printinq __PR((SCSI *scgp, FILE *f));
-EXPORT void printdev __PR((SCSI *scgp));
-EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL));
-EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *));
-EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *));
-EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *));
-EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
-EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep));
-EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp,
+int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int));
+int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int));
+int read_header __PR((SCSI *scgp, caddr_t, long, int, int));
+int read_disk_info __PR((SCSI *scgp, caddr_t, int));
+int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt));
+int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt));
+int reserve_tr_rzone __PR((SCSI *scgp, long size));
+int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int addr, int layer, int fmt));
+int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int layer, int fmt));
+int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc));
+int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int));
+int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed));
+int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt));
+int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size));
+int read_buff_cap __PR((SCSI *scgp, long *, long *));
+int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed));
+int scsi_format __PR((SCSI *scgp, caddr_t addr, int size, BOOL background));
+int scsi_set_streaming __PR((SCSI *scgp, caddr_t addr, int size));
+BOOL allow_atapi __PR((SCSI *scgp, BOOL new));
+int mode_select __PR((SCSI *scgp, Uchar *, int, int, int));
+int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
+int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int));
+int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
+int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int));
+int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int));
+int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
+int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf));
+int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *));
+int read_cdtext __PR((SCSI *scgp));
+int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *));
+int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop));
+int read_session_offset __PR((SCSI *scgp, long *));
+int read_session_offset_philips __PR((SCSI *scgp, long *));
+int sense_secsize __PR((SCSI *scgp, int current));
+int select_secsize __PR((SCSI *scgp, int));
+BOOL is_cddrive __PR((SCSI *scgp));
+BOOL is_unknown_dev __PR((SCSI *scgp));
+int read_scsi __PR((SCSI *scgp, caddr_t, long, int));
+int read_g0 __PR((SCSI *scgp, caddr_t, long, int));
+int read_g1 __PR((SCSI *scgp, caddr_t, long, int));
+BOOL getdev __PR((SCSI *scgp, BOOL));
+void printinq __PR((SCSI *scgp, FILE *f));
+void printdev __PR((SCSI *scgp));
+BOOL do_inquiry __PR((SCSI *scgp, BOOL));
+BOOL recovery_needed __PR((SCSI *scgp, cdr_t *));
+int scsi_load __PR((SCSI *scgp, cdr_t *));
+int scsi_unload __PR((SCSI *scgp, cdr_t *));
+int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast));
+struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep));
+void mmc_getval __PR((struct cd_mode_page_2A *mp,
BOOL *cdrrp, BOOL *cdwrp,
BOOL *cdrrwp, BOOL *cdwrwp,
BOOL *dvdp, BOOL *dvdwp));
-EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp));
-EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp,
+BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp));
+BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp,
BOOL *cdrrwp, BOOL *cdwrwp,
BOOL *dvdp, BOOL *dvdwp));
-LOCAL void print_speed __PR((char *fmt, int val));
-EXPORT void print_capabilities __PR((SCSI *scgp));
+static void print_speed __PR((char *fmt, int val));
+void print_capabilities __PR((SCSI *scgp));
-EXPORT BOOL
-unit_ready(scgp)
- SCSI *scgp;
+BOOL
+unit_ready(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -195,10 +194,8 @@
return (scg_sense_key(scgp) != SC_NOT_READY);
}
-EXPORT BOOL
-wait_unit_ready(scgp, secs)
- SCSI *scgp;
- int secs;
+BOOL
+wait_unit_ready(SCSI *scgp, int secs)
{
int i;
int c;
@@ -242,9 +239,8 @@
return (TRUE);
}
-EXPORT BOOL
-scsi_in_progress(scgp)
- SCSI *scgp;
+BOOL
+scsi_in_progress(SCSI *scgp)
{
if (scg_sense_key(scgp) == SC_NOT_READY &&
/*
@@ -262,9 +258,8 @@
return (FALSE);
}
-EXPORT BOOL
-cdr_underrun(scgp)
- SCSI *scgp;
+BOOL
+cdr_underrun(SCSI *scgp)
{
if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST &&
scg_sense_key(scgp) != SC_MEDIUM_ERROR))
@@ -286,9 +281,8 @@
return (FALSE);
}
-EXPORT int
-test_unit_ready(scgp)
- SCSI *scgp;
+int
+test_unit_ready(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -306,9 +300,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-rezero_unit(scgp)
- SCSI *scgp;
+int
+rezero_unit(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -326,9 +319,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-request_sense(scgp)
- SCSI *scgp;
+int
+request_sense(SCSI *scgp)
{
char sensebuf[CCS_SENSE_LEN];
register struct scg_cmd *scmd = scgp->scmd;
@@ -352,11 +344,8 @@
return (0);
}
-EXPORT int
-request_sense_b(scgp, bp, cnt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
+int
+request_sense_b(SCSI *scgp, caddr_t bp, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -378,11 +367,8 @@
return (0);
}
-EXPORT int
-inquiry(scgp, bp, cnt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
+int
+inquiry(SCSI *scgp, caddr_t bp, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -406,9 +392,8 @@
return (0);
}
-EXPORT int
-read_capacity(scgp)
- SCSI *scgp;
+int
+read_capacity(SCSI *scgp)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -442,10 +427,8 @@
return (0);
}
-EXPORT void
-print_capacity(scgp, f)
- SCSI *scgp;
- FILE *f;
+void
+print_capacity(SCSI *scgp, FILE *f)
{
long kb;
long mb;
@@ -461,10 +444,8 @@
fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize);
}
-EXPORT int
-scsi_load_unload(scgp, load)
- SCSI *scgp;
- int load;
+int
+scsi_load_unload(SCSI *scgp, int load)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -484,10 +465,8 @@
return (0);
}
-EXPORT int
-scsi_prevent_removal(scgp, prevent)
- SCSI *scgp;
- int prevent;
+int
+scsi_prevent_removal(SCSI *scgp, int prevent)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -507,12 +486,8 @@
}
-EXPORT int
-scsi_start_stop_unit(scgp, flg, loej, immed)
- SCSI *scgp;
- int flg;
- int loej;
- BOOL immed;
+int
+scsi_start_stop_unit(SCSI *scgp, int flg, int loej, BOOL immed)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -532,11 +507,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-scsi_set_streaming(scgp, perf_desc, size)
- SCSI *scgp;
- caddr_t perf_desc;
- int size;
+int
+scsi_set_streaming(SCSI *scgp, caddr_t perf_desc, int size)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -558,12 +530,8 @@
return (0);
}
-EXPORT int
-scsi_set_speed(scgp, readspeed, writespeed, rotctl)
- SCSI *scgp;
- int readspeed;
- int writespeed;
- int rotctl;
+int
+scsi_set_speed(SCSI *scgp, int readspeed, int writespeed, int rotctl)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -592,11 +560,8 @@
return (0);
}
-EXPORT int
-scsi_get_speed(scgp, readspeedp, writespeedp)
- SCSI *scgp;
- int *readspeedp;
- int *writespeedp;
+int
+scsi_get_speed(SCSI *scgp, int *readspeedp, int *writespeedp)
{
struct cd_mode_page_2A *mp;
Uchar m[256];
@@ -623,10 +588,8 @@
}
-EXPORT int
-qic02(scgp, cmd)
- SCSI *scgp;
- int cmd;
+int
+qic02(SCSI *scgp, int cmd)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -646,13 +609,7 @@
#define G0_MAXADDR 0x1FFFFFL
-EXPORT int
-write_xscsi(scgp, bp, addr, size, cnt)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long addr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int cnt; /* sectorcount */
+int write_xscsi(SCSI *scgp, caddr_t bp, long addr, long size, int cnt)
{
if (addr <= G0_MAXADDR)
return (write_xg0(scgp, bp, addr, size, cnt));
@@ -660,13 +617,11 @@
return (write_xg1(scgp, bp, addr, size, cnt));
}
-EXPORT int
-write_xg0(scgp, bp, addr, size, cnt)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long addr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int cnt; /* sectorcount */
+int write_xg0(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long addr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int cnt /* sectorcount */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -689,13 +644,11 @@
return (size - scg_getresid(scgp));
}
-EXPORT int
-write_xg1(scgp, bp, addr, size, cnt)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long addr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int cnt; /* sectorcount */
+int write_xg1(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long addr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int cnt /* sectorcount */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -718,13 +671,11 @@
return (size - scg_getresid(scgp));
}
-EXPORT int
-write_xg5(scgp, bp, addr, size, cnt)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long addr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int cnt; /* sectorcount */
+int write_xg5(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long addr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int cnt /* sectorcount */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -747,10 +698,8 @@
return (size - scg_getresid(scgp));
}
-EXPORT int
-seek_scsi(scgp, addr)
- SCSI *scgp;
- long addr;
+int
+seek_scsi(SCSI *scgp, long addr)
{
if (addr <= G0_MAXADDR)
return (seek_g0(scgp, addr));
@@ -758,10 +707,8 @@
return (seek_g1(scgp, addr));
}
-EXPORT int
-seek_g0(scgp, addr)
- SCSI *scgp;
- long addr;
+int
+seek_g0(SCSI *scgp, long addr)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -778,10 +725,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-seek_g1(scgp, addr)
- SCSI *scgp;
- long addr;
+int
+seek_g1(SCSI *scgp, long addr)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -798,10 +743,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-scsi_flush_cache(scgp, immed)
- SCSI *scgp;
- BOOL immed;
+int
+scsi_flush_cache(SCSI *scgp, BOOL immed)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -823,12 +766,8 @@
return (0);
}
-EXPORT int
-read_buffer(scgp, bp, cnt, mode)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int mode;
+int
+read_buffer(SCSI *scgp, caddr_t bp, int cnt, int mode)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -848,14 +787,9 @@
return (scg_cmd(scgp));
}
-EXPORT int
-write_buffer(scgp, buffer, length, mode, bufferid, offset)
- SCSI *scgp;
- char *buffer;
- long length;
- int mode;
- int bufferid;
- long offset;
+int
+write_buffer(SCSI *scgp, char *buffer, long length, int mode, int bufferid,
+ long offset)
{
register struct scg_cmd *scmd = scgp->scmd;
char *cdb;
@@ -886,15 +820,9 @@
return (0);
}
-EXPORT int
-read_subchannel(scgp, bp, track, cnt, msf, subq, fmt)
- SCSI *scgp;
- caddr_t bp;
- int track;
- int cnt;
- int msf;
- int subq;
- int fmt;
+int
+read_subchannel(SCSI *scgp, caddr_t bp, int track, int cnt, int msf,
+ int subq, int fmt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -922,15 +850,8 @@
return (0);
}
-EXPORT int
-read_toc(scgp, bp, track, cnt, msf, fmt)
- SCSI *scgp;
- caddr_t bp;
- int track;
- int cnt;
- int msf;
- int fmt;
-
+int
+read_toc(SCSI *scgp, caddr_t bp, int track, int cnt, int msf, int fmt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -955,15 +876,8 @@
return (0);
}
-EXPORT int
-read_toc_philips(scgp, bp, track, cnt, msf, fmt)
- SCSI *scgp;
- caddr_t bp;
- int track;
- int cnt;
- int msf;
- int fmt;
-
+int
+read_toc_philips(SCSI *scgp, caddr_t bp, int track, int cnt, int msf, int fmt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -993,13 +907,8 @@
return (0);
}
-EXPORT int
-read_header(scgp, bp, addr, cnt, msf)
- SCSI *scgp;
- caddr_t bp;
- long addr;
- int cnt;
- int msf;
+int
+read_header(SCSI *scgp, caddr_t bp, long addr, int cnt, int msf)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1023,12 +932,8 @@
return (0);
}
-EXPORT int
-read_disk_info(scgp, bp, cnt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
-
+int
+read_disk_info(SCSI *scgp, caddr_t bp, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1050,14 +955,8 @@
return (0);
}
-EXPORT int
-read_track_info(scgp, bp, type, addr, cnt)
- SCSI *scgp;
- caddr_t bp;
- int type;
- int addr;
- int cnt;
-
+int
+read_track_info(SCSI *scgp, caddr_t bp, int type, int addr, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1082,11 +981,8 @@
return (0);
}
-EXPORT int
-reserve_track(scgp, size)
- SCSI *scgp;
- Ulong size;
-
+int
+reserve_track(SCSI *scgp, Ulong size)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1107,19 +1003,15 @@
}
-EXPORT int
-read_rzone_info(scgp, bp, cnt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
+int
+read_rzone_info(SCSI *scgp, caddr_t bp, int cnt)
{
return (read_track_info(scgp, bp, TI_TYPE_LBA, 0, cnt));
}
-EXPORT int
-reserve_tr_rzone(scgp, size)
- SCSI *scgp;
- long size; /* number of blocks */
+int
+reserve_tr_rzone(SCSI *scgp,
+ long size /* number of blocks */)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1141,14 +1033,9 @@
return (0);
}
-EXPORT int
-read_dvd_structure(scgp, bp, cnt, addr, layer, fmt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int addr;
- int layer;
- int fmt;
+int
+read_dvd_structure(SCSI *scgp, caddr_t bp, int cnt, int addr, int layer,
+ int fmt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1173,13 +1060,8 @@
return (0);
}
-EXPORT int
-send_dvd_structure(scgp, bp, cnt, layer, fmt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int layer;
- int fmt;
+int
+send_dvd_structure(SCSI *scgp, caddr_t bp, int cnt, int layer, int fmt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1203,12 +1085,8 @@
return (0);
}
-EXPORT int
-send_opc(scgp, bp, cnt, doopc)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int doopc;
+int
+send_opc(SCSI *scgp, caddr_t bp, int cnt, int doopc)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1231,13 +1109,8 @@
return (0);
}
-EXPORT int
-read_track_info_philips(scgp, bp, track, cnt)
- SCSI *scgp;
- caddr_t bp;
- int track;
- int cnt;
-
+int
+read_track_info_philips(SCSI *scgp, caddr_t bp, int track, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1259,12 +1132,8 @@
return (0);
}
-EXPORT int
-scsi_close_tr_session(scgp, type, track, immed)
- SCSI *scgp;
- int type;
- int track;
- BOOL immed;
+int
+scsi_close_tr_session(SCSI *scgp, int type, int track, BOOL immed)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1292,12 +1161,8 @@
return (0);
}
-EXPORT int
-read_master_cue(scgp, bp, sheet, cnt)
- SCSI *scgp;
- caddr_t bp; /* address of master cue sheet */
- int sheet; /* Sheet number */
- int cnt; /* Transfer count */
+int
+read_master_cue(SCSI *scgp, caddr_t bp, int sheet, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1319,11 +1184,8 @@
return (0);
}
-EXPORT int
-send_cue_sheet(scgp, bp, size)
- SCSI *scgp;
- caddr_t bp; /* address of cue sheet buffer */
- long size; /* number of bytes to transfer */
+int
+send_cue_sheet(SCSI *scgp, caddr_t bp, long size)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1344,11 +1206,8 @@
return (size - scmd->resid);
}
-EXPORT int
-read_buff_cap(scgp, sp, fp)
- SCSI *scgp;
- long *sp; /* Size pointer */
- long *fp; /* Free pointer */
+int
+read_buff_cap(SCSI *scgp, long *sp, long *fp)
{
char resp[12];
Ulong freespace;
@@ -1391,12 +1250,8 @@
return (per);
}
-EXPORT int
-scsi_blank(scgp, addr, blanktype, immed)
- SCSI *scgp;
- long addr;
- int blanktype;
- BOOL immed;
+int
+scsi_blank(SCSI *scgp, long addr, int blanktype, BOOL immed)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1418,12 +1273,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-scsi_format(scgp, addr, size, background)
- SCSI *scgp;
- caddr_t addr;
- int size;
- BOOL background;
+int
+scsi_format(SCSI *scgp, caddr_t addr, int size, BOOL background)
{
register struct scg_cmd *scmd = scgp->scmd;
int progress=0, ret=-1, pid=-1;
@@ -1488,12 +1339,10 @@
* XXX ATAPI cannot handle SCSI 6 byte commands.
* XXX We try to simulate 6 byte mode sense/select.
*/
-LOCAL BOOL is_atapi;
+static BOOL is_atapi;
-EXPORT BOOL
-allow_atapi(scgp, new)
- SCSI *scgp;
- BOOL new;
+BOOL
+allow_atapi(SCSI *scgp, BOOL new)
{
BOOL old = is_atapi;
Uchar mode[256];
@@ -1517,26 +1366,16 @@
return (old);
}
-EXPORT int
-mode_select(scgp, dp, cnt, smp, pf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int smp;
- int pf;
+int
+mode_select(SCSI *scgp, Uchar *dp, int cnt, int smp, int pf)
{
if (is_atapi)
return (mode_select_sg0(scgp, dp, cnt, smp, pf));
return (mode_select_g0(scgp, dp, cnt, smp, pf));
}
-EXPORT int
-mode_sense(scgp, dp, cnt, page, pcf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int page;
- int pcf;
+int
+mode_sense(SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)
{
if (is_atapi)
return (mode_sense_sg0(scgp, dp, cnt, page, pcf));
@@ -1546,13 +1385,8 @@
/*
* Simulate mode select g0 with mode select g1.
*/
-EXPORT int
-mode_select_sg0(scgp, dp, cnt, smp, pf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int smp;
- int pf;
+int
+mode_select_sg0(SCSI *scgp, Uchar *dp, int cnt, int smp, int pf)
{
Uchar xmode[256+4];
int amt = cnt;
@@ -1584,13 +1418,8 @@
/*
* Simulate mode sense g0 with mode sense g1.
*/
-EXPORT int
-mode_sense_sg0(scgp, dp, cnt, page, pcf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int page;
- int pcf;
+int
+mode_sense_sg0(SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)
{
Uchar xmode[256+4];
int amt = cnt;
@@ -1636,13 +1465,8 @@
return (0);
}
-EXPORT int
-mode_select_g0(scgp, dp, cnt, smp, pf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int smp;
- int pf;
+int
+mode_select_g0(SCSI *scgp, Uchar *dp, int cnt, int smp, int pf)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1667,13 +1491,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-mode_select_g1(scgp, dp, cnt, smp, pf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int smp;
- int pf;
+int
+mode_select_g1(SCSI *scgp, Uchar *dp, int cnt, int smp, int pf)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1698,13 +1517,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-mode_sense_g0(scgp, dp, cnt, page, pcf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int page;
- int pcf;
+int
+mode_sense_g0(SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1732,13 +1546,8 @@
return (0);
}
-EXPORT int
-mode_sense_g1(scgp, dp, cnt, page, pcf)
- SCSI *scgp;
- Uchar *dp;
- int cnt;
- int page;
- int pcf;
+int
+mode_sense_g1(SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -1814,12 +1623,8 @@
#define TRM_USER 2 /* All user data (2336 bytes) */
-EXPORT int
-read_tochdr(scgp, dp, fp, lp)
- SCSI *scgp;
- cdr_t *dp;
- int *fp;
- int *lp;
+int
+read_tochdr(SCSI *scgp, cdr_t *dp, int *fp, int *lp)
{
struct tocheader *tp;
char xb[256];
@@ -1844,9 +1649,8 @@
return (-1);
}
-EXPORT int
-read_cdtext(scgp)
- SCSI *scgp;
+int
+read_cdtext(SCSI *scgp)
{
struct tocheader *tp;
char xb[256];
@@ -1876,15 +1680,9 @@
return (0);
}
-EXPORT int
-read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep)
- SCSI *scgp;
- int track;
- long *offp;
- struct msf *msfp;
- int *adrp;
- int *controlp;
- int *modep;
+int
+read_trackinfo(SCSI *scgp, int track, long *offp, struct msf *msfp,
+ int *adrp, int *controlp, int *modep)
{
struct diskinfo *dp;
char xb[256];
@@ -1955,12 +1753,8 @@
return (0);
}
-EXPORT int
-read_B0(scgp, isbcd, b0p, lop)
- SCSI *scgp;
- BOOL isbcd;
- long *b0p;
- long *lop;
+int
+read_B0(SCSI *scgp, BOOL isbcd, long *b0p, long *lop)
{
struct fdiskinfo *dp;
struct ftrackdesc *tp;
@@ -2042,10 +1836,8 @@
/*
* Return address of first track in last session (SCSI-3/mmc version).
*/
-EXPORT int
-read_session_offset(scgp, offp)
- SCSI *scgp;
- long *offp;
+int
+read_session_offset(SCSI *scgp, long *offp)
{
struct diskinfo *dp;
char xb[256];
@@ -2082,10 +1874,8 @@
/*
* Return address of first track in last session (pre SCSI-3 version).
*/
-EXPORT int
-read_session_offset_philips(scgp, offp)
- SCSI *scgp;
- long *offp;
+int
+read_session_offset_philips(SCSI *scgp, long *offp)
{
struct sinfo *sp;
char xb[256];
@@ -2117,10 +1907,8 @@
return (0);
}
-EXPORT int
-sense_secsize(scgp, current)
- SCSI *scgp;
- int current;
+int
+sense_secsize(SCSI *scgp, int current)
{
Uchar mode[0x100];
Uchar *p;
@@ -2183,10 +1971,8 @@
return (secsize);
}
-EXPORT int
-select_secsize(scgp, secsize)
- SCSI *scgp;
- int secsize;
+int
+select_secsize(SCSI *scgp, int secsize)
{
struct scsi_mode_data md;
int count = sizeof (struct scsi_mode_header) +
@@ -2201,16 +1987,14 @@
return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2));
}
-EXPORT BOOL
-is_cddrive(scgp)
- SCSI *scgp;
+BOOL
+is_cddrive(SCSI *scgp)
{
return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM);
}
-EXPORT BOOL
-is_unknown_dev(scgp)
- SCSI *scgp;
+BOOL
+is_unknown_dev(SCSI *scgp)
{
return (scgp->dev == DEV_UNKNOWN);
}
@@ -2220,12 +2004,8 @@
#endif
#ifdef DEBUG
-EXPORT int
-read_scsi(scgp, bp, addr, cnt)
- SCSI *scgp;
- caddr_t bp;
- long addr;
- int cnt;
+int
+read_scsi(SCSI *scgp, caddr_t bp, long addr, int cnt)
{
if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi)
return (read_g0(scgp, bp, addr, cnt));
@@ -2233,12 +2013,8 @@
return (read_g1(scgp, bp, addr, cnt));
}
-EXPORT int
-read_g0(scgp, bp, addr, cnt)
- SCSI *scgp;
- caddr_t bp;
- long addr;
- int cnt;
+int
+read_g0(SCSI *scgp, caddr_t bp, long addr, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -2262,12 +2038,8 @@
return (scg_cmd(scgp));
}
-EXPORT int
-read_g1(scgp, bp, addr, cnt)
- SCSI *scgp;
- caddr_t bp;
- long addr;
- int cnt;
+int
+read_g1(SCSI *scgp, caddr_t bp, long addr, int cnt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -2291,10 +2063,8 @@
}
#endif /* DEBUG */
-EXPORT BOOL
-getdev(scgp, print)
- SCSI *scgp;
- BOOL print;
+BOOL
+getdev(SCSI *scgp, BOOL print)
{
BOOL got_inquiry = TRUE;
char vendor_info[8+1];
@@ -2695,10 +2465,8 @@
return (TRUE);
}
-EXPORT void
-printinq(scgp, f)
- SCSI *scgp;
- FILE *f;
+void
+printinq(SCSI *scgp, FILE *f)
{
register struct scsi_inquiry *inq = scgp->inq;
@@ -2729,9 +2497,8 @@
}
}
-EXPORT void
-printdev(scgp)
- SCSI *scgp;
+void
+printdev(SCSI *scgp)
{
printf("Device seems to be: ");
@@ -2789,10 +2556,8 @@
}
-EXPORT BOOL
-do_inquiry(scgp, print)
- SCSI *scgp;
- int print;
+BOOL
+do_inquiry(SCSI *scgp, int print)
{
if (getdev(scgp, print)) {
if (print)
@@ -2803,10 +2568,8 @@
}
}
-EXPORT BOOL
-recovery_needed(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+BOOL
+recovery_needed(SCSI *scgp, cdr_t *dp)
{
int err;
register struct scg_cmd *scmd = scgp->scmd;
@@ -2827,10 +2590,8 @@
return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0);
}
-EXPORT int
-scsi_load(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+scsi_load(SCSI *scgp, cdr_t *dp)
{
int key;
int code;
@@ -2854,30 +2615,24 @@
return (-1);
}
-EXPORT int
-scsi_unload(scgp, dp)
- SCSI *scgp;
- cdr_t *dp;
+int
+scsi_unload(SCSI *scgp, cdr_t *dp)
{
return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED)));
}
-EXPORT int
-scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast)
- SCSI *scgp;
- caddr_t bp; /* address of buffer */
- long sectaddr; /* disk address (sector) to put */
- long size; /* number of bytes to transfer */
- int blocks; /* sector count */
- BOOL islast; /* last write for track */
+int scsi_cdr_write(SCSI *scgp,
+ caddr_t bp /* address of buffer */,
+ long sectaddr /* disk address (sector) to put */,
+ long size /* number of bytes to transfer */,
+ int blocks /* sector count */,
+ BOOL islast /* last write for track */)
{
return (write_xg1(scgp, bp, sectaddr, size, blocks));
}
-EXPORT struct cd_mode_page_2A *
-mmc_cap(scgp, modep)
- SCSI *scgp;
- Uchar *modep;
+struct cd_mode_page_2A *
+mmc_cap(SCSI *scgp, Uchar *modep)
{
int len;
int val;
@@ -2934,15 +2689,14 @@
return (mp2);
}
-EXPORT void
-mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp)
- struct cd_mode_page_2A *mp;
- BOOL *cdrrp; /* CD ROM */
- BOOL *cdwrp; /* CD-R writer */
- BOOL *cdrrwp; /* CD-RW reader */
- BOOL *cdwrwp; /* CD-RW writer */
- BOOL *dvdp; /* DVD reader */
- BOOL *dvdwp; /* DVD writer */
+void
+mmc_getval(struct cd_mode_page_2A *mp,
+ BOOL *cdrrp /* CD ROM */,
+ BOOL *cdwrp /* CD-R writer */,
+ BOOL *cdrrwp /* CD-RW reader */,
+ BOOL *cdwrwp /* CD-RW writer */,
+ BOOL *dvdp /* DVD reader */,
+ BOOL *dvdwp /* DVD writer */)
{
BOOL isdvd; /* Any DVD reader */
BOOL isdvd_wr; /* DVD writer (R / RAM) */
@@ -2974,11 +2728,8 @@
*dvdwp = isdvd_wr;
}
-EXPORT BOOL
-is_mmc(scgp, cdwp, dvdwp)
- SCSI *scgp;
- BOOL *cdwp; /* CD writer */
- BOOL *dvdwp; /* DVD writer */
+BOOL
+is_mmc(SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)
{
BOOL cdwr = FALSE;
BOOL cdwrw = FALSE;
@@ -2997,15 +2748,14 @@
return (TRUE);
}
-EXPORT BOOL
-mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp)
- SCSI *scgp;
- BOOL *cdrrp; /* CD ROM */
- BOOL *cdwrp; /* CD-R writer */
- BOOL *cdrrwp; /* CD-RW reader */
- BOOL *cdwrwp; /* CD-RW writer */
- BOOL *dvdp; /* DVD reader */
- BOOL *dvdwp; /* DVD writer */
+BOOL
+mmc_check(SCSI *scgp,
+ BOOL *cdrrp /* CD ROM */,
+ BOOL *cdwrp /* CD-R writer */,
+ BOOL *cdrrwp /* CD-RW reader */,
+ BOOL *cdwrwp /* CD-RW writer */,
+ BOOL *dvdp /* DVD reader */,
+ BOOL *dvdwp /* DVD writer */)
{
Uchar mode[0x100];
BOOL was_atapi;
@@ -3029,10 +2779,8 @@
return (TRUE); /* Generic SCSI-3/mmc CD */
}
-LOCAL void
-print_speed(fmt, val)
- char *fmt;
- int val;
+static void
+print_speed(char *fmt, int val)
{
printf(" %s: %5d kB/s", fmt, val);
printf(" (CD %3ux,", val/176);
@@ -3044,9 +2792,8 @@
#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1])
#define SVAL(what, val) printf(" %s: %s\n", what, val)
-EXPORT void
-print_capabilities(scgp)
- SCSI *scgp;
+void
+print_capabilities(SCSI *scgp)
{
BOOL was_atapi;
Uchar mode[0x100];
Modified: nonameyet/branches/cleanup/cdrecord/scsi_cdr_mmc4.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/scsi_cdr_mmc4.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/scsi_cdr_mmc4.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -60,14 +60,13 @@
#include "scsimmc.h"
#include "cdrecord.h"
-EXPORT void print_capabilities_mmc4 __PR((SCSI *scgp));
+void print_capabilities_mmc4 __PR((SCSI *scgp));
#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what)
-EXPORT void
-print_capabilities_mmc4(scgp)
- SCSI *scgp;
+void
+print_capabilities_mmc4(SCSI *scgp)
{
int cdrw_types;
Modified: nonameyet/branches/cleanup/cdrecord/scsi_mmc.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/scsi_mmc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/scsi_mmc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -66,25 +66,20 @@
-EXPORT int get_configuration __PR((SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt));
-LOCAL int get_conflen __PR((SCSI *scgp, int st_feature, int rt));
-EXPORT int get_curprofile __PR((SCSI *scgp));
-LOCAL int get_profiles __PR((SCSI *scgp, caddr_t bp, int cnt));
-EXPORT int print_profiles __PR((SCSI *scgp));
-EXPORT int get_proflist __PR((SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, BOOL *dvdplusp, BOOL *ddcdp));
-EXPORT int get_wproflist __PR((SCSI *scgp, BOOL *cdp, BOOL *dvdp,
+int get_configuration __PR((SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt));
+static int get_conflen __PR((SCSI *scgp, int st_feature, int rt));
+int get_curprofile __PR((SCSI *scgp));
+static int get_profiles __PR((SCSI *scgp, caddr_t bp, int cnt));
+int print_profiles __PR((SCSI *scgp));
+int get_proflist __PR((SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, BOOL *dvdplusp, BOOL *ddcdp));
+int get_wproflist __PR((SCSI *scgp, BOOL *cdp, BOOL *dvdp,
BOOL *dvdplusp, BOOL *ddcdp));
/*
* Get feature codes
*/
-EXPORT int
-get_configuration(scgp, bp, cnt, st_feature, rt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
- int st_feature;
- int rt;
+int
+get_configuration(SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt)
{
register struct scg_cmd *scmd = scgp->scmd;
@@ -112,11 +107,8 @@
/*
* Retrieve feature code list length
*/
-LOCAL int
-get_conflen(scgp, st_feature, rt)
- SCSI *scgp;
- int st_feature;
- int rt;
+static int
+get_conflen(SCSI *scgp, int st_feature, int rt)
{
Uchar cbuf[8];
int flen;
@@ -138,9 +130,8 @@
return (flen);
}
-EXPORT int
-get_curprofile(scgp)
- SCSI *scgp;
+int
+get_curprofile(SCSI *scgp)
{
Uchar cbuf[8];
int amt;
@@ -174,11 +165,8 @@
return (profile);
}
-LOCAL int
-get_profiles(scgp, bp, cnt)
- SCSI *scgp;
- caddr_t bp;
- int cnt;
+static int
+get_profiles(SCSI *scgp, caddr_t bp, int cnt)
{
int amt;
int flen;
@@ -205,9 +193,8 @@
return (amt);
}
-EXPORT int
-print_profiles(scgp)
- SCSI *scgp;
+int
+print_profiles(SCSI *scgp)
{
Uchar cbuf[1024];
Uchar *p;
@@ -249,14 +236,9 @@
return (curprofile);
}
-EXPORT int
-get_proflist(scgp, wp, cdp, dvdp, dvdplusp, ddcdp)
- SCSI *scgp;
- BOOL *wp;
- BOOL *cdp;
- BOOL *dvdp;
- BOOL *dvdplusp;
- BOOL *ddcdp;
+int
+get_proflist(SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, BOOL *dvdplusp,
+ BOOL *ddcdp)
{
Uchar cbuf[1024];
Uchar *p;
@@ -326,13 +308,8 @@
return (curprofile);
}
-EXPORT int
-get_wproflist(scgp, cdp, dvdp, dvdplusp, ddcdp)
- SCSI *scgp;
- BOOL *cdp;
- BOOL *dvdp;
- BOOL *dvdplusp;
- BOOL *ddcdp;
+int
+get_wproflist(SCSI *scgp, BOOL *cdp, BOOL *dvdp, BOOL *dvdplusp, BOOL *ddcdp)
{
Uchar cbuf[1024];
Uchar *p;
Modified: nonameyet/branches/cleanup/cdrecord/scsi_mmc4.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/scsi_mmc4.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/scsi_mmc4.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -61,14 +61,13 @@
#include "scsimmc.h"
#include "cdrecord.h"
-EXPORT int get_supported_cdrw_media_types __PR((SCSI *scgp));
+ int get_supported_cdrw_media_types __PR((SCSI *scgp));
/*
* Retrieve list of supported cd-rw media types (feature 0x37)
*/
-EXPORT int
-get_supported_cdrw_media_types(scgp)
- SCSI *scgp;
+int
+get_supported_cdrw_media_types(SCSI *scgp)
{
Uchar cbuf[16];
int ret;
Modified: nonameyet/branches/cleanup/cdrecord/scsi_scan.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/scsi_scan.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/scsi_scan.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -53,14 +53,12 @@
#include "scsi_scan.h"
#include "cdrecord.h"
-LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip));
-EXPORT int select_target __PR((SCSI *scgp, FILE *f));
-LOCAL int select_unit __PR((SCSI *scgp, FILE *f));
+static void print_product __PR((FILE *f, struct scsi_inquiry *ip));
+int select_target __PR((SCSI *scgp, FILE *f));
+static int select_unit __PR((SCSI *scgp, FILE *f));
-LOCAL void
-print_product(f, ip)
- FILE *f;
- struct scsi_inquiry *ip;
+static void
+print_product(FILE *f, struct scsi_inquiry *ip)
{
fprintf(f, "'%.8s' ", ip->vendor_info);
fprintf(f, "'%.16s' ", ip->prod_ident);
@@ -71,10 +69,8 @@
scg_fprintdev(f, ip);
}
-EXPORT int
-select_target(scgp, f)
- SCSI *scgp;
- FILE *f;
+int
+select_target(SCSI *scgp, FILE *f)
{
int initiator;
#ifdef FMT
@@ -166,10 +162,8 @@
return (amt);
}
-LOCAL int
-select_unit(scgp, f)
- SCSI *scgp;
- FILE *f;
+static int
+select_unit(SCSI *scgp, FILE *f)
{
int initiator;
int clun = scg_lun(scgp);
Modified: nonameyet/branches/cleanup/cdrecord/sector.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/sector.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/sector.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -58,11 +58,11 @@
#define HAVE_NEW_LIB_EDC
#endif
-EXPORT int encspeed __PR((BOOL be_verbose));
-EXPORT void encsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
-EXPORT void scrsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
-EXPORT void encodesector __PR((Uchar *sp, int sectype, int address));
-EXPORT void fillsector __PR((Uchar *sp, int sectype, int address));
+int encspeed __PR((BOOL be_verbose));
+void encsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
+void scrsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
+void encodesector __PR((Uchar *sp, int sectype, int address));
+void fillsector __PR((Uchar *sp, int sectype, int address));
/*
* Sector types known by lib libedc_ecc:
@@ -106,9 +106,8 @@
/*
* Compute max sector encoding speed
*/
-EXPORT int
-encspeed(be_verbose)
- BOOL be_verbose;
+int
+encspeed(BOOL be_verbose)
{
track_t t[1];
Uchar sect[2352];
@@ -145,12 +144,8 @@
/*
* Encode sectors according to trackp->sectype
*/
-EXPORT void
-encsectors(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+encsectors(track_t *trackp, Uchar *bp, int address, int nsecs)
{
int sectype = trackp->sectype;
@@ -177,12 +172,8 @@
/*
* Scramble data sectors without coding (needed for clone writing)
*/
-EXPORT void
-scrsectors(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+scrsectors(track_t *trackp, Uchar *bp, int address, int nsecs)
{
/*
* In Clone write mode, we cannot expect that the sector type
@@ -199,12 +190,8 @@
}
}
#else
-EXPORT void
-scrsectors(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+scrsectors(track_t *trackp, Uchar *bp, int address, int nsecs)
{
comerrno(EX_BAD, "Cannot write in clone RAW mode.\n");
}
@@ -213,11 +200,8 @@
/*
* Encode one sector according to trackp->sectype
*/
-EXPORT void
-encodesector(sp, sectype, address)
- Uchar *sp;
- int sectype;
- int address;
+void
+encodesector(Uchar *sp, int sectype, int address)
{
if (address < -150)
address += 450150;
@@ -273,11 +257,8 @@
/*
* Create one zero filles encoded sector (according to trackp->sectype)
*/
-EXPORT void
-fillsector(sp, sectype, address)
- Uchar *sp;
- int sectype;
- int address;
+void
+fillsector(Uchar *sp, int sectype, int address)
{
fill2352(sp, '\0');
encodesector(sp, sectype, address);
Modified: nonameyet/branches/cleanup/cdrecord/subchan.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/subchan.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/subchan.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -47,26 +47,26 @@
#include "cdrecord.h"
#include "crc16.h"
-EXPORT int do_leadin __PR((track_t *trackp));
-EXPORT int write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, int leadinstart));
-EXPORT int write_leadout __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-EXPORT void fillsubch __PR((track_t *trackp, Uchar *sp, int secno, int nsecs));
-EXPORT void filltpoint __PR((Uchar *sub, int ctrl_adr, int point, msf_t *mp));
-EXPORT void fillttime __PR((Uchar *sub, msf_t *mp));
-LOCAL void filldsubq __PR((Uchar *sub, int ca, int t, int i, msf_t *mrp, msf_t *mp));
-LOCAL void fillmcn __PR((Uchar *sub, Uchar *mcn));
-LOCAL void fillisrc __PR((Uchar *sub, Uchar *isrc));
-LOCAL int ascii2q __PR((int c));
-LOCAL void qpto16 __PR((Uchar *sub, Uchar *subq, int dop));
-EXPORT void qpto96 __PR((Uchar *sub, Uchar *subq, int dop));
-EXPORT void addrw __PR((Uchar *sub, Uchar *subrwptr));
-EXPORT void qwto16 __PR((Uchar *subq, Uchar *subptr));
-EXPORT void subrecodesecs __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
-LOCAL void subinterleave __PR((Uchar *sub));
+int do_leadin __PR((track_t *trackp));
+int write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, int leadinstart));
+int write_leadout __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+void fillsubch __PR((track_t *trackp, Uchar *sp, int secno, int nsecs));
+void filltpoint __PR((Uchar *sub, int ctrl_adr, int point, msf_t *mp));
+void fillttime __PR((Uchar *sub, msf_t *mp));
+static void filldsubq __PR((Uchar *sub, int ca, int t, int i, msf_t *mrp, msf_t *mp));
+static void fillmcn __PR((Uchar *sub, Uchar *mcn));
+static void fillisrc __PR((Uchar *sub, Uchar *isrc));
+static int ascii2q __PR((int c));
+static void qpto16 __PR((Uchar *sub, Uchar *subq, int dop));
+void qpto96 __PR((Uchar *sub, Uchar *subq, int dop));
+void addrw __PR((Uchar *sub, Uchar *subrwptr));
+void qwto16 __PR((Uchar *subq, Uchar *subptr));
+void subrecodesecs __PR((track_t *trackp, Uchar *bp, int address, int nsecs));
+static void subinterleave __PR((Uchar *sub));
/*#define TEST_CRC*/
#ifdef TEST_CRC
-LOCAL void testcrc __PR((void));
+static void testcrc __PR((void));
#endif
/*Die 96 Bits == 12 Bytes haben folgendes Aussehen:*/
@@ -86,8 +86,8 @@
Uchar crc2; /* 11 X^16 + X^12 + X^5 + 1 */
};
-EXPORT Uchar _subq[110][12];
-EXPORT int _nsubh;
+Uchar _subq[110][12];
+int _nsubh;
extern int lverbose;
extern int xdebug;
@@ -95,9 +95,8 @@
/*
* Prepare master sunchannel data for RAW TOC.
*/
-EXPORT int
-do_leadin(trackp)
- track_t *trackp;
+int
+do_leadin(track_t *trackp)
{
int tracks = trackp->tracks;
msf_t m;
@@ -186,12 +185,8 @@
* Use previously prepared master subchannel data to create the
* subchannel frames for the lead-in.
*/
-EXPORT int
-write_leadin(scgp, dp, trackp, leadinstart)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
- int leadinstart;
+int
+write_leadin(SCSI *scgp, cdr_t *dp, track_t *trackp, int leadinstart)
{
msf_t m;
int i;
@@ -299,11 +294,8 @@
/*
* Write Track 0xAA (lead-out)
*/
-EXPORT int
-write_leadout(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+int
+write_leadout(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int tracks = trackp->tracks;
msf_t m;
@@ -407,12 +399,11 @@
* This function is used to prepare the sub channels when writing
* the data part of a CD (bewteen lead-in and lead-out).
*/
-EXPORT void
-fillsubch(trackp, sp, secno, nsecs)
- track_t *trackp;
- Uchar *sp; /* Sector data pointer */
- int secno; /* Starting sector # */
- int nsecs; /* # of sectors to fill */
+void
+fillsubch(track_t *trackp,
+ Uchar *sp /* Sector data pointer */,
+ int secno /* Starting sector # */,
+ int nsecs /* # of sectors to fill */)
{
msf_t m;
msf_t mr;
@@ -574,12 +565,8 @@
* Fill TOC Point
* Ax Werte einfüllen.
*/
-EXPORT void
-filltpoint(sub, ctrl_adr, point, mp)
- Uchar *sub;
- int ctrl_adr;
- int point;
- msf_t *mp;
+void
+filltpoint(Uchar *sub, int ctrl_adr, int point, msf_t *mp)
{
sub[0] = ctrl_adr;
sub[2] = point;
@@ -592,10 +579,8 @@
* Fill TOC time
* Aktuelle Zeit in TOC Sub-Q einfüllen.
*/
-EXPORT void
-fillttime(sub, mp)
- Uchar *sub;
- msf_t *mp;
+void
+fillttime(Uchar *sub, msf_t *mp)
{
sub[3] = to_bcd(mp->msf_min);
sub[4] = to_bcd(mp->msf_sec);
@@ -605,14 +590,8 @@
/*
* Q-Sub in Datenbereich füllen.
*/
-LOCAL void
-filldsubq(sub, ca, t, i, mrp, mp)
- Uchar *sub;
- int ca; /* Control/Addr */
- int t; /* Track */
- int i; /* Index */
- msf_t *mrp; /* Relative time*/
- msf_t *mp; /* Absolute time*/
+static void
+filldsubq(Uchar *sub, int ca, int t, int i, msf_t *mrp, msf_t *mp)
{
sub[0] = ca;
sub[1] = to_bcd(t);
@@ -630,10 +609,8 @@
* Fill MCN
* MCN konvertieren und in Sub-Q einfüllen.
*/
-LOCAL void
-fillmcn(sub, mcn)
- Uchar *sub;
- Uchar *mcn;
+static void
+fillmcn(Uchar *sub, Uchar *mcn)
{
register int i;
register int c;
@@ -664,10 +641,8 @@
* Fill ISRC
* ISRC konvertieren und in Sub-Q einfüllen.
*/
-LOCAL void
-fillisrc(sub, isrc)
- Uchar *sub;
- Uchar *isrc;
+static void
+fillisrc(Uchar *sub, Uchar *isrc)
{
register int i;
register int j;
@@ -713,9 +688,8 @@
/*
* ASCII -> Sub-Q ISRC code conversion
*/
-LOCAL int
-ascii2q(c)
- int c;
+static int
+ascii2q(int c)
{
if (c >= '0' && c <= '9')
return (c - '0');
@@ -729,11 +703,8 @@
*
* OUT: sub, IN: subqptr
*/
-LOCAL void
-qpto16(sub, subqptr, dop)
- Uchar *sub;
- Uchar *subqptr;
- int dop;
+static void
+qpto16(Uchar *sub, Uchar *subqptr, int dop)
{
if (sub != subqptr)
movebytes(subqptr, sub, 12);
@@ -751,11 +722,8 @@
*
* OUT: sub, IN: subqptr
*/
-EXPORT void
-qpto96(sub, subqptr, dop)
- Uchar *sub;
- Uchar *subqptr;
- int dop;
+void
+qpto96(Uchar *sub, Uchar *subqptr, int dop)
{
Uchar tmp[16];
Uchar *p;
@@ -822,10 +790,8 @@
*
* OUT: sub, IN: subrwptr
*/
-EXPORT void
-addrw(sub, subrwptr)
- register Uchar *sub;
- register Uchar *subrwptr;
+void
+addrw(register Uchar *sub, register Uchar *subrwptr)
{
register int i;
@@ -841,10 +807,8 @@
*
* OUT: subq, IN: subptr
*/
-EXPORT void
-qwto16(subq, subptr)
- Uchar *subq;
- Uchar *subptr;
+void
+qwto16(Uchar *subq, Uchar *subptr)
{
register int i;
register int np = 0;
@@ -894,12 +858,8 @@
/*
* Recode subchannels of sectors from 2352 + 96 bytes to 2352 + 16 bytes
*/
-EXPORT void
-subrecodesecs(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+subrecodesecs(track_t *trackp, Uchar *bp, int address, int nsecs)
{
bp += 2352;
while (--nsecs >= 0) {
@@ -909,12 +869,8 @@
}
#ifndef HAVE_LIB_EDC_ECC
-EXPORT void
-encsectors(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+encsectors(track_t *trackp, Uchar *bp, int address, int nsecs)
{
int sectype = trackp->sectype;
@@ -924,12 +880,8 @@
comerrno(EX_BAD, "Can only write audio sectors in RAW mode.\n");
}
-EXPORT void
-scrsectors(trackp, bp, address, nsecs)
- track_t *trackp;
- Uchar *bp;
- int address;
- int nsecs;
+void
+scrsectors(track_t *trackp, Uchar *bp, int address, int nsecs)
{
comerrno(EX_BAD, "Cannot write in clone RAW mode.\n");
}
@@ -957,17 +909,16 @@
*/
-LOCAL int b __PR((int bcd));
+static int b __PR((int bcd));
-LOCAL int
-b(bcd)
- int bcd;
+static int
+b(int bcd)
{
return ((bcd & 0x0F) + 10 * (((bcd)>> 4) & 0x0F));
}
-LOCAL void
+static void
testcrc()
{
struct q q;
@@ -1018,9 +969,8 @@
/*
* Sub 96 Bytes Interleave
*/
-LOCAL void
-subinterleave(sub)
- Uchar *sub;
+static void
+subinterleave(Uchar *sub)
{
Uchar *p;
int i;
Modified: nonameyet/branches/cleanup/cdrecord/wm_packet.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/wm_packet.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/wm_packet.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -55,13 +55,10 @@
extern char *buf; /* The transfer buffer */
-EXPORT int write_packet_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+int write_packet_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
-EXPORT int
-write_packet_data(scgp, dp, trackp)
- SCSI *scgp;
- cdr_t *dp;
- track_t *trackp;
+int
+write_packet_data(SCSI *scgp, cdr_t *dp, track_t *trackp)
{
int track = trackp->trackno;
int f = -1;
Modified: nonameyet/branches/cleanup/cdrecord/wm_session.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/wm_session.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/wm_session.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -52,4 +52,4 @@
extern char *buf; /* The transfer buffer */
-EXPORT int write_session_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
+int write_session_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));
Modified: nonameyet/branches/cleanup/cdrecord/wm_track.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/wm_track.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/wm_track.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -51,4 +51,4 @@
extern char *buf; /* The transfer buffer */
-EXPORT int write_track_data __PR((cdr_t *dp, int track, track_t *trackp));
+int write_track_data __PR((cdr_t *dp, int track, track_t *trackp));
Modified: nonameyet/branches/cleanup/cdrecord/xio.c
===================================================================
--- nonameyet/branches/cleanup/cdrecord/xio.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/cdrecord/xio.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -48,7 +48,7 @@
#include "xio.h"
-LOCAL xio_t x_stdin = {
+static xio_t x_stdin = {
NULL, /* x_next */
NULL, /* x_name */
0, /* x_off */
@@ -58,17 +58,16 @@
0 /* x_omode */
};
-LOCAL xio_t *x_root = &x_stdin;
-LOCAL xio_t **x_tail = NULL;
+static xio_t *x_root = &x_stdin;
+static xio_t **x_tail = NULL;
-LOCAL xio_t *xnewnode __PR((char *name));
-EXPORT void *xopen __PR((char *name, int oflag, int mode));
-EXPORT int xclose __PR((void *vp));
+static xio_t *xnewnode __PR((char *name));
+void *xopen __PR((char *name, int oflag, int mode));
+int xclose __PR((void *vp));
-LOCAL xio_t *
-xnewnode(name)
- char *name;
+static xio_t *
+xnewnode(char *name)
{
xio_t *xp;
@@ -89,11 +88,8 @@
return (xp);
}
-EXPORT void *
-xopen(name, oflag, mode)
- char *name;
- int oflag;
- int mode;
+void *
+xopen(char *name, int oflag, int mode)
{
int f;
xio_t *xp;
@@ -138,9 +134,8 @@
return ((void *)xp);
}
-EXPORT int
-xclose(vp)
- void *vp;
+int
+xclose(void *vp)
{
xio_t *xp = vp;
xio_t *pp = x_root;
Modified: nonameyet/branches/cleanup/libdeflt/default.c
===================================================================
--- nonameyet/branches/cleanup/libdeflt/default.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libdeflt/default.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -41,18 +41,16 @@
#define MAXLINE 512
-static FILE *dfltfile = (FILE *)NULL;
+static FILE *dfltfile = (FILE *)NULL;
-EXPORT int defltopen __PR((const char *name));
-EXPORT int defltclose __PR((void));
-EXPORT void defltfirst __PR((void));
-EXPORT char *defltread __PR((const char *name));
-EXPORT char *defltnext __PR((const char *name));
-EXPORT int defltcntl __PR((int cmd, int flags));
+int defltopen __PR((const char *name));
+int defltclose __PR((void));
+void defltfirst __PR((void));
+char *defltread __PR((const char *name));
+char *defltnext __PR((const char *name));
+int defltcntl __PR((int cmd, int flags));
-EXPORT int
-defltopen(name)
- const char *name;
+int defltopen(const char *name)
{
if (dfltfile != (FILE *)NULL)
fclose(dfltfile);
@@ -69,8 +67,7 @@
return (0);
}
-EXPORT int
-defltclose()
+int defltclose()
{
int ret;
@@ -82,8 +79,7 @@
return (0);
}
-EXPORT void
-defltfirst()
+void defltfirst()
{
if (dfltfile == (FILE *)NULL) {
return;
@@ -91,9 +87,7 @@
rewind(dfltfile);
}
-EXPORT char *
-defltread(name)
- const char *name;
+char *defltread(const char *name)
{
if (dfltfile == (FILE *)NULL) {
return ((char *)NULL);
@@ -102,9 +96,7 @@
return (defltnext(name));
}
-EXPORT char *
-defltnext(name)
- const char *name;
+char *defltnext(const char *name)
{
register int len;
register int namelen;
@@ -129,10 +121,7 @@
return ((char *)NULL);
}
-EXPORT int
-defltcntl(cmd, flags)
- int cmd;
- int flags;
+int defltcntl(int cmd, int flags)
{
int oldflags = 0;
Modified: nonameyet/branches/cleanup/libedc/edc_ecc.c
===================================================================
--- nonameyet/branches/cleanup/libedc/edc_ecc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libedc/edc_ecc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -74,9 +74,7 @@
*/
int scramble_L2 __PR((unsigned char *inout));
-int
-scramble_L2(inout)
- unsigned char *inout;
+int scramble_L2(unsigned char *inout)
{
#ifndef EDC_SCRAMBLE_NOSWAP
unsigned int *f = (unsigned int *)inout;
@@ -117,9 +115,7 @@
static int encode_L2_Q __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q]));
-static int
-encode_L2_Q(inout)
- unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q];
+static int encode_L2_Q(unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q])
{
unsigned char *dps;
unsigned char *dp;
@@ -162,9 +158,7 @@
static int encode_L2_P __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P]));
-static int
-encode_L2_P(inout)
- unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P];
+static int encode_L2_P(unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P])
{
unsigned char *dp;
unsigned char *P;
@@ -202,20 +196,15 @@
static unsigned char bin2bcd __PR((unsigned p));
-static unsigned char
-bin2bcd(p)
- unsigned p;
+static unsigned char bin2bcd(unsigned p)
{
return ((p/10)<<4)|(p%10);
}
static int build_address __PR((unsigned char inout[], int sectortype, unsigned address));
-static int
-build_address(inout, sectortype, address)
- unsigned char inout[];
- int sectortype;
- unsigned address;
+static int
+build_address(unsigned char inout[], int sectortype, unsigned address)
{
inout[12] = bin2bcd(address / (60*75));
inout[13] = bin2bcd((address / 75) % 60);
@@ -242,11 +231,7 @@
*/
unsigned int build_edc __PR((unsigned char inout[], int from, int upto));
-unsigned int
-build_edc(inout, from, upto)
- unsigned char inout[];
- int from;
- int upto;
+unsigned int build_edc(unsigned char inout[], int from, int upto)
{
unsigned char *p = inout+from;
unsigned int result = 0;
@@ -266,10 +251,8 @@
int do_encode_L2 __PR((unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)], int sectortype, unsigned address));
int
-do_encode_L2(inout, sectortype, address)
- unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)];
- int sectortype;
- unsigned address;
+do_encode_L2(unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)],
+ int sectortype, unsigned address)
{
unsigned int result;
@@ -338,9 +321,7 @@
static int encode_L1_Q __PR((unsigned char inout[L1_RAW + L1_Q]));
-static int
-encode_L1_Q(inout)
- unsigned char inout[L1_RAW + L1_Q];
+static int encode_L1_Q(unsigned char inout[L1_RAW + L1_Q])
{
unsigned char *Q;
int i;
@@ -368,9 +349,7 @@
static int encode_L1_P __PR((unsigned char inout[L1_RAW + L1_Q + L1_P]));
-static int
-encode_L1_P(inout)
- unsigned char inout[L1_RAW + L1_Q + L1_P];
+static int encode_L1_P(unsigned char inout[L1_RAW + L1_Q + L1_P])
{
unsigned char *P;
int i;
@@ -396,45 +375,35 @@
static int decode_L1_Q __PR((unsigned char inout[L1_RAW + L1_Q]));
-static int
-decode_L1_Q(inout)
- unsigned char inout[L1_RAW + L1_Q];
+static int decode_L1_Q(unsigned char inout[L1_RAW + L1_Q])
{
return (0);
}
static int decode_L1_P __PR((unsigned char in[L1_RAW + L1_Q + L1_P]));
-static int
-decode_L1_P(in)
- unsigned char in[L1_RAW + L1_Q + L1_P];
+static int decode_L1_P(unsigned char in[L1_RAW + L1_Q + L1_P])
{
return (0);
}
int decode_L2_Q __PR((unsigned char inout[4 + L2_RAW + 12 + L2_Q]));
-int
-decode_L2_Q(inout)
- unsigned char inout[4 + L2_RAW + 12 + L2_Q];
+int decode_L2_Q(unsigned char inout[4 + L2_RAW + 12 + L2_Q])
{
return (0);
}
int decode_L2_P __PR((unsigned char inout[4 + L2_RAW + 12 + L2_Q + L2_P]));
-int
-decode_L2_P(inout)
- unsigned char inout[4 + L2_RAW + 12 + L2_Q + L2_P];
+int decode_L2_P(unsigned char inout[4 + L2_RAW + 12 + L2_Q + L2_P])
{
return (0);
}
static int encode_LSUB_Q __PR((unsigned char inout[LSUB_RAW + LSUB_Q]));
-static int
-encode_LSUB_Q(inout)
- unsigned char inout[LSUB_RAW + LSUB_Q];
+static int encode_LSUB_Q(unsigned char inout[LSUB_RAW + LSUB_Q])
{
unsigned char *Q;
int i;
@@ -461,9 +430,7 @@
static int encode_LSUB_P __PR((unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P]));
-static int
-encode_LSUB_P(inout)
- unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P];
+static int encode_LSUB_P(unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P])
{
unsigned char *P;
int i;
@@ -489,9 +456,7 @@
int decode_LSUB_Q __PR((unsigned char inout[LSUB_QRAW + LSUB_Q]));
-int
-decode_LSUB_Q(inout)
- unsigned char inout[LSUB_QRAW + LSUB_Q];
+int decode_LSUB_Q(unsigned char inout[LSUB_QRAW + LSUB_Q])
{
unsigned char Q[LSUB_Q];
int i;
@@ -513,9 +478,7 @@
int decode_LSUB_P __PR((unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P]));
-int
-decode_LSUB_P(inout)
- unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P];
+int decode_LSUB_P(unsigned char inout[LSUB_RAW + LSUB_Q + LSUB_P])
{
unsigned char P[LSUB_P];
int i;
@@ -550,13 +513,9 @@
unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR],
int delay1, int delay2, int delay3, int permute));
-int do_encode_L1(in, out, delay1, delay2, delay3, permute)
- unsigned char in[L1_RAW*FRAMES_PER_SECTOR];
- unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR];
- int delay1;
- int delay2;
- int delay3;
- int permute;
+int do_encode_L1(unsigned char in[L1_RAW*FRAMES_PER_SECTOR],
+ unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR],
+ int delay1, int delay2, int delay3, int permute)
{
int i;
@@ -638,14 +597,9 @@
static /* XXX should be non static XXX*/
-int
-do_decode_L1(in, out, delay1, delay2, delay3, permute)
- unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR];
- unsigned char out[L1_RAW*FRAMES_PER_SECTOR];
- int delay1;
- int delay2;
- int delay3;
- int permute;
+int do_decode_L1(unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR],
+ unsigned char out[L1_RAW*FRAMES_PER_SECTOR],
+ int delay1, int delay2, int delay3, int permute)
{
int i;
@@ -723,10 +677,8 @@
static int do_decode_L2 __PR((unsigned char in[(L2_RAW+L2_Q+L2_P)],
unsigned char out[L2_RAW]));
-static int
-do_decode_L2(in, out)
- unsigned char in[(L2_RAW+L2_Q+L2_P)];
- unsigned char out[L2_RAW];
+static int do_decode_L2(unsigned char in[(L2_RAW+L2_Q+L2_P)],
+ unsigned char out[L2_RAW])
{
return (0);
}
@@ -743,12 +695,9 @@
unsigned char out[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME],
int delay1, int permute));
-int
-do_encode_sub(in, out, delay1, permute)
- unsigned char in[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME];
- unsigned char out[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME];
- int delay1;
- int permute;
+int do_encode_sub(unsigned char in[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME],
+ unsigned char out[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME],
+ int delay1, int permute)
{
int i;
@@ -797,11 +746,9 @@
int delay1, int permute));
int
-do_decode_sub(in, out, delay1, permute)
- unsigned char in[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME];
- unsigned char out[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME];
- int delay1;
- int permute;
+do_decode_sub(unsigned char in[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME],
+ unsigned char out[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME],
+ int delay1, int permute)
{
int i;
@@ -849,17 +796,14 @@
int get_sector_type __PR((void));
-int
-get_sector_type()
+int get_sector_type()
{
return (sectortype);
}
int set_sector_type __PR((int st));
-int
-set_sector_type(st)
- int st;
+int set_sector_type(int st)
{
switch(st) {
@@ -913,10 +857,7 @@
int main __PR(((int argc, char **argv));
-int
-main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char *argv[])
{
int encode = 1;
int mask = DO_L2;
Modified: nonameyet/branches/cleanup/libedc/edcspeed.c
===================================================================
--- nonameyet/branches/cleanup/libedc/edcspeed.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libedc/edcspeed.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -17,14 +17,11 @@
#include <timedefs.h>
#include <strdefs.h>
-#define EXPORT
#define Uchar unsigned char
-LOCAL int encspeed __PR((void));
-EXPORT int main __PR(());
+static int encspeed __PR((void));
-LOCAL int
-encspeed()
+static int encspeed()
{
register Uchar *sect;
register int i;
@@ -68,8 +65,7 @@
return ((i+74)/75) / secs ;
}
-int
-main()
+int main(int argc, char *argv[])
{
/* lec_init();*/
Modified: nonameyet/branches/cleanup/libhfs_iso/block.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/block.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/block.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -52,10 +52,7 @@
* NAME: block->readlb()
* DESCRIPTION: read a logical block from a volume
*/
-int b_readlb(vol, num, bp)
- hfsvol *vol;
- unsigned long num;
- block *bp;
+int b_readlb(hfsvol *vol, unsigned long num, block *bp)
{
#ifndef APPLE_HYB
int bytes;
@@ -118,10 +115,7 @@
* NAME: block->writelb()
* DESCRIPTION: write a logical block to a volume
*/
-int b_writelb(vol, num, bp)
- hfsvol *vol;
- unsigned long num;
- block *bp;
+int b_writelb(hfsvol *vol, unsigned long num, block *bp)
{
#ifndef APPLE_HYB
int bytes;
@@ -182,11 +176,7 @@
* NAME: block->readab()
* DESCRIPTION: read a block from an allocation block from a volume
*/
-int b_readab(vol, anum, idx, bp)
- hfsvol *vol;
- unsigned int anum;
- unsigned int idx;
- block *bp;
+int b_readab(hfsvol *vol, unsigned int anum, unsigned int idx, block *bp)
{
/* verify the allocation block exists and is marked as in-use */
@@ -208,11 +198,7 @@
* NAME: b->writeab()
* DESCRIPTION: write a block to an allocation block to a volume
*/
-int b_writeab(vol, anum, idx, bp)
- hfsvol *vol;
- unsigned int anum;
- unsigned int idx;
- block *bp;
+int b_writeab(hfsvol *vol, unsigned int anum, unsigned int idx, block *bp)
{
/* verify the allocation block exists and is marked as in-use */
Modified: nonameyet/branches/cleanup/libhfs_iso/btree.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/btree.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/btree.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -50,8 +50,7 @@
* NAME: btree->getnode()
* DESCRIPTION: retrieve a numbered node from a B*-tree file
*/
-int bt_getnode(np)
- node *np;
+int bt_getnode(node *np)
{
btree *bt = np->bt;
block *bp = &np->data;
@@ -111,8 +110,7 @@
* NAME: btree->putnode()
* DESCRIPTION: store a numbered node into a B*-tree file
*/
-int bt_putnode(np)
- node *np;
+int bt_putnode(node *np)
{
btree *bt = np->bt;
block *bp = &np->data;
@@ -164,8 +162,7 @@
* NAME: btree->readhdr()
* DESCRIPTION: read the header node of a B*-tree
*/
-int bt_readhdr(bt)
- btree *bt;
+int bt_readhdr(btree *bt)
{
unsigned char *ptr;
char *map;
@@ -277,8 +274,7 @@
* NAME: btree->writehdr()
* DESCRIPTION: write the header node of a B*-tree
*/
-int bt_writehdr(bt)
- btree *bt;
+int bt_writehdr(btree *bt)
{
unsigned char *ptr;
char *map;
@@ -363,9 +359,7 @@
* NAME: btree->space()
* DESCRIPTION: assert space for new records, or extend the file
*/
-int bt_space(bt, nrecs)
- btree *bt;
- unsigned int nrecs;
+int bt_space(btree *bt, unsigned int nrecs)
{
unsigned int nnodes;
int space;
@@ -465,10 +459,7 @@
* NAME: btree->insertx()
* DESCRIPTION: recursively locate a node and insert a record
*/
-int bt_insertx(np, record, reclen)
- node *np;
- unsigned char *record;
- int *reclen;
+int bt_insertx(node *np, unsigned char *record, int *reclen)
{
node child;
unsigned char *rec;
@@ -516,10 +507,7 @@
* NAME: btree->insert()
* DESCRIPTION: insert a new node record into a tree
*/
-int bt_insert(bt, record, reclen)
- btree *bt;
- unsigned char *record;
- int reclen;
+int bt_insert(btree *bt, unsigned char *record, int reclen)
{
node root;
@@ -591,11 +579,7 @@
* NAME: btree->deletex()
* DESCRIPTION: recursively locate a node and delete a record
*/
-int bt_deletex(np, key, record, flag)
- node *np;
- unsigned char *key;
- unsigned char *record;
- int *flag;
+int bt_deletex(node *np, unsigned char *key, unsigned char *record, int *flag)
{
node child;
unsigned char *rec;
@@ -658,9 +642,7 @@
* NAME: btree->delete()
* DESCRIPTION: remove a node record from a tree
*/
-int bt_delete(bt, key)
- btree *bt;
- unsigned char *key;
+int bt_delete(btree *bt, unsigned char *key)
{
node root;
unsigned char record[HFS_MAXRECLEN];
@@ -714,10 +696,7 @@
* NAME: btree->search()
* DESCRIPTION: locate a data record given a search key
*/
-int bt_search(bt, key, np)
- btree *bt;
- unsigned char *key;
- node *np;
+int bt_search(btree *bt, unsigned char *key, node *np)
{
np->bt = bt;
np->nnum = bt->hdr.bthRoot;
Modified: nonameyet/branches/cleanup/libhfs_iso/data.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/data.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/data.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -108,8 +108,7 @@
* NAME: data->getb()
* DESCRIPTION: marshal 1 byte into local host format
*/
-char d_getb(ptr)
- unsigned char *ptr;
+char d_getb(unsigned char *ptr)
{
return (char) ptr[0];
}
@@ -118,8 +117,7 @@
* NAME: data->getw()
* DESCRIPTION: marshal 2 bytes into local host format
*/
-short d_getw(ptr)
- unsigned char *ptr;
+short d_getw(unsigned char *ptr)
{
return (short)
((ptr[0] << 8) |
@@ -130,8 +128,7 @@
* NAME: data->getl()
* DESCRIPTION: marshal 4 bytes into local host format
*/
-long d_getl(ptr)
- unsigned char *ptr;
+long d_getl(unsigned char *ptr)
{
return (long)
((ptr[0] << 24) |
@@ -147,9 +144,7 @@
#ifdef PROTOTYPES
void d_putb(unsigned char *ptr, char data)
#else
-void d_putb(ptr, data)
- unsigned char *ptr;
- char data;
+void d_putb(unsigned char *ptr, char data)
#endif
{
ptr[0] = (unsigned char) data;
@@ -162,9 +157,7 @@
#ifdef PROTOTYPES
void d_putw(unsigned char *ptr, short data)
#else
-void d_putw(ptr, data)
- unsigned char *ptr;
- short data;
+void d_putw(unsigned char *ptr, short data)
#endif
{
ptr[0] = ((unsigned) data & 0xff00) >> 8;
@@ -175,9 +168,7 @@
* NAME: data->putl()
* DESCRIPTION: marshal 4 bytes out to Macintosh (big-endian) format
*/
-void d_putl(ptr, data)
- unsigned char *ptr;
- long data;
+void d_putl(unsigned char *ptr, long data)
{
ptr[0] = ((unsigned long) data & 0xff000000) >> 24;
ptr[1] = ((unsigned long) data & 0x00ff0000) >> 16;
@@ -189,9 +180,7 @@
* NAME: data->fetchb()
* DESCRIPTION: incrementally retrieve a byte of data
*/
-void d_fetchb(ptr, dest)
- unsigned char **ptr;
- char *dest;
+void d_fetchb(unsigned char **ptr, char *dest)
{
*dest = d_getb(*ptr);
*ptr += 1;
@@ -201,9 +190,7 @@
* NAME: data->fetchw()
* DESCRIPTION: incrementally retrieve a word of data
*/
-void d_fetchw(ptr, dest)
- unsigned char **ptr;
- short *dest;
+void d_fetchw(unsigned char **ptr, short *dest)
{
*dest = d_getw(*ptr);
*ptr += 2;
@@ -213,9 +200,7 @@
* NAME: data->fetchl()
* DESCRIPTION: incrementally retrieve a long word of data
*/
-void d_fetchl(ptr, dest)
- unsigned char **ptr;
- long *dest;
+void d_fetchl(unsigned char **ptr, long *dest)
{
*dest = d_getl(*ptr);
*ptr += 4;
@@ -225,10 +210,7 @@
* NAME: data->fetchs()
* DESCRIPTION: incrementally retrieve a string
*/
-void d_fetchs(ptr, dest, size)
- unsigned char **ptr;
- char *dest;
- int size;
+void d_fetchs(unsigned char **ptr, char *dest, int size)
{
int len;
char blen;
@@ -253,9 +235,7 @@
#ifdef PROTOTYPES
void d_storeb(unsigned char **ptr, char data)
#else
-void d_storeb(ptr, data)
- unsigned char **ptr;
- char data;
+void d_storeb(unsigned char **ptr, char data)
#endif
{
d_putb(*ptr, data);
@@ -269,9 +249,7 @@
#ifdef PROTOTYPES
void d_storew(unsigned char **ptr, short data)
#else
-void d_storew(ptr, data)
- unsigned char **ptr;
- short data;
+void d_storew(unsigned char **ptr, short data)
#endif
{
d_putw(*ptr, data);
@@ -282,9 +260,7 @@
* NAME: data->storel()
* DESCRIPTION: incrementally store a long word of data
*/
-void d_storel(ptr, data)
- unsigned char **ptr;
- long data;
+void d_storel(unsigned char **ptr, long data)
{
d_putl(*ptr, data);
*ptr += 4;
@@ -294,10 +270,7 @@
* NAME: data->stores()
* DESCRIPTION: incrementally store a string
*/
-void d_stores(ptr, src, size)
- unsigned char **ptr;
- char *src;
- int size;
+void d_stores(unsigned char **ptr, char *src, int size)
{
int len;
@@ -317,8 +290,7 @@
* NAME: calctzdiff()
* DESCRIPTION: calculate the timezone difference between local time and UTC
*/
-static
-void calctzdiff()
+static void calctzdiff()
{
time_t t;
int isdst;
@@ -343,8 +315,7 @@
* NAME: data->tomtime()
* DESCRIPTION: convert UNIX time to Macintosh time
*/
-unsigned long d_tomtime(secs)
- unsigned long secs;
+unsigned long d_tomtime(unsigned long secs)
{
time_t utime = secs;
@@ -358,8 +329,7 @@
* NAME: data->toutime()
* DESCRIPTION: convert Macintosh time to UNIX time
*/
-unsigned long d_toutime(secs)
- unsigned long secs;
+unsigned long d_toutime(unsigned long secs)
{
time_t utime = secs;
@@ -374,8 +344,7 @@
* NAME: data->dtoutime()
* DESCRIPTION: convert Apple Double v2 time to UNIX time
*/
-unsigned long d_dtoutime(secs)
- long secs;
+unsigned long d_dtoutime(long secs)
{
time_t utime = secs;
@@ -390,9 +359,7 @@
* NAME: data->relstring()
* DESCRIPTION: compare two strings as per MacOS for HFS
*/
-int d_relstring(str1, str2)
- char *str1;
- char *str2;
+int d_relstring(char *str1, char *str2)
{
int diff;
Modified: nonameyet/branches/cleanup/libhfs_iso/file.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/file.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/file.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -53,9 +53,7 @@
* NAME: file->selectfork()
* DESCRIPTION: choose a fork for file operations
*/
-void f_selectfork(file, ffork)
- hfsfile *file;
- int ffork;
+void f_selectfork(hfsfile *file, int ffork)
{
if (ffork == 0)
{
@@ -76,11 +74,8 @@
* NAME: file->getptrs()
* DESCRIPTION: make pointers to the current fork's lengths and extents
*/
-void f_getptrs(file, lglen, pylen, extrec)
- hfsfile *file;
- unsigned long **lglen;
- unsigned long **pylen;
- ExtDataRec **extrec;
+void f_getptrs(hfsfile *file, unsigned long **lglen, unsigned long **pylen,
+ ExtDataRec **extrec)
{
if (file->fork == fkData)
{
@@ -106,11 +101,8 @@
* NAME: file->doblock()
* DESCRIPTION: read or write a numbered block from a file
*/
-int f_doblock(file, number, bp, func)
- hfsfile *file;
- unsigned long number;
- block *bp;
- int (*func) __PR((hfsvol *, unsigned int, unsigned int, block *));
+int f_doblock(hfsfile *file, unsigned long number, block *bp,
+ int (*func)(hfsvol *, unsigned int, unsigned int, block *))
{
unsigned int abnum;
unsigned int blnum;
@@ -174,8 +166,7 @@
* NAME: file->alloc()
* DESCRIPTION: reserve disk blocks for a file
*/
-int f_alloc(file)
- hfsfile *file;
+int f_alloc(hfsfile *file)
{
hfsvol *vol = file->vol;
ExtDescriptor blocks;
@@ -311,8 +302,7 @@
* NAME: file->trunc()
* DESCRIPTION: release disk blocks unneeded by a file
*/
-int f_trunc(file)
- hfsfile *file;
+int f_trunc(hfsfile *file)
{
ExtDataRec *extrec;
unsigned long *lglen, *pylen, alblksz, newpylen;
@@ -458,8 +448,7 @@
* NAME: file->flush()
* DESCRIPTION: flush all pending changes to an open file
*/
-int f_flush(file)
- hfsfile *file;
+int f_flush(hfsfile *file)
{
hfsvol *vol = file->vol;
Modified: nonameyet/branches/cleanup/libhfs_iso/hfs.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/hfs.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/hfs.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -62,15 +62,9 @@
* DESCRIPTION: open an HFS volume; return volume descriptor or 0 (error)
*/
#ifdef APPLE_HYB
-hfsvol *hfs_mount(hce, pnum, flags)
- hce_mem *hce;
- int pnum;
- int flags;
+hfsvol *hfs_mount(hce_mem *hce, int pnum, int flags)
#else
-hfsvol *hfs_mount(path, pnum, flags)
- char *path;
- int pnum;
- int flags;
+hfsvol *hfs_mount(char *path, int pnum, int flags)
#endif /* APPLE_HYB */
{
#ifndef APPLE_HYB
@@ -273,8 +267,7 @@
* NAME: hfs->flush()
* DESCRIPTION: flush all pending changes to an HFS volume
*/
-int hfs_flush(vol)
- hfsvol *vol;
+int hfs_flush(hfsvol *vol)
{
hfsfile *file;
@@ -311,13 +304,9 @@
*/
#ifdef APPLE_HYB
/* extra argument used to alter the position of the extents/catalog files */
-int hfs_umount(vol, end, locked)
- hfsvol *vol;
- long end;
- long locked;
+int hfs_umount(hfsvol *vol, long end, long locked)
#else
-int hfs_umount(vol)
- hfsvol *vol;
+int hfs_umount(hfsvol *vol)
#endif /* APPLE_HYB */
{
int result = 0;
@@ -427,8 +416,7 @@
* NAME: hfs->getvol()
* DESCRIPTION: return a pointer to a mounted volume
*/
-hfsvol *hfs_getvol(name)
- char *name;
+hfsvol *hfs_getvol(char *name)
{
hfsvol *vol;
@@ -448,8 +436,7 @@
* NAME: hfs->setvol()
* DESCRIPTION: change the current volume
*/
-void hfs_setvol(vol)
- hfsvol *vol;
+void hfs_setvol(hfsvol *vol)
{
hfs_curvol = vol;
}
@@ -458,9 +445,7 @@
* NAME: hfs->vstat()
* DESCRIPTION: return volume statistics
*/
-int hfs_vstat(vol, ent)
- hfsvol *vol;
- hfsvolent *ent;
+int hfs_vstat(hfsvol *vol, hfsvolent *ent)
{
if (v_getvol(&vol) < 0)
return -1;
@@ -481,15 +466,9 @@
* DESCRIPTION: write a new filesystem
*/
#ifdef APPLE_HYB
-int hfs_format(hce, pnum, vname)
- hce_mem *hce;
- int pnum;
- char *vname;
+int hfs_format(hce_mem *hce, int pnum, char *vname)
#else
-int hfs_format(path, pnum, vname)
- char *path;
- int pnum;
- char *vname;
+int hfs_format(char *path, int pnum, char *vname)
#endif /* APPLE_HYB */
{
hfsvol vol;
@@ -953,9 +932,7 @@
* NAME: hfs->chdir()
* DESCRIPTION: change current HFS directory
*/
-int hfs_chdir(vol, path)
- hfsvol *vol;
- char *path;
+int hfs_chdir(hfsvol *vol, char *path)
{
CatDataRec data;
@@ -978,8 +955,7 @@
* NAME: hfs->getcwd()
* DESCRIPTION: return the current working directory ID
*/
-long hfs_getcwd(vol)
- hfsvol *vol;
+long hfs_getcwd(hfsvol *vol)
{
if (v_getvol(&vol) < 0)
return 0;
@@ -991,9 +967,7 @@
* NAME: hfs->setcwd()
* DESCRIPTION: set the current working directory ID
*/
-int hfs_setcwd(vol, id)
- hfsvol *vol;
- long id;
+int hfs_setcwd(hfsvol *vol, long id)
{
if (v_getvol(&vol) < 0)
return -1;
@@ -1015,10 +989,7 @@
* NAME: hfs->dirinfo()
* DESCRIPTION: given a directory ID, return its (name and) parent ID
*/
-int hfs_dirinfo(vol, id, name)
- hfsvol *vol;
- long *id;
- char *name;
+int hfs_dirinfo(hfsvol *vol, long *id, char *name)
{
CatDataRec thread;
@@ -1038,9 +1009,7 @@
* NAME: hfs->opendir()
* DESCRIPTION: prepare to read the contents of a directory
*/
-hfsdir *hfs_opendir(vol, path)
- hfsvol *vol;
- char *path;
+hfsdir *hfs_opendir(hfsvol *vol, char *path)
{
hfsdir *dir;
CatKeyRec key;
@@ -1109,9 +1078,7 @@
* NAME: hfs->readdir()
* DESCRIPTION: return the next entry in the directory
*/
-int hfs_readdir(dir, ent)
- hfsdir *dir;
- hfsdirent *ent;
+int hfs_readdir(hfsdir *dir, hfsdirent *ent)
{
CatKeyRec key;
CatDataRec data;
@@ -1212,8 +1179,7 @@
* NAME: hfs->closedir()
* DESCRIPTION: stop reading a directory
*/
-int hfs_closedir(dir)
- hfsdir *dir;
+int hfs_closedir(hfsdir *dir)
{
hfsvol *vol = dir->vol;
@@ -1235,9 +1201,7 @@
* NAME: hfs->open()
* DESCRIPTION: prepare a file for I/O
*/
-hfsfile *hfs_open(vol, path)
- hfsvol *vol;
- char *path;
+hfsfile *hfs_open(hfsvol *vol, char *path)
{
hfsfile *file;
@@ -1285,9 +1249,7 @@
* NAME: hfs->setfork()
* DESCRIPTION: select file fork for I/O operations
*/
-int hfs_setfork(file, ffork)
- hfsfile *file;
- int ffork;
+int hfs_setfork(hfsfile *file, int ffork)
{
int result = 0;
@@ -1304,8 +1266,7 @@
* NAME: hfs->getfork()
* DESCRIPTION: return the current fork for I/O operations
*/
-int hfs_getfork(file)
- hfsfile *file;
+int hfs_getfork(hfsfile *file)
{
return file->fork != fkData;
}
@@ -1314,10 +1275,7 @@
* NAME: hfs->read()
* DESCRIPTION: read from an open file
*/
-long hfs_read(file, buf, len)
- hfsfile *file;
- void *buf;
- unsigned long len;
+long hfs_read(hfsfile *file, void *buf, unsigned long len)
{
unsigned long *lglen, count;
unsigned char *ptr = buf;
@@ -1357,10 +1315,7 @@
* NAME: hfs->write()
* DESCRIPTION: write to an open file
*/
-long hfs_write(file, buf, len)
- hfsfile *file;
- void *buf;
- unsigned long len;
+long hfs_write(hfsfile *file, void *buf, unsigned long len)
{
unsigned long *lglen, *pylen, count;
unsigned char *ptr = buf;
@@ -1431,9 +1386,7 @@
* NAME: hfs->truncate()
* DESCRIPTION: truncate an open file
*/
-int hfs_truncate(file, len)
- hfsfile *file;
- unsigned long len;
+int hfs_truncate(hfsfile *file, unsigned long len)
{
unsigned long *lglen;
@@ -1463,10 +1416,7 @@
* NAME: hfs->lseek()
* DESCRIPTION: change file seek pointer
*/
-long hfs_lseek(file, offset, from)
- hfsfile *file;
- long offset;
- int from;
+long hfs_lseek(hfsfile *file, long offset, int from)
{
unsigned long *lglen;
long newpos;
@@ -1508,10 +1458,7 @@
*/
#ifdef APPLE_HYB
/* extra args are used to set the start of the forks in the ISO volume */
-int hfs_close(file, dext, rext)
- hfsfile *file;
- long dext;
- long rext;
+int hfs_close(hfsfile *file, long dext, long rext)
{
int offset;
#else
@@ -1560,10 +1507,7 @@
* NAME: hfs->stat()
* DESCRIPTION: return catalog information for an arbitrary path
*/
-int hfs_stat(vol, path, ent)
- hfsvol *vol;
- char *path;
- hfsdirent *ent;
+int hfs_stat(hfsvol *vol, char *path, hfsdirent *ent)
{
CatDataRec data;
long parid;
@@ -1582,9 +1526,7 @@
* NAME: hfs->fstat()
* DESCRIPTION: return catalog information for an open file
*/
-int hfs_fstat(file, ent)
- hfsfile *file;
- hfsdirent *ent;
+int hfs_fstat(hfsfile *file, hfsdirent *ent)
{
r_unpackdirent(file->parid, file->name, &file->cat, ent);
@@ -1595,10 +1537,7 @@
* NAME: hfs->setattr()
* DESCRIPTION: change a file's attributes
*/
-int hfs_setattr(vol, path, ent)
- hfsvol *vol;
- char *path;
- hfsdirent *ent;
+int hfs_setattr(hfsvol *vol, char *path, hfsdirent *ent)
{
CatDataRec data;
node n;
@@ -1625,9 +1564,7 @@
* NAME: hfs->fsetattr()
* DESCRIPTION: change an open file's attributes
*/
-int hfs_fsetattr(file, ent)
- hfsfile *file;
- hfsdirent *ent;
+int hfs_fsetattr(hfsfile *file, hfsdirent *ent)
{
if (file->vol->flags & HFS_READONLY)
{
@@ -1646,9 +1583,7 @@
* NAME: hfs->mkdir()
* DESCRIPTION: create a new directory
*/
-int hfs_mkdir(vol, path)
- hfsvol *vol;
- char *path;
+int hfs_mkdir(hfsvol *vol, char *path)
{
CatDataRec data;
long parid;
@@ -1689,9 +1624,7 @@
* NAME: hfs->rmdir()
* DESCRIPTION: delete an empty directory
*/
-int hfs_rmdir(vol, path)
- hfsvol *vol;
- char *path;
+int hfs_rmdir(hfsvol *vol, char *path)
{
CatKeyRec key;
CatDataRec data;
@@ -1751,11 +1684,7 @@
* NAME: hfs->create()
* DESCRIPTION: create a new file
*/
-int hfs_create(vol, path, type, creator)
- hfsvol *vol;
- char *path;
- char *type;
- char *creator;
+int hfs_create(hfsvol *vol, char *path, char *type, char *creator)
{
CatKeyRec key;
CatDataRec data;
@@ -1850,9 +1779,7 @@
* NAME: hfs->delete()
* DESCRIPTION: remove both forks of a file
*/
-int hfs_delete(vol, path)
- hfsvol *vol;
- char *path;
+int hfs_delete(hfsvol *vol, char *path)
{
hfsfile file;
CatKeyRec key;
@@ -1928,10 +1855,7 @@
* NAME: hfs->rename()
* DESCRIPTION: change the name of and/or move a file or directory
*/
-int hfs_rename(vol, srcpath, dstpath)
- hfsvol *vol;
- char *srcpath;
- char *dstpath;
+int hfs_rename(hfsvol *vol, char *srcpath, char *dstpath)
{
hfsvol *srcvol;
CatDataRec src, dst;
@@ -2120,8 +2044,7 @@
* DESCRIPTION: get the current start of next allocation search
*/
unsigned short
-hfs_get_drAllocPtr(file)
- hfsfile *file;
+hfs_get_drAllocPtr(hfsfile *file)
{
return(file->vol->mdb.drAllocPtr);
}
@@ -2135,10 +2058,7 @@
hfs_set_drAllocPtr(hfsfile *file, unsigned short drAllocPtr, int size)
#else
int
-hfs_set_drAllocPtr(file, drAllocPtr, size)
- hfsfile *file;
- unsigned short drAllocPtr;
- int size;
+hfs_set_drAllocPtr(hfsfile *file, unsigned short drAllocPtr, int size)
#endif
{
hfsvol *vol = file->vol;
@@ -2171,9 +2091,7 @@
hfs_vsetbless(hfsvol *vol, unsigned long cnid)
#else
void
-hfs_vsetbless(vol, cnid)
- hfsvol *vol;
- unsigned long cnid;
+hfs_vsetbless(hfsvol *vol, unsigned long cnid)
#endif
{
vol->mdb.drFndrInfo[0] = cnid;
Modified: nonameyet/branches/cleanup/libhfs_iso/low.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/low.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/low.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -51,8 +51,7 @@
* NAME: low->lockvol()
* DESCRIPTION: prevent destructive simultaneous access
*/
-int l_lockvol(vol)
- hfsvol *vol;
+int l_lockvol(hfsvol *vol)
{
# ifndef NODEVLOCKS
@@ -78,8 +77,7 @@
* NAME: low->readblock0()
* DESCRIPTION: read the first sector and get bearings
*/
-int l_readblock0(vol)
- hfsvol *vol;
+int l_readblock0(hfsvol *vol)
{
block b;
unsigned char *ptr = b;
@@ -136,8 +134,7 @@
* NAME: low->readpm()
* DESCRIPTION: read the partition map and locate an HFS volume
*/
-int l_readpm(vol)
- hfsvol *vol;
+int l_readpm(hfsvol *vol)
{
block b;
unsigned char *ptr;
@@ -226,8 +223,7 @@
* NAME: low->readmdb()
* DESCRIPTION: read the master directory block into memory
*/
-int l_readmdb(vol)
- hfsvol *vol;
+int l_readmdb(hfsvol *vol)
{
block b;
unsigned char *ptr = b;
@@ -382,8 +378,7 @@
* NAME: low->writemdb()
* DESCRIPTION: write the master directory block to disk
*/
-int l_writemdb(vol)
- hfsvol *vol;
+int l_writemdb(hfsvol *vol)
{
block b;
unsigned char *ptr = b;
@@ -481,8 +476,7 @@
* NAME: low->readvbm()
* DESCRIPTION: read the volume bit map into memory
*/
-int l_readvbm(vol)
- hfsvol *vol;
+int l_readvbm(hfsvol *vol)
{
int vbmst = vol->mdb.drVBMSt;
int vbmsz = (vol->mdb.drNmAlBlks + 4095) / (unsigned)4096;
@@ -521,8 +515,7 @@
* NAME: low->writevbm()
* DESCRIPTION: write the volume bit map to disk
*/
-int l_writevbm(vol)
- hfsvol *vol;
+int l_writevbm(hfsvol *vol)
{
int vbmst = vol->mdb.drVBMSt;
int vbmsz = (vol->mdb.drNmAlBlks + 4095) / (unsigned)4096;
Modified: nonameyet/branches/cleanup/libhfs_iso/node.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/node.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/node.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -51,11 +51,7 @@
* NAME: node->init()
* DESCRIPTION: construct an empty node
*/
-void n_init(np, bt, type, height)
- node *np;
- btree *bt;
- int type;
- int height;
+void n_init(node *np, btree *bt, int type, int height)
{
np->bt = bt;
np->nnum = -1;
@@ -77,8 +73,7 @@
* NAME: node->new()
* DESCRIPTION: allocate a new b*-tree node
*/
-int n_new(np)
- node *np;
+int n_new(node *np)
{
btree *bt = np->bt;
unsigned long num;
@@ -113,8 +108,7 @@
* NAME: node->free()
* DESCRIPTION: deallocate a b*-tree node
*/
-void n_free(np)
- node *np;
+void n_free(node *np)
{
btree *bt = np->bt;
@@ -128,8 +122,7 @@
* NAME: node->compact()
* DESCRIPTION: clean up a node, removing deleted records
*/
-void n_compact(np)
- node *np;
+void n_compact(node *np)
{
unsigned char *ptr;
int offset, nrecs, i;
@@ -169,9 +162,7 @@
* NAME: node->search()
* DESCRIPTION: locate a record in a node, or the record it should follow
*/
-int n_search(np, key)
- node *np;
- unsigned char *key;
+int n_search(node *np, unsigned char *key)
{
btree *bt = np->bt;
int i, comp = -1;
@@ -200,12 +191,8 @@
* NAME: node->index()
* DESCRIPTION: create an index record from a key and node pointer
*/
-void n_index(bt, key, nnum, record, reclen)
- btree *bt;
- unsigned char *key;
- unsigned long nnum;
- unsigned char *record;
- int *reclen;
+void n_index(btree *bt, unsigned char *key, unsigned long nnum,
+ unsigned char *record, int *reclen)
{
if (bt == &bt->f.vol->cat)
{
@@ -228,10 +215,7 @@
* NAME: node->split()
* DESCRIPTION: divide a node into two and insert a record
*/
-int n_split(left, record, reclen)
- node *left;
- unsigned char *record;
- int *reclen;
+int n_split(node *left, unsigned char *record, int *reclen)
{
node right;
int nrecs, i, mid;
@@ -353,10 +337,7 @@
* NAME: node->insertx()
* DESCRIPTION: insert a record into a node (which must already have room)
*/
-void n_insertx(np, record, reclen)
- node *np;
- unsigned char *record;
- int reclen;
+void n_insertx(node *np, unsigned char *record, int reclen)
{
int rnum, i;
unsigned char *ptr;
@@ -383,10 +364,7 @@
* NAME: node->insert()
* DESCRIPTION: insert a new record into a node; return a record for parent
*/
-int n_insert(np, record, reclen)
- node *np;
- unsigned char *record;
- int *reclen;
+int n_insert(node *np, unsigned char *record, int *reclen)
{
n_compact(np);
@@ -406,11 +384,7 @@
* NAME: node->merge()
* DESCRIPTION: combine two nodes into a single node
*/
-int n_merge(right, left, record, flag)
- node *right;
- node *left;
- unsigned char *record;
- int *flag;
+int n_merge(node *right, node *left, unsigned char *record, int *flag)
{
int i, offset;
@@ -465,11 +439,7 @@
* NAME: node->delete()
* DESCRIPTION: remove a record from a node
*/
-int n_delete(np, record, flag)
- node *np;
- unsigned char *record;
- int *flag;
-
+int n_delete(node *np, unsigned char *record, int *flag)
{
node left;
unsigned char *rec;
Modified: nonameyet/branches/cleanup/libhfs_iso/record.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/record.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/record.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -47,10 +47,7 @@
* NAME: record->packcatkey()
* DESCRIPTION: pack a catalog record key
*/
-void r_packcatkey(key, pkey, len)
- CatKeyRec *key;
- unsigned char *pkey;
- int *len;
+void r_packcatkey(CatKeyRec *key, unsigned char *pkey, int *len)
{
unsigned char *start = pkey;
@@ -67,9 +64,7 @@
* NAME: record->unpackcatkey()
* DESCRIPTION: unpack a catalog record key
*/
-void r_unpackcatkey(pkey, key)
- unsigned char *pkey;
- CatKeyRec *key;
+void r_unpackcatkey(unsigned char *pkey, CatKeyRec *key)
{
d_fetchb(&pkey, (char *) &key->ckrKeyLen);
d_fetchb(&pkey, (char *) &key->ckrResrv1);
@@ -81,10 +76,7 @@
* NAME: record->packextkey()
* DESCRIPTION: pack an extents record key
*/
-void r_packextkey(key, pkey, len)
- ExtKeyRec *key;
- unsigned char *pkey;
- int *len;
+void r_packextkey(ExtKeyRec *key, unsigned char *pkey, int *len)
{
unsigned char *start = pkey;
@@ -101,9 +93,7 @@
* NAME: record->unpackextkey()
* DESCRIPTION: unpack an extents record key
*/
-void r_unpackextkey(pkey, key)
- unsigned char *pkey;
- ExtKeyRec *key;
+void r_unpackextkey(unsigned char *pkey, ExtKeyRec *key)
{
d_fetchb(&pkey, (char *) &key->xkrKeyLen);
d_fetchb(&pkey, (char *) &key->xkrFkType);
@@ -115,9 +105,7 @@
* NAME: record->comparecatkeys()
* DESCRIPTION: compare two (packed) catalog record keys
*/
-int r_comparecatkeys(pkey1, pkey2)
- unsigned char *pkey1;
- unsigned char *pkey2;
+int r_comparecatkeys(unsigned char *pkey1, unsigned char *pkey2)
{
CatKeyRec key1;
CatKeyRec key2;
@@ -137,9 +125,7 @@
* NAME: record->compareextkeys()
* DESCRIPTION: compare two (packed) extents record keys
*/
-int r_compareextkeys(pkey1, pkey2)
- unsigned char *pkey1;
- unsigned char *pkey2;
+int r_compareextkeys(unsigned char *pkey1, unsigned char *pkey2)
{
ExtKeyRec key1;
ExtKeyRec key2;
@@ -164,10 +150,7 @@
* NAME: record->packcatdata()
* DESCRIPTION: pack catalog record data
*/
-void r_packcatdata(data, pdata, len)
- CatDataRec *data;
- unsigned char *pdata;
- int *len;
+void r_packcatdata(CatDataRec *data, unsigned char *pdata, int *len)
{
unsigned char *start = pdata;
int i;
@@ -282,9 +265,7 @@
* NAME: record->unpackcatdata()
* DESCRIPTION: unpack catalog record data
*/
-void r_unpackcatdata(pdata, data)
- unsigned char *pdata;
- CatDataRec *data;
+void r_unpackcatdata(unsigned char *pdata, CatDataRec *data)
{
int i;
@@ -395,10 +376,7 @@
* NAME: record->packextdata()
* DESCRIPTION: pack extent record data
*/
-void r_packextdata(data, pdata, len)
- ExtDataRec *data;
- unsigned char *pdata;
- int *len;
+void r_packextdata(ExtDataRec *data, unsigned char *pdata, int *len)
{
unsigned char *start = pdata;
int i;
@@ -417,9 +395,7 @@
* NAME: record->unpackextdata()
* DESCRIPTION: unpack extent record data
*/
-void r_unpackextdata(pdata, data)
- unsigned char *pdata;
- ExtDataRec *data;
+void r_unpackextdata(unsigned char *pdata, ExtDataRec *data)
{
int i;
@@ -434,10 +410,7 @@
* NAME: record->makecatkey()
* DESCRIPTION: construct a catalog record key
*/
-void r_makecatkey(key, parid, name)
- CatKeyRec *key;
- long parid;
- char *name;
+void r_makecatkey(CatKeyRec *key, long parid, char *name)
{
int len;
@@ -454,11 +427,7 @@
* NAME: record->makeextkey()
* DESCRIPTION: construct an extents record key
*/
-void r_makeextkey(key, ffork, fnum, fabn)
- ExtKeyRec *key;
- int ffork;
- long fnum;
- unsigned int fabn;
+void r_makeextkey(ExtKeyRec *key, int ffork, long fnum, unsigned int fabn)
{
key->xkrKeyLen = 0x07;
key->xkrFkType = ffork;
@@ -472,11 +441,7 @@
*
* Taken fron v3.2.6
*/
-void r_unpackdirent(parid, name, data, ent)
- long parid;
- char *name;
- CatDataRec *data;
- hfsdirent *ent;
+void r_unpackdirent(long parid, char *name, CatDataRec *data, hfsdirent *ent)
{
strcpy(ent->name, name);
ent->parid = parid;
@@ -541,9 +506,7 @@
*
* Taken fron v3.2.6
*/
-void r_packdirent(data, ent)
- CatDataRec *data;
- hfsdirent *ent;
+void r_packdirent(CatDataRec *data, hfsdirent *ent)
{
switch (data->cdrType)
{
Modified: nonameyet/branches/cleanup/libhfs_iso/volume.c
===================================================================
--- nonameyet/branches/cleanup/libhfs_iso/volume.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libhfs_iso/volume.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -53,13 +53,8 @@
* NAME: vol->catsearch()
* DESCRIPTION: search catalog tree
*/
-int v_catsearch(vol, parid, name, data, cname, np)
- hfsvol *vol;
- long parid;
- char *name;
- CatDataRec *data;
- char *cname;
- node *np;
+int v_catsearch(hfsvol *vol, long parid, char *name, CatDataRec *data,
+ char *cname, node *np)
{
CatKeyRec key;
unsigned char pkey[HFS_CATKEYLEN];
@@ -95,11 +90,7 @@
* NAME: vol->extsearch()
* DESCRIPTION: search extents tree
*/
-int v_extsearch(file, fabn, data, np)
- hfsfile *file;
- unsigned int fabn;
- ExtDataRec *data;
- node *np;
+int v_extsearch(hfsfile *file, unsigned int fabn, ExtDataRec *data, node *np)
{
ExtKeyRec key;
ExtDataRec extsave;
@@ -141,12 +132,7 @@
* NAME: vol->getthread()
* DESCRIPTION: retrieve catalog thread information for a file or directory
*/
-int v_getthread(vol, id, thread, np, type)
- hfsvol *vol;
- long id;
- CatDataRec *thread;
- node *np;
- int type;
+int v_getthread(hfsvol *vol, long id, CatDataRec *thread, node *np, int type)
{
CatDataRec rec;
int found;
@@ -171,9 +157,7 @@
* NAME: vol->putcatrec()
* DESCRIPTION: store catalog information
*/
-int v_putcatrec(data, np)
- CatDataRec *data;
- node *np;
+int v_putcatrec(CatDataRec *data, node *np)
{
unsigned char pdata[HFS_CATDATALEN], *ptr;
int len = 0;
@@ -190,9 +174,7 @@
* NAME: vol->putextrec()
* DESCRIPTION: store extent information
*/
-int v_putextrec(data, np)
- ExtDataRec *data;
- node *np;
+int v_putextrec(ExtDataRec *data, node *np)
{
unsigned char pdata[HFS_EXTDATALEN], *ptr;
int len = 0;
@@ -209,9 +191,7 @@
* NAME: vol->allocblocks()
* DESCRIPTION: allocate a contiguous range of blocks
*/
-int v_allocblocks(vol, blocks)
- hfsvol *vol;
- ExtDescriptor *blocks;
+int v_allocblocks(hfsvol *vol, ExtDescriptor *blocks)
{
unsigned int request, found, foundat, start, end, pt;
block *vbm;
@@ -289,9 +269,7 @@
* NAME: vol->freeblocks()
* DESCRIPTION: deallocate a contiguous range of blocks
*/
-void v_freeblocks(vol, blocks)
- hfsvol *vol;
- ExtDescriptor *blocks;
+void v_freeblocks(hfsvol *vol, ExtDescriptor *blocks)
{
unsigned int start, len, pt;
block *vbm;
@@ -312,13 +290,8 @@
* NAME: vol->resolve()
* DESCRIPTION: translate a pathname; return catalog information
*/
-int v_resolve(vol, path, data, parid, fname, np)
- hfsvol **vol;
- char *path;
- CatDataRec *data;
- long *parid;
- char *fname;
- node *np;
+int v_resolve(hfsvol **vol, char *path, CatDataRec *data, long *parid,
+ char *fname, node *np)
{
long dirid;
char name[HFS_MAX_FLEN + 1], *nptr;
@@ -465,8 +438,7 @@
* NAME: vol->destruct()
* DESCRIPTION: free memory consumed by a volume descriptor
*/
-void v_destruct(vol)
- hfsvol *vol;
+void v_destruct(hfsvol *vol)
{
FREE(vol->vbm);
@@ -480,8 +452,7 @@
* NAME: vol->getvol()
* DESCRIPTION: validate a volume reference
*/
-int v_getvol(vol)
- hfsvol **vol;
+int v_getvol(hfsvol **vol)
{
if (*vol == 0)
{
@@ -501,9 +472,7 @@
* NAME: vol->flush()
* DESCRIPTION: flush all pending changes (B*-tree, MDB, VBM) to disk
*/
-int v_flush(vol, umounting)
- hfsvol *vol;
- int umounting;
+int v_flush(hfsvol *vol, int umounting)
{
if (! (vol->flags & HFS_READONLY))
{
@@ -538,11 +507,7 @@
* NAME: vol->adjvalence()
* DESCRIPTION: update a volume's valence counts
*/
-int v_adjvalence(vol, parid, isdir, adj)
- hfsvol *vol;
- long parid;
- int isdir;
- int adj;
+int v_adjvalence(hfsvol *vol, long parid, int isdir, int adj)
{
node n;
CatDataRec data;
@@ -583,10 +548,7 @@
* NAME: vol->newfolder()
* DESCRIPTION: create a new HFS folder
*/
-int v_newfolder(vol, parid, name)
- hfsvol *vol;
- long parid;
- char *name;
+int v_newfolder(hfsvol *vol, long parid, char *name)
{
CatKeyRec key;
CatDataRec data;
@@ -650,9 +612,7 @@
* DESCRIPTION: set bits from an extent record in the volume bitmap
*/
static
-void markexts(vbm, exts)
- block *vbm;
- ExtDataRec *exts;
+void markexts(block *vbm, ExtDataRec *exts)
{
int i;
unsigned int start, len;
@@ -669,8 +629,7 @@
* NAME: vol->scavenge()
* DESCRIPTION: safeguard blocks in the volume bitmap
*/
-int v_scavenge(vol)
- hfsvol *vol;
+int v_scavenge(hfsvol *vol)
{
block *vbm = vol->vbm;
node n;
Modified: nonameyet/branches/cleanup/libparanoia/gap.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/gap.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/gap.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -35,39 +35,33 @@
#include "cdda_paranoia.h"
#include "gap.h"
-EXPORT long i_paranoia_overlap_r __PR((Int16_t * buffA, Int16_t * buffB,
- long offsetA, long offsetB));
-EXPORT long i_paranoia_overlap_f __PR((Int16_t * buffA, Int16_t * buffB,
- long offsetA, long offsetB,
- long sizeA, long sizeB));
-EXPORT int i_stutter_or_gap __PR((Int16_t * A, Int16_t * B,
- long offA, long offB,
- long gap));
-EXPORT void i_analyze_rift_f __PR((Int16_t * A, Int16_t * B,
- long sizeA, long sizeB,
- long aoffset, long boffset,
- long *matchA, long *matchB,
- long *matchC));
-EXPORT void i_analyze_rift_r __PR((Int16_t * A, Int16_t * B,
- long sizeA, long sizeB,
- long aoffset, long boffset,
- long *matchA, long *matchB,
- long *matchC));
+long i_paranoia_overlap_r __PR((Int16_t * buffA, Int16_t * buffB,
+ long offsetA, long offsetB));
+long i_paranoia_overlap_f __PR((Int16_t * buffA, Int16_t * buffB,
+ long offsetA, long offsetB,
+ long sizeA, long sizeB));
+int i_stutter_or_gap __PR((Int16_t * A, Int16_t * B, long offA,
+ long offB, long gap));
+void i_analyze_rift_f __PR((Int16_t * A, Int16_t * B,
+ long sizeA, long sizeB,
+ long aoffset, long boffset,
+ long *matchA, long *matchB,
+ long *matchC));
+void i_analyze_rift_r __PR((Int16_t * A, Int16_t * B,
+ long sizeA, long sizeB,
+ long aoffset, long boffset,
+ long *matchA, long *matchB,
+ long *matchC));
+void analyze_rift_silence_f __PR((Int16_t * A, Int16_t * B,
+ long sizeA, long sizeB,
+ long aoffset, long boffset,
+ long *matchA, long *matchB));
-EXPORT void analyze_rift_silence_f __PR((Int16_t * A, Int16_t * B,
- long sizeA, long sizeB,
- long aoffset, long boffset,
- long *matchA, long *matchB));
-
/*
* Gap analysis code
*/
-EXPORT long
-i_paranoia_overlap_r(buffA, buffB, offsetA, offsetB)
- Int16_t *buffA;
- Int16_t *buffB;
- long offsetA;
- long offsetB;
+long i_paranoia_overlap_r(Int16_t *buffA, Int16_t *buffB, long offsetA,
+ long offsetB)
{
long beginA = offsetA;
long beginB = offsetB;
@@ -81,14 +75,8 @@
return (offsetA - beginA);
}
-EXPORT long
-i_paranoia_overlap_f(buffA, buffB, offsetA, offsetB, sizeA, sizeB)
- Int16_t *buffA;
- Int16_t *buffB;
- long offsetA;
- long offsetB;
- long sizeA;
- long sizeB;
+long i_paranoia_overlap_f(Int16_t *buffA, Int16_t *buffB, long offsetA,
+ long offsetB, long sizeA, long sizeB)
{
long endA = offsetA;
long endB = offsetB;
@@ -100,13 +88,7 @@
return (endA - offsetA);
}
-EXPORT int
-i_stutter_or_gap(A, B, offA, offB, gap)
- Int16_t *A;
- Int16_t *B;
- long offA;
- long offB;
- long gap;
+int i_stutter_or_gap(Int16_t *A, Int16_t *B, long offA, long offB, long gap)
{
long a1 = offA;
long b1 = offB;
@@ -122,17 +104,9 @@
/*
* riftv is the first value into the rift -> or <-
*/
-EXPORT void
-i_analyze_rift_f(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB, matchC)
- Int16_t *A;
- Int16_t *B;
- long sizeA;
- long sizeB;
- long aoffset;
- long boffset;
- long *matchA;
- long *matchB;
- long *matchC;
+void i_analyze_rift_f(Int16_t *A, Int16_t *B, long sizeA, long sizeB,
+ long aoffset, long boffset, long *matchA, long *matchB,
+ long *matchC)
{
long apast = sizeA - aoffset;
@@ -190,17 +164,9 @@
/*
* riftv must be first even val of rift moving back
*/
-EXPORT void
-i_analyze_rift_r(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB, matchC)
- Int16_t *A;
- Int16_t *B;
- long sizeA;
- long sizeB;
- long aoffset;
- long boffset;
- long *matchA;
- long *matchB;
- long *matchC;
+void i_analyze_rift_r(Int16_t *A, Int16_t *B, long sizeA, long sizeB,
+ long aoffset, long boffset, long *matchA, long *matchB,
+ long *matchC)
{
long apast = aoffset + 1;
@@ -256,16 +222,9 @@
}
}
-EXPORT void
-analyze_rift_silence_f(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB)
- Int16_t *A;
- Int16_t *B;
- long sizeA;
- long sizeB;
- long aoffset;
- long boffset;
- long *matchA;
- long *matchB;
+void analyze_rift_silence_f(Int16_t *A, Int16_t *B, long sizeA, long sizeB,
+ long aoffset, long boffset, long *matchA,
+ long *matchB)
{
*matchA = -1;
*matchB = -1;
Modified: nonameyet/branches/cleanup/libparanoia/isort.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/isort.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/isort.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -41,24 +41,18 @@
#include "isort.h"
#include "pmalloc.h"
-EXPORT sort_info *sort_alloc __PR((long size));
-EXPORT void sort_unsortall __PR((sort_info * i));
-EXPORT void sort_free __PR((sort_info * i));
-LOCAL void sort_sort __PR((sort_info * i,
- long sortlo, long sorthi));
-EXPORT void sort_setup __PR((sort_info * i,
- Int16_t * vector,
- long *abspos, long size,
- long sortlo, long sorthi));
-EXPORT sort_link *sort_getmatch __PR((sort_info * i,
- long post, long overlap,
- int value));
-EXPORT sort_link *sort_nextmatch __PR((sort_info * i, sort_link * prev));
+sort_info *sort_alloc __PR((long size));
+void sort_unsortall __PR((sort_info * i));
+void sort_free __PR((sort_info * i));
+void sort_sort __PR((sort_info * i, long sortlo, long sorthi));
+void sort_setup __PR((sort_info * i, Int16_t * vector, long *abspos,
+ long size, long sortlo, long sorthi));
+sort_link *sort_getmatch __PR((sort_info * i, long post, long overlap,
+ int value));
+sort_link *sort_nextmatch __PR((sort_info * i, sort_link * prev));
-EXPORT sort_info *
-sort_alloc(size)
- long size;
+sort_info *sort_alloc(long size)
{
sort_info *ret = _pcalloc(1, sizeof (sort_info));
@@ -75,9 +69,7 @@
return (ret);
}
-EXPORT void
-sort_unsortall(i)
- sort_info *i;
+void sort_unsortall(sort_info *i)
{
if (i->lastbucket > 2000) { /* a guess */
memset(i->head, 0, 65536 * sizeof (sort_link *));
@@ -92,9 +84,7 @@
i->sortbegin = -1;
}
-EXPORT void
-sort_free(i)
- sort_info *i;
+void sort_free(sort_info *i)
{
_pfree(i->revindex);
_pfree(i->head);
@@ -102,11 +92,7 @@
_pfree(i);
}
-LOCAL void
-sort_sort(i, sortlo, sorthi)
- sort_info *i;
- long sortlo;
- long sorthi;
+void sort_sort(sort_info *i, long sortlo, long sorthi)
{
long j;
@@ -127,14 +113,8 @@
/*
* size *must* be less than i->maxsize
*/
-EXPORT void
-sort_setup(i, vector, abspos, size, sortlo, sorthi)
- sort_info *i;
- Int16_t *vector;
- long *abspos;
- long size;
- long sortlo;
- long sorthi;
+void sort_setup(sort_info *i, Int16_t *vector, long *abspos, long size,
+ long sortlo, long sorthi)
{
if (i->sortbegin != -1)
sort_unsortall(i);
@@ -147,12 +127,7 @@
i->hi = max(0, min(sorthi - *abspos, size));
}
-EXPORT sort_link *
-sort_getmatch(i, post, overlap, value)
- sort_info *i;
- long post;
- long overlap;
- int value;
+sort_link *sort_getmatch(sort_info *i, long post, long overlap, int value)
{
sort_link *ret;
@@ -180,10 +155,7 @@
return (ret);
}
-EXPORT sort_link *
-sort_nextmatch(i, prev)
- sort_info *i;
- sort_link *prev;
+sort_link *sort_nextmatch(sort_info *i, sort_link *prev)
{
sort_link *ret = prev->next;
Modified: nonameyet/branches/cleanup/libparanoia/overlap.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/overlap.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/overlap.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -36,22 +36,19 @@
#include "overlap.h"
#include "isort.h"
-EXPORT void paranoia_resetcache __PR((cdrom_paranoia * p));
-EXPORT void paranoia_resetall __PR((cdrom_paranoia * p));
-EXPORT void i_paranoia_trim __PR((cdrom_paranoia * p,
- long beginword, long endword));
-EXPORT void offset_adjust_settings __PR((cdrom_paranoia * p,
- void (*callback) (long, int)));
-EXPORT void offset_add_value __PR((cdrom_paranoia * p,
- offsets * o, long value,
- void (*callback) (long, int)));
+void paranoia_resetcache __PR((cdrom_paranoia * p));
+void paranoia_resetall __PR((cdrom_paranoia * p));
+void i_paranoia_trim __PR((cdrom_paranoia * p, long beginword,
+ long endword));
+void offset_adjust_settings __PR((cdrom_paranoia * p,
+ void (*callback)(long, int)));
+void offset_add_value __PR((cdrom_paranoia * p, offsets * o, long value,
+ void (*callback)(long, int)));
/*
* Internal cache management
*/
-EXPORT void
-paranoia_resetcache(p)
- cdrom_paranoia *p;
+void paranoia_resetcache(cdrom_paranoia *p)
{
c_block *c = c_first(p);
v_fragment *v;
@@ -68,9 +65,7 @@
}
}
-EXPORT void
-paranoia_resetall(p)
- cdrom_paranoia *p;
+void paranoia_resetall(cdrom_paranoia *p)
{
p->root.returnedlimit = 0;
p->dyndrift = 0;
@@ -83,11 +78,7 @@
paranoia_resetcache(p);
}
-EXPORT void
-i_paranoia_trim(p, beginword, endword)
- cdrom_paranoia *p;
- long beginword;
- long endword;
+void i_paranoia_trim(cdrom_paranoia *p, long beginword, long endword)
{
root_block *root = &(p->root);
@@ -135,10 +126,7 @@
/*
* Statistical and heuristic[al? :-] management
*/
-EXPORT void
-offset_adjust_settings(p, callback)
- cdrom_paranoia *p;
- void (*callback) __PR((long, int));
+void offset_adjust_settings(cdrom_paranoia *p, void (*callback)(long, int))
{
if (p->stage2.offpoints >= 10) {
/*
@@ -227,12 +215,8 @@
}
}
-EXPORT void
-offset_add_value(p, o, value, callback)
- cdrom_paranoia *p;
- offsets *o;
- long value;
- void (*callback) __PR((long, int));
+void offset_add_value(cdrom_paranoia *p, offsets *o, long value,
+ void (*callback)(long, int))
{
if (o->offpoints != -1) {
Modified: nonameyet/branches/cleanup/libparanoia/p_block.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/p_block.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/p_block.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -28,54 +28,44 @@
#include "cdda_paranoia.h"
#include "pmalloc.h"
-EXPORT linked_list *new_list __PR((void *(*newp) (void),
- void (*freep) (void *)));
-EXPORT linked_element *add_elem __PR((linked_list * l, void *elem));
-EXPORT linked_element *new_elem __PR((linked_list * list));
-EXPORT void free_elem __PR((linked_element * e,
- int free_ptr));
-EXPORT void free_list __PR((linked_list * list,
- int free_ptr));
-EXPORT void *get_elem __PR((linked_element * e));
-EXPORT linked_list *copy_list __PR((linked_list * list));
-LOCAL c_block *i_cblock_constructor __PR((void));
-EXPORT void i_cblock_destructor __PR((c_block * c));
-EXPORT c_block *new_c_block __PR((cdrom_paranoia * p));
-EXPORT void free_c_block __PR((c_block * c));
-LOCAL v_fragment *i_vfragment_constructor __PR((void));
-LOCAL void i_v_fragment_destructor __PR((v_fragment * v));
-EXPORT v_fragment *new_v_fragment __PR((cdrom_paranoia * p,
- c_block * one,
- long begin, long end, int last));
-EXPORT void free_v_fragment __PR((v_fragment * v));
-EXPORT c_block *c_first __PR((cdrom_paranoia * p));
-EXPORT c_block *c_last __PR((cdrom_paranoia * p));
-EXPORT c_block *c_next __PR((c_block * c));
-EXPORT c_block *c_prev __PR((c_block * c));
-EXPORT v_fragment *v_first __PR((cdrom_paranoia * p));
-EXPORT v_fragment *v_last __PR((cdrom_paranoia * p));
-EXPORT v_fragment *v_next __PR((v_fragment * v));
-EXPORT v_fragment *v_prev __PR((v_fragment * v));
-EXPORT void recover_cache __PR((cdrom_paranoia * p));
-EXPORT Int16_t *v_buffer __PR((v_fragment * v));
-EXPORT c_block *c_alloc __PR((Int16_t * vector,
- long begin, long size));
-EXPORT void c_set __PR((c_block * v, long begin));
-EXPORT void c_remove __PR((c_block * v,
- long cutpos, long cutsize));
-EXPORT void c_overwrite __PR((c_block * v,
- long pos, Int16_t * b,
- long size));
-EXPORT void c_append __PR((c_block * v,
- Int16_t * vector, long size));
-EXPORT void c_removef __PR((c_block * v, long cut));
-EXPORT void i_paranoia_firstlast __PR((cdrom_paranoia * p));
-EXPORT cdrom_paranoia *paranoia_init __PR((void * d, int nsectors));
+linked_list *new_list __PR((void *(*newp) (void),
+ void (*freep) (void *)));
+linked_element *add_elem __PR((linked_list * l, void *elem));
+linked_element *new_elem __PR((linked_list * list));
+void free_elem __PR((linked_element * e, int free_ptr));
+void free_list __PR((linked_list * list, int free_ptr));
+void *get_elem __PR((linked_element * e));
+linked_list *copy_list __PR((linked_list * list));
+static c_block *i_cblock_constructor __PR((void));
+void i_cblock_destructor __PR((c_block * c));
+c_block *new_c_block __PR((cdrom_paranoia * p));
+void free_c_block __PR((c_block * c));
+static v_fragment *i_vfragment_constructor __PR((void));
+static void i_v_fragment_destructor __PR((v_fragment * v));
+v_fragment *new_v_fragment __PR((cdrom_paranoia * p, c_block * one,
+ long begin, long end, int last));
+void free_v_fragment __PR((v_fragment * v));
+c_block *c_first __PR((cdrom_paranoia * p));
+c_block *c_last __PR((cdrom_paranoia * p));
+c_block *c_next __PR((c_block * c));
+c_block *c_prev __PR((c_block * c));
+v_fragment *v_first __PR((cdrom_paranoia * p));
+v_fragment *v_last __PR((cdrom_paranoia * p));
+v_fragment *v_next __PR((v_fragment * v));
+v_fragment *v_prev __PR((v_fragment * v));
+void recover_cache __PR((cdrom_paranoia * p));
+Int16_t *v_buffer __PR((v_fragment * v));
+c_block *c_alloc __PR((Int16_t * vector, long begin, long size));
+void c_set __PR((c_block * v, long begin));
+void c_remove __PR((c_block * v, long cutpos, long cutsize));
+void c_overwrite __PR((c_block * v, long pos, Int16_t * b, long size));
+void c_append __PR((c_block * v, Int16_t * vector, long size));
+void c_removef __PR((c_block * v, long cut));
+void i_paranoia_firstlast __PR((cdrom_paranoia * p));
+cdrom_paranoia *paranoia_init __PR((void * d, int nsectors));
-EXPORT linked_list *
-new_list(newp, freep)
- void *(*newp) __PR((void));
- void (*freep) __PR((void *));
+
+linked_list *new_list(void *(*newp)(void), void (*freep)(void *))
{
linked_list *ret = _pcalloc(1, sizeof (linked_list));
@@ -84,10 +74,7 @@
return (ret);
}
-EXPORT linked_element *
-add_elem(l, elem)
- linked_list *l;
- void *elem;
+linked_element *add_elem(linked_list *l, void *elem)
{
linked_element *ret = _pcalloc(1, sizeof (linked_element));
@@ -108,19 +95,14 @@
return (ret);
}
-EXPORT linked_element *
-new_elem(list)
- linked_list *list;
+linked_element *new_elem(linked_list *list)
{
void *new = list->new_poly();
return (add_elem(list, new));
}
-EXPORT void
-free_elem(e, free_ptr)
- linked_element *e;
- int free_ptr;
+void free_elem(linked_element *e, int free_ptr)
{
linked_list *l = e->list;
@@ -141,26 +123,19 @@
_pfree(e);
}
-EXPORT void
-free_list(list, free_ptr)
- linked_list *list;
- int free_ptr;
+void free_list(linked_list *list, int free_ptr)
{
while (list->head)
free_elem(list->head, free_ptr);
_pfree(list);
}
-EXPORT void *
-get_elem(e)
- linked_element *e;
+void *get_elem(linked_element *e)
{
return (e->ptr);
}
-EXPORT linked_list *
-copy_list(list)
- linked_list *list;
+linked_list *copy_list(linked_list *list)
{
linked_list *new = new_list(list->new_poly, list->free_poly);
linked_element *i = list->tail;
@@ -175,8 +150,7 @@
/**** C_block stuff ******************************************************/
#define vp_cblock_constructor_func ((void*(*)__PR((void)))i_cblock_constructor)
-LOCAL c_block *
-i_cblock_constructor()
+static c_block *i_cblock_constructor()
{
c_block *ret = _pcalloc(1, sizeof (c_block));
@@ -184,9 +158,7 @@
}
#define vp_cblock_destructor_func ((void(*)__PR((void*)))i_cblock_destructor)
-EXPORT void
-i_cblock_destructor(c)
- c_block *c;
+void i_cblock_destructor(c_block *c)
{
if (c) {
if (c->vector)
@@ -198,9 +170,7 @@
}
}
-EXPORT c_block *
-new_c_block(p)
- cdrom_paranoia *p;
+c_block *new_c_block(cdrom_paranoia *p)
{
linked_element *e = new_elem(p->cache);
c_block *c = e->ptr;
@@ -210,9 +180,7 @@
return (c);
}
-EXPORT void
-free_c_block(c)
- c_block *c;
+void free_c_block(c_block *c)
{
/*
* also rid ourselves of v_fragments that reference this block
@@ -231,8 +199,7 @@
}
#define vp_vfragment_constructor_func ((void*(*)__PR((void)))i_vfragment_constructor)
-LOCAL v_fragment *
-i_vfragment_constructor()
+static v_fragment *i_vfragment_constructor()
{
v_fragment *ret = _pcalloc(1, sizeof (v_fragment));
@@ -240,20 +207,13 @@
}
#define vp_v_fragment_destructor_func ((void(*)__PR((void*)))i_v_fragment_destructor)
-LOCAL void
-i_v_fragment_destructor(v)
- v_fragment *v;
+static void i_v_fragment_destructor(v_fragment *v)
{
_pfree(v);
}
-EXPORT v_fragment *
-new_v_fragment(p, one, begin, end, last)
- cdrom_paranoia *p;
- c_block *one;
- long begin;
- long end;
- int last;
+v_fragment *new_v_fragment(cdrom_paranoia *p, c_block *one, long begin,
+ long end, int last)
{
linked_element *e = new_elem(p->fragments);
v_fragment *b = e->ptr;
@@ -270,52 +230,40 @@
return (b);
}
-EXPORT void
-free_v_fragment(v)
- v_fragment *v;
+void free_v_fragment(v_fragment *v)
{
free_elem(v->e, 1);
}
-EXPORT c_block *
-c_first(p)
- cdrom_paranoia *p;
+c_block *c_first(cdrom_paranoia *p)
{
if (p->cache->head)
return (p->cache->head->ptr);
return (NULL);
}
-EXPORT c_block*
-c_last(p)
- cdrom_paranoia *p;
+c_block* c_last(cdrom_paranoia *p)
{
if (p->cache->tail)
return (p->cache->tail->ptr);
return (NULL);
}
-EXPORT c_block *
-c_next(c)
- c_block *c;
+c_block *c_next(c_block *c)
{
if (c->e->next)
return (c->e->next->ptr);
return (NULL);
}
-EXPORT c_block *
-c_prev(c)
- c_block *c;
+c_block *c_prev(c_block *c)
{
if (c->e->prev)
return (c->e->prev->ptr);
return (NULL);
}
-EXPORT v_fragment *
-v_first(p)
- cdrom_paranoia *p;
+v_fragment *v_first(cdrom_paranoia *p)
{
if (p->fragments->head) {
return (p->fragments->head->ptr);
@@ -323,36 +271,28 @@
return (NULL);
}
-EXPORT v_fragment *
-v_last(p)
- cdrom_paranoia *p;
+v_fragment *v_last(cdrom_paranoia *p)
{
if (p->fragments->tail)
return (p->fragments->tail->ptr);
return (NULL);
}
-EXPORT v_fragment *
-v_next(v)
- v_fragment *v;
+v_fragment *v_next(v_fragment *v)
{
if (v->e->next)
return (v->e->next->ptr);
return (NULL);
}
-EXPORT v_fragment *
-v_prev(v)
- v_fragment *v;
+v_fragment *v_prev(v_fragment *v)
{
if (v->e->prev)
return (v->e->prev->ptr);
return (NULL);
}
-EXPORT void
-recover_cache(p)
- cdrom_paranoia *p;
+void recover_cache(cdrom_paranoia *p)
{
linked_list *l = p->cache;
@@ -368,9 +308,7 @@
}
-EXPORT Int16_t *
-v_buffer(v)
- v_fragment *v;
+Int16_t *v_buffer(v_fragment *v)
{
if (!v->one)
return (NULL);
@@ -382,11 +320,7 @@
/*
* alloc a c_block not on a cache list
*/
-EXPORT c_block *
-c_alloc(vector, begin, size)
- Int16_t *vector;
- long begin;
- long size;
+c_block *c_alloc(Int16_t *vector, long begin, long size)
{
c_block *c = _pcalloc(1, sizeof (c_block));
@@ -396,10 +330,7 @@
return (c);
}
-EXPORT void
-c_set(v, begin)
- c_block *v;
- long begin;
+void c_set(c_block *v, long begin)
{
v->begin = begin;
}
@@ -407,12 +338,7 @@
/*
* pos here is vector position from zero
*/
-EXPORT void
-c_insert(v, pos, b, size)
- c_block *v;
- long pos;
- Int16_t *b;
- long size;
+void c_insert(c_block *v, long pos, Int16_t *b, long size)
{
int vs = cs(v);
@@ -432,11 +358,7 @@
v->size += size;
}
-EXPORT void
-c_remove(v, cutpos, cutsize)
- c_block *v;
- long cutpos;
- long cutsize;
+void c_remove(c_block *v, long cutpos, long cutsize)
{
int vs = cs(v);
@@ -455,12 +377,7 @@
v->size -= cutsize;
}
-EXPORT void
-c_overwrite(v, pos, b, size)
- c_block *v;
- long pos;
- Int16_t *b;
- long size;
+void c_overwrite(c_block *v, long pos, Int16_t *b, long size)
{
int vs = cs(v);
@@ -472,11 +389,7 @@
memcpy(v->vector + pos, b, size * sizeof (Int16_t));
}
-EXPORT void
-c_append(v, vector, size)
- c_block *v;
- Int16_t *vector;
- long size;
+void c_append(c_block *v, Int16_t *vector, long size)
{
int vs = cs(v);
@@ -492,10 +405,7 @@
v->size += size;
}
-EXPORT void
-c_removef(v, cut)
- c_block *v;
- long cut;
+void c_removef(c_block *v, long cut)
{
c_remove(v, 0, cut);
v->begin += cut;
@@ -506,9 +416,7 @@
/*
* Initialization
*/
-EXPORT void
-i_paranoia_firstlast(p)
- cdrom_paranoia *p;
+void i_paranoia_firstlast(cdrom_paranoia *p)
{
int i;
void *d = p->d;
@@ -529,10 +437,7 @@
}
-EXPORT cdrom_paranoia *
-paranoia_init(d, nsectors)
- void *d;
- int nsectors;
+cdrom_paranoia *paranoia_init(void *d, int nsectors)
{
cdrom_paranoia *p = _pcalloc(1, sizeof (cdrom_paranoia));
@@ -563,11 +468,7 @@
return (p);
}
-EXPORT void
-paranoia_dynoverlapset(p, minoverlap, maxoverlap)
- cdrom_paranoia *p;
- int minoverlap;
- int maxoverlap;
+void paranoia_dynoverlapset(cdrom_paranoia *p, int minoverlap, int maxoverlap)
{
if (minoverlap >= 0)
p->mindynoverlap = minoverlap;
Modified: nonameyet/branches/cleanup/libparanoia/paranoia.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/paranoia.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/paranoia.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -90,64 +90,65 @@
long end;
} sync_result;
-LOCAL inline long re __PR((root_block * root));
-LOCAL inline long rb __PR((root_block * root));
-LOCAL inline long rs __PR((root_block * root));
-LOCAL inline Int16_t *rv __PR((root_block * root));
-LOCAL inline long i_paranoia_overlap __PR((Int16_t * buffA, Int16_t * buffB,
- long offsetA, long offsetB,
- long sizeA, long sizeB,
- long *ret_begin, long *ret_end));
-LOCAL inline long i_paranoia_overlap2 __PR((Int16_t * buffA, Int16_t * buffB,
- Uchar *flagsA, Uchar *flagsB,
- long offsetA, long offsetB,
- long sizeA, long sizeB,
- long *ret_begin, long *ret_end));
-LOCAL inline long do_const_sync __PR((c_block * A,
- sort_info * B, Uchar *flagB,
- long posA, long posB,
- long *begin, long *end, long *offset));
-LOCAL inline long try_sort_sync __PR((cdrom_paranoia * p,
- sort_info * A, Uchar *Aflags,
- c_block * B,
- long post, long *begin, long *end,
- long *offset, void (*callback) (long, int)));
-LOCAL inline void stage1_matched __PR((c_block * old, c_block * new,
- long matchbegin, long matchend,
- long matchoffset, void (*callback) (long, int)));
-LOCAL long i_iterate_stage1 __PR((cdrom_paranoia * p, c_block * old, c_block * new,
- void (*callback) (long, int)));
-LOCAL long i_stage1 __PR((cdrom_paranoia * p, c_block * new,
- void (*callback) (long, int)));
-LOCAL long i_iterate_stage2 __PR((cdrom_paranoia * p, v_fragment * v,
- sync_result * r, void (*callback) (long, int)));
-LOCAL void i_silence_test __PR((root_block * root));
-LOCAL long i_silence_match __PR((root_block * root, v_fragment * v,
- void (*callback) (long, int)));
-LOCAL long i_stage2_each __PR((root_block * root, v_fragment * v,
- void (*callback) (long, int)));
-LOCAL int i_init_root __PR((root_block * root, v_fragment * v, long begin,
- void (*callback) (long, int)));
-LOCAL int vsort __PR((const void *a, const void *b));
-LOCAL int i_stage2 __PR((cdrom_paranoia * p, long beginword, long endword,
- void (*callback) (long, int)));
-LOCAL void i_end_case __PR((cdrom_paranoia * p, long endword,
- void (*callback) (long, int)));
-LOCAL void verify_skip_case __PR((cdrom_paranoia * p, void (*callback) (long, int)));
-EXPORT void paranoia_free __PR((cdrom_paranoia * p));
-EXPORT void paranoia_modeset __PR((cdrom_paranoia * p, int enable));
-EXPORT long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode));
-c_block *i_read_c_block __PR((cdrom_paranoia * p, long beginword, long endword,
- void (*callback) (long, int)));
-EXPORT Int16_t *paranoia_read __PR((cdrom_paranoia * p, void (*callback) (long, int)));
-EXPORT Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p, void (*callback) (long, int),
- int max_retries));
-EXPORT void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap));
+static inline long re __PR((root_block * root));
+static inline long rb __PR((root_block * root));
+static inline long rs __PR((root_block * root));
+static inline Int16_t *rv __PR((root_block * root));
+static inline long i_paranoia_overlap __PR((Int16_t * buffA, Int16_t * buffB,
+ long offsetA, long offsetB,
+ long sizeA, long sizeB,
+ long *ret_begin, long *ret_end));
+static inline long i_paranoia_overlap2 __PR((Int16_t * buffA, Int16_t * buffB,
+ Uchar *flagsA, Uchar *flagsB,
+ long offsetA, long offsetB,
+ long sizeA, long sizeB,
+ long *ret_begin, long *ret_end));
+static inline long do_const_sync __PR((c_block * A,
+ sort_info * B, Uchar *flagB,
+ long posA, long posB,
+ long *begin, long *end, long *offset));
+static inline long try_sort_sync __PR((cdrom_paranoia * p,
+ sort_info * A, Uchar *Aflags,
+ c_block * B,
+ long post, long *begin, long *end,
+ long *offset, void (*callback) (long, int)));
+static inline void stage1_matched __PR((c_block * old, c_block * new,
+ long matchbegin, long matchend,
+ long matchoffset, void (*callback) (long, int)));
+static long i_iterate_stage1 __PR((cdrom_paranoia * p, c_block * old, c_block * new,
+ void (*callback) (long, int)));
+static long i_stage1 __PR((cdrom_paranoia * p, c_block * new,
+ void (*callback) (long, int)));
+static long i_iterate_stage2 __PR((cdrom_paranoia * p, v_fragment * v,
+ sync_result *r, void (*callback)(long, int)));
+static void i_silence_test __PR((root_block * root));
+static long i_silence_match __PR((root_block * root, v_fragment * v,
+ void (*callback) (long, int)));
+static long i_stage2_each __PR((root_block * root, v_fragment * v,
+ void (*callback) (long, int)));
+static int i_init_root __PR((root_block * root, v_fragment * v,
+ long begin, void (*callback)(long, int)));
+static int vsort __PR((const void *a, const void *b));
+static int i_stage2 __PR((cdrom_paranoia * p, long beginword,
+ long endword, void (*callback)(long, int)));
+static void i_end_case __PR((cdrom_paranoia * p, long endword,
+ void (*callback)(long, int)));
+static void verify_skip_case __PR((cdrom_paranoia * p,
+ void (*callback)(long, int)));
+void paranoia_free __PR((cdrom_paranoia * p));
+void paranoia_modeset __PR((cdrom_paranoia * p, int enable));
+long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode));
+c_block *i_read_c_block __PR((cdrom_paranoia * p, long beginword,
+ long endword, void (*callback)(long,int)));
+Int16_t *paranoia_read __PR((cdrom_paranoia * p,
+ void (*callback)(long, int)));
+Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p,
+ void (*callback)(long, int),
+ int max_retries));
+void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap));
-LOCAL inline long
-re(root)
- root_block *root;
+static inline long re(root_block *root)
{
if (!root)
return (-1);
@@ -156,9 +157,7 @@
return (ce(root->vector));
}
-LOCAL inline long
-rb(root)
- root_block *root;
+static inline long rb(root_block *root)
{
if (!root)
return (-1);
@@ -167,9 +166,7 @@
return (cb(root->vector));
}
-LOCAL inline long
-rs(root)
- root_block *root;
+static inline long rs(root_block *root)
{
if (!root)
return (-1);
@@ -178,9 +175,7 @@
return (cs(root->vector));
}
-LOCAL inline Int16_t *
-rv(root)
- root_block *root;
+static inline Int16_t *rv(root_block *root)
{
if (!root)
return (NULL);
@@ -194,16 +189,9 @@
/*
* matching and analysis code
*/
-LOCAL inline long
-i_paranoia_overlap(buffA, buffB, offsetA, offsetB, sizeA, sizeB, ret_begin, ret_end)
- Int16_t *buffA;
- Int16_t *buffB;
- long offsetA;
- long offsetB;
- long sizeA;
- long sizeB;
- long *ret_begin;
- long *ret_end;
+static inline long
+i_paranoia_overlap(Int16_t *buffA, Int16_t *buffB, long offsetA, long offsetB,
+ long sizeA, long sizeB, long *ret_begin, long *ret_end)
{
long beginA = offsetA;
long endA = offsetA;
@@ -227,18 +215,10 @@
return (endA - beginA);
}
-LOCAL inline long
-i_paranoia_overlap2(buffA, buffB, flagsA, flagsB, offsetA, offsetB, sizeA, sizeB, ret_begin, ret_end)
- Int16_t *buffA;
- Int16_t *buffB;
- Uchar *flagsA;
- Uchar *flagsB;
- long offsetA;
- long offsetB;
- long sizeA;
- long sizeB;
- long *ret_begin;
- long *ret_end;
+static inline long
+i_paranoia_overlap2(Int16_t *buffA, Int16_t *buffB, Uchar *flagsA,
+ Uchar *flagsB, long offsetA, long offsetB, long sizeA,
+ long sizeB, long *ret_begin, long *ret_end)
{
long beginA = offsetA;
long endA = offsetA;
@@ -298,16 +278,9 @@
*/
#define OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1)
-LOCAL inline long
-do_const_sync(A, B, flagB, posA, posB, begin, end, offset)
- c_block *A;
- sort_info *B;
- Uchar *flagB;
- long posA;
- long posB;
- long *begin;
- long *end;
- long *offset;
+static inline long
+do_const_sync(c_block *A, sort_info *B, Uchar *flagB, long posA, long posB,
+ long *begin, long *end, long *offset)
{
Uchar *flagA = A->flags;
long ret = 0;
@@ -333,17 +306,10 @@
* post from root. Begin, end, offset count from B's frame of
* reference
*/
-LOCAL inline long
-try_sort_sync(p, A, Aflags, B, post, begin, end, offset, callback)
- cdrom_paranoia *p;
- sort_info *A;
- Uchar *Aflags;
- c_block *B;
- long post;
- long *begin;
- long *end;
- long *offset;
- void (*callback) __PR((long, int));
+static inline long
+try_sort_sync(cdrom_paranoia *p, sort_info *A, Uchar *Aflags, c_block *B,
+ long post, long *begin, long *end, long *offset,
+ void (*callback)(long, int))
{
long dynoverlap = p->dynoverlap;
@@ -395,14 +361,9 @@
return (0);
}
-LOCAL inline void
-stage1_matched(old, new, matchbegin, matchend, matchoffset, callback)
- c_block *old;
- c_block *new;
- long matchbegin;
- long matchend;
- long matchoffset;
- void (*callback) __PR((long, int));
+static inline void
+stage1_matched(c_block *old, c_block *new, long matchbegin, long matchend,
+ long matchoffset, void (*callback)(long, int))
{
long i;
long oldadjbegin = matchbegin - cb(old);
@@ -450,12 +411,9 @@
#define CB_NULL (void (*) __PR((long, int)))0
-LOCAL long
-i_iterate_stage1(p, old, new, callback)
- cdrom_paranoia *p;
- c_block *old;
- c_block *new;
- void (*callback) __PR((long, int));
+static long
+i_iterate_stage1(cdrom_paranoia *p, c_block *old, c_block *new,
+ void (*callback)(long, int))
{
long matchbegin = -1;
@@ -521,11 +479,8 @@
return (ret);
}
-LOCAL long
-i_stage1(p, new, callback)
- cdrom_paranoia *p;
- c_block *new;
- void (*callback) __PR((long, int));
+static long
+i_stage1(cdrom_paranoia *p, c_block *new, void (*callback)(long, int))
{
long size = cs(new);
@@ -579,12 +534,9 @@
*
* do *not* match using zero posts
*/
-LOCAL long
-i_iterate_stage2(p, v, r, callback)
- cdrom_paranoia *p;
- v_fragment *v;
- sync_result *r;
- void (*callback) __PR((long, int));
+static long
+i_iterate_stage2(cdrom_paranoia *p, v_fragment *v, sync_result *r,
+ void (*callback)(long, int))
{
root_block *root = &(p->root);
long matchbegin = -1;
@@ -654,9 +606,7 @@
/*
* simple test for a root vector that ends in silence
*/
-LOCAL void
-i_silence_test(root)
- root_block *root;
+static void i_silence_test(root_block *root)
{
Int16_t *vec = rv(root);
long end = re(root) - rb(root) - 1;
@@ -680,11 +630,8 @@
* also must be called with vectors in ascending begin order in case
* there are nonzero islands
*/
-LOCAL long
-i_silence_match(root, v, callback)
- root_block *root;
- v_fragment *v;
- void (*callback) __PR((long, int));
+static long
+i_silence_match(root_block *root, v_fragment *v, void (*callback)(long, int))
{
cdrom_paranoia *p = v->p;
@@ -778,11 +725,8 @@
return (1);
}
-LOCAL long
-i_stage2_each(root, v, callback)
- root_block *root;
- v_fragment *v;
- void (*callback) __PR((long, int));
+static long
+i_stage2_each(root_block *root, v_fragment *v, void (*callback)(long, int))
{
cdrom_paranoia *p = v->p;
@@ -1110,12 +1054,9 @@
}
}
-LOCAL int
-i_init_root(root, v, begin, callback)
- root_block *root;
- v_fragment *v;
- long begin;
- void (*callback) __PR((long, int));
+static int
+i_init_root(root_block *root, v_fragment *v, long begin,
+ void (*callback)(long, int))
{
if (fb(v) <= begin && fe(v) > begin) {
@@ -1139,20 +1080,14 @@
return (0);
}
-LOCAL int
-vsort(a, b)
- const void *a;
- const void *b;
+static int vsort(const void *a, const void *b)
{
return ((*(v_fragment **) a)->begin - (*(v_fragment **) b)->begin);
}
-LOCAL int
-i_stage2(p, beginword, endword, callback)
- cdrom_paranoia *p;
- long beginword;
- long endword;
- void (*callback) __PR((long, int));
+static int
+i_stage2(cdrom_paranoia *p, long beginword, long endword,
+ void (*callback)(long, int))
{
int flag = 1;
@@ -1243,11 +1178,8 @@
return (ret);
}
-LOCAL void
-i_end_case(p, endword, callback)
- cdrom_paranoia *p;
- long endword;
- void (*callback) __PR((long, int));
+static void
+i_end_case(cdrom_paranoia *p, long endword, void (*callback)(long, int))
{
root_block *root = &p->root;
@@ -1287,10 +1219,8 @@
* *some* match with a cache block somewhere. Take it and continue it
* through the skip
*/
-LOCAL void
-verify_skip_case(p, callback)
- cdrom_paranoia *p;
- void (*callback) __PR((long, int));
+static void
+verify_skip_case(cdrom_paranoia *p, void (*callback)(long, int))
{
root_block *root = &(p->root);
@@ -1404,28 +1334,19 @@
/*
* toplevel
*/
-EXPORT void
-paranoia_free(p)
- cdrom_paranoia *p;
+void paranoia_free(cdrom_paranoia *p)
{
paranoia_resetall(p);
sort_free(p->sortcache);
_pfree(p);
}
-EXPORT void
-paranoia_modeset(p, enable)
- cdrom_paranoia *p;
- int enable;
+void paranoia_modeset(cdrom_paranoia *p, int enable)
{
p->enable = enable;
}
-EXPORT long
-paranoia_seek(p, seek, mode)
- cdrom_paranoia *p;
- long seek;
- int mode;
+long paranoia_seek(cdrom_paranoia *p, long seek, int mode)
{
long sector;
long ret;
@@ -1466,12 +1387,8 @@
/*
* returns last block read, -1 on error
*/
-EXPORT c_block *
-i_read_c_block(p, beginword, endword, callback)
- cdrom_paranoia *p;
- long beginword;
- long endword;
- void (*callback) __PR((long, int));
+c_block *i_read_c_block(cdrom_paranoia *p, long beginword, long endword,
+ void (*callback)(long, int))
{
/*
* why do it this way? We need to read lots of sectors to kludge
@@ -1678,10 +1595,7 @@
* The returned buffer is *not* to be freed by the caller. It will
* persist only until the next call to paranoia_read() for this p
*/
-EXPORT Int16_t *
-paranoia_read(p, callback)
- cdrom_paranoia *p;
- void (*callback) __PR((long, int));
+Int16_t *paranoia_read(cdrom_paranoia *p, void (*callback)(long, int))
{
return (paranoia_read_limited(p, callback, 20));
}
@@ -1691,11 +1605,8 @@
* old apps using the nerw libs. cdparanoia 9.8 will need the updated libs,
* but nothing else will require it.
*/
-EXPORT Int16_t *
-paranoia_read_limited(p, callback, max_retries)
- cdrom_paranoia *p;
- void (*callback) __PR((long, int));
- int max_retries;
+Int16_t *paranoia_read_limited(cdrom_paranoia *p, void (*callback)(long, int),
+ int max_retries)
{
long beginword = p->cursor * (CD_FRAMEWORDS);
long endword = beginword + CD_FRAMEWORDS;
@@ -1833,10 +1744,7 @@
/*
* a temporary hack
*/
-EXPORT void
-paranoia_overlapset(p, overlap)
- cdrom_paranoia *p;
- long overlap;
+void paranoia_overlapset(cdrom_paranoia *p, long overlap)
{
p->dynoverlap = overlap * CD_FRAMEWORDS;
p->stage1.offpoints = -1;
Modified: nonameyet/branches/cleanup/libparanoia/pmalloc.c
===================================================================
--- nonameyet/branches/cleanup/libparanoia/pmalloc.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/libparanoia/pmalloc.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -42,25 +42,21 @@
#include "pmalloc.h"
#ifdef PM_ADD_DEBUG
-LOCAL int madd = 8192;
-LOCAL int cadd = 8192;
-LOCAL int radd = 8192;
+static int madd = 8192;
+static int cadd = 8192;
+static int radd = 8192;
#else
-LOCAL int madd = 0;
-/*LOCAL int cadd = 0;*/
-LOCAL int radd = 0;
+static int madd = 0;
+/*static int cadd = 0;*/
+static int radd = 0;
#endif
-EXPORT void
-_pfree(ptr)
- void *ptr;
+void _pfree(void *ptr)
{
free(ptr);
}
-EXPORT void *
-_pmalloc(size)
- size_t size;
+void *_pmalloc(size_t size)
{
void *p;
@@ -70,10 +66,7 @@
return (p);
}
-EXPORT void *
-_pcalloc(nelem, elsize)
- size_t nelem;
- size_t elsize;
+void *_pcalloc(size_t nelem, size_t elsize)
{
void *p;
#ifdef PM_ADD_DEBUG
@@ -89,10 +82,7 @@
return (p);
}
-EXPORT void *
-_prealloc(ptr, size)
- void *ptr;
- size_t size;
+void *_prealloc(void *ptr, size_t size)
{
void *p;
Modified: nonameyet/branches/cleanup/readcd/io.c
===================================================================
--- nonameyet/branches/cleanup/readcd/io.c 2006-09-10 18:18:24 UTC (rev 247)
+++ nonameyet/branches/cleanup/readcd/io.c 2006-09-11 07:17:29 UTC (rev 248)
@@ -47,9 +47,9 @@
int dummy;
};
-LOCAL char *skipwhite __PR((const char *));
-LOCAL void prt_std __PR((char *, long, long, long, struct disk *));
-EXPORT BOOL cvt_std __PR((char *, long *, long, long, struct disk *));
+static char *skipwhite __PR((const char *));
+static void prt_std __PR((char *, long, long, long, struct disk *));
+BOOL cvt_std __PR((char *, long *, long, long, struct disk *));
extern BOOL getvalue __PR((char *, long *, long, long,
void (*)(char *, long, long, long, struct disk *),
BOOL (*)(char *, long *, long, long, struct disk *),
@@ -58,7 +58,7 @@
extern BOOL getint __PR((char *, int *, int, int));
extern BOOL yes __PR((char *, ...));
-LOCAL
+static
char *skipwhite(s)
const char *s;
{
@@ -73,7 +73,7 @@
}
/* ARGSUSED */
-EXPORT
+
BOOL
cvt_std(linep, lp, mini, maxi, dp)
char *linep;
@@ -121,7 +121,7 @@
}
/* ARGSUSED */
-LOCAL void
+static void
prt_std(s, l, mini, maxi, dp)
char *s;
long l;
@@ -132,7 +132,7 @@
printf("%s %ld (%ld - %ld)/<cr>:", s, l, mini, maxi);
}
-EXPORT
+
BOOL getvalue(s, lp, mini, maxi, prt, cvt, dp)
char *s;
long *lp;
@@ -169,7 +169,7 @@
/* NOTREACHED */
}
-EXPORT
+
BOOL getlong(s, lp, mini, maxi)
char *s;
long *lp;
@@ -179,7 +179,7 @@
return (getvalue(s, lp, mini, maxi, prt_std, cvt_std, (void *)0));
}
-EXPORT
+
BOOL getint(s, ip, mini, maxi)
char *s;
int *ip;
@@ -196,9 +196,9 @@
/* VARARGS1 */
#ifdef PROTOTYPES
-EXPORT BOOL yes(char *form, ...)
+BOOL yes(char *form, ...)
#else
-EXPORT
+
BOOL yes(form, va_alist)
char *form;
va_dcl
More information about the Debburn-changes
mailing list