exit(1);
}
-void WriteConf(void)
-{
- FILE *file_out;
-
- file_out = fopen(CONFIG_FILE, "w");
- if (file_out == NULL)
- die("Error writing config file");
-
- fprintf(file_out, "### NETRIS %s Config file ###\n\n", version_string);
-
- fclose(file_out);
- fprintf(stderr, "Wrote new game configuration to %s\n", CONFIG_FILE);
-}
-
void Usage(void)
{
Header();
);
}
-void WriteConf(void)
-{
- FILE *file_out;
-
- file_out = fopen(CONFIG_FILE, "w");
- if (file_out == NULL) {
- perror("Error writing config file");
- exit(1);
- }
-
- fprintf(file_out, "### NETRIS %s Config file ###\n\n", version_string);
-
- fclose(file_out);
- fprintf(stderr, "Wrote new game configuration to %s\n", CONFIG_FILE);
-}
-
void HandleOption(char tag, char *value)
{
switch (tag) {
return len;
}
+///////////// CONFIG /////////////
+
+void WriteConf(void)
+{
+ FILE *file_out;
+
+ file_out = fopen(CONFIG_FILE, "w");
+ if (file_out == NULL) {
+ perror("Error writing config file");
+ exit(1);
+ }
+
+ fprintf(file_out, "### NETRIS %s Config file ###\n\n", version_string);
+
+ fclose(file_out);
+ fprintf(stderr, "Wrote new game configuration to %s\n", CONFIG_FILE);
+}
+
///////////// TIME /////////////
void NormalizeTime(struct timeval *tv)
extern int Random(int min, int max1);
extern int MyRead(int fd, void *data, int len);
extern int MyWrite(int fd, void *data, int len);
+extern void WriteConf(void);
extern void NormalizeTime(struct timeval *tv);
extern void CatchAlarm(int sig);
extern void SetTimeval(struct timeval *tv, long usec);