mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Merge with http://elinks.cz/elinks.git
This commit is contained in:
commit
f2fc402093
24
po/fr.po
24
po/fr.po
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ELinks 0.12.GIT\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-03-01 11:30+0100\n"
|
||||
"PO-Revision-Date: 2007-03-01 11:32+0100\n"
|
||||
"POT-Creation-Date: 2007-03-03 22:07+0100\n"
|
||||
"PO-Revision-Date: 2007-03-03 22:09+0100\n"
|
||||
"Last-Translator: Laurent Monin <zas@norz.org>\n"
|
||||
"Language-Team: French <zas@norz.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -3023,19 +3023,19 @@ msgstr "Intervalle de revalidation"
|
||||
|
||||
#: src/config/options.inc:508
|
||||
msgid ""
|
||||
"Period that a cache entry is considered to be up-to-date.\n"
|
||||
"When a document is loaded and this interval has elapsed since the\n"
|
||||
"document was initially loaded or most recently revalidated\n"
|
||||
"with the server, the server will be checked in case there is\n"
|
||||
"a more up-to-date version of the document.\n"
|
||||
"Period in seconds that a cache entry is considered to be\n"
|
||||
"up-to-date. When a document is loaded and this interval has elapsed\n"
|
||||
"since the document was initially loaded or most recently\n"
|
||||
"revalidated with the server, the server will be checked in case\n"
|
||||
"there is a more up-to-date version of the document.\n"
|
||||
"\n"
|
||||
"A value of -1 disables automatic revalidation."
|
||||
msgstr ""
|
||||
"Période pendant laquelle une entrée du cache est considérée valide.\n"
|
||||
"Quand un document est chargé et que le temps écoulé depuis son\n"
|
||||
"premier chargement ou sa dernière revalidation avec le serveur,\n"
|
||||
"une vérification auprès du serveur de l'existence d'une version\n"
|
||||
"plus récente aura lieu.\n"
|
||||
"Période en secondes pendant laquelle une entrée du cache est\n"
|
||||
"considérée valide. Quand un document est chargé et que le temps\n"
|
||||
"écoulé depuis son premier chargement ou sa dernière revalidation\n"
|
||||
"avec le serveur, une vérification auprès du serveur de l'existence\n"
|
||||
"d'une version plus récente du document aura lieu.\n"
|
||||
"\n"
|
||||
"Une valeur de -1 désactive la revalidation automatique."
|
||||
|
||||
|
@ -829,10 +829,10 @@ get_translation_table_to_utf8(int from)
|
||||
from &= ~SYSTEM_CHARSET_FLAG;
|
||||
if (from == lfr) return utf_table;
|
||||
lfr = from;
|
||||
if (utf_table_init)
|
||||
memset(utf_table, 0, sizeof(utf_table)),
|
||||
if (utf_table_init) {
|
||||
memset(utf_table, 0, sizeof(utf_table));
|
||||
utf_table_init = 0;
|
||||
else
|
||||
} else
|
||||
free_utf_table();
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
|
@ -73,7 +73,7 @@ sig_tstp(struct terminal *term)
|
||||
#ifdef SIGSTOP
|
||||
pid_t pid = getpid();
|
||||
|
||||
block_itrm(0);
|
||||
block_itrm();
|
||||
#if defined (SIGCONT) && defined(SIGTTOU)
|
||||
if (!fork()) {
|
||||
sleep(1);
|
||||
@ -95,7 +95,7 @@ sig_tstp(struct terminal *term)
|
||||
static void
|
||||
sig_cont(struct terminal *term)
|
||||
{
|
||||
if (!unblock_itrm(0)) resize_terminal();
|
||||
if (!unblock_itrm()) resize_terminal();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
/* SMB protocol implementation */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE /* Needed for asprintf() */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@ -39,7 +35,6 @@
|
||||
#include "protocol/uri.h"
|
||||
#include "util/conv.h"
|
||||
#include "util/memory.h"
|
||||
#include "util/snprintf.h"
|
||||
#include "util/string.h"
|
||||
|
||||
/* These options are not used. */
|
||||
|
@ -217,32 +217,45 @@ static unsigned char *
|
||||
save_form_data_to_file(struct uri *uri)
|
||||
{
|
||||
unsigned char *filename = get_tempdir_filename("elinks-XXXXXX");
|
||||
int formfd;
|
||||
FILE *formfile;
|
||||
int fd;
|
||||
FILE *fp;
|
||||
size_t nmemb, len;
|
||||
unsigned char *formdata;
|
||||
|
||||
if (!filename) return NULL;
|
||||
|
||||
formfd = safe_mkstemp(filename);
|
||||
if (formfd < 0) {
|
||||
fd = safe_mkstemp(filename);
|
||||
if (fd < 0) {
|
||||
mem_free(filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
formfile = fdopen(formfd, "w");
|
||||
if (!formfile) {
|
||||
if (!uri->post) return filename;
|
||||
|
||||
/* Jump the content type */
|
||||
formdata = strchr(uri->post, '\n');
|
||||
formdata = formdata ? formdata + 1 : uri->post;
|
||||
len = strlen(formdata);
|
||||
if (len == 0) return filename;
|
||||
|
||||
fp = fdopen(fd, "w");
|
||||
if (!fp) {
|
||||
|
||||
error:
|
||||
unlink(filename);
|
||||
mem_free(filename);
|
||||
close(formfd);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (uri->post) {
|
||||
/* Jump the content type */
|
||||
unsigned char *formdata = strchr(uri->post, '\n');
|
||||
|
||||
formdata = formdata ? formdata + 1 : uri->post;
|
||||
fwrite(formdata, strlen(formdata), 1, formfile);
|
||||
nmemb = fwrite(formdata, len, 1, fp);
|
||||
if (nmemb != 1) {
|
||||
fclose(fp);
|
||||
goto error;
|
||||
}
|
||||
fclose(formfile);
|
||||
|
||||
if (fclose(fp) != 0)
|
||||
goto error;
|
||||
|
||||
return filename;
|
||||
}
|
||||
@ -251,7 +264,7 @@ void
|
||||
user_protocol_handler(struct session *ses, struct uri *uri)
|
||||
{
|
||||
unsigned char *subj = NULL, *prog;
|
||||
unsigned char *formfilename;
|
||||
unsigned char *filename;
|
||||
|
||||
prog = get_user_program(ses->tab->term, struri(uri), uri->protocollen);
|
||||
if (!prog || !*prog) {
|
||||
@ -280,19 +293,19 @@ user_protocol_handler(struct session *ses, struct uri *uri)
|
||||
}
|
||||
}
|
||||
|
||||
formfilename = save_form_data_to_file(uri);
|
||||
filename = save_form_data_to_file(uri);
|
||||
|
||||
prog = subst_cmd(prog, uri, subj, formfilename);
|
||||
prog = subst_cmd(prog, uri, subj, filename);
|
||||
mem_free_if(subj);
|
||||
if (prog) {
|
||||
unsigned char *delete = empty_string_or_(formfilename);
|
||||
unsigned char *delete = empty_string_or_(filename);
|
||||
|
||||
exec_on_terminal(ses->tab->term, prog, delete, 1);
|
||||
mem_free(prog);
|
||||
|
||||
} else if (formfilename) {
|
||||
unlink(formfilename);
|
||||
} else if (filename) {
|
||||
unlink(filename);
|
||||
}
|
||||
|
||||
mem_free_if(formfilename);
|
||||
mem_free_if(filename);
|
||||
}
|
||||
|
@ -1391,5 +1391,7 @@ eat_kbd_repeat_count(struct session *ses)
|
||||
|
||||
ses->kbdprefix.repeat_count = 0;
|
||||
|
||||
/* Clear status bar when prefix is eaten (bug 930) */
|
||||
print_screen_status(ses);
|
||||
return count;
|
||||
}
|
||||
|
@ -350,13 +350,13 @@ unblock_itrm_x(void *h)
|
||||
{
|
||||
close_handle(h);
|
||||
if (!ditrm) return;
|
||||
unblock_itrm(0);
|
||||
unblock_itrm();
|
||||
resize_terminal();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
unblock_itrm(int fd)
|
||||
unblock_itrm(void)
|
||||
{
|
||||
if (!ditrm) return -1;
|
||||
|
||||
@ -375,7 +375,7 @@ unblock_itrm(int fd)
|
||||
|
||||
|
||||
void
|
||||
block_itrm(int fd)
|
||||
block_itrm(void)
|
||||
{
|
||||
if (!ditrm) return;
|
||||
|
||||
@ -591,7 +591,7 @@ has_nul_byte:
|
||||
memcpy(param + 1, path.source, path_len + 1);
|
||||
memcpy(param + 1 + path_len + 1, delete.source, del_len + 1);
|
||||
|
||||
if (fg == 1) block_itrm(itrm->in.ctl);
|
||||
if (fg == 1) block_itrm();
|
||||
|
||||
blockh = start_thread((void (*)(void *, int)) exec_thread,
|
||||
param, param_len);
|
||||
@ -599,7 +599,7 @@ has_nul_byte:
|
||||
|
||||
if (blockh == -1) {
|
||||
if (fg == 1)
|
||||
unblock_itrm(itrm->in.ctl);
|
||||
unblock_itrm();
|
||||
|
||||
goto nasty_thing;
|
||||
}
|
||||
|
@ -118,8 +118,8 @@ handle_trm(int std_in, int std_out, int sock_in, int sock_out, int ctl_in,
|
||||
void *init_string, int init_len, int remote);
|
||||
|
||||
void itrm_queue_event(struct itrm *itrm, unsigned char *data, int len);
|
||||
void block_itrm(int);
|
||||
int unblock_itrm(int);
|
||||
void block_itrm(void);
|
||||
int unblock_itrm(void);
|
||||
void free_all_itrms(void);
|
||||
void resize_terminal(void);
|
||||
void dispatch_special(unsigned char *);
|
||||
|
@ -200,7 +200,7 @@ unblock_terminal(struct terminal *term)
|
||||
term->blocked = -1;
|
||||
set_handlers(term->fdin, (select_handler_T) in_term, NULL,
|
||||
(select_handler_T) destroy_terminal, term);
|
||||
unblock_itrm(term->fdin);
|
||||
unblock_itrm();
|
||||
redraw_terminal_cls(term);
|
||||
if (textarea_editor) /* XXX */
|
||||
textarea_edit(1, NULL, NULL, NULL, NULL);
|
||||
@ -223,13 +223,13 @@ exec_on_master_terminal(struct terminal *term,
|
||||
memcpy(param + 1, path, plen + 1);
|
||||
memcpy(param + 1 + plen + 1, delete, dlen + 1);
|
||||
|
||||
if (fg == 1) block_itrm(term->fdin);
|
||||
if (fg == 1) block_itrm();
|
||||
|
||||
blockh = start_thread((void (*)(void *, int)) exec_thread,
|
||||
param, param_size);
|
||||
fmem_free(param);
|
||||
if (blockh == -1) {
|
||||
if (fg == 1) unblock_itrm(term->fdin);
|
||||
if (fg == 1) unblock_itrm();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -892,7 +892,10 @@ point_intersect(struct point *p1, int l1, struct point *p2, int l2)
|
||||
assert(p2);
|
||||
if_assert_failed return 0;
|
||||
|
||||
if (first_time) memset(hash, 0, HASH_SIZE), first_time = 0;
|
||||
if (first_time) {
|
||||
memset(hash, 0, HASH_SIZE);
|
||||
first_time = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < l1; i++) hash[HASH(p1[i])] = 1;
|
||||
|
||||
|
@ -532,22 +532,41 @@ static unsigned char *
|
||||
save_textarea_file(unsigned char *value)
|
||||
{
|
||||
unsigned char *filename;
|
||||
FILE *file = NULL;
|
||||
int h;
|
||||
FILE *fp = NULL;
|
||||
int fd;
|
||||
size_t nmemb, len;
|
||||
|
||||
filename = get_tempdir_filename("elinks-area-XXXXXX");
|
||||
if (!filename) return NULL;
|
||||
|
||||
h = safe_mkstemp(filename);
|
||||
if (h >= 0) file = fdopen(h, "w");
|
||||
|
||||
if (file) {
|
||||
fwrite(value, strlen(value), 1, file);
|
||||
fclose(file);
|
||||
} else {
|
||||
fd = safe_mkstemp(filename);
|
||||
if (fd < 0) {
|
||||
mem_free(filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
len = strlen(value);
|
||||
if (len == 0) return filename;
|
||||
|
||||
fp = fdopen(fd, "w");
|
||||
if (!fp) {
|
||||
|
||||
error:
|
||||
unlink(filename);
|
||||
mem_free(filename);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nmemb = fwrite(value, len, 1, fp);
|
||||
if (nmemb != 1) {
|
||||
fclose(fp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (fclose(fp) != 0)
|
||||
goto error;
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user