xbps_handle: constify xbps_xxx_cb_data argument.

This commit is contained in:
Juan RP
2014-09-06 09:46:03 +02:00
parent 57a7967f0d
commit 05e7a59f03
7 changed files with 16 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2009-2013 Juan Romero Pardines.
* Copyright (c) 2009-2014 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -45,10 +45,10 @@ bool yesno(const char *, ...);
bool noyes(const char *, ...);
/* from fetch_cb.c */
void fetch_file_progress_cb(struct xbps_fetch_cb_data *, void *);
void fetch_file_progress_cb(const struct xbps_fetch_cb_data *, void *);
/* from state_cb.c */
int state_cb(struct xbps_state_cb_data *, void *);
int state_cb(const struct xbps_state_cb_data *, void *);
/* From util.c */
void print_package_line(const char *, int, bool);

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2009-2012 Juan Romero Pardines
* Copyright (c) 2009-2014 Juan Romero Pardines
* Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
*
@@ -60,7 +60,7 @@ get_time(struct timeval *tvp)
* Compute and display ETA
*/
static const char *
stat_eta(struct xbps_fetch_cb_data *xfpd, void *cbdata)
stat_eta(const struct xbps_fetch_cb_data *xfpd, void *cbdata)
{
struct xferstat *xfer = cbdata;
static char str[16];
@@ -99,7 +99,7 @@ compare_double(const double a, const double b)
* Compute and display transfer rate
*/
static const char *
stat_bps(struct xbps_fetch_cb_data *xfpd, void *cbdata)
stat_bps(const struct xbps_fetch_cb_data *xfpd, void *cbdata)
{
struct xferstat *xfer = cbdata;
static char str[16];
@@ -122,7 +122,7 @@ stat_bps(struct xbps_fetch_cb_data *xfpd, void *cbdata)
* Update the stats display
*/
static void
stat_display(struct xbps_fetch_cb_data *xfpd, void *cbdata)
stat_display(const struct xbps_fetch_cb_data *xfpd, void *cbdata)
{
struct xferstat *xfer = cbdata;
struct timeval now;
@@ -153,7 +153,7 @@ stat_display(struct xbps_fetch_cb_data *xfpd, void *cbdata)
}
void
fetch_file_progress_cb(struct xbps_fetch_cb_data *xfpd, void *cbdata)
fetch_file_progress_cb(const struct xbps_fetch_cb_data *xfpd, void *cbdata)
{
struct xferstat *xfer = cbdata;
char size[8];

View File

@@ -64,7 +64,7 @@ usage(bool fail)
}
static void
unpack_progress_cb(struct xbps_unpack_cb_data *xpd, void *cbdata _unused)
unpack_progress_cb(const struct xbps_unpack_cb_data *xpd, void *cbdata _unused)
{
if (xpd->entry == NULL || xpd->entry_total_count <= 0)
return;

View File

@@ -32,7 +32,7 @@
#include "defs.h"
int
state_cb(struct xbps_state_cb_data *xscd, void *cbdata _unused)
state_cb(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
{
xbps_dictionary_t pkgd;
const char *instver, *newver;

View File

@@ -51,7 +51,7 @@ usage(bool fail)
}
static int
state_cb(struct xbps_state_cb_data *xscd, void *cbd _unused)
state_cb(const struct xbps_state_cb_data *xscd, void *cbd _unused)
{
bool slog = false;

View File

@@ -63,7 +63,7 @@ usage(bool fail)
}
static int
state_cb_rm(struct xbps_state_cb_data *xscd, void *cbdata _unused)
state_cb_rm(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
{
bool slog = false;