open_out_file

Digital Signal Processing Library

Voice Lab

Program name: open_out_file

Language: C

In file: file_lib.c

Objective: Open file for writing

Usage: FILE *open_out_file(char *out_name);

Parameters:

  • out_name - The complete name of the file to open
Return:
  • Open FILE pointer

Mathematical Description:

Comments: Routine is used to open file for writing

User Comments

Code:

FILE *open_out_file(char *out_name)
{
FILE *output;

/* Open output file and return the file pointer */
if((output=fopen(out_name,"w"))==NULL) {
fprintf(stderr, "Error opening output file: %s\n", out_name);
exit(1);
}
return(output);
}