+2003-12-14 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * url.c (url_file_name): Ditto.
+ (parse_errors): Ditto.
+
+ * retr.c (retr_rate): Ditto.
+
+ * progress.c (create_image): Ditto.
+
+ * netrc.c (parse_netrc): Ditto.
+
+ * main.c (struct cmdline_option): Ditto.
+ (redirect_output_signal): Ditto.
+
+ * init.c (commands): Ditto.
+
+ * ftp-ls.c (ftp_index): Ditto.
+
+ * cookies.c (check_domain_match): Declare the pointer to a literal
+ string as `const'.
+
2003-12-12 Hrvoje Niksic <hniksic@xemacs.org>
* retr.c (fd_read_body): Pass total size to progress_create, not
{
int i;
int known_toplevel = 0;
- static char *known_toplevel_domains[] = {
+ static const char *known_toplevel_domains[] = {
".com", ".edu", ".net", ".org", ".gov", ".mil", ".int"
};
for (i = 0; i < countof (known_toplevel_domains); i++)
{
/* #### Should we translate the months? Or, even better, use
ISO 8601 dates? */
- static char *months[] = {
+ static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
cleanup() function below. */
static struct {
- char *name;
+ const char *name;
void *closure;
int (*action) PARAMS ((const char *, const char *, void *));
} commands[] = {
OPT__NO,
OPT__PARENT,
} type;
- void *data; /* for standard options */
+ const void *data; /* for standard options */
int argtype; /* for non-standard options */
};
static RETSIGTYPE
redirect_output_signal (int sig)
{
- char *signal_name = (sig == SIGHUP ? "SIGHUP" :
- (sig == SIGUSR1 ? "SIGUSR1" :
- "WTF?!"));
+ const char *signal_name = (sig == SIGHUP ? "SIGHUP" :
+ (sig == SIGUSR1 ? "SIGUSR1" :
+ "WTF?!"));
log_request_redirect_output (signal_name);
progress_schedule_redirect ();
signal (sig, redirect_output_signal);
parse_netrc (const char *path)
{
FILE *fp;
- char *line, *p, *tok, *premature_token;
+ char *line, *p, *tok;
+ const char *premature_token;
acc_t *current, *retval;
int ln, quote;
#include "retr.h"
struct progress_implementation {
- char *name;
+ const char *name;
int interactive;
void *(*create) PARAMS ((long, long));
void (*update) PARAMS ((void *, long, double));
/* " 1012.45K/s" */
if (hist->total_time && hist->total_bytes)
{
- static char *short_units[] = { "B/s", "K/s", "M/s", "G/s" };
+ static const char *short_units[] = { "B/s", "K/s", "M/s", "G/s" };
int units = 0;
/* Calculate the download speed using the history ring and
recent data that hasn't made it to the ring yet. */
retr_rate (long bytes, double msecs, int pad)
{
static char res[20];
- static char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" };
+ static const char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" };
int units = 0;
double dlrate = calc_rate (bytes, msecs, &units);
return change;
}
-static char *parse_errors[] = {
+static const char *parse_errors[] = {
#define PE_NO_ERROR 0
N_("No error"),
#define PE_UNSUPPORTED_SCHEME 1
{
struct growable fnres;
- char *u_file, *u_query;
+ const char *u_file, *u_query;
char *fname, *unique;
fnres.base = NULL;