Changeset 1344:e3826c0d1c80 in roaraudio


Ignore:
Timestamp:
03/23/09 16:07:24 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

updated roarcatvio to a usefull tool :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarcatvio.c

    r1292 r1344  
    5151 int    i; 
    5252 char * name = "roarcat"; 
    53  struct roar_vio_calls file, stream, pgp; 
     53 struct roar_vio_calls file, stream; 
     54 struct roar_vio_defaults def; 
    5455 int file_opened = 0; 
    5556 
    5657 if ( roar_vio_open_fh(&file, ROAR_STDIN) == -1 ) 
     58  return 1; 
     59 
     60 if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, O_RDONLY, 0644) == -1 ) 
    5761  return 1; 
    5862 
     
    8185  } else if ( !file_opened ) { 
    8286   file_opened = 1; 
    83    if ( roar_vio_open_file(&file, k, O_RDONLY, 0644) == -1 ) { 
     87   if ( roar_vio_open_dstr(&file, k, &def, 1) == -1 ) { 
    8488    fprintf(stderr, "Error: can not open file: %s: %s\n", k, strerror(errno)); 
    8589    return 1; 
     
    97101 } 
    98102 
    99  roar_vio_open_pgp_decrypt(&pgp, &file, NULL); 
     103 roar_vio_copy_data(&stream, &file); 
    100104 
    101  roar_vio_copy_data(&stream, &pgp); 
    102  
    103  roar_vio_close(&pgp); 
     105 roar_vio_close(&file); 
    104106 roar_vio_close(&stream); 
    105107 
Note: See TracChangeset for help on using the changeset viewer.