mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Change Multi*Settings() to use std::fs::path
This commit is contained in:
parent
7a3f46ad4c
commit
b30597ae90
@ -67,14 +67,16 @@
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <filesystem>
|
||||
|
||||
#include "cfile.h"
|
||||
#include "multi.h"
|
||||
#include "objinfo.h"
|
||||
#include "ship.h"
|
||||
#include "multi_save_settings.h"
|
||||
|
||||
int MultiSaveSettings(const char *filename) {
|
||||
int MultiSaveSettings(const std::filesystem::path &filename) {
|
||||
CFILE *cf;
|
||||
char szoutput[MAX_MPS_LINE_LEN];
|
||||
int i;
|
||||
@ -137,7 +139,7 @@ int MultiSaveSettings(const char *filename) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int MultiLoadSettings(const char *filename) {
|
||||
int MultiLoadSettings(const std::filesystem::path &filename) {
|
||||
CFILE *cf;
|
||||
char szinput[MAX_MPS_LINE_LEN];
|
||||
char *toklabel, *tokval;
|
||||
|
@ -43,9 +43,11 @@
|
||||
#ifndef _MULTI_SAVE_SETTINGS_HEADER
|
||||
#define _MULTI_SAVE_SETTINGS_HEADER
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#define MAX_MPS_LINE_LEN 200
|
||||
|
||||
int MultiSaveSettings(const char *filename);
|
||||
int MultiLoadSettings(const char *filename);
|
||||
int MultiSaveSettings(const std::filesystem::path &filename);
|
||||
int MultiLoadSettings(const std::filesystem::path &filename);
|
||||
|
||||
#endif
|
||||
|
@ -264,11 +264,13 @@
|
||||
*/
|
||||
///////////////////////////////////////////////
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include "ship.h"
|
||||
#include "pstypes.h"
|
||||
|
||||
#if defined(POSIX)
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include "linux_fix.h"
|
||||
#endif
|
||||
|
||||
@ -635,7 +637,7 @@ MultiDoConfigSave_fp DLLMultiDoConfigSave;
|
||||
typedef void (*MultiDoConfigLoad_fp)(void);
|
||||
MultiDoConfigLoad_fp DLLMultiDoConfigLoad;
|
||||
|
||||
typedef int (*MultiLoadSettings_fp)(const char *filename);
|
||||
typedef int (*MultiLoadSettings_fp)(const std::filesystem::path &filename);
|
||||
MultiLoadSettings_fp DLLMultiLoadSettings;
|
||||
|
||||
typedef void *(*NetworkReceiveCallback)(uint8_t *data, int len, network_address *from);
|
||||
|
Loading…
Reference in New Issue
Block a user