X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Firi.h;h=e759e456329837c5a85392f8003b97c7c2117d26;hp=cdc5c7fd5bf64281ec2b23b8d3a245f5d917acb4;hb=HEAD;hpb=8c513ef48725f2091baecb30717b178f3337b442 diff --git a/src/iri.h b/src/iri.h index cdc5c7fd..e759e456 100644 --- a/src/iri.h +++ b/src/iri.h @@ -1,5 +1,5 @@ /* Internationalization related declarations. - Copyright (C) 2008 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -31,9 +31,10 @@ as that of the covered work. */ #define IRI_H struct iri { - char *uri_encoding; /* Encoding of the uri to fetch */ + char *uri_encoding; /* Encoding of the uri to fetch */ char *content_encoding; /* Encoding of links inside the fetched file */ - bool utf8_encode; /* Will/Is the current url encoded in utf8 */ + char *orig_url; /* */ + bool utf8_encode; /* Will/Is the current url encoded in utf8 */ }; #ifdef ENABLE_IRI @@ -46,15 +47,16 @@ char *idn_encode (struct iri *i, char *host); char *idn_decode (char *host); bool remote_to_utf8 (struct iri *i, const char *str, const char **new); struct iri *iri_new (void); +struct iri *iri_dup (const struct iri *); void iri_free (struct iri *i); -void set_uri_encoding (struct iri *i, char *charset); +void set_uri_encoding (struct iri *i, char *charset, bool force); void set_content_encoding (struct iri *i, char *charset); #else /* ENABLE_IRI */ -struct iri dummy_iri; +extern struct iri dummy_iri; -#define parse_charset(str) NULL +#define parse_charset(str) (str, NULL) #define find_locale() NULL #define check_encoding_name(str) false #define locale_to_utf8(str) (str) @@ -62,8 +64,9 @@ struct iri dummy_iri; #define idn_decode(str) NULL #define remote_to_utf8(a,b,c) false #define iri_new() (&dummy_iri) +#define iri_dup(a) (&dummy_iri) #define iri_free(a) -#define set_uri_encoding(a,b) +#define set_uri_encoding(a,b,c) #define set_content_encoding(a,b) #endif /* ENABLE_IRI */