PCem
changeset 32:f50409fd5bac
Added missing files from last commit...
| author | TomW |
|---|---|
| date | Tue Nov 05 11:02:25 2013 +0000 |
| parents | 08a942c94a1d |
| children | 83416bce6aae |
| files | src/rom.c src/rom.h |
| diffstat | 2 files changed, 31 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/rom.c Tue Nov 05 11:02:25 2013 +0000 1.3 @@ -0,0 +1,29 @@ 1.4 +#include <stdio.h> 1.5 +#include "ibm.h" 1.6 +#include "rom.h" 1.7 + 1.8 +FILE *romfopen(char *fn, char *mode) 1.9 +{ 1.10 + char s[512]; 1.11 + strcpy(s, pcempath); 1.12 + put_backslash(s); 1.13 + strcat(s, fn); 1.14 + return fopen(s, mode); 1.15 +} 1.16 + 1.17 +int rom_present(char *fn) 1.18 +{ 1.19 + FILE *f; 1.20 + char s[512]; 1.21 + 1.22 + strcpy(s, pcempath); 1.23 + put_backslash(s); 1.24 + strcat(s, fn); 1.25 + f = fopen(s, "rb"); 1.26 + if (f) 1.27 + { 1.28 + fclose(f); 1.29 + return 1; 1.30 + } 1.31 + return 0; 1.32 +}
