+
+ err_x = "Error recording new seed: "
+ "A file 'record' already exists, when it shouldn't.";
+ err_o = "Error recording new seed: "
+ "Unable to open 'record_tmp' file for writing.";
+ char * err_w = "Error recording new seed: "
+ "Trouble writing to opened 'record_tmp' file.";
+ err_c = "Error recording new seed: "
+ "Unable to close opened file 'record_tmp'.";
+ char * err_m = "Error recording new seed: "
+ "Unable to rename file 'record_tmp' to 'record'.";
+ exit_err(!access(recordfile, F_OK), &world, err_x);
+ file = fopen(recordfile_tmp, "w");
+ exit_err(0 == file, &world, err_o);
+ exit_err(write_uint32_bigendian(world.seed, file), &world, err_w);
+ exit_err(fclose(file), &world, err_c);
+ exit_err(rename(recordfile_tmp, recordfile), &world, err_m);