Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
11651ff2
Commit
11651ff2
authored
Dec 11, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed osx compiling
parent
f3306e9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
mac.c
mac.c
+8
-8
No files found.
mac.c
View file @
11651ff2
...
@@ -27,11 +27,13 @@
...
@@ -27,11 +27,13 @@
*
*
*/
*/
#include <unistd.h>
#include <ApplicationServices/ApplicationServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
#include <Carbon/Carbon.h>
/* zlib doesn't like Byte already defined */
/* zlib doesn't like Byte already defined */
#undef Byte
#undef Byte
#undef TRUE
#undef TRUE
#undef Bool
#include "rfb.h"
#include "rfb.h"
#include "keysym.h"
#include "keysym.h"
...
@@ -39,7 +41,7 @@ rfbScreenInfoPtr rfbScreen;
...
@@ -39,7 +41,7 @@ rfbScreenInfoPtr rfbScreen;
/* some variables to enable special behaviour */
/* some variables to enable special behaviour */
int
startTime
=
-
1
,
maxSecsToConnect
=
0
;
int
startTime
=
-
1
,
maxSecsToConnect
=
0
;
Bool
disconnectAfterFirstClient
=
T
rue
;
Bool
disconnectAfterFirstClient
=
T
RUE
;
/* Where do I get the "official" list of Mac key codes?
/* Where do I get the "official" list of Mac key codes?
Ripped these out of a Mac II emulator called Basilisk II
Ripped these out of a Mac II emulator called Basilisk II
...
@@ -217,10 +219,7 @@ static int keyTable[] = {
...
@@ -217,10 +219,7 @@ static int keyTable[] = {
};
};
void
void
KbdAddEvent
(
down
,
keySym
,
cl
)
KbdAddEvent
(
Bool
down
,
KeySym
keySym
,
struct
rfbClientRec
*
cl
)
Bool
down
;
KeySym
keySym
;
rfbClientPtr
cl
;
{
{
int
i
;
int
i
;
CGKeyCode
keyCode
=
-
1
;
CGKeyCode
keyCode
=
-
1
;
...
@@ -289,7 +288,7 @@ refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore)
...
@@ -289,7 +288,7 @@ refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore)
{
{
int
i
;
int
i
;
if
(
startTime
>
0
&&
time
()
>
startTime
+
maxSecsToConnect
)
if
(
startTime
>
0
&&
time
(
0
)
>
startTime
+
maxSecsToConnect
)
exit
(
0
);
exit
(
0
);
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
...
@@ -306,7 +305,7 @@ void clientGone(rfbClientPtr cl)
...
@@ -306,7 +305,7 @@ void clientGone(rfbClientPtr cl)
void
newClient
(
rfbClientPtr
cl
)
void
newClient
(
rfbClientPtr
cl
)
{
{
if
(
startTime
>
0
&&
time
()
>
startTime
+
maxSecsToConnect
)
if
(
startTime
>
0
&&
time
(
0
)
>
startTime
+
maxSecsToConnect
)
exit
(
0
);
exit
(
0
);
if
(
disconnectAfterFirstClient
)
if
(
disconnectAfterFirstClient
)
...
@@ -315,10 +314,11 @@ void newClient(rfbClientPtr cl)
...
@@ -315,10 +314,11 @@ void newClient(rfbClientPtr cl)
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
int
i
;
for
(
i
=
argc
-
1
;
i
>
0
;
i
--
)
for
(
i
=
argc
-
1
;
i
>
0
;
i
--
)
if
(
i
<
argc
-
1
&&
strcmp
(
argv
[
i
],
"-wait4client"
)
==
0
)
{
if
(
i
<
argc
-
1
&&
strcmp
(
argv
[
i
],
"-wait4client"
)
==
0
)
{
maxSecsToConnect
=
atoi
(
argv
[
i
+
1
])
/
1000
;
maxSecsToConnect
=
atoi
(
argv
[
i
+
1
])
/
1000
;
startTime
=
time
();
startTime
=
time
(
0
);
}
else
if
(
strcmp
(
argv
[
i
],
"-runforever"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-runforever"
)
==
0
)
{
disconnectAfterFirstClient
=
FALSE
;
disconnectAfterFirstClient
=
FALSE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment