From 2a12af8e56c54c24799f12c47a4eb1f5861dc05d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Wed, 1 Feb 2023 16:10:58 +0100 Subject: [PATCH] Rename pcf_file to pcf --- src/emu/pcf.c | 14 +++++++------- src/emu/pcf.h | 12 ++++++------ src/emu/pvt.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/emu/pcf.c b/src/emu/pcf.c index 2ffcb4f..0d05d02 100644 --- a/src/emu/pcf.c +++ b/src/emu/pcf.c @@ -318,7 +318,7 @@ write_type(FILE *f, struct pcf_type *type) } 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) write_type(pcf->f, t); @@ -337,7 +337,7 @@ create_values(struct pcf_type *t, enum chan c) } 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; 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. */ 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)); @@ -382,7 +382,7 @@ pcf_open(struct pcf_file *pcf, char *path, int chantype) } 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; @@ -397,7 +397,7 @@ pcf_find_type(struct pcf_file *pcf, int type_id) * @return The pcf_type created. */ 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); @@ -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. */ void -pcf_write(struct pcf_file *pcf) +pcf_write(struct pcf *pcf) { write_header(pcf->f); write_colors(pcf->f, pcf_palette, pcf_palette_len); @@ -471,7 +471,7 @@ pcf_write(struct pcf_file *pcf) } void -pcf_close(struct pcf_file *pcf) +pcf_close(struct pcf *pcf) { fclose(pcf->f); } diff --git a/src/emu/pcf.h b/src/emu/pcf.h index fa0cd37..ef7f7cf 100644 --- a/src/emu/pcf.h +++ b/src/emu/pcf.h @@ -29,7 +29,7 @@ struct pcf_type { UT_hash_handle hh; }; -struct pcf_file { +struct pcf { FILE *f; int chantype; int pcf_ntypes; @@ -44,15 +44,15 @@ struct pcf_value_label { 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); struct pcf_value *pcf_add_value(struct pcf_type *type, int value, diff --git a/src/emu/pvt.h b/src/emu/pvt.h index c53ad94..0277a53 100644 --- a/src/emu/pvt.h +++ b/src/emu/pvt.h @@ -13,7 +13,7 @@ struct pvt { char dir[PATH_MAX]; char name[PATH_MAX]; /* Without .prv extension */ struct prv prv; - struct pcf_file pcf; + struct pcf pcf; struct UT_hash_handle hh; /* For recorder */ };