*/
#include "sim.h"
+void DoSaveCityAs(void);
+void DidSaveCity(void);
+void DidntSaveCity(char *msg);
+void DidLoadCity(void);
+void DidntLoadCity(char *msg);
+void DidLoadScenario(void);
+
#define SWAP_SHORTS(a,b) _swap_shorts(a,b)
#define SWAP_LONGS(a,b) _swap_longs(a,b)
}
}
+#if 0
static void
_swap_longs(long *buf, int len)
{
buf++;
}
}
+#endif
static void
_half_swap_longs(long *buf, int len)
}
+#if 0
static int
_load_long(long *buf, int len, FILE *f)
{
return 1;
}
+#endif
static int
}
+#if 0
static int
_save_long(long *buf, int len, FILE *f)
{
return 1;
}
+#endif
static
}
+void
LoadScenario(short s)
{
- char *name, *fname;
+ char *name = NULL, *fname = NULL;
if (CityFileName != NULL) {
ckfree(CityFileName);
}
-DidLoadScenario()
+void
+DidLoadScenario(void)
{
Eval("UIDidLoadScenario");
}
CityFileName = (char *)ckalloc(strlen(filename) + 1);
strcpy(CityFileName, filename);
- if (cp = (char *)rindex(filename, '.'))
+ if ((cp = (char *)rindex(filename, '.')))
*cp = 0;
#ifdef MSDOS
- if (cp = (char *)rindex(filename, '\\'))
+ if ((cp = (char *)rindex(filename, '\\')))
#else
- if (cp = (char *)rindex(filename, '/'))
+ if ((cp = (char *)rindex(filename, '/')))
#endif
cp++;
else
}
-DidLoadCity()
+void
+DidLoadCity(void)
{
Eval("UIDidLoadCity");
}
+void
DidntLoadCity(char *msg)
{
char buf[1024];
}
-SaveCity()
+void
+SaveCity(void)
{
char msg[256];
}
-DoSaveCityAs()
+void
+DoSaveCityAs(void)
{
Eval("UISaveCityAs");
}
-DidSaveCity()
+void
+DidSaveCity(void)
{
Eval("UIDidSaveCity");
}
+void
DidntSaveCity(char *msg)
{
char buf[1024];
}
+void
SaveCityAs(char *filename)
{
char msg[256];
strcpy(CityFileName, filename);
if (saveFile(CityFileName)) {
- if (cp = (char *)rindex(filename, '.'))
+ if ((cp = (char *)rindex(filename, '.')))
*cp = 0;
#ifdef MSDOS
- if (cp = (char *)rindex(filename, '\\'))
+ if ((cp = (char *)rindex(filename, '\\')))
#else
- if (cp = (char *)rindex(filename, '/'))
+ if ((cp = (char *)rindex(filename, '/')))
#endif
cp++;
else