Rename pcf_file to pcf
This commit is contained in:
parent
553e51741a
commit
2a12af8e56
@ -318,7 +318,7 @@ write_type(FILE *f, struct pcf_type *type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_types(struct pcf_file *pcf)
|
write_types(struct pcf *pcf)
|
||||||
{
|
{
|
||||||
for (struct pcf_type *t = pcf->types; t != NULL; t = t->hh.next)
|
for (struct pcf_type *t = pcf->types; t != NULL; t = t->hh.next)
|
||||||
write_type(pcf->f, t);
|
write_type(pcf->f, t);
|
||||||
@ -337,7 +337,7 @@ create_values(struct pcf_type *t, enum chan c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_type(struct pcf_file *pcf, enum chan c)
|
create_type(struct pcf *pcf, enum chan c)
|
||||||
{
|
{
|
||||||
enum chan_type ct = pcf->chantype;
|
enum chan_type ct = pcf->chantype;
|
||||||
int prv_type = chan_to_prvtype[c];
|
int prv_type = chan_to_prvtype[c];
|
||||||
@ -364,7 +364,7 @@ create_type(struct pcf_file *pcf, enum chan c)
|
|||||||
|
|
||||||
/** Open the given PCF file and create the default events. */
|
/** Open the given PCF file and create the default events. */
|
||||||
void
|
void
|
||||||
pcf_open(struct pcf_file *pcf, char *path, int chantype)
|
pcf_open(struct pcf *pcf, char *path, int chantype)
|
||||||
{
|
{
|
||||||
memset(pcf, 0, sizeof(*pcf));
|
memset(pcf, 0, sizeof(*pcf));
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ pcf_open(struct pcf_file *pcf, char *path, int chantype)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct pcf_type *
|
struct pcf_type *
|
||||||
pcf_find_type(struct pcf_file *pcf, int type_id)
|
pcf_find_type(struct pcf *pcf, int type_id)
|
||||||
{
|
{
|
||||||
struct pcf_type *type;
|
struct pcf_type *type;
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ pcf_find_type(struct pcf_file *pcf, int type_id)
|
|||||||
* @return The pcf_type created.
|
* @return The pcf_type created.
|
||||||
*/
|
*/
|
||||||
struct pcf_type *
|
struct pcf_type *
|
||||||
pcf_add_type(struct pcf_file *pcf, int type_id, const char *label)
|
pcf_add_type(struct pcf *pcf, int type_id, const char *label)
|
||||||
{
|
{
|
||||||
struct pcf_type *pcftype = pcf_find_type(pcf, type_id);
|
struct pcf_type *pcftype = pcf_find_type(pcf, type_id);
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ pcf_add_value(struct pcf_type *type, int value, const char *label)
|
|||||||
|
|
||||||
/** Writes the defined event and values to the PCF file. */
|
/** Writes the defined event and values to the PCF file. */
|
||||||
void
|
void
|
||||||
pcf_write(struct pcf_file *pcf)
|
pcf_write(struct pcf *pcf)
|
||||||
{
|
{
|
||||||
write_header(pcf->f);
|
write_header(pcf->f);
|
||||||
write_colors(pcf->f, pcf_palette, pcf_palette_len);
|
write_colors(pcf->f, pcf_palette, pcf_palette_len);
|
||||||
@ -471,7 +471,7 @@ pcf_write(struct pcf_file *pcf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pcf_close(struct pcf_file *pcf)
|
pcf_close(struct pcf *pcf)
|
||||||
{
|
{
|
||||||
fclose(pcf->f);
|
fclose(pcf->f);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ struct pcf_type {
|
|||||||
UT_hash_handle hh;
|
UT_hash_handle hh;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pcf_file {
|
struct pcf {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int chantype;
|
int chantype;
|
||||||
int pcf_ntypes;
|
int pcf_ntypes;
|
||||||
@ -44,15 +44,15 @@ struct pcf_value_label {
|
|||||||
|
|
||||||
extern struct pcf_value_label nanos6_ss_values[];
|
extern struct pcf_value_label nanos6_ss_values[];
|
||||||
|
|
||||||
void pcf_open(struct pcf_file *pcf, char *path, int chantype);
|
void pcf_open(struct pcf *pcf, char *path, int chantype);
|
||||||
|
|
||||||
void pcf_write(struct pcf_file *pcf);
|
void pcf_write(struct pcf *pcf);
|
||||||
|
|
||||||
void pcf_close(struct pcf_file *pcf);
|
void pcf_close(struct pcf *pcf);
|
||||||
|
|
||||||
struct pcf_type *pcf_find_type(struct pcf_file *pcf, int type_id);
|
struct pcf_type *pcf_find_type(struct pcf *pcf, int type_id);
|
||||||
|
|
||||||
struct pcf_type *pcf_add_type(struct pcf_file *pcf, int type_id,
|
struct pcf_type *pcf_add_type(struct pcf *pcf, int type_id,
|
||||||
const char *label);
|
const char *label);
|
||||||
|
|
||||||
struct pcf_value *pcf_add_value(struct pcf_type *type, int value,
|
struct pcf_value *pcf_add_value(struct pcf_type *type, int value,
|
||||||
|
@ -13,7 +13,7 @@ struct pvt {
|
|||||||
char dir[PATH_MAX];
|
char dir[PATH_MAX];
|
||||||
char name[PATH_MAX]; /* Without .prv extension */
|
char name[PATH_MAX]; /* Without .prv extension */
|
||||||
struct prv prv;
|
struct prv prv;
|
||||||
struct pcf_file pcf;
|
struct pcf pcf;
|
||||||
|
|
||||||
struct UT_hash_handle hh; /* For recorder */
|
struct UT_hash_handle hh; /* For recorder */
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user