1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00

[download] enum download_flags -> download_flags_T

This commit is contained in:
Witold Filipczyk 2022-01-28 17:26:15 +01:00
parent bd27d9a793
commit 2b9f3d5cf9
3 changed files with 14 additions and 12 deletions

View File

@ -571,7 +571,7 @@ download_data(struct download *download, struct file_download *file_download)
*
* @relates lun_hop */
typedef void lun_callback_T(struct terminal *term, char *file,
void *data, enum download_flags flags);
void *data, download_flags_T flags);
/** The user is being asked what to do when the local file for
* the download already exists. This structure is allocated by
@ -606,7 +606,7 @@ struct lun_hop {
* @invariant The ::DOWNLOAD_RESUME_SELECTED bit should be
* clear here because otherwise there would have been no
* reason to ask the user and initialize this structure. */
enum download_flags flags;
download_flags_T flags;
};
/** Data saved by common_download() for the common_download_do()
@ -762,7 +762,7 @@ lun_resume(void *lun_hop_)
* @relates lun_hop */
static void
lookup_unique_name(struct terminal *term, char *ofile,
enum download_flags flags,
download_flags_T flags,
lun_callback_T *callback, void *data)
{
/* [gettext_accelerator_context(.lookup_unique_name)] */
@ -861,7 +861,7 @@ error:
* @relates cdf_hop */
static void
create_download_file_do(struct terminal *term, char *file,
void *data, enum download_flags flags)
void *data, download_flags_T flags)
{
struct cdf_hop *cdf_hop = (struct cdf_hop *)data;
char *wd;
@ -970,7 +970,7 @@ finish:
void
create_download_file(struct terminal *term, char *fi,
char **real_file,
enum download_flags flags,
download_flags_T flags,
cdf_callback_T *callback, void *data)
{
struct cdf_hop *cdf_hop = (struct cdf_hop *)mem_calloc(1, sizeof(*cdf_hop));
@ -1105,7 +1105,7 @@ subst_file(char *prog, char *file, char *uri)
* @relates cmdw_hop */
static void
common_download_do(struct terminal *term, int fd, void *data,
enum download_flags flags)
download_flags_T flags)
{
struct file_download *file_download;
struct cmdw_hop *cmdw_hop = (struct cmdw_hop *)data;
@ -1148,7 +1148,7 @@ finish:
* @relates cmdw_hop */
static void
common_download(struct session *ses, char *file,
enum download_flags flags)
download_flags_T flags)
{
struct cmdw_hop *cmdw_hop;
@ -1207,7 +1207,7 @@ resume_download(void *ses, char *file)
static void
transform_codw_to_cmdw(struct terminal *term, int fd,
struct codw_hop *codw_hop,
enum download_flags flags)
download_flags_T flags)
{
struct type_query *type_query = codw_hop->type_query;
struct cmdw_hop *cmdw_hop = (struct cmdw_hop *)mem_calloc(1, sizeof(*cmdw_hop));
@ -1231,7 +1231,7 @@ transform_codw_to_cmdw(struct terminal *term, int fd,
* @relates codw_hop */
static void
continue_download_do(struct terminal *term, int fd, void *data,
enum download_flags flags)
download_flags_T flags)
{
struct codw_hop *codw_hop = (struct codw_hop *)data;
struct file_download *file_download = NULL;

View File

@ -47,6 +47,8 @@ enum download_flags {
DOWNLOAD_OVERWRITE = 8
};
typedef unsigned char download_flags_T;
struct download {
/* XXX: order matters there, there's some hard initialization in
* src/session/session.c and src/viewer/text/view.c */
@ -210,12 +212,12 @@ int are_there_downloads(void);
*
* @relates cdf_hop */
typedef void cdf_callback_T(struct terminal *term, int fd,
void *data, enum download_flags flags);
void *data, download_flags_T flags);
void start_download(void *, char *);
void resume_download(void *, char *);
void create_download_file(struct terminal *, char *, char **,
enum download_flags, cdf_callback_T *, void *);
download_flags_T, cdf_callback_T *, void *);
void abort_all_downloads(void);
void destroy_downloads(struct session *);

View File

@ -1833,7 +1833,7 @@ save_as(struct session *ses, struct document_view *doc_view, int magic)
* create_download_finish(). */
static void
save_formatted_finish(struct terminal *term, int h,
void *data, enum download_flags flags)
void *data, download_flags_T flags)
{
struct document *document = (struct document *)data;