X-Git-Url: http://git.shiar.net/netris.git/blobdiff_plain/67c063ab72ebe37d99e036c7a9d3fcecf1e168aa..314fb8c12b376d5e9bc62ec8b5db9458618a162b:/util.c diff --git a/util.c b/util.c index e94f526..e3018f9 100644 --- a/util.c +++ b/util.c @@ -160,6 +160,24 @@ int MyWrite(int fd, void *data, int len) 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)