1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
/* $Id: cmd.h,v 1.5 2004/05/20 11:10:52 mhe Exp $
*
* cmd.h -- read and execute commands, this is the main loop
*
* Yet Another FTP Client
* Copyright (C) 1998-2001, Martin Hedenfalk <mhe@stacken.kth.se>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. See COPYING for more details.
*/
#ifndef _cmd_h_included
#define _cmd_h_included
#include "args.h"
#define CMD_AMBIGUOUS (cmd_t *)-1
typedef void (*vfunc)(int argc, char **argv);
typedef struct {
char *cmd;
bool needconnect, needlogdin;
bool auto_unquote;
int cpltype;
vfunc func;
} cmd_t;
/* in commands.c */
cmd_t *find_cmd(const char *name);
cmd_t *find_func(const char *cmd, bool print_error);
int rearrange_redirections(args_t *args);
void command_loop(void);
void exit_yafc(void);
extern void exe_cmdline(char *str, bool aliases_are_expanded);
extern cmd_t cmds[];
#endif
|