~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/nbody-java/xmlvm-file.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-06-11 15:45:24 UTC
  • mfrom: (1.2.1) (2.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130611154524-rppb3w6tixlegv4n
Tags: 1.4.7~20130611~a1eb425-1
* New snapshot release
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Copyright (c) 2002-2011 by XMLVM.org
 
4
 *
 
5
 * Project Info:  http://www.xmlvm.org
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify it
 
8
 * under the terms of the GNU Lesser General Public License as published by
 
9
 * the Free Software Foundation; either version 2.1 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
14
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
 
15
 * License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public
 
18
 * License along with this library; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
 
20
 * USA.
 
21
 */
 
22
 
 
23
#ifndef __XMLVM_FILE_H__
 
24
 
 
25
#define __XMLVM_FILE_H__
 
26
 
 
27
#include "xmlvm.h"
 
28
 
 
29
#ifdef ZOS
 
30
#define FD_BIAS 1000
 
31
#undef fwrite
 
32
#undef fread
 
33
#else
 
34
#define FD_BIAS 0
 
35
#endif /* ZOS */
 
36
 
 
37
#define HyMaxPath   1024
 
38
 
 
39
#define org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE 1L
 
40
#define org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE 2L
 
41
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_SET 1L
 
42
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR 2L
 
43
#define org_apache_harmony_luni_platform_IFileSystem_SEEK_END 4L
 
44
#define org_apache_harmony_luni_platform_IFileSystem_O_RDONLY 0L
 
45
#define org_apache_harmony_luni_platform_IFileSystem_O_WRONLY 1L
 
46
#define org_apache_harmony_luni_platform_IFileSystem_O_RDWR 16L
 
47
#define org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC 32L
 
48
#define org_apache_harmony_luni_platform_IFileSystem_O_APPEND 256L
 
49
#define org_apache_harmony_luni_platform_IFileSystem_O_CREAT 4096L
 
50
#define org_apache_harmony_luni_platform_IFileSystem_O_EXCL 65536L
 
51
#define org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY 1048576L
 
52
#define org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK 16777216L
 
53
#define org_apache_harmony_luni_platform_IFileSystem_O_TRUNC 268435456L
 
54
 
 
55
#define HyOpenRead    1       /* Values for HyFileOpen */
 
56
#define HyOpenWrite   2
 
57
#define HyOpenCreate  4
 
58
#define HyOpenTruncate  8
 
59
#define HyOpenAppend  16
 
60
#define HyOpenText    32
 
61
#define HyOpenCreateNew 64      /* Use this flag with HyOpenCreate, if this flag is specified then trying to create an existing file will fail */
 
62
#define HyOpenSync              128
 
63
#define HyIsDir   0       /* Return values for HyFileAttr */
 
64
#define HyIsFile  1
 
65
 
 
66
 
 
67
void ioh_convertToPlatform (char *path);
 
68
IDATA hyfile_open (const char *path, I_32 flags, I_32 mode);
 
69
IDATA hyfile_read (IDATA fd, void *buf, IDATA nbytes);
 
70
I_64 hyfile_seek (IDATA inFD, I_64 offset, I_32 whence);
 
71
IDATA hyfile_write (IDATA fd, const void *buf, IDATA nbytes);
 
72
 
 
73
 
 
74
#endif