summaryrefslogtreecommitdiff
path: root/libs/ardour/rdff.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-29 02:17:17 +0000
committerDavid Robillard <d@drobilla.net>2011-03-29 02:17:17 +0000
commitc9d0c2beaedfa14a394a811bb2669b72e6670afe (patch)
tree9eff32ad4a11750819bb1ead7e4b3432619dfa99 /libs/ardour/rdff.c
parent09943e1d571bb82326c0ac8195e2cb2b9a29e1b6 (diff)
Switch RDFF to 2-clause BSD license.
Fix whitespace. git-svn-id: svn://localhost/ardour2/branches/3.0@9222 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/rdff.c')
-rw-r--r--libs/ardour/rdff.c43
1 files changed, 25 insertions, 18 deletions
diff --git a/libs/ardour/rdff.c b/libs/ardour/rdff.c
index 28fd63c4c4..65ba893713 100644
--- a/libs/ardour/rdff.c
+++ b/libs/ardour/rdff.c
@@ -1,21 +1,27 @@
/*
RDFF - RDF in RIFF
Copyright 2011 David Robillard <http://drobilla.net>
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this sofware; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
@@ -52,7 +58,7 @@ rdff_open(const char* path, bool write)
if (write) {
fwrite("RIFF", CHUNK_ID_LEN, 1, fd); /* RIFF chunk ID */
fwrite(&size, sizeof(size), 1, fd); /* RIFF chunk size */
- fwrite(FILE_TYPE, CHUNK_ID_LEN, 1, fd); /* LV2 RIFF file type */
+ fwrite(FILE_TYPE, CHUNK_ID_LEN, 1, fd); /* File type */
} else {
char magic[CHUNK_ID_LEN];
if (fread(magic, CHUNK_ID_LEN, 1, fd) != 1
@@ -71,7 +77,8 @@ rdff_open(const char* path, bool write)
if (fread(magic, CHUNK_ID_LEN, 1, fd) != 1
|| strncmp(magic, FILE_TYPE, CHUNK_ID_LEN)) {
fclose(fd);
- fprintf(stderr, "%s: error: not an LV2 RIFF file\n", path);
+ fprintf(stderr, "%s: error: not an %s RIFF file\n",
+ FILE_TYPE, path);
return NULL;
}
}
@@ -194,7 +201,7 @@ main(int argc, char** argv)
snprintf(uri, sizeof(uri), "http://example.org/uri%02d", i + 1);
rdff_write_uri(file, i + 1, uri, strlen(uri) + 1);
}
-
+
char val[6];
for (int i = 0; i < N_RECORDS; ++i) {
snprintf(val, sizeof(val), "VAL%02d", i);