Changeset 2060:f79b5534e33b in roaraudio for libroar/vio.c


Ignore:
Timestamp:
07/08/09 01:51:52 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

moved vio string functions like roar_vio_printf() out of main vio code file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio.c

    r2059 r2060  
    161161} 
    162162 
    163 int     roar_vio_putc    (struct roar_vio_calls * vio, char c) { 
    164  return roar_vio_write(vio, &c, 1); 
    165 } 
    166  
    167 int     roar_vio_getc    (struct roar_vio_calls * vio) { 
    168  unsigned char c; 
    169  
    170  if ( roar_vio_read(vio, &c, 1) != 1 ) 
    171   return EOF; 
    172  
    173  return c; 
    174 } 
    175  
    176 int     roar_vio_printf(struct roar_vio_calls * vio, const char *format, ...) { 
    177  va_list ap; 
    178  int ret; 
    179  char buf[8192]; 
    180  
    181  va_start(ap, format); 
    182  ret = vsnprintf(buf, 8192, format, ap); 
    183  va_end(ap); 
    184  
    185  return roar_vio_write(vio, buf, ret); 
    186 } 
    187  
    188163// converters: 
    189164int     roar_vio_open_file     (struct roar_vio_calls * calls, char * filename, int flags, mode_t mode) { 
Note: See TracChangeset for help on using the changeset viewer.