view src/dmfile.h @ 2576:812b16ee49db

I had been living under apparent false impression that "realfft.c" on which the FFT implementation in DMLIB was basically copied from was released in public domain at some point, but it could very well be that it never was. Correct license is (or seems to be) GNU GPL. Thus I removing the code from DMLIB, and profusely apologize to the author, Philip Van Baren. It was never my intention to distribute code based on his original work under a more liberal license than originally intended.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 Mar 2022 16:32:50 +0200
parents 6b1f41ca300a
children 9807ae37ad69
line wrap: on
line source

/*
 * DMLib
 * -- Standard I/O (stdio) file write/read endianess helpers
 * Programmed and designed by Matti 'ccr' Hamalainen
 * (C) Copyright 2011 Tecnic Software productions (TNSP)
 */
#ifndef DMFILE_H
#define DMFILE_H

#include "dmlib.h"

#ifdef __cplusplus
extern "C" {
#endif


/* Plain file endianess functions
 */
#define DM_DEFINE_FFUNC(xname, xtype, z)          \
BOOL    dm_fread_ ## xname (FILE *f, xtype *v);  \
BOOL    dm_fwrite_ ## xname (FILE *f, const xtype v);

#include "dmfiletmpl.h"

#undef DM_DEFINE_FFUNC

BOOL    dm_fread_str(FILE *f, void *, const size_t);
BOOL    dm_fwrite_str(FILE *f, const void *, const size_t);

BOOL    dm_fread_byte(FILE *f, Uint8 *);
BOOL    dm_fwrite_byte(FILE *f, const Uint8);


int     dmWriteDataFile(FILE *outFile, const char *filename, const Uint8 *buf, const size_t bufSize);
int     dmReadDataFile(FILE *inFile, const char *filename, Uint8 **pbuf, size_t *pbufSize);


#ifdef __cplusplus
}
#endif

#endif // DMFILE_H