ftp.nice.ch/pub/next/unix/audio/Cmix.N.s.tar.gz#/cmix/sys/infile.c

This is infile.c in view mode; [Download] [Up]

/* infile.c -- datafile name-setting command for use with gen1. D.A.S. 9/89
*/

#include "../H/ugens.h"
#include "../H/sfheader.h"
#include <stdio.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/stat.h>

FILE *infile_desc[50];

infile(p,n_args) 
    float *p; 
    int n_args;

{
    FILE *descrip;
    char  *name;
    int   fno,i;

    i = (int) p[0];
    name = (char *) i;
    fno = p[1];

    descrip = fopen(name,"r");
    if(descrip == NULL) fprintf(stderr,"Cannot find %s...not opened.\n",name);
    else 
    {
	infile_desc[fno] = descrip;
	printf("Datafile %s opened as file %d\n", name, fno);
    }
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.