Skip to content

Commit e88b345

Browse files
authored
Fix MS-DOS compiling. (#36)
1 parent c756236 commit e88b345

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# Set the TARGETS and PROGRAM values as required.
44
# See makefiles/build.mk for details on directory structure for src files and how to add custom extensions to the build.
55

6-
TARGETS = adam atari c64 apple2 apple2enh apple2gs coco
7-
# TARGETS = pmd85
8-
# TARGETS = msdos
6+
TARGETS = adam apple2 apple2enh atari c64 coco
7+
TARGETS += msdos
8+
# TARGETS += apple2gs
9+
# TARGETS += pmd85
910
PROGRAM := fujinet.lib
1011

1112
SUB_TASKS := clean disk test release unit-test

adam/src/include/fujinet-network-adam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern DCB *network_dcb[MAX_NETWORK_DEVICES];
4646
* @param devicespec The Device Specification "N:..."
4747
* @return AdamNet unit number.
4848
*/
49-
uint8_t network_unit_adamnet(char *devicespec);
49+
uint8_t network_unit_adamnet(const char *devicespec);
5050

5151
/**
5252
* @brief Return proper unit # for adamnet.
@@ -55,6 +55,6 @@ uint8_t network_unit_adamnet(char *devicespec);
5555
* @param len Length of the buffer
5656
* @return Fujinet error code.
5757
*/
58-
int16_t network_read_adam(char* devicespec, uint8_t *buf, uint16_t len);
58+
int16_t network_read_adam(const char* devicespec, uint8_t *buf, uint16_t len);
5959

6060
#endif /* FUJINET_NETWORK_ADAM_H */

common/src/fn_network/network_read.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#ifdef __WATCOMC__
3636
#include "fujinet-fuji-msdos.h"
37-
extern int network_read_msdos(char* devicespec, byte *buf, unsigned int len);
37+
extern int network_read_msdos(const char* devicespec, unsigned char *buf, unsigned int len);
3838
#endif /* __WATCOMC__ */
3939

4040
#ifdef __ADAM__

msdos/src/fn_network/network_open.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
uint8_t network_open(const char* devicespec, uint8_t mode, uint8_t trans)
77
{
8-
uint8_t device = network_unit();
8+
uint8_t device = network_unit(devicespec);
99

1010
return int_f5_write(device,'O',mode,trans,devicespec,256);
1111
}

msdos/src/fn_network/network_read_msdos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include <fujinet-network.h>
44
#include <fujinet-fuji-msdos.h>
55

6-
int network_read_msdos(char* devicespec, byte *buf, unsigned int len)
6+
int network_read_msdos(char* devicespec, unsigned char *buf, unsigned int len)
77
{
88
uint8_t device = network_unit(devicespec) + 0x70;
99

10-
return intf5_read(device,'R',len&0xFF,len>>8,(void *)buf,len) == 'C';
10+
return int_f5_read(device,'R',len&0xFF,len>>8,(void *)buf,len) == 'C';
1111
}

msdos/src/fn_network/network_write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ uint8_t network_write(const char* devicespec, const uint8_t *buf, uint16_t len)
77
{
88
uint8_t device = network_unit(devicespec) + 0x70;
99

10-
return intf5_write(device,'W',len&0xFF,len>>8,(void *)buf,len) == 'C';
10+
return int_f5_write(device,'W',len&0xFF,len>>8,(void *)buf,len) == 'C';
1111
}

msdos/src/include/fujinet-fuji-msdos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
*/
1616
unsigned char int_f5(unsigned char dev, unsigned char command, unsigned char aux1, unsigned char aux2);
1717
unsigned char int_f5_read(unsigned char dev, unsigned char command, unsigned char aux1, unsigned char aux2, void *buf, unsigned short len);
18-
unsigned char int_f5_write(unsigned char dev, unsigned char command, unsigned char aux1, unsigned char aux2, void *buf, unsigned short len);
18+
unsigned char int_f5_write(unsigned char dev, unsigned char command, unsigned char aux1, unsigned char aux2, const void *buf, unsigned short len);
1919

2020
#endif /* FUJINET_FUJI_MSDOS_H */

0 commit comments

Comments
 (0)