1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-17 06:24:12 -04:00

Merge with git+ssh://pasky.or.cz/srv/git/elinks.git

This commit is contained in:
Miciah Dashiel Butler Masters 2005-11-27 19:40:49 +00:00 committed by Miciah Dashiel Butler Masters
commit fee63d574a
13 changed files with 1608 additions and 1525 deletions

View File

@ -23,6 +23,13 @@
# Called when the user enters something into the goto URL dialog. # Called when the user enters something into the goto URL dialog.
#
# Arguments:
# @url the URL entered in the goto URL dialog.
# @current_url the URL currently being viewed in ELinks.
#
# Returns the URL to go to. Return nil to use the @url argument as is
# (leave it untouched).
def ELinks::goto_url_hook(url, current_url) def ELinks::goto_url_hook(url, current_url)
case url case url
@ -42,6 +49,11 @@ end
# Called when the user decides to load some document by following a link, # Called when the user decides to load some document by following a link,
# entering an URL in the goto URL dialog, loading frames from a frameset (?) # entering an URL in the goto URL dialog, loading frames from a frameset (?)
# etc. # etc.
#
# Arguments:
# @url the URL being followed.
#
# Returns the URL to be followed. Return nil to use the @url argument as is.
def ELinks::follow_url_hook(url) def ELinks::follow_url_hook(url)
return url return url
@ -50,25 +62,43 @@ end
# Called when a HTML document has been loaded - before the document rendering # Called when a HTML document has been loaded - before the document rendering
# begins. Makes it possible to fix up bad HTML code, remove tags etc. # begins. Makes it possible to fix up bad HTML code, remove tags etc.
#
# Arguments:
# @url the URL of the document being loaded.
# @html the source of the document being loaded.
#
# Returns the preformatted source of the document. Return nil to leave the
# document source untouched.
def ELinks::pre_format_html_hook(url, html) def ELinks::pre_format_html_hook(url, html)
if url.grep("fvwm.lair.be\/(index|viewforum)*.\.php")
# I don't like the fact that the <img> tags provide labels as
# well as span classes. So we'll remove them.
html.gsub!(/(<img src.*\"No new posts\".*\>)/,"<font color=\"green\">No New Posts</font></td>")
html.gsub!(/(<img src.*\"New posts\".*\>)/,"<font color=\"red\">New Posts</font></td>")
html.gsub!(/<td><span class=\"gensmall\">([nN]o)|[Nn]ew posts\<\/span\>\<\/td\>/,"<td></td>")
end
return html return html
end end
# Determining what proxy, if any, should be used to load a requested URL. # Determining what proxy, if any, should be used to load a requested URL.
# The hook should return:
# #
# * "PROXY:PORT" - to use the specified proxy # Arguments:
# * "" - to not use any proxy # @url the URL to be proxied.
# * nil - to use the default proxies #
# The hook should return one of the following:
# 1. "<host>:<port>" - to use the specified host and port
# 2. "" - to not use any proxy
# 3. nil - to use the default proxies
def ELinks::proxy_hook(url) def ELinks::proxy_hook(url)
return nil return nil
end end
# Called when ELinks quits and can be used to do required clean-ups # Called when ELinks quits and can be used to do required clean-ups like
# removing any temporary files created by the hooks.
def ELinks::quit_hook def ELinks::quit_hook
end end

2958
po/da.po

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ELinks 0.10.CVS\n" "Project-Id-Version: ELinks 0.10.CVS\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-10-30 17:19+0100\n" "POT-Creation-Date: 2005-11-27 19:21+0100\n"
"PO-Revision-Date: 2005-10-30 17:20+0200\n" "PO-Revision-Date: 2005-11-27 19:22+0200\n"
"Last-Translator: Laurent Monin <zas@norz.org>\n" "Last-Translator: Laurent Monin <zas@norz.org>\n"
"Language-Team: French <zas@norz.org>\n" "Language-Team: French <zas@norz.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -35,7 +35,7 @@ msgstr "Pressez espace pour d
#: src/dialogs/options.c:210 src/dialogs/options.c:290 src/mime/dialogs.c:129 #: src/dialogs/options.c:210 src/dialogs/options.c:290 src/mime/dialogs.c:129
#: src/protocol/auth/dialogs.c:110 src/protocol/protocol.c:231 #: src/protocol/auth/dialogs.c:110 src/protocol/protocol.c:231
#: src/scripting/lua/core.c:377 src/scripting/lua/core.c:457 #: src/scripting/lua/core.c:377 src/scripting/lua/core.c:457
#: src/session/session.c:798 src/viewer/text/search.c:1593 #: src/session/session.c:799 src/viewer/text/search.c:1593
msgid "~OK" msgid "~OK"
msgstr "~OK" msgstr "~OK"
@ -1784,7 +1784,7 @@ msgstr "Description"
#: src/config/dialogs.c:320 src/protocol/bittorrent/dialogs.c:594 #: src/config/dialogs.c:320 src/protocol/bittorrent/dialogs.c:594
#: src/protocol/protocol.c:225 src/session/session.c:282 #: src/protocol/protocol.c:225 src/session/session.c:282
#: src/session/session.c:960 src/viewer/text/textarea.c:362 #: src/session/session.c:961 src/viewer/text/textarea.c:362
#: src/viewer/text/textarea.c:369 #: src/viewer/text/textarea.c:369
msgid "Error" msgid "Error"
msgstr "Erreur" msgstr "Erreur"
@ -5380,7 +5380,7 @@ msgstr "Ignorer le contenu de <noscript>"
#: src/ecmascript/ecmascript.c:50 #: src/ecmascript/ecmascript.c:50
msgid "" msgid ""
"Whether to ignore content enclosed by the <noscript> tag\n" "Whether to ignore content enclosed by the <noscript> tag\n"
" when ECMAScript is enabled." "when ECMAScript is enabled."
msgstr "" msgstr ""
"Ignorer ou non le contenu du tag <noscript> quand ECMAScript\n" "Ignorer ou non le contenu du tag <noscript> quand ECMAScript\n"
"est actif." "est actif."
@ -6309,70 +6309,66 @@ msgid "Bad HTTP response"
msgstr "Réponse HTTP incorrecte" msgstr "Réponse HTTP incorrecte"
#: src/network/state.c:71 #: src/network/state.c:71
msgid "HTTP 100 (???)"
msgstr "HTTP 100 (???)"
#: src/network/state.c:72
msgid "No content" msgid "No content"
msgstr "Aucun contenu" msgstr "Aucun contenu"
#: src/network/state.c:74 #: src/network/state.c:73
msgid "Unknown file type" msgid "Unknown file type"
msgstr "Type de fichier inconnu" msgstr "Type de fichier inconnu"
#: src/network/state.c:75 #: src/network/state.c:74
msgid "Error opening file" msgid "Error opening file"
msgstr "Erreur lors de l'ouverture du fichier" msgstr "Erreur lors de l'ouverture du fichier"
#: src/network/state.c:76 #: src/network/state.c:75
msgid "CGI script not in CGI path" msgid "CGI script not in CGI path"
msgstr "Script CGI absent du chemin des CGIs" msgstr "Script CGI absent du chemin des CGIs"
#: src/network/state.c:77 #: src/network/state.c:76
msgid "Local file access is not allowed in anonymous mode" msgid "Local file access is not allowed in anonymous mode"
msgstr "L'accès aux fichiers locaux n'est pas autorisé en mode anonyme" msgstr "L'accès aux fichiers locaux n'est pas autorisé en mode anonyme"
#: src/network/state.c:80 #: src/network/state.c:79
msgid "Bad FTP response" msgid "Bad FTP response"
msgstr "Réponse FTP incorrecte" msgstr "Réponse FTP incorrecte"
#: src/network/state.c:81 #: src/network/state.c:80
msgid "FTP service unavailable" msgid "FTP service unavailable"
msgstr "Service FTP indisponible" msgstr "Service FTP indisponible"
#: src/network/state.c:82 #: src/network/state.c:81
msgid "Bad FTP login" msgid "Bad FTP login"
msgstr "Échec de l'authentification FTP" msgstr "Échec de l'authentification FTP"
#: src/network/state.c:83 #: src/network/state.c:82
msgid "FTP PORT command failed" msgid "FTP PORT command failed"
msgstr "Échec de la commande FTP PORT" msgstr "Échec de la commande FTP PORT"
#: src/network/state.c:84 #: src/network/state.c:83
msgid "File not found" msgid "File not found"
msgstr "Fichier introuvable" msgstr "Fichier introuvable"
#: src/network/state.c:85 #: src/network/state.c:84
msgid "FTP file error" msgid "FTP file error"
msgstr "Erreur de fichier FTP" msgstr "Erreur de fichier FTP"
#: src/network/state.c:89 #: src/network/state.c:88
msgid "SSL error" msgid "SSL error"
msgstr "Erreur SSL" msgstr "Erreur SSL"
#: src/network/state.c:91 #: src/network/state.c:90
msgid "This version of ELinks does not contain SSL/TLS support" msgid "This version of ELinks does not contain SSL/TLS support"
msgstr "Cette version de ELinks ne supporte ni SSL ni TLS" msgstr "Cette version de ELinks ne supporte ni SSL ni TLS"
#: src/network/state.c:94 #: src/network/state.c:93
msgid "JavaScript support is not enabled" msgid "JavaScript support is not enabled"
msgstr "Le support du Javascript n'est pas activé" msgstr "Le support du Javascript n'est pas activé"
#: src/network/state.c:97 #: src/network/state.c:96
msgid "Bad NNTP response" msgid "Bad NNTP response"
msgstr "Réponse NNTP incorrecte" msgstr "Réponse NNTP incorrecte"
#: src/network/state.c:98 #: src/network/state.c:97
msgid "" msgid ""
"Unable to handle news: URI because no news server has been\n" "Unable to handle news: URI because no news server has been\n"
"been configured. Either set the option protocol.nntp.server\n" "been configured. Either set the option protocol.nntp.server\n"
@ -6382,35 +6378,35 @@ msgstr ""
"n'a été configuré. Configurez l'option protocol.nntp.server\n" "n'a été configuré. Configurez l'option protocol.nntp.server\n"
"ou la variable d'environnement NNTPSERVER." "ou la variable d'environnement NNTPSERVER."
#: src/network/state.c:101 #: src/network/state.c:100
msgid "Server hang up for some reason" msgid "Server hang up for some reason"
msgstr "Le serveur est bloqué pour une raison inconnue" msgstr "Le serveur est bloqué pour une raison inconnue"
#: src/network/state.c:102 #: src/network/state.c:101
msgid "No such newsgroup" msgid "No such newsgroup"
msgstr "Groupe de nouvelles introuvable" msgstr "Groupe de nouvelles introuvable"
#: src/network/state.c:103 #: src/network/state.c:102
msgid "No such article" msgid "No such article"
msgstr "Article introuvable" msgstr "Article introuvable"
#: src/network/state.c:104 #: src/network/state.c:103
msgid "Transfer failed" msgid "Transfer failed"
msgstr "Echec de transfert" msgstr "Echec de transfert"
#: src/network/state.c:105 #: src/network/state.c:104
msgid "Authorization required" msgid "Authorization required"
msgstr "Authentication requise" msgstr "Authentication requise"
#: src/network/state.c:106 #: src/network/state.c:105
msgid "Access to server denied" msgid "Access to server denied"
msgstr "Accès au serveur refusé" msgstr "Accès au serveur refusé"
#: src/network/state.c:110 #: src/network/state.c:109
msgid "The CSO phone-book protocol is not supported." msgid "The CSO phone-book protocol is not supported."
msgstr "Le protocole de carnet d'adresse CSO n'est pas supporté." msgstr "Le protocole de carnet d'adresse CSO n'est pas supporté."
#: src/network/state.c:113 #: src/network/state.c:112
msgid "" msgid ""
"Configuration of the proxy server failed.\n" "Configuration of the proxy server failed.\n"
"This might be caused by an incorrect proxy\n" "This might be caused by an incorrect proxy\n"
@ -6429,19 +6425,19 @@ msgstr ""
"le nom d'hôte éventuellement suivi de deux points et\n" "le nom d'hôte éventuellement suivi de deux points et\n"
"du numéro de port. Par exemple: 'localhost:8080'." "du numéro de port. Par exemple: 'localhost:8080'."
#: src/network/state.c:123 #: src/network/state.c:122
msgid "BitTorrent error" msgid "BitTorrent error"
msgstr "Erreur de BitTorrent" msgstr "Erreur de BitTorrent"
#: src/network/state.c:124 #: src/network/state.c:123
msgid "The BitTorrent metainfo file contained errors" msgid "The BitTorrent metainfo file contained errors"
msgstr "Le fichier metainfo de BitTorrent contenait des erreurs" msgstr "Le fichier metainfo de BitTorrent contenait des erreurs"
#: src/network/state.c:125 #: src/network/state.c:124
msgid "The tracker requesting failed" msgid "The tracker requesting failed"
msgstr "L'interrogation du serveur a échouée" msgstr "L'interrogation du serveur a échouée"
#: src/network/state.c:149 #: src/network/state.c:148
msgid "Unknown error" msgid "Unknown error"
msgstr "Erreur inconnue" msgstr "Erreur inconnue"
@ -7908,11 +7904,11 @@ msgstr "Le fichier sera ouvert avec le programme '%s'."
msgid "~Open" msgid "~Open"
msgstr "~Ouvrir" msgstr "~Ouvrir"
#: src/session/session.c:748 src/session/session.c:767 src/session/task.c:269 #: src/session/session.c:749 src/session/session.c:768 src/session/task.c:269
msgid "Warning" msgid "Warning"
msgstr "Avertissement" msgstr "Avertissement"
#: src/session/session.c:749 #: src/session/session.c:750
msgid "" msgid ""
"You have empty string in protocol.http.user_agent - this was a default value " "You have empty string in protocol.http.user_agent - this was a default value "
"in the past, substituted by default ELinks User-Agent string. However, " "in the past, substituted by default ELinks User-Agent string. However, "
@ -7931,7 +7927,7 @@ msgstr ""
"défaut sera utilisée. Si vous n'avez aucune idée de quoi nous parlons alors " "défaut sera utilisée. Si vous n'avez aucune idée de quoi nous parlons alors "
"faites juste ça. Toutes nos excuses pour ce désagrément." "faites juste ça. Toutes nos excuses pour ce désagrément."
#: src/session/session.c:768 #: src/session/session.c:769
msgid "" msgid ""
"You have option config.saving_style set to a de facto obsolete value. The " "You have option config.saving_style set to a de facto obsolete value. The "
"configuration saving algorithms of ELinks were changed from the last time " "configuration saving algorithms of ELinks were changed from the last time "
@ -7952,11 +7948,11 @@ msgstr ""
"l'option config.saving_style dans le but d'obtenir un fonctionnement " "l'option config.saving_style dans le but d'obtenir un fonctionnement "
"correct. Toutes nos excuses pour l'éventuel désagrément causé." "correct. Toutes nos excuses pour l'éventuel désagrément causé."
#: src/session/session.c:793 #: src/session/session.c:794
msgid "Welcome" msgid "Welcome"
msgstr "Bienvenue" msgstr "Bienvenue"
#: src/session/session.c:794 #: src/session/session.c:795
msgid "" msgid ""
"Welcome to ELinks!\n" "Welcome to ELinks!\n"
"\n" "\n"

View File

@ -540,7 +540,7 @@ bookmark_auto_save_tabs(struct terminal *term)
} }
static void static void
bookmark_snapshot() bookmark_snapshot(void)
{ {
struct string folderstring; struct string folderstring;
struct bookmark *folder; struct bookmark *folder;

View File

@ -19,7 +19,7 @@ struct dom_stack_state {
/* Used for recording which node list are currently being 'decended' /* Used for recording which node list are currently being 'decended'
* into. E.g. whether we are iterating all child elements or attributes * into. E.g. whether we are iterating all child elements or attributes
* of an element. */ * of an element. */
struct dom_node_list *list; struct dom_node_list *list;
/* The index (in the list above) which are currently being handled. */ /* The index (in the list above) which are currently being handled. */
size_t index; size_t index;

View File

@ -14,9 +14,7 @@ struct html_context;
struct memory_list; struct memory_list;
struct menu_item; struct menu_item;
struct part; struct part;
struct session;
struct string; struct string;
struct terminal;
struct uri; struct uri;
/* XXX: This is just terible - this interface is from 75% only for other HTML /* XXX: This is just terible - this interface is from 75% only for other HTML

View File

@ -38,7 +38,6 @@
void void
html_form(struct html_context *html_context, unsigned char *a, html_form(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5) unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{ {
unsigned char *al; unsigned char *al;
struct form *form; struct form *form;

View File

@ -1632,7 +1632,7 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
struct part *part; struct part *part;
struct document *document; struct document *document;
void *ret_val = NULL; void *ret_val = NULL;
assert(html_context); assert(html_context);
if_assert_failed return NULL; if_assert_failed return NULL;
@ -1655,14 +1655,14 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
case SP_FORM: case SP_FORM:
{ {
struct form *form = va_arg(l, struct form *); struct form *form = va_arg(l, struct form *);
html_special_form(part, form); html_special_form(part, form);
break; break;
} }
case SP_CONTROL: case SP_CONTROL:
{ {
struct form_control *fc = va_arg(l, struct form_control *); struct form_control *fc = va_arg(l, struct form_control *);
html_special_form_control(part, fc); html_special_form_control(part, fc);
break; break;
} }
@ -1703,7 +1703,7 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
frameset_desc = create_frameset(fsp); frameset_desc = create_frameset(fsp);
if (!fsp->parent && !document->frame_desc) if (!fsp->parent && !document->frame_desc)
document->frame_desc = frameset_desc; document->frame_desc = frameset_desc;
ret_val = frameset_desc; ret_val = frameset_desc;
break; break;
} }
@ -1723,7 +1723,7 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
{ {
unsigned long seconds = va_arg(l, unsigned long); unsigned long seconds = va_arg(l, unsigned long);
unsigned char *t = va_arg(l, unsigned char *); unsigned char *t = va_arg(l, unsigned char *);
document->refresh = init_document_refresh(t, seconds); document->refresh = init_document_refresh(t, seconds);
break; break;
} }
@ -1752,7 +1752,7 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
} }
va_end(l); va_end(l);
return ret_val; return ret_val;
} }

View File

@ -48,7 +48,7 @@ static struct option_info ecmascript_options[] = {
INIT_OPT_BOOL("ecmascript", N_("Ignore <noscript> content"), INIT_OPT_BOOL("ecmascript", N_("Ignore <noscript> content"),
"ignore_noscript", 0, 0, "ignore_noscript", 0, 0,
N_("Whether to ignore content enclosed by the <noscript> tag\n" N_("Whether to ignore content enclosed by the <noscript> tag\n"
" when ECMAScript is enabled.")), "when ECMAScript is enabled.")),
INIT_OPT_INT("ecmascript", N_("Maximum execution time"), INIT_OPT_INT("ecmascript", N_("Maximum execution time"),
"max_exec_time", 0, 1, 3600, 5, "max_exec_time", 0, 1, 3600, 5,

View File

@ -3,6 +3,7 @@
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#if 0 #if 0
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
#define CONFIG_OWN_LIBC #define CONFIG_OWN_LIBC
@ -144,4 +145,20 @@ int elinks_raise(int signal);
const char *elinks_inet_ntop(int af, const void *src, char *dst, size_t size); const char *elinks_inet_ntop(int af, const void *src, char *dst, size_t size);
#endif #endif
/* Silence various sparse warnings. */
#ifndef __builtin_stpcpy
extern char *__builtin_stpcpy(char *dest, const char *src);
#endif
#ifndef __builtin_mempcpy
extern void *__builtin_mempcpy(void *dest, const void *src, size_t n);
#endif
#if 0
#ifndef __builtin_va_copy
#define __builtin_va_copy(dest, src) do { dest = src; } while (0)
#endif
#endif
#endif #endif

View File

@ -107,4 +107,15 @@ typedef unsigned long long uint32_t;
#define longlong long #define longlong long
#endif #endif
/* These are mostly for shutting up sparse warnings. */
#ifndef __INT_MAX__
#define __INT_MAX__ 0x7fffffff
#endif
#ifndef __LONG_MAX__
#define __LONG_MAX__ 0x7fffffff
#endif
#ifndef __SHRT_MAX__
#define __SHRT_MAX__ 0x7fff
#endif
#endif #endif

View File

@ -115,7 +115,7 @@ init_see(struct module *module)
convert_see_string(&error_msg, value.u.string); convert_see_string(&error_msg, value.u.string);
#if 0 #if 0
if (ctxt.throw_file) if (ctxt.throw_file)
fprintf(stderr, " (thrown from %s:%d)\n", fprintf(stderr, " (thrown from %s:%d)\n",
ctxt.throw_file, ctxt.throw_line); ctxt.throw_file, ctxt.throw_line);
#endif #endif
} }

View File

@ -146,7 +146,7 @@ navigator_alert(struct SEE_interpreter *see, struct SEE_object *self,
N_("SEE Message"), ALIGN_LEFT, string.source); N_("SEE Message"), ALIGN_LEFT, string.source);
} }
#if DATADRIVEN #if DATADRIVEN
_IDEA _IDEA
struct object_info browser_object[] = { struct object_info browser_object[] = {
"ELinks", SEE_ATTR_READONLY, "ELinks", SEE_ATTR_READONLY,
@ -155,7 +155,7 @@ struct object_info browser_object[] = {
{ "home", SEE_STRING, NULL, SEE_ATTR_READONLY }, { "home", SEE_STRING, NULL, SEE_ATTR_READONLY },
}, },
{ /* Methods: (as name, handler, args) */ { /* Methods: (as name, handler, args) */
{ "write", elinks_see_write, SEE_ATTR_READONLY }, { "write", elinks_see_write, SEE_ATTR_READONLY },
{ NULL } { NULL }
}, },
}; };