Changeset f7428b1 in buchla-68k for include/stdio.h


Ignore:
Timestamp:
07/10/2017 01:26:59 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
5fa506d
Parents:
c3aee8a
Message:

Started to rework include files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/stdio.h

    rc3aee8a rf7428b1  
    66*/
    77
     8#pragma once
     9#include "stdint.h"
    810#include "fspars.h"             /* file system parameters */
    911
    10 #define NULL    0
    1112#define EOF     -1
    1213
     
    3334} FILE;
    3435
    35 #ifndef _FS_DEF_
    36 
    37 extern  FILE    Cbuffs[NSTREAMS];               /* table of FILE structures */
    38 extern  int8_t  *Stdbufs;                       /* free list of buffers */
    39 extern  int32_t Stdbuf[MAXDFILE][BUFSIZL];      /* buffers */
    40 
    41 #endif
    42 
    43 extern  int32_t ftell(FILE *fp);
    44 extern  int8_t  *gets(int8_t *line);
    45 extern  int8_t  *fgets(int8_t *s, int16_t n, FILE *fp);
    46 extern  FILE    *fopen(int8_t *name, int8_t *mode);
    47 extern  FILE    *fopena(int8_t *name, int8_t *mode);
    48 extern  FILE    *fopenb(int8_t *name, int8_t *mode);
    49 extern  int16_t fread(int8_t *buffer, uint16_t size, int16_t number, FILE *stream);
    50 extern  int16_t fwrite(int8_t *buffer, int16_t size, int16_t number, FILE *stream);
    51 extern  int16_t fseek(FILE *fp, int32_t pos, int16_t mode);
    52 extern  int16_t fflush(FILE *ptr);
    53 extern  int16_t fclose(FILE *ptr);
    54 
    55 extern  int32_t printf(int8_t *fmt, ...);
    56 extern  int32_t sprintf(int8_t *str, int8_t *fmt, ...);
    57 
    58 extern  int16_t getc(FILE *ptr);
    59 extern  int16_t putc(int16_t c, FILE *ptr);
    60 extern  int16_t ungetc(int16_t c, FILE *ptr);
    61 
    6236#define stdin   (&Cbuffs[0])
    6337#define stdout  (&Cbuffs[1])
     
    7044#define clearerr(fp)    ((fp)->_flags &= ~(_IOERR | _EOF))
    7145#define fileno(fp)      ((fp)->_unit)
    72 
    73 #ifndef O_RDONLY        /* only define these once */
    7446
    7547#define O_RDONLY        0x0000  /* Read-only value  */
     
    8557
    8658#define O_RAW           0x8000  /* Raw (binary) I/O flag for getc and putc */
    87 
    88 #endif
Note: See TracChangeset for help on using the changeset viewer.