189
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
#ifndef _OPENC_H_
|
|
19 |
#define _OPENC_H_
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <e32std.h>
|
|
23 |
#include <e32cons.h> // Console
|
|
24 |
#include <f32file.h>
|
|
25 |
|
|
26 |
#include <e32math.h>
|
|
27 |
|
|
28 |
extern RFs gFileSession;
|
|
29 |
|
|
30 |
// Math functions
|
|
31 |
double log(double);
|
|
32 |
double exp(double);
|
|
33 |
double fabs(double);
|
|
34 |
double floor(double);
|
|
35 |
double sqrt(double);
|
|
36 |
double erf(double);
|
|
37 |
double erfc(double);
|
|
38 |
|
|
39 |
double pow(double, double);
|
|
40 |
|
|
41 |
// Math trigonometric functions
|
|
42 |
double sin(double);
|
|
43 |
double cos(double);
|
|
44 |
|
|
45 |
|
|
46 |
// data types
|
|
47 |
typedef RFile FILE;
|
|
48 |
#define EOF (-1)
|
|
49 |
typedef TUint32 u_int32_t;
|
|
50 |
typedef TInt32 int32_t;
|
|
51 |
|
|
52 |
#define SEEK_SET 0 /* set file offset to offset */
|
|
53 |
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
|
54 |
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
|
55 |
|
|
56 |
|
|
57 |
// stdio functions
|
|
58 |
int printf(const char * __restrict, ...);
|
|
59 |
int scanf(const char * __restrict, ...);
|
|
60 |
int sprintf(char * __restrict, const char * __restrict, ...);
|
|
61 |
int puts ( const char * str );
|
|
62 |
int putchar ( int character );
|
|
63 |
char* strcpy(char* aDest, const char* aSrc);
|
|
64 |
|
|
65 |
FILE *fopen(const char * __restrict, const char * __restrict);
|
|
66 |
int fclose(FILE *);
|
|
67 |
int fprintf(FILE * __restrict, const char * __restrict, ...);
|
|
68 |
int fscanf(FILE * __restrict, const char * __restrict, ...);
|
|
69 |
TUint32 fread(void * __restrict, TUint32, TUint32, FILE * __restrict);
|
|
70 |
int fseek(FILE *, long, int);
|
|
71 |
|
|
72 |
int fflush(FILE *);
|
|
73 |
|
|
74 |
// stdlib functions
|
|
75 |
void* calloc(TUint32, TUint32);
|
|
76 |
void free(void *);
|
|
77 |
|
|
78 |
void qsort (void* base, TUint32 nmemb, TUint32 size, int (*compar)(const void*, const void*));
|
|
79 |
|
|
80 |
void exit (int status);
|
|
81 |
|
|
82 |
// Other utility functions
|
|
83 |
void ReadStringFromConsole(TDes& aString);
|
|
84 |
TInt ReadIntL(TInt& aValue);
|
|
85 |
|
|
86 |
#endif /* _OPENC_H_ */
|