- Timestamp:
- 07/10/2017 02:17:49 PM (8 years ago)
- Branches:
- master
- Children:
- 06f6615
- Parents:
- 39a696b
- Location:
- libcio
- Files:
-
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
libcio/atoi.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 int16_t atoi(int8_t *cp) -
libcio/atol.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 int32_t atol(int8_t *cp) -
libcio/blkrd.c
r39a696b rb28a12e 26 26 #define DEBUGIT 0 27 27 28 #include "all.h" 29 30 /* 31 32 */ 33 34 #if DEBUGIT 35 extern short fsdebug; /* file system debug switch */ 36 #endif 37 38 extern int16_t _nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp); 39 40 extern int32_t _berrno; /* last file system bios error number */ 41 42 extern uint16_t _thefat[]; /* current file allocation table */ 43 44 extern struct bpb *_thebpb; /* current bios parameter block */ 45 46 #if TBUFFER 47 48 /* WARNING: this ONLY works for 512 byte sectors, 9 sectors per track */ 49 50 extern int16_t _b_tbuf[9][256]; /* the track buffer */ 51 52 extern int16_t _b_trak; /* current track */ 53 extern int16_t _b_side; /* current side */ 54 extern int16_t _b_sect; /* current sector */ 55 extern int16_t _b_tsec; /* current base sector of current track */ 56 57 #endif 28 #include "ram.h" 58 29 59 30 /* -
libcio/blkwr.c
r39a696b rb28a12e 18 18 #define DEBUGIT 0 19 19 20 #include "all.h" 21 22 extern int16_t _nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp); 23 extern int16_t _alcnew(struct fcb *fcp); 24 extern int16_t _newcls(void); 25 26 extern int16_t micons(int16_t wi); 27 extern uint16_t _cl2lsn(struct bpb *bpp, uint16_t clnum); 28 extern void _ptcl12(uint16_t *fat, uint16_t cl, uint16_t val); 29 30 extern int32_t _berrno; /* last file system bios error number */ 31 32 extern struct bpb *_thebpb; /* current bios parameter block */ 33 34 extern uint16_t _thefat[]; /* current file allocation table */ 35 36 extern int16_t _fatmod; /* FAT modified flag */ 37 38 #if DEBUGIT 39 extern short fsdebug; 40 #endif 41 42 #if TBUFFER 43 44 /* WARNING: this ONLY works for 512 byte sectors, 9 sectors per track */ 45 46 extern int16_t _b_tbuf[9][256]; /* the track buffer */ 47 48 extern int16_t _b_trak; /* current track */ 49 extern int16_t _b_side; /* current side */ 50 extern int16_t _b_sect; /* current sector */ 51 extern int16_t _b_tsec; /* base sector for current track */ 52 53 #endif 54 55 /* 56 57 */ 20 #include "ram.h" 58 21 59 22 #if TBUFFER -
libcio/close.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t _badfd(void); 11 extern int16_t ClsFile(struct fcb *fcp); 12 extern void _clsvol(void); 13 14 extern int16_t _fatmod, _dirmod; 15 extern struct bpb *_thebpb; 16 extern struct dirent _thedir[]; 17 extern uint16_t _thefat[]; 18 19 /* 20 21 */ 8 #include "ram.h" 22 9 23 10 /* -
libcio/clusmap.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t micons(int16_t wi); 11 extern uint16_t _gtcl12(int8_t *fat, uint16_t cl); 12 extern int32_t miconl(int32_t wi); 13 14 extern struct bpb *_thebpb; 15 extern uint16_t _thefat[]; 16 17 extern int16_t _filecl(struct fcb *fp); 18 extern int16_t _noper(void); 19 20 extern void xtrap15(void); 21 22 /* 23 24 */ 8 #include "ram.h" 25 9 26 10 static int8_t *mfname[] = { /* FCB flag names */ … … 79 63 */ 80 64 81 int16_t waitcr(void)82 {83 int8_t c;84 85 BIOS(B_PUTC, CON_DEV, '\007');86 87 while ('\r' NE (c = (0x7F & BIOS(B_GETC, CON_DEV))))88 if (c EQ '\007')89 xtrap15();90 91 return(c);92 }93 94 65 /* 95 66 -
libcio/clusmap.x
r39a696b rb28a12e 18 18 extern struct fcb *fd2fcb(int16_t fd); 19 19 extern struct fcb *fp2fcb(FILE *fp); 20 extern int16_t waitcr(void);21 20 -
libcio/conin.c
r39a696b rb28a12e 6 6 */ 7 7 8 #define _FS_DEF_ /* to avoid unnecessary externals */ 9 10 #include "all.h" 11 12 extern void *memcpy(void *vp1, void *vp2, int16_t n); 13 extern int16_t readbuf(int16_t dev, int8_t *buf); 14 extern void writeln(int16_t unit, int8_t *buf); 8 #include "ram.h" 15 9 16 10 int8_t _ConBuf[258]; /* console input buffer */ -
libcio/conwr.c
r39a696b rb28a12e 8 8 #define _FS_DEF_ /* to avoid unnecessary externals */ 9 9 10 #include " all.h"10 #include "ram.h" 11 11 12 12 /* -
libcio/dirfns.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int32_t sprintf(int8_t *str, int8_t *fmt, ...); 8 #include "ram.h" 11 9 12 10 static int8_t atrcons[] = "ADVSHR"; -
libcio/fgets.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 #define EATCHAR '\n' /* character to be "eaten" on input */ -
libcio/filesys.c
r39a696b rb28a12e 12 12 #define DEBUGIT 0 13 13 14 #define _FS_DEF_ /* to avoid unnecessary externals */ 15 16 #include "all.h" 14 #include "ram.h" 17 15 18 16 #define FAT_EOF 0x0FF8 … … 24 22 #define DE_NULL ((struct dirent *)0L) 25 23 26 extern int16_t micons(int16_t wi);27 extern int32_t miconl(int32_t wi);28 extern void _ptcl12(uint16_t *fat, uint16_t cl, uint16_t val);29 extern int8_t *FilName(int8_t *s, int8_t *p);30 extern int8_t *FilExt(int8_t *s, int8_t *p);31 32 extern void _clsdir(void);33 extern void _clsfat(void);34 35 24 #if DEBUGIT 36 25 short fsdebug; 37 extern int mdump();38 26 #endif 39 27 -
libcio/filname.c
r39a696b rb28a12e 8 8 #define TESTER 0 /* define non-zero for test routine */ 9 9 10 #include " all.h"10 #include "ram.h" 11 11 12 12 #define MAX_NAME 8 /* maximum length of a file name */ -
libcio/flread.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 #define CHUNK 32256 /* largest practical sized chunk of data */ -
libcio/fopen.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int32_t lseek(int16_t fd, int32_t pos, int16_t how); 11 12 extern int16_t close(int16_t fd); 13 extern int16_t open(int8_t *name, int16_t flag, int16_t mode); 8 #include "ram.h" 14 9 15 10 FILE *_opener(int8_t *name, int8_t *mode, int16_t aflag) -
libcio/fprintf.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 static FILE *Stream; 11 11 12 extern int32_t dofmt_(int16_t (*putsub)(), int8_t *format, va_list args); 13 extern int16_t aputc(int16_t c, FILE *ptr); 14 15 static int16_t fpsub(int16_t c); 12 static int16_t fpsub(int16_t c); 16 13 17 14 int16_t fprintf(FILE *stream, int8_t *fmt, ...) -
libcio/fputs.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 int16_t puts(int8_t *str) -
libcio/fread.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 /* -
libcio/fscanf.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t agetc(FILE *ptr); 11 extern int16_t scanfmt(int16_t (*getsub)(), int8_t *fmt, int16_t **args); 8 #include "ram.h" 12 9 13 10 static int16_t scnlast; -
libcio/fseek.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int32_t lseek(int16_t fd, int32_t pos, int16_t how); 11 12 extern int16_t flush_(FILE *ptr, int16_t data); 8 #include "ram.h" 13 9 14 10 /* -
libcio/fsinit.c
r39a696b rb28a12e 6 6 */ 7 7 8 #define _FS_DEF_ /* define so that stdio.h and io.h get things right */ 9 10 #include "all.h" 11 12 extern int16_t _bpbin, _dirin, _fatin, _dirmod, _fatmod; 13 14 int16_t _badfd(void); 15 int16_t _noper(void); 8 #include "ram.h" 16 9 17 10 int8_t *Stdbufs; /* buffer chain pointer */ -
libcio/fsize.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern uint16_t _gtcl12(int8_t *fat, uint16_t cl); 11 extern int16_t _opnvol(void); 12 extern int16_t _filecl(struct fcb *fp); 13 14 extern uint16_t _thefat[]; 15 16 extern struct bpb *_thebpb; 8 #include "ram.h" 17 9 18 10 /* -
libcio/fstubs.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern void xtrap15(void); 8 #include "ram.h" 11 9 12 10 /* -
libcio/ftell.c
r39a696b rb28a12e 8 8 #define DEBUGIT 0 9 9 10 #include "all.h" 11 12 #if DEBUGIT 13 extern short fsdebug; 14 #endif 15 16 extern int16_t _filecl(struct fcb *fp); 10 #include "ram.h" 17 11 18 12 /* -
libcio/fwrite.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 /* -
libcio/getbuff.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 void getbuff(FILE *ptr) -
libcio/getc.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t read(int16_t fd, int8_t *buff, uint16_t len); 11 extern void getbuff(FILE *ptr); 8 #include "ram.h" 12 9 13 10 int16_t getc(FILE *ptr) -
libcio/getl.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 /* -
libcio/getw.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 /* -
libcio/lseek.c
r39a696b rb28a12e 8 8 #define DEBUGIT 0 9 9 10 #include "all.h" 11 12 extern int16_t _seek(struct fcb *fcp); 13 14 #if DEBUGIT 15 extern short fsdebug; 16 #endif 10 #include "ram.h" 17 11 18 12 int32_t lseek(int16_t fd, int32_t pos, int16_t how) -
libcio/open.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t _badfd(void); 11 extern int16_t _noper(void); 12 extern int16_t _inifcb(struct fcb *fcp, int8_t *name, int8_t *ext, int16_t mode); 13 extern int16_t _opfcb(struct fcb *fcp); 14 15 extern int8_t *FilName(int8_t *s, int8_t *p); 16 extern int8_t *FilExt(int8_t *s, int8_t *p); 17 18 int16_t _fileop(int8_t *name, int16_t flag, int16_t mode, struct channel *chp, struct devtabl *dp); 19 int16_t _filecl(struct fcb *fp); 8 #include "ram.h" 20 9 21 10 static struct device condev = { 2, 2, 1, 0, _noper }; 22 11 static struct device filedev = { 1, 1, 0, 1, _fileop }; 23 24 extern struct fcb _fcbtab[];25 12 26 13 /* -
libcio/posit.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t _seek(struct fcb *fcp); 8 #include "ram.h" 11 9 12 10 /* -
libcio/putc.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include "all.h" 9 10 extern int16_t write(int16_t fd, int8_t *buff, uint16_t len); 11 extern void getbuff(FILE *ptr); 12 extern int16_t close(int16_t fd); 13 14 extern int16_t (*_clsall)(); 8 #include "ram.h" 15 9 16 10 static int16_t (*cls_rtn)(); -
libcio/putl.c
r39a696b rb28a12e 8 8 */ 9 9 10 #include " all.h"10 #include "ram.h" 11 11 12 12 void putl(int32_t w, FILE *stream) -
libcio/putw.c
r39a696b rb28a12e 8 8 */ 9 9 10 #include " all.h"10 #include "ram.h" 11 11 12 12 void putw(uint16_t w, FILE *stream) -
libcio/read.c
r39a696b rb28a12e 36 36 #define DEBUGIT 0 37 37 38 #include "all.h" 39 40 #if DEBUGIT 41 extern short fsdebug; 42 #endif 43 44 extern int16_t _badfd(void); 45 extern int16_t _conin(int8_t *buff, int16_t len); 46 extern int16_t _seek(struct fcb *fcp); 47 48 extern void *memcpy(void *vp1, void *vp2, int16_t n); 49 50 int16_t _filerd(struct fcb *fp, int8_t *buffer, uint16_t len); 51 52 extern int16_t ReadRN(struct fcb *fcp, int8_t *buf); 53 extern int16_t blkrd(struct fcb *fcp, int8_t *buf, int16_t ns); 38 #include "ram.h" 54 39 55 40 static int16_t (*t_read[])() = { -
libcio/readrn.c
r39a696b rb28a12e 16 16 #define DEBUGIT 0 17 17 18 #include "all.h" 19 20 #if DEBUGIT 21 extern short fsdebug; 22 #endif 23 24 #if TBUFFER 25 extern int32_t _secrd(int8_t *buf, int16_t rec); 26 #endif 27 28 extern int32_t _berrno; 29 extern int16_t _seek(struct fcb *fcp); 30 31 /* 32 33 */ 18 #include "ram.h" 34 19 35 20 /* -
libcio/rename.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 int16_t rename(int8_t *old, int8_t *new) -
libcio/scan.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 static int16_t maxwide; 11 11 static int16_t (*gsub)(); 12 13 extern int8_t *index(int8_t *str, int8_t c);14 12 15 13 static int8_t *scnstr; -
libcio/setbuf.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 void setbuf(FILE *stream, int8_t *buffer) -
libcio/ungetc.c
r39a696b rb28a12e 6 6 */ 7 7 8 #include " all.h"8 #include "ram.h" 9 9 10 10 int16_t ungetc(int16_t c, FILE *ptr) -
libcio/unlink.c
r39a696b rb28a12e 8 8 #define DEBUGIT 0 9 9 10 #include "all.h" 11 12 #if DEBUGIT 13 extern short fsdebug; 14 15 extern int waitcr(); 16 #endif 17 18 extern int16_t DelFile(struct fcb *fcp); 19 20 extern int16_t fcbinit(int8_t *name, struct fcb *fcp); 10 #include "ram.h" 21 11 22 12 /* -
libcio/write.c
r39a696b rb28a12e 8 8 #define DEBUGIT 0 9 9 10 #include "all.h" 11 12 int16_t _filewr(struct fcb *fp, int8_t *buffer, uint16_t len); 13 14 extern int16_t _badfd(void); 15 extern int16_t _conwr(int16_t kind, int8_t *buff, int16_t len); 16 extern int16_t blkwr(struct fcb *fcp, int8_t *buf, int16_t ns); 17 extern int16_t ReadRN(struct fcb *fcp, int8_t *buf); 18 extern int16_t WriteRN(struct fcb *fcp, int8_t *buf); 19 extern int16_t _newcls(void); 20 extern int16_t micons(int16_t wi); 21 extern void _ptcl12(uint16_t *fat, uint16_t cl, uint16_t val); 22 23 extern int32_t miconl(int32_t wi); 24 25 extern int16_t _seek(struct fcb *fcp); 26 extern uint16_t _cl2lsn(struct bpb *bpp, uint16_t clnum); 27 28 extern int16_t _fatmod; 29 30 extern uint16_t _thefat[]; 31 32 extern struct bpb *_thebpb; 33 34 #if DEBUGIT 35 extern short fsdebug; 36 #endif 10 #include "ram.h" 37 11 38 12 static int16_t (*wr_tab[])() = { /* write routine dispatch table */ -
libcio/writern.c
r39a696b rb28a12e 16 16 #define DEBUGIT 0 17 17 18 #include "all.h" 19 20 extern int32_t _berrno; 21 extern int16_t _seek(struct fcb *fcp); 22 23 #if DEBUGIT 24 extern short fsdebug; 25 #endif 26 27 #if TBUFFER 28 extern int32_t _secwr(int8_t *buf, int16_t rec); 29 30 extern int16_t _alcnew(struct fcb *fcp); 31 #endif 32 33 /* 34 35 */ 18 #include "ram.h" 36 19 37 20 /*
Note:
See TracChangeset
for help on using the changeset viewer.