Merge remote-tracking branch 'upstream/master' into version/4.1

This commit is contained in:
Jasmine Iwanek
2023-08-18 15:27:23 -04:00
49 changed files with 4333 additions and 987 deletions

View File

@@ -564,8 +564,8 @@ CFLAGS += -Werror=implicit-int -Werror=implicit-function-declaration \
# Create the (final) list of objects to build. #
#########################################################################
MAINOBJ := 86box.o config.o log.o random.o timer.o io.o acpi.o apm.o dma.o ddma.o \
nmi.o pic.o pit.o pit_fast.o port_6x.o port_92.o ppi.o pci.o mca.o fifo8.o \
usb.o device.o nvr.o nvr_at.o nvr_ps2.o machine_status.o ini.o \
nmi.o pic.o pit.o pit_fast.o port_6x.o port_92.o ppi.o pci.o mca.o fifo.o \
fifo8.o usb.o device.o nvr.o nvr_at.o nvr_ps2.o machine_status.o ini.o \
$(VNCOBJ)
MEMOBJ := catalyst_flash.o i2c_eeprom.o intel_flash.o mem.o mmu_2386.o rom.o row.o \

View File

@@ -734,9 +734,20 @@ path_normalize(char *path)
void
path_slash(char *path)
{
if ((path[strlen(path) - 1] != '\\') && (path[strlen(path) - 1] != '/')) {
if ((path[strlen(path) - 1] != '\\') && (path[strlen(path) - 1] != '/'))
strcat(path, "\\");
}
}
/* Return a trailing (back)slash if necessary. */
char *
path_get_slash(char *path)
{
char *ret = "";
if ((path[strlen(path) - 1] != '\\') && (path[strlen(path) - 1] != '/'))
ret = "\\";
return ret;
}
/* Check if the given path is absolute or not. */