Mercurial > spc_convert
view demo/demo_util.h @ 7:6a2c890c22db
fixed Makefile to not delete generated wav files
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 21 Oct 2011 07:25:01 -0700 |
parents | e38dacceb958 |
children |
line wrap: on
line source
1 /* General-purpose utilities used by demos */3 /* snes_spc 0.9.0 */4 #ifndef DEMO_UTIL_H5 #define DEMO_UTIL_H7 /* commonly used headers */8 #include <assert.h>9 #include <stdlib.h>10 #include <string.h>11 #include <stdio.h>13 #ifdef __cplusplus14 extern "C" {15 #endif17 /* If str is not NULL, prints it and exits program, otherwise returns */18 void error( const char* str );20 /* Loads file and returns pointer to data in memory, allocated with malloc().21 If size_out != NULL, sets *size_out to size of data. */22 unsigned char* load_file( const char* path, long* size_out );24 /* Writes data to file */25 void write_file( const char* path, void const* in, long size );27 #ifdef __cplusplus28 }29 #endif31 #endif