ref: 1bb23d65553fef31d8b588d3518e045a68620b30
parent: 5b1e9a8637cb7a2a1f95f4bee6f688982e2b5191
author: robs <robs>
date: Sat Mar 21 15:11:46 EDT 2009
csox tweaks
--- a/src/8svx.c
+++ b/src/8svx.c
@@ -45,13 +45,13 @@
/* read FORM chunk */
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || strncmp(buf, "FORM", (size_t)4) != 0)
{
- lsx_fail_errno(ft, SOX_EHDR, "Header did not begin with magic word 'FORM'");
+ lsx_fail_errno(ft, SOX_EHDR, "Header did not begin with magic word `FORM'");
return(SOX_EOF);
}
lsx_readdw(ft, &totalsize);
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || strncmp(buf, "8SVX", (size_t)4) != 0)
{
- lsx_fail_errno(ft, SOX_EHDR, "'FORM' chunk does not specify '8SVX' as type");
+ lsx_fail_errno(ft, SOX_EHDR, "'FORM' chunk does not specify `8SVX' as type");
return(SOX_EOF);
}
--- a/src/aiff.c
+++ b/src/aiff.c
@@ -73,13 +73,13 @@
/* FORM chunk */
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || strncmp(buf, "FORM", (size_t)4) != 0) {
- lsx_fail_errno(ft,SOX_EHDR,"AIFF header does not begin with magic word 'FORM'");
+ lsx_fail_errno(ft,SOX_EHDR,"AIFF header does not begin with magic word `FORM'");
return(SOX_EOF);
}
lsx_readdw(ft, &totalsize);
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || (strncmp(buf, "AIFF", (size_t)4) != 0 &&
strncmp(buf, "AIFC", (size_t)4) != 0)) {
- lsx_fail_errno(ft,SOX_EHDR,"AIFF 'FORM' chunk does not specify 'AIFF' or 'AIFC' as type");
+ lsx_fail_errno(ft,SOX_EHDR,"AIFF `FORM' chunk does not specify `AIFF' or `AIFC' as type");
return(SOX_EOF);
}
@@ -291,7 +291,7 @@
if (lsx_eof(ft))
break;
buf[4] = 0;
- lsx_debug("AIFFstartread: ignoring '%s' chunk", buf);
+ lsx_debug("AIFFstartread: ignoring `%s' chunk", buf);
lsx_readdw(ft, &chunksize);
if (lsx_eof(ft))
break;
@@ -543,7 +543,7 @@
if (lsx_eof(ft))
break;
buf[4] = '\0';
- lsx_warn("Ignoring AIFF tail chunk: '%s', %u bytes long",
+ lsx_warn("Ignoring AIFF tail chunk: `%s', %u bytes long",
buf, chunksize);
if (! strcmp(buf, "MARK") || ! strcmp(buf, "INST"))
lsx_warn(" You're stripping MIDI/loop info!");
--- a/src/csox
+++ b/src/csox
@@ -52,11 +52,11 @@
$type = $2;
$tail = $3;
$colour = $colours{$type};
- $tail =~ s/(\`|\')(.*?)\'/$reset$name_colour$2$reset$colour/g;
- print($colour, "$type ", $reset, $colour, $tail, $reset, "\n");
+ $tail =~ s/\`(.*?)\'/`$name_colour$1$colour'/g;
+ print(STDERR $colour, "$type ", $reset, $colour, $tail, $reset, "\n");
}
else {
- print("$default_colour$_$reset");
+ print(STDERR "$default_colour$_$reset");
}
}
--- a/src/effects_i.c
+++ b/src/effects_i.c
@@ -312,7 +312,7 @@
if (!filename || !strcmp(filename, "-")) {
if (effp->global_info->global_info->stdin_in_use_by) {
- lsx_fail("stdin already in use by '%s'", effp->global_info->global_info->stdin_in_use_by);
+ lsx_fail("stdin already in use by `%s'", effp->global_info->global_info->stdin_in_use_by);
return NULL;
}
effp->global_info->global_info->stdin_in_use_by = effp->handler.name;
--- a/src/formats.c
+++ b/src/formats.c
@@ -805,7 +805,7 @@
struct stat st;
if (!stat(path, &st) && (st.st_mode & S_IFMT) == S_IFREG &&
(overwrite_permitted && !overwrite_permitted(path))) {
- lsx_fail("permission to overwrite '%s' denied", path);
+ lsx_fail("permission to overwrite `%s' denied", path);
goto error;
}
if ((ft->fp = fopen(path, "wb")) == NULL) {
--- a/src/maud.c
+++ b/src/maud.c
@@ -54,7 +54,7 @@
/* read FORM chunk */
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || strncmp(buf, "FORM", (size_t)4) != 0)
{
- lsx_fail_errno(ft,SOX_EHDR,"MAUD: header does not begin with magic word 'FORM'");
+ lsx_fail_errno(ft,SOX_EHDR,"MAUD: header does not begin with magic word `FORM'");
return (SOX_EOF);
}
@@ -62,7 +62,7 @@
if (lsx_reads(ft, buf, (size_t)4) == SOX_EOF || strncmp(buf, "MAUD", (size_t)4) != 0)
{
- lsx_fail_errno(ft,SOX_EHDR,"MAUD: 'FORM' chunk does not specify 'MAUD' as type");
+ lsx_fail_errno(ft,SOX_EHDR,"MAUD: `FORM' chunk does not specify `MAUD' as type");
return(SOX_EOF);
}
--- a/src/noiseprof.c
+++ b/src/noiseprof.c
@@ -69,7 +69,7 @@
* since we already use stderr for diagnostics. */
if (!data->output_filename || !strcmp(data->output_filename, "-")) {
if (effp->global_info->global_info->stdout_in_use_by) {
- lsx_fail("stdout already in use by '%s'", effp->global_info->global_info->stdout_in_use_by);
+ lsx_fail("stdout already in use by `%s'", effp->global_info->global_info->stdout_in_use_by);
return SOX_EOF;
}
effp->global_info->global_info->stdout_in_use_by = effp->handler.name;
--- a/src/raw.c
+++ b/src/raw.c
@@ -31,12 +31,12 @@
sox_encoding_t encoding, unsigned size)
{
if (default_rate && ft->signal.rate == 0) {
- lsx_warn("'%s': sample rate not specified; trying 8kHz", ft->filename);
+ lsx_warn("`%s': sample rate not specified; trying 8kHz", ft->filename);
ft->signal.rate = 8000;
}
if (default_channels && ft->signal.channels == 0) {
- lsx_warn("'%s': # channels not specified; trying mono", ft->filename);
+ lsx_warn("`%s': # channels not specified; trying mono", ft->filename);
ft->signal.channels = 1;
}
@@ -43,7 +43,7 @@
if (encoding != SOX_ENCODING_UNKNOWN) {
if (ft->mode == 'r' && ft->encoding.encoding != SOX_ENCODING_UNKNOWN &&
ft->encoding.encoding != encoding)
- lsx_report("'%s': Format options overriding file-type encoding",
+ lsx_report("`%s': Format options overriding file-type encoding",
ft->filename);
else
ft->encoding.encoding = encoding;
@@ -52,7 +52,7 @@
if (size != 0) {
if (ft->mode == 'r' && ft->encoding.bits_per_sample != 0 &&
ft->encoding.bits_per_sample != size)
- lsx_report("'%s': Format options overriding file-type sample-size",
+ lsx_report("`%s': Format options overriding file-type sample-size",
ft->filename);
else
ft->encoding.bits_per_sample = size;
--- a/src/sndfile.c
+++ b/src/sndfile.c
@@ -282,7 +282,7 @@
/* Don't believe LSF's rate for raw files */
if ((sf->sf_info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW && !ft->signal.rate) {
- lsx_warn("'%s': sample rate not specified; trying 8kHz", ft->filename);
+ lsx_warn("`%s': sample rate not specified; trying 8kHz", ft->filename);
rate = 8000;
}
else rate = sf->sf_info->samplerate;
--- a/src/sox.c
+++ b/src/sox.c
@@ -2052,7 +2052,7 @@
set = lsx_realloc(set, len += 2 + strlen(p->text));
strcat(set, ", "); strcat(set, p->text);
}
- lsx_fail("--%s: '%s' is not one of: %s.",
+ lsx_fail("--%s: `%s' is not one of: %s.",
long_options[option_index].name, optarg, set + 2);
free(set);
exit(1);
--- a/src/sphere.c
+++ b/src/sphere.c
@@ -36,7 +36,7 @@
/* Magic header */
if (lsx_reads(ft, fldname, (size_t)8) || strncmp(fldname, "NIST_1A", (size_t)7) != 0) {
- lsx_fail_errno(ft, SOX_EHDR, "Sphere header does not begin with magic word 'NIST_1A'");
+ lsx_fail_errno(ft, SOX_EHDR, "Sphere header does not begin with magic word `NIST_1A'");
return (SOX_EOF);
}
--- a/src/util.c
+++ b/src/util.c
@@ -94,7 +94,7 @@
set = lsx_realloc(set, len += 2 + strlen(p->text));
strcat(set, ", "); strcat(set, p->text);
}
- lsx_fail("-%c: '%s' is not one of: %s.", c, optarg, set + 2);
+ lsx_fail("-%c: `%s' is not one of: %s.", c, optarg, set + 2);
free(set);
return INT_MAX;
}
--- a/src/wav.c
+++ b/src/wav.c
@@ -973,7 +973,7 @@
}
else
{
- lsx_debug("Attempting to seek beyond unsupported chunk '%c%c%c%c' of length %d bytes", magic[0], magic[1], magic[2], magic[3], len);
+ lsx_debug("Attempting to seek beyond unsupported chunk `%c%c%c%c' of length %d bytes", magic[0], magic[1], magic[2], magic[3], len);
len = (len + 1) & ~1u;
lsx_seeki(ft, (off_t)len, SEEK_CUR);
}