File: pfu.c

package info (click to toggle)
cti-ifhp 2.1.8-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 932 kB
  • ctags: 845
  • sloc: ansic: 6,036; sh: 1,524; makefile: 318
file content (45 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**************************************************************************
 * LPRng IFHP Filter
 * Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@sdsu.edu>
 *
 * Based on the CTI printer filters.
 *  See COPYRIGHT for details.
 *
 * $Id: pfu.c,v 2.1 1997/01/05 18:41:42 papowell Exp $
 */

#include "portable.h"
#include "common.h"
#include "hp4.h"


/*
 *
 */

void update_pfu(pfu_filename,fontfilename)
char *pfu_filename, *fontfilename;
{
	FILE *pfu;

	log(4,"pfu file '%s' value '%s'",
			pfu_filename, fontfilename );
	if ((pfu=fopen(pfu_filename,"w")) == NULL) {
		logerr(1,"Cannot open/create pfu file : %s",pfu_filename);
	} else {
		fprintf(pfu,"%s",fontfilename?fontfilename:"");
		fclose(pfu);
		log(4,"pfu file '%s' updated successfully", pfu_filename );
	}
}

void delete_pfu(pfu_filename)
	char *pfu_filename;
{
	log(4,"delete_pfu: unlinking '%s'", pfu_filename );
	if( unlink(pfu_filename) == -1){
		logerr(2,"Cannot unlink pfu file '%', possibly already deleted",
			pfu_filename);
	}
}