projects
/
micropolis
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/tk/tkconfig.h: Micropolis build fixes for recent macOS
[micropolis]
/
src
/
sim
/
w_tk.c
diff --git
a/src/sim/w_tk.c
b/src/sim/w_tk.c
index 08c16f9ba279dd0a29dae821ac975e4c3d63767d..3ae90378561d4998dd86af1a2f26a9f4d6c59f85 100644
(file)
--- a/
src/sim/w_tk.c
+++ b/
src/sim/w_tk.c
@@
-104,14
+104,8
@@
Tk_ConfigSpec TileViewConfigSpecs[] = {
int TileViewCmd(CLIENT_ARGS);
int TileViewCmd(CLIENT_ARGS);
-int ConfigureTileView(Tcl_Interp *interp, SimView *view,
- int argc, char **argv, int flags);
static void TileViewEventProc(ClientData clientData, XEvent *eventPtr);
static void DestroyTileView(ClientData clientData);
static void TileViewEventProc(ClientData clientData, XEvent *eventPtr);
static void DestroyTileView(ClientData clientData);
-
-int ConfigureSimGraph(Tcl_Interp *interp, SimGraph *graph,
- int argc, char **argv, int flags);
-
static void MicropolisTimerProc(ClientData clientData);
int SimCmd(CLIENT_ARGS);
static void MicropolisTimerProc(ClientData clientData);
int SimCmd(CLIENT_ARGS);
@@
-241,7
+235,8
@@
ConfigureTileView(Tcl_Interp *interp, SimView *view,
}
}
-InvalidateMaps()
+void
+InvalidateMaps(void)
{
SimView *view;
{
SimView *view;
@@
-255,7
+250,8
@@
InvalidateMaps()
}
}
-InvalidateEditors()
+void
+InvalidateEditors(void)
{
SimView *view;
{
SimView *view;
@@
-269,7
+265,8
@@
InvalidateEditors()
}
}
-RedrawMaps()
+void
+RedrawMaps(void)
{
SimView *view;
{
SimView *view;
@@
-283,7
+280,8
@@
RedrawMaps()
}
}
-RedrawEditors()
+void
+RedrawEditors(void)
{
SimView *view;
{
SimView *view;
@@
-302,8
+300,6
@@
DisplayTileView(ClientData clientData)
{
SimView *view = (SimView *) clientData;
Tk_Window tkwin = view->tkwin;
{
SimView *view = (SimView *) clientData;
Tk_Window tkwin = view->tkwin;
- Pixmap pm = None;
- Drawable d;
view->flags &= ~VIEW_REDRAW_PENDING;
if (view->visible && (tkwin != NULL) && Tk_IsMapped(tkwin)) {
view->flags &= ~VIEW_REDRAW_PENDING;
if (view->visible && (tkwin != NULL) && Tk_IsMapped(tkwin)) {
@@
-334,6
+330,7
@@
DisplayTileView(ClientData clientData)
EraserTo
*/
EraserTo
*/
+void
EventuallyRedrawView(SimView *view)
{
if (!(view->flags & VIEW_REDRAW_PENDING)) {
EventuallyRedrawView(SimView *view)
{
if (!(view->flags & VIEW_REDRAW_PENDING)) {
@@
-344,6
+341,7
@@
EventuallyRedrawView(SimView *view)
}
}
+void
CancelRedrawView(SimView *view)
{
if (view->flags & VIEW_REDRAW_PENDING) {
CancelRedrawView(SimView *view)
{
if (view->flags & VIEW_REDRAW_PENDING) {
@@
-361,7
+359,7
@@
TileAutoScrollProc(ClientData clientData)
if (view->tool_mode != 0) {
int dx = 0, dy = 0;
if (view->tool_mode != 0) {
int dx = 0, dy = 0;
- int r
esult, r
oot_x, root_y, x, y;
+ int root_x, root_y, x, y;
unsigned int key_buttons;
Window root, child;
unsigned int key_buttons;
Window root, child;
@@
-433,7
+431,7
@@
TileViewEventProc(ClientData clientData, XEvent *eventPtr)
(eventPtr->type == MotionNotify))) {
int last_x = view->tool_x, last_y = view->tool_y,
last_showing = view->tool_showing;
(eventPtr->type == MotionNotify))) {
int last_x = view->tool_x, last_y = view->tool_y,
last_showing = view->tool_showing;
- int x, y, showing
, autoscroll
;
+ int x, y, showing;
if (eventPtr->type == EnterNotify) {
showing = 1;
if (eventPtr->type == EnterNotify) {
showing = 1;
@@
-547,6
+545,7
@@
StructureProc(ClientData clientData, XEvent *eventPtr)
}
}
+#if 0
static void
DelayedMap(ClientData clientData)
{
static void
DelayedMap(ClientData clientData)
{
@@
-558,8
+557,10
@@
DelayedMap(ClientData clientData)
}
Tk_MapWindow(MainWindow);
}
}
Tk_MapWindow(MainWindow);
}
+#endif
+void
DidStopPan(SimView *view)
{
char buf[256];
DidStopPan(SimView *view)
{
char buf[256];
@@
-621,7
+622,8
@@
ReallyStartMicropolisTimer(ClientData clientData)
}
}
-StartMicropolisTimer()
+void
+StartMicropolisTimer(void)
{
if (sim_timer_idle == 0) {
sim_timer_idle = 1;
{
if (sim_timer_idle == 0) {
sim_timer_idle = 1;
@@
-632,7
+634,8
@@
StartMicropolisTimer()
}
}
-StopMicropolisTimer()
+void
+StopMicropolisTimer(void)
{
if (sim_timer_idle != 0) {
sim_timer_idle = 0;
{
if (sim_timer_idle != 0) {
sim_timer_idle = 0;
@@
-651,10
+654,11
@@
StopMicropolisTimer()
}
}
+void
FixMicropolisTimer()
{
if (sim_timer_set) {
FixMicropolisTimer()
{
if (sim_timer_set) {
- StartMicropolisTimer(
NULL
);
+ StartMicropolisTimer();
}
}
}
}
@@
-669,7
+673,8
@@
DelayedUpdate(ClientData clientData)
}
}
-Kick()
+void
+Kick(void)
{
if (!UpdateDelayed) {
UpdateDelayed = 1;
{
if (!UpdateDelayed) {
UpdateDelayed = 1;
@@
-679,7
+684,7
@@
Kick()
void
void
-StopEarthquake()
+StopEarthquake(
void
)
{
ShakeNow = 0;
if (earthquake_timer_set) {
{
ShakeNow = 0;
if (earthquake_timer_set) {
@@
-689,6
+694,7
@@
StopEarthquake()
}
}
+void
DoEarthQuake(void)
{
MakeSound("city", "Explosion-Low");
DoEarthQuake(void)
{
MakeSound("city", "Explosion-Low");
@@
-702,7
+708,8
@@
DoEarthQuake(void)
}
}
-StopToolkit()
+void
+StopToolkit(void)
{
if (tk_mainInterp != NULL) {
Eval("catch {DoStopMicropolis}");
{
if (tk_mainInterp != NULL) {
Eval("catch {DoStopMicropolis}");
@@
-710,6
+717,7
@@
StopToolkit()
}
}
+int
Eval(char *buf)
{
int result = Tcl_Eval(tk_mainInterp, buf, 0, (char **) NULL);
Eval(char *buf)
{
int result = Tcl_Eval(tk_mainInterp, buf, 0, (char **) NULL);
@@
-724,10
+732,8
@@
Eval(char *buf)
}
}
-
tk_main(
)
+
void tk_main(void
)
{
{
- char *p, *msg;
- char buf[20];
char initCmd[256];
Tk_3DBorder border;
char initCmd[256];
Tk_3DBorder border;
Impressum
,
Datenschutz