Mercurial > hg > Members > kono > os9 > sbc09
changeset 190:b93996f54090
fix for ubuntu
author | kono |
---|---|
date | Thu, 07 Dec 2023 09:23:55 +0900 |
parents | f524c0c95559 |
children | d0f5894e9b3a |
files | src/io.c src/trace.c src/v09.c src/vdisk.c |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/io.c Mon Dec 04 09:11:10 2023 +0900 +++ b/src/io.c Thu Dec 07 09:23:55 2023 +0900 @@ -91,9 +91,9 @@ #define SECSIZE 256 -int timer = 0; +extern int timer ; int timer_usec = 20000; // 50Hz -struct termios termsetting; +extern struct termios termsetting; struct termios newterm; struct itimerval timercontrol;
--- a/src/trace.c Mon Dec 04 09:11:10 2023 +0900 +++ b/src/trace.c Thu Dec 07 09:23:55 2023 +0900 @@ -25,12 +25,12 @@ struct termios termsetting; -int xmstat; /* 0= no XMODEM transfer, 1=send, 2=receiver */ -unsigned char xmbuf[132]; -int xidx; -int acknak; -int rcvdnak; -int blocknum; +extern int xmstat; /* 0= no XMODEM transfer, 1=send, 2=receiver */ +extern unsigned char xmbuf[132]; +extern int xidx; +extern int acknak; +extern int rcvdnak; +extern int blocknum; extern int timer; extern FILE *logfile;
--- a/src/v09.c Mon Dec 04 09:11:10 2023 +0900 +++ b/src/v09.c Thu Dec 07 09:23:55 2023 +0900 @@ -39,7 +39,7 @@ #include "v09.h" -FILE *tracefile; +extern FILE *tracefile; extern FILE *disk[]; extern FILE *fp; // for disasm
--- a/src/vdisk.c Mon Dec 04 09:11:10 2023 +0900 +++ b/src/vdisk.c Thu Dec 07 09:23:55 2023 +0900 @@ -342,9 +342,9 @@ while ((dp = readdir(dir)) != NULL && dircount-->=0) { int j = 0; for(j = 0; j < DIR_NM ; j++) { - if (j< dp->d_namlen) { + if (j< strlen(dp->d_name)) { pd->dirfp[i+j] = dp->d_name[j]&0x7f; // this is wrong but os9 does not allow 8th bit - if (j== dp->d_namlen-1 || dp->d_name[j+1]==0) { + if (j== strlen(dp->d_name)-1 || dp->d_name[j+1]==0) { pd->dirfp[i+j] |= 0x80; // os9 EOL } } else