source: rtems/cpukit/libmisc/shell/shell.h @ f26145b

4.104.114.84.95
Last change on this file since f26145b was cbd7691, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/02/04 at 18:20:51

2004-12-02 Ralf Corsepius <ralf.corsepius@…>

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