FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot/src/win/wtext.h at master · gnuplot/gnuplot · GitHub
gnuplot
gnuplot
Repository navigation
Code
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot
/
src
/
win
/
wtext.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
158 lines (135 loc) · 4.49 KB
Breadcrumbs
gnuplot
/
src
/
win
/
wtext.h
Copy path
File metadata and controls
158 lines (135 loc) · 4.49 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/* GNUPLOT - win/wtext.h */
/*[
* Copyright 1992 - 1993, 1998, 2004 Russell Lang
*
* Permission to use, copy, and distribute this software and its
* documentation for any purpose with or without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*
* Permission to modify the software is granted, but not the right to
* distribute the complete modified source code. Modifications are to
* be distributed as patches to the released version. Permission to
* distribute binaries produced by compiling modified sources is granted,
* provided you
* 1. distribute the corresponding source modifications from the
* released version in the form of a patch file along with the binaries,
* 2. add special version identification to distinguish your version
* in addition to the base release version number,
* 3. provide your name and address as the primary contact for the
* support of your modified version, and
* 4. retain our contact information in regard to use of the base
* software.
* Permission to distribute the released version of the source code along
* with corresponding source modifications in the form of a patch file is
* granted with same provisions 2 through 4 for binary distributions.
*
* This software is provided "as is" without express or implied warranty
* to the extent permitted by applicable law.
]*/
#ifndef
GNUPLOT_WTEXT_H
#define
GNUPLOT_WTEXT_H
#ifdef
__cplusplus
extern
"C"
{
#endif
#include
<stdio.h>
#include
<stdarg.h>
#include
"syscfg.h"
/* redefine functions that can talk to tty devices, to use
* implementation in winmain.c */
#ifndef
WGP_CONSOLE
#define
kbhit
() MyKBHit()
#define
getche
() MyGetChE()
#define
putch
(
ch
) MyPutCh(ch)
#else
#define
putch
(
ch
) ConsolePutCh(ch)
#endif
#undef
getch
#ifndef
WGP_CONSOLE
#define
getch
() MyGetCh()
#else
#define
getch
() ConsoleGetch()
#endif
#undef
getchar
#define
getchar
() getch()
#define
fgetc
(
file
) MyFGetC(file)
#undef
getc
#define
getc
(
file
) MyFGetC(file)
#define
fgets
(
str
,
sz
,
file
) MyFGetS(str,sz,file)
#define
gets
(
str
) MyGetS(str)
#define
fputc
(
ch
,
file
) MyFPutC(ch,file)
#undef
putchar
#define
putchar
(
ch
) MyFPutC(ch,stdout)
#undef
putc
#define
putc
(
ch
,
file
) MyFPutC(ch,file)
#define
fputs
(
str
,
file
) MyFPutS(str,file)
#define
puts
(
str
) MyPutS(str)
#define
vfprintf
MyVFPrintF
#define
fprintf
MyFPrintF
#define
printf
MyPrintF
#define
fwrite
(
ptr
,
size
,
n
,
stream
) MyFWrite(ptr, size, n, stream)
#define
fread
(
ptr
,
size
,
n
,
stream
) MyFRead(ptr, size, n, stream)
/* now cause errors for some unimplemented functions */
#define
vprintf
dontuse_vprintf
#define
fscanf
dontuse_fscanf
#define
scanf
dontuse_scanf
#define
clreol
dontuse_clreol
#define
clrscr
dontuse_clrscr
#define
gotoxy
dontuse_gotoxy
#define
wherex
dontuse_wherex
#define
wherey
dontuse_wherey
#define
cgets
dontuse_cgets
#define
cprintf
dontuse_cprintf
#define
cputs
dontuse_cputs
#define
cscanf
dontuse_cscanf
#define
ungetch
dontuse_ungetch
#ifdef
WGP_CONSOLE
#define
kbhit
dontuse_kbhit
#define
getche
dontuse_getche
#endif
/* Windows pipe emulation by using temporary files */
#ifdef
USE_FAKEPIPES
/* Mingw64 might define these already. */
# undef
popen
# undef
pclose
# define
popen
fake_popen
# define
pclose
fake_pclose
#endif
/* now for the prototypes */
int
MyPutCh
(
int
ch
);
int
MyKBHit
(
void
);
int
MyGetCh
(
void
);
int
MyGetChE
(
void
);
int
MyFGetC
(
FILE
*
file
);
char
*
MyGetS
(
char
*
str
);
char
*
MyFGetS
(
char
*
str
,
unsigned
int
size
,
FILE
*
file
);
int
MyFPutC
(
int
ch
,
FILE
*
file
);
int
MyFPutS
(
const
char
*
str
,
FILE
*
file
);
int
MyPutS
(
const
char
*
str
);
int
MyFPrintF
(
FILE
*
file
,
const
char
*
fmt
, ...);
int
MyVFPrintF
(
FILE
*
file
,
const
char
*
fmt
,
va_list
args
);
int
MyPrintF
(
const
char
*
fmt
, ...);
size_t
MyFWrite
(
const
void
*
ptr
,
size_t
size
,
size_t
n
,
FILE
*
stream
);
size_t
MyFRead
(
void
*
ptr
,
size_t
size
,
size_t
n
,
FILE
*
stream
);
#ifdef
USE_FAKEPIPES
FILE
*
fake_popen
(
const
char
*
command
,
const
char
*
type
);
int
fake_pclose
(
FILE
*
stream
);
#endif
/* redirect C++ standard output streams */
void
RedirectOutputStreams
(
int
init
);
#ifdef
WGP_CONSOLE
int
ConsoleGetch
(
void
);
#endif
/* WGP_CONSOLE */
/* Standard compliant replacement functions
Note that stdio.h has to be included first.
Starting with MSVC 2015, snprintf is C99 compliant.
*/
#if
defined(
_MSC_VER
)
&&
(
_MSC_VER
<
1900
)
#define
snprintf
ms_snprintf
#define
vsnprintf
ms_vsnprintf
#endif
#ifdef
__cplusplus
}
#endif
#endif
/* GNUPLOT_WTEXT_H */
Back
|
FazBrowse Home
|
New Git URL