1
1

Adding unarj and various small but neccessary bits.

Этот коммит содержится в:
Pavel Machek 1998-09-03 19:43:38 +00:00
родитель 6436e3efc1
Коммит fb62340c99
4 изменённых файлов: 74 добавлений и 5 удалений

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

@ -3,7 +3,11 @@
#include "dlg.h"
#ifndef VFS_STANDALONE
#define MSG_ERROR ((char *) -1)
#else
#define MSG_ERROR "Error: "
#endif
Dlg_head *message (int error, char *header, char *text, ...);
int query_dialog (char *header, char *text, int flags, int count, ...);

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

@ -1,3 +1,13 @@
Wed Sep 2 13:59:47 1998 Pavel Machek <pavel@ucw.cz>
* ftpfs.c: cleanup of code, few static's added
* extfs/uarj: added, still, you need patches to unarj to make this
work
* util-alone.c: now includes code from libvfs.c, so we can kill
libvfs.c (which is good thing as it was non-standard in Makefiles)
Sun Aug 30 13:19:49 1998 Pavel Machek <pavel@ucw.cz>
* undelfs.c: fixed, it has been broken for too long

33
vfs/extfs/uarj Обычный файл
Просмотреть файл

@ -0,0 +1,33 @@
#! /bin/sh
#
# Copyright 1998 Pavel Machek,
# partly based on zip by Jakub Jelinek 1995
#
# Distribute in terms of GPL.
#
#
ARJ=mcunarj
mcarjfs_list ()
{
$ARJ v $1 | awk -v uid=${UID-0} '
BEGIN { hyphens=0 }
/^----------/ { if (hyphens > 0) exit 0; hyphens=1; next }
{
if (hyphens < 1) next;
path=$1;
getline;
printf "-rw-r--r-- 1 %-8d %-8d %8d %s-%s %s %s\n", uid, 0, $1, substr($4,4), substr($4,1,2), substr($5,1,5), path
}' 2>/dev/null
}
mcarjfs_copyout ()
{
$ARJ p $1 $2 2> $3 > /dev/null
}
case "$1" in
list) mcarjfs_list $2; exit 0;;
copyout) mcarjfs_copyout $2 $3 $4; exit 0;;
esac
exit 1

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

@ -50,6 +50,10 @@
#include "vfs.h"
#include "callback.h"
#ifndef VFS_STANDALONE
#error This has only sense when compiling standalone version
#endif
int source_route = 0;
int cd_symlinks = 0;
@ -96,7 +100,7 @@ load_anon_passwd (void)
return NULL;
}
static char (*callbacks[NUM_CALLBACKS])(char *msg);
static char (*callbacks[NUM_CALLBACKS])(char *msg) = { NULL, NULL, NULL, };
void
vfs_set_callback (int num, void *func)
@ -166,8 +170,8 @@ void
message_1s (int i, char *c1, char *c2)
{
char buf [4096];
snprintf (buf, sizeof (buf), c1, c2);
snprintf (buf, sizeof (buf), "%s %s", c1, c2);
box_puts (buf);
}
@ -176,7 +180,7 @@ message_2s (int i, char *c1, char *c2, char *c3)
{
char buf [4096];
snprintf (buf, sizeof (buf), c1, c2, c3 );
snprintf (buf, sizeof (buf), "%s %s %s", c1, c2, c3 );
box_puts (buf );
}
@ -184,6 +188,24 @@ void message_3s( int i, char *c1, char *c2, char *c3, const char *c4 )
{
char buf [4096];
snprintf (buf, sizeof (buf), c1, c2, c3, c4);
snprintf (buf, sizeof (buf), "%s %s %s %s", c1, c2, c3, c4);
box_puts (buf);
}
void vfs_init( void );
void ftpfs_init_passwd( void );
char *mc_home = LIBDIR;
void
mc_vfs_init( void )
{
vfs_init();
ftpfs_init_passwd();
}
void
mc_vfs_done( void )
{
vfs_shut();
}