Changeset b28a12e in buchla-68k for libcio


Ignore:
Timestamp:
07/10/2017 02:17:49 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
06f6615
Parents:
39a696b
Message:

Zero redundant declarations.

Location:
libcio
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • libcio/atoi.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010int16_t atoi(int8_t *cp)
  • libcio/atol.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010int32_t atol(int8_t *cp)
  • libcio/blkrd.c

    r39a696b rb28a12e  
    2626#define DEBUGIT         0
    2727
    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"
    5829
    5930/*
  • libcio/blkwr.c

    r39a696b rb28a12e  
    1818#define DEBUGIT         0
    1919
    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"
    5821
    5922#if     TBUFFER
  • libcio/close.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    229
    2310/*
  • libcio/clusmap.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    259
    2610static int8_t   *mfname[] = {   /* FCB flag names */
     
    7963*/
    8064
    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 
    9465/*
    9566
  • libcio/clusmap.x

    r39a696b rb28a12e  
    1818extern  struct  fcb     *fd2fcb(int16_t fd);
    1919extern  struct  fcb     *fp2fcb(FILE *fp);
    20 extern  int16_t         waitcr(void);
    2120
  • libcio/conin.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    159
    1610int8_t _ConBuf[258];    /* console input buffer */
  • libcio/conwr.c

    r39a696b rb28a12e  
    88#define _FS_DEF_                /* to avoid unnecessary externals */
    99
    10 #include "all.h"
     10#include "ram.h"
    1111
    1212/*
  • libcio/dirfns.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
    9 
    10 extern  int32_t sprintf(int8_t *str, int8_t *fmt, ...);
     8#include "ram.h"
    119
    1210static int8_t atrcons[] = "ADVSHR";
  • libcio/fgets.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010#define EATCHAR '\n'    /* character to be "eaten" on input */
  • libcio/filesys.c

    r39a696b rb28a12e  
    1212#define DEBUGIT         0
    1313
    14 #define _FS_DEF_        /* to avoid unnecessary externals */
    15 
    16 #include "all.h"
     14#include "ram.h"
    1715
    1816#define FAT_EOF         0x0FF8
     
    2422#define DE_NULL         ((struct dirent *)0L)
    2523
    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 
    3524#if DEBUGIT
    3625short   fsdebug;
    37 extern  int     mdump();
    3826#endif
    3927
  • libcio/filname.c

    r39a696b rb28a12e  
    88#define TESTER  0               /* define non-zero for test routine */
    99
    10 #include "all.h"
     10#include "ram.h"
    1111
    1212#define MAX_NAME        8       /* maximum length of a file name */
  • libcio/flread.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010#define CHUNK   32256           /* largest practical sized chunk of data */
  • libcio/fopen.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    149
    1510FILE *_opener(int8_t *name, int8_t *mode, int16_t aflag)
  • libcio/fprintf.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010static FILE *Stream;
    1111
    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);
     12static int16_t fpsub(int16_t c);
    1613
    1714int16_t fprintf(FILE *stream, int8_t *fmt, ...)
  • libcio/fputs.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010int16_t puts(int8_t *str)
  • libcio/fread.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010/*
  • libcio/fscanf.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    129
    1310static int16_t scnlast;
  • libcio/fseek.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    139
    1410/*
  • libcio/fsinit.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    169
    1710int8_t  *Stdbufs;                       /* buffer chain pointer */
  • libcio/fsize.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    179
    1810/*
  • libcio/fstubs.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
    9 
    10 extern void xtrap15(void);
     8#include "ram.h"
    119
    1210/*
  • libcio/ftell.c

    r39a696b rb28a12e  
    88#define DEBUGIT         0
    99
    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"
    1711
    1812/*
  • libcio/fwrite.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010/*
  • libcio/getbuff.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010void getbuff(FILE *ptr)
  • libcio/getc.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    129
    1310int16_t getc(FILE *ptr)
  • libcio/getl.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010/*
  • libcio/getw.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010/*
  • libcio/lseek.c

    r39a696b rb28a12e  
    88#define DEBUGIT         0
    99
    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"
    1711
    1812int32_t lseek(int16_t fd, int32_t pos, int16_t how)
  • libcio/open.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    209
    2110static struct device condev  = { 2, 2, 1, 0, _noper  };
    2211static struct device filedev = { 1, 1, 0, 1, _fileop };
    23 
    24 extern  struct fcb _fcbtab[];
    2512
    2613/*
  • libcio/posit.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
    9 
    10 extern  int16_t _seek(struct fcb *fcp);
     8#include "ram.h"
    119
    1210/*
  • libcio/putc.c

    r39a696b rb28a12e  
    66*/
    77
    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"
    159
    1610static int16_t (*cls_rtn)();
  • libcio/putl.c

    r39a696b rb28a12e  
    88*/
    99
    10 #include "all.h"
     10#include "ram.h"
    1111
    1212void putl(int32_t w, FILE *stream)
  • libcio/putw.c

    r39a696b rb28a12e  
    88*/
    99
    10 #include "all.h"
     10#include "ram.h"
    1111
    1212void putw(uint16_t w, FILE *stream)
  • libcio/read.c

    r39a696b rb28a12e  
    3636#define DEBUGIT         0
    3737
    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"
    5439
    5540static int16_t (*t_read[])() = {
  • libcio/readrn.c

    r39a696b rb28a12e  
    1616#define DEBUGIT         0
    1717
    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"
    3419
    3520/*
  • libcio/rename.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010int16_t rename(int8_t *old, int8_t *new)
  • libcio/scan.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010static int16_t maxwide;
    1111static int16_t (*gsub)();
    12 
    13 extern int8_t *index(int8_t *str, int8_t c);
    1412
    1513static int8_t *scnstr;
  • libcio/setbuf.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010void setbuf(FILE *stream, int8_t *buffer)
  • libcio/ungetc.c

    r39a696b rb28a12e  
    66*/
    77
    8 #include "all.h"
     8#include "ram.h"
    99
    1010int16_t ungetc(int16_t c, FILE *ptr)
  • libcio/unlink.c

    r39a696b rb28a12e  
    88#define DEBUGIT         0
    99
    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"
    2111
    2212/*
  • libcio/write.c

    r39a696b rb28a12e  
    88#define DEBUGIT         0
    99
    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"
    3711
    3812static  int16_t (*wr_tab[])() = {       /* write routine dispatch table */
  • libcio/writern.c

    r39a696b rb28a12e  
    1616#define DEBUGIT         0
    1717
    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"
    3619
    3720/*
Note: See TracChangeset for help on using the changeset viewer.