source: rtems/cpukit/libmisc/shell/shell.h @ 714f06c

4.104.114.84.95
Last change on this file since 714f06c was 714f06c, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/17/04 at 08:12:02

2004-04-17 Ralf Corsepius <ralf_corsepius@…>

  • libmisc/capture/capture-cli.c, libmisc/cpuuse/cpuuse.c, libmisc/dumpbuf/dumpbuf.c, libmisc/fsmount/fsmount.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/mon-task.c, libmisc/rtmonuse/rtmonuse.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c, libmisc/untar/untar.c: Use fprintf(stdout,...) instead of printf.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *
3 *  Instantatiate a new terminal shell.
4 *
5 *  Author:
6 *
7 *   WORK: fernando.ruiz@ctv.es
8 *   HOME: correo@fernando-ruiz.com
9 *
10 *   Thanks at:
11 *    Chris John
12 *
13 *  $Id$
14 */
15
16#ifndef __SHELL_H__
17#define __SHELL_H__
18
19#include <rtems.h>
20#include <stdio.h>
21#include <termios.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27typedef int (*shell_command_t)(int argc,char * argv[]);
28
29struct shell_cmd_tt ;
30typedef struct shell_cmd_tt shell_cmd_t;
31
32struct shell_cmd_tt {
33 char * name;
34 char * usage;
35 char * topic;
36 shell_command_t command;
37 shell_cmd_t * alias;
38 shell_cmd_t * next;
39};
40
41uint32_t   new_rtems_name(char * rtems_name);
42shell_cmd_t * shell_lookup_cmd(char * cmd);
43shell_cmd_t * shell_add_cmd(char * cmd,
44                            char * topic,
45                            char * usage,
46                            shell_command_t command);
47shell_cmd_t * shell_alias_cmd(char * cmd, char * alias);
48
49int shell_make_args(char * cmd,
50                    int  * pargc,
51                    char * argv[]);
52
53typedef struct  {
54  rtems_name magic; /* 'S','E','N','V': Shell Environment */
55  char * devname;
56  char * taskname;
57  tcflag_t tcflag;
58  /* user extensions */
59  int  exit_shell; /* logout */
60  int  forever   ; /* repeat login */
61  int  errorlevel;
62  int  mdump_adr;
63} shell_env_t;
64
65int shell_scanline(char * line,int size,FILE * in,FILE * out) ;
66void cat_file(FILE * out,char *name);
67void write_file(char *name,char * content);
68
69rtems_status_code shell_init(char * task_name      ,
70                              uint32_t      task_stacksize,/*0 default*/
71                              rtems_task_priority task_priority ,
72                              char * devname      ,
73                              tcflag_t tcflag     ,
74                              int forever         );
75
76extern shell_env_t global_shell_env,
77                *  current_shell_env;
78/*--------*/
79/* cmds.c */
80/*--------*/
81int str2int(char * s);
82void register_cmds(void);
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif
Note: See TracBrowser for help on using the repository browser.