1
1

1999-08-06 Norbert Warmuth <nwarmuth@privat.circular.de>

* gnome/gconf.h (PORT_STATIC_IN_STRING_FILE_XTIME): new port specific
feature. The Gnome edition first calls all string_file functions
and then uses the return values of these functions. Therefore additional
static buffers in string_file_[acm]time are needed.

* src/screen.c (string_file_[amc]time): These three functions use
file_date which returns a pointer to a static buffer. In the
Gnome edition this buffer has to be coppied to a static buffer
which isn't used in the other two functions (Fix Bug #1766).

* src/util.c, util.h: Moved some constants to util.h

* vfs/tar.c (read_header): Don't segfault when a symlink points to the
root directory.


1999-08-04  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/widget.c (push_history): Add SMB Link to the list of input dialogs
where urls are input without vfs prefix.

Translate the titles of these input dialogs only once.

Removed Gnome specific code because the Gnome edition doesn't use
the input history any more.

* src/util.c (strip_password): Add /#smb: to the list of urls which might
be input with password.
Этот коммит содержится в:
Norbert Warmuth 1999-08-06 19:24:04 +00:00
родитель 839faec6a2
Коммит 972271c9e2
9 изменённых файлов: 91 добавлений и 17 удалений

Просмотреть файл

@ -1,3 +1,11 @@
1999-08-06 Norbert Warmuth <nwarmuth@privat.circular.de>
* gconf.h (PORT_STATIC_IN_STRING_FILE_XTIME): new port specific
feature. The Gnome edition first calls all string_file functions
and then uses the return values of these functions. This needs
some static buffers in string_file_[acm]time. Therefore additional
static buffers in string_file_[acm]time are needed.
1999-08-05 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gnome-file-property-dialog.c (perm_group_new): Set the correct

Просмотреть файл

@ -36,6 +36,7 @@
#define PORT_WINPUT_DELETES_MARKED 1
#define PORT_LIST_MODE_NAME "gnome_list_mode"
#define PORT_LIST_MODE_DEFAULT "icons"
#define PORT_STATIC_IN_STRING_FILE_XTIME 1
#define CLIST_FROM_SW(panel_list) GTK_CLIST (GTK_BIN (panel_list)->child)
#define ILIST_FROM_SW(panel_list) GNOME_ICON_LIST (GTK_BIN (panel_list)->child)

Просмотреть файл

@ -1,3 +1,25 @@
1999-08-06 Norbert Warmuth <nwarmuth@privat.circular.de>
* screen.c (string_file_[amc]time): These three functions use
file_date which returns a pointer to a static buffer. In the
Gnome edition this buffer has to be coppied to a static buffer
which isn't used in the other two functions (Fix Bug #1766).
* util.c, util.h: Moved some constants to util.h
1999-08-04 Norbert Warmuth <nwarmuth@privat.circular.de>
* widget.c (push_history): Add SMB Link to the list of input dialogs
where urls are input without vfs prefix.
Translate the titles of these input dialogs only once.
Removed Gnome specific code because the Gnome edition doesn't use
the input history any more.
* util.c (strip_password): Add /#smb: to the list of urls which might
be input with password.
1999-08-03 Norbert Warmuth <nwarmuth@privat.circular.de>
* poptalloca.h: New file with definitions for alloca. Note: alloca

Просмотреть файл

@ -267,21 +267,39 @@ string_file_type (file_entry *fe, int len)
char *
string_file_mtime (file_entry *fe, int len)
{
#ifdef PORT_STATIC_IN_STRING_FILE_XTIME
static char timebuf [MAX_I18NTIMELENGTH + 1];
return strcpy (timebuf, file_date (fe->buf.st_mtime));
#else
return file_date (fe->buf.st_mtime);
#endif
}
/* atime */
char *
string_file_atime (file_entry *fe, int len)
{
#ifdef PORT_STATIC_IN_STRING_FILE_XTIME
static char timebuf [MAX_I18NTIMELENGTH + 1];
return strcpy (timebuf, file_date (fe->buf.st_atime));
#else
return file_date (fe->buf.st_atime);
#endif
}
/* ctime */
char *
string_file_ctime (file_entry *fe, int len)
{
#ifdef PORT_STATIC_IN_STRING_FILE_XTIME
static char timebuf [MAX_I18NTIMELENGTH + 1];
return strcpy (timebuf, file_date (fe->buf.st_ctime));
#else
return file_date (fe->buf.st_ctime);
#endif
}
/* perm */

Просмотреть файл

@ -350,7 +350,8 @@ strip_password (char *p, int has_prefix)
size_t len;
} prefixes[] = { {"/#ftp:", 6},
{"/#mc:", 5},
{"ftp://", 6}
{"ftp://", 6},
{"/#smb:", 6},
};
char *at, *inner_colon, *dir;
int i;
@ -591,10 +592,6 @@ char *load_file (char *filename)
short-month-name sizes for different locales */
size_t i18n_checktimelength (void)
{
#define MAX_I18NTIMELENGTH 14
#define MIN_I18NTIMELENGTH 10
#define STD_I18NTIMELENGTH 12
size_t length, a, b;
char buf [MAX_I18NTIMELENGTH + 1];
time_t testtime = time (NULL);

Просмотреть файл

@ -84,8 +84,13 @@ void init_uid_gid_cache (void);
char *get_group (int);
char *get_owner (int);
#define MAX_I18NTIMELENGTH 14
#define MIN_I18NTIMELENGTH 10
#define STD_I18NTIMELENGTH 12
size_t i18n_checktimelength (void);
char *file_date (time_t);
char *file_date_pck (time_t);
int exist_file (char *name);

Просмотреть файл

@ -1155,11 +1155,28 @@ input_enable_update (WInput *in)
update_input (in, 0);
}
#define ELEMENTS(a) (sizeof(a)/sizeof(a[0]))
int
push_history (WInput *in, char *text)
{
static int i18n;
/* input widget where urls with passwords are entered without any
vfs prefix */
static const char *password_input_fields[] = {
" Link to a remote machine ",
" FTP to machine ",
" SMB link to machine "
};
Hist *new;
char *p;
int i;
if (!i18n) {
i18n = 1;
for (i = 0; i < ELEMENTS(password_input_fields); i++)
password_input_fields[i] = _(password_input_fields[i]);
}
for (p = text; *p == ' ' || *p == '\t'; p++);
if (!*p)
@ -1177,22 +1194,23 @@ push_history (WInput *in, char *text)
new->next = 0;
new->prev = in->history;
new->text = g_strdup (text);
if (in->history_name){
#ifdef HAVE_GNOME
if (strcmp (in->history_name + 4, _(" Link to a remote machine ")) == 0 ||
strcmp (in->history_name + 4, _(" FTP to machine ")) == 0)
#else
if (strcmp (in->history_name + 3, _(" Link to a remote machine ")) == 0 ||
strcmp (in->history_name + 3, _(" FTP to machine ")) == 0)
#endif
strip_password (new->text, 0);
else
strip_password (new->text, 1);
if (in->history_name) {
p = in->history_name + 3;
for (i = 0; i < ELEMENTS(password_input_fields); i++)
if (strcmp (p, password_input_fields[i]) == 0)
break;
if (i < ELEMENTS(password_input_fields))
strip_password (new->text, 0);
else
strip_password (new->text, 1);
}
in->history = new;
return 2;
}
#undef ELEMENTS
/* Cleans the input line and adds the current text to the history */
void
new_input (WInput *in)

Просмотреть файл

@ -1,3 +1,8 @@
1999-08-06 Norbert Warmuth <nwarmuth@privat.circular.de>
* tar.c (read_header): Don't segfault when a symlink points to the
root directory.
1999-08-01 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs.c: Don't close a function definition with "};". SunCC from

Просмотреть файл

@ -318,7 +318,7 @@ read_header (vfs *me, vfs_s_super *archive, int tard)
? next_long_link
: g_strdup (header->header.arch_linkname));
len = strlen (current_link_name);
if (len && current_link_name [len - 1] == '/')
if (len > 1 && current_link_name [len - 1] == '/')
current_link_name[len - 1] = 0;
next_long_link = next_long_name = NULL;