comparison R/scratch/stdio.R @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1 # Dynport: stdio
2 # Description: Standard I/O C library
3 # Dynport-Maintainer: dadler@uni-goettingen.de
4 # -----------------------------------------------------------------------------
5
6 .sysname <- Sys.info()[["sysname"]]
7 if (.sysname == "Windows") {
8 .libNameC <- "msvcrt"
9 } else {
10 .libNameC <- "c"
11 }
12
13 dynbind(.libNameC,"
14 fopen(ZZ)p;
15 fread(piip)i;
16 fwrite(piip)i;
17 fseek(pli)i;
18 fclose(p)i;
19 memcpy(ppi)p;
20 memset(pii)p;
21 ")
22
23 SEEK_SET = 0
24 SEEK_CUR = 1
25 SEEK_END = 2