mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Increase MAX_IMAGE_PATH_LEN to 4096 bytes (to fix that config.c warning) and make sure all file name arrays are of that length (no more hardcoded 512 or 1024).
This commit is contained in:
@@ -33,7 +33,7 @@ typedef struct cart_t {
|
||||
uint32_t base;
|
||||
} cart_t;
|
||||
|
||||
char cart_fns[2][512];
|
||||
char cart_fns[2][MAX_IMAGE_PATH_LEN];
|
||||
char *cart_image_history[2][CART_IMAGE_HISTORY];
|
||||
|
||||
static cart_t carts[2];
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
pc_cassette_t *cassette;
|
||||
|
||||
char cassette_fname[512];
|
||||
char cassette_fname[MAX_IMAGE_PATH_LEN];
|
||||
char cassette_mode[512];
|
||||
char * cassette_image_history[CASSETTE_IMAGE_HISTORY];
|
||||
unsigned long cassette_pos;
|
||||
|
||||
@@ -104,7 +104,7 @@ static fdd_pending_op_t fdd_pending[FDD_NUM];
|
||||
/* BIOS boot status tracking */
|
||||
static bios_boot_status_t bios_boot_status = BIOS_BOOT_POST;
|
||||
|
||||
char floppyfns[FDD_NUM][512];
|
||||
char floppyfns[FDD_NUM][MAX_IMAGE_PATH_LEN];
|
||||
char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
|
||||
pc_timer_t fdd_poll_time[FDD_NUM];
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/* Recently used images */
|
||||
#define MAX_PREV_IMAGES 10
|
||||
#define MAX_IMAGE_PATH_LEN 2048
|
||||
#define MAX_IMAGE_PATH_LEN 4096
|
||||
|
||||
/* Max UUID Length */
|
||||
#define MAX_UUID_LEN 64
|
||||
|
||||
@@ -21,7 +21,7 @@ extern "C" {
|
||||
|
||||
#define CART_IMAGE_HISTORY 10
|
||||
|
||||
extern char cart_fns[2][512];
|
||||
extern char cart_fns[2][MAX_IMAGE_PATH_LEN];
|
||||
extern char *cart_image_history[2][CART_IMAGE_HISTORY];
|
||||
|
||||
extern void cart_load(int drive, char *fn);
|
||||
|
||||
@@ -157,7 +157,7 @@ void pc_cas_advance(pc_cassette_t *cas);
|
||||
|
||||
extern pc_cassette_t *cassette;
|
||||
|
||||
extern char cassette_fname[512];
|
||||
extern char cassette_fname[MAX_IMAGE_PATH_LEN];
|
||||
extern char cassette_mode[512];
|
||||
extern char * cassette_image_history[CASSETTE_IMAGE_HISTORY];
|
||||
extern unsigned long cassette_pos;
|
||||
|
||||
@@ -323,8 +323,8 @@ typedef struct cdrom {
|
||||
|
||||
void *priv;
|
||||
|
||||
char image_path[1024];
|
||||
char prev_image_path[1280];
|
||||
char image_path[MAX_IMAGE_PATH_LEN];
|
||||
char prev_image_path[MAX_IMAGE_PATH_LEN + 256];
|
||||
|
||||
uint32_t sound_on;
|
||||
uint32_t cdrom_capacity;
|
||||
|
||||
@@ -96,7 +96,7 @@ typedef struct DRIVE {
|
||||
} DRIVE;
|
||||
|
||||
extern DRIVE drives[FDD_NUM];
|
||||
extern char floppyfns[FDD_NUM][512];
|
||||
extern char floppyfns[FDD_NUM][MAX_IMAGE_PATH_LEN];
|
||||
extern char *fdd_image_history[FDD_NUM][FLOPPY_IMAGE_HISTORY];
|
||||
extern pc_timer_t fdd_poll_time[FDD_NUM];
|
||||
extern int ui_writeprot[FDD_NUM];
|
||||
|
||||
@@ -161,7 +161,7 @@ typedef struct hard_disk_t {
|
||||
|
||||
void *priv;
|
||||
|
||||
char fn[1024]; /* Name of current image file */
|
||||
char fn[MAX_IMAGE_PATH_LEN]; /* Name of current image file */
|
||||
/* Differential VHD parent file */
|
||||
char vhd_parent[1280];
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ typedef struct mo_drive_t {
|
||||
FILE *fp;
|
||||
void *priv;
|
||||
|
||||
char image_path[1024];
|
||||
char prev_image_path[1024];
|
||||
char image_path[MAX_IMAGE_PATH_LEN];
|
||||
char prev_image_path[MAX_IMAGE_PATH_LEN + 256];
|
||||
|
||||
char *image_history[MO_IMAGE_HISTORY];
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@ typedef struct rdisk_drive_t {
|
||||
FILE *fp;
|
||||
void *priv;
|
||||
|
||||
char image_path[1024];
|
||||
char prev_image_path[1024];
|
||||
char image_path[MAX_IMAGE_PATH_LEN];
|
||||
char prev_image_path[MAX_IMAGE_PATH_LEN + 256];
|
||||
|
||||
char *image_history[RDISK_IMAGE_HISTORY];
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/scsi.h>
|
||||
#include <86box/cdrom.h>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#include "qt_machinestatus.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/hdd.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/cartridge.h>
|
||||
#include <86box/cassette.h>
|
||||
|
||||
@@ -19,9 +19,13 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
extern "C" {
|
||||
#include "86box/86box.h"
|
||||
#include "86box/hdd.h"
|
||||
#include "86box/scsi.h"
|
||||
#include "86box/cdrom.h"
|
||||
}
|
||||
|
||||
#include "qt_settings_bus_tracking.hpp"
|
||||
|
||||
SettingsBusTracking::SettingsBusTracking()
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "ui_qt_settingsotherremovable.h"
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/scsi_device.h>
|
||||
#include <86box/mo.h>
|
||||
|
||||
Reference in New Issue
Block a user