/*********************************************************************\
* Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu) *
* Copyright (c) 1993 by Phil Richards (pgr@prg.ox.ac.uk) *
* *
* You may copy or modify this file in any manner you wish, provided *
* that this notice is always included, and that you hold the author *
* harmless for any loss or damage resulting from the installation or *
* use of this software. *
\*********************************************************************/
/* ---INFOBEGIN--- * DO NOT DELETE THIS COMMENT BLOCK!!!
COMMAND ls remote "list the contents of the remote directory"
* ---INFOEND--- */
#include "client.h"
#include "table.h"
#include "ls.h"
#include <stdlib.h>
#include <setjmp.h>
static jmp_buf main_env;
void
ls_bad(int n)
{
longjmp(main_env, n);
}
/* ARGSUSED */
int
rls_main(int argc, char *const*argv, char **envp)
{
int retval;
char *old_env_dir;
old_env_dir = strdup(env_dir);
/* assume fls_main() does the appropriate validate_operation() */
if (!(retval = setjmp(main_env)))
retval = fls_main(argc, argv);
(void)free(env_dir);
env_dir = old_env_dir;
client_done();
return retval;
}
syntax highlighted by Code2HTML, v. 0.9.1