PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/os/wince/ftk_wince.h

http://ftk.googlecode.com/
C++ Header | 59 lines | 46 code | 13 blank | 0 comment | 0 complexity | a82cd835eea95f6d7339f5b083a9c652 MD5 | raw file
 1
 2#ifndef FTK_WINCE_H
 3#define FTK_WINCE_H
 4
 5#ifndef WINCE
 6#include <io.h>
 7#endif
 8#include <time.h>
 9#include <stdio.h>
10#include <windows.h>
11#include <winsock2.h>
12#ifndef WINCE
13#include <sys/stat.h>
14#include <sys/types.h>
15#endif
16
17#define HAVE_BOOLEAN
18#define inline 
19
20char* ftk_get_root_dir(void);
21char* ftk_get_data_dir(void);
22char* ftk_get_testdata_dir(void);
23
24#define __func__       __FILE__
25#define FTK_ROOT_DIR   ftk_get_root_dir()
26#define FTK_FONT       "\\Windows\\FZLTHK.TTF"
27#define DATA_DIR       ftk_get_root_dir()
28#define LOCAL_DATA_DIR ftk_get_root_dir()
29#define FTK_DATA_ROOT  ftk_get_data_dir()
30#define TESTDATA_DIR   ftk_get_testdata_dir()
31
32#define _CRT_SECURE_NO_WARNINGS 1
33
34#define strcasecmp    _stricmp
35#define usleep        Sleep
36#define ftk_getcwd    _getcwd
37#define ftk_sscanf    sscanf
38
39char* ftk_strncpy(char *dest, const char *src, size_t n);
40int   ftk_snprintf(char *str, size_t size, const char *format, ...);
41int   ftk_vsnprintf(char *str, size_t size, const char *format, va_list ap);
42
43#ifndef snprintf
44#define snprintf ftk_snprintf
45#endif
46
47size_t ftk_get_relative_time(void);
48char *_getcwd(char *buf, size_t size);
49int   wince_socketpair(SOCKET socks[2]);
50
51#define ftk_pipe_pair(fds)				wince_socketpair(fds)
52#define ftk_pipe_close(fd)				closesocket(fd)
53#define ftk_pipe_recv(fd, buf, length)	recv(fd, buf, length, 0)
54#define ftk_pipe_send(fd, buf, length)	send(fd, buf, length, 0)
55#define FTK_PATH_DELIM '\\'
56
57#define USE_FTK_MAIN 1
58
59#endif/*FTK_WINCE_H*/