Warning fixes + compile fixes -mig
Этот коммит содержится в:
родитель
965880696c
Коммит
8fb1821455
@ -260,7 +260,7 @@ gicon_get_icon_for_file (file_entry *fe)
|
||||
if (mime_type){
|
||||
char *icon;
|
||||
|
||||
icon = gnome_mime_type_get_value (mime_type, "icon-filename");
|
||||
icon = gnome_mime_get_value (mime_type, "icon-filename");
|
||||
|
||||
if (icon){
|
||||
image = gicon_get_by_filename (icon);
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma inhibit push
|
||||
#include <gnome-factory.idl>
|
||||
#pragma inhibit pop
|
||||
|
||||
module GNOME {
|
||||
exception POSIX_ERROR { string errorstr; };
|
||||
|
@ -27,7 +27,7 @@ Hint: Have you plenty of RAM/Virtual RAM? Set the tar VFS memlimit to -1.
|
||||
Hint: Completion works on all input lines in all dialogs. Just press M-Tab.
|
||||
Hint: On slow terminals the -s flag may help.
|
||||
Hint: Find File: you can work on the files found using the Panelize button.
|
||||
Hint: Want to do complex searchs? Use the External Panelize command.
|
||||
Hint: Want to do complex searches? Use the External Panelize command.
|
||||
Hint: To change directory halfway through typing a command, use M-c (quick cd).
|
||||
Note: Shell commands will not work when you are on a non-local file system.
|
||||
Hint: Bring text back from the dead with C-y.
|
||||
|
@ -1,3 +1,7 @@
|
||||
1998-12-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* dir.c (link_isdir): Remove unused variable.
|
||||
|
||||
Sun Dec 13 18:35:05 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* screen.c (panel_reload): Don't set panel->selected to zero here,
|
||||
|
@ -16,9 +16,9 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <config.h>
|
||||
#define DIR_H_INCLUDE_HANDLE_DIRENT
|
||||
#include "tty.h"
|
||||
#include "fs.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -27,7 +27,6 @@
|
||||
#include "x.h"
|
||||
#include "mad.h"
|
||||
#include "global.h"
|
||||
#define DIR_H_INCLUDE_HANDLE_DIRENT
|
||||
#include "dir.h"
|
||||
#include "util.h"
|
||||
#include "dialog.h"
|
||||
@ -496,8 +495,6 @@ int do_load_dir(dir_list *list, sortfn *sort, int reverse, int case_sensitive, c
|
||||
|
||||
int link_isdir (file_entry *file)
|
||||
{
|
||||
struct stat b;
|
||||
|
||||
if (file->f.link_to_dir)
|
||||
return 1;
|
||||
else
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include "util.h"
|
||||
#include <errno.h>
|
||||
#include "../vfs/vfs.h"
|
||||
|
24
src/main.h
24
src/main.h
@ -175,16 +175,6 @@ extern WMenu *the_menubar;
|
||||
|
||||
extern Dlg_head *midnight_dlg;
|
||||
|
||||
/* Back hack to define the following routines only if the client code
|
||||
* has included panel.h
|
||||
*/
|
||||
#ifdef __PANEL_H
|
||||
void directory_history_add (WPanel *panel, char *s);
|
||||
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
void update_one_panel_widget (WPanel *panel, int force_update, char *current_file);
|
||||
int midnight_callback (struct Dlg_head *h, int id, int msg);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void edition_pre_exec (void);
|
||||
@ -200,3 +190,17 @@ void exec_shell (void);
|
||||
# define MC_BASE "/.mc/"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Back hack to define the following routines only if the client code
|
||||
* has included panel.h
|
||||
*/
|
||||
#ifdef __PANEL_H
|
||||
|
||||
#ifndef PANEL_DEFS_DONE
|
||||
#define PANEL_DEFS_DONE
|
||||
void directory_history_add (WPanel *panel, char *s);
|
||||
int do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
void update_one_panel_widget (WPanel *panel, int force_update, char *current_file);
|
||||
int midnight_callback (struct Dlg_head *h, int id, int msg);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -144,6 +144,12 @@ typedef struct {
|
||||
int click_x, click_y;
|
||||
|
||||
int dragging;
|
||||
|
||||
/* Used for scrolling nicely during drags */
|
||||
int timer_id;
|
||||
int drag_motion_x;
|
||||
int drag_motion_y;
|
||||
|
||||
#endif
|
||||
void *corbadat;
|
||||
} WPanel;
|
||||
|
@ -132,6 +132,7 @@ void change_nroff (WView *view);
|
||||
void set_monitor (WView *view, int set_on);
|
||||
void view_move_forward (WView *view, int i);
|
||||
void view_move_backward (WView *view, int i);
|
||||
void view_add_one_vline (void);
|
||||
#endif
|
||||
|
||||
/* Command: view a file, if _command != NULL we use popen on _command */
|
||||
|
103
vfs/local.c
103
vfs/local.c
@ -12,13 +12,15 @@
|
||||
#include "../src/util.h"
|
||||
|
||||
#include "vfs.h"
|
||||
#include "local.h"
|
||||
|
||||
/* Note: Some of this functions are not static. This has rather good
|
||||
* reason: exactly same functions would have to appear in sfs.c. This
|
||||
* saves both computer's memory and my work. <pavel@ucw.cz>
|
||||
* */
|
||||
|
||||
static void *local_open (vfs *me, char *file, int flags, int mode)
|
||||
static void *
|
||||
local_open (vfs *me, char *file, int flags, int mode)
|
||||
{
|
||||
int *local_info;
|
||||
int fd;
|
||||
@ -33,7 +35,8 @@ static void *local_open (vfs *me, char *file, int flags, int mode)
|
||||
return local_info;
|
||||
}
|
||||
|
||||
int local_read (void *data, char *buffer, int count)
|
||||
int
|
||||
local_read (void *data, char *buffer, int count)
|
||||
{
|
||||
int n;
|
||||
|
||||
@ -52,7 +55,8 @@ int local_read (void *data, char *buffer, int count)
|
||||
return n;
|
||||
}
|
||||
|
||||
int local_close (void *data)
|
||||
int
|
||||
local_close (void *data)
|
||||
{
|
||||
int fd;
|
||||
|
||||
@ -64,12 +68,14 @@ int local_close (void *data)
|
||||
return close (fd);
|
||||
}
|
||||
|
||||
int local_errno (vfs *me)
|
||||
int
|
||||
local_errno (vfs *me)
|
||||
{
|
||||
return errno;
|
||||
}
|
||||
|
||||
static void *local_opendir (vfs *me, char *dirname)
|
||||
static void *
|
||||
local_opendir (vfs *me, char *dirname)
|
||||
{
|
||||
DIR **local_info;
|
||||
DIR *dir;
|
||||
@ -84,22 +90,26 @@ static void *local_opendir (vfs *me, char *dirname)
|
||||
return local_info;
|
||||
}
|
||||
|
||||
static int local_telldir (void *data)
|
||||
static int
|
||||
local_telldir (void *data)
|
||||
{
|
||||
return telldir( *(DIR **) data );
|
||||
}
|
||||
|
||||
static void local_seekdir (void *data, int offset)
|
||||
static void
|
||||
local_seekdir (void *data, int offset)
|
||||
{
|
||||
seekdir( *(DIR **) data, offset );
|
||||
}
|
||||
|
||||
static void *local_readdir (void *data)
|
||||
static void *
|
||||
local_readdir (void *data)
|
||||
{
|
||||
return readdir (*(DIR **) data);
|
||||
}
|
||||
|
||||
static int local_closedir (void *data)
|
||||
static int
|
||||
local_closedir (void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -109,12 +119,14 @@ static int local_closedir (void *data)
|
||||
return i;
|
||||
}
|
||||
|
||||
static int local_stat (vfs *me, char *path, struct stat *buf)
|
||||
static int
|
||||
local_stat (vfs *me, char *path, struct stat *buf)
|
||||
{
|
||||
return stat (path, buf);
|
||||
}
|
||||
|
||||
static int local_lstat (vfs *me, char *path, struct stat *buf)
|
||||
static int
|
||||
local_lstat (vfs *me, char *path, struct stat *buf)
|
||||
{
|
||||
#ifndef HAVE_STATLSTAT
|
||||
return lstat (path,buf);
|
||||
@ -123,42 +135,50 @@ static int local_lstat (vfs *me, char *path, struct stat *buf)
|
||||
#endif
|
||||
}
|
||||
|
||||
int local_fstat (void *data, struct stat *buf)
|
||||
int
|
||||
local_fstat (void *data, struct stat *buf)
|
||||
{
|
||||
return fstat (*((int *) data), buf);
|
||||
}
|
||||
|
||||
static int local_chmod (vfs *me, char *path, int mode)
|
||||
static int
|
||||
local_chmod (vfs *me, char *path, int mode)
|
||||
{
|
||||
return chmod (path, mode);
|
||||
}
|
||||
|
||||
static int local_chown (vfs *me, char *path, int owner, int group)
|
||||
static int
|
||||
local_chown (vfs *me, char *path, int owner, int group)
|
||||
{
|
||||
return chown (path, owner, group);
|
||||
}
|
||||
|
||||
static int local_utime (vfs *me, char *path, struct utimbuf *times)
|
||||
static int
|
||||
local_utime (vfs *me, char *path, struct utimbuf *times)
|
||||
{
|
||||
return utime (path, times);
|
||||
}
|
||||
|
||||
static int local_readlink (vfs *me, char *path, char *buf, int size)
|
||||
static int
|
||||
local_readlink (vfs *me, char *path, char *buf, int size)
|
||||
{
|
||||
return readlink (path, buf, size);
|
||||
}
|
||||
|
||||
static int local_unlink (vfs *me, char *path)
|
||||
static int
|
||||
local_unlink (vfs *me, char *path)
|
||||
{
|
||||
return unlink (path);
|
||||
}
|
||||
|
||||
static int local_symlink (vfs *me, char *n1, char *n2)
|
||||
static int
|
||||
local_symlink (vfs *me, char *n1, char *n2)
|
||||
{
|
||||
return symlink (n1, n2);
|
||||
}
|
||||
|
||||
static int local_write (void *data, char *buf, int nbyte)
|
||||
static int
|
||||
local_write (void *data, char *buf, int nbyte)
|
||||
{
|
||||
int fd;
|
||||
int n;
|
||||
@ -179,82 +199,97 @@ static int local_write (void *data, char *buf, int nbyte)
|
||||
return n;
|
||||
}
|
||||
|
||||
static int local_rename (vfs *me, char *a, char *b)
|
||||
static int
|
||||
local_rename (vfs *me, char *a, char *b)
|
||||
{
|
||||
return rename (a, b);
|
||||
}
|
||||
|
||||
static int local_chdir (vfs *me, char *path)
|
||||
static int
|
||||
local_chdir (vfs *me, char *path)
|
||||
{
|
||||
return chdir (path);
|
||||
}
|
||||
|
||||
int local_lseek (void *data, off_t offset, int whence)
|
||||
int
|
||||
local_lseek (void *data, off_t offset, int whence)
|
||||
{
|
||||
int fd = * (int *) data;
|
||||
|
||||
return lseek (fd, offset, whence);
|
||||
}
|
||||
|
||||
static int local_mknod (vfs *me, char *path, int mode, int dev)
|
||||
static int
|
||||
local_mknod (vfs *me, char *path, int mode, int dev)
|
||||
{
|
||||
return mknod (path, mode, dev);
|
||||
}
|
||||
|
||||
static int local_link (vfs *me, char *p1, char *p2)
|
||||
static int
|
||||
local_link (vfs *me, char *p1, char *p2)
|
||||
{
|
||||
return link (p1, p2);
|
||||
}
|
||||
|
||||
static int local_mkdir (vfs *me, char *path, mode_t mode)
|
||||
static int
|
||||
local_mkdir (vfs *me, char *path, mode_t mode)
|
||||
{
|
||||
return mkdir (path, mode);
|
||||
}
|
||||
|
||||
static int local_rmdir (vfs *me, char *path)
|
||||
static int
|
||||
local_rmdir (vfs *me, char *path)
|
||||
{
|
||||
return rmdir (path);
|
||||
}
|
||||
|
||||
static vfsid local_getid (vfs *me, char *path, struct vfs_stamping **parent)
|
||||
static vfsid
|
||||
local_getid (vfs *me, char *path, struct vfs_stamping **parent)
|
||||
{
|
||||
*parent = NULL;
|
||||
return (vfsid) -1; /* We do not free local fs stuff at all */
|
||||
}
|
||||
|
||||
static int local_nothingisopen (vfsid id)
|
||||
static int
|
||||
local_nothingisopen (vfsid id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void local_free (vfsid id)
|
||||
static void
|
||||
local_free (vfsid id)
|
||||
{
|
||||
}
|
||||
|
||||
static char *local_getlocalcopy (vfs *me, char *path)
|
||||
static char *
|
||||
local_getlocalcopy (vfs *me, char *path)
|
||||
{
|
||||
return strdup (path);
|
||||
}
|
||||
|
||||
static void local_ungetlocalcopy (vfs *me, char *path, char *local, int has_changed)
|
||||
static void
|
||||
local_ungetlocalcopy (vfs *me, char *path, char *local, int has_changed)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
caddr_t local_mmap (vfs *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset)
|
||||
caddr_t
|
||||
local_mmap (vfs *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset)
|
||||
{
|
||||
int fd = * (int *)data;
|
||||
|
||||
return mmap (addr, len, prot, flags, fd, offset);
|
||||
}
|
||||
|
||||
int local_munmap (vfs *me, caddr_t addr, size_t len, void *data)
|
||||
int
|
||||
local_munmap (vfs *me, caddr_t addr, size_t len, void *data)
|
||||
{
|
||||
return munmap (addr, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int local_which(vfs *me, char *path)
|
||||
static int
|
||||
local_which (vfs *me, char *path)
|
||||
{
|
||||
return 0; /* Every path which other systems do not like is expected to be ours */
|
||||
}
|
||||
|
11
vfs/sfs.c
11
vfs/sfs.c
@ -27,6 +27,7 @@
|
||||
#include "../src/main.h"
|
||||
|
||||
#include "vfs.h"
|
||||
#include "local.h"
|
||||
|
||||
/* This is needed, or libvfs.so will lack symbol shell. Should look up who requires it */
|
||||
char *shell = "/bin/sh";
|
||||
@ -278,16 +279,6 @@ static void sfs_ungetlocalcopy (vfs *me, char *path, char *local, int has_change
|
||||
{
|
||||
}
|
||||
|
||||
extern int local_close (void *data);
|
||||
extern int local_read (void *data, char *buffer, int count);
|
||||
extern int local_fstat (void *data, struct stat *buf);
|
||||
extern int local_errno (vfs *me);
|
||||
extern int local_lseek (void *data, off_t offset, int whence);
|
||||
#ifdef HAVE_MMAP
|
||||
extern caddr_t local_mmap (vfs *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset);
|
||||
extern int local_munmap (vfs *me, caddr_t addr, size_t len, void *data);
|
||||
#endif
|
||||
|
||||
static int sfs_init (vfs *me)
|
||||
{
|
||||
FILE *cfg = fopen( LIBDIR "extfs/sfs.ini", "r" );
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user