Changeset 7258c6a in buchla-68k for libcio/putc.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcio/putc.c

    r0292fbb r7258c6a  
    99#include "stddefs.h"
    1010
    11 extern  int     write(int fd, char *buff, unsigned len);
     11extern  int16_t write(int16_t fd, int8_t *buff, uint16_t len);
    1212extern  void    getbuff(FILE *ptr);
    13 extern  int     close(int fd);
     13extern  int16_t close(int16_t fd);
    1414
    15 extern int (*_clsall)();
     15extern int16_t (*_clsall)();
    1616
    17 static int (*cls_rtn)();
     17static int16_t (*cls_rtn)();
    1818
    19 int     _ClFlag;
     19int16_t _ClFlag;
    2020
    21 int     fclose(FILE *ptr);
     21int16_t fclose(FILE *ptr);
    2222
    2323/*
     
    4747*/
    4848
    49 int flush_(FILE *ptr, int data)
     49int16_t flush_(FILE *ptr, int16_t data)
    5050{
    51         register int size;
     51        register int16_t size;
    5252
    5353        if (_ClFlag EQ 0) {
     
    6060        if (ptr->_flags & _DIRTY) {     /* something in the buffer ? */
    6161
    62                 size = (int)((long)ptr->_bp - (long)ptr->_buff);
     62                size = (int16_t)((int32_t)ptr->_bp - (int32_t)ptr->_buff);
    6363
    6464                if (write(ptr->_unit, ptr->_buff, size) EQ -1) {
     
    105105*/
    106106
    107 int fflush(FILE *ptr)
     107int16_t fflush(FILE *ptr)
    108108{
    109109        return(flush_(ptr, -1));
     
    116116*/
    117117
    118 int fclose(FILE *ptr)
     118int16_t fclose(FILE *ptr)
    119119{
    120         int err;
     120        int16_t err;
    121121
    122122        err = 0;
     
    131131                if (ptr->_flags & _ALLBUF) {    /* deallocate standard buffer */
    132132
    133                         *(long **)ptr->_buff = Stdbufs;
    134                         Stdbufs = (long *)ptr->_buff;
     133                        *(int32_t **)ptr->_buff = Stdbufs;
     134                        Stdbufs = (int32_t *)ptr->_buff;
    135135                }
    136136        }
     
    150150*/
    151151
    152 int putc(int c, FILE *ptr)
     152int16_t putc(int16_t c, FILE *ptr)
    153153{
    154154        if (ptr->_bp GE ptr->_bend)
     
    164164*/
    165165
    166 int puterr(int c)
     166int16_t puterr(int16_t c)
    167167{
    168168        return(putc(c, stderr));
Note: See TracChangeset for help on using the changeset viewer.