Changeset 5278:b3e0dd3f3141 in roaraudio for libroar/vio.c


Ignore:
Timestamp:
11/21/11 00:42:20 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

last parts of merging _nonblock into _ctl and fixed sizeof(cmd) of _ctls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio.c

    r5276 r5278  
    5656 memset((void*)calls, 0, sizeof(struct roar_vio_calls)); 
    5757 
    58 /* 
    59  calls->read  = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))read; 
    60  calls->write = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))write; 
    61  calls->lseek = (off_t   (*)(int fildes, off_t offset, int whence, void * inst))lseek; 
    62 */ 
    63  
    6458 calls->read     = roar_vio_basic_read; 
    6559 calls->write    = roar_vio_basic_write; 
     
    155149} 
    156150 
    157 off_t   roar_vio_lseek(struct roar_vio_calls * vio, off_t offset, int whence) { 
    158  off_t ret; 
    159  
    160  ROAR_DBG("roar_vio_lseek(vio=%p, offset=%u, whence=%i) = ?", vio, (unsigned int)offset, whence); 
     151roar_off_t   roar_vio_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) { 
     152 roar_off_t ret; 
     153 
     154 ROAR_DBG("roar_vio_lseek(vio=%p, offset=%li, whence=%i) = ?", vio, (long int)offset, whence); 
    161155 
    162156 if ( vio == NULL ) { 
     
    210204} 
    211205 
    212 int     roar_vio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) { 
     206int     roar_vio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) { 
    213207 int ret; 
    214208 
     
    394388} 
    395389 
    396 off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, off_t offset, int whence) { 
     390roar_off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) { 
    397391#ifdef _CAN_OPERATE 
    398392 return lseek(roar_vio_get_fh(vio), offset, whence); 
     
    411405} 
    412406 
    413 int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, int cmd, void * data) { 
     407int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) { 
    414408#ifdef ROAR_HAVE_H_SYS_IOCTL 
    415409 struct roar_vio_sysio_ioctl * sysioctl; 
     
    715709} 
    716710 
    717 off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, off_t offset, int whence) { 
     711roar_off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) { 
    718712 return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence); 
    719713} 
     
    723717} 
    724718 
    725 int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, int cmd, void * data) { 
     719int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) { 
    726720 if (vio == NULL) { 
    727721  roar_err_set(ROAR_ERROR_FAULT); 
     
    841835 
    842836// TODO: we should do a some more intelgent thing here. 
    843 off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, off_t offset, int whence) { 
     837roar_off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) { 
    844838 return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence); 
    845839} 
Note: See TracChangeset for help on using the changeset viewer.