home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
telix
/
t310sort.arc
/
WRITEFON.C
< prev
Wrap
C/C++ Source or Header
|
1988-10-19
|
2KB
|
81 lines
/**
*
* Module: writefon.c
* Version: 1.1
* Description: routines to write telix 3.0-3.1 fon file
* Author: Paul Roub
*
* Revision History:
* 7-13-88 : created
*
* This program and its sources are Copyright (C) 1988 by Paul Roub
* and may not be sold for profit without the express written
* consent of the author. Redistribute them (in their entirety) as
* you wish, provided no fee is charged and all materials are
* present and unmodified.
*
**/
/*<f>*/
#include <stdio.h>
#include "tlx30.h"
#include "tlxsort.h"
static void WriteFonHeader ( fon_header *th, FILE *fil );
/*<f>*/
/**
*
* Function: void WriteFonFile()
* Description: write fon file to disk
* Returns: nothing
*
**/
void WriteFonFile(name, th, te)
char *name;
fon_header *th;
fon_entry *te;
{
FILE *fil;
int result;
fil = ffopen(name, "wb");
WriteFonHeader(th, fil);
result = fwrite(te, sizeof(fon_entry), (size_t)th->num_entries, fil);
if (result != th->num_entries)
quitf("error writing fon file %s", name);
fclose(fil);
return;
}
/*<f>*/
/**
*
* Function: static void WriteFonHeader()
* Description: write telix 3.0-3.1 fon header
* Returns: nothing
*
**/
static void WriteFonHeader(th, fil)
fon_header *th;
FILE *fil;
{
int result;
result = fwrite(th, sizeof(fon_header), 1, fil);
if (result != 1)
quitf("error writing fon file header");
return;
}